opencode-search 1.0.0-next.9 → 1.1.0-next.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/README.md +27 -27
- package/dist/{search.d.ts → search.d.mts} +1 -2
- package/dist/search.mjs +947 -0
- package/package.json +22 -16
- package/dist/package.json +0 -68
- package/dist/search.d.ts.map +0 -1
- package/dist/search.js +0 -20
- package/dist/search.js.map +0 -1
- package/dist/src/cache.d.ts +0 -3
- package/dist/src/cache.d.ts.map +0 -1
- package/dist/src/cache.js +0 -43
- package/dist/src/cache.js.map +0 -1
- package/dist/src/format.d.ts +0 -20
- package/dist/src/format.d.ts.map +0 -1
- package/dist/src/format.js +0 -46
- package/dist/src/format.js.map +0 -1
- package/dist/src/html.d.ts +0 -8
- package/dist/src/html.d.ts.map +0 -1
- package/dist/src/html.js +0 -28
- package/dist/src/html.js.map +0 -1
- package/dist/src/normalize-blurb.d.ts +0 -2
- package/dist/src/normalize-blurb.d.ts.map +0 -1
- package/dist/src/normalize-blurb.js +0 -21
- package/dist/src/normalize-blurb.js.map +0 -1
- package/dist/src/opencode/notify.d.ts +0 -10
- package/dist/src/opencode/notify.d.ts.map +0 -1
- package/dist/src/opencode/notify.js +0 -8
- package/dist/src/opencode/notify.js.map +0 -1
- package/dist/src/parse-results.d.ts +0 -2
- package/dist/src/parse-results.d.ts.map +0 -1
- package/dist/src/parse-results.js +0 -20
- package/dist/src/parse-results.js.map +0 -1
- package/dist/src/providers/brave-search.d.ts +0 -4
- package/dist/src/providers/brave-search.d.ts.map +0 -1
- package/dist/src/providers/brave-search.js +0 -29
- package/dist/src/providers/brave-search.js.map +0 -1
- package/dist/src/providers/bsky-search.d.ts +0 -31
- package/dist/src/providers/bsky-search.d.ts.map +0 -1
- package/dist/src/providers/bsky-search.js +0 -61
- package/dist/src/providers/bsky-search.js.map +0 -1
- package/dist/src/providers/ddg-search.d.ts +0 -7
- package/dist/src/providers/ddg-search.d.ts.map +0 -1
- package/dist/src/providers/ddg-search.js +0 -88
- package/dist/src/providers/ddg-search.js.map +0 -1
- package/dist/src/providers/gnews-search.d.ts +0 -9
- package/dist/src/providers/gnews-search.d.ts.map +0 -1
- package/dist/src/providers/gnews-search.js +0 -50
- package/dist/src/providers/gnews-search.js.map +0 -1
- package/dist/src/providers/mdn-search.d.ts +0 -22
- package/dist/src/providers/mdn-search.d.ts.map +0 -1
- package/dist/src/providers/mdn-search.js +0 -59
- package/dist/src/providers/mdn-search.js.map +0 -1
- package/dist/src/providers/rfc-search.d.ts +0 -9
- package/dist/src/providers/rfc-search.d.ts.map +0 -1
- package/dist/src/providers/rfc-search.js +0 -35
- package/dist/src/providers/rfc-search.js.map +0 -1
- package/dist/src/providers/w3c-search.d.ts +0 -6
- package/dist/src/providers/w3c-search.d.ts.map +0 -1
- package/dist/src/providers/w3c-search.js +0 -42
- package/dist/src/providers/w3c-search.js.map +0 -1
- package/dist/src/providers/whatwg-search.d.ts +0 -8
- package/dist/src/providers/whatwg-search.d.ts.map +0 -1
- package/dist/src/providers/whatwg-search.js +0 -31
- package/dist/src/providers/whatwg-search.js.map +0 -1
- package/dist/src/providers/wiki-search.d.ts +0 -25
- package/dist/src/providers/wiki-search.d.ts.map +0 -1
- package/dist/src/providers/wiki-search.js +0 -50
- package/dist/src/providers/wiki-search.js.map +0 -1
- package/dist/src/renderers.d.ts +0 -18
- package/dist/src/renderers.d.ts.map +0 -1
- package/dist/src/renderers.js +0 -43
- package/dist/src/renderers.js.map +0 -1
- package/dist/src/safe.d.ts +0 -13
- package/dist/src/safe.d.ts.map +0 -1
- package/dist/src/safe.js +0 -17
- package/dist/src/safe.js.map +0 -1
- package/dist/src/search.d.ts +0 -13
- package/dist/src/search.d.ts.map +0 -1
- package/dist/src/search.js +0 -304
- package/dist/src/search.js.map +0 -1
- package/dist/src/strategies.d.ts +0 -13
- package/dist/src/strategies.d.ts.map +0 -1
- package/dist/src/strategies.js +0 -48
- package/dist/src/strategies.js.map +0 -1
- package/dist/src/user-agent.d.ts +0 -2
- package/dist/src/user-agent.d.ts.map +0 -1
- package/dist/src/user-agent.js +0 -3
- package/dist/src/user-agent.js.map +0 -1
- package/dist/src/v1-message.d.ts +0 -2
- package/dist/src/v1-message.d.ts.map +0 -1
- package/dist/src/v1-message.js +0 -11
- package/dist/src/v1-message.js.map +0 -1
- package/search.ts +0 -22
- package/src/cache.test.ts +0 -14
- package/src/cache.ts +0 -61
- package/src/format.test.ts +0 -175
- package/src/format.ts +0 -72
- package/src/html.ts +0 -39
- package/src/normalize-blurb.test.ts +0 -67
- package/src/normalize-blurb.ts +0 -22
- package/src/opencode/notify.ts +0 -16
- package/src/parse-results.test.ts +0 -75
- package/src/parse-results.ts +0 -22
- package/src/providers/brave-search.ts +0 -39
- package/src/providers/bsky-search.test.ts +0 -16
- package/src/providers/bsky-search.ts +0 -88
- package/src/providers/ddg-search.test.ts +0 -15
- package/src/providers/ddg-search.ts +0 -117
- package/src/providers/gnews-search.ts +0 -72
- package/src/providers/mdn-search.test.ts +0 -17
- package/src/providers/mdn-search.ts +0 -83
- package/src/providers/rfc-search.test.ts +0 -22
- package/src/providers/rfc-search.ts +0 -57
- package/src/providers/w3c-search.test.ts +0 -22
- package/src/providers/w3c-search.ts +0 -67
- package/src/providers/whatwg-search.test.ts +0 -21
- package/src/providers/whatwg-search.ts +0 -55
- package/src/providers/wiki-search.test.ts +0 -16
- package/src/providers/wiki-search.ts +0 -72
- package/src/renderers.test.ts +0 -263
- package/src/renderers.ts +0 -62
- package/src/safe.test.ts +0 -87
- package/src/safe.ts +0 -27
- package/src/search.ts +0 -369
- package/src/strategies.test.ts +0 -92
- package/src/strategies.ts +0 -62
- package/src/user-agent.ts +0 -3
- package/src/v1-message.test.ts +0 -17
- package/src/v1-message.ts +0 -10
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
An [OpenCode](https://opencode.ai) plugin that gives your agent access to DuckDuckGo, Brave, Google News, Wikipedia, Bluesky, MDN Web Docs, and the IETF, W3C and WHATWG specifications.
|
|
4
4
|
|
|
5
|
-
<img width="776" height="393" alt="
|
|
5
|
+
<img width="776" height="393" alt="OpenCode running wiki_search for pumpkins and listing three Wikipedia results" src="docs/screenshot.svg" />
|
|
6
6
|
|
|
7
7
|
## What this adds over OpenCode's built-in tools
|
|
8
8
|
|
|
@@ -75,39 +75,39 @@ Search Google News for recent articles. Returns headline, publisher, and publica
|
|
|
75
75
|
|
|
76
76
|
Search Bluesky posts via the AT Protocol. Returns posts with author handle, text, and engagement counts (likes, reposts, replies).
|
|
77
77
|
|
|
78
|
-
| Parameter | Type | Required | Description
|
|
79
|
-
| --------- | ------ | -------- |
|
|
80
|
-
| `query` | string | yes |
|
|
81
|
-
| `limit` | number | no | Number of results to return
|
|
82
|
-
| `sort` | string | no | Sort order: `top` or `latest`
|
|
78
|
+
| Parameter | Type | Required | Description |
|
|
79
|
+
| --------- | ------ | -------- | ----------------------------- |
|
|
80
|
+
| `query` | string | yes | |
|
|
81
|
+
| `limit` | number | no | Number of results to return |
|
|
82
|
+
| `sort` | string | no | Sort order: `top` or `latest` |
|
|
83
83
|
|
|
84
84
|
### wiki_search
|
|
85
85
|
|
|
86
86
|
Search Wikipedia articles using the MediaWiki REST API. Returns structured results with title, description, excerpt, and a direct link to the article. No API key required.
|
|
87
87
|
|
|
88
|
-
| Parameter | Type | Required | Description
|
|
89
|
-
| --------- | ------ | -------- |
|
|
90
|
-
| `query` | string | yes |
|
|
91
|
-
| `limit` | number | no | Number of results (1-100)
|
|
88
|
+
| Parameter | Type | Required | Description |
|
|
89
|
+
| --------- | ------ | -------- | ------------------------- |
|
|
90
|
+
| `query` | string | yes | |
|
|
91
|
+
| `limit` | number | no | Number of results (1-100) |
|
|
92
92
|
|
|
93
93
|
### mdn_search
|
|
94
94
|
|
|
95
95
|
Search MDN Web Docs. Returns documentation pages for web technologies with title, URL, and summary. No API key required.
|
|
96
96
|
|
|
97
|
-
| Parameter | Type | Required | Description
|
|
98
|
-
| --------- | ------ | -------- |
|
|
99
|
-
| `query` | string | yes |
|
|
100
|
-
| `limit` | number | no | Number of results to return
|
|
101
|
-
| `page` | number | no | Page number for pagination
|
|
97
|
+
| Parameter | Type | Required | Description |
|
|
98
|
+
| --------- | ------ | -------- | --------------------------- |
|
|
99
|
+
| `query` | string | yes | |
|
|
100
|
+
| `limit` | number | no | Number of results to return |
|
|
101
|
+
| `page` | number | no | Page number for pagination |
|
|
102
102
|
|
|
103
103
|
### rfc_search
|
|
104
104
|
|
|
105
105
|
Search IETF RFCs by title via the [Datatracker API](https://datatracker.ietf.org/api/). Returns RFC number, title, date, and abstract. No API key required.
|
|
106
106
|
|
|
107
|
-
| Parameter | Type | Required | Description
|
|
108
|
-
| --------- | ------ | -------- |
|
|
109
|
-
| `query` | string | yes |
|
|
110
|
-
| `limit` | number | no | Number of results (default 20)
|
|
107
|
+
| Parameter | Type | Required | Description |
|
|
108
|
+
| --------- | ------ | -------- | ------------------------------ |
|
|
109
|
+
| `query` | string | yes | |
|
|
110
|
+
| `limit` | number | no | Number of results (default 20) |
|
|
111
111
|
|
|
112
112
|
Matches on title only, so a query is a phrase from the RFC's name rather than its body.
|
|
113
113
|
|
|
@@ -115,10 +115,10 @@ Matches on title only, so a query is a phrase from the RFC's name rather than it
|
|
|
115
115
|
|
|
116
116
|
Search W3C specifications by title via the [W3C API](https://api.w3.org/). Returns the spec title and URL. No API key required.
|
|
117
117
|
|
|
118
|
-
| Parameter | Type | Required | Description
|
|
119
|
-
| --------- | ------ | -------- |
|
|
120
|
-
| `query` | string | yes |
|
|
121
|
-
| `limit` | number | no | Number of results (default 20)
|
|
118
|
+
| Parameter | Type | Required | Description |
|
|
119
|
+
| --------- | ------ | -------- | ------------------------------ |
|
|
120
|
+
| `query` | string | yes | |
|
|
121
|
+
| `limit` | number | no | Number of results (default 20) |
|
|
122
122
|
|
|
123
123
|
The W3C API accepts a `q` parameter and ignores it — a real query and a nonsense string both return all 1713 specifications. So the full index is fetched, two pages of 1000, and filtered here. Titles only; the API exposes no abstracts.
|
|
124
124
|
|
|
@@ -126,9 +126,9 @@ The W3C API accepts a `q` parameter and ignores it — a real query and a nonsen
|
|
|
126
126
|
|
|
127
127
|
Search WHATWG living standards. Returns the standard name, URL, and description. No API key required.
|
|
128
128
|
|
|
129
|
-
| Parameter | Type | Required | Description
|
|
130
|
-
| --------- | ------ | -------- |
|
|
131
|
-
| `query` | string | yes |
|
|
132
|
-
| `limit` | number | no | Number of results (default 20)
|
|
129
|
+
| Parameter | Type | Required | Description |
|
|
130
|
+
| --------- | ------ | -------- | ------------------------------ |
|
|
131
|
+
| `query` | string | yes | |
|
|
132
|
+
| `limit` | number | no | Number of results (default 20) |
|
|
133
133
|
|
|
134
134
|
WHATWG publishes its whole index as one small JSON file and offers no search endpoint, so matching happens here across names and descriptions. There are only 27 standards, so expect few results.
|