@jackwener/opencli 1.5.9 → 1.6.1
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/CHANGELOG.md +29 -0
- package/README.md +18 -0
- package/SKILL.md +59 -0
- package/autoresearch/baseline-browse.txt +1 -0
- package/autoresearch/baseline-skill.txt +1 -0
- package/autoresearch/browse-tasks.json +688 -0
- package/autoresearch/eval-browse.ts +185 -0
- package/autoresearch/eval-skill.ts +248 -0
- package/autoresearch/run-browse.sh +9 -0
- package/autoresearch/run-skill.sh +9 -0
- package/bun.lock +615 -0
- package/dist/browser/daemon-client.d.ts +20 -1
- package/dist/browser/daemon-client.js +37 -30
- package/dist/browser/daemon-client.test.d.ts +1 -0
- package/dist/browser/daemon-client.test.js +77 -0
- package/dist/browser/discover.js +8 -19
- package/dist/browser/page.d.ts +4 -0
- package/dist/browser/page.js +48 -1
- package/dist/cli-manifest.json +2 -2
- package/dist/cli.js +392 -0
- package/dist/clis/twitter/article.js +28 -1
- package/dist/clis/twitter/search.js +67 -5
- package/dist/clis/twitter/search.test.js +83 -5
- package/dist/clis/xiaohongshu/note.js +11 -0
- package/dist/clis/xiaohongshu/note.test.js +49 -0
- package/dist/commanderAdapter.js +1 -1
- package/dist/commanderAdapter.test.js +43 -0
- package/dist/commands/daemon.js +7 -46
- package/dist/commands/daemon.test.js +44 -69
- package/dist/discovery.js +27 -0
- package/dist/types.d.ts +8 -0
- package/docs/guide/getting-started.md +21 -0
- package/docs/superpowers/specs/2026-04-02-browse-skill-testing-design.md +144 -0
- package/docs/zh/guide/getting-started.md +21 -0
- package/extension/package-lock.json +2 -2
- package/extension/src/background.ts +51 -4
- package/extension/src/cdp.ts +77 -124
- package/extension/src/protocol.ts +5 -1
- package/package.json +1 -1
- package/skills/opencli-explorer/SKILL.md +6 -0
- package/skills/opencli-oneshot/SKILL.md +6 -0
- package/skills/opencli-operate/SKILL.md +213 -0
- package/skills/opencli-usage/SKILL.md +113 -32
- package/src/browser/daemon-client.test.ts +103 -0
- package/src/browser/daemon-client.ts +53 -30
- package/src/browser/discover.ts +8 -17
- package/src/browser/page.ts +48 -1
- package/src/cli.ts +392 -0
- package/src/clis/twitter/article.ts +31 -1
- package/src/clis/twitter/search.test.ts +88 -5
- package/src/clis/twitter/search.ts +68 -5
- package/src/clis/xiaohongshu/note.test.ts +51 -0
- package/src/clis/xiaohongshu/note.ts +18 -0
- package/src/commanderAdapter.test.ts +62 -0
- package/src/commanderAdapter.ts +1 -1
- package/src/commands/daemon.test.ts +49 -83
- package/src/commands/daemon.ts +7 -55
- package/src/discovery.ts +22 -0
- package/src/doctor.ts +1 -1
- package/src/types.ts +8 -0
- package/extension/dist/background.js +0 -681
|
@@ -0,0 +1,688 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"name": "extract-title-example",
|
|
4
|
+
"steps": [
|
|
5
|
+
"opencli operate open https://example.com",
|
|
6
|
+
"opencli operate eval \"document.title\""
|
|
7
|
+
],
|
|
8
|
+
"judge": {
|
|
9
|
+
"type": "contains",
|
|
10
|
+
"value": "Example Domain"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"name": "extract-title-iana",
|
|
15
|
+
"steps": [
|
|
16
|
+
"opencli operate open https://www.iana.org",
|
|
17
|
+
"opencli operate eval \"document.querySelector('h1')?.textContent\""
|
|
18
|
+
],
|
|
19
|
+
"judge": {
|
|
20
|
+
"type": "nonEmpty"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "extract-paragraph-wiki-js",
|
|
25
|
+
"steps": [
|
|
26
|
+
"opencli operate open https://en.wikipedia.org/wiki/JavaScript",
|
|
27
|
+
"opencli operate eval \"(() => { const ps = document.querySelectorAll('#mw-content-text .mw-parser-output > p'); for (const p of ps) { const t = p.textContent?.trim(); if (t && t.length > 50 && !t.startsWith('{')) return t.slice(0,300); } return ''; })()\""
|
|
28
|
+
],
|
|
29
|
+
"judge": {
|
|
30
|
+
"type": "contains",
|
|
31
|
+
"value": "programming language"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "extract-paragraph-wiki-python",
|
|
36
|
+
"steps": [
|
|
37
|
+
"opencli operate open \"https://en.wikipedia.org/wiki/Python_(programming_language)\"",
|
|
38
|
+
"opencli operate eval \"(() => { const ps = document.querySelectorAll('#mw-content-text .mw-parser-output > p'); for (const p of ps) { const t = p.textContent?.trim(); if (t && t.length > 50 && !t.startsWith('{')) return t.slice(0,300); } return ''; })()\""
|
|
39
|
+
],
|
|
40
|
+
"judge": {
|
|
41
|
+
"type": "contains",
|
|
42
|
+
"value": "programming language"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"name": "extract-github-stars",
|
|
47
|
+
"steps": [
|
|
48
|
+
"opencli operate open https://github.com/browser-use/browser-use",
|
|
49
|
+
"opencli operate eval \"document.querySelector('#repo-stars-counter-star')?.textContent?.trim()\""
|
|
50
|
+
],
|
|
51
|
+
"judge": {
|
|
52
|
+
"type": "matchesPattern",
|
|
53
|
+
"pattern": "\\d"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"name": "extract-github-description",
|
|
58
|
+
"steps": [
|
|
59
|
+
"opencli operate open https://github.com/anthropics/claude-code",
|
|
60
|
+
"opencli operate eval \"document.querySelector('p.f4, [data-testid=about-description], .f4.my-3, .BorderGrid-cell p')?.textContent?.trim()\""
|
|
61
|
+
],
|
|
62
|
+
"judge": {
|
|
63
|
+
"type": "nonEmpty"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "extract-github-readme-heading",
|
|
68
|
+
"steps": [
|
|
69
|
+
"opencli operate open https://github.com/vercel/next.js",
|
|
70
|
+
"opencli operate eval \"document.querySelector('article h1, article h2')?.textContent?.trim()\""
|
|
71
|
+
],
|
|
72
|
+
"judge": {
|
|
73
|
+
"type": "nonEmpty"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "extract-npm-downloads",
|
|
78
|
+
"steps": [
|
|
79
|
+
"opencli operate open https://www.npmjs.com/package/zod",
|
|
80
|
+
"opencli operate eval \"document.querySelector('[data-nosnippet]')?.textContent?.trim() || document.querySelector('p.f2874b88')?.textContent?.trim()\""
|
|
81
|
+
],
|
|
82
|
+
"judge": {
|
|
83
|
+
"type": "matchesPattern",
|
|
84
|
+
"pattern": "\\d"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"name": "extract-npm-description",
|
|
89
|
+
"steps": [
|
|
90
|
+
"opencli operate open https://www.npmjs.com/package/express",
|
|
91
|
+
"opencli operate eval \"document.querySelector('p[class*=description], [data-testid=package-description], #readme p')?.textContent?.trim()\""
|
|
92
|
+
],
|
|
93
|
+
"judge": {
|
|
94
|
+
"type": "nonEmpty"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"name": "list-hn-top5",
|
|
99
|
+
"steps": [
|
|
100
|
+
"opencli operate open https://news.ycombinator.com",
|
|
101
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('.titleline > a')].slice(0,5).map(a=>({title:a.textContent,url:a.href})))\""
|
|
102
|
+
],
|
|
103
|
+
"judge": {
|
|
104
|
+
"type": "arrayMinLength",
|
|
105
|
+
"minLength": 5
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"name": "list-hn-top10",
|
|
110
|
+
"steps": [
|
|
111
|
+
"opencli operate open https://news.ycombinator.com",
|
|
112
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('.athing')].slice(0,10).map(tr=>{const a=tr.querySelector('.titleline>a');const s=tr.nextElementSibling?.querySelector('.score');return{title:a?.textContent,score:parseInt(s?.textContent)||0}}))\""
|
|
113
|
+
],
|
|
114
|
+
"judge": {
|
|
115
|
+
"type": "arrayMinLength",
|
|
116
|
+
"minLength": 10
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
"name": "list-books-5",
|
|
121
|
+
"steps": [
|
|
122
|
+
"opencli operate open https://books.toscrape.com",
|
|
123
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('article.product_pod')].slice(0,5).map(el=>({title:el.querySelector('h3 a')?.getAttribute('title'),price:el.querySelector('.price_color')?.textContent})))\""
|
|
124
|
+
],
|
|
125
|
+
"judge": {
|
|
126
|
+
"type": "arrayMinLength",
|
|
127
|
+
"minLength": 5
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "list-books-10",
|
|
132
|
+
"steps": [
|
|
133
|
+
"opencli operate open https://books.toscrape.com",
|
|
134
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('article.product_pod')].slice(0,10).map(el=>({title:el.querySelector('h3 a')?.getAttribute('title'),price:el.querySelector('.price_color')?.textContent})))\""
|
|
135
|
+
],
|
|
136
|
+
"judge": {
|
|
137
|
+
"type": "arrayMinLength",
|
|
138
|
+
"minLength": 10
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "list-quotes-3",
|
|
143
|
+
"steps": [
|
|
144
|
+
"opencli operate open https://quotes.toscrape.com",
|
|
145
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('.quote')].slice(0,3).map(el=>({text:el.querySelector('.text')?.textContent,author:el.querySelector('.author')?.textContent})))\""
|
|
146
|
+
],
|
|
147
|
+
"judge": {
|
|
148
|
+
"type": "arrayMinLength",
|
|
149
|
+
"minLength": 3
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
"name": "list-quotes-tags",
|
|
154
|
+
"steps": [
|
|
155
|
+
"opencli operate open https://quotes.toscrape.com",
|
|
156
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('.quote')].slice(0,5).map(el=>({text:el.querySelector('.text')?.textContent,author:el.querySelector('.author')?.textContent,tags:[...el.querySelectorAll('.tag')].map(t=>t.textContent)})))\""
|
|
157
|
+
],
|
|
158
|
+
"judge": {
|
|
159
|
+
"type": "arrayMinLength",
|
|
160
|
+
"minLength": 5
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"name": "list-github-trending",
|
|
165
|
+
"steps": [
|
|
166
|
+
"opencli operate open https://github.com/trending",
|
|
167
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('article.Box-row')].slice(0,3).map(el=>({name:el.querySelector('h2 a')?.textContent?.trim().replace(/\\s+/g,' '),desc:el.querySelector('p')?.textContent?.trim()})))\""
|
|
168
|
+
],
|
|
169
|
+
"judge": {
|
|
170
|
+
"type": "arrayMinLength",
|
|
171
|
+
"minLength": 3
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"name": "list-github-trending-lang",
|
|
176
|
+
"steps": [
|
|
177
|
+
"opencli operate open https://github.com/trending/python",
|
|
178
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('article.Box-row')].slice(0,5).map(el=>({name:el.querySelector('h2 a')?.textContent?.trim().replace(/\\s+/g,' ')})))\""
|
|
179
|
+
],
|
|
180
|
+
"judge": {
|
|
181
|
+
"type": "arrayMinLength",
|
|
182
|
+
"minLength": 5
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "list-jsonplaceholder-posts",
|
|
187
|
+
"steps": [
|
|
188
|
+
"opencli operate open https://jsonplaceholder.typicode.com/posts",
|
|
189
|
+
"opencli operate eval \"JSON.stringify(JSON.parse(document.body.innerText).slice(0,5).map(p=>({id:p.id,title:p.title})))\""
|
|
190
|
+
],
|
|
191
|
+
"judge": {
|
|
192
|
+
"type": "arrayMinLength",
|
|
193
|
+
"minLength": 5
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"name": "list-jsonplaceholder-users",
|
|
198
|
+
"steps": [
|
|
199
|
+
"opencli operate open https://jsonplaceholder.typicode.com/users",
|
|
200
|
+
"opencli operate eval \"JSON.stringify(JSON.parse(document.body.innerText).map(u=>({name:u.name,email:u.email})))\""
|
|
201
|
+
],
|
|
202
|
+
"judge": {
|
|
203
|
+
"type": "arrayMinLength",
|
|
204
|
+
"minLength": 5
|
|
205
|
+
}
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
"name": "search-google",
|
|
209
|
+
"steps": [
|
|
210
|
+
"opencli operate open https://www.google.com",
|
|
211
|
+
"opencli operate eval \"document.querySelector('textarea[name=q], input[name=q]').value='opencli github';document.querySelector('form').submit();'submitted'\"",
|
|
212
|
+
"opencli operate wait time 3",
|
|
213
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('h3')].slice(0,3).map(h=>h.textContent))\""
|
|
214
|
+
],
|
|
215
|
+
"judge": {
|
|
216
|
+
"type": "arrayMinLength",
|
|
217
|
+
"minLength": 3
|
|
218
|
+
},
|
|
219
|
+
"note": "index 5 may vary"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"name": "search-ddg",
|
|
223
|
+
"steps": [
|
|
224
|
+
"opencli operate open https://duckduckgo.com",
|
|
225
|
+
"opencli operate state",
|
|
226
|
+
"opencli operate type 1 \"weather beijing\"",
|
|
227
|
+
"opencli operate keys Enter",
|
|
228
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('[data-testid=result-title-a]')].slice(0,3).map(a=>a.textContent))\""
|
|
229
|
+
],
|
|
230
|
+
"judge": {
|
|
231
|
+
"type": "nonEmpty"
|
|
232
|
+
},
|
|
233
|
+
"note": "index may vary"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"name": "search-ddg-tech",
|
|
237
|
+
"steps": [
|
|
238
|
+
"opencli operate open https://duckduckgo.com",
|
|
239
|
+
"opencli operate eval \"document.querySelector('input[name=q]').value='TypeScript tutorial';document.querySelector('form').submit();'submitted'\"",
|
|
240
|
+
"opencli operate wait time 3",
|
|
241
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('[data-testid=result-title-a], .result__a')].slice(0,3).map(a=>({title:a.textContent,url:a.href})))\""
|
|
242
|
+
],
|
|
243
|
+
"judge": {
|
|
244
|
+
"type": "arrayMinLength",
|
|
245
|
+
"minLength": 3
|
|
246
|
+
},
|
|
247
|
+
"note": "index may vary"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"name": "search-wiki",
|
|
251
|
+
"steps": [
|
|
252
|
+
"opencli operate open https://en.wikipedia.org",
|
|
253
|
+
"opencli operate eval \"document.querySelector('input[name=search]').value='Rust programming language';document.querySelector('form#searchform, form[role=search]').submit();'submitted'\"",
|
|
254
|
+
"opencli operate wait time 3",
|
|
255
|
+
"opencli operate eval \"(() => { const ps = document.querySelectorAll('#mw-content-text .mw-parser-output > p'); for (const p of ps) { const t = p.textContent?.trim(); if (t && t.length > 50) return t.slice(0,300); } return ''; })()\""
|
|
256
|
+
],
|
|
257
|
+
"judge": {
|
|
258
|
+
"type": "contains",
|
|
259
|
+
"value": "programming language"
|
|
260
|
+
},
|
|
261
|
+
"note": "index may vary"
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"name": "search-npm",
|
|
265
|
+
"steps": [
|
|
266
|
+
"opencli operate open https://www.npmjs.com",
|
|
267
|
+
"opencli operate state",
|
|
268
|
+
"opencli operate type 1 \"react\"",
|
|
269
|
+
"opencli operate keys Enter",
|
|
270
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('[data-testid=pkg-list-item] h3, section h3')].slice(0,3).map(h=>h.textContent?.trim()))\""
|
|
271
|
+
],
|
|
272
|
+
"judge": {
|
|
273
|
+
"type": "arrayMinLength",
|
|
274
|
+
"minLength": 3
|
|
275
|
+
},
|
|
276
|
+
"note": "index may vary"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"name": "search-github",
|
|
280
|
+
"steps": [
|
|
281
|
+
"opencli operate open https://github.com/search?q=browser+automation&type=repositories",
|
|
282
|
+
"opencli operate wait time 3",
|
|
283
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('.search-title a, [data-testid=results-list] a.Link--primary')].slice(0,3).map(a=>a.textContent?.trim().replace(/\\\\s+/g,' ')))\""
|
|
284
|
+
],
|
|
285
|
+
"judge": {
|
|
286
|
+
"type": "arrayMinLength",
|
|
287
|
+
"minLength": 3
|
|
288
|
+
},
|
|
289
|
+
"note": "index may vary"
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"name": "nav-click-link-example",
|
|
293
|
+
"steps": [
|
|
294
|
+
"opencli operate open https://example.com",
|
|
295
|
+
"opencli operate eval \"document.querySelector('a')?.click();'clicked'\"",
|
|
296
|
+
"opencli operate wait time 2",
|
|
297
|
+
"opencli operate eval \"document.title\""
|
|
298
|
+
],
|
|
299
|
+
"judge": {
|
|
300
|
+
"type": "contains",
|
|
301
|
+
"value": "IANA"
|
|
302
|
+
}
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"name": "nav-click-hn-first",
|
|
306
|
+
"steps": [
|
|
307
|
+
"opencli operate open https://news.ycombinator.com",
|
|
308
|
+
"opencli operate eval \"document.querySelector('.titleline a')?.click();'clicked'\"",
|
|
309
|
+
"opencli operate wait time 2",
|
|
310
|
+
"opencli operate eval \"document.title\""
|
|
311
|
+
],
|
|
312
|
+
"judge": {
|
|
313
|
+
"type": "nonEmpty"
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"name": "nav-click-hn-comments",
|
|
318
|
+
"steps": [
|
|
319
|
+
"opencli operate open https://news.ycombinator.com",
|
|
320
|
+
"opencli operate eval \"document.querySelector('.subtext a:last-child')?.click(); 'clicked'\"",
|
|
321
|
+
"opencli operate eval \"document.title\""
|
|
322
|
+
],
|
|
323
|
+
"judge": {
|
|
324
|
+
"type": "nonEmpty"
|
|
325
|
+
}
|
|
326
|
+
},
|
|
327
|
+
{
|
|
328
|
+
"name": "nav-click-wiki-link",
|
|
329
|
+
"steps": [
|
|
330
|
+
"opencli operate open https://en.wikipedia.org/wiki/JavaScript",
|
|
331
|
+
"opencli operate eval \"document.querySelector('#toc a, .toc a, [href=\\\"#History\\\"]')?.click(); 'clicked'\"",
|
|
332
|
+
"opencli operate eval \"document.querySelector('#History, #History ~ p')?.textContent?.slice(0,100)\""
|
|
333
|
+
],
|
|
334
|
+
"judge": {
|
|
335
|
+
"type": "nonEmpty"
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"name": "nav-click-github-tab",
|
|
340
|
+
"steps": [
|
|
341
|
+
"opencli operate open https://github.com/vercel/next.js",
|
|
342
|
+
"opencli operate eval \"document.querySelector('[data-tab-item=i1issues-tab] a, #issues-tab')?.click(); 'clicked'\"",
|
|
343
|
+
"opencli operate eval \"document.title\""
|
|
344
|
+
],
|
|
345
|
+
"judge": {
|
|
346
|
+
"type": "nonEmpty"
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"name": "nav-go-back",
|
|
351
|
+
"steps": [
|
|
352
|
+
"opencli operate open https://example.com",
|
|
353
|
+
"opencli operate eval \"document.querySelector('a')?.click();'clicked'\"",
|
|
354
|
+
"opencli operate wait time 2",
|
|
355
|
+
"opencli operate back",
|
|
356
|
+
"opencli operate wait time 2",
|
|
357
|
+
"opencli operate eval \"document.title\""
|
|
358
|
+
],
|
|
359
|
+
"judge": {
|
|
360
|
+
"type": "contains",
|
|
361
|
+
"value": "Example Domain"
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
{
|
|
365
|
+
"name": "nav-multi-step",
|
|
366
|
+
"steps": [
|
|
367
|
+
"opencli operate open https://quotes.toscrape.com",
|
|
368
|
+
"opencli operate eval \"document.querySelector('.next a')?.click(); 'clicked'\"",
|
|
369
|
+
"opencli operate eval \"document.querySelector('.quote .text')?.textContent\""
|
|
370
|
+
],
|
|
371
|
+
"judge": {
|
|
372
|
+
"type": "nonEmpty"
|
|
373
|
+
}
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"name": "scroll-footer-quotes",
|
|
377
|
+
"steps": [
|
|
378
|
+
"opencli operate open https://quotes.toscrape.com",
|
|
379
|
+
"opencli operate scroll down",
|
|
380
|
+
"opencli operate scroll down",
|
|
381
|
+
"opencli operate eval \"document.querySelector('footer, .footer, .tags-box')?.textContent?.trim().slice(0,100)\""
|
|
382
|
+
],
|
|
383
|
+
"judge": {
|
|
384
|
+
"type": "nonEmpty"
|
|
385
|
+
}
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"name": "scroll-footer-books",
|
|
389
|
+
"steps": [
|
|
390
|
+
"opencli operate open https://books.toscrape.com",
|
|
391
|
+
"opencli operate scroll down",
|
|
392
|
+
"opencli operate scroll down",
|
|
393
|
+
"opencli operate eval \"document.querySelector('.pager .current')?.textContent?.trim()\""
|
|
394
|
+
],
|
|
395
|
+
"judge": {
|
|
396
|
+
"type": "matchesPattern",
|
|
397
|
+
"pattern": "\\d"
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"name": "scroll-long-page",
|
|
402
|
+
"steps": [
|
|
403
|
+
"opencli operate open https://jsonplaceholder.typicode.com/posts",
|
|
404
|
+
"opencli operate eval \"JSON.parse(document.body.innerText).length\""
|
|
405
|
+
],
|
|
406
|
+
"judge": {
|
|
407
|
+
"type": "matchesPattern",
|
|
408
|
+
"pattern": "\\d"
|
|
409
|
+
}
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
"name": "scroll-find-element",
|
|
413
|
+
"steps": [
|
|
414
|
+
"opencli operate open https://quotes.toscrape.com",
|
|
415
|
+
"opencli operate eval \"document.querySelector('.next a')?.href\""
|
|
416
|
+
],
|
|
417
|
+
"judge": {
|
|
418
|
+
"type": "nonEmpty"
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
"name": "scroll-lazy-load",
|
|
423
|
+
"steps": [
|
|
424
|
+
"opencli operate open https://books.toscrape.com",
|
|
425
|
+
"opencli operate eval \"document.querySelectorAll('article.product_pod').length\""
|
|
426
|
+
],
|
|
427
|
+
"judge": {
|
|
428
|
+
"type": "matchesPattern",
|
|
429
|
+
"pattern": "\\d"
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
{
|
|
433
|
+
"name": "form-simple-name",
|
|
434
|
+
"steps": [
|
|
435
|
+
"opencli operate open https://httpbin.org/forms/post",
|
|
436
|
+
"opencli operate eval \"var el=document.querySelector('[name=custname]');el.value='OpenCLI Test';el.dispatchEvent(new Event('input',{bubbles:true}));el.value\""
|
|
437
|
+
],
|
|
438
|
+
"judge": {
|
|
439
|
+
"type": "contains",
|
|
440
|
+
"value": "OpenCLI"
|
|
441
|
+
},
|
|
442
|
+
"note": "index may vary"
|
|
443
|
+
},
|
|
444
|
+
{
|
|
445
|
+
"name": "form-text-inputs",
|
|
446
|
+
"steps": [
|
|
447
|
+
"opencli operate open https://httpbin.org/forms/post",
|
|
448
|
+
"opencli operate eval \"var n=document.querySelector('[name=custname]');n.value='Alice';n.dispatchEvent(new Event('input',{bubbles:true}));var t=document.querySelector('[name=custtel]');t.value='555-1234';t.dispatchEvent(new Event('input',{bubbles:true}));n.value+'|'+t.value\""
|
|
449
|
+
],
|
|
450
|
+
"judge": {
|
|
451
|
+
"type": "contains",
|
|
452
|
+
"value": "Alice"
|
|
453
|
+
},
|
|
454
|
+
"note": "index may vary"
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
"name": "form-radio-select",
|
|
458
|
+
"steps": [
|
|
459
|
+
"opencli operate open https://httpbin.org/forms/post",
|
|
460
|
+
"opencli operate eval \"document.querySelector('[value=medium]').checked=true;document.querySelector('[value=medium]').dispatchEvent(new Event('change',{bubbles:true}));document.querySelector('[value=medium]').checked\""
|
|
461
|
+
],
|
|
462
|
+
"judge": {
|
|
463
|
+
"type": "contains",
|
|
464
|
+
"value": "true"
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
{
|
|
468
|
+
"name": "form-checkbox",
|
|
469
|
+
"steps": [
|
|
470
|
+
"opencli operate open https://httpbin.org/forms/post",
|
|
471
|
+
"opencli operate eval \"var cb=document.querySelector('[value=cheese]');cb.checked=true;cb.dispatchEvent(new Event('change',{bubbles:true}));cb.checked\""
|
|
472
|
+
],
|
|
473
|
+
"judge": {
|
|
474
|
+
"type": "contains",
|
|
475
|
+
"value": "true"
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"name": "form-textarea",
|
|
480
|
+
"steps": [
|
|
481
|
+
"opencli operate open https://httpbin.org/forms/post",
|
|
482
|
+
"opencli operate eval \"var ta=document.querySelector('textarea[name=comments]');ta.value='AutoResearch test';ta.dispatchEvent(new Event('input',{bubbles:true}));ta.value\""
|
|
483
|
+
],
|
|
484
|
+
"judge": {
|
|
485
|
+
"type": "contains",
|
|
486
|
+
"value": "AutoResearch"
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
"name": "form-login-fake",
|
|
491
|
+
"steps": [
|
|
492
|
+
"opencli operate open https://the-internet.herokuapp.com/login",
|
|
493
|
+
"opencli operate eval \"var u=document.querySelector('#username');u.value='testuser';u.dispatchEvent(new Event('input',{bubbles:true}));var p=document.querySelector('#password');p.value='testpass';p.dispatchEvent(new Event('input',{bubbles:true}));u.value+'|'+p.value\""
|
|
494
|
+
],
|
|
495
|
+
"judge": {
|
|
496
|
+
"type": "contains",
|
|
497
|
+
"value": "testuser"
|
|
498
|
+
},
|
|
499
|
+
"note": "index may vary"
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
"name": "complex-wiki-toc",
|
|
503
|
+
"steps": [
|
|
504
|
+
"opencli operate open https://en.wikipedia.org/wiki/JavaScript",
|
|
505
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('.toc li a, #toc li a, .vector-toc-contents a')].slice(0,8).map(a=>a.textContent?.trim()))\""
|
|
506
|
+
],
|
|
507
|
+
"judge": {
|
|
508
|
+
"type": "arrayMinLength",
|
|
509
|
+
"minLength": 5
|
|
510
|
+
}
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"name": "complex-books-detail",
|
|
514
|
+
"steps": [
|
|
515
|
+
"opencli operate open https://books.toscrape.com",
|
|
516
|
+
"opencli operate eval \"document.querySelector('article.product_pod h3 a')?.click();'clicked'\"",
|
|
517
|
+
"opencli operate eval \"JSON.stringify({title:document.querySelector('h1')?.textContent,price:document.querySelector('.price_color')?.textContent})\""
|
|
518
|
+
],
|
|
519
|
+
"judge": {
|
|
520
|
+
"type": "nonEmpty"
|
|
521
|
+
}
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
"name": "complex-quotes-page2",
|
|
525
|
+
"steps": [
|
|
526
|
+
"opencli operate open https://quotes.toscrape.com",
|
|
527
|
+
"opencli operate eval \"document.querySelector('.next a')?.click();'clicked'\"",
|
|
528
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('.quote')].slice(0,3).map(el=>({text:el.querySelector('.text')?.textContent,author:el.querySelector('.author')?.textContent})))\""
|
|
529
|
+
],
|
|
530
|
+
"judge": {
|
|
531
|
+
"type": "arrayMinLength",
|
|
532
|
+
"minLength": 3
|
|
533
|
+
}
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
"name": "complex-github-repo-info",
|
|
537
|
+
"steps": [
|
|
538
|
+
"opencli operate open https://github.com/expressjs/express",
|
|
539
|
+
"opencli operate eval \"JSON.stringify({lang:document.querySelector('[itemprop=programmingLanguage]')?.textContent?.trim(),license:document.querySelector('[data-analytics-event*=license] span, .Layout-sidebar [href*=LICENSE]')?.textContent?.trim()})\""
|
|
540
|
+
],
|
|
541
|
+
"judge": {
|
|
542
|
+
"type": "nonEmpty"
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"name": "complex-hn-story-comments",
|
|
547
|
+
"steps": [
|
|
548
|
+
"opencli operate open https://news.ycombinator.com",
|
|
549
|
+
"opencli operate eval \"document.querySelector('.subtext a:last-child')?.click();'clicked'\"",
|
|
550
|
+
"opencli operate eval \"document.querySelector('.fatitem .titleline a')?.textContent\""
|
|
551
|
+
],
|
|
552
|
+
"judge": {
|
|
553
|
+
"type": "nonEmpty"
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
"name": "complex-multi-extract",
|
|
558
|
+
"steps": [
|
|
559
|
+
"opencli operate open https://en.wikipedia.org/wiki/TypeScript",
|
|
560
|
+
"opencli operate eval \"JSON.stringify({title:document.title,firstParagraph:document.querySelector('#mw-content-text p')?.textContent?.slice(0,150)})\""
|
|
561
|
+
],
|
|
562
|
+
"judge": {
|
|
563
|
+
"type": "contains",
|
|
564
|
+
"value": "TypeScript"
|
|
565
|
+
}
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
"name": "bench-reddit-top5",
|
|
569
|
+
"steps": [
|
|
570
|
+
"opencli operate open https://old.reddit.com",
|
|
571
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('#siteTable .thing .title a.title')].slice(0,5).map(a=>a.textContent))\""
|
|
572
|
+
],
|
|
573
|
+
"judge": {
|
|
574
|
+
"type": "arrayMinLength",
|
|
575
|
+
"minLength": 5
|
|
576
|
+
},
|
|
577
|
+
"set": "test"
|
|
578
|
+
},
|
|
579
|
+
{
|
|
580
|
+
"name": "bench-imdb-matrix",
|
|
581
|
+
"steps": [
|
|
582
|
+
"opencli operate open https://www.imdb.com/title/tt0133093/",
|
|
583
|
+
"opencli operate eval \"JSON.stringify({title:document.querySelector('h1 span, [data-testid=hero__pageTitle] span')?.textContent,year:document.querySelector('a[href*=releaseinfo], [data-testid=hero-title-block__metadata] a')?.textContent})\""
|
|
584
|
+
],
|
|
585
|
+
"judge": {
|
|
586
|
+
"type": "contains",
|
|
587
|
+
"value": "1999"
|
|
588
|
+
},
|
|
589
|
+
"set": "test"
|
|
590
|
+
},
|
|
591
|
+
{
|
|
592
|
+
"name": "bench-npm-zod",
|
|
593
|
+
"steps": [
|
|
594
|
+
"opencli operate open https://www.npmjs.com/package/zod",
|
|
595
|
+
"opencli operate eval \"JSON.stringify({name:document.querySelector('h1 span, #top h2')?.textContent?.trim(),description:document.querySelector('[data-testid=package-description], p.package-description-redundant')?.textContent?.trim()})\""
|
|
596
|
+
],
|
|
597
|
+
"judge": {
|
|
598
|
+
"type": "nonEmpty"
|
|
599
|
+
},
|
|
600
|
+
"set": "test"
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"name": "bench-wiki-search",
|
|
604
|
+
"steps": [
|
|
605
|
+
"opencli operate open https://en.wikipedia.org/wiki/Machine_learning",
|
|
606
|
+
"opencli operate eval \"(() => { const ps = document.querySelectorAll('#mw-content-text .mw-parser-output > p'); for (const p of ps) { const t = p.textContent?.trim(); if (t && t.length > 50) return t.slice(0,300); } return ''; })()\""
|
|
607
|
+
],
|
|
608
|
+
"judge": {
|
|
609
|
+
"type": "contains",
|
|
610
|
+
"value": "learning"
|
|
611
|
+
},
|
|
612
|
+
"set": "test"
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
"name": "bench-github-profile",
|
|
616
|
+
"steps": [
|
|
617
|
+
"opencli operate open https://github.com/torvalds",
|
|
618
|
+
"opencli operate eval \"JSON.stringify({name:document.querySelector('[itemprop=name]')?.textContent?.trim(),bio:document.querySelector('[data-bio-text]')?.textContent?.trim()||document.querySelector('.p-note')?.textContent?.trim()})\""
|
|
619
|
+
],
|
|
620
|
+
"judge": {
|
|
621
|
+
"type": "nonEmpty"
|
|
622
|
+
},
|
|
623
|
+
"set": "test"
|
|
624
|
+
},
|
|
625
|
+
{
|
|
626
|
+
"name": "bench-books-category",
|
|
627
|
+
"steps": [
|
|
628
|
+
"opencli operate open https://books.toscrape.com",
|
|
629
|
+
"opencli operate eval \"document.querySelector('a[href*=science]')?.click();'clicked'\"",
|
|
630
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('article.product_pod h3 a')].slice(0,3).map(a=>a.getAttribute('title')))\""
|
|
631
|
+
],
|
|
632
|
+
"judge": {
|
|
633
|
+
"type": "arrayMinLength",
|
|
634
|
+
"minLength": 3
|
|
635
|
+
},
|
|
636
|
+
"set": "test"
|
|
637
|
+
},
|
|
638
|
+
{
|
|
639
|
+
"name": "bench-quotes-author",
|
|
640
|
+
"steps": [
|
|
641
|
+
"opencli operate open https://quotes.toscrape.com",
|
|
642
|
+
"opencli operate eval \"document.querySelector('.author + a, a[href*=author]')?.click();'clicked'\"",
|
|
643
|
+
"opencli operate eval \"document.querySelector('.author-description, .author-details p')?.textContent?.slice(0,100)\""
|
|
644
|
+
],
|
|
645
|
+
"judge": {
|
|
646
|
+
"type": "nonEmpty"
|
|
647
|
+
},
|
|
648
|
+
"set": "test"
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"name": "bench-ddg-images",
|
|
652
|
+
"steps": [
|
|
653
|
+
"opencli operate open https://duckduckgo.com",
|
|
654
|
+
"opencli operate eval \"document.querySelector('input[name=q]').value='sunset';document.querySelector('form').submit();'submitted'\"",
|
|
655
|
+
"opencli operate wait time 3",
|
|
656
|
+
"opencli operate eval \"JSON.stringify([...document.querySelectorAll('[data-testid=result-title-a], .result__a')].slice(0,3).map(a=>a.textContent))\""
|
|
657
|
+
],
|
|
658
|
+
"judge": {
|
|
659
|
+
"type": "arrayMinLength",
|
|
660
|
+
"minLength": 3
|
|
661
|
+
},
|
|
662
|
+
"set": "test",
|
|
663
|
+
"note": "index may vary"
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
"name": "bench-httpbin-headers",
|
|
667
|
+
"steps": [
|
|
668
|
+
"opencli operate open https://httpbin.org/headers",
|
|
669
|
+
"opencli operate eval \"JSON.parse(document.body.innerText).headers['User-Agent']\""
|
|
670
|
+
],
|
|
671
|
+
"judge": {
|
|
672
|
+
"type": "nonEmpty"
|
|
673
|
+
},
|
|
674
|
+
"set": "test"
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
"name": "bench-jsonapi-todo",
|
|
678
|
+
"steps": [
|
|
679
|
+
"opencli operate open https://jsonplaceholder.typicode.com/todos",
|
|
680
|
+
"opencli operate eval \"JSON.stringify(JSON.parse(document.body.innerText).slice(0,5).map(t=>({id:t.id,title:t.title,completed:t.completed})))\""
|
|
681
|
+
],
|
|
682
|
+
"judge": {
|
|
683
|
+
"type": "arrayMinLength",
|
|
684
|
+
"minLength": 5
|
|
685
|
+
},
|
|
686
|
+
"set": "test"
|
|
687
|
+
}
|
|
688
|
+
]
|