@lincoln504/pi-research 1.7.8 → 1.7.10

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.
Files changed (37) hide show
  1. package/README.md +5 -1
  2. package/agent-skill/pi-research/README.md +3 -3
  3. package/agent-skill/pi-research/SKILL.md +1 -1
  4. package/dist/cli-bin.mjs +3 -0
  5. package/dist/cli.mjs +673 -383
  6. package/dist/pdf-extract-worker.mjs +1 -1
  7. package/dist/thread-worker.mjs +6 -6
  8. package/docs/AGENT-SKILL.md +6 -4
  9. package/docs/ARCHITECTURE.md +64 -50
  10. package/docs/CHANGELOG.md +41 -0
  11. package/docs/CONFIGURATION.md +2 -2
  12. package/docs/PI-EXTENSION.md +4 -0
  13. package/docs/SDK.md +10 -7
  14. package/docs/THIRD-PARTY-NOTICES.md +11 -7
  15. package/package.json +10 -8
  16. package/scripts/camoufox-layout.cjs +455 -0
  17. package/scripts/cleanup.cjs +72 -29
  18. package/scripts/setup.cjs +73 -111
  19. package/src/cli-bin.mjs +3 -0
  20. package/src/cli.ts +12 -13
  21. package/src/core/pi-version.ts +9 -1
  22. package/src/healthcheck/index.ts +1 -1
  23. package/src/infrastructure/browser/browser-cleanup.ts +1 -1
  24. package/src/infrastructure/browser/browser-error-utils.ts +5 -4
  25. package/src/infrastructure/browser/camoufox-layout.ts +450 -0
  26. package/src/infrastructure/browser/config.ts +46 -103
  27. package/src/infrastructure/browser/ensure-browser.ts +90 -52
  28. package/src/infrastructure/browser/thread-worker-browser.ts +38 -42
  29. package/src/infrastructure/browser/thread-worker.mjs +6 -6
  30. package/src/infrastructure/knowledge-store-service.ts +6 -6
  31. package/src/orchestration/researcher-executor.ts +47 -1
  32. package/src/tui/research-health.ts +1 -1
  33. package/src/utils/log-utils.ts +1 -1
  34. package/src/web-research/browser-search.ts +8 -10
  35. package/src/web-research/pdf-extract-worker.mjs +1 -1
  36. package/src/web-research/scraper-utils.ts +11 -2
  37. package/src/web-research/web-scraper.ts +1 -1
package/README.md CHANGED
@@ -49,7 +49,7 @@ npm install -g @lincoln504/pi-research
49
49
  pi-research skill install
50
50
  ```
51
51
 
52
- No extra setup is needed. The package ships ready-made bindings for every platform and declares no build step, so there is nothing to approve or compile. The stealth browser (1GB+ installed) is fetched by the `postinstall` script when npm runs install scripts, which it does by default up to npm 11.18 — that is the bundled npm on the Node 22.22.2 floor this package requires, so expect the fetch during install. Newer npm (11.19+) skips install scripts by default, and the browser is then fetched lazily on the first scrape instead. Either way the first scrape takes a few minutes until it is in place. Set `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1` to defer the fetch deliberately. Only Windows with npm older than 11.19 can fail when the install tries to compile from source. Upgrading npm fixes it.
52
+ No extra setup is needed. The package ships ready-made bindings for every platform and declares no build step, so there is nothing to approve or compile. The stealth browser (1GB+ installed) is fetched by the `postinstall` script whenever npm runs dependency install scripts — which is npm 10 through 11.19 (11.16–11.19 print a warning) — and that includes the npm bundled with the Node 22.22.2 floor this package requires (10.9.7) and the npm bundled with Node 24/25 (11.19.0), so expect the fetch during install. npm 12, the current npm, blocks dependency install scripts by default, and the browser is then fetched lazily on the first scrape instead. Either way the first scrape takes a few minutes until it is in place. Set `PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1` to defer the fetch deliberately.
53
53
 
54
54
  The `@earendil-works/pi-*` host packages are **peer dependencies**. pi supplies its own copies when it loads this as an extension, and npm ≥7 installs them automatically for a standalone (global or project) install. An install that skips peers does not get them: `npm install --legacy-peer-deps`, yarn classic, and `pi install` itself (it passes that flag on purpose) are all in that group. The standalone engine and the agent-skill launcher then stop with a message naming the missing package; add it with:
55
55
 
@@ -61,6 +61,10 @@ Standalone use needs that package on disk because the CLI and SDK import it dire
61
61
 
62
62
  In pi, the extension works out of the box on the session's model and pi's configuration. Standalone use ([agent skill](docs/AGENT-SKILL.md) or [SDK](docs/SDK.md)) needs a model configured. See [Configuration](docs/CONFIGURATION.md).
63
63
 
64
+ ### Update
65
+
66
+ `pi update --extensions` moves every installed extension to its newest published version; `pi update npm:@lincoln504/pi-research` targets only this one. A versioned source (`npm:@lincoln504/pi-research@1.7.9`) is pinned and never updates — remove and reinstall it to move versions.
67
+
64
68
  ### Uninstall
65
69
 
66
70
  `pi remove npm:@lincoln504/pi-research` removes the extension. `npm uninstall -g @lincoln504/pi-research` removes the standalone engine. npm 7+ no longer runs `preuninstall`, so nothing else is removed on its own: skill links into other agents (Claude Code, Codex, …), the state directory (`~/.pi/research/state`), and the cache (`~/.cache/pi-research`, including any downloaded embedding models) stay in place. Remove the skill links first with `pi-research skill uninstall` (or `/research-config` → Remove from External Agents), then remove the rest with `pi-research cleanup`: The shared stealth-browser cache (`~/.cache/camoufox`) is preserved unless `PI_RESEARCH_PURGE_BROWSERS=1`. See [AGENT-SKILL.md](docs/AGENT-SKILL.md#installation-flow) for the full picture.
@@ -57,9 +57,9 @@ npm install -g @earendil-works/pi-coding-agent
57
57
  ```
58
58
 
59
59
  On npm ≥11.19 (and npm 12) dependency install scripts are skipped by default — and
60
- none are needed: better-sqlite3 13 ships prebuilt bindings in its own tarball, and
61
- the stealth browser self-provisions on its first use (the first scrape takes a few
62
- minutes). No approval is required.
60
+ none are needed: the only native piece on the launch path is `impit`, which ships
61
+ prebuilt binaries, and the stealth browser self-provisions on its first use (the
62
+ first scrape takes a few minutes). No approval is required.
63
63
 
64
64
  ### Install the skill
65
65
 
@@ -2,7 +2,7 @@
2
2
  name: pi-research
3
3
  description: "Multi-agent web research for any coding agent. Use for anything requiring current information from the internet — news, trends, product/service/company facts, statistics, people, places, events, APIs, library behavior, or 'what is X / how does X work' questions. Also use to search a local knowledge store of previously researched findings before doing live research. Powered by the pi-research engine (search, stealth scraping, security databases, Stack Exchange). Not for reading local files, running project commands, or analyzing this repository's own source."
4
4
  license: MIT
5
- metadata: { "author": "Lincoln Deen", "version": "1.7.8", "package": "@lincoln504/pi-research", "engine": "pi-research-sdk", "openclaw": { "requires": { "bins": ["node"] } } }
5
+ metadata: { "author": "Lincoln Deen", "version": "1.7.10", "package": "@lincoln504/pi-research", "engine": "pi-research-sdk", "openclaw": { "requires": { "bins": ["node"] } } }
6
6
  allowed-tools: Bash(node:*)
7
7
  ---
8
8
 
package/dist/cli-bin.mjs CHANGED
@@ -43,6 +43,9 @@ const REQUIRED_PEERS = [
43
43
  // dist/cli.mjs imports it directly (TUI width helpers), so an install that skips
44
44
  // peers can lack it even though pi-coding-agent normally brings it in.
45
45
  '@earendil-works/pi-tui',
46
+ // Host-provided too (peerDependency since 1.7.9): dist/cli.mjs imports it for
47
+ // every tool schema, and pi supplies its own copy when it loads the extension.
48
+ 'typebox',
46
49
  ];
47
50
 
48
51
  /**