pi-research 1.0.1 → 1.0.2

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 (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +123 -39
  3. package/package.json +2 -1
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Black-Knight
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -4,17 +4,45 @@
4
4
  [![tests](https://img.shields.io/badge/tests-33%2F33-brightgreen)](https://github.com/endgegnerbert-tech/pi-research)
5
5
  [![Pi package](https://img.shields.io/badge/pi-package-blueviolet)](https://pi.ai)
6
6
 
7
- `pi-research` is a Pi extension for web research.
7
+ `pi-research` is a Pi extension for fast, local-first web research inside the agent.
8
+
9
+ It searches the live web, ranks sources, reads the most relevant pages, and synthesizes a grounded answer with citations.
10
+ It does **not** require an external research API or API key, and it is not a browser automation tool.
11
+
12
+ ## Why it exists
13
+
14
+ Agents usually need two things to answer well:
15
+
16
+ 1. a way to search the web efficiently
17
+ 2. a way to turn sources into a usable answer
18
+
19
+ `pi-research` does both inside Pi, so the agent can research topics without relying on a separate hosted research service.
20
+
21
+ ## What it does
22
+
23
+ - searches the live web
24
+ - scores and deduplicates sources
25
+ - prefers official docs, READMEs, and papers when relevant
26
+ - follows up when the first pass is not enough
27
+ - extracts code blocks for code-focused questions
28
+ - supports local files as additional sources
29
+ - returns a structured result with citations and confidence metadata
30
+
31
+ ## What it is not
32
+
33
+ - not a browser interaction tool
34
+ - not an offline knowledge base
35
+ - not a replacement for page navigation
8
36
 
9
37
  ## Install
10
38
 
11
- For Pi:
39
+ ### For Pi
12
40
 
13
41
  ```bash
14
42
  pi install npm:pi-research
15
43
  ```
16
44
 
17
- For npm-based workflows:
45
+ ### For npm-based workflows
18
46
 
19
47
  ```bash
20
48
  npm install pi-research
@@ -22,13 +50,19 @@ npm install pi-research
22
50
 
23
51
  GitHub repository: https://github.com/endgegnerbert-tech/pi-research
24
52
 
25
- You can also fork the repository and install it from a local path while developing.
53
+ ## Quick start
26
54
 
27
- ## What it is for
55
+ ```text
56
+ What are the trade-offs between B-trees and LSM-trees?
57
+ ```
28
58
 
29
- Use `pi-research` when you want the agent to search and synthesize the web.
30
- It is designed for research, not browser navigation.
31
- Use `browser_action` for clicks, screenshots, DOM inspection, or page interaction.
59
+ ```text
60
+ Show me the best way to add health checks to Docker Compose.
61
+ ```
62
+
63
+ ```text
64
+ Compare React Server Components with traditional SSR.
65
+ ```
32
66
 
33
67
  ## Modes
34
68
 
@@ -36,18 +70,68 @@ Use `browser_action` for clicks, screenshots, DOM inspection, or page interactio
36
70
  | --- | --- |
37
71
  | `fast` | quick answers with a quality floor |
38
72
  | `deep` | broader retrieval with follow-up rounds |
39
- | `code` | official docs, READMEs, repos, and code snippets |
40
- | `academic` | scholarly sources like arXiv, Semantic Scholar, and DOI papers |
73
+ | `code` | docs, READMEs, repositories, and code snippets |
74
+ | `academic` | scholarly sources and paper-heavy topics |
75
+
76
+ ## Public tool parameters
77
+
78
+ - `query` — research question to answer
79
+ - `mode` — `fast`, `deep`, `code`, or `academic`
80
+ - `force` — bypass cached sufficiency checks
81
+ - `isolate` — run without session/query cache reuse
82
+ - `options.allowedSources` — prefer only the listed source hints
83
+ - `options.requireAuthoritative` — bias toward authoritative sources
84
+ - `options.maxTurns` — limit follow-up rounds
85
+ - `options.maxSites` — limit how many sources are read
86
+ - `options.minYear` / `options.maxYear` — constrain source dates
87
+ - `options.preferRecent` — prefer newer sources
88
+ - `options.files` — include local files as sources
89
+ - `options.format` — output format: `markdown`, `json`, `table`, or `latex`
90
+ - `options.deepResearchConfig` — depth/breadth/concurrency tuning for deeper runs
91
+
92
+ ## Example calls
93
+
94
+ ### Fast mode
95
+
96
+ ```text
97
+ query: What is the difference between HTTP and HTTPS?
98
+ mode: fast
99
+ ```
100
+
101
+ ### Deep mode
41
102
 
42
- ## Key features
103
+ ```text
104
+ query: Compare PostgreSQL and MySQL for multi-tenant SaaS
105
+ mode: deep
106
+ options:
107
+ preferRecent: true
108
+ maxTurns: 2
109
+ ```
110
+
111
+ ### Code mode
112
+
113
+ ```text
114
+ query: How do I add retries to a Node.js fetch wrapper?
115
+ mode: code
116
+ ```
117
+
118
+ ### Academic mode
43
119
 
44
- - query-isolated caching and sufficiency gating
45
- - source scoring with visible `sourceType`, `authoritative`, `score`, and `freshness`
46
- - `openSubQuestions`, `missingAspects`, `conflictSummary`
47
- - inline citations in the final answer
48
- - `minYear`, `maxYear`, and `preferRecent` support
49
- - `files[]` for local source input
50
- - `codeBlocks[]` extraction for code-focused answers
120
+ ```text
121
+ query: Retrieval augmented generation evaluation methods
122
+ mode: academic
123
+ ```
124
+
125
+ ### Local files as sources
126
+
127
+ ```text
128
+ query: Summarize the key points from these notes
129
+ mode: fast
130
+ options:
131
+ files:
132
+ - ./notes/project-notes.md
133
+ - ./docs/spec.md
134
+ ```
51
135
 
52
136
  ## Output
53
137
 
@@ -62,38 +146,38 @@ The tool returns structured data including:
62
146
  - `confidenceScore`
63
147
  - `sufficient`
64
148
  - `authoritativeSourcesFound`
65
- - `followupRounds`
66
- - `followupQuery`
67
149
  - `openSubQuestions`
68
150
  - `missingAspects`
69
151
  - `conflictSummary`
70
- - `conflictingSourcePairs`
71
152
  - `unverifiedClaims`
153
+ - `sourceTypes`
154
+ - `meta`
72
155
 
73
- ## Examples
156
+ ## How it works
74
157
 
75
- ```text
76
- What are the trade-offs between B-trees and LSM-trees?
77
- ```
158
+ - **query-isolated caching**: repeated identical research can be skipped when the previous result was already sufficient
159
+ - **source scoring**: official docs, READMEs, papers, and local files are preferred over weak sources
160
+ - **follow-up planning**: unclear or conflicting results trigger another round of research
161
+ - **conflict detection**: opposing claims are surfaced explicitly
162
+ - **fact checking**: unsupported answer sentences are marked as unverified
163
+ - **local source input**: files can be added directly to the research context
78
164
 
79
- ```text
80
- Show me the best way to add health checks to Docker Compose.
81
- ```
165
+ ## Limitations
82
166
 
83
- ```text
84
- Compare React Server Components with traditional SSR.
85
- ```
86
-
87
- ## Package manifest
167
+ - it still depends on live web access for web research
168
+ - it does not browse pages like a human user
169
+ - it is not fully offline unless you only use local files
170
+ - it is not a browser interaction tool
88
171
 
89
- This repo is a Pi package. The extension entrypoint is:
172
+ ## Package info
90
173
 
91
- - `extensions/pi-research.ts`
174
+ - Package name: `pi-research`
175
+ - Entry point: `extensions/pi-research.ts`
176
+ - Tool name: `pi-research`
177
+ - License: MIT
92
178
 
93
179
  ## Release notes
94
180
 
95
- - Package name: `pi-research`
96
- - Install command for Pi: `pi install npm:pi-research`
97
- - Install command for npm: `npm install pi-research`
181
+ - Pi install: `pi install npm:pi-research`
182
+ - npm install: `npm install pi-research`
98
183
  - GitHub: `https://github.com/endgegnerbert-tech/pi-research`
99
- - Tool name: `pi-research`
package/package.json CHANGED
@@ -1,9 +1,10 @@
1
1
  {
2
2
  "name": "pi-research",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Pi extension for web research.",
7
+ "license": "MIT",
7
8
  "main": "./index.js",
8
9
  "files": [
9
10
  "extensions",