opencode-search-plugin 2.1.0 → 2.1.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/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Eleven self-contained [OpenCode](https://opencode.ai) v2 plugins that register web search providers. Each file stands on its own: copy one into your plugins directory, or install the package to get all eleven.
6
6
 
7
- [AnySearch](https://www.anysearch.com/) · [Brave Search](https://brave.com/search/api/) · [Jina](https://jina.ai/) · [Keenable](https://keenable.ai/) · [Linkup](https://www.linkup.so/) · [Metaso](https://metaso.cn/) · [Querit](https://querit.ai/) · [SerpApi](https://serpapi.com/) · [Serper](https://serper.dev/) · [You.com](https://you.com/)
7
+ [AnySearch](https://www.anysearch.com/) · [Brave Search](https://brave.com/search/api/) · [DeepSeek](https://api-docs.deepseek.com/guides/search/) · [Jina](https://jina.ai/) · [Keenable](https://keenable.ai/) · [Linkup](https://www.linkup.so/) · [Metaso](https://metaso.cn/) · [Querit](https://querit.ai/) · [SerpApi](https://serpapi.com/) · [Serper](https://serper.dev/) · [You.com](https://you.com/)
8
8
 
9
9
  ## Why this exists
10
10
 
@@ -14,12 +14,12 @@ This repository adds plugins for eleven more of them, taking the pool from five
14
14
 
15
15
  ## Install
16
16
 
17
- Three equivalent ways to install; pick one. **npm is recommended**: a version published to the registry is immutable, so a pinned `@2.1.0` always installs the same bytes, whereas a GitHub tag can in principle be moved by a maintainer to point at a different commit. The first two install the same complete package (all eleven); use the third for one or two files only.
17
+ Three equivalent ways to install; pick one. **npm is recommended**: a version published to the registry is immutable, so a pinned `@2.1.1` always installs the same bytes, whereas a GitHub tag can in principle be moved by a maintainer to point at a different commit. The first two install the same complete package (all eleven); use the third for one or two files only.
18
18
 
19
19
  ### 1. From npm (recommended)
20
20
 
21
21
  ```sh
22
- # add @2.1.0 to pin
22
+ # add @2.1.1 to pin
23
23
  opencode plugin add opencode-search-plugin
24
24
  ```
25
25
 
@@ -35,7 +35,7 @@ or declare it in `opencode.json(c)`:
35
35
  ### 2. From GitHub
36
36
 
37
37
  ```sh
38
- # add #v2.1.0 to pin
38
+ # add #v2.1.1 to pin
39
39
  opencode plugin add github:guotree/opencode-search-plugin
40
40
  ```
41
41
 
@@ -117,7 +117,7 @@ opencode plugin update github:guotree/opencode-search-plugin
117
117
  opencode plugin update
118
118
  ```
119
119
 
120
- The target is the specifier that was configured: an npm install is named by its package name, a GitHub install answers only to its `github:` form — naming it by its bare package name fails with `Plugin is not configured`. Run `opencode plugin check` first to see what is outdated. An install without a pinned version follows new releases; a pinned one — `@2.1.0` on npm, `#v2.1.0` on GitHub — stays on its pin until you re-run `plugin add` with a newer pin or edit the specifier in `opencode.json(c)`. A locally copied file is upgraded by copying the new version over the old one.
120
+ The target is the specifier that was configured: an npm install is named by its package name, a GitHub install answers only to its `github:` form — naming it by its bare package name fails with `Plugin is not configured`. Run `opencode plugin check` first to see what is outdated. An install without a pinned version follows new releases; a pinned one — `@2.1.1` on npm, `#v2.1.1` on GitHub — stays on its pin until you re-run `plugin add` with a newer pin or edit the specifier in `opencode.json(c)`. A locally copied file is upgraded by copying the new version over the old one.
121
121
 
122
122
  ## Uninstall
123
123
 
@@ -153,6 +153,8 @@ Once keys are in place, pick how OpenCode chooses among them:
153
153
 
154
154
  Every ID below carries an `osp-` prefix — this package's namespace. OpenCode's own providers register bare vendor names (`exa`, `tavily`), and a vendor's official plugin would do the same, so the prefix is what keeps those entries from colliding with ours — both in the websearch pool and in the `/connect` table, where credentials are keyed by integration ID. Use the prefixed form verbatim in `websearch.provider` and in `enable`/`disable`.
155
155
 
156
+ The namespace also shows on the display name: `/connect` lists each of this package's entries with an `(osp)` marker — `DeepSeek (osp)` beside a built-in `DeepSeek` — so a key saved here cannot be mistaken for a built-in provider's. The websearch pool keeps the plain provider name, since the pool holds only search providers and the collision does not exist there.
157
+
156
158
  | Provider | ID | Key (env / `/connect`) | Anonymous | Notes |
157
159
  | --- | --- | --- | --- | --- |
158
160
  | AnySearch | `osp-anysearch` | `ANYSEARCH_API_KEY` | yes | Free tier per IP; intent router, `cn`/`intl` zones |
package/README.zh-CN.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  十一个相互独立的 [OpenCode](https://opencode.ai) v2 插件,各自注册一个网页搜索 provider。每个文件都能单独使用:复制一个进你的插件目录,或者安装这个包一次拿全十一个。
6
6
 
7
- [AnySearch](https://www.anysearch.com/) · [Brave Search](https://brave.com/search/api/) · [Jina](https://jina.ai/) · [Keenable](https://keenable.ai/) · [Linkup](https://www.linkup.so/) · [Metaso](https://metaso.cn/) · [Querit](https://querit.ai/) · [SerpApi](https://serpapi.com/) · [Serper](https://serper.dev/) · [You.com](https://you.com/)
7
+ [AnySearch](https://www.anysearch.com/) · [Brave Search](https://brave.com/search/api/) · [DeepSeek](https://api-docs.deepseek.com/guides/search/) · [Jina](https://jina.ai/) · [Keenable](https://keenable.ai/) · [Linkup](https://www.linkup.so/) · [Metaso](https://metaso.cn/) · [Querit](https://querit.ai/) · [SerpApi](https://serpapi.com/) · [Serper](https://serper.dev/) · [You.com](https://you.com/)
8
8
 
9
9
  ## 为什么做这个插件
10
10
 
@@ -14,12 +14,12 @@ OpenCode v2 内置了五个网页搜索 provider:`exa`、`firecrawl`、`parall
14
14
 
15
15
  ## 安装
16
16
 
17
- 三种方式等价,任选其一。**推荐 npm**:已发布到 registry 的版本不可变,固定 `@2.1.0` 后每次安装都拿到同一份字节;GitHub 的 tag 在理论上可以被维护者移动、指向别的 commit。前两种装的是同一个完整包(十一个全有),只想用一两个就用第三种。
17
+ 三种方式等价,任选其一。**推荐 npm**:已发布到 registry 的版本不可变,固定 `@2.1.1` 后每次安装都拿到同一份字节;GitHub 的 tag 在理论上可以被维护者移动、指向别的 commit。前两种装的是同一个完整包(十一个全有),只想用一两个就用第三种。
18
18
 
19
19
  ### 1. 从 npm 安装(推荐)
20
20
 
21
21
  ```sh
22
- # 追加 @2.1.0 可固定到该版本
22
+ # 追加 @2.1.1 可固定到该版本
23
23
  opencode plugin add opencode-search-plugin
24
24
  ```
25
25
 
@@ -35,7 +35,7 @@ opencode plugin add opencode-search-plugin
35
35
  ### 2. 从 GitHub 安装
36
36
 
37
37
  ```sh
38
- # 追加 #v2.1.0 可固定到该 tag
38
+ # 追加 #v2.1.1 可固定到该 tag
39
39
  opencode plugin add github:guotree/opencode-search-plugin
40
40
  ```
41
41
 
@@ -117,7 +117,7 @@ opencode plugin update github:guotree/opencode-search-plugin
117
117
  opencode plugin update
118
118
  ```
119
119
 
120
- 升级目标用的是配置时的说明符:npm 安装用包名,GitHub 安装只认自己的 `github:` 形式——用裸包名会报 `Plugin is not configured`。先跑 `opencode plugin check` 查看有哪些过期。未固定版本的安装会跟上新版本;固定过的——npm 形式的 `@2.1.0`、GitHub 形式的 `#v2.1.0`——会停在原地,直到你用新 pin 重新执行 `plugin add`,或直接修改 `opencode.json(c)` 里的说明符。本地复制的文件则用新版本覆盖旧文件来升级。
120
+ 升级目标用的是配置时的说明符:npm 安装用包名,GitHub 安装只认自己的 `github:` 形式——用裸包名会报 `Plugin is not configured`。先跑 `opencode plugin check` 查看有哪些过期。未固定版本的安装会跟上新版本;固定过的——npm 形式的 `@2.1.1`、GitHub 形式的 `#v2.1.1`——会停在原地,直到你用新 pin 重新执行 `plugin add`,或直接修改 `opencode.json(c)` 里的说明符。本地复制的文件则用新版本覆盖旧文件来升级。
121
121
 
122
122
  ## 卸载
123
123
 
@@ -153,6 +153,8 @@ AnySearch 和 Keenable 是例外。两家都有匿名层级,因此始终注册
153
153
 
154
154
  下表每个 ID 都带 `osp-` 前缀——这是本包的命名空间。OpenCode 内置 provider 用的是裸厂商名(`exa`、`tavily`),厂商自己的插件也会注册裸名(Keenable 就已经有一个),所以前缀是避免撞名的唯一保障:既避开搜索池里的重复,也避开 `/connect` 里按 integration ID 存凭据的那张表。在 `websearch.provider` 和 `enable`/`disable` 里请原样使用带前缀的 ID。
155
155
 
156
+ 命名空间同样体现在显示名上:`/connect` 里本包的每个条目都带 `(osp)` 标记——内置的 `DeepSeek` 旁边是 `DeepSeek (osp)`——存在这里的 key 不会和内置 provider 的混淆。搜索池里仍用纯品牌名,因为池中只有搜索 provider,不存在撞名问题。
157
+
156
158
  | 服务 | ID | 密钥(环境变量 / `/connect`) | 匿名可用 | 说明 |
157
159
  | --- | --- | --- | --- | --- |
158
160
  | AnySearch | `osp-anysearch` | `ANYSEARCH_API_KEY` | 是 | 按 IP 的免费额度;意图路由,`cn` / `intl` 分区 |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-search-plugin",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Eleven self-contained websearch provider plugins for OpenCode v2: AnySearch, Brave, DeepSeek, Jina, Keenable, Linkup, Metaso, Querit, SerpApi, Serper and You.com.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -113,7 +113,7 @@ export const effect = (ctx: Plugin.Context) =>
113
113
  // Make "AnySearch" show up in /connect with an API-key method.
114
114
  yield* ctx.integration.transform((editor) => {
115
115
  editor.update(ID, (integration) => {
116
- integration.name = "AnySearch"
116
+ integration.name = "AnySearch (osp)"
117
117
  })
118
118
  editor.method.update({
119
119
  integrationID: ID,
@@ -148,7 +148,7 @@ export const effect = (ctx: Plugin.Context) =>
148
148
  // Make "Brave Search" show up in /connect with an API-key method.
149
149
  yield* ctx.integration.transform((editor) => {
150
150
  editor.update(ID, (integration) => {
151
- integration.name = "Brave Search"
151
+ integration.name = "Brave Search (osp)"
152
152
  })
153
153
  editor.method.update({
154
154
  integrationID: ID,
@@ -143,7 +143,7 @@ export const effect = (ctx: Plugin.Context) =>
143
143
  // Make "DeepSeek" show up in /connect with an API-key method.
144
144
  yield* ctx.integration.transform((editor) => {
145
145
  editor.update(ID, (integration) => {
146
- integration.name = "DeepSeek"
146
+ integration.name = "DeepSeek (osp)"
147
147
  })
148
148
  editor.method.update({
149
149
  integrationID: ID,
@@ -112,7 +112,7 @@ export const effect = (ctx: Plugin.Context) =>
112
112
  // Make "Jina" show up in /connect with an API-key method.
113
113
  yield* ctx.integration.transform((editor) => {
114
114
  editor.update(ID, (integration) => {
115
- integration.name = "Jina"
115
+ integration.name = "Jina (osp)"
116
116
  })
117
117
  editor.method.update({
118
118
  integrationID: ID,
@@ -163,7 +163,7 @@ export const effect = (ctx: Plugin.Context) =>
163
163
  // Make "Keenable" show up in /connect with an API-key method.
164
164
  yield* ctx.integration.transform((editor) => {
165
165
  editor.update(ID, (integration) => {
166
- integration.name = "Keenable"
166
+ integration.name = "Keenable (osp)"
167
167
  })
168
168
  editor.method.update({
169
169
  integrationID: ID,
@@ -88,7 +88,7 @@ export const effect = (ctx: Plugin.Context) =>
88
88
  // Make "Linkup" show up in /connect with an API-key method.
89
89
  yield* ctx.integration.transform((editor) => {
90
90
  editor.update(ID, (integration) => {
91
- integration.name = "Linkup"
91
+ integration.name = "Linkup (osp)"
92
92
  })
93
93
  editor.method.update({
94
94
  integrationID: ID,
@@ -143,7 +143,7 @@ export const effect = (ctx: Plugin.Context) =>
143
143
  // Make "Metaso" show up in /connect with an API-key method.
144
144
  yield* ctx.integration.transform((editor) => {
145
145
  editor.update(ID, (integration) => {
146
- integration.name = "Metaso Search"
146
+ integration.name = "Metaso Search (osp)"
147
147
  })
148
148
  editor.method.update({
149
149
  integrationID: ID,
@@ -153,7 +153,7 @@ export const effect = (ctx: Plugin.Context) =>
153
153
  // Make "Querit" show up in /connect with an API-key method.
154
154
  yield* ctx.integration.transform((editor) => {
155
155
  editor.update(ID, (integration) => {
156
- integration.name = "Querit"
156
+ integration.name = "Querit (osp)"
157
157
  })
158
158
  editor.method.update({
159
159
  integrationID: ID,
@@ -147,7 +147,7 @@ export const effect = (ctx: Plugin.Context) =>
147
147
  // Make "SerpApi" show up in /connect with an API-key method.
148
148
  yield* ctx.integration.transform((editor) => {
149
149
  editor.update(ID, (integration) => {
150
- integration.name = "SerpApi"
150
+ integration.name = "SerpApi (osp)"
151
151
  })
152
152
  editor.method.update({
153
153
  integrationID: ID,
@@ -146,7 +146,7 @@ export const effect = (ctx: Plugin.Context) =>
146
146
  // Make "Serper" show up in /connect with an API-key method.
147
147
  yield* ctx.integration.transform((editor) => {
148
148
  editor.update(ID, (integration) => {
149
- integration.name = "Serper"
149
+ integration.name = "Serper (osp)"
150
150
  })
151
151
  editor.method.update({
152
152
  integrationID: ID,
@@ -177,7 +177,7 @@ export const effect = (ctx: Plugin.Context) =>
177
177
  // Make "You.com" show up in /connect with an API-key method.
178
178
  yield* ctx.integration.transform((editor) => {
179
179
  editor.update(ID, (integration) => {
180
- integration.name = "You.com"
180
+ integration.name = "You.com (osp)"
181
181
  })
182
182
  editor.method.update({
183
183
  integrationID: ID,