@apmantza/greedysearch-pi 1.4.1 → 1.5.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/.pi-lens/cache/jscpd.json +112 -0
- package/.pi-lens/cache/jscpd.meta.json +3 -0
- package/.pi-lens/cache/knip.json +111 -0
- package/.pi-lens/cache/knip.meta.json +4 -0
- package/.pi-lens/fix-plan.md +13 -0
- package/.pi-lens/fix-session.json +11 -0
- package/.pi-lens/metrics-history.json +182 -0
- package/.pi-lens/reports/fix-plan.tsv +38 -0
- package/.pi-lens/turn-state.json +6 -0
- package/CHANGELOG.md +30 -0
- package/README.md +52 -27
- package/cdp.mjs +1004 -799
- package/coding-task.mjs +392 -369
- package/extractors/bing-copilot.mjs +167 -204
- package/extractors/common.mjs +237 -0
- package/extractors/consent.mjs +273 -248
- package/extractors/gemini.mjs +142 -221
- package/extractors/google-ai.mjs +156 -165
- package/extractors/perplexity.mjs +126 -184
- package/extractors/selectors.mjs +52 -52
- package/index.ts +760 -623
- package/launch.mjs +288 -166
- package/package.json +26 -26
- package/search.mjs +1219 -997
- package/skills/greedy-search/SKILL.md +74 -145
- package/test.mjs +308 -0
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
{
|
|
2
|
+
"success": true,
|
|
3
|
+
"clones": [
|
|
4
|
+
{
|
|
5
|
+
"fileA": "extractors\\gemini.mjs",
|
|
6
|
+
"startA": 63,
|
|
7
|
+
"fileB": "extractors\\perplexity.mjs",
|
|
8
|
+
"startB": 34,
|
|
9
|
+
"lines": 20,
|
|
10
|
+
"tokens": 0
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"fileA": "extractors\\gemini.mjs",
|
|
14
|
+
"startA": 82,
|
|
15
|
+
"fileB": "extractors\\google-ai.mjs",
|
|
16
|
+
"startB": 96,
|
|
17
|
+
"lines": 13,
|
|
18
|
+
"tokens": 0
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"fileA": "extractors\\bing-copilot.mjs",
|
|
22
|
+
"startA": 44,
|
|
23
|
+
"fileB": "extractors\\gemini.mjs",
|
|
24
|
+
"startB": 60,
|
|
25
|
+
"lines": 24,
|
|
26
|
+
"tokens": 0
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"fileA": "extractors\\bing-copilot.mjs",
|
|
30
|
+
"startA": 67,
|
|
31
|
+
"fileB": "extractors\\google-ai.mjs",
|
|
32
|
+
"startB": 96,
|
|
33
|
+
"lines": 13,
|
|
34
|
+
"tokens": 0
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"fileA": "extractors\\bing-copilot.mjs",
|
|
38
|
+
"startA": 111,
|
|
39
|
+
"fileB": "extractors\\perplexity.mjs",
|
|
40
|
+
"startB": 74,
|
|
41
|
+
"lines": 8,
|
|
42
|
+
"tokens": 0
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"fileA": "extractors\\bing-copilot.mjs",
|
|
46
|
+
"startA": 134,
|
|
47
|
+
"fileB": "extractors\\perplexity.mjs",
|
|
48
|
+
"startB": 85,
|
|
49
|
+
"lines": 7,
|
|
50
|
+
"tokens": 0
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"fileA": "extractors\\bing-copilot.mjs",
|
|
54
|
+
"startA": 151,
|
|
55
|
+
"fileB": "extractors\\perplexity.mjs",
|
|
56
|
+
"startB": 110,
|
|
57
|
+
"lines": 17,
|
|
58
|
+
"tokens": 0
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
"fileA": "test.mjs",
|
|
62
|
+
"startA": 35,
|
|
63
|
+
"fileB": "extractors\\common.mjs",
|
|
64
|
+
"startB": 25,
|
|
65
|
+
"lines": 6,
|
|
66
|
+
"tokens": 0
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"fileA": "index.ts",
|
|
70
|
+
"startA": 410,
|
|
71
|
+
"fileB": "index.ts",
|
|
72
|
+
"startB": 396,
|
|
73
|
+
"lines": 11,
|
|
74
|
+
"tokens": 0
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"fileA": "index.ts",
|
|
78
|
+
"startA": 573,
|
|
79
|
+
"fileB": "index.ts",
|
|
80
|
+
"startB": 504,
|
|
81
|
+
"lines": 7,
|
|
82
|
+
"tokens": 0
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"fileA": "index.ts",
|
|
86
|
+
"startA": 601,
|
|
87
|
+
"fileB": "index.ts",
|
|
88
|
+
"startB": 531,
|
|
89
|
+
"lines": 9,
|
|
90
|
+
"tokens": 0
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"fileA": "index.ts",
|
|
94
|
+
"startA": 699,
|
|
95
|
+
"fileB": "index.ts",
|
|
96
|
+
"startB": 36,
|
|
97
|
+
"lines": 15,
|
|
98
|
+
"tokens": 0
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"fileA": "coding-task.mjs",
|
|
102
|
+
"startA": 161,
|
|
103
|
+
"fileB": "coding-task.mjs",
|
|
104
|
+
"startB": 103,
|
|
105
|
+
"lines": 11,
|
|
106
|
+
"tokens": 0
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"duplicatedLines": 148,
|
|
110
|
+
"totalLines": 3187,
|
|
111
|
+
"percentage": 4.64
|
|
112
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"success": true,
|
|
3
|
+
"issues": [
|
|
4
|
+
{
|
|
5
|
+
"type": "file",
|
|
6
|
+
"name": "cdp.mjs",
|
|
7
|
+
"file": "cdp.mjs"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"type": "file",
|
|
11
|
+
"name": "coding-task.mjs",
|
|
12
|
+
"file": "coding-task.mjs"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"type": "file",
|
|
16
|
+
"name": "launch.mjs",
|
|
17
|
+
"file": "launch.mjs"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"type": "file",
|
|
21
|
+
"name": "search.mjs",
|
|
22
|
+
"file": "search.mjs"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"type": "file",
|
|
26
|
+
"name": "extractors/bing-copilot.mjs",
|
|
27
|
+
"file": "extractors/bing-copilot.mjs"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"type": "file",
|
|
31
|
+
"name": "extractors/consent.mjs",
|
|
32
|
+
"file": "extractors/consent.mjs"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"type": "file",
|
|
36
|
+
"name": "extractors/gemini.mjs",
|
|
37
|
+
"file": "extractors/gemini.mjs"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"type": "file",
|
|
41
|
+
"name": "extractors/google-ai.mjs",
|
|
42
|
+
"file": "extractors/google-ai.mjs"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "file",
|
|
46
|
+
"name": "extractors/perplexity.mjs",
|
|
47
|
+
"file": "extractors/perplexity.mjs"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"type": "file",
|
|
51
|
+
"name": "extractors/selectors.mjs",
|
|
52
|
+
"file": "extractors/selectors.mjs"
|
|
53
|
+
}
|
|
54
|
+
],
|
|
55
|
+
"unusedExports": [],
|
|
56
|
+
"unusedFiles": [
|
|
57
|
+
{
|
|
58
|
+
"type": "file",
|
|
59
|
+
"name": "cdp.mjs",
|
|
60
|
+
"file": "cdp.mjs"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"type": "file",
|
|
64
|
+
"name": "coding-task.mjs",
|
|
65
|
+
"file": "coding-task.mjs"
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
"type": "file",
|
|
69
|
+
"name": "launch.mjs",
|
|
70
|
+
"file": "launch.mjs"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"type": "file",
|
|
74
|
+
"name": "search.mjs",
|
|
75
|
+
"file": "search.mjs"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "file",
|
|
79
|
+
"name": "extractors/bing-copilot.mjs",
|
|
80
|
+
"file": "extractors/bing-copilot.mjs"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"type": "file",
|
|
84
|
+
"name": "extractors/consent.mjs",
|
|
85
|
+
"file": "extractors/consent.mjs"
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"type": "file",
|
|
89
|
+
"name": "extractors/gemini.mjs",
|
|
90
|
+
"file": "extractors/gemini.mjs"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"type": "file",
|
|
94
|
+
"name": "extractors/google-ai.mjs",
|
|
95
|
+
"file": "extractors/google-ai.mjs"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"type": "file",
|
|
99
|
+
"name": "extractors/perplexity.mjs",
|
|
100
|
+
"file": "extractors/perplexity.mjs"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"type": "file",
|
|
104
|
+
"name": "extractors/selectors.mjs",
|
|
105
|
+
"file": "extractors/selectors.mjs"
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"unusedDeps": [],
|
|
109
|
+
"unlistedDeps": [],
|
|
110
|
+
"summary": "Found 10 issues"
|
|
111
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Fix Plan — Iteration 1
|
|
2
|
+
|
|
3
|
+
📋 FIX PLAN — Iteration 1/3 — 37 issues
|
|
4
|
+
📄 Full plan: .pi-lens/reports/fix-plan.tsv
|
|
5
|
+
|
|
6
|
+
🔁 Duplicates: 22 block(s) — extract to shared utils
|
|
7
|
+
🗑️ Dead code: 10 item(s) — remove unused exports
|
|
8
|
+
🟠 Biome: 5 item(s) — auto-fixable
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
📖 **Read plan**: `read .pi-lens/reports/fix-plan.tsv` for full details
|
|
12
|
+
🚀 **Fix & loop**: Fix items, then run `/lens-booboo-fix --loop`
|
|
13
|
+
🚫 **False positive**: `/lens-booboo-fix --false-positive "type:file:line"`
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"files": {
|
|
4
|
+
"extractors\\perplexity.mjs": {
|
|
5
|
+
"latest": {
|
|
6
|
+
"commit": "unknown",
|
|
7
|
+
"timestamp": "2026-03-29T11:49:19.267Z",
|
|
8
|
+
"mi": 30.3,
|
|
9
|
+
"cognitive": 50,
|
|
10
|
+
"nesting": 5,
|
|
11
|
+
"lines": 186
|
|
12
|
+
},
|
|
13
|
+
"history": [
|
|
14
|
+
{
|
|
15
|
+
"commit": "unknown",
|
|
16
|
+
"timestamp": "2026-03-29T11:49:19.267Z",
|
|
17
|
+
"mi": 30.3,
|
|
18
|
+
"cognitive": 50,
|
|
19
|
+
"nesting": 5,
|
|
20
|
+
"lines": 186
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"trend": "stable"
|
|
24
|
+
},
|
|
25
|
+
"extractors\\gemini.mjs": {
|
|
26
|
+
"latest": {
|
|
27
|
+
"commit": "unknown",
|
|
28
|
+
"timestamp": "2026-03-29T11:49:41.697Z",
|
|
29
|
+
"mi": 31.2,
|
|
30
|
+
"cognitive": 40,
|
|
31
|
+
"nesting": 4,
|
|
32
|
+
"lines": 185
|
|
33
|
+
},
|
|
34
|
+
"history": [
|
|
35
|
+
{
|
|
36
|
+
"commit": "unknown",
|
|
37
|
+
"timestamp": "2026-03-29T11:49:41.697Z",
|
|
38
|
+
"mi": 31.2,
|
|
39
|
+
"cognitive": 40,
|
|
40
|
+
"nesting": 4,
|
|
41
|
+
"lines": 185
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"trend": "stable"
|
|
45
|
+
},
|
|
46
|
+
"extractors\\bing-copilot.mjs": {
|
|
47
|
+
"latest": {
|
|
48
|
+
"commit": "unknown",
|
|
49
|
+
"timestamp": "2026-03-29T11:50:05.399Z",
|
|
50
|
+
"mi": 29.9,
|
|
51
|
+
"cognitive": 53,
|
|
52
|
+
"nesting": 5,
|
|
53
|
+
"lines": 203
|
|
54
|
+
},
|
|
55
|
+
"history": [
|
|
56
|
+
{
|
|
57
|
+
"commit": "unknown",
|
|
58
|
+
"timestamp": "2026-03-29T11:50:05.399Z",
|
|
59
|
+
"mi": 29.9,
|
|
60
|
+
"cognitive": 53,
|
|
61
|
+
"nesting": 5,
|
|
62
|
+
"lines": 203
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"trend": "stable"
|
|
66
|
+
},
|
|
67
|
+
"extractors\\google-ai.mjs": {
|
|
68
|
+
"latest": {
|
|
69
|
+
"commit": "unknown",
|
|
70
|
+
"timestamp": "2026-03-29T11:50:24.174Z",
|
|
71
|
+
"mi": 31.7,
|
|
72
|
+
"cognitive": 49,
|
|
73
|
+
"nesting": 4,
|
|
74
|
+
"lines": 164
|
|
75
|
+
},
|
|
76
|
+
"history": [
|
|
77
|
+
{
|
|
78
|
+
"commit": "unknown",
|
|
79
|
+
"timestamp": "2026-03-29T11:50:24.174Z",
|
|
80
|
+
"mi": 31.7,
|
|
81
|
+
"cognitive": 49,
|
|
82
|
+
"nesting": 4,
|
|
83
|
+
"lines": 164
|
|
84
|
+
}
|
|
85
|
+
],
|
|
86
|
+
"trend": "stable"
|
|
87
|
+
},
|
|
88
|
+
"coding-task.mjs": {
|
|
89
|
+
"latest": {
|
|
90
|
+
"commit": "unknown",
|
|
91
|
+
"timestamp": "2026-03-29T12:01:31.394Z",
|
|
92
|
+
"mi": 22.2,
|
|
93
|
+
"cognitive": 133,
|
|
94
|
+
"nesting": 4,
|
|
95
|
+
"lines": 355
|
|
96
|
+
},
|
|
97
|
+
"history": [
|
|
98
|
+
{
|
|
99
|
+
"commit": "unknown",
|
|
100
|
+
"timestamp": "2026-03-29T11:51:12.673Z",
|
|
101
|
+
"mi": 20.1,
|
|
102
|
+
"cognitive": 138,
|
|
103
|
+
"nesting": 4,
|
|
104
|
+
"lines": 374
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"commit": "unknown",
|
|
108
|
+
"timestamp": "2026-03-29T12:01:31.394Z",
|
|
109
|
+
"mi": 22.2,
|
|
110
|
+
"cognitive": 133,
|
|
111
|
+
"nesting": 4,
|
|
112
|
+
"lines": 355
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"trend": "improving"
|
|
116
|
+
},
|
|
117
|
+
"extractors\\common.mjs": {
|
|
118
|
+
"latest": {
|
|
119
|
+
"commit": "unknown",
|
|
120
|
+
"timestamp": "2026-03-29T11:53:06.232Z",
|
|
121
|
+
"mi": 36.1,
|
|
122
|
+
"cognitive": 35,
|
|
123
|
+
"nesting": 5,
|
|
124
|
+
"lines": 191
|
|
125
|
+
},
|
|
126
|
+
"history": [
|
|
127
|
+
{
|
|
128
|
+
"commit": "unknown",
|
|
129
|
+
"timestamp": "2026-03-29T11:53:06.232Z",
|
|
130
|
+
"mi": 36.1,
|
|
131
|
+
"cognitive": 35,
|
|
132
|
+
"nesting": 5,
|
|
133
|
+
"lines": 191
|
|
134
|
+
}
|
|
135
|
+
],
|
|
136
|
+
"trend": "stable"
|
|
137
|
+
},
|
|
138
|
+
"search.mjs": {
|
|
139
|
+
"latest": {
|
|
140
|
+
"commit": "unknown",
|
|
141
|
+
"timestamp": "2026-03-29T12:16:28.243Z",
|
|
142
|
+
"mi": 5.1,
|
|
143
|
+
"cognitive": 463,
|
|
144
|
+
"nesting": 8,
|
|
145
|
+
"lines": 1066
|
|
146
|
+
},
|
|
147
|
+
"history": [
|
|
148
|
+
{
|
|
149
|
+
"commit": "unknown",
|
|
150
|
+
"timestamp": "2026-03-29T12:16:28.243Z",
|
|
151
|
+
"mi": 5.1,
|
|
152
|
+
"cognitive": 463,
|
|
153
|
+
"nesting": 8,
|
|
154
|
+
"lines": 1066
|
|
155
|
+
}
|
|
156
|
+
],
|
|
157
|
+
"trend": "stable"
|
|
158
|
+
},
|
|
159
|
+
"test.mjs": {
|
|
160
|
+
"latest": {
|
|
161
|
+
"commit": "unknown",
|
|
162
|
+
"timestamp": "2026-03-29T12:20:38.595Z",
|
|
163
|
+
"mi": 23.4,
|
|
164
|
+
"cognitive": 113,
|
|
165
|
+
"nesting": 4,
|
|
166
|
+
"lines": 259
|
|
167
|
+
},
|
|
168
|
+
"history": [
|
|
169
|
+
{
|
|
170
|
+
"commit": "unknown",
|
|
171
|
+
"timestamp": "2026-03-29T12:20:38.595Z",
|
|
172
|
+
"mi": 23.4,
|
|
173
|
+
"cognitive": 113,
|
|
174
|
+
"nesting": 4,
|
|
175
|
+
"lines": 259
|
|
176
|
+
}
|
|
177
|
+
],
|
|
178
|
+
"trend": "stable"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"capturedAt": "2026-03-29T12:20:45.753Z"
|
|
182
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
type file rule message
|
|
2
|
+
dup extractors\google-ai.mjs:16 duplicate-code 8 lines duplicated with extractors\perplexity.mjs:16
|
|
3
|
+
dup extractors\google-ai.mjs:28 duplicate-code 42 lines duplicated with extractors\perplexity.mjs:26
|
|
4
|
+
dup extractors\google-ai.mjs:135 duplicate-code 18 lines duplicated with extractors\perplexity.mjs:154
|
|
5
|
+
dup extractors\google-ai.mjs:186 duplicate-code 8 lines duplicated with extractors\perplexity.mjs:211
|
|
6
|
+
dup extractors\google-ai.mjs:193 duplicate-code 12 lines duplicated with extractors\perplexity.mjs:218
|
|
7
|
+
dup extractors\gemini.mjs:8 duplicate-code 17 lines duplicated with extractors\google-ai.mjs:8
|
|
8
|
+
dup extractors\gemini.mjs:26 duplicate-code 10 lines duplicated with extractors\perplexity.mjs:26
|
|
9
|
+
dup extractors\gemini.mjs:36 duplicate-code 36 lines duplicated with extractors\perplexity.mjs:36
|
|
10
|
+
dup extractors\gemini.mjs:140 duplicate-code 21 lines duplicated with extractors\perplexity.mjs:134
|
|
11
|
+
dup extractors\gemini.mjs:160 duplicate-code 21 lines duplicated with extractors\perplexity.mjs:154
|
|
12
|
+
dup extractors\gemini.mjs:212 duplicate-code 7 lines duplicated with extractors\perplexity.mjs:212
|
|
13
|
+
dup extractors\gemini.mjs:218 duplicate-code 12 lines duplicated with extractors\perplexity.mjs:218
|
|
14
|
+
dup extractors\bing-copilot.mjs:8 duplicate-code 16 lines duplicated with extractors\google-ai.mjs:8
|
|
15
|
+
dup extractors\bing-copilot.mjs:26 duplicate-code 46 lines duplicated with extractors\perplexity.mjs:26
|
|
16
|
+
dup extractors\bing-copilot.mjs:100 duplicate-code 12 lines duplicated with extractors\gemini.mjs:118
|
|
17
|
+
dup extractors\bing-copilot.mjs:111 duplicate-code 13 lines duplicated with extractors\perplexity.mjs:122
|
|
18
|
+
dup extractors\bing-copilot.mjs:123 duplicate-code 21 lines duplicated with extractors\perplexity.mjs:134
|
|
19
|
+
dup extractors\bing-copilot.mjs:143 duplicate-code 21 lines duplicated with extractors\perplexity.mjs:154
|
|
20
|
+
dup extractors\bing-copilot.mjs:195 duplicate-code 8 lines duplicated with extractors\perplexity.mjs:182
|
|
21
|
+
dup extractors\bing-copilot.mjs:218 duplicate-code 7 lines duplicated with extractors\perplexity.mjs:193
|
|
22
|
+
dup extractors\bing-copilot.mjs:235 duplicate-code 18 lines duplicated with extractors\perplexity.mjs:212
|
|
23
|
+
dup coding-task.mjs:35 duplicate-code 26 lines duplicated with extractors\perplexity.mjs:26
|
|
24
|
+
dead cdp.mjs file cdp.mjs is unused
|
|
25
|
+
dead coding-task.mjs file coding-task.mjs is unused
|
|
26
|
+
dead launch.mjs file launch.mjs is unused
|
|
27
|
+
dead search.mjs file search.mjs is unused
|
|
28
|
+
dead extractors/bing-copilot.mjs file extractors/bing-copilot.mjs is unused
|
|
29
|
+
dead extractors/consent.mjs file extractors/consent.mjs is unused
|
|
30
|
+
dead extractors/gemini.mjs file extractors/gemini.mjs is unused
|
|
31
|
+
dead extractors/google-ai.mjs file extractors/google-ai.mjs is unused
|
|
32
|
+
dead extractors/perplexity.mjs file extractors/perplexity.mjs is unused
|
|
33
|
+
dead extractors/selectors.mjs file extractors/selectors.mjs is unused
|
|
34
|
+
biome :1 lint/suspicious/noExplicitAny Unexpected any. Specify a different type.
|
|
35
|
+
biome :1 lint/suspicious/noExplicitAny Unexpected any. Specify a different type.
|
|
36
|
+
biome :1 lint/suspicious/noExplicitAny Unexpected any. Specify a different type.
|
|
37
|
+
biome :1 lint/suspicious/useIterableCallbackReturn This callback passed to forEach() iterable method should not return a value.
|
|
38
|
+
biome :1 lint/suspicious/noAssignInExpressions The assignment should not be in an expression.
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v1.5.0 (2026-03-29)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
- **Code extraction fixed** — `coding_task` now uses clipboard interception to preserve markdown code blocks (was losing them via DOM scraping)
|
|
7
|
+
- **Chrome targeting hardened** — all tools now consistently target the dedicated GreedySearch Chrome via `CDP_PROFILE_DIR`, preventing fallback to user's main Chrome session
|
|
8
|
+
- **Shared utilities** — extracted ~220 lines of duplicate code from extractors into `common.mjs` (cdp wrapper, tab management, clipboard interception)
|
|
9
|
+
- **Documentation leaner** — skill documentation reduced 61% (180 → 70 lines) while preserving all decision-making info
|
|
10
|
+
|
|
11
|
+
### Notable
|
|
12
|
+
- **NO API KEYS** — updated messaging to emphasize this works via browser automation, no API keys needed
|
|
13
|
+
|
|
14
|
+
## v1.4.2 (2026-03-25)
|
|
15
|
+
|
|
16
|
+
- **Fresh isolated tabs** — each search now always creates a new `about:blank` tab via `Target.createTarget` and refreshes the CDP page cache immediately after, preventing SPA navigation failures and stale DOM state from prior queries
|
|
17
|
+
- **Regex-based citation extraction** — all extractors (Perplexity, Bing, Gemini) now parse sources from clipboard Markdown links (`[title](url)`) instead of DOM selectors that break on UI updates
|
|
18
|
+
- **Relaxed verification detection** — `consent.mjs` now uses broad keyword matching (`includes('verify')`, `includes('human')`) instead of anchored regexes, correctly catching button text variants like "Verify you are human" across Cloudflare, Microsoft, and generic modals
|
|
19
|
+
|
|
20
|
+
## v1.4.1
|
|
21
|
+
|
|
22
|
+
- **Fixed parallel synthesis** — multiple `greedy_search` calls with `synthesize: true` now run safely in parallel. Each search creates a fresh Gemini tab that gets cleaned up after synthesis, preventing tab conflicts and "Uncaught" errors.
|
|
23
|
+
|
|
24
|
+
## v1.4.0
|
|
25
|
+
|
|
26
|
+
- **Grounded synthesis** — Gemini now receives a normalized source registry with stable source IDs, agreement summaries, caveats, and cited claims
|
|
27
|
+
- **Real deep research** — top sources are fetched before synthesis so deep research answers are grounded in fetched evidence, not just engine summaries
|
|
28
|
+
- **Richer source metadata** — source output now includes canonical URLs, domains, source types, per-engine attribution, and confidence metadata
|
|
29
|
+
- **Cleaner tab lifecycle** — temporary Perplexity, Bing, and Google tabs are closed after each fan-out search, and synthesis finishes on the Gemini tab
|
|
30
|
+
- **Isolated Chrome targeting** — GreedySearch now refuses to fall back to your normal Chrome session, preventing stray remote-debugging prompts
|
package/README.md
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
1
|
# GreedySearch for Pi
|
|
2
2
|
|
|
3
|
-
Pi extension that adds
|
|
3
|
+
Pi extension that adds `greedy_search`, `deep_research`, and `coding_task` tools — multi-engine AI search via browser automation. **NO API KEYS needed.**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## What's New (v1.4.1)
|
|
5
|
+
Fans out queries to Perplexity, Bing Copilot, and Google AI simultaneously. Returns AI-synthesized answers with deduped sources. Streams progress as each engine completes.
|
|
8
6
|
|
|
9
|
-
|
|
7
|
+
Forked from [GreedySearch-claude](https://github.com/apmantza/GreedySearch-claude).
|
|
10
8
|
|
|
11
|
-
##
|
|
9
|
+
## Quick Note
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
- **Real deep research** — top sources are fetched before synthesis so deep research answers are grounded in fetched evidence, not just engine summaries
|
|
15
|
-
- **Richer source metadata** — source output now includes canonical URLs, domains, source types, per-engine attribution, and confidence metadata
|
|
16
|
-
- **Cleaner tab lifecycle** — temporary Perplexity, Bing, and Google tabs are closed after each fan-out search, and synthesis finishes on the Gemini tab
|
|
17
|
-
- **Isolated Chrome targeting** — GreedySearch now refuses to fall back to your normal Chrome session, preventing stray remote-debugging prompts
|
|
11
|
+
**No API keys required** — this tool uses Chrome DevTools Protocol (CDP) to interact with search engines directly through a browser. It launches its own isolated Chrome instance, so it won't interfere with your main browser session.
|
|
18
12
|
|
|
19
13
|
## Install
|
|
20
14
|
|
|
@@ -74,15 +68,7 @@ For complex research questions, use `synthesize: true` with `engine: "all"`:
|
|
|
74
68
|
greedy_search({ query: "best auth patterns for SaaS in 2026", engine: "all", synthesize: true })
|
|
75
69
|
```
|
|
76
70
|
|
|
77
|
-
This deduplicates sources across engines, builds a normalized source registry, and feeds that context to Gemini for one clean synthesized answer. Adds ~30s but
|
|
78
|
-
|
|
79
|
-
For the most grounded mode, use deep research from the CLI:
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
node search.mjs all "best auth patterns for SaaS in 2026" --deep-research
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
Deep research fetches top source pages before synthesis and reports source confidence metadata such as agreement level, fetched-source success rate, and source mix.
|
|
71
|
+
This deduplicates sources across engines, builds a normalized source registry, and feeds that context to Gemini for one clean synthesized answer. Adds ~30s but returns agreement summaries, caveats, key claims, and better-labeled top sources.
|
|
86
72
|
|
|
87
73
|
**Use synthesis when:**
|
|
88
74
|
- You need one definitive answer, not multiple perspectives
|
|
@@ -104,21 +90,25 @@ greedy_search({ query: "explain the React compiler", engine: "perplexity", fullA
|
|
|
104
90
|
## Examples
|
|
105
91
|
|
|
106
92
|
**Quick technical lookup:**
|
|
93
|
+
|
|
107
94
|
```
|
|
108
95
|
greedy_search({ query: "How to use async await in Python", engine: "perplexity" })
|
|
109
96
|
```
|
|
110
97
|
|
|
111
98
|
**Compare tools (see where engines agree/disagree):**
|
|
99
|
+
|
|
112
100
|
```
|
|
113
101
|
greedy_search({ query: "Prisma vs Drizzle in 2026", engine: "all" })
|
|
114
102
|
```
|
|
115
103
|
|
|
116
104
|
**Research with synthesis:**
|
|
105
|
+
|
|
117
106
|
```
|
|
118
107
|
greedy_search({ query: "Best practices for monorepo structure", engine: "all", synthesize: true })
|
|
119
108
|
```
|
|
120
109
|
|
|
121
110
|
**Debug an error:**
|
|
111
|
+
|
|
122
112
|
```
|
|
123
113
|
greedy_search({ query: "Error: Cannot find module 'react-dom/client' Next.js 15", engine: "all" })
|
|
124
114
|
```
|
|
@@ -167,32 +157,37 @@ Tests verify:
|
|
|
167
157
|
## Troubleshooting
|
|
168
158
|
|
|
169
159
|
### "Chrome not found"
|
|
160
|
+
|
|
170
161
|
Set the path explicitly:
|
|
162
|
+
|
|
171
163
|
```bash
|
|
172
164
|
export CHROME_PATH="/path/to/chrome"
|
|
173
165
|
```
|
|
174
166
|
|
|
175
167
|
### "CDP timeout" or "Chrome may have crashed"
|
|
168
|
+
|
|
176
169
|
Restart GreedySearch Chrome:
|
|
170
|
+
|
|
177
171
|
```bash
|
|
178
172
|
node ~/.pi/agent/git/GreedySearch-pi/launch.mjs --kill
|
|
179
173
|
node ~/.pi/agent/git/GreedySearch-pi/launch.mjs
|
|
180
174
|
```
|
|
181
175
|
|
|
182
176
|
### Google / Bing "verify you're human"
|
|
183
|
-
|
|
177
|
+
|
|
178
|
+
The extension auto-clicks verification buttons and Cloudflare Turnstile challenges using broad keyword matching — resilient to variations like "Verify you are human" or localised button text. For hard CAPTCHAs (image puzzles), solve manually in the Chrome window that opens.
|
|
184
179
|
|
|
185
180
|
### Parallel searches failing
|
|
186
|
-
|
|
181
|
+
|
|
182
|
+
Each search creates a fresh isolated browser tab that is closed after completion, allowing safe parallel execution without tab state conflicts.
|
|
187
183
|
|
|
188
184
|
### Search hangs
|
|
185
|
+
|
|
189
186
|
Chrome may be unresponsive. Restart it with `launch.mjs --kill` then `launch.mjs`.
|
|
190
187
|
|
|
191
|
-
### Sources are junk links
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
pi install npm:@apmantza/greedysearch-pi
|
|
195
|
-
```
|
|
188
|
+
### Sources are empty or junk links
|
|
189
|
+
|
|
190
|
+
Sources are now extracted by regex-parsing Markdown links (`[title](url)`) from the clipboard text captured after each engine responds — not from DOM selectors that break when the engine's UI updates. If sources are empty, the engine's clipboard copy didn't include formatted links (Bing Copilot currently falls into this category).
|
|
196
191
|
|
|
197
192
|
## How It Works
|
|
198
193
|
|
|
@@ -203,6 +198,36 @@ pi install npm:@apmantza/greedysearch-pi
|
|
|
203
198
|
- `cdp.mjs` — Chrome DevTools Protocol CLI for browser automation
|
|
204
199
|
- `skills/greedy-search/SKILL.md` — skill file that guides the model on when/how to use greedy_search
|
|
205
200
|
|
|
201
|
+
## Changelog
|
|
202
|
+
|
|
203
|
+
### v1.5.0 (2026-03-29)
|
|
204
|
+
|
|
205
|
+
- **Code extraction fixed** — `coding_task` now uses clipboard interception to preserve markdown code blocks (was losing them via DOM scraping)
|
|
206
|
+
- **Chrome targeting hardened** — all tools now consistently target the dedicated GreedySearch Chrome via `CDP_PROFILE_DIR`, preventing fallback to user's main Chrome session
|
|
207
|
+
- **Shared utilities** — extracted ~220 lines of duplicate code from extractors into `common.mjs` (cdp wrapper, tab management, clipboard interception)
|
|
208
|
+
- **Documentation leaner** — skill documentation reduced 61% (180 → 70 lines) while preserving all decision-making info
|
|
209
|
+
- **NO API KEYS** — updated messaging to emphasize this works via browser automation, no API keys needed
|
|
210
|
+
|
|
211
|
+
### v1.4.2 (2026-03-25)
|
|
212
|
+
|
|
213
|
+
- **Fresh isolated tabs** — each search now always creates a new `about:blank` tab via `Target.createTarget` and refreshes the CDP page cache immediately after, preventing SPA navigation failures and stale DOM state from prior queries
|
|
214
|
+
- **Regex-based citation extraction** — all extractors (Perplexity, Bing, Gemini) now parse sources from clipboard Markdown links (`[title](url)`) instead of DOM selectors that break on UI updates
|
|
215
|
+
- **Relaxed verification detection** — `consent.mjs` now uses broad keyword matching (`includes('verify')`, `includes('human')`) instead of anchored regexes, correctly catching button text variants like "Verify you are human" across Cloudflare, Microsoft, and generic modals
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
### v1.4.1
|
|
220
|
+
|
|
221
|
+
- **Fixed parallel synthesis** — multiple `greedy_search` calls with `synthesize: true` now run safely in parallel. Each search creates a fresh Gemini tab that gets cleaned up after synthesis, preventing tab conflicts and "Uncaught" errors.
|
|
222
|
+
|
|
223
|
+
### v1.4.0
|
|
224
|
+
|
|
225
|
+
- **Grounded synthesis** — Gemini now receives a normalized source registry with stable source IDs, agreement summaries, caveats, and cited claims
|
|
226
|
+
- **Real deep research** — top sources are fetched before synthesis so deep research answers are grounded in fetched evidence, not just engine summaries
|
|
227
|
+
- **Richer source metadata** — source output now includes canonical URLs, domains, source types, per-engine attribution, and confidence metadata
|
|
228
|
+
- **Cleaner tab lifecycle** — temporary Perplexity, Bing, and Google tabs are closed after each fan-out search, and synthesis finishes on the Gemini tab
|
|
229
|
+
- **Isolated Chrome targeting** — GreedySearch now refuses to fall back to your normal Chrome session, preventing stray remote-debugging prompts
|
|
230
|
+
|
|
206
231
|
## License
|
|
207
232
|
|
|
208
233
|
MIT
|