@curio-data/dsh-intelli-search 0.0.0-stage → 0.25.1
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/LICENSE +199 -0
- package/README.md +282 -2
- package/cordis.patch.yml +27 -0
- package/icon.svg +20 -0
- package/index.js +80 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +46 -4
- package/skills/intelli-search/SKILL.md +310 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by the Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text to be enclosed should be included verbatim,
|
|
184
|
+
enclosed between triple backticks. The text should be
|
|
185
|
+
enclosed in the appropriate comment syntax for the file format.
|
|
186
|
+
|
|
187
|
+
Copyright 2026 Ashraf Miah, Curio Data Pro Ltd
|
|
188
|
+
|
|
189
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
190
|
+
you may not use this file except in compliance with the License.
|
|
191
|
+
You may obtain a copy of the License at
|
|
192
|
+
|
|
193
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
194
|
+
|
|
195
|
+
Unless required by applicable law or agreed to in writing, software
|
|
196
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
197
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
198
|
+
See the License for the specific language governing permissions and
|
|
199
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,283 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- Generated from the repository README.md by scripts/generate-package-readmes.mjs. Edit the root README.md, then run npm run generate:readmes and npm run generate:plugins. -->
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# Intelli Search for DeepSeek Harness
|
|
4
|
+
|
|
5
|
+
`@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.1`, 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
|
+
|
|
7
|
+
The harness names the server `intelli`, so the four tools appear as:
|
|
8
|
+
|
|
9
|
+
| Tool | Use |
|
|
10
|
+
|---|---|
|
|
11
|
+
| `mcp__intelli__intelli_search` | Quick search: one concise answer with numbered sources, for facts, current versions and release dates. No page fetching or extraction |
|
|
12
|
+
| `mcp__intelli__intelli_research` | Research: search, fetch up to `maxUrls` pages, extract each page, collate a cited report and cache it. Accepts a batch of questions known at launch, with `batchMode: "independent"` for a separate answer per question or `"expansion"` for one merged report |
|
|
13
|
+
| `mcp__intelli__intelli_extract` | Extract query-relevant content from one page |
|
|
14
|
+
| `mcp__intelli__intelli_collate` | Deduplicate and synthesise extractions into a cached report |
|
|
15
|
+
|
|
16
|
+
Start with a quick search; use research for comparisons, detailed analysis or a gap a search answer leaves. Each research call costs more and takes longer than a search.
|
|
17
|
+
|
|
18
|
+
## Contents
|
|
19
|
+
|
|
20
|
+
<!-- TOC:START -->
|
|
21
|
+
|
|
22
|
+
- [Prerequisites](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/plugins/dsh/README.md#prerequisites)
|
|
23
|
+
- [Installation](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/plugins/dsh/README.md#installation)
|
|
24
|
+
- [Upgrade, Restart and Removal](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/plugins/dsh/README.md#upgrade-restart-and-removal)
|
|
25
|
+
- [Credentials](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/plugins/dsh/README.md#credentials)
|
|
26
|
+
- [Workspace](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/plugins/dsh/README.md#workspace)
|
|
27
|
+
- [Configuration](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/plugins/dsh/README.md#configuration)
|
|
28
|
+
- [Verification](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/plugins/dsh/README.md#verification)
|
|
29
|
+
- [Timeouts](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/plugins/dsh/README.md#timeouts)
|
|
30
|
+
- [Troubleshooting](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/plugins/dsh/README.md#troubleshooting)
|
|
31
|
+
- [Charges, Cache and Privacy](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/plugins/dsh/README.md#charges-cache-and-privacy)
|
|
32
|
+
- [Evidence and Limits](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/plugins/dsh/README.md#evidence-and-limits)
|
|
33
|
+
- [Further Documentation](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/plugins/dsh/README.md#further-documentation)
|
|
34
|
+
- [Licence](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/plugins/dsh/README.md#licence)
|
|
35
|
+
|
|
36
|
+
<!-- TOC:END -->
|
|
37
|
+
|
|
38
|
+
<a id="requirements"></a>
|
|
39
|
+
## Prerequisites
|
|
40
|
+
|
|
41
|
+
- `dsh` within the bundle's declared range, `>=0.2.2-rc.1 <0.3.0`. The range is a compatibility declaration; Evidence and Limits names the versions tested.
|
|
42
|
+
- Node.js 24.9 or later, the harness's own floor, with `node` and `npx` on `PATH`. The bridge row starts the server through `npx`.
|
|
43
|
+
- For the `dsh plugin` commands below, put `pnpm` on `PATH` unless the launcher supplies its own package manager. The `pnpmCommand` setting configures the in-harness plugin manager, not these commands.
|
|
44
|
+
- Network access on the first start, when `npx` downloads the MCP server package. Later starts reuse the `npx` cache.
|
|
45
|
+
- An OpenRouter API key on an account with credit. Every search and research call bills that account, separately from any harness subscription.
|
|
46
|
+
- Linux for verified operation. The server's native fetch assets are verified on Linux x86-64 only, and every recorded check of this bundle ran on Linux; _macOS_ and _Windows_ are not verified.
|
|
47
|
+
|
|
48
|
+
## Installation
|
|
49
|
+
|
|
50
|
+
The bundle installs into one harness profile, and only that profile loads it. Install it into the profile the harness is started with, the name given to `--profile`. The examples set `profile=web`, one of the profiles the harness ships; change that value to the profile in use. A misspelt profile name leaves the tools absent from the profile in use.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
profile=web
|
|
54
|
+
dsh plugin --profile "$profile" add @curio-data/dsh-intelli-search
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
In the Web interface, the harness documents an equivalent route: open **Plugins**, select **Add plugin** and enter `@curio-data/dsh-intelli-search`, the text that follows `add` in the command. This project's checks use the command line only.
|
|
58
|
+
|
|
59
|
+
After installation, start the profile from the project directory, or restart it if it is running:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
profile=web
|
|
63
|
+
dsh --profile "$profile"
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
<a id="removal"></a>
|
|
67
|
+
## Upgrade, Restart and Removal
|
|
68
|
+
|
|
69
|
+
Each bundle version launches one exact MCP server version, so the server changes only when the bundle is updated. For a bundle installed by name, the Web **Plugins** page documents **Versions** and **Update** controls; restart the profile after updating. That route follows the harness's documentation and has not been exercised in this project's checks. From the command line, remove the bundle and add it again, then restart the profile:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
profile=web
|
|
73
|
+
dsh plugin --profile "$profile" remove @curio-data/dsh-intelli-search
|
|
74
|
+
dsh plugin --profile "$profile" add @curio-data/dsh-intelli-search
|
|
75
|
+
dsh --profile "$profile"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Removal and reinstallation are verified; an update between two published versions by either route is not. A row override that sets `cwd` (see Workspace) keeps launching the server version written in it until the override is edited.
|
|
79
|
+
|
|
80
|
+
Restart the profile from the project directory after installing, updating or removing the bundle, after changing a key in an environment layer and after editing a configuration file the server has already loaded. The harness composes bundle rows and reads environment files at launch, and the server keeps a loaded configuration for its lifetime.
|
|
81
|
+
|
|
82
|
+
To remove the bundle and confirm that both of its rows are gone from the composed profile:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
profile=web
|
|
86
|
+
dsh plugin --profile "$profile" remove @curio-data/dsh-intelli-search
|
|
87
|
+
dsh --profile "$profile" --dump-config
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The dump no longer lists the rows `mcp-intelli-search` and `intelli-search-skill`. Restart the profile to stop a server that is still running. Removal deletes no data: the per-user configuration and stored key under `${XDG_CONFIG_HOME:-$HOME/.config}/mcp-intelli-search/`, any `OPENROUTER_API_KEY` line in a `.env` file, each project's `.search/` cache and the `npx` cache remain until deleted separately. The per-user directory is shared with the Codex launcher. Delete any `mcp-intelli-search` override from the profile's `cordis.patch.yml` as well.
|
|
91
|
+
|
|
92
|
+
## Credentials
|
|
93
|
+
|
|
94
|
+
The server reads its OpenRouter key from the `OPENROUTER_API_KEY` environment variable or from a credential file. A nonempty environment value takes precedence over the file. Without either, the four tools still start and each call returns an actionable `CONFIGURATION` error. A key saved on the harness model-settings page does not reach this server: the harness resolves that credential through a service a child process cannot read.
|
|
95
|
+
|
|
96
|
+
**Environment Route.** The bridge row forwards `OPENROUTER_API_KEY` from the harness environment layer, which takes the first value it finds in the environment that launches the harness, then a `.env` file in the launch directory, then `$DSH_HOME/.env`. The harness reads these once at launch, so restart the profile after changing a key. The server treats an empty value as absent, so the row loads before a key is supplied. To keep the key in the harness-home file, create the file with user-only permissions before entering the key:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
(umask 077; touch "${DSH_HOME:-$HOME/.dsh}/.env") && chmod 600 "${DSH_HOME:-$HOME/.dsh}/.env"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
After the command succeeds, open the file in an editor, so the key stays out of shell history, and put `OPENROUTER_API_KEY=` followed by the key on its own line, replacing any earlier definition.
|
|
103
|
+
|
|
104
|
+
**Credential-File Route.** The server's `setup` command reads the key from standard input and stores it in a user-only file. It refuses a terminal as its input. Run the following block in _Bash_; if the current shell is not Bash, start `bash` first:
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
(
|
|
108
|
+
set +x
|
|
109
|
+
set +a
|
|
110
|
+
unset key || exit 1
|
|
111
|
+
IFS= read -r -s -p 'OpenRouter API key: ' key || exit 1
|
|
112
|
+
printf '\n'
|
|
113
|
+
printf '%s\n' "$key" | \
|
|
114
|
+
npx -y --package @curio-data/mcp-intelli-search@0.25.1 \
|
|
115
|
+
mcp-intelli-search setup
|
|
116
|
+
)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Paste and run the whole block. Wait for the `OpenRouter API key:` prompt before entering the key; input is hidden. The parentheses run the commands in a subshell with tracing and automatic export turned off. Setup receives the key on standard input, and the calling shell's variables remain unchanged. Confirm that setup prints `Setup complete.` followed by the configuration and credential paths. If that shell exports a nonempty `OPENROUTER_API_KEY`, setup also warns that the environment value takes precedence over the stored key.
|
|
120
|
+
|
|
121
|
+
Setup creates `${XDG_CONFIG_HOME:-$HOME/.config}/mcp-intelli-search/config.json` with the default models when it is absent, adds a missing `apiKeyFile` selection to an existing file and keeps existing model and tuning selections. It writes the key to `openrouter.key` beside that file. When the file already names a custom `apiKeyFile`, setup writes the key to that path and leaves the configuration file unchanged. Only an absolute `XDG_CONFIG_HOME` is honoured; an unset or relative value means `$HOME/.config`. Run setup with the same `XDG_CONFIG_HOME` as the harness, so both use one directory.
|
|
122
|
+
|
|
123
|
+
The server rereads the credential file on every call, so a new or replaced key takes effect on the next call without a restart. The file must be a regular file, owned by the current user, with no group or other access; setup creates it that way. To use the file while a key is also set in an environment layer, remove `OPENROUTER_API_KEY` from all three layers and restart the profile.
|
|
124
|
+
|
|
125
|
+
<a id="workspace-and-cache"></a>
|
|
126
|
+
## Workspace
|
|
127
|
+
|
|
128
|
+
The server uses the harness working directory as its workspace and writes the research cache, `.search/` by default, below it. Start the harness from the project directory: changing directory later in the session does not move the cache. A home or filesystem-root working directory is rejected, by each tool call with an actionable `WORKSPACE` error and by the configuration check, instead of creating one cache shared across projects. The four tools still appear.
|
|
129
|
+
|
|
130
|
+
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` to the absolute project path. Every session of that profile then caches in that directory, wherever the harness starts. The override replaces the row's entire `config`: copy its other `config` fields from the `--dump-config` output, keep the `OPENROUTER_API_KEY` expression exactly as shown there, and update the pinned server version after each bundle update. The home and filesystem-root rejection still applies to the `cwd` value.
|
|
131
|
+
|
|
132
|
+
## Configuration
|
|
133
|
+
|
|
134
|
+
With no per-user configuration file, the server uses built-in defaults: OpenRouter for every role, `perplexity/sonar` for search, `minimax/minimax-m3` for extraction and collation, and the shared tuning defaults, including a default budget of ten search-result pages per query (`defaultUrls`) and a cap of 20 per query (`maxUrls`). The defaults need no file.
|
|
135
|
+
|
|
136
|
+
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
|
+
|
|
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.1/packages/mcp/README.md#configuration) and [Tuning](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/packages/mcp/README.md#tuning) in the standalone server guide list every key and its accepted values.
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"providers": {
|
|
143
|
+
"openrouter": {
|
|
144
|
+
"apiKeyEnv": "OPENROUTER_API_KEY"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"models": {
|
|
148
|
+
"search": {
|
|
149
|
+
"provider": "openrouter",
|
|
150
|
+
"model": "perplexity/sonar"
|
|
151
|
+
},
|
|
152
|
+
"extract": {
|
|
153
|
+
"provider": "openrouter",
|
|
154
|
+
"model": "minimax/minimax-m3"
|
|
155
|
+
},
|
|
156
|
+
"collate": {
|
|
157
|
+
"provider": "openrouter",
|
|
158
|
+
"model": "minimax/minimax-m3"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"tuning": {
|
|
162
|
+
"defaultUrls": 5,
|
|
163
|
+
"maxUrls": 8
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Validate the file with the configuration check before restarting. The server reads the file when it starts:
|
|
169
|
+
|
|
170
|
+
- With no file at start-up, the built-in defaults stay in force until the profile restarts. Restart after creating the file.
|
|
171
|
+
- A file that exists but fails validation does not stop the server. Each tool call returns a `CONFIGURATION` error naming the file and reads it again, until a call finds it valid. A file selected with `--config` in a row override behaves the same way while it is missing.
|
|
172
|
+
- Once a file loads, its selections stay fixed until the profile restarts. Restart after every later edit.
|
|
173
|
+
|
|
174
|
+
## Verification
|
|
175
|
+
|
|
176
|
+
**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
|
+
|
|
178
|
+
```bash
|
|
179
|
+
npx -y --package @curio-data/mcp-intelli-search@0.25.1 \
|
|
180
|
+
mcp-intelli-search --host dsh --check-config
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
A valid configuration prints one of two lines and exits with status `0`:
|
|
184
|
+
|
|
185
|
+
- `Configuration is valid.` when the per-user file loads.
|
|
186
|
+
- `Configuration is valid (built-in DeepSeek Harness defaults; no per-user file found).` when there is no per-user file.
|
|
187
|
+
|
|
188
|
+
An invalid server configuration produces a diagnostic and exit status `1`. If `npx` fails to start the server, the check has not run. The check does not test the key, account credit or model access.
|
|
189
|
+
|
|
190
|
+
**Bundle Rows.** The composed profile must list both bundle rows, `mcp-intelli-search` and `intelli-search-skill`:
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
profile=web
|
|
194
|
+
dsh --profile "$profile" --dump-config
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Inference Check (Billed).** Start the profile from the project directory with a key in place and ask: “Use mcp__intelli__intelli_search to find the current TypeScript release and cite the official source.” A completed tool call and an answer with sources show that the key, the search model and the bridge work. A tool list alone does not show provider access, and a quick search does not exercise page fetching, extraction or collation. To check the full pipeline, request research with a small page budget, for example: “Use mcp__intelli__intelli_research with maxUrls 3 to compare the two most recent Node.js long-term support releases.” A completed call returns a report and writes it under `.search/`; it costs more than a search.
|
|
198
|
+
|
|
199
|
+
<a id="tools-and-timeouts"></a>
|
|
200
|
+
## Timeouts
|
|
201
|
+
|
|
202
|
+
Two clocks limit a research call. The bundle raises the bridge's limit for one tool call to ten minutes (`toolCallTimeoutMs: 600000`); when it expires, the call fails in the harness. Inside the server, each model call has its own timeout, `llmTimeoutMs` (120 seconds by default). `llmRetryAttempts` (three attempts by default) repeats a timed-out or transient failure, and `outputBudgetRetries` (two by default) repeats an empty output-capped extraction, or any output-capped synthesis, at a doubled cap, with a timeout that grows with the cap up to four times `llmTimeoutMs`. With the defaults, one page's budget attempts alone can take up to 14 minutes, so a research call can outlast the bridge limit. Raising `llmTimeoutMs` lengthens calls; it never extends the bridge limit.
|
|
203
|
+
|
|
204
|
+
Server startup and tool discovery use a separate bridge request timeout, 60 seconds on `0.2.2-rc.1`. A slow first `npx` download can exceed it and leave the profile without the four tools on its first start.
|
|
205
|
+
|
|
206
|
+
To keep a call within ten minutes:
|
|
207
|
+
|
|
208
|
+
- Ask for fewer pages, for example `maxUrls` 3 in the request, or set lower `defaultUrls` and `maxUrls` in the per-user configuration.
|
|
209
|
+
- Put fewer questions in one batch, or fewer pages in each entry: a batch is one tool call, so all its entries share the limit.
|
|
210
|
+
- Set `outputBudgetRetries` to `0`, and lower `llmRetryAttempts`, when the limit is reached repeatedly.
|
|
211
|
+
- Use a quick search when a cited answer is enough.
|
|
212
|
+
|
|
213
|
+
A longer bridge limit needs a row override setting `toolCallTimeoutMs`, with the same version upkeep as a `cwd` override.
|
|
214
|
+
|
|
215
|
+
## Troubleshooting
|
|
216
|
+
|
|
217
|
+
| Symptom | Cause | Remedy |
|
|
218
|
+
|---|---|---|
|
|
219
|
+
| The four `mcp__intelli__*` tools are absent | The bridge row did not start. The bundle sets `failOnStartupError: false`, so the harness logs the failure and keeps running. Common causes: the bundle is in another profile; `node` or `npx` is missing or older than the floor; no network on the first start; or the first download outlasted the 60-second discovery timeout | Confirm both bundle rows with `--dump-config` for the profile in use. Run the configuration check from the project directory, which also fills the `npx` cache, then restart the profile. If the tools are still absent, read the harness log for the `mcp-intelli-search` row |
|
|
220
|
+
| `WORKSPACE` error naming the home or filesystem root | The harness started in the home directory or `/` | Restart the profile from the project directory, or set `cwd` in a row override |
|
|
221
|
+
| `CONFIGURATION` error naming `config.json` | The per-user file is invalid JSON or fails validation | Run the configuration check, correct the file and call again; the server reads it again on each call until it loads |
|
|
222
|
+
| Edits to `config.json` have no effect | The file had already loaded, or it was created after the profile started | Restart the profile |
|
|
223
|
+
| `CONFIGURATION` error for a missing key | No nonempty `OPENROUTER_API_KEY` reached the server and no credential file exists | Supply the key through either route; restart after an environment change |
|
|
224
|
+
| `CONFIGURATION` error about the credential file | The file is linked, owned by another user, or readable by group or others | Run setup again, or restrict the file to its owner with `chmod 600` |
|
|
225
|
+
| Setup stops with `Setup requires the key on standard input` | Setup was run with the terminal as input | Use the setup pipeline |
|
|
226
|
+
| A stored key is not used | A nonempty environment key takes precedence, or setup and the harness used different `XDG_CONFIG_HOME` values | Remove `OPENROUTER_API_KEY` from all three environment layers and restart, or run setup again with the harness's `XDG_CONFIG_HOME` |
|
|
227
|
+
| A research call fails after ten minutes | The bridge limit expired | Reduce the work as described under timeouts |
|
|
228
|
+
| `PROVIDER` error | Authentication, model access, account credit or connectivity failed; the category alone does not identify a rejected key | Check the account and its model access. Replace a stored key with setup, which applies on the next call, or an environment key, which needs a restart |
|
|
229
|
+
| Preflight names a model role or capability | A configured model is not in OpenRouter's catalogue or lacks a capability its role needs | Correct the model in `config.json` and restart |
|
|
230
|
+
| Repeated `429` retries | Provider rate limits | Set `minRequestIntervalMs` to `3000` and `extractionConcurrency` to `2` in `tuning`, then restart |
|
|
231
|
+
| 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
|
+
|
|
233
|
+
The [standalone server's troubleshooting reference](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/packages/mcp/README.md#timeouts-and-troubleshooting) gives the full list of diagnostics.
|
|
234
|
+
|
|
235
|
+
## Charges, Cache and Privacy
|
|
236
|
+
|
|
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.1/packages/mcp/README.md#cost).
|
|
238
|
+
|
|
239
|
+
**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
|
+
|
|
241
|
+
```text
|
|
242
|
+
.search/
|
|
243
|
+
├── 2026-11-23-node-lts-releases-3f7a2c/
|
|
244
|
+
│ ├── report.md # Synthesis and source inventory
|
|
245
|
+
│ ├── query.txt # The query as sent
|
|
246
|
+
│ ├── meta.json # Local telemetry sidecar
|
|
247
|
+
│ ├── extractions/ # One extraction per page
|
|
248
|
+
│ └── sources/ # Full fetched page content
|
|
249
|
+
├── 2026-11-23-batch-node-lts-releases-9c1e04/
|
|
250
|
+
│ ├── manifest.json # Batch queries, outcomes and member folders
|
|
251
|
+
│ └── batch-meta.json # Local batch telemetry, when enabled
|
|
252
|
+
└── .index.json # Index of cached reports
|
|
253
|
+
```
|
|
254
|
+
|
|
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.1/packages/mcp/README.md#cache-structure).
|
|
256
|
+
|
|
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.1/packages/mcp/README.md#filesystem-and-privacy-boundaries).
|
|
258
|
+
|
|
259
|
+
**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
|
+
|
|
261
|
+
## Evidence and Limits
|
|
262
|
+
|
|
263
|
+
Every check below ran on Linux in an isolated profile created from the harness's headless template. Each is a separate class of evidence; none stands in for another.
|
|
264
|
+
|
|
265
|
+
- **Local bundle, credential-free:** a locally generated bundle installed, composed both rows, registered the four tools and the skill, rejected home and filesystem-root workspaces, delivered a dummy key, and was removed and reinstalled on `dsh` `0.2.2-rc.1` and `0.2.2-rc.5`, without a provider call.
|
|
266
|
+
- **Pre-bootstrap launcher:** before the bundle was public, the packed 0.25.0 bundle started the public 0.25.0 MCP server on `0.2.2-rc.1`, discovered the four tools, loaded the skill and passed the configuration check.
|
|
267
|
+
- **Public installation by name:** the public 0.25.0 bundle installed by name on `0.2.2-rc.1`, with four tools, the skill, the configuration check, removal and reinstallation, and no model call.
|
|
268
|
+
- **Credentialed research:** with a local bundle on `0.2.2-rc.1` only, a quick search, a three-page research call and the credential-file route completed through real OpenRouter calls.
|
|
269
|
+
|
|
270
|
+
Other versions in the declared range `>=0.2.2-rc.1 <0.3.0`, the shipped `web` profile, the Web **Add plugin**, **Versions** and **Update** routes, and macOS and Windows hosts are untested. The [compatibility record](https://github.com/Curio-Data/pi-intelli-search/blob/main/docs/COMPATIBILITY.md#deepseek-harness-evidence-and-limits) gives dates and details, including [public installation by name](https://github.com/Curio-Data/pi-intelli-search/blob/main/docs/COMPATIBILITY.md#public-dsh-profile-installation-2026-11-22).
|
|
271
|
+
|
|
272
|
+
## Further Documentation
|
|
273
|
+
|
|
274
|
+
- [Usage examples](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/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.1/packages/mcp/README.md#tools).
|
|
275
|
+
- [Configuration](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/packages/mcp/README.md#configuration) and [Tuning](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/packages/mcp/README.md#tuning) for every key, model constraint and accepted range.
|
|
276
|
+
- [Timeouts and Troubleshooting](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/packages/mcp/README.md#timeouts-and-troubleshooting) for every diagnostic.
|
|
277
|
+
- [Cost](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/packages/mcp/README.md#cost), [Cache Structure](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/packages/mcp/README.md#cache-structure) and [Filesystem and Privacy Boundaries](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/packages/mcp/README.md#filesystem-and-privacy-boundaries).
|
|
278
|
+
- [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.1/plugins/dsh/skills/intelli-search/SKILL.md), the agent-facing guidance this bundle registers.
|
|
280
|
+
|
|
281
|
+
## Licence
|
|
282
|
+
|
|
283
|
+
Apache-2.0. Copyright 2026 Ashraf Miah, Curio Data Pro Ltd. See the bundle's [LICENSE](https://github.com/Curio-Data/pi-intelli-search/blob/main/plugins/dsh/LICENSE). The bundle contains no third-party code, so it carries no `NOTICE`. The MCP server it launches through `npx`, `@curio-data/mcp-intelli-search`, 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.
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Generated by scripts/generate-plugin-bundles.mjs; do not edit by hand.
|
|
2
|
+
#
|
|
3
|
+
# The environment expression forwards the key from the harness environment
|
|
4
|
+
# layer (inherited environment, then the launch directory's .env, then
|
|
5
|
+
# $DSH_HOME/.env) and stays valid when it is unset: an empty value is
|
|
6
|
+
# absent to the server, so the row loads before setup.
|
|
7
|
+
- insert:
|
|
8
|
+
- id: mcp-intelli-search
|
|
9
|
+
name: '@deepseek-ai/dsh-mcp-client'
|
|
10
|
+
config:
|
|
11
|
+
serverName: intelli
|
|
12
|
+
transport: stdio
|
|
13
|
+
command: npx
|
|
14
|
+
args:
|
|
15
|
+
- '-y'
|
|
16
|
+
- '--package'
|
|
17
|
+
- '@curio-data/mcp-intelli-search@0.25.1'
|
|
18
|
+
- 'mcp-intelli-search'
|
|
19
|
+
- '--host'
|
|
20
|
+
- 'dsh'
|
|
21
|
+
env:
|
|
22
|
+
OPENROUTER_API_KEY: !!js process.env.OPENROUTER_API_KEY || ''
|
|
23
|
+
toolCallTimeoutMs: 600000
|
|
24
|
+
failOnStartupError: false
|
|
25
|
+
|
|
26
|
+
- id: intelli-search-skill
|
|
27
|
+
name: '@curio-data/dsh-intelli-search'
|
package/icon.svg
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128" width="128" height="128" role="img" aria-label="Intelli Search for DeepSeek Harness">
|
|
2
|
+
<!-- SPDX-License-Identifier: Apache-2.0 -->
|
|
3
|
+
<!-- Copyright 2026 Ashraf Miah, Curio Data Pro Ltd -->
|
|
4
|
+
<!-- Original artwork for the dsh-intelli-search plugin bundle. -->
|
|
5
|
+
<defs>
|
|
6
|
+
<linearGradient id="isq" x1="0" y1="0" x2="1" y2="1">
|
|
7
|
+
<stop offset="0" stop-color="#4f46e5"/>
|
|
8
|
+
<stop offset="1" stop-color="#0d9488"/>
|
|
9
|
+
</linearGradient>
|
|
10
|
+
</defs>
|
|
11
|
+
<rect x="4" y="4" width="120" height="120" rx="24" fill="url(#isq)"/>
|
|
12
|
+
<g fill="#ffffff">
|
|
13
|
+
<rect x="30" y="24" width="44" height="56" rx="5" fill="#eef2ff" fill-opacity="0.16" stroke="#ffffff" stroke-width="4"/>
|
|
14
|
+
<rect x="40" y="38" width="24" height="4" rx="2"/>
|
|
15
|
+
<rect x="40" y="50" width="24" height="4" rx="2"/>
|
|
16
|
+
<rect x="40" y="62" width="16" height="4" rx="2"/>
|
|
17
|
+
</g>
|
|
18
|
+
<circle cx="82" cy="74" r="20" fill="none" stroke="#ffffff" stroke-width="8"/>
|
|
19
|
+
<line x1="96" y1="88" x2="110" y2="102" stroke="#ffffff" stroke-width="8" stroke-linecap="round"/>
|
|
20
|
+
</svg>
|
package/index.js
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
// Copyright 2026 Ashraf Miah, Curio Data Pro Ltd
|
|
3
|
+
//
|
|
4
|
+
// Generated into plugins/dsh/index.js by scripts/generate-plugin-bundles.mjs
|
|
5
|
+
// from this template; the generated copy is the one the host loads. Do not
|
|
6
|
+
// edit the generated file.
|
|
7
|
+
//
|
|
8
|
+
// Cordis object plugin for DeepSeek Harness: registers the bundled
|
|
9
|
+
// intelli-search skill with the host skill registry when the bundle loads.
|
|
10
|
+
// It imports nothing from the host and has no package dependencies, so the
|
|
11
|
+
// bundle needs no peer requirements. Runtime skill registration does not
|
|
12
|
+
// parse Markdown frontmatter, so this module parses the generator's exact
|
|
13
|
+
// frontmatter shape (a leading `---` block whose lines are `name:`,
|
|
14
|
+
// `description:` and an optional `whenToUse:`) and registers the
|
|
15
|
+
// frontmatter-free body. It is not a general YAML parser; any other line in
|
|
16
|
+
// the block is rejected.
|
|
17
|
+
|
|
18
|
+
import { readFileSync } from "node:fs";
|
|
19
|
+
import { dirname } from "node:path";
|
|
20
|
+
import { fileURLToPath } from "node:url";
|
|
21
|
+
|
|
22
|
+
export const name = "intelli-search-skill";
|
|
23
|
+
export const inject = ["skills"];
|
|
24
|
+
|
|
25
|
+
function unquote(value) {
|
|
26
|
+
const trimmed = value.trim();
|
|
27
|
+
if (
|
|
28
|
+
(trimmed.startsWith('"') && trimmed.endsWith('"')) ||
|
|
29
|
+
(trimmed.startsWith("'") && trimmed.endsWith("'"))
|
|
30
|
+
) {
|
|
31
|
+
return trimmed.slice(1, -1);
|
|
32
|
+
}
|
|
33
|
+
return trimmed;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function parseFrontmatter(raw) {
|
|
37
|
+
const match = /^---\n([\s\S]*?)\n---\n/.exec(raw);
|
|
38
|
+
if (!match) {
|
|
39
|
+
throw new Error("intelli-search skill is missing its frontmatter block");
|
|
40
|
+
}
|
|
41
|
+
const fields = {};
|
|
42
|
+
for (const line of match[1].split("\n")) {
|
|
43
|
+
const separator = line.indexOf(":");
|
|
44
|
+
if (separator <= 0) {
|
|
45
|
+
throw new Error(`unsupported frontmatter line in intelli-search skill: ${line}`);
|
|
46
|
+
}
|
|
47
|
+
const key = line.slice(0, separator).trim();
|
|
48
|
+
if (key !== "name" && key !== "description" && key !== "whenToUse") {
|
|
49
|
+
throw new Error(`unsupported frontmatter key in intelli-search skill: ${key}`);
|
|
50
|
+
}
|
|
51
|
+
fields[key] = unquote(line.slice(separator + 1));
|
|
52
|
+
}
|
|
53
|
+
if (!fields.name) {
|
|
54
|
+
throw new Error("intelli-search skill frontmatter is missing a name");
|
|
55
|
+
}
|
|
56
|
+
if (!fields.description) {
|
|
57
|
+
throw new Error("intelli-search skill frontmatter is missing a description");
|
|
58
|
+
}
|
|
59
|
+
const registration = { name: fields.name, description: fields.description };
|
|
60
|
+
if (fields.whenToUse) {
|
|
61
|
+
registration.whenToUse = fields.whenToUse;
|
|
62
|
+
}
|
|
63
|
+
return { registration, content: raw.slice(match[0].length) };
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function apply(ctx) {
|
|
67
|
+
const skillUrl = new URL("./skills/intelli-search/SKILL.md", import.meta.url);
|
|
68
|
+
const path = fileURLToPath(skillUrl);
|
|
69
|
+
const { registration, content } = parseFrontmatter(readFileSync(path, "utf8"));
|
|
70
|
+
ctx.skills.register({
|
|
71
|
+
...registration,
|
|
72
|
+
source: "bundled",
|
|
73
|
+
path,
|
|
74
|
+
content,
|
|
75
|
+
resourceBase: {
|
|
76
|
+
kind: "directory",
|
|
77
|
+
path: dirname(path),
|
|
78
|
+
},
|
|
79
|
+
});
|
|
80
|
+
}
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,48 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@curio-data/dsh-intelli-search",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.25.1",
|
|
4
|
+
"description": "Web research over MCP: search, fetch, extract, collate and cache suggestions.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Curio Data Pro Ltd",
|
|
9
|
+
"url": "https://github.com/Curio-Data"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/Curio-Data/pi-intelli-search",
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "git+https://github.com/Curio-Data/pi-intelli-search.git",
|
|
15
|
+
"directory": "plugins/dsh"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"research",
|
|
19
|
+
"web-search",
|
|
20
|
+
"documentation",
|
|
21
|
+
"mcp"
|
|
22
|
+
],
|
|
23
|
+
"exports": {
|
|
24
|
+
".": "./index.js",
|
|
25
|
+
"./package.json": "./package.json",
|
|
26
|
+
"./locale/*.json": "./locale/*.json",
|
|
27
|
+
"./icon": "./icon.svg"
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"index.js",
|
|
31
|
+
"cordis.patch.yml",
|
|
32
|
+
"skills/**",
|
|
33
|
+
"locale/*.json",
|
|
34
|
+
"icon.svg",
|
|
35
|
+
"README.md",
|
|
36
|
+
"LICENSE"
|
|
37
|
+
],
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=24.9.0",
|
|
40
|
+
"dsh": ">=0.2.2-rc.1 <0.3.0"
|
|
41
|
+
},
|
|
42
|
+
"dsh": {
|
|
43
|
+
"manifestVersion": 1,
|
|
44
|
+
"bundle": {
|
|
45
|
+
"patch": "./cordis.patch.yml"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: intelli-search
|
|
3
|
+
description: "Load before calling any intelli_search, intelli_research, intelli_extract or intelli_collate tool, including requests to use intelli search. Use for current web information, documentation and API verification. Start with intelli_search for quick facts, latest versions and release dates; reserve intelli_research for multi-page analysis and comparisons. Covers planned research batches, focused extraction, cache use and setup. Report unavailable tools explicitly; never claim another search used this server."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Intelli Search
|
|
7
|
+
|
|
8
|
+
Intelligent web research through the `intelli-search` Model Context Protocol (MCP) server. Four tools: `mcp__intelli__intelli_search`, `mcp__intelli__intelli_extract`, `mcp__intelli__intelli_collate` and `mcp__intelli__intelli_research`. The examples below use the exact qualified names this host declares.
|
|
9
|
+
|
|
10
|
+
Use these tools for current web research when this skill is selected, rather than silently substituting host-native search. If the server or tools are unavailable, report the setup failure explicitly; using another search tool does not establish that this server worked.
|
|
11
|
+
|
|
12
|
+
Inference uses the configured provider account. The server runs one operation at a time with up to eight requests queued; excess submissions receive a busy error rather than waiting.
|
|
13
|
+
|
|
14
|
+
## When to Use Which Tool
|
|
15
|
+
|
|
16
|
+
Start with `mcp__intelli__intelli_search` for a factual question, latest version, release date or brief lookup. A request for current information or sources alone does not require the research pipeline. Keep the scope of the question: do not add comparisons, pricing or release history unless requested.
|
|
17
|
+
|
|
18
|
+
If a search answer looks stale or its sources disagree on the current version, try one narrower `mcp__intelli__intelli_search` targeting official sources before escalating to research. Report unresolved uncertainty rather than treating an older release as current.
|
|
19
|
+
|
|
20
|
+
Use `mcp__intelli__intelli_research` for multi-page comparisons or detailed analysis, or when a search answer leaves a specific evidence gap requiring multiple pages. Search does not fetch and extract each cited page; research adds those stages, collation and cache suggestions. That pipeline makes more provider calls and can take minutes. A longer source list alone is not a reason to choose it.
|
|
21
|
+
|
|
22
|
+
Use one query if it covers the task. For distinct research questions known at launch, use an expansion batch when the questions feed one merged report (for example one decision) and an independent batch for separate deliverables. Wait to ask a question that depends on a finding.
|
|
23
|
+
|
|
24
|
+
### Quick Factual Question
|
|
25
|
+
|
|
26
|
+
Use `mcp__intelli__intelli_search` for a quick factual answer with sources but no deep analysis. The source list holds up to `defaultUrls` (default 10) entries; when it follows the answer's citation numbering it also keeps any entry the answer cites by a higher number. A note under the list says when the answer's markers could not be matched to it. A search-grounded model can cite twenty or more. Read the summary; treat the source list as an index to follow up from, not as reading.
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
mcp__intelli__intelli_search(query="TypeScript 5.8 release date")
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Deep Research for a Coding Task
|
|
33
|
+
|
|
34
|
+
Use `mcp__intelli__intelli_research` when the task needs the full pipeline. Set `maxUrls` to the smallest useful breadth, starting with `3` for targeted research. Always provide a `focusPrompt` to specify the content to retain. Without that guidance, the extraction model produces generic summaries. Translate the user's intent into a specific extraction focus.
|
|
35
|
+
|
|
36
|
+
#### Example: Learning a New Feature
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
User: "How do runes work in Svelte 5?"
|
|
40
|
+
|
|
41
|
+
mcp__intelli__intelli_research(
|
|
42
|
+
query="Svelte 5 runes tutorial examples",
|
|
43
|
+
maxUrls=3,
|
|
44
|
+
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."
|
|
45
|
+
)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
#### Example: Infrastructure and Sysadmin Detail
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
User: "How do I set up podman rootless with systemd?"
|
|
52
|
+
|
|
53
|
+
mcp__intelli__intelli_research(
|
|
54
|
+
query="podman rootless systemd unit configuration",
|
|
55
|
+
maxUrls=3,
|
|
56
|
+
focusPrompt="Extract the exact directory paths podman rootless uses for systemd units, the XDG_RUNTIME_DIR and DBUS_SESSION_BUS_ADDRESS setup, and the systemd --user enable commands. Include file paths."
|
|
57
|
+
)
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
#### Example: Debugging a Specific Problem
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
User: "Why is my Cloudflare Worker timing out on KV writes?"
|
|
64
|
+
|
|
65
|
+
mcp__intelli__intelli_research(
|
|
66
|
+
query="Cloudflare Workers KV write timeout limits",
|
|
67
|
+
maxUrls=3,
|
|
68
|
+
focusPrompt="Extract KV write limits, timeout thresholds, storage limits, and any workarounds for bulk writes. Focus on hard numbers and error messages."
|
|
69
|
+
)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
#### Example: Comparing Options
|
|
73
|
+
|
|
74
|
+
```
|
|
75
|
+
User: "Should I use Tailwind or Vanilla Extract for a new project?"
|
|
76
|
+
|
|
77
|
+
mcp__intelli__intelli_research(
|
|
78
|
+
query="Tailwind CSS vs Vanilla Extract comparison 2026",
|
|
79
|
+
maxUrls=6,
|
|
80
|
+
focusPrompt="Extract pros/cons, bundle size benchmarks, DX tradeoffs, and migration costs. Note which claims come from official sources vs blog opinions."
|
|
81
|
+
)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
#### Example: API Reference
|
|
85
|
+
|
|
86
|
+
An application programming interface (API) reference task needs exact signatures and options.
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
User: "How do I use the Defuddle npm package?"
|
|
90
|
+
|
|
91
|
+
mcp__intelli__intelli_research(
|
|
92
|
+
query="defuddle npm content extraction usage",
|
|
93
|
+
maxUrls=3,
|
|
94
|
+
focusPrompt="Extract the API: install command, function signatures, options object, and output format. Include working code examples."
|
|
95
|
+
)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
### Planned Queries
|
|
99
|
+
|
|
100
|
+
When several questions are known before research starts, pass `queries` instead of `query`. Use `batchMode="expansion"` for related questions that need one answer, or `batchMode="independent"` for separate answers. A question that arises from a finding belongs in a later call. Give each entry a distinct query and an extraction focus. Top-level `focusPrompt`, `maxUrls` and `domains` apply to entries that do not override them.
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
mcp__intelli__intelli_research(
|
|
104
|
+
batchMode="expansion", maxUrls=3,
|
|
105
|
+
queries=[
|
|
106
|
+
{query:"SQLite WAL read transactions", focusPrompt:"Identify when a reader's snapshot starts and ends."},
|
|
107
|
+
{query:"SQLite WAL checkpoints", focusPrompt:"Explain how a long-running reader affects checkpoint progress."}
|
|
108
|
+
]
|
|
109
|
+
)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
For separate deliverables, for example a backup note and a path-handling note, use `batchMode="independent"` with `queries=[{query:"SQLite online backup", focusPrompt:"Identify consistency guarantees."}, {query:"Python pure paths", focusPrompt:"List operations that do not touch the filesystem."}]`.
|
|
113
|
+
|
|
114
|
+
Read the completion count in the first line, and in a merged report the Per-Query Reports list, before assuming full coverage. Open a saved failure report or a capped member's report, then follow up on the missing question only. `[S1]` refers to the inventory of the report that cites it, not to the first source of every member.
|
|
115
|
+
|
|
116
|
+
If fewer than two entries complete, or the merge is skipped or fails, use the returned per-query sections and the stated reason rather than assuming the answers were reconciled. If no entry completes, read each section's outcome before retrying; the call returns an error, with each entry's reason, only when every entry raised an error.
|
|
117
|
+
|
|
118
|
+
### Other Parameters
|
|
119
|
+
|
|
120
|
+
- `maxUrls`: `3` for quick targeted research, `10` (default) for broad research, `16` for exhaustive research. Pass at least `1`; the tool schema declares `minimum: 1`. The server configuration caps this at `maxUrls` (default 20). Requests above the cap are silently clamped.
|
|
121
|
+
- `domains`: Guide search toward given sources, for example `domains=["react.dev", "github.com"]`. This adds a `site:` filter and, with the web search tool enabled, an engine domain filter. It is guidance, not a hard boundary: returned URLs (uniform resource locators) are not checked against a local allowlist before fetching.
|
|
122
|
+
|
|
123
|
+
### When Search Results Mix Source Types
|
|
124
|
+
|
|
125
|
+
The pipeline automatically adapts extraction to source type:
|
|
126
|
+
|
|
127
|
+
- **Official Docs or API Reference:** Preserves exact signatures, types and version annotations.
|
|
128
|
+
- **Blog Posts or Tutorials:** Captures practical patterns, gotchas, real-world examples.
|
|
129
|
+
- **Forums (Reddit, Discourse, StackOverflow):** Captures the problem, accepted solution, caveats. Discards tangents.
|
|
130
|
+
|
|
131
|
+
The collation instruction tells the model to flag contradictions and prefer sources in this order:
|
|
132
|
+
|
|
133
|
+
1. Official documentation
|
|
134
|
+
2. API reference
|
|
135
|
+
3. Tutorials
|
|
136
|
+
4. Blog posts
|
|
137
|
+
5. Forum threads
|
|
138
|
+
|
|
139
|
+
The instruction also retains useful practical examples and forum fixes; source priority is an instruction, not a guarantee of model compliance.
|
|
140
|
+
|
|
141
|
+
### Complex Multi-Angle Research
|
|
142
|
+
|
|
143
|
+
For a different focus per URL (for example, comparing alternatives side by side), orchestrate step by step instead of using `mcp__intelli__intelli_research`:
|
|
144
|
+
|
|
145
|
+
1. `mcp__intelli__intelli_search(query)` to discover URLs.
|
|
146
|
+
2. Fetch the pages with a web-fetch tool if one is installed (the server does not provide one), or with available shell or Hypertext Transfer Protocol (HTTP) tools. Pass the actual page content to the next step; a URL alone is insufficient.
|
|
147
|
+
3. `mcp__intelli__intelli_extract(url, title, content, query, focusPrompt)` to give each URL a different focus.
|
|
148
|
+
4. `mcp__intelli__intelli_collate(extractions, query)` to deduplicate and cache.
|
|
149
|
+
|
|
150
|
+
Example: researching "KV vs Durable Objects". Extract KV pages with `focusPrompt="Extract KV read/write patterns, consistency model, and latency characteristics"`. Extract Durable Objects pages with `focusPrompt="Extract the consistency guarantees, transaction API, and single-computer model"`.
|
|
151
|
+
|
|
152
|
+
When constructing a collation item from an extraction result, use the original `url` and `title`, plus `status: "success"`. Set `extraction` to the text below the result's `### Extraction:` heading, without the extraction-limit warning that can end it (also `details.extraction`). Set `sourceType` from the first line of that text, checking in this order: a line containing `official doc` is `official docs`, `api reference` is `API reference`, `tutorial` is `tutorial`, `blog` is `blog post`, and `forum` or `stackoverflow` is `forum`, ignoring case; any other line is `unknown` (also `details.sourceType`). Set `truncated: true` when the result ends with the warning that extraction output reached `extractionMaxTokens` (also `details.truncated`). If extraction fails, retain that source as a failed item with an empty `extraction`, an explicit `sourceType` such as `unknown`, `status: "failed"` and an optional bounded `error` string describing the failure. Failed items are listed for coverage but do not enter synthesis. Do not forward the entire extraction `details` object: its `currentness` field is not a collation input.
|
|
153
|
+
|
|
154
|
+
## Evidence and Provenance
|
|
155
|
+
|
|
156
|
+
The Source Assessment inventory is generated from successful, non-empty extractions, not the search model's citations. IDs such as `[S1]` identify those evidence entries; cross-links in the synthesis are not additional fetched pages. Read exact cache paths from the inventory rather than guessing numbered filenames. `Not cached` means no full-page file exists for that source. The checks establish reference consistency, not factual accuracy.
|
|
157
|
+
|
|
158
|
+
Manual `mcp__intelli__intelli_collate` treats its inputs as caller-supplied evidence. Supply one non-empty successful extraction per URL; the optional `searchSummary` is accepted for compatibility but does not enter synthesis. Provenance failures return an error before report writes and preserve any prior successful output. They are not automatically retried; a manual rerun repeats the paid stages.
|
|
159
|
+
|
|
160
|
+
## Using the Result
|
|
161
|
+
|
|
162
|
+
The `mcp__intelli__intelli_research` result already contains a concise deduplicated summary. Use it directly. Do not read cache files unless the summary is insufficient for the task.
|
|
163
|
+
|
|
164
|
+
Before repeating a query whose report must be retained, copy the report elsewhere. A successful repeat on the same Coordinated Universal Time (UTC) date attempts to archive the previous run's artefacts to a numbered sibling folder (`<slug>.1`, then `.2` and so on) before writing fresh results. Archiving is best-effort: a failure is logged and the new run can replace the canonical files in place, leaving an incomplete archive. A degraded repeat preserves an earlier successful report and records the failed attempt in telemetry when enabled. An `extraction-failed` or `collate-failed` repeat replaces only an earlier failure report, archiving it first; the other degraded exits leave any report in place. The numbered siblings are a same-day safety measure, not a retention guarantee.
|
|
165
|
+
|
|
166
|
+
The result also includes a `📚 Related cached searches` section when semantically similar previous searches exist in the workspace cache. These are discovered by a model judge that compares the current query against the cache index. The related searches are:
|
|
167
|
+
|
|
168
|
+
- **Supplementary:** The live search always runs. Cached results are offered as additional context.
|
|
169
|
+
- **Cross-Reference:** Read a previous `report.md` when live results are incomplete.
|
|
170
|
+
- **Prior Evidence:** Point to earlier research on the same topic when the live result needs checking.
|
|
171
|
+
|
|
172
|
+
Only reach into the cache when:
|
|
173
|
+
|
|
174
|
+
- The user asks about a specific source that needs re-examination.
|
|
175
|
+
- A required code example was truncated in the summary.
|
|
176
|
+
- A claim in the summary needs checking against the original source.
|
|
177
|
+
- The live results are insufficient and a related cached search may help.
|
|
178
|
+
|
|
179
|
+
### Failed and Incomplete Sources
|
|
180
|
+
|
|
181
|
+
A completed result can still have missing evidence. Check the **Failed Sources** list and truncation warnings before treating the report as complete. Fetch failures and extraction failures are separate counts; a saved full-page link exists only when that page was cached. When a result says pages were saved under `sources/`, read the one that matches the question before re-running research.
|
|
182
|
+
|
|
183
|
+
A truncation warning means generation stopped at the stage's output cap, shown by finish reason `length` or reported usage at the cap; it does not prove exactly where text stopped. Without either signal, the absence of a warning does not establish completeness. Do not present a warned-about extraction or synthesis as complete evidence.
|
|
184
|
+
|
|
185
|
+
For a budget-exhaustion diagnostic, review the matching extraction or collation token cap with the maintainer rather than retrying unchanged. The cap can include reasoning tokens, and lowering reasoning effort is not a guaranteed remedy. A standalone extraction that reached its cap ends with an extraction-limit warning (also `details.truncated`); carry it into manual collation as `truncated: true`. Pass `inferred: true` for a source listed under Inferred Assets or marked `(inferred from text, not a citation)` by `mcp__intelli__intelli_search`. An `extraction-failed` result names the folder in its **Cache** line (also `details.cachePath`), where every fetched page is saved under `sources/`, and its **Failed Sources** list gives each saved page's path and why its extraction failed; read the matching page, or pass it to `mcp__intelli__intelli_extract`, instead of repeating the research. An all-fetch-failed result returns the search summary and up to ten failed URLs with their reasons. A `collate-failed` result names a cached report that lists the saved extractions, which can be read instead of repeating the research. Either failure outcome can instead state that a same-day successful report for the query was preserved and name its folder in the failure message (also `details.preservedCachePath`). This run's pages and extractions were not saved. Its outcome, when telemetry is enabled, and any synthesis rejected by source validation are saved in a separate `attempts/attempt-*` folder beneath the preserved report; a rejected synthesis is named in the result, is kept for diagnosis only and is not accepted evidence. A preserved `extraction-failed` result lists up to ten failed pages with their reasons inline; a preserved `collate-failed` result gives the collation failure reason. A truncation warning on the synthesis means every budget attempt was truncated, or no completed attempt passed source validation; the warning names the cap of the response used. A failed cache judge does not invalidate completed research, and no related-search suggestions do not establish that no relevant cache exists.
|
|
186
|
+
|
|
187
|
+
### Inferred Assets
|
|
188
|
+
|
|
189
|
+
An `Inferred Assets` table, also in `details.inferredAssets`, lists references guessed from search text, such as `install.sh` or `manage.py`, rather than cited. Each row gives the original token, the normalised URL it was fetched as, the fetch result (page, code file, text file, or nothing fetched with a reason) and the saved `sources/` path. When a fetched file may answer the question, read it, and treat it as a guess, not a citation. Check the final URL before relying on the content: "redirected to a different host" means the content came from another hostname, which is not evidence of a different organisation, and an alternate is a different representation, not a redirect. "Code file" classifies the media type or extension, not the language. `mcp__intelli__intelli_search` marks the same sources `(inferred from text, not a citation)`.
|
|
190
|
+
|
|
191
|
+
### Trimmed Collation Input
|
|
192
|
+
|
|
193
|
+
A **Collation input trimmed** notice means the synthesis did not see the full text of each listed extraction. Read each listed extraction file, at the path the notice gives, to recover the omitted text; re-running research does not recover it. A per-source trim names `collationSourceMaxTokens`; raising it sends more of one long page. A budget trim names `collationInputBudgetTokens`; raising it, or requesting fewer URLs, sends more overall. A source trimmed by both limits needs both raised: raising only the budget does not recover text removed by the per-source cap. Report the setting named on the notice's **Configuration** line to the maintainer rather than changing it.
|
|
194
|
+
|
|
195
|
+
## Follow Up from Cache
|
|
196
|
+
|
|
197
|
+
The result's **Cache** line, also `details.cachePath`, gives the cache entry's absolute path; a preserved report's path is in the failure message, also `details.preservedCachePath`. The default is `.search/<date>-<slug>-<hash>/` below the selected workspace; `tuning.cacheDir` can change the cache root. Use the `read` tool, this host's file-reading capability. List the directory and select an exact filename; the examples below are paths, not commands.
|
|
198
|
+
|
|
199
|
+
| Need | File |
|
|
200
|
+
|------|------|
|
|
201
|
+
| Quick refresher on one source | `extractions/<exact-file>.md` |
|
|
202
|
+
| Full original page content | `sources/<exact-file>.md` |
|
|
203
|
+
| Collated overview | `report.md` |
|
|
204
|
+
| Per-stage outcomes for this folder's report | `meta.json` |
|
|
205
|
+
| Outcome of a failed repeat beside a preserved report | `attempts/attempt-<exact-folder>/meta.json` |
|
|
206
|
+
| Synthesis rejected by source validation (diagnosis only) | `rejected-synthesis.json`, or the path the result names |
|
|
207
|
+
| Re-fetch a single URL fresh | Use an installed web-fetch tool or shell/HTTP tools; the server provides no standalone fetch tool |
|
|
208
|
+
|
|
209
|
+
## How It Works
|
|
210
|
+
|
|
211
|
+
The following stages execute inside the research tool.
|
|
212
|
+
|
|
213
|
+
`mcp__intelli__intelli_research` runs a 5-stage pipeline inside a single tool call:
|
|
214
|
+
|
|
215
|
+
1. **Search:** a search-grounded model returns a synthesised answer. Prose links are merged with provider-supplied citation URLs recovered from recognised `url_citation` annotations. Harvesting is best-effort, not a complete record of sources consulted. The merged candidates are selected under the `maxUrls` cap; not every discovered source is fetched.
|
|
216
|
+
2. **Fetch:** Each page is fetched and cleaned to Markdown (navigation, ads and sidebars stripped). A Markdown variant is fetched in parallel and the better version wins by quality score.
|
|
217
|
+
3. **Extract:** A configurable model pulls out only the content relevant to the query. A ≈50K-char page becomes ≈3-5K chars of focused extraction.
|
|
218
|
+
4. **Collate:** Another model call deduplicates across extractions and produces one concise summary. The model is instructed to flag conflicts and use the source order above.
|
|
219
|
+
5. **Cache Suggest:** A model judge looks for related previous searches in the configured cache index. The pipeline awaits the judge under the model-call timeout and retry policy; judge failure is logged without discarding completed research. Cancellation still propagates.
|
|
220
|
+
|
|
221
|
+
The agent receives the final summary, source/cache references and brief stage progress rather than the full fetched pages. Summary length depends on `collationMaxTokens` and model output; appendices add further text.
|
|
222
|
+
|
|
223
|
+
<a id="why-extract-before-collate"></a>
|
|
224
|
+
### Extraction Before Collation
|
|
225
|
+
|
|
226
|
+
Per-page extraction bounds collation input and keeps context use and cost manageable across model choices. As an illustration, eight fetched pages multiplied by ≈50K chars each equals ≈400K chars; compressing each independently gives the collation model ≈32K chars total. Eight pages illustrates the design, not the ten-page default.
|
|
227
|
+
|
|
228
|
+
This is also why `focusPrompt` matters. It tells the extraction model what to keep from each page. Without guidance, it extracts generically and the collation has less signal to work with.
|
|
229
|
+
|
|
230
|
+
## When Not to Search
|
|
231
|
+
|
|
232
|
+
- Writing or editing code already in the project.
|
|
233
|
+
- General programming concepts that need no current external evidence.
|
|
234
|
+
- Refactoring or debugging with full context available.
|
|
235
|
+
|
|
236
|
+
## Setup (One Time)
|
|
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.1` 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
|
+
|
|
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
|
+
|
|
242
|
+
Credentials reach the server through the harness environment layer or a credential file. Environment precedence: an `OPENROUTER_API_KEY` exported in the launching environment, then a `.env` file in the launch directory, then `$DSH_HOME/.env`. The harness reads these once at launch, so a changed key requires one restart of the profile. To use the key across launching shells, prepare the harness-home file before entering the key:
|
|
243
|
+
|
|
244
|
+
```bash
|
|
245
|
+
(umask 077; touch "${DSH_HOME:-$HOME/.dsh}/.env") && chmod 600 "${DSH_HOME:-$HOME/.dsh}/.env"
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
After the command succeeds, the user opens the file in an editor so the key stays out of shell history, and puts `OPENROUTER_API_KEY=` followed by the key on its own line, replacing any previous definition. From the project directory, restart the same profile.
|
|
249
|
+
|
|
250
|
+
The bridge row forwards `process.env.OPENROUTER_API_KEY` to the server; the server treats an empty value as absent and starts without a key. A key stored through the harness model-settings page does not provision this server: that credential is resolved through a service a child process cannot read. As the alternative, the server's `setup` command reads a key from standard input, never from a terminal, and stores it in a user-only credential file beside the per-user configuration at `${XDG_CONFIG_HOME:-$HOME/.config}/mcp-intelli-search`, shared with the Codex host mode. Ask the user to run this pipeline in their own _Bash_ shell; never ask for the key in the conversation or place it in arguments, files or logs:
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
(
|
|
254
|
+
set +x
|
|
255
|
+
set +a
|
|
256
|
+
unset key || exit 1
|
|
257
|
+
IFS= read -r -s -p 'OpenRouter API key: ' key || exit 1
|
|
258
|
+
printf '\n'
|
|
259
|
+
printf '%s\n' "$key" | \
|
|
260
|
+
npx -y --package @curio-data/mcp-intelli-search@0.25.1 \
|
|
261
|
+
mcp-intelli-search setup
|
|
262
|
+
)
|
|
263
|
+
```
|
|
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.1/packages/mcp/README.md#configuration) and [Tuning](https://github.com/Curio-Data/pi-intelli-search/blob/mcp-v0.25.1/packages/mcp/README.md#tuning) in the standalone guide.
|
|
266
|
+
|
|
267
|
+
To validate the configuration without a key or a model call, run from the project directory:
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
npx -y --package @curio-data/mcp-intelli-search@0.25.1 \
|
|
271
|
+
mcp-intelli-search --host dsh --check-config
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
It prints `Configuration is valid.` for a loaded per-user file, or `Configuration is valid (built-in DeepSeek Harness defaults; no per-user file found).` when none exists. It rejects a home or filesystem-root directory like the server does.
|
|
275
|
+
|
|
276
|
+
This host names the MCP server `intelli`, so the four tools appear as `mcp__intelli__intelli_search`, `mcp__intelli__intelli_extract`, `mcp__intelli__intelli_collate` and `mcp__intelli__intelli_research`. A missing tool set means the bridge row did not start: the bundle sets `failOnStartupError: false`, so the harness keeps running and logs the failure rather than surfacing it. Report the missing tools and the startup log; do not substitute the harness's own web search and claim this server was used.
|
|
277
|
+
|
|
278
|
+
Research calls can take minutes. A slow call is not a hang: the bundle raises the bridge call limit to ten minutes (`toolCallTimeoutMs: 600000`), and the server applies its own model-call timeouts and retries during the call. With the defaults, they can outlast the bridge limit, so keep `maxUrls` small (3 for targeted research) and batches short. Server startup and tool discovery use a separate request timeout (60 seconds on `0.2.2-rc.1`), so a slow first `npx` download can still lose the tools on the first start.
|
|
279
|
+
|
|
280
|
+
On `0.2.2-rc.1`, a project skill with the same name outranks this registration; a user-level skill does not. Local overrides therefore work at the project level only.
|
|
281
|
+
|
|
282
|
+
### Verify Inference
|
|
283
|
+
|
|
284
|
+
Request a quick search with `mcp__intelli__intelli_search` and confirm an actual tool call and an answer with sources. A running harness and a registered tool list do not prove provider access, and a quick search does not prove the research pipeline. If the tools are absent, report that setup is incomplete; do not claim this server was used while answering through the harness's own search.
|
|
285
|
+
|
|
286
|
+
### Removal
|
|
287
|
+
|
|
288
|
+
```bash
|
|
289
|
+
profile=web
|
|
290
|
+
dsh plugin --profile "$profile" remove @curio-data/dsh-intelli-search
|
|
291
|
+
dsh --profile "$profile" --dump-config
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
Set `profile` to the profile in use. Restart that profile after removal; the dump must no longer list the two bundle rows. Removal leaves the per-user configuration, stored key, `.env` entries and each project's `.search/` cache in place.
|
|
295
|
+
|
|
296
|
+
### Evidence Limits
|
|
297
|
+
|
|
298
|
+
Installation, exact tool registration, skill loading, workspace guards, credential-free startup and dummy credential delivery are verified against `dsh` `0.2.2-rc.1` and `0.2.2-rc.5` on Linux with the local bundle and no provider calls. Installation by name of the public 0.25.0 packages, with removal and reinstallation, passed separately on `0.2.2-rc.1` without a model call. The bundle declares `engines.dsh: >=0.2.2-rc.1 <0.3.0`; the whole range has not been tested. A separate credentialed local-bundle run verified search, research and credential-file fallback on `0.2.2-rc.1` only.
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
## Failure Modes
|
|
302
|
+
|
|
303
|
+
- **Startup Failures:** Absent path selections and unusable workspaces still fail before serving. Cache safety is checked when valid configuration becomes available: at startup for a loadable file, or on a tool call after file recovery. Correct the diagnostic and restart the host. `--check-config` remains strict and exits with status `1` for invalid configuration or workspace selections.
|
|
304
|
+
- **Configuration Errors** (`CONFIGURATION`, `WORKSPACE`): a tool call found incomplete setup. For a missing, unreadable or invalid selected file, repair the named file and call again; the server rereads it on each call until it loads. JSON syntax diagnostics give a location without echoing the file. After a successful load, configuration changes need a restart. Environment credentials are captured at startup and require a restart; a configured credential file is reread on each call. These preflight errors incur no inference charges.
|
|
305
|
+
- **Provider Errors** (`PROVIDER`): the provider rejected or broke the call. Check credentials or permissions for `401`/`403`, and account credits for ordinary `402` credit exhaustion. The adapter treats a `402` with a valid Retry-After header as transient budget pressure and retries it under the configured bounded policy, like rate limits (`429`) and server errors (`5xx`). If transient failures persist after those attempts, wait before a manual retry rather than changing credentials.
|
|
306
|
+
- **Invalid Arguments** (`INVALID_ARGUMENTS`): the call parameters failed validation. Correct the arguments; do not retry unchanged.
|
|
307
|
+
- **Operation Failures** (`OPERATION`): a stage failed after validation. Read the diagnostic before repeating paid work. For an exhausted output budget or a provenance failure, correct the cause rather than retrying unchanged. Report persistent failures with the stage and bounded diagnostic, without credentials.
|
|
308
|
+
- **Cancelled** (`CANCELLED`): the client cancelled the call. Do not retry automatically.
|
|
309
|
+
- **Degraded Research** (`no-links`, `fetch-failed`, `extraction-failed`, `collate-failed`): the result is still returned with what succeeded. Check the summary and decide whether a narrower query or a retry is warranted. For `extraction-failed`, read the saved page that matches the question from `sources/`; for `collate-failed`, read the saved extractions listed in the report. Do either before repeating the research.
|
|
310
|
+
- **Busy:** the eight-request queue is already full. Wait for an earlier call to finish before submitting another.
|