waygate-qoder 0.1.0 → 0.1.2
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 +2 -2
- package/dist/adapter.js +6 -4
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -36,10 +36,10 @@ qoc
|
|
|
36
36
|
```
|
|
37
37
|
途关 · Qoder CN 反代 v0.1.0
|
|
38
38
|
|
|
39
|
-
凭证 ✓
|
|
39
|
+
凭证 ✓ 已登录:你的账号(uid 01a0d156…)
|
|
40
40
|
上游 https://gateway.qoder.com.cn (COSY 签名协议)
|
|
41
41
|
代理 http://127.0.0.1:8789
|
|
42
|
-
密钥 sk-qoc-
|
|
42
|
+
密钥 sk-qoc-1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d
|
|
43
43
|
|
|
44
44
|
模型 ID(填进你的客户端):
|
|
45
45
|
qmodel_38max Qwen3.8-Max
|
package/dist/adapter.js
CHANGED
|
@@ -50,9 +50,6 @@ export function saveIdentity(identity) {
|
|
|
50
50
|
identityCache = identity;
|
|
51
51
|
return path;
|
|
52
52
|
}
|
|
53
|
-
function mask(s) {
|
|
54
|
-
return s.length > 10 ? `${s.slice(0, 6)}…(${s.length}B)` : '***';
|
|
55
|
-
}
|
|
56
53
|
export function createQoderAdapter(opts = {}) {
|
|
57
54
|
const baseUrl = opts.baseUrl ?? DEFAULT_QODER_BASE_URL;
|
|
58
55
|
const chatPath = opts.chatPath ?? DEFAULT_QODER_CHAT_PATH;
|
|
@@ -64,7 +61,12 @@ export function createQoderAdapter(opts = {}) {
|
|
|
64
61
|
async credentialStatus() {
|
|
65
62
|
try {
|
|
66
63
|
const id = resolveIdentity();
|
|
67
|
-
|
|
64
|
+
/* 只显示账号与 uid 前缀 —— **绝不回显令牌**(哪怕打码,前几位也是敏感信息)。 */
|
|
65
|
+
return {
|
|
66
|
+
ok: true,
|
|
67
|
+
detail: `已登录:${id.name}(uid ${id.uid.slice(0, 8)}…)`,
|
|
68
|
+
source: existsSync(credentialPath()) ? credentialPath() : undefined,
|
|
69
|
+
};
|
|
68
70
|
}
|
|
69
71
|
catch (err) {
|
|
70
72
|
return { ok: false, detail: err.message };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "waygate-qoder",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Qoder CN 本地反代:读取本机客户端登录态,提供 Anthropic/OpenAI 兼容的本地聊天端点",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,6 +40,6 @@
|
|
|
40
40
|
"access": "public"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"waygate-core": "^0.2.
|
|
43
|
+
"waygate-core": "^0.2.2"
|
|
44
44
|
}
|
|
45
45
|
}
|