@sanqianx/claude-ai-workbench 0.13.1 → 0.13.2-rc.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 +2 -0
- package/docs/sdk/openapi.yaml +1 -1
- package/package.json +1 -1
- package/packages/client/package.json +2 -2
- package/packages/contracts/package.json +1 -1
- package/packages/core/package.json +2 -2
- package/packages/server/lib/profile-store.js +6 -2
- package/packages/server/package.json +2 -2
- package/packages/ui/package.json +2 -2
package/README.md
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
|
|
13
13
|
工作台是产品供应商与凭据的活动配置源。后台维护默认模型持久化,不随会话临时模型切换;解析后的凭据只交给鉴权本地服务,不进入浏览器消息。SDK 会话从当前项目登记的工作区恢复,也兼容旧登记文件。
|
|
14
14
|
|
|
15
|
+
MiniMax 向量模型使用独立的 `/v1/embeddings` 接口,不复用聊天的 `/anthropic` 路由。官方域名的已知接口后缀在运行期规范化为服务根地址,现有配置文件不被迁移或改写;自定义网关路径保持原样。
|
|
16
|
+
|
|
15
17
|
Windows 上 Claude Code 探测与实际启动使用同一解析结果:失效的 `CLAUDE_CODE_EXECPATH` 不遮住有效安装,npm/CMD/PowerShell 启动脚本解析成实际文件,JavaScript 入口用当前 Node 探测版本。`/system/doctor` 返回实际启动路径、被跳过的失效路径及版本探测错误。发现和会话失败使用 `log/v2`;受外壳守护时写入外壳统一诊断,独立运行保存在工作台数据目录的 `diagnostics.jsonl`,不记录凭据或原始提示词。
|
|
16
18
|
|
|
17
19
|
## 仓库结构
|
package/docs/sdk/openapi.yaml
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-ai-workbench/client",
|
|
3
|
-
"version": "0.13.1",
|
|
3
|
+
"version": "0.13.2-rc.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"browser": "index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"README.md"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@claude-ai-workbench/contracts": "0.13.1"
|
|
23
|
+
"@claude-ai-workbench/contracts": "0.13.2-rc.1"
|
|
24
24
|
},
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=18"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-ai-workbench/core",
|
|
3
|
-
"version": "0.13.1",
|
|
3
|
+
"version": "0.13.2-rc.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"browser": "index.js",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"README.md"
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@claude-ai-workbench/contracts": "0.13.1"
|
|
23
|
+
"@claude-ai-workbench/contracts": "0.13.2-rc.1"
|
|
24
24
|
},
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=18"
|
|
@@ -61,6 +61,7 @@ class ProfileStore {
|
|
|
61
61
|
const saved = this._profiles().embedding;
|
|
62
62
|
if (!saved) return { configured: false, config: null };
|
|
63
63
|
const { credentialRef, ...config } = saved;
|
|
64
|
+
config.endpoint = normalizeEmbedding(saved).endpoint;
|
|
64
65
|
let configured = false;
|
|
65
66
|
try { configured = Boolean(this.embeddingRuntime()); } catch {}
|
|
66
67
|
return { configured, config };
|
|
@@ -95,7 +96,7 @@ class ProfileStore {
|
|
|
95
96
|
if (!saved) throw Object.assign(new Error('向量模型未配置。'), { status: 409 });
|
|
96
97
|
const secret = saved.profileId ? this.runtimeProfile(saved.profileId).apiKey : this._credentials().credentials[saved.credentialRef];
|
|
97
98
|
if (!secret) throw Object.assign(new Error('向量模型凭据未配置。'), { status: 409 });
|
|
98
|
-
return { provider: saved.provider, model: saved.model, endpoint: saved.endpoint, apiKey: secret };
|
|
99
|
+
return { provider: saved.provider, model: saved.model, endpoint: normalizeEmbedding(saved).endpoint, apiKey: secret };
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
importEmbedding({ migrationId, settings }) {
|
|
@@ -245,10 +246,13 @@ function normalizeEmbedding(input) {
|
|
|
245
246
|
if (!['minimax', 'openai'].includes(input.provider)) throw Object.assign(new Error('请选择支持的向量协议。'), { status: 400 });
|
|
246
247
|
const model = String(input.model || (input.provider === 'minimax' ? 'embo-01' : 'text-embedding-3-small')).trim();
|
|
247
248
|
if (!model || model.length > 200 || /[\x00-\x1f]/.test(model)) throw Object.assign(new Error('无效的向量模型。'), { status: 400 });
|
|
248
|
-
|
|
249
|
+
let endpoint = String(input.endpoint || '').trim();
|
|
249
250
|
if (endpoint) {
|
|
250
251
|
let url; try { url = new URL(endpoint); } catch {}
|
|
251
252
|
if (!url || !['http:', 'https:'].includes(url.protocol) || url.username || url.password || url.search || url.hash) throw Object.assign(new Error('向量接口地址无效。'), { status: 400 });
|
|
253
|
+
// MiniMax appends /v1/embeddings itself. Only official, known route
|
|
254
|
+
// aliases are normalized; private gateways may require their path prefix.
|
|
255
|
+
if (input.provider === 'minimax' && ['api.minimaxi.com', 'api.minimax.io', 'api.minimax.cn', 'api.minimax.chat'].includes(url.hostname) && /^\/(?:anthropic|v1(?:\/embeddings)?)?\/?$/.test(url.pathname)) endpoint = url.origin;
|
|
252
256
|
}
|
|
253
257
|
return { provider: input.provider, model, endpoint, profileId: input.profileId ? cleanId(input.profileId, 'profileId') : null };
|
|
254
258
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-ai-workbench/server",
|
|
3
|
-
"version": "0.13.1",
|
|
3
|
+
"version": "0.13.2-rc.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
],
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@anthropic-ai/claude-agent-sdk": "^0.2.141",
|
|
28
|
-
"@claude-ai-workbench/contracts": "0.13.1"
|
|
28
|
+
"@claude-ai-workbench/contracts": "0.13.2-rc.1"
|
|
29
29
|
},
|
|
30
30
|
"engines": {
|
|
31
31
|
"node": ">=18"
|
package/packages/ui/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-ai-workbench/ui",
|
|
3
|
-
"version": "0.13.1",
|
|
3
|
+
"version": "0.13.2-rc.1",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"main": "ai-profile-settings.js",
|
|
6
6
|
"browser": "ai-profile-settings.js",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"README.md"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@claude-ai-workbench/core": "0.13.1"
|
|
36
|
+
"@claude-ai-workbench/core": "0.13.2-rc.1"
|
|
37
37
|
},
|
|
38
38
|
"engines": {
|
|
39
39
|
"node": ">=18"
|