@apmantza/greedysearch-pi 1.0.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/.claude/settings.local.json +12 -0
- package/README.md +59 -0
- package/cdp.mjs +788 -0
- package/extractors/bing-copilot.mjs +169 -0
- package/extractors/consent.mjs +29 -0
- package/extractors/google-ai.mjs +152 -0
- package/extractors/perplexity.mjs +170 -0
- package/extractors/stackoverflow-ai.mjs +169 -0
- package/index.ts +145 -0
- package/launch.mjs +194 -0
- package/package.json +26 -0
- package/search.mjs +297 -0
- package/setup.mjs +138 -0
- package/skills/greedy-search/SKILL.md +38 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(gh api:*)",
|
|
5
|
+
"Bash(python -c \"import sys,json,base64; open\\(''''/tmp/pi-tools-ex.ts'''',''''w'''',encoding=''''utf-8''''\\).write\\(base64.b64decode\\(json.load\\(sys.stdin\\)[''''content'''']\\).decode\\(''''utf-8''''\\)\\)\")",
|
|
6
|
+
"Read(//tmp/**)",
|
|
7
|
+
"Bash(for f:*)",
|
|
8
|
+
"Bash(mkdir:*)",
|
|
9
|
+
"Bash(node:*)"
|
|
10
|
+
]
|
|
11
|
+
}
|
|
12
|
+
}
|
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# GreedySearch for Pi
|
|
2
|
+
|
|
3
|
+
Pi extension that adds a `greedy_search` tool — fans out queries to Perplexity, Bing Copilot, and Google AI simultaneously and returns synthesized AI answers.
|
|
4
|
+
|
|
5
|
+
Forked from [GreedySearch-claude](https://github.com/apmantza/GreedySearch-claude).
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pi install npm:@apmantza/greedysearch-pi
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Or directly from git:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
pi install git:github.com/apmantza/GreedySearch-pi
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
Once installed, Pi gains a `greedy_search` tool. The model will use it automatically for questions about current libraries, error messages, version-specific docs, etc.
|
|
22
|
+
|
|
23
|
+
You can also invoke it directly:
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
greedy_search({ query: "best way to handle auth in Next.js 15", engine: "all" })
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
**Engines:**
|
|
30
|
+
- `all` — fan-out to all three in parallel (default, highest confidence)
|
|
31
|
+
- `perplexity` — best for technical Q&A
|
|
32
|
+
- `bing` — best for recent news and Microsoft ecosystem
|
|
33
|
+
- `google` — best for broad coverage
|
|
34
|
+
|
|
35
|
+
## Requirements
|
|
36
|
+
|
|
37
|
+
- Chrome must be running (or it auto-launches a dedicated instance via `launch.mjs`)
|
|
38
|
+
- The `chrome-cdp` skill must be accessible (same CDP infrastructure as GreedySearch-claude)
|
|
39
|
+
|
|
40
|
+
## Setup (first time)
|
|
41
|
+
|
|
42
|
+
To pre-launch the dedicated GreedySearch Chrome instance:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
node ~/.pi/agent/git/GreedySearch-pi/launch.mjs
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Stop it when done:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
node ~/.pi/agent/git/GreedySearch-pi/launch.mjs --kill
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## How It Works
|
|
55
|
+
|
|
56
|
+
- `index.ts` — Pi extension, registers `greedy_search` tool
|
|
57
|
+
- `search.mjs` — CLI runner, spawns extractors in parallel
|
|
58
|
+
- `launch.mjs` — launches dedicated Chrome on port 9223
|
|
59
|
+
- `extractors/` — per-engine CDP scrapers (Perplexity, Bing Copilot, Google AI)
|