mslxdff 0.1.163 → 0.1.169
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/package.json +1 -1
- package/src/anthropic/translate.js +397 -0
- package/src/anthropic/web-search.js +361 -0
- package/src/api-kind.js +31 -0
- package/src/chat-pipeline/auto-race.js +8 -0
- package/src/chat-pipeline/empty-turn.js +28 -0
- package/src/chat-pipeline/index.js +8 -4
- package/src/chat-pipeline/serial-trial.js +8 -1
- package/src/claude-desktop/apply.js +64 -0
- package/src/claude-desktop/doctor.js +146 -0
- package/src/claude-desktop/slots.js +86 -0
- package/src/cli/commands/claude-desktop.js +264 -0
- package/src/cli/commands/model/list-providers.js +1 -1
- package/src/cli/commands/provider/index.js +7 -0
- package/src/cli/commands/provider/models.js +3 -0
- package/src/cli/commands/provider/raccoon-login.js +131 -0
- package/src/cli/commands/provider/raccoon-quota.js +109 -0
- package/src/cli/commands/sync.js +80 -2
- package/src/cli/format.js +1 -1
- package/src/cli/help.js +3 -0
- package/src/cli/index.js +2 -0
- package/src/cli/provider-row.js +2 -2
- package/src/model-capabilities/parse.js +1 -1
- package/src/model-trace.js +2 -1
- package/src/providers/classify.js +1 -1
- package/src/providers/dispatcher.js +2 -2
- package/src/providers/keyring.js +1 -1
- package/src/providers/model-id.js +10 -0
- package/src/providers/raccoon/account-store.js +216 -0
- package/src/providers/raccoon/auth.js +67 -0
- package/src/providers/raccoon/chat.js +207 -0
- package/src/providers/raccoon/const.js +111 -0
- package/src/providers/raccoon/credits.js +161 -0
- package/src/providers/raccoon/envelope.js +23 -0
- package/src/providers/raccoon/headers.js +45 -0
- package/src/providers/raccoon/index.js +216 -0
- package/src/providers/raccoon/login.js +195 -0
- package/src/providers/raccoon/models.js +160 -0
- package/src/providers/raccoon/qr-codewords.js +115 -0
- package/src/providers/raccoon/qr.js +236 -0
- package/src/providers/raccoon/sse.js +135 -0
- package/src/providers/registry.js +5 -0
- package/src/providers/share-keys.js +1 -1
- package/src/providers/workbuddy/models.js +29 -14
- package/src/providers/workbuddy/payload.js +34 -0
- package/src/routes/chat/exhausted-handler.js +4 -4
- package/src/routes/chat/relay-pipeline.js +6 -7
- package/src/routes/index.js +13 -0
- package/src/routes/messages-route.js +401 -0
- package/src/routes/responses-route.js +2 -2
- package/src/runtime/bootstrap.js +5 -0
- package/src/runtime/broadband.js +4 -1
- package/src/runtime/provider-gate.js +3 -1
- package/src/runtime/raccoon-checkin.js +126 -0
- package/src/state/provider-config.js +1 -1
- package/src/sync-claude-desktop.js +234 -0
- package/src/sync-claude.js +152 -0
- package/src/talk-full.js +2 -2
- package/src/talk-log.js +9 -6
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// raccoon 模型目录:上游 `model_catalog` 解析 + 兜底目录 + 积分倍率展示名 + allowlist 补齐。
|
|
2
|
+
// 倍率是这家供应商的**成本唯一载体**(积分制,不是免费额度),所以它在模型名与列表里都必须出现:
|
|
3
|
+
// 0 → 「免费」;1 → 也显示 `x1`(省略会让用户以为「没倍率=不扣分」);促销 → `x0.2→x0.1`。
|
|
4
|
+
import {
|
|
5
|
+
RACCOON_FALLBACK_MODELS,
|
|
6
|
+
RACCOON_REQUEST_TIMEOUT_MS,
|
|
7
|
+
raccoonModelCatalogUrl,
|
|
8
|
+
} from "./const.js";
|
|
9
|
+
import { raccoonAuthHeaders } from "./headers.js";
|
|
10
|
+
import { parseRaccoonEnvelope } from "./envelope.js";
|
|
11
|
+
import { loadProviderAllowedModels, saveProviderAllowedModels } from "../../state/schemas/allowlist.js";
|
|
12
|
+
import { joinModelId } from "../model-id.js";
|
|
13
|
+
|
|
14
|
+
const pickString = (src, keys) => {
|
|
15
|
+
for (const k of keys) {
|
|
16
|
+
const v = src?.[k];
|
|
17
|
+
if (typeof v === "string" && v.trim().length > 0) return v.trim();
|
|
18
|
+
}
|
|
19
|
+
return "";
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const pickNumber = (src, keys) => {
|
|
23
|
+
for (const k of keys) {
|
|
24
|
+
const v = src?.[k];
|
|
25
|
+
if (typeof v === "number" && Number.isFinite(v)) return v;
|
|
26
|
+
if (typeof v === "string" && /^-?\d+(\.\d+)?$/.test(v.trim())) return Number(v.trim());
|
|
27
|
+
}
|
|
28
|
+
return undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const pickBool = (src, keys) => {
|
|
32
|
+
for (const k of keys) {
|
|
33
|
+
const v = src?.[k];
|
|
34
|
+
if (typeof v === "boolean") return v;
|
|
35
|
+
}
|
|
36
|
+
return undefined;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** 兜底目录(const.js 的静态表,字段名已归一)。 */
|
|
40
|
+
export function raccoonFallbackModels() {
|
|
41
|
+
return RACCOON_FALLBACK_MODELS.map((m) => ({ ...m }));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** 单条目录条目:字段名容错(缺字段即省略,不猜、不填假值)。 */
|
|
45
|
+
function parseRaccoonModelEntry(raw) {
|
|
46
|
+
if (typeof raw !== "object" || raw === null || Array.isArray(raw)) return null;
|
|
47
|
+
const id = pickString(raw, ["id", "modelId", "model_id", "modelName", "name"]);
|
|
48
|
+
if (!id) return null;
|
|
49
|
+
const model = { id };
|
|
50
|
+
const name = pickString(raw, ["modelName", "name", "displayName", "description"]);
|
|
51
|
+
if (name) model.name = name;
|
|
52
|
+
const ctx = pickNumber(raw, ["contextWindow", "context_window", "contextLength", "context_length"]);
|
|
53
|
+
if (ctx !== undefined && ctx > 0) model.contextWindow = ctx;
|
|
54
|
+
const maxTokens = pickNumber(raw, ["maxTokens", "max_tokens", "maxCompletionTokens"]);
|
|
55
|
+
if (maxTokens !== undefined && maxTokens > 0) model.maxTokens = maxTokens;
|
|
56
|
+
const img = pickBool(raw, ["supportsImage", "supports_image", "supportsVision"]);
|
|
57
|
+
if (img !== undefined) model.supportsImage = img;
|
|
58
|
+
const eff = pickNumber(raw, ["effectiveMultiplier", "effective_multiplier", "multiplier", "costMultiplier"]);
|
|
59
|
+
if (eff !== undefined && eff >= 0) model.multiplier = eff;
|
|
60
|
+
const base = pickNumber(raw, ["baseMultiplier", "base_multiplier"]);
|
|
61
|
+
if (base !== undefined && base > 0) model.baseMultiplier = base;
|
|
62
|
+
return model;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** 目录信封 → 条目数组。兼容 `data` 为数组、`data.models`、`data.list`、`data.items` 四种形状。 */
|
|
66
|
+
export function parseRaccoonCatalog(data) {
|
|
67
|
+
const list = Array.isArray(data)
|
|
68
|
+
? data
|
|
69
|
+
: Array.isArray(data?.models)
|
|
70
|
+
? data.models
|
|
71
|
+
: Array.isArray(data?.list)
|
|
72
|
+
? data.list
|
|
73
|
+
: Array.isArray(data?.items)
|
|
74
|
+
? data.items
|
|
75
|
+
: [];
|
|
76
|
+
const out = [];
|
|
77
|
+
const seen = new Set();
|
|
78
|
+
for (const raw of list) {
|
|
79
|
+
const m = parseRaccoonModelEntry(raw);
|
|
80
|
+
if (!m || seen.has(m.id)) continue;
|
|
81
|
+
seen.add(m.id);
|
|
82
|
+
out.push(m);
|
|
83
|
+
}
|
|
84
|
+
return out;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/** 倍率文案:0 → 免费;促销 → `x基→x实`;其余 → `x实`(含 x1)。 */
|
|
88
|
+
export function raccoonMultiplierLabel(model) {
|
|
89
|
+
const eff = typeof model?.multiplier === "number" ? model.multiplier : undefined;
|
|
90
|
+
if (eff === undefined) return "";
|
|
91
|
+
if (eff === 0) return "免费";
|
|
92
|
+
const fmt = (v) => String(Number(v.toFixed(4)));
|
|
93
|
+
const base = typeof model?.baseMultiplier === "number" ? model.baseMultiplier : undefined;
|
|
94
|
+
if (base !== undefined && base > eff) return `x${fmt(base)}→x${fmt(eff)}`;
|
|
95
|
+
return `x${fmt(eff)}`;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** 列表/模型卡展示名:`<名字或 id> · <倍率>`(无倍率时省略后缀)。 */
|
|
99
|
+
export function raccoonDisplayName(model) {
|
|
100
|
+
const base = model?.name || model?.id || "";
|
|
101
|
+
const label = raccoonMultiplierLabel(model);
|
|
102
|
+
return label ? `${base} · ${label}` : base;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** 拉上游目录;失败/空目录返回 null(调用方回落兜底表)。 */
|
|
106
|
+
export async function fetchRaccoonModelCatalog({
|
|
107
|
+
credential,
|
|
108
|
+
fetchImpl = fetch,
|
|
109
|
+
env = process.env,
|
|
110
|
+
timeoutMs = RACCOON_REQUEST_TIMEOUT_MS,
|
|
111
|
+
} = {}) {
|
|
112
|
+
if (!credential?.access_token) return null;
|
|
113
|
+
try {
|
|
114
|
+
const res = await fetchImpl(raccoonModelCatalogUrl(), {
|
|
115
|
+
method: "GET",
|
|
116
|
+
headers: raccoonAuthHeaders(credential, { env }),
|
|
117
|
+
signal: AbortSignal.timeout(timeoutMs),
|
|
118
|
+
});
|
|
119
|
+
if (!res.ok) return null;
|
|
120
|
+
const envelope = parseRaccoonEnvelope(await res.json(), res.status);
|
|
121
|
+
if (envelope.code !== 0) return null;
|
|
122
|
+
const models = parseRaccoonCatalog(envelope.data);
|
|
123
|
+
return models.length > 0 ? models : null;
|
|
124
|
+
} catch {
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/** 上游优先、兜底次之。返回 `{ models, source }`,source ∈ upstream|fallback。 */
|
|
130
|
+
export async function listRaccoonModels({ credential, fetchImpl, env } = {}) {
|
|
131
|
+
const upstream = await fetchRaccoonModelCatalog({ credential, fetchImpl, env });
|
|
132
|
+
if (upstream) return { models: upstream, source: "upstream" };
|
|
133
|
+
return { models: raccoonFallbackModels(), source: "fallback" };
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/** 登录后把兜底目录 id 只增不减并入 allowlist(避免「登录成功却处处 403」)。 */
|
|
137
|
+
export function seedRaccoonAllowlist({ ids, file } = {}) {
|
|
138
|
+
const opts = file ? { file } : {};
|
|
139
|
+
const target = ids || RACCOON_FALLBACK_MODELS.map((m) => m.id);
|
|
140
|
+
const cur = loadProviderAllowedModels("raccoon", opts);
|
|
141
|
+
const added = target.filter((m) => !cur.includes(m));
|
|
142
|
+
if (added.length) saveProviderAllowedModels("raccoon", [...cur, ...added], opts);
|
|
143
|
+
return { allowed: [...cur, ...added], added };
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** 对外目录条目(`/v1/models` 与 CLI models 共用形状)。 */
|
|
147
|
+
export function buildRaccoonModelList({ id = "raccoon", models } = {}) {
|
|
148
|
+
const list = models || raccoonFallbackModels();
|
|
149
|
+
return list.map((m) => ({
|
|
150
|
+
id: joinModelId(id, m.id),
|
|
151
|
+
object: "model",
|
|
152
|
+
owned_by: "raccoon",
|
|
153
|
+
name: raccoonDisplayName(m),
|
|
154
|
+
context_length: m.contextWindow,
|
|
155
|
+
max_tokens: m.maxTokens,
|
|
156
|
+
supports_image: m.supportsImage,
|
|
157
|
+
multiplier: m.multiplier,
|
|
158
|
+
mark: raccoonMultiplierLabel(m) || undefined,
|
|
159
|
+
}));
|
|
160
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
// raccoon 二维码编码的「码字层」:byte 模式位流 → RS 纠错 → 块切分与交错。
|
|
2
|
+
// 只覆盖 byte 模式与版本 1–10(v10-M 容量 213 字节,够装下扫码登录 URL)。
|
|
3
|
+
// 纠错级固定为 M(约 15% 冗余)——终端字符画本身易被拍照角度影响,M 是稳妥档。
|
|
4
|
+
const DATA_CODEWORDS = [0, 16, 28, 44, 64, 86, 108, 124, 154, 182, 216];
|
|
5
|
+
|
|
6
|
+
/** 纠错级 M 的块结构(QR 规范表):每块 ecPerBlock 个纠错码字 + 若干 [块数, 每块数据码字]。 */
|
|
7
|
+
const EC_BLOCKS_M = [
|
|
8
|
+
null,
|
|
9
|
+
{ ecPerBlock: 10, groups: [[1, 16]] },
|
|
10
|
+
{ ecPerBlock: 16, groups: [[1, 28]] },
|
|
11
|
+
{ ecPerBlock: 26, groups: [[1, 44]] },
|
|
12
|
+
{ ecPerBlock: 18, groups: [[2, 32]] },
|
|
13
|
+
{ ecPerBlock: 24, groups: [[2, 43]] },
|
|
14
|
+
{ ecPerBlock: 16, groups: [[4, 27]] },
|
|
15
|
+
{ ecPerBlock: 18, groups: [[4, 31]] },
|
|
16
|
+
{ ecPerBlock: 22, groups: [[2, 38], [2, 39]] },
|
|
17
|
+
{ ecPerBlock: 22, groups: [[3, 36], [2, 37]] },
|
|
18
|
+
{ ecPerBlock: 26, groups: [[4, 43], [1, 44]] },
|
|
19
|
+
];
|
|
20
|
+
|
|
21
|
+
const GF_EXP = new Uint8Array(512);
|
|
22
|
+
const GF_LOG = new Uint8Array(256);
|
|
23
|
+
(() => {
|
|
24
|
+
let x = 1;
|
|
25
|
+
for (let i = 0; i < 255; i++) {
|
|
26
|
+
GF_EXP[i] = x;
|
|
27
|
+
GF_LOG[x] = i;
|
|
28
|
+
x <<= 1;
|
|
29
|
+
if (x & 0x100) x ^= 0x11d; // 本原多项式 x^8+x^4+x^3+x^2+1
|
|
30
|
+
}
|
|
31
|
+
for (let i = 255; i < 512; i++) GF_EXP[i] = GF_EXP[i - 255];
|
|
32
|
+
})();
|
|
33
|
+
|
|
34
|
+
const gfMul = (a, b) => (a === 0 || b === 0 ? 0 : GF_EXP[GF_LOG[a] + GF_LOG[b]]);
|
|
35
|
+
|
|
36
|
+
function polyMul(a, b) {
|
|
37
|
+
const out = new Array(a.length + b.length - 1).fill(0);
|
|
38
|
+
for (let i = 0; i < a.length; i++) for (let j = 0; j < b.length; j++) out[i + j] ^= gfMul(a[i], b[j]);
|
|
39
|
+
return out;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** 生成多项式连乘 (x - α^0)…(x - α^(ecCount-1)),再做多项式除法取余数即纠错码字。 */
|
|
43
|
+
function rsEncode(data, ecCount) {
|
|
44
|
+
const gen = qrEcGeneratorPoly(ecCount);
|
|
45
|
+
// qrEcGeneratorPoly 定义在文件末尾(函数声明提升,调用点在前无妨)
|
|
46
|
+
const buf = [...data, ...new Array(ecCount).fill(0)];
|
|
47
|
+
for (let i = 0; i < data.length; i++) {
|
|
48
|
+
const coef = buf[i];
|
|
49
|
+
if (coef === 0) continue;
|
|
50
|
+
for (let j = 0; j < gen.length; j++) buf[i + j] ^= gfMul(gen[j], coef);
|
|
51
|
+
}
|
|
52
|
+
return buf.slice(data.length);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** 选能装下 byteLength 字节的最小版本;超出 v10 容量返回 undefined。 */
|
|
56
|
+
export function pickQrVersion(byteLength) {
|
|
57
|
+
for (let version = 1; version <= 10; version++) {
|
|
58
|
+
const capacityBits = DATA_CODEWORDS[version] * 8;
|
|
59
|
+
const overheadBits = 4 + (version <= 9 ? 8 : 16); // 模式指示符 + 字符计数
|
|
60
|
+
if (overheadBits + byteLength * 8 <= capacityBits) return version;
|
|
61
|
+
}
|
|
62
|
+
return undefined;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* byte 模式位流 → 最终码字序列(数据块与纠错块按规范交错)。
|
|
67
|
+
* 位流 = 0100(byte 模式)+ 字符计数 + 数据字节 + 终止符 + 字节对齐 + 0xEC/0x11 补齐。
|
|
68
|
+
*/
|
|
69
|
+
export function buildQrCodewords(bytes, version) {
|
|
70
|
+
const blocks = EC_BLOCKS_M[version];
|
|
71
|
+
if (!blocks) throw new Error(`不支持的二维码版本 ${version}`);
|
|
72
|
+
const capacityBits = DATA_CODEWORDS[version] * 8;
|
|
73
|
+
const bits = [];
|
|
74
|
+
const pushBits = (value, length) => {
|
|
75
|
+
for (let i = length - 1; i >= 0; i--) bits.push((value >> i) & 1);
|
|
76
|
+
};
|
|
77
|
+
pushBits(4, 4);
|
|
78
|
+
pushBits(bytes.length, version <= 9 ? 8 : 16);
|
|
79
|
+
for (const byte of bytes) pushBits(byte, 8);
|
|
80
|
+
pushBits(0, Math.min(4, capacityBits - bits.length));
|
|
81
|
+
while (bits.length % 8 !== 0) bits.push(0);
|
|
82
|
+
for (let i = 0; bits.length < capacityBits; i++) pushBits([0xec, 0x11][i % 2], 8);
|
|
83
|
+
|
|
84
|
+
const dataCodewords = [];
|
|
85
|
+
for (let i = 0; i < bits.length; i += 8) {
|
|
86
|
+
let byte = 0;
|
|
87
|
+
for (let j = 0; j < 8; j++) byte = (byte << 1) | bits[i + j];
|
|
88
|
+
dataCodewords.push(byte);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
const dataBlocks = [];
|
|
92
|
+
const ecBlocks = [];
|
|
93
|
+
let offset = 0;
|
|
94
|
+
for (const [count, perBlock] of blocks.groups) {
|
|
95
|
+
for (let b = 0; b < count; b++) {
|
|
96
|
+
const block = dataCodewords.slice(offset, offset + perBlock);
|
|
97
|
+
offset += perBlock;
|
|
98
|
+
dataBlocks.push(block);
|
|
99
|
+
ecBlocks.push(rsEncode(block, blocks.ecPerBlock));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const out = [];
|
|
104
|
+
const maxDataLen = Math.max(...dataBlocks.map((b) => b.length));
|
|
105
|
+
for (let i = 0; i < maxDataLen; i++) for (const block of dataBlocks) if (i < block.length) out.push(block[i]);
|
|
106
|
+
for (let i = 0; i < blocks.ecPerBlock; i++) for (const block of ecBlocks) out.push(block[i]);
|
|
107
|
+
return out;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/** 纠错生成多项式系数(QR 规范定义)。导出供单测用已知向量锚定 GF 运算。 */
|
|
111
|
+
export function qrEcGeneratorPoly(degree) {
|
|
112
|
+
let gen = [1];
|
|
113
|
+
for (let i = 0; i < degree; i++) gen = polyMul(gen, [1, GF_EXP[i]]);
|
|
114
|
+
return gen;
|
|
115
|
+
}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
// raccoon 扫码登录用的最小二维码「矩阵层」+ 终端渲染(零依赖,不引入 npm 包)。
|
|
2
|
+
// 码字计算在 qr-codewords.js;本文件只负责功能图案、码字摆放、掩码择优与字符画输出。
|
|
3
|
+
// 参考:dsh-our-free-model 的 vendor/channel-pack/src/raccoon-qr.ts(同为无依赖自写)。
|
|
4
|
+
//
|
|
5
|
+
// 与渲染分离:encodeQr() 出矩阵,renderTerminal() 出字符串;任何一步失败都返回 undefined,
|
|
6
|
+
// 由调用方退回「只打印 URL」——用户拿不到字符画也必须能登录。
|
|
7
|
+
import { buildQrCodewords, pickQrVersion } from "./qr-codewords.js";
|
|
8
|
+
|
|
9
|
+
/** 掩码条件(QR 规范 8 条),索引即掩码号。 */
|
|
10
|
+
function maskBit(mask, x, y) {
|
|
11
|
+
switch (mask) {
|
|
12
|
+
case 0: return (x + y) % 2 === 0;
|
|
13
|
+
case 1: return y % 2 === 0;
|
|
14
|
+
case 2: return x % 3 === 0;
|
|
15
|
+
case 3: return (x + y) % 3 === 0;
|
|
16
|
+
case 4: return (Math.floor(x / 3) + Math.floor(y / 2)) % 2 === 0;
|
|
17
|
+
case 5: return ((x * y) % 2) + ((x * y) % 3) === 0;
|
|
18
|
+
case 6: return (((x * y) % 2) + ((x * y) % 3)) % 2 === 0;
|
|
19
|
+
default: return (((x + y) % 2) + ((x * y) % 3)) % 2 === 0;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** 校正图案中心坐标(规范表算法,与参考实现一致)。 */
|
|
24
|
+
function alignmentPositions(version, size) {
|
|
25
|
+
if (version === 1) return [];
|
|
26
|
+
const numAlign = Math.floor(version / 7) + 2;
|
|
27
|
+
const step = Math.ceil((version * 4 + 4) / (numAlign * 2 - 2)) * 2;
|
|
28
|
+
const result = [6];
|
|
29
|
+
for (let pos = size - 7; result.length < numAlign; pos -= step) result.splice(1, 0, pos);
|
|
30
|
+
return result;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
class Matrix {
|
|
34
|
+
constructor(size) {
|
|
35
|
+
this.size = size;
|
|
36
|
+
this.modules = Array.from({ length: size }, () => new Array(size).fill(false));
|
|
37
|
+
this.isFunction = Array.from({ length: size }, () => new Array(size).fill(false));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
set(x, y, dark) {
|
|
41
|
+
this.modules[y][x] = dark;
|
|
42
|
+
this.isFunction[y][x] = true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
drawFunctionPatterns(version) {
|
|
46
|
+
const { size } = this;
|
|
47
|
+
for (let i = 0; i < size; i++) {
|
|
48
|
+
this.set(6, i, i % 2 === 0); // 竖向定时
|
|
49
|
+
this.set(i, 6, i % 2 === 0); // 横向定时
|
|
50
|
+
}
|
|
51
|
+
for (const [x, y] of [[3, 3], [size - 4, 3], [3, size - 4]]) this.drawFinder(x, y);
|
|
52
|
+
const positions = alignmentPositions(version, size);
|
|
53
|
+
const n = positions.length;
|
|
54
|
+
for (let i = 0; i < n; i++) {
|
|
55
|
+
for (let j = 0; j < n; j++) {
|
|
56
|
+
const isCorner = (i === 0 && j === 0) || (i === 0 && j === n - 1) || (i === n - 1 && j === 0);
|
|
57
|
+
if (!isCorner) this.drawAlignment(positions[i], positions[j]);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
this.drawFormatBits(0); // 占位;掩码定下后重画
|
|
61
|
+
if (version >= 7) this.drawVersionBits(version);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** 定位图案含分隔带:切比雪夫距离 2 与 4 处为白,其余为黑(参考实现同款判据)。 */
|
|
65
|
+
drawFinder(cx, cy) {
|
|
66
|
+
for (let dy = -4; dy <= 4; dy++) {
|
|
67
|
+
for (let dx = -4; dx <= 4; dx++) {
|
|
68
|
+
const x = cx + dx;
|
|
69
|
+
const y = cy + dy;
|
|
70
|
+
if (x < 0 || x >= this.size || y < 0 || y >= this.size) continue;
|
|
71
|
+
const dist = Math.max(Math.abs(dx), Math.abs(dy));
|
|
72
|
+
this.set(x, y, dist !== 2 && dist !== 4);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
drawAlignment(cx, cy) {
|
|
78
|
+
for (let dy = -2; dy <= 2; dy++) {
|
|
79
|
+
for (let dx = -2; dx <= 2; dx++) this.set(cx + dx, cy + dy, Math.max(Math.abs(dx), Math.abs(dy)) !== 1);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** 格式信息:纠错级 M 的格式位 = 00,BCH(15,5) 校验 + 固定掩码 0x5412,两处各写一份。 */
|
|
84
|
+
drawFormatBits(mask) {
|
|
85
|
+
const data = (0 << 3) | mask;
|
|
86
|
+
let rem = data;
|
|
87
|
+
for (let i = 0; i < 10; i++) rem = (rem << 1) ^ ((rem >>> 9) * 0x537);
|
|
88
|
+
const bits = ((data << 10) | rem) ^ 0x5412;
|
|
89
|
+
const bit = (i) => ((bits >> i) & 1) === 1;
|
|
90
|
+
for (let i = 0; i <= 5; i++) this.set(8, i, bit(i));
|
|
91
|
+
this.set(8, 7, bit(6));
|
|
92
|
+
this.set(8, 8, bit(7));
|
|
93
|
+
this.set(7, 8, bit(8));
|
|
94
|
+
for (let i = 9; i < 15; i++) this.set(14 - i, 8, bit(i));
|
|
95
|
+
for (let i = 0; i < 8; i++) this.set(this.size - 1 - i, 8, bit(i));
|
|
96
|
+
for (let i = 8; i < 15; i++) this.set(8, this.size - 15 + i, bit(i));
|
|
97
|
+
this.set(8, this.size - 8, true); // 固定黑模块
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
drawVersionBits(version) {
|
|
101
|
+
let rem = version;
|
|
102
|
+
for (let i = 0; i < 12; i++) rem = (rem << 1) ^ ((rem >>> 11) * 0x1f25);
|
|
103
|
+
const bits = (version << 12) | rem;
|
|
104
|
+
for (let i = 0; i < 18; i++) {
|
|
105
|
+
const dark = ((bits >> i) & 1) === 1;
|
|
106
|
+
const a = this.size - 11 + (i % 3);
|
|
107
|
+
const b = Math.floor(i / 3);
|
|
108
|
+
this.set(a, b, dark);
|
|
109
|
+
this.set(b, a, dark);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** 码字按「自右向左、上下往复」的之字形填入非功能模块(跳过第 6 列定时线)。 */
|
|
114
|
+
drawCodewords(codewords) {
|
|
115
|
+
let i = 0;
|
|
116
|
+
for (let right = this.size - 1; right >= 1; right -= 2) {
|
|
117
|
+
if (right === 6) right = 5;
|
|
118
|
+
for (let vert = 0; vert < this.size; vert++) {
|
|
119
|
+
for (let j = 0; j < 2; j++) {
|
|
120
|
+
const x = right - j;
|
|
121
|
+
const upward = ((right + 1) & 2) === 0;
|
|
122
|
+
const y = upward ? this.size - 1 - vert : vert;
|
|
123
|
+
if (!this.isFunction[y][x] && i < codewords.length * 8) {
|
|
124
|
+
this.modules[y][x] = ((codewords[i >>> 3] >> (7 - (i & 7))) & 1) === 1;
|
|
125
|
+
i++;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
applyMask(mask) {
|
|
133
|
+
for (let y = 0; y < this.size; y++) {
|
|
134
|
+
for (let x = 0; x < this.size; x++) {
|
|
135
|
+
if (!this.isFunction[y][x] && maskBit(mask, x, y)) this.modules[y][x] = !this.modules[y][x];
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
clone() {
|
|
141
|
+
const m = new Matrix(this.size);
|
|
142
|
+
for (let y = 0; y < this.size; y++) {
|
|
143
|
+
m.modules[y] = [...this.modules[y]];
|
|
144
|
+
m.isFunction[y] = [...this.isFunction[y]];
|
|
145
|
+
}
|
|
146
|
+
return m;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* 掩码惩罚分(N1 同色连跑 / N2 2×2 同色块 / N4 黑白失衡)。
|
|
151
|
+
* 规范里的 N3(类定位图案)未实现:它只影响选掩码的偏好、不影响码的正确性,
|
|
152
|
+
* 省下的复杂度换更小的文件体积;本用途(终端展示的短 URL)实测不影响识别。
|
|
153
|
+
*/
|
|
154
|
+
penalty() {
|
|
155
|
+
let score = 0;
|
|
156
|
+
const { size } = this;
|
|
157
|
+
for (let y = 0; y < size; y++) {
|
|
158
|
+
let run = 1;
|
|
159
|
+
for (let x = 1; x < size; x++) {
|
|
160
|
+
if (this.modules[y][x] === this.modules[y][x - 1]) run++;
|
|
161
|
+
else { if (run >= 5) score += 3 + (run - 5); run = 1; }
|
|
162
|
+
}
|
|
163
|
+
if (run >= 5) score += 3 + (run - 5);
|
|
164
|
+
}
|
|
165
|
+
for (let x = 0; x < size; x++) {
|
|
166
|
+
let run = 1;
|
|
167
|
+
for (let y = 1; y < size; y++) {
|
|
168
|
+
if (this.modules[y][x] === this.modules[y - 1][x]) run++;
|
|
169
|
+
else { if (run >= 5) score += 3 + (run - 5); run = 1; }
|
|
170
|
+
}
|
|
171
|
+
if (run >= 5) score += 3 + (run - 5);
|
|
172
|
+
}
|
|
173
|
+
for (let y = 0; y < size - 1; y++) {
|
|
174
|
+
for (let x = 0; x < size - 1; x++) {
|
|
175
|
+
const c = this.modules[y][x];
|
|
176
|
+
if (c === this.modules[y][x + 1] && c === this.modules[y + 1][x] && c === this.modules[y + 1][x + 1]) score += 3;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
let dark = 0;
|
|
180
|
+
for (let y = 0; y < size; y++) for (let x = 0; x < size; x++) if (this.modules[y][x]) dark++;
|
|
181
|
+
const total = size * size;
|
|
182
|
+
score += (Math.ceil(Math.abs(dark * 20 - total * 10) / total) - 1) * 10;
|
|
183
|
+
return score;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/** 文本 → 二维码矩阵;过长或任何异常返回 undefined(调用方退回打印 URL)。 */
|
|
188
|
+
export function encodeQr(text) {
|
|
189
|
+
try {
|
|
190
|
+
const bytes = [...Buffer.from(String(text), "utf8")];
|
|
191
|
+
const version = pickQrVersion(bytes.length);
|
|
192
|
+
if (version === undefined) return undefined;
|
|
193
|
+
const codewords = buildQrCodewords(bytes, version);
|
|
194
|
+
const base = new Matrix(version * 4 + 17);
|
|
195
|
+
base.drawFunctionPatterns(version);
|
|
196
|
+
base.drawCodewords(codewords);
|
|
197
|
+
let best;
|
|
198
|
+
let bestScore = Infinity;
|
|
199
|
+
for (let mask = 0; mask < 8; mask++) {
|
|
200
|
+
const candidate = base.clone();
|
|
201
|
+
candidate.applyMask(mask);
|
|
202
|
+
candidate.drawFormatBits(mask);
|
|
203
|
+
const score = candidate.penalty();
|
|
204
|
+
if (score < bestScore) { bestScore = score; best = candidate; }
|
|
205
|
+
}
|
|
206
|
+
return best;
|
|
207
|
+
} catch {
|
|
208
|
+
return undefined;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/**
|
|
213
|
+
* 矩阵 → 终端字符画(半块字符,1 字符宽 / 2 模块高),含 2 模块静区。
|
|
214
|
+
* 用 ▀▄█ 而非双宽全块:同样的可扫性下把宽度砍半,窄终端也放得下。
|
|
215
|
+
*/
|
|
216
|
+
export function renderTerminal(matrix, { quiet = 2 } = {}) {
|
|
217
|
+
if (!matrix?.modules?.length) return undefined;
|
|
218
|
+
const size = matrix.size;
|
|
219
|
+
const n = size + quiet * 2;
|
|
220
|
+
const dark = (x, y) => {
|
|
221
|
+
const mx = x - quiet;
|
|
222
|
+
const my = y - quiet;
|
|
223
|
+
return mx >= 0 && mx < size && my >= 0 && my < size ? Boolean(matrix.modules[my][mx]) : false;
|
|
224
|
+
};
|
|
225
|
+
const lines = [];
|
|
226
|
+
for (let y = 0; y < n; y += 2) {
|
|
227
|
+
let line = "";
|
|
228
|
+
for (let x = 0; x < n; x++) {
|
|
229
|
+
const top = dark(x, y);
|
|
230
|
+
const bottom = y + 1 < n ? dark(x, y + 1) : false;
|
|
231
|
+
line += top && bottom ? "█" : top ? "▀" : bottom ? "▄" : " ";
|
|
232
|
+
}
|
|
233
|
+
lines.push(line);
|
|
234
|
+
}
|
|
235
|
+
return lines.join("\n");
|
|
236
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
// raccoon 流处理:上游就是 OpenAI 形(`/api/web/llm/v2/chat/completions`),
|
|
2
|
+
// 因此**不做协议转换**——本文件只做三件事:形状判定、错误信封分类、非流式聚合。
|
|
3
|
+
// 流式路径直接把上游 body 透传(逐字节),避免任何整形引入的失真。
|
|
4
|
+
import { createSseParser } from "../../transport/sse.js";
|
|
5
|
+
import { isRaccoonAuthFailure, parseRaccoonEnvelope, raccoonEnvelopeText } from "./envelope.js";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* 额度类措辞(业务码未取证,见 ADR-0050 决策 8):**宁可漏判也不误报**。
|
|
9
|
+
* 刻意不收裸 `insufficient`/`balance`/`points` —— 那些词会命中「权限不足」这类非额度错,
|
|
10
|
+
* 一旦误判成 quota 就会长冷 1h 并回 429 `quota_exhausted`,违反 ADR-0044 的「非额度原因不得谎报」。
|
|
11
|
+
*/
|
|
12
|
+
const QUOTA_HINTS = /(积分|额度|quota|欠费)/i;
|
|
13
|
+
|
|
14
|
+
export function isRaccoonSseContentType(value) {
|
|
15
|
+
return String(value || "").includes("text/event-stream");
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function isQuotaLike(envelope) {
|
|
19
|
+
const text = `${envelope?.message ?? ""} ${envelope?.details ?? ""}`;
|
|
20
|
+
if (QUOTA_HINTS.test(text)) return true;
|
|
21
|
+
return envelope?.status === 402;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 失败分类 → `{ kind, code, status, message }`。
|
|
26
|
+
* kind 取值:auth(重登)/ quota(长冷却)/ rate_limit(短冷却)/ server(上游 5xx,短冷却)/ unknown(4xx 如实透出)。
|
|
27
|
+
*/
|
|
28
|
+
export function classifyRaccoonFailure(status, payload) {
|
|
29
|
+
const envelope = parseRaccoonEnvelope(payload, status);
|
|
30
|
+
let kind = "unknown";
|
|
31
|
+
if (isRaccoonAuthFailure(envelope, status)) kind = "auth";
|
|
32
|
+
else if (isQuotaLike(envelope)) kind = "quota";
|
|
33
|
+
else if (status === 429) kind = "rate_limit";
|
|
34
|
+
else if (status >= 500) kind = "server";
|
|
35
|
+
return { kind, code: envelope.code, status, message: raccoonEnvelopeText(envelope, `HTTP ${status}`) };
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const ERROR_MAP = {
|
|
39
|
+
auth: { status: 401, type: "auth_error", text: (f) => `raccoon: 登录态已失效${f.code ? `(code ${f.code})` : ""}。请运行 mslxdff -provider raccoon login 重新登录` },
|
|
40
|
+
quota: { status: 429, type: "quota_exhausted", text: (f) => `raccoon: 积分不足${f.message ? `(${f.message})` : ""}。请运行 mslxdff -provider raccoon checkin 领取每日积分,或更换账号` },
|
|
41
|
+
rate_limit: { status: 429, type: "rate_limited", text: () => "raccoon: 上游限流(账号冷却中),请稍后重试" },
|
|
42
|
+
server: { status: 502, type: "upstream_error", text: (f) => `raccoon: 上游服务异常${f.code ? `(code ${f.code})` : ""}${f.message ? `:${f.message}` : ""}` },
|
|
43
|
+
// unknown 只覆盖 4xx(5xx 已被上面分流成 server):按请求缺陷如实回 400,不谎报成网关故障
|
|
44
|
+
unknown: { status: 400, type: "invalid_request", text: (f) => `raccoon: 上游拒绝请求(HTTP ${f.status || "?"}${f.code ? ` code ${f.code}` : ""})${f.message ? `:${f.message}` : ""}` },
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** 失败 → Response(带 `x-mslxdff-raccoon-kind`,供工厂决定冷却档位)。 */
|
|
48
|
+
export function raccoonErrorResponse(fail = {}) {
|
|
49
|
+
const kind = ERROR_MAP[fail.kind] ? fail.kind : "unknown";
|
|
50
|
+
const entry = ERROR_MAP[kind];
|
|
51
|
+
const headers = { "Content-Type": "application/json" };
|
|
52
|
+
if (fail.kind) headers["x-mslxdff-raccoon-kind"] = fail.kind;
|
|
53
|
+
return new Response(JSON.stringify({ error: { message: entry.text(fail), type: entry.type, code: fail.code || 0 } }), {
|
|
54
|
+
status: entry.status,
|
|
55
|
+
headers,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** 工具调用增量合并(对齐 `qwenwork/sse.js` 的 mergeToolCallDelta:id/type 取一次,name/arguments 追加)。 */
|
|
60
|
+
function mergeRaccoonToolCallDelta(merged, delta) {
|
|
61
|
+
for (const key of ["id", "type"]) {
|
|
62
|
+
if (merged[key] === undefined && typeof delta[key] === "string" && delta[key] !== "") merged[key] = delta[key];
|
|
63
|
+
}
|
|
64
|
+
const dfn = delta.function;
|
|
65
|
+
if (!dfn || typeof dfn !== "object") return;
|
|
66
|
+
if (!merged.function || typeof merged.function !== "object") merged.function = {};
|
|
67
|
+
if (typeof dfn.name === "string" && dfn.name !== "") merged.function.name = (merged.function.name || "") + dfn.name;
|
|
68
|
+
if (typeof dfn.arguments === "string" && dfn.arguments !== "") {
|
|
69
|
+
merged.function.arguments = (merged.function.arguments || "") + dfn.arguments;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/** 把 SSE 文本聚合成一条 OpenAI chat completion(非流式请求、以及「header 说是 JSON 但体是 SSE」时走这里)。 */
|
|
74
|
+
export async function aggregateRaccoonSse(text, { model } = {}) {
|
|
75
|
+
const parser = createSseParser();
|
|
76
|
+
// 聚合拿到的是**完整 body**(不是分片):补一个定界符,否则末尾缺 `\n\n` 的最后一帧会被当半包丢掉
|
|
77
|
+
const events = parser.push(`${String(text || "")}\n\n`);
|
|
78
|
+
const content = [];
|
|
79
|
+
const reasoning = [];
|
|
80
|
+
const toolCalls = new Map();
|
|
81
|
+
const toolOrder = [];
|
|
82
|
+
let finishReason = "stop";
|
|
83
|
+
let usage;
|
|
84
|
+
let id = "";
|
|
85
|
+
let created = 0;
|
|
86
|
+
for (const raw of events) {
|
|
87
|
+
if (raw === "[DONE]" || !raw) continue;
|
|
88
|
+
let payload;
|
|
89
|
+
try {
|
|
90
|
+
payload = JSON.parse(raw);
|
|
91
|
+
} catch {
|
|
92
|
+
continue;
|
|
93
|
+
}
|
|
94
|
+
// 流内错误信封:优先按失败分类返回,不要静默当成空回复
|
|
95
|
+
if (payload?.code !== undefined && Number(payload.code) !== 0) {
|
|
96
|
+
return { error: classifyRaccoonFailure(200, payload) };
|
|
97
|
+
}
|
|
98
|
+
if (payload?.error) {
|
|
99
|
+
return { error: classifyRaccoonFailure(200, payload) };
|
|
100
|
+
}
|
|
101
|
+
if (!id && typeof payload?.id === "string") id = payload.id;
|
|
102
|
+
if (!created && Number.isFinite(payload?.created)) created = Number(payload.created);
|
|
103
|
+
if (payload?.usage) usage = payload.usage;
|
|
104
|
+
const choice = Array.isArray(payload?.choices) ? payload.choices[0] : undefined;
|
|
105
|
+
const delta = choice?.delta ?? choice?.message;
|
|
106
|
+
if (typeof delta?.content === "string" && delta.content.length > 0) content.push(delta.content);
|
|
107
|
+
if (typeof delta?.reasoning_content === "string" && delta.reasoning_content.length > 0) reasoning.push(delta.reasoning_content);
|
|
108
|
+
for (const call of Array.isArray(delta?.tool_calls) ? delta.tool_calls : []) {
|
|
109
|
+
if (!call || typeof call !== "object") continue;
|
|
110
|
+
const idx = typeof call.index === "number" ? call.index : 0;
|
|
111
|
+
if (!toolCalls.has(idx)) {
|
|
112
|
+
toolCalls.set(idx, { index: idx });
|
|
113
|
+
toolOrder.push(idx);
|
|
114
|
+
}
|
|
115
|
+
mergeRaccoonToolCallDelta(toolCalls.get(idx), call);
|
|
116
|
+
}
|
|
117
|
+
if (typeof choice?.finish_reason === "string" && choice.finish_reason.length > 0) finishReason = choice.finish_reason;
|
|
118
|
+
}
|
|
119
|
+
const message = { role: "assistant", content: content.join("") || null };
|
|
120
|
+
if (reasoning.length > 0) message.reasoning_content = reasoning.join("");
|
|
121
|
+
if (toolOrder.length > 0) {
|
|
122
|
+
toolOrder.sort((a, b) => a - b);
|
|
123
|
+
message.tool_calls = toolOrder.map((idx) => toolCalls.get(idx));
|
|
124
|
+
}
|
|
125
|
+
return {
|
|
126
|
+
openAi: {
|
|
127
|
+
id: id || `chatcmpl-raccoon-${Date.now()}`,
|
|
128
|
+
object: "chat.completion",
|
|
129
|
+
created: created || Math.floor(Date.now() / 1000),
|
|
130
|
+
model: model || "",
|
|
131
|
+
choices: [{ index: 0, message, finish_reason: finishReason }],
|
|
132
|
+
...(usage ? { usage } : {}),
|
|
133
|
+
},
|
|
134
|
+
};
|
|
135
|
+
}
|
|
@@ -48,6 +48,11 @@ export const customProviders = [
|
|
|
48
48
|
match: (id, baseUrl) => id === "zcode" || String(baseUrl).includes("zcode.z.ai"),
|
|
49
49
|
load: () => import("./zcode/index.js").then((m) => m.createZcodeProvider),
|
|
50
50
|
},
|
|
51
|
+
{
|
|
52
|
+
id: "raccoon",
|
|
53
|
+
match: (id, baseUrl) => id === "raccoon" || String(baseUrl).includes("xiaohuanxiong.com"),
|
|
54
|
+
load: () => import("./raccoon/index.js").then((m) => m.createRaccoonProvider),
|
|
55
|
+
},
|
|
51
56
|
];
|
|
52
57
|
|
|
53
58
|
// 供 bench/probe 等需要定制化解析模型列表的场景
|
|
@@ -10,7 +10,7 @@ export const SHARE_KEYS_HEADER = "x-mslxdff-share-keys";
|
|
|
10
10
|
// 硬排除:refresh-token 型凭据(对端刷新会轮换 token,与本机互相踢下线)——正确性问题。
|
|
11
11
|
// 二层保护:① 按 id 硬排除(cline 恒 local-only);② 按凭据形状兜底(见 shareableProviderIds)。
|
|
12
12
|
// traework/workbuddy/zcode 同为本机账号绑定型(auths/*.json + uid;zcode 还带 per-account deviceMid),恒不借出。
|
|
13
|
-
const NEVER_SHARE_IDS = new Set(["cline", "codearts", "traework", "qoder", "zcode"]);
|
|
13
|
+
const NEVER_SHARE_IDS = new Set(["cline", "codearts", "traework", "qoder", "zcode", "raccoon"]);
|
|
14
14
|
// 本节点应 cast key 到出站转发的供应商 id 集合 = 所有「本机有 key」的供应商,
|
|
15
15
|
// 减去:opencode(无 key 且恒排除)、local-only(workbuddy/cline系,本就不走组员)、刷新型凭据。
|
|
16
16
|
export function shareableProviderIds({ file } = {}) {
|