reasonix 0.4.14 → 0.4.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -0
- package/dist/cli/index.js +393 -83
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +101 -2
- package/dist/index.js +188 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -322,6 +322,72 @@ don't need this opt-out.
|
|
|
322
322
|
|
|
323
323
|
---
|
|
324
324
|
|
|
325
|
+
## Web search — on by default
|
|
326
|
+
|
|
327
|
+
The model has two web tools the moment you launch: `web_search` and
|
|
328
|
+
`web_fetch`. No flag, no API key, no signup. When you ask about
|
|
329
|
+
something the model wasn't trained on (new releases, current events,
|
|
330
|
+
obscure APIs), it decides to call `web_search` on its own; if a
|
|
331
|
+
snippet isn't enough it follows up with `web_fetch`.
|
|
332
|
+
|
|
333
|
+
```
|
|
334
|
+
you › Flutter 3.19 新加了什么?
|
|
335
|
+
assistant
|
|
336
|
+
▸ tool<web_search> → query: "Flutter 3.19 new features"
|
|
337
|
+
▸ tool<web_fetch> → https://docs.flutter.dev/release/3-19
|
|
338
|
+
▸ 3.19 主要新增了 …
|
|
339
|
+
```
|
|
340
|
+
|
|
341
|
+
Backed by **Mojeek**'s public search page — an independent web index,
|
|
342
|
+
no API key, no signup, bot-friendly. Coverage on niche or very recent
|
|
343
|
+
queries can be thinner than Google/Bing, but it's reliable from
|
|
344
|
+
scripts and doesn't gate on cookies or sessions. (DDG was the original
|
|
345
|
+
backend but it started serving anti-bot pages in 2026.)
|
|
346
|
+
|
|
347
|
+
**Turn it off** (offline mode / privacy / CI):
|
|
348
|
+
|
|
349
|
+
```json
|
|
350
|
+
// ~/.reasonix/config.json
|
|
351
|
+
{ "apiKey": "sk-…", "search": false }
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
# Or one env var (wins over config):
|
|
356
|
+
REASONIX_SEARCH=off npx reasonix
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
**Bring your own provider** (Kagi, SearXNG, Serper, an internal
|
|
360
|
+
cache) — implement the two tools however you want and register them
|
|
361
|
+
manually:
|
|
362
|
+
|
|
363
|
+
```ts
|
|
364
|
+
import { ToolRegistry } from "reasonix";
|
|
365
|
+
// Register your own `web_search` / `web_fetch` on a ToolRegistry,
|
|
366
|
+
// then pass it to CacheFirstLoop (or `reasonix chat --no-config`
|
|
367
|
+
// with seedTools via library API).
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
Inside the session:
|
|
371
|
+
|
|
372
|
+
```
|
|
373
|
+
reasonix › Flutter 3.19 引入了什么新的 Navigator API?
|
|
374
|
+
assistant
|
|
375
|
+
▸ tool<web_search> → query: "Flutter 3.19 new Navigator API"
|
|
376
|
+
answer: Flutter 3.19 introduces the NavigatorObserver changes …
|
|
377
|
+
1. Flutter 3.19 Release Notes — https://docs.flutter.dev/…
|
|
378
|
+
2. What's new in Flutter 3.19 — https://medium.com/…
|
|
379
|
+
▸ tool<web_fetch> → https://docs.flutter.dev/release/release-notes/3-19-0
|
|
380
|
+
(full page text, clipped at 32k)
|
|
381
|
+
▸ 3.19 新增了 …
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
For advanced / self-hosted search (Kagi, SearXNG, internal caches)
|
|
385
|
+
implement the `WebSearchProvider` interface and call
|
|
386
|
+
`registerWebTools(registry, { provider })` yourself, or bridge an
|
|
387
|
+
existing MCP search server via `--mcp`.
|
|
388
|
+
|
|
389
|
+
---
|
|
390
|
+
|
|
325
391
|
## MCP — bring your own tools
|
|
326
392
|
|
|
327
393
|
Any [MCP](https://spec.modelcontextprotocol.io/) server works. Wizard
|