@lincoln504/pi-research 1.6.4 → 1.6.6

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 (63) hide show
  1. package/README.md +12 -8
  2. package/agent-skill/pi-research/README.md +4 -3
  3. package/agent-skill/pi-research/SKILL.md +1 -1
  4. package/dist/cli.mjs +587 -149
  5. package/dist/pdf-extract-worker.mjs +1289 -0
  6. package/dist/prompts/research-tool-usage.md +2 -1
  7. package/dist/prompts/researcher.md +1 -1
  8. package/dist/prompts/system-coordinator.md +2 -2
  9. package/dist/prompts/system-lead-router.md +1 -1
  10. package/docs/AGENT-SKILL.md +4 -3
  11. package/docs/ARCHITECTURE.md +24 -22
  12. package/docs/CHANGELOG.md +73 -1
  13. package/docs/CONFIGURATION.md +3 -2
  14. package/docs/SDK.md +7 -12
  15. package/package.json +7 -4
  16. package/scripts/build.cjs +35 -0
  17. package/scripts/setup.cjs +12 -10
  18. package/src/cleanup/research-cleanup.ts +11 -5
  19. package/src/cli.ts +7 -5
  20. package/src/config.ts +9 -3
  21. package/src/core/interfaces/knowledge-interfaces.ts +8 -0
  22. package/src/core/interfaces/orchestration-interfaces.ts +1 -1
  23. package/src/core/interfaces/research-plan-types.ts +6 -0
  24. package/src/core/llm/agentic-repair.ts +40 -3
  25. package/src/core/llm/llm-utils.ts +93 -5
  26. package/src/core/llm/model-registry-factory.ts +2 -15
  27. package/src/core/pi-ai-skew.ts +351 -0
  28. package/src/core/pi-version.ts +1 -1
  29. package/src/core/planning-service.ts +110 -15
  30. package/src/core/planning-utils.ts +3 -0
  31. package/src/core/service-registry.ts +8 -6
  32. package/src/index.ts +14 -0
  33. package/src/infrastructure/browser/config.ts +6 -7
  34. package/src/infrastructure/browser/ensure-browser.ts +14 -7
  35. package/src/infrastructure/browser/thread-worker-browser.ts +18 -19
  36. package/src/knowledge/chunker.ts +22 -4
  37. package/src/knowledge/embedder-init.ts +41 -1
  38. package/src/knowledge/store.ts +68 -1
  39. package/src/observers/research-observer-impl.ts +4 -1
  40. package/src/orchestration/deep-research-orchestrator.ts +3 -3
  41. package/src/orchestration/headless-observer.ts +33 -0
  42. package/src/orchestration/quick-research-orchestrator.ts +17 -3
  43. package/src/orchestration/research-orchestration-service.ts +27 -4
  44. package/src/orchestration/session-state.ts +36 -7
  45. package/src/prompts/research-tool-usage.md +2 -1
  46. package/src/prompts/researcher.md +1 -1
  47. package/src/prompts/system-coordinator.md +2 -2
  48. package/src/prompts/system-lead-router.md +1 -1
  49. package/src/sdk.ts +12 -4
  50. package/src/tools/research-knowledge-search.ts +23 -7
  51. package/src/tools/research-tool-definition.ts +1 -1
  52. package/src/tools/scrape.ts +12 -9
  53. package/src/tools/search.ts +12 -6
  54. package/src/tools/security.ts +6 -1
  55. package/src/tools/stackexchange.ts +6 -1
  56. package/src/utils/cancellation.ts +34 -1
  57. package/src/utils/llm-usage.ts +8 -0
  58. package/src/utils/log-utils.ts +1 -1
  59. package/src/web-research/browser-search.ts +6 -5
  60. package/src/web-research/pdf-extract-worker.mjs +1289 -0
  61. package/src/web-research/pdf-extract-worker.ts +42 -0
  62. package/src/web-research/pdf-extraction.ts +392 -0
  63. package/src/web-research/web-scraper.ts +3 -111
package/README.md CHANGED
@@ -44,15 +44,15 @@ npm install -g @lincoln504/pi-research
44
44
  pi-research skill install
45
45
  ```
46
46
 
47
- On npm 12 or newer, allow the one install script search depends on before installing:
47
+ On npm ≥11.19 (and npm 12), dependency install scripts are skipped by default. This
48
+ package needs none of them: better-sqlite3 13 ships prebuilt bindings for every
49
+ supported platform inside its own tarball, and the stealth browser (~500MB)
50
+ self-provisions on its first use instead of at install time — so the first scrape
51
+ takes a few minutes. Nothing needs approving. (On older npm, which still runs
52
+ scripts, a Windows machine without Visual Studio Build Tools can fail while npm
53
+ needlessly recompiles better-sqlite3; upgrading npm fixes that too.)
48
54
 
49
- ```bash
50
- npm config set allow-scripts=better-sqlite3 --location=user
51
- ```
52
-
53
- npm 12 stopped running dependency install scripts by default, and the stealth browser's SQLite module is built by one. Skipped, the install still succeeds with a warning — but every search fails with a missing-module error. The config covers both installs; for the standalone install, `--allow-scripts=better-sqlite3` on the `npm install -g` line also works. The bare flag allows nothing, and `pi install` accepts only the config form.
54
-
55
- In pi it 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). The first install downloads the stealth browser engine, which takes a few minutes.
55
+ In pi it 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).
56
56
 
57
57
  ### How it works
58
58
 
@@ -95,3 +95,7 @@ MIT. Bundled third-party licenses are listed in [docs/THIRD-PARTY-NOTICES.md](do
95
95
  ### Package identity
96
96
 
97
97
  This project is always `@lincoln504/pi-research` on npm. The `pi-research` (unscoped) package is unrelated and deprecated.
98
+
99
+ ### Versioning
100
+
101
+ pi-research typically follows the latest pi version and is not actively backwards compatible.
@@ -47,9 +47,10 @@ npm install -g @lincoln504/pi-research
47
47
  node "<skill_dir>/scripts/run.mjs" status # verify detection
48
48
  ```
49
49
 
50
- On npm 12 or newer, first run `npm config set allow-scripts=better-sqlite3 --location=user`:
51
- npm 12 blocks the install script that builds the stealth browser's SQLite module, and
52
- without it every search fails with a missing-module error.
50
+ On npm ≥11.19 (and npm 12) dependency install scripts are skipped by default — and
51
+ none are needed: better-sqlite3 13 ships prebuilt bindings in its own tarball, and
52
+ the stealth browser self-provisions on its first use (the first scrape takes a few
53
+ minutes). No approval is required.
53
54
 
54
55
  ### Install the skill
55
56
 
@@ -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.6.4", "package": "@lincoln504/pi-research", "engine": "pi-research-sdk", "openclaw": { "requires": { "bins": ["node"] } } }
5
+ metadata: { "author": "Lincoln Deen", "version": "1.6.6", "package": "@lincoln504/pi-research", "engine": "pi-research-sdk", "openclaw": { "requires": { "bins": ["node"] } } }
6
6
  allowed-tools: Bash(node:*)
7
7
  ---
8
8