opencode-next 1.0.0 → 1.0.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
@@ -1,11 +1,18 @@
1
+ <p align="center">
2
+ <img src="./assets/banner-en.png" alt="OpenCode-Next for DSH Banner" width="100%" />
3
+ </p>
4
+
5
+ [![CI](https://github.com/kizaki-R/OpenCode-Next-for-DSH/actions/workflows/test.yml/badge.svg)](https://github.com/kizaki-R/OpenCode-Next-for-DSH/actions/workflows/test.yml)
6
+ [![npm version](https://img.shields.io/npm/v/opencode-next?color=blue)](https://www.npmjs.com/package/opencode-next)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
8
+ [![DeepSeek Harness](https://img.shields.io/badge/DSH-0.1.5%20~%200.2.x-orange.svg)](https://deepseek.com/harness/)
9
+
1
10
  # OpenCode-Next (`opencode-next`)
2
11
 
3
12
  English | [繁體中文](./README.zh-TW.md)
4
13
 
5
14
  Native OpenCode OAuth & OpenCode Go Provider for DeepSeek Harness (DSH).
6
15
 
7
- > Derived from [FishBottle7/opencode2dsh](https://github.com/FishBottle7/opencode2dsh). Internal package/provider identifiers (`opencode-next`, `opencode-next`, `opencode-go-subscription`) are preserved for configuration and account compatibility.
8
-
9
16
  Connects directly to the official OpenCode `/inference/openai/v1` endpoint using personal OAuth tokens, eliminating 403 `FreeTierError` and harsh single-IP 429 rate limits.
10
17
 
11
18
  ## Highlights
@@ -213,17 +220,30 @@ Two other defects in the same path were fixed alongside it:
213
220
 
214
221
  ## Quick Start
215
222
 
223
+ ### Install via DSH Desktop GUI (Easiest)
224
+
225
+ 1. Open **DSH → Plugins → Add Plugin** (or **Settings → Built-in Plugins**).
226
+ 2. Enter `opencode-next` (npm official registry) or `https://github.com/kizaki-R/OpenCode-Next-for-DSH` (GitHub repository URL).
227
+ 3. Click **Install**, restart DSH, and open **Settings → OpenCode-Next** to sign in or configure your OpenCode Go API key.
228
+
216
229
  ### Install via DSH CLI
217
230
 
218
231
  ```bash
219
- # From npm (once published)
232
+ # Install from npm
220
233
  dsh plugin --profile desktop add opencode-next
234
+ ```
235
+
236
+ Alternative sources:
237
+
238
+ ```bash
239
+ # Install from GitHub Release tarball
240
+ dsh plugin --profile desktop add https://github.com/kizaki-R/OpenCode-Next-for-DSH/releases/download/v1.0.0/opencode-next-1.0.0.tgz
221
241
 
222
242
  # Or directly from GitHub
223
243
  dsh plugin --profile desktop add github:kizaki-R/OpenCode-Next-for-DSH
224
244
  ```
225
245
 
226
- *(For Web/Headless profiles, replace `--profile desktop` with `--profile web`.)*
246
+ *(For Web/Headless profiles, replace `--profile desktop` with `--profile web`. Restart DSH after installing, then open **Settings → OpenCode-Next** to sign in or configure your OpenCode Go API key.)*
227
247
 
228
248
  ### Installing from a local tarball
229
249
 
package/README.zh-TW.md CHANGED
@@ -1,11 +1,18 @@
1
+ <p align="center">
2
+ <img src="./assets/banner-zh-TW.png" alt="OpenCode-Next 繁體中文橫幅" width="100%" />
3
+ </p>
4
+
5
+ [![CI](https://github.com/kizaki-R/OpenCode-Next-for-DSH/actions/workflows/test.yml/badge.svg)](https://github.com/kizaki-R/OpenCode-Next-for-DSH/actions/workflows/test.yml)
6
+ [![npm version](https://img.shields.io/npm/v/opencode-next?color=blue)](https://www.npmjs.com/package/opencode-next)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)
8
+ [![DeepSeek Harness](https://img.shields.io/badge/DSH-0.1.5%20~%200.2.x-orange.svg)](https://deepseek.com/harness/)
9
+
1
10
  # OpenCode-Next(`opencode-next`)
2
11
 
3
12
  [English](./README.md) | 繁體中文
4
13
 
5
14
  DeepSeek Harness(DSH)的 OpenCode OAuth 與 OpenCode Go 提供者外掛。
6
15
 
7
- > 衍生自 [FishBottle7/opencode2dsh](https://github.com/FishBottle7/opencode2dsh)。為維持既有設定檔、帳號與歷史紀錄相容,內部套件與 provider 識別碼(`opencode-next`、`opencode-next`、`opencode-go-subscription`)維持不變。
8
-
9
16
  直連 OpenCode 官方推論端點(`/inference/openai/v1` 與 `/inference/go/v1`),避免舊版 `/zen` 匿名通道的 403 `FreeTierError` 與單一 IP 429 限流。
10
17
 
11
18
  ---
@@ -115,19 +122,32 @@ DeepSeek Harness(DSH)的 OpenCode OAuth 與 OpenCode Go 提供者外掛。
115
122
 
116
123
  ## 安裝至 DSH Profile
117
124
 
118
- ### 方式 1:透過 DSH CLI 安裝(一般使用者推薦)
125
+ ### 方式 1:透過 DSH 桌面版介面直接安裝(最簡單)
126
+
127
+ 1. 在 DSH 左側點開 **「插件」→「添加插件」**。
128
+ 2. 輸入套件名稱 **`opencode-next`**(安裝源選 npm 官方源),或直接貼上 GitHub 倉庫網址 **`https://github.com/kizaki-R/OpenCode-Next-for-DSH`**(亦支援本地資料夾路徑)。
129
+ 3. 點擊 **「安裝」** 並重啟 DSH,即可在 **「設定 → OpenCode-Next」** 登入免費帳號或設定 OpenCode Go API Key。
130
+
131
+ ### 方式 2:透過 DSH CLI 安裝
119
132
 
120
133
  ```bash
121
- # 從 npm 安裝(發佈後)
134
+ # 從 npm 安裝
122
135
  dsh plugin --profile desktop add opencode-next
136
+ ```
137
+
138
+ 其他安裝來源:
139
+
140
+ ```bash
141
+ # 從 GitHub Release 下載安裝
142
+ dsh plugin --profile desktop add https://github.com/kizaki-R/OpenCode-Next-for-DSH/releases/download/v1.0.0/opencode-next-1.0.0.tgz
123
143
 
124
- # 或直接從 GitHub 安裝
144
+ # 或直接從 GitHub 倉庫安裝
125
145
  dsh plugin --profile desktop add github:kizaki-R/OpenCode-Next-for-DSH
126
146
  ```
127
147
 
128
- *(若為 Web 或 Headless 模式,將 `--profile desktop` 改為 `--profile web`。)*
148
+ *(若為 Web 或 Headless 模式,將 `--profile desktop` 改為 `--profile web`。安裝後重啟 DSH,即可在「設定 → OpenCode-Next」登入免費帳號或設定 OpenCode Go API Key。)*
129
149
 
130
- ### 方式 2:本地目錄軟連結(開發者用)
150
+ ### 方式 3:本地目錄軟連結(開發者用)
131
151
 
132
152
  在 `%USERPROFILE%\.dsh\profiles\desktop\package.json` 的 `dependencies` 中加入:
133
153
  ```json
@@ -145,7 +165,7 @@ dsh plugin --profile desktop add github:kizaki-R/OpenCode-Next-for-DSH
145
165
  }
146
166
  ```
147
167
 
148
- ### 方式 3:使用打包後的 tgz 安裝(離線分發)
168
+ ### 方式 4:使用打包後的 tgz 安裝(離線分發)
149
169
 
150
170
  ```bash
151
171
  dsh plugin --profile desktop add ./opencode-next-1.0.0.tgz
@@ -365,4 +385,4 @@ OpenCode 免費模型的 `Free usage limit reached` 主要依**網路出口 IP**
365
385
  - **正式選單門檻與依目錄自動圖片支援**:僅結構合格且狀態有效之 Go 對話模型會進入正式選單。圖片輸入(透過 DSH `attachments` 服務轉成 `image_url` data URI)會依上游 Go 目錄宣告自動開放給 `modalities.input` 含 `image`/`image/*` 的入選模型(含未來上架的新視覺模型,實際可否辨識以上游端點為準);未宣告圖片輸入或模態未知之模型維持純文字,於附圖送出前直接拒絕(絕不靜默丟圖繼續送純文字,也不退回免費 OAuth),且不開放影片、音訊或 PDF 等其他檔案附件。
366
386
 
367
387
  ## 授權條款與來源聲明
368
- MIT License © 2026(見 [LICENSE](./LICENSE))。本專案衍生自原作者 [FishBottle7/opencode2dsh](https://github.com/FishBottle7/opencode2dsh)(`Copyright (c) 2026 FishBottle7`),並保留內部識別名稱以維持既有用戶設定相容。
388
+ MIT License © 2026(見 [LICENSE](./LICENSE))。本專案衍生自原作者 [FishBottle7/opencode2dsh](https://github.com/FishBottle7/opencode2dsh)(`Copyright (c) 2026 FishBottle7`)。
package/lib/config.js CHANGED
@@ -144,18 +144,18 @@ export const Config = Schema.object({
144
144
  .description('Send inference without your account credential, using the public anonymous lane. Off by default. Unofficial usage the upstream does not promise to keep working.'),
145
145
 
146
146
  goSubscription: Schema.object({
147
- enabled: Schema.boolean().default(false),
147
+ enabled: Schema.boolean().default(true),
148
148
  providerId: Schema.string().default(GO_PROVIDER),
149
149
  providerName: Schema.string().default(GO_PROVIDER_NAME),
150
150
  credentialRef: Schema.string().default(GO_CREDENTIAL_ENV_VAR),
151
151
  cachePath: Schema.string().default('')
152
152
  }).default({
153
- enabled: false,
153
+ enabled: true,
154
154
  providerId: GO_PROVIDER,
155
155
  providerName: GO_PROVIDER_NAME,
156
156
  credentialRef: GO_CREDENTIAL_ENV_VAR,
157
157
  cachePath: ''
158
- }).description('Opt in to the independent OpenCode Go subscription provider (off by default). Resolves the Console Personal API Key via DSH credential service or environment variable; never stores raw API keys.')
158
+ }).description('Independent OpenCode Go subscription provider (enabled by default; set enabled: false to disable). Resolves the Console Personal API Key via DSH credential service or environment variable; never stores raw API keys.')
159
159
  });
160
160
 
161
161
  export function resolveConfig(raw = {}) {
@@ -190,7 +190,7 @@ export function resolveConfig(raw = {}) {
190
190
  enabled: raw.anonymousChannel?.enabled === true
191
191
  },
192
192
  goSubscription: {
193
- enabled: raw.goSubscription?.enabled === true,
193
+ enabled: raw.goSubscription?.enabled !== false,
194
194
  providerId: raw.goSubscription?.providerId || GO_PROVIDER,
195
195
  providerName: raw.goSubscription?.providerName || GO_PROVIDER_NAME,
196
196
  credentialRef: raw.goSubscription?.credentialRef || GO_CREDENTIAL_ENV_VAR,
package/lib/ui.js CHANGED
@@ -230,7 +230,7 @@ window.__ModuleLoader__.load({
230
230
  goWindowUnavailable: '–',
231
231
  goExtraUsageWarn: '⚠ If Extra Usage is enabled in Console, overage may bill your workspace balance.',
232
232
  goPreviewHint: 'Verified Go chat/tool models are published to the DSH picker (image input is enabled only for Go endpoint-verified image models; unverified catalog vision, video, reasoning, and non-chat capabilities are not advertised).',
233
- goDisabledHint: 'Disabled by default so existing opencode-next behavior stays unchanged. Enable goSubscription.enabled in plugin config and provide an OpenCode Console Personal API Key via DSH credentials or OPENCODE_GO_API_KEY.',
233
+ goDisabledHint: 'OpenCode Go is disabled in plugin config (goSubscription.enabled: false). Re-enable it and provide an OpenCode Console Personal API Key via DSH credentials or OPENCODE_GO_API_KEY.',
234
234
  goRefresh: 'Re-verify',
235
235
  goRefreshing: 'Verifying…',
236
236
  goClear: 'Clear cache',
@@ -559,7 +559,7 @@ window.__ModuleLoader__.load({
559
559
  goWindowUnavailable: '–',
560
560
  goExtraUsageWarn: '⚠ 若 Console 开启了 Extra Usage,超出订阅额度后可能会扣款工作区余额。',
561
561
  goPreviewHint: '已验证的 Go 对话/工具模型会发布到 DSH 选单(仅已实测通过 Go 端点的模型开放图片输入;未验证的图片、影片、推理与非对话协议能力不予开放)。',
562
- goDisabledHint: '默认关闭以保持既有 opencode-next 行为不变。如需启用,请在插件设置打开 goSubscription.enabled,并通过 DSH 凭证服务或 OPENCODE_GO_API_KEY 提供 OpenCode Console Personal API Key。',
562
+ goDisabledHint: '已在插件设置中关闭(goSubscription.enabled: false)。如需启用,请重新开启并通过 DSH 凭证服务或 OPENCODE_GO_API_KEY 提供 OpenCode Console Personal API Key。',
563
563
  goRefresh: '重新验证',
564
564
  goRefreshing: '验证中…',
565
565
  goClear: '清除缓存',
@@ -888,7 +888,7 @@ window.__ModuleLoader__.load({
888
888
  goWindowUnavailable: '–',
889
889
  goExtraUsageWarn: '⚠ 若 Console 開啟 Extra Usage,超出訂閱額度後可能會扣款工作區餘額。',
890
890
  goPreviewHint: '已驗證的 Go 對話/工具模型會發佈到 DSH 選單(僅已實測通過 Go 端點的模型開放圖片輸入;未驗證的圖片、影片、推理與非對話協定能力不予開放)。',
891
- goDisabledHint: '預設關閉以保持既有 opencode-next 行為不變。如需啟用,請在外掛設定開啟 goSubscription.enabled,並透過 DSH 憑證服務或 OPENCODE_GO_API_KEY 提供 OpenCode Console Personal API Key。',
891
+ goDisabledHint: '已在外掛設定中停用(goSubscription.enabled: false)。如需啟用,請重新開啟並透過 DSH 憑證服務或 OPENCODE_GO_API_KEY 提供 OpenCode Console Personal API Key。',
892
892
  goRefresh: '重新驗證',
893
893
  goRefreshing: '驗證中…',
894
894
  goClear: '清除快取',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-next",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "OpenCode-Next: Native OpenCode OAuth & OpenCode Go provider for DeepSeek Harness (DSH)",
5
5
  "repository": {
6
6
  "type": "git",