magpie-plugin-doubao-cli-acp 0.2.5 → 0.2.6

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 CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.6 — 2026-12-05
4
+
5
+ - provider 的 `api` 从自定义 scheme `doubao-cli://local` 改成
6
+ `https://doubao-cli.invalid/v1`:magpie 网关会校验 provider 协议,自定义 scheme
7
+ 在部分路径上被拒成 `protocol must be http:, https: or s3:`。请求仍然全部由插件的
8
+ fetch 接管,`.invalid` 是保留 TLD,不会被解析或连上。
9
+
3
10
  ## 0.2.5 — 2026-12-05
4
11
 
5
12
  - 图标改用官方「豆包工作」App 的 1024px 原图:从 `DoubaoWork_Arm64_2.39.21.dmg`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "magpie-plugin-doubao-cli-acp",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Doubao CLI (豆包 CLI) as a magpie provider through ACP v1: drive the real local `doubao acp serve` agent over OpenAI Responses, with plan usage read from the Doubao web session.",
5
5
  "type": "module",
6
6
  "main": "./index.mjs",
package/src/constants.mjs CHANGED
@@ -17,8 +17,15 @@ export const NPM_CHAT = "@ai-sdk/openai-compatible"
17
17
  /** 默认走 OpenAI Responses;agent 客户端(Codex)原生用这套 */
18
18
  export const NPM = NPM_RESPONSES
19
19
 
20
- /** 只是给 magpie 看的占位地址,fetch 会接管 */
21
- export const API_BASE = "doubao-cli://local"
20
+ /**
21
+ * 给 magpie 看的占位地址,请求都由插件的 fetch 接管。
22
+ *
23
+ * 必须是 http(s):magpie 的网关会校验 provider 的协议,自定义 scheme
24
+ * (早先用的 `doubao-cli://local`)在部分路径上会被拒成
25
+ * `protocol must be http:, https: or s3:`。`.invalid` 是保留 TLD,
26
+ * 永远不会被真的解析或连上。
27
+ */
28
+ export const API_BASE = "https://doubao-cli.invalid/v1"
22
29
 
23
30
  /** 未登录时也要有模型,否则卡片显示 0 models */
24
31
  export const DEFAULT_MODEL_ID = "auto"
package/src/pure.mjs CHANGED
@@ -4,6 +4,7 @@
4
4
 
5
5
  import path from "node:path"
6
6
  import {
7
+ API_BASE,
7
8
  DEFAULT_CONTEXT_WINDOW,
8
9
  DEFAULT_MODEL_ID,
9
10
  DEFAULT_OUTPUT_TOKENS,
@@ -29,7 +30,7 @@ export function modelEntry(id, name, { contextWindow = DEFAULT_CONTEXT_WINDOW, o
29
30
  return {
30
31
  id,
31
32
  name: name || id,
32
- api: { id, url: "doubao-cli://local", npm },
33
+ api: { id, url: API_BASE, npm },
33
34
  status: "active",
34
35
  cost: { input: 0, output: 0, cache: { read: 0, write: 0 } },
35
36
  limit: { context: contextWindow, output: outputTokens },