@curio-data/dsh-intelli-search 0.0.0-stage → 0.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +199 -0
- package/README.md +74 -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 +284 -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,75 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Intelli Search for DeepSeek Harness
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[_DeepSeek Harness_](https://github.com/deepseek-ai/deepseek-harness) (`dsh`) host bundle for [`@curio-data/mcp-intelli-search`](https://www.npmjs.com/package/@curio-data/mcp-intelli-search): intelligent web research with a five-stage pipeline (search, fetch, per-page extraction, collation, cache suggestions), cited answers and a local `.search/` cache of every run.
|
|
4
|
+
|
|
5
|
+
The bundle adds two entries to a harness profile. One starts the standalone MCP server through `npx` with `--host dsh`; the other registers the shared `intelli-search` skill. The generator pins the server version in the launcher. Search and research run in that server, not in the bundle.
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
- `dsh` within the declared `engines.dsh` range `>=0.2.2-rc.1 <0.3.0` (see Evidence and Limits below)
|
|
10
|
+
- [_Node.js_](https://nodejs.org/) 24.9 or later on `PATH` (the harness's own floor; the first start downloads the MCP package through `npx`)
|
|
11
|
+
- For installation and removal, `pnpm` on `PATH` or an explicit `pnpmCommand`. A launcher-provided package manager takes precedence.
|
|
12
|
+
- An [_OpenRouter_](https://openrouter.ai) API key for the search, extract and collate stages
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
Installation by name requires both this package and its matching MCP server on npm. Install into the profile used to start the harness (`tui` in this example):
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
dsh plugin --profile tui add @curio-data/dsh-intelli-search
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Start the same profile from the project directory with `dsh --profile tui`.
|
|
23
|
+
|
|
24
|
+
## Credentials
|
|
25
|
+
|
|
26
|
+
The server receives its key through the harness environment layer. Precedence: an `OPENROUTER_API_KEY` exported in the launching environment, then a `.env` file in the launch directory, then `$DSH_HOME/.env`. Accepted values are copied into the environment once at launch, so restart that profile after changing a key. To use the key across launching shells, prepare the harness-home file before entering the key:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
(umask 077; touch "${DSH_HOME:-$HOME/.dsh}/.env") && chmod 600 "${DSH_HOME:-$HOME/.dsh}/.env"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
After the command succeeds, open the file in an editor so the key stays out of shell history. Put `OPENROUTER_API_KEY=<key>` on its own line, replacing any previous definition.
|
|
33
|
+
|
|
34
|
+
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.
|
|
35
|
+
|
|
36
|
+
Alternatively, `npx -y --package @curio-data/mcp-intelli-search mcp-intelli-search setup` reads a key from standard input 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). A stored file is reread on each call; a nonempty environment key takes precedence. Remove `OPENROUTER_API_KEY` from all three environment layers and restart to use the file.
|
|
37
|
+
|
|
38
|
+
## Workspace and Cache
|
|
39
|
+
|
|
40
|
+
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: 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 `$DSH_HOME/profiles/<name>/cordis.patch.yml` and set `cwd`. The override replaces that row's entire `config`. Copy its other `config` fields from the bundle and update the pinned package version after each bundle upgrade. A home or filesystem-root working directory is rejected with an actionable `WORKSPACE` error instead of creating an accidental shared cache.
|
|
41
|
+
|
|
42
|
+
## Tools and Timeouts
|
|
43
|
+
|
|
44
|
+
The harness names the MCP server `intelli`, so the four tools appear as:
|
|
45
|
+
|
|
46
|
+
- `mcp__intelli__intelli_search`
|
|
47
|
+
- `mcp__intelli__intelli_extract`
|
|
48
|
+
- `mcp__intelli__intelli_collate`
|
|
49
|
+
- `mcp__intelli__intelli_research`
|
|
50
|
+
|
|
51
|
+
Start with `intelli_search` for quick facts; `intelli_research` runs the full pipeline over multiple pages. Research calls can take minutes: the bundle raises the bridge call limit to ten minutes (`toolCallTimeoutMs: 600000`). 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 a first start; a later start reuses the `npx` cache.
|
|
52
|
+
|
|
53
|
+
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 together with the startup log instead of substituting the harness's own web search.
|
|
54
|
+
|
|
55
|
+
On `0.2.2-rc.1`, a project skill with the same name outranks the bundle's skill registration; a user-level skill does not.
|
|
56
|
+
|
|
57
|
+
## Verification
|
|
58
|
+
|
|
59
|
+
After restarting with a key in place, 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. `dsh --profile <name> --dump-config` shows the composed bundle rows, with `!!js` expressions verbatim, and is the first check when tools are missing.
|
|
60
|
+
|
|
61
|
+
## Removal
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
dsh plugin --profile <name> remove @curio-data/dsh-intelli-search
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Restart the same profile with `dsh --profile <name>`, then confirm with `dsh --profile <name> --dump-config` that the two bundle rows are gone.
|
|
68
|
+
|
|
69
|
+
## Evidence and Limits
|
|
70
|
+
|
|
71
|
+
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. Credentialed local-bundle search, research and credential-file fallback were verified separately on `0.2.2-rc.1` only. The whole declared range and registry-pin installation have not been tested.
|
|
72
|
+
|
|
73
|
+
## Licence
|
|
74
|
+
|
|
75
|
+
Apache-2.0. Copyright 2026 Ashraf Miah, Curio Data Pro Ltd. See `LICENSE`. This package bundles no third-party code, so it carries no `NOTICE`. The MCP server it launches through `npx`, `@curio-data/mcp-intelli-search`, ships its own `LICENSE` and `NOTICE`.
|
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.0'
|
|
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.0",
|
|
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,284 @@
|
|
|
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` package through `npx` with `--host dsh`, and one registrar registers this skill. 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`, the harness's own floor. For bundle installation and removal, put `pnpm` on `PATH` or configure `pnpmCommand`. A launcher-provided package manager takes precedence.
|
|
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 `$DSH_HOME/profiles/<name>/cordis.patch.yml` and set `cwd`. The override replaces that row's entire `config`. Copy its other `config` fields from the bundle and update the pinned package version after each bundle upgrade. 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. Precedence: an `OPENROUTER_API_KEY` exported in the launching environment, then a `.env` file in the launch directory, then `$DSH_HOME/.env`. Accepted values are copied into the environment once at launch, so adding a key requires one harness restart. 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, open the file in an editor so the key stays out of shell history. Put `OPENROUTER_API_KEY=<key>` on its own line, replacing any previous definition. From the project directory, restart the same profile with `dsh --profile <name>`.
|
|
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, so the environment layer above is the supported route. As an alternative, `npx -y --package @curio-data/mcp-intelli-search mcp-intelli-search setup` reads a key from standard input 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; 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. See [Configuration](https://github.com/Curio-Data/pi-intelli-search/blob/main/packages/mcp/README.md#configuration) and [Tuning](https://github.com/Curio-Data/pi-intelli-search/blob/main/packages/mcp/README.md#tuning) in the standalone guide.
|
|
251
|
+
|
|
252
|
+
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.
|
|
253
|
+
|
|
254
|
+
Research calls can take minutes. A slow call is not a hang: the bundle raises the bridge call limit to ten minutes (`toolCallTimeoutMs: 600000`). 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.
|
|
255
|
+
|
|
256
|
+
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.
|
|
257
|
+
|
|
258
|
+
### Verify Inference
|
|
259
|
+
|
|
260
|
+
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. 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.
|
|
261
|
+
|
|
262
|
+
### Removal
|
|
263
|
+
|
|
264
|
+
```bash
|
|
265
|
+
dsh plugin --profile <name> remove @curio-data/dsh-intelli-search
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
Restart the same profile with `dsh --profile <name>` after removal, then confirm with `dsh --profile <name> --dump-config` that the two bundle rows are gone.
|
|
269
|
+
|
|
270
|
+
### Evidence Limits
|
|
271
|
+
|
|
272
|
+
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. 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.
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
## Failure Modes
|
|
276
|
+
|
|
277
|
+
- **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.
|
|
278
|
+
- **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.
|
|
279
|
+
- **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.
|
|
280
|
+
- **Invalid Arguments** (`INVALID_ARGUMENTS`): the call parameters failed validation. Correct the arguments; do not retry unchanged.
|
|
281
|
+
- **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.
|
|
282
|
+
- **Cancelled** (`CANCELLED`): the client cancelled the call. Do not retry automatically.
|
|
283
|
+
- **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.
|
|
284
|
+
- **Busy:** the eight-request queue is already full. Wait for an earlier call to finish before submitting another.
|