@wwkit/freetoken 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/LICENSE +21 -0
- package/README.md +96 -0
- package/cli/helpers/args.js +48 -0
- package/cli/index.js +374 -0
- package/cli/pid-manager.js +87 -0
- package/client/index.html +25 -0
- package/client/public/favicon.svg +1 -0
- package/client/public/icons.svg +24 -0
- package/client/src/App.vue +136 -0
- package/client/src/assets/vite.svg +1 -0
- package/client/src/assets/vue.svg +1 -0
- package/client/src/components/ChatBox.vue +320 -0
- package/client/src/components/CheckList.vue +52 -0
- package/client/src/components/CodeBlock.vue +99 -0
- package/client/src/components/DetailBlock.vue +47 -0
- package/client/src/components/HelloWorld.vue +95 -0
- package/client/src/components/LangSwitch.vue +32 -0
- package/client/src/components/LinkList.vue +32 -0
- package/client/src/components/OsSwitch.vue +42 -0
- package/client/src/components/OsToggle.vue +15 -0
- package/client/src/components/PageHeader.vue +31 -0
- package/client/src/components/StepList.vue +92 -0
- package/client/src/composables/useClipboard.js +26 -0
- package/client/src/composables/useOs.js +22 -0
- package/client/src/data/docs/agent.js +1002 -0
- package/client/src/data/docs/auth.js +631 -0
- package/client/src/data/docs/builtin-tools.js +322 -0
- package/client/src/data/docs/chat.js +181 -0
- package/client/src/data/docs/index.js +9 -0
- package/client/src/data/docs/skills.js +396 -0
- package/client/src/data/docs/spec-conversion.js +1042 -0
- package/client/src/data/freeModels/bluesliu.js +97 -0
- package/client/src/data/freeModels/index.js +11 -0
- package/client/src/data/freeModels/nvidia.js +126 -0
- package/client/src/data/freeModels/openrouter.js +116 -0
- package/client/src/data/harness/claude.js +89 -0
- package/client/src/data/harness/codex.js +66 -0
- package/client/src/data/harness/dsh.js +86 -0
- package/client/src/data/harness/hermes.js +56 -0
- package/client/src/data/harness/index.js +22 -0
- package/client/src/data/harness/opencode.js +77 -0
- package/client/src/data/proxy/api-relay.js +53 -0
- package/client/src/data/proxy/builtin-proxy.js +54 -0
- package/client/src/data/proxy/cf-workers.js +67 -0
- package/client/src/data/proxy/ecs-forward.js +75 -0
- package/client/src/data/proxy/ecs-reverse.js +89 -0
- package/client/src/data/proxy/index.js +15 -0
- package/client/src/docs/claudecode.md +44 -0
- package/client/src/docs/codex.md +90 -0
- package/client/src/docs/hermesagent.md +42 -0
- package/client/src/docs/opencode.md +103 -0
- package/client/src/locales/en.js +436 -0
- package/client/src/locales/index.js +31 -0
- package/client/src/locales/zh-CN.js +461 -0
- package/client/src/main.js +16 -0
- package/client/src/router/index.js +76 -0
- package/client/src/style.css +15 -0
- package/client/src/views/AdminModelsView.vue +214 -0
- package/client/src/views/DocsView.vue +1604 -0
- package/client/src/views/FreeModelsView.vue +518 -0
- package/client/src/views/HarnessView.vue +314 -0
- package/client/src/views/HomeView.vue +147 -0
- package/client/src/views/ProxyView.vue +112 -0
- package/client/src/views/TokenMarketView.vue +26 -0
- package/client/vite.config.js +41 -0
- package/package.json +85 -0
- package/scripts/build-zip.sh +61 -0
- package/scripts/postinstall.js +7 -0
- package/server/src/config/targets.json +1 -0
- package/server/src/index.js +52 -0
- package/server/src/lib/coding-test.js +215 -0
- package/server/src/lib/database.js +353 -0
- package/server/src/lib/run-test.js +15 -0
- package/server/src/lib/scheduler.js +21 -0
- package/server/src/lib/tester.js +310 -0
- package/server/src/routes/admin.js +48 -0
- package/server/src/routes/proxy.js +64 -0
- package/server/src/routes/speed.js +87 -0
- package/src/config.js +45 -0
- package/src/config.json5 +27 -0
- package/src/index.js +10 -0
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
id: 'bluesliu',
|
|
3
|
+
name: 'BluesLiu',
|
|
4
|
+
tagline: '站内提供的免费测试模型服务',
|
|
5
|
+
description: 'BluesLiu 是本站提供的内部测试模型服务,基于 @ai-sdk/openai-compatible 构建,聚合了 MiniMax、智谱 GLM 等多种模型。无需注册,直接使用共享 API Key 即可调用,适合学习和快速测试。',
|
|
6
|
+
badge: '站内测试',
|
|
7
|
+
|
|
8
|
+
freeModels: [
|
|
9
|
+
{
|
|
10
|
+
name: 'MiniMax-M2.7',
|
|
11
|
+
context: '-',
|
|
12
|
+
note: 'MiniMax 提供的通用大语言模型',
|
|
13
|
+
provider: 'MiniMax',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'maas-glm-5-aliyun-codeagent',
|
|
17
|
+
context: '-',
|
|
18
|
+
note: '阿里云 CodeAgent 模型,擅长代码任务',
|
|
19
|
+
provider: 'Alibaba Cloud',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'maas-glm-5.1-zhipu',
|
|
23
|
+
context: '-',
|
|
24
|
+
note: '智谱 GLM 5.1 模型,通用能力强',
|
|
25
|
+
provider: 'Zhipu AI',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
|
|
29
|
+
apiSpec: {
|
|
30
|
+
openai: {
|
|
31
|
+
baseUrl: 'http://7.237.94.74:32527/v1',
|
|
32
|
+
apiKey: 'bluesliusharing',
|
|
33
|
+
},
|
|
34
|
+
anthropic: null,
|
|
35
|
+
},
|
|
36
|
+
|
|
37
|
+
registration: [
|
|
38
|
+
'本服务为站内提供,无需注册',
|
|
39
|
+
'API Key 为共享密钥:bluesliusharing',
|
|
40
|
+
'BaseURL:http://7.237.94.74:32527/v1',
|
|
41
|
+
'可用模型包括 MiniMax-M2.7、maas-glm-5-aliyun-codeagent、maas-glm-5.1-zhipu',
|
|
42
|
+
'使用 OpenAI 兼容接口调用即可',
|
|
43
|
+
],
|
|
44
|
+
|
|
45
|
+
usageCurl: `# curl test
|
|
46
|
+
curl http://7.237.94.74:32527/v1/chat/completions \\
|
|
47
|
+
-H "Authorization: Bearer bluesliusharing" \\
|
|
48
|
+
-H "Content-Type: application/json" \\
|
|
49
|
+
-d '{
|
|
50
|
+
"model": "MiniMax-M2.7",
|
|
51
|
+
"messages": [{"role": "user", "content": "Hello!"}],
|
|
52
|
+
"max_tokens": 1024
|
|
53
|
+
}'`,
|
|
54
|
+
|
|
55
|
+
usageCurlCopy: {
|
|
56
|
+
unix: `curl http://7.237.94.74:32527/v1/chat/completions -H "Authorization: Bearer bluesliusharing" -H "Content-Type: application/json" -d '{"model":"MiniMax-M2.7","messages":[{"role":"user","content":"Hello!"}],"max_tokens":1024}'`,
|
|
57
|
+
windows: `curl.exe http://7.237.94.74:32527/v1/chat/completions -H "Authorization: Bearer bluesliusharing" -H "Content-Type: application/json" -d "{\\"model\\":\\"MiniMax-M2.7\\",\\"messages\\":[{\\"role\\":\\"user\\",\\"content\\":\\"Hello!\\"}],\\"max_tokens\\":1024}"`,
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
usageConfig: `{
|
|
61
|
+
"$schema": "https://opencode.ai/config.json",
|
|
62
|
+
"provider": {
|
|
63
|
+
"bluesliu": {
|
|
64
|
+
"npm": "@ai-sdk/openai-compatible",
|
|
65
|
+
"name": "BluesLiu",
|
|
66
|
+
"options": {
|
|
67
|
+
"baseURL": "http://7.237.94.74:32527/v1",
|
|
68
|
+
"apiKey": "bluesliusharing"
|
|
69
|
+
},
|
|
70
|
+
"models": {
|
|
71
|
+
"MiniMax-M2.7": {
|
|
72
|
+
"name": "MiniMax-M2.7"
|
|
73
|
+
},
|
|
74
|
+
"maas-glm-5-aliyun-codeagent": {
|
|
75
|
+
"name": "maas-glm-5-aliyun-codeagent"
|
|
76
|
+
},
|
|
77
|
+
"maas-glm-5.1-zhipu": {
|
|
78
|
+
"name": "maas-glm-5.1-zhipu"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}`,
|
|
84
|
+
|
|
85
|
+
usageFilename: '~/.config/opencode/opencode.jsonc',
|
|
86
|
+
|
|
87
|
+
tips: [
|
|
88
|
+
'本服务为内部测试用途,不保证长期可用',
|
|
89
|
+
'共享 API Key,请勿用于生产环境',
|
|
90
|
+
'API 地址仅内网可访问,需在华为内网环境下使用',
|
|
91
|
+
'所有模型均使用 OpenAI 兼容 API 格式,切换成本低',
|
|
92
|
+
],
|
|
93
|
+
|
|
94
|
+
links: [
|
|
95
|
+
{ label: 'API 地址', url: 'http://7.237.94.74:32527/v1' },
|
|
96
|
+
],
|
|
97
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
id: 'nvidia',
|
|
3
|
+
name: 'Nvidia NIM',
|
|
4
|
+
tagline: 'Nvidia 提供的免费模型推理服务',
|
|
5
|
+
description: 'Nvidia 通过 NIM(NVIDIA Inference Microservices)平台提供多种开源大模型的免费推理 API 接口,包括 Llama、Mistral、Qwen 等,开发者注册后可获得免费 API Key。',
|
|
6
|
+
badge: 'Free',
|
|
7
|
+
|
|
8
|
+
freeModels: [
|
|
9
|
+
{
|
|
10
|
+
name: 'meta/llama-3.3-70b-instruct',
|
|
11
|
+
context: '128K tokens',
|
|
12
|
+
note: '免费',
|
|
13
|
+
provider: 'Meta',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'meta/llama-3.1-405b-instruct',
|
|
17
|
+
context: '128K tokens',
|
|
18
|
+
note: '免费',
|
|
19
|
+
provider: 'Meta',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'mistralai/mistral-nemo-12b',
|
|
23
|
+
context: '128K tokens',
|
|
24
|
+
note: '免费',
|
|
25
|
+
provider: 'Mistral',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'qwen/qwen2.5-7b-instruct',
|
|
29
|
+
context: '32K tokens',
|
|
30
|
+
note: '免费',
|
|
31
|
+
provider: 'Alibaba',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'google/gemma-2-9b',
|
|
35
|
+
context: '8K tokens',
|
|
36
|
+
note: '免费',
|
|
37
|
+
provider: 'Google',
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'nvidia/nv-embedqa-e5-v5',
|
|
41
|
+
context: '4K tokens',
|
|
42
|
+
note: '嵌入模型,免费',
|
|
43
|
+
provider: 'NVIDIA',
|
|
44
|
+
},
|
|
45
|
+
],
|
|
46
|
+
|
|
47
|
+
apiSpec: {
|
|
48
|
+
openai: {
|
|
49
|
+
baseUrl: 'https://integrate.api.nvidia.com/v1',
|
|
50
|
+
apiKey: '{NVIDIA_API_KEY}',
|
|
51
|
+
},
|
|
52
|
+
anthropic: null,
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
registration: [
|
|
56
|
+
'访问 Nvidia 开发者平台 https://build.nvidia.com',
|
|
57
|
+
'点击 Sign In,使用 NVIDIA 账号登录(可免费注册)',
|
|
58
|
+
'选择需要的模型,点击 "Get API Key"',
|
|
59
|
+
'生成的 API Key 格式为:nvapi-xxxxx',
|
|
60
|
+
'在代码中使用 OpenAI 兼容接口调用',
|
|
61
|
+
],
|
|
62
|
+
|
|
63
|
+
usageCurl: `# curl test
|
|
64
|
+
curl https://integrate.api.nvidia.com/v1/chat/completions \\
|
|
65
|
+
-H "Authorization: Bearer $NVIDIA_API_KEY" \\
|
|
66
|
+
-H "Content-Type: application/json" \\
|
|
67
|
+
-d '{
|
|
68
|
+
"model": "meta/llama-3.3-70b-instruct",
|
|
69
|
+
"messages": [{"role": "user", "content": "Hello!"}],
|
|
70
|
+
"max_tokens": 1024
|
|
71
|
+
}'`,
|
|
72
|
+
|
|
73
|
+
usageCurlCopy: {
|
|
74
|
+
unix: `curl https://integrate.api.nvidia.com/v1/chat/completions -H "Authorization: Bearer $NVIDIA_API_KEY" -H "Content-Type: application/json" -d '{"model":"meta/llama-3.3-70b-instruct","messages":[{"role":"user","content":"Hello!"}],"max_tokens":1024}'`,
|
|
75
|
+
windows: `curl.exe https://integrate.api.nvidia.com/v1/chat/completions -H "Authorization: Bearer %NVIDIA_API_KEY%" -H "Content-Type: application/json" -d "{\\"model\\":\\"meta/llama-3.3-70b-instruct\\",\\"messages\\":[{\\"role\\":\\"user\\",\\"content\\":\\"Hello!\\"}],\\"max_tokens\\":1024}"`,
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
usageConfig: `{
|
|
79
|
+
"$schema": "https://opencode.ai/config.json",
|
|
80
|
+
"provider": {
|
|
81
|
+
"nvidia": {
|
|
82
|
+
"npm": "@ai-sdk/openai-compatible",
|
|
83
|
+
"name": "Nvidia NIM",
|
|
84
|
+
"options": {
|
|
85
|
+
"baseURL": "https://integrate.api.nvidia.com/v1",
|
|
86
|
+
"apiKey": "{NVIDIA_API_KEY}"
|
|
87
|
+
},
|
|
88
|
+
"models": {
|
|
89
|
+
"meta/llama-3.3-70b-instruct": {
|
|
90
|
+
"name": "Llama 3.3 70B Instruct"
|
|
91
|
+
},
|
|
92
|
+
"meta/llama-3.1-405b-instruct": {
|
|
93
|
+
"name": "Llama 3.1 405B Instruct"
|
|
94
|
+
},
|
|
95
|
+
"mistralai/mistral-nemo-12b": {
|
|
96
|
+
"name": "Mistral NeMo 12B"
|
|
97
|
+
},
|
|
98
|
+
"qwen/qwen2.5-7b-instruct": {
|
|
99
|
+
"name": "Qwen 2.5 7B Instruct"
|
|
100
|
+
},
|
|
101
|
+
"google/gemma-2-9b": {
|
|
102
|
+
"name": "Gemma 2 9B"
|
|
103
|
+
},
|
|
104
|
+
"nvidia/nv-embedqa-e5-v5": {
|
|
105
|
+
"name": "NV-Embed-QA"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}`,
|
|
111
|
+
|
|
112
|
+
usageFilename: '~/.config/opencode/opencode.jsonc',
|
|
113
|
+
|
|
114
|
+
tips: [
|
|
115
|
+
'Nvidia NIM 免费额度较大,适合学习和开发测试',
|
|
116
|
+
'所有模型均使用 OpenAI 兼容 API 格式,切换成本低',
|
|
117
|
+
'部分大模型(如 405B)推理速度可能较慢',
|
|
118
|
+
'NIM 平台会不定期新增模型,建议关注更新',
|
|
119
|
+
],
|
|
120
|
+
|
|
121
|
+
links: [
|
|
122
|
+
{ label: 'Nvidia NIM 官网', url: 'https://build.nvidia.com' },
|
|
123
|
+
{ label: 'API 文档', url: 'https://docs.api.nvidia.com' },
|
|
124
|
+
{ label: '模型列表', url: 'https://build.nvidia.com/models' },
|
|
125
|
+
],
|
|
126
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
id: 'openrouter',
|
|
3
|
+
name: 'OpenRouter',
|
|
4
|
+
tagline: '统一的 LLM API 聚合平台',
|
|
5
|
+
description: 'OpenRouter 是一个统一的 LLM API 路由平台,聚合了 OpenAI、Anthropic、Google、Meta 等多家厂商的模型。部分模型提供免费额度,适合开发者测试和学习使用。',
|
|
6
|
+
badge: 'Free Tier',
|
|
7
|
+
|
|
8
|
+
freeModels: [
|
|
9
|
+
{
|
|
10
|
+
name: 'google/gemini-2.0-flash-experimental:free',
|
|
11
|
+
context: '1M tokens',
|
|
12
|
+
note: '免费,有速率限制',
|
|
13
|
+
provider: 'Google',
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
name: 'meta-llama/llama-3.3-70b-instruct:free',
|
|
17
|
+
context: '128K tokens',
|
|
18
|
+
note: '免费,有速率限制',
|
|
19
|
+
provider: 'Meta',
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'qwen/qwen-2.5-72b-instruct:free',
|
|
23
|
+
context: '32K tokens',
|
|
24
|
+
note: '免费,有速率限制',
|
|
25
|
+
provider: 'Alibaba',
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'deepseek/deepseek-r1:free',
|
|
29
|
+
context: '128K tokens',
|
|
30
|
+
note: '免费,有速率限制',
|
|
31
|
+
provider: 'DeepSeek',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'mistralai/mistral-7b-instruct:free',
|
|
35
|
+
context: '32K tokens',
|
|
36
|
+
note: '免费,有速率限制',
|
|
37
|
+
provider: 'Mistral',
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
|
|
41
|
+
apiSpec: {
|
|
42
|
+
openai: {
|
|
43
|
+
baseUrl: 'https://openrouter.ai/api/v1',
|
|
44
|
+
apiKey: '{OPENROUTER_API_KEY}',
|
|
45
|
+
},
|
|
46
|
+
anthropic: null,
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
registration: [
|
|
50
|
+
'访问 OpenRouter 官网 https://openrouter.ai',
|
|
51
|
+
'点击 Sign Up,使用 GitHub 或 Google 账号登录',
|
|
52
|
+
'进入 Keys 页面,点击 Create Key 生成 API Key',
|
|
53
|
+
'保存好 API Key(格式:sk-or-v1-xxxxx)',
|
|
54
|
+
'免费模型会标注 "Free" 标签,可直接使用',
|
|
55
|
+
],
|
|
56
|
+
|
|
57
|
+
usageCurl: `# curl test
|
|
58
|
+
curl https://openrouter.ai/api/v1/chat/completions \\
|
|
59
|
+
-H "Authorization: Bearer $OPENROUTER_API_KEY" \\
|
|
60
|
+
-H "Content-Type: application/json" \\
|
|
61
|
+
-d '{
|
|
62
|
+
"model": "google/gemini-2.0-flash-experimental:free",
|
|
63
|
+
"messages": [{"role": "user", "content": "Hello!"}]
|
|
64
|
+
}'`,
|
|
65
|
+
|
|
66
|
+
usageCurlCopy: {
|
|
67
|
+
unix: `curl https://openrouter.ai/api/v1/chat/completions -H "Authorization: Bearer $OPENROUTER_API_KEY" -H "Content-Type: application/json" -d '{"model":"google/gemini-2.0-flash-experimental:free","messages":[{"role":"user","content":"Hello!"}]}'`,
|
|
68
|
+
windows: `curl.exe https://openrouter.ai/api/v1/chat/completions -H "Authorization: Bearer %OPENROUTER_API_KEY%" -H "Content-Type: application/json" -d "{\\"model\\":\\"google/gemini-2.0-flash-experimental:free\\",\\"messages\\":[{\\"role\\":\\"user\\",\\"content\\":\\"Hello!\\"}]}"`,
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
usageConfig: `{
|
|
72
|
+
"$schema": "https://opencode.ai/config.json",
|
|
73
|
+
"provider": {
|
|
74
|
+
"openrouter": {
|
|
75
|
+
"npm": "@ai-sdk/openai-compatible",
|
|
76
|
+
"name": "OpenRouter",
|
|
77
|
+
"options": {
|
|
78
|
+
"baseURL": "https://openrouter.ai/api/v1",
|
|
79
|
+
"apiKey": "{OPENROUTER_API_KEY}"
|
|
80
|
+
},
|
|
81
|
+
"models": {
|
|
82
|
+
"google/gemini-2.0-flash-experimental:free": {
|
|
83
|
+
"name": "Google Gemini 2.0 Flash Experimental"
|
|
84
|
+
},
|
|
85
|
+
"meta-llama/llama-3.3-70b-instruct:free": {
|
|
86
|
+
"name": "Meta Llama 3.3 70B Instruct"
|
|
87
|
+
},
|
|
88
|
+
"qwen/qwen-2.5-72b-instruct:free": {
|
|
89
|
+
"name": "Qwen 2.5 72B Instruct"
|
|
90
|
+
},
|
|
91
|
+
"deepseek/deepseek-r1:free": {
|
|
92
|
+
"name": "DeepSeek R1"
|
|
93
|
+
},
|
|
94
|
+
"mistralai/mistral-7b-instruct:free": {
|
|
95
|
+
"name": "Mistral 7B Instruct"
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}`,
|
|
101
|
+
|
|
102
|
+
usageFilename: '~/.config/opencode/opencode.jsonc',
|
|
103
|
+
|
|
104
|
+
tips: [
|
|
105
|
+
'免费模型有速率限制(通常 10-20 次/分钟)',
|
|
106
|
+
'部分免费模型可能不保证可用性,建议多备选几个',
|
|
107
|
+
'付费模型按 token 计费,价格通常比官方便宜',
|
|
108
|
+
'OpenRouter 支持 OpenAI 兼容格式,可直接替换 baseURL',
|
|
109
|
+
],
|
|
110
|
+
|
|
111
|
+
links: [
|
|
112
|
+
{ label: '官网', url: 'https://openrouter.ai' },
|
|
113
|
+
{ label: '免费模型列表', url: 'https://openrouter.ai/models?max_price=0' },
|
|
114
|
+
{ label: 'API 文档', url: 'https://openrouter.ai/docs' },
|
|
115
|
+
],
|
|
116
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// Anthropic Claude Code 配置
|
|
2
|
+
export default {
|
|
3
|
+
id: 'claude',
|
|
4
|
+
nameKey: 'harness.tools.claude.name',
|
|
5
|
+
taglineKey: 'harness.tools.claude.tagline',
|
|
6
|
+
descriptionKey: 'harness.tools.claude.description',
|
|
7
|
+
badgeKey: 'harness.tools.claude.badge',
|
|
8
|
+
|
|
9
|
+
// 环境依赖
|
|
10
|
+
requirements: {
|
|
11
|
+
node: '>=18.0.0',
|
|
12
|
+
},
|
|
13
|
+
|
|
14
|
+
// 安装方式
|
|
15
|
+
install: {
|
|
16
|
+
// npm 全局安装(推荐)
|
|
17
|
+
npm: {
|
|
18
|
+
display: `# Install globally via npm
|
|
19
|
+
npm install -g @anthropic-ai/claude-code
|
|
20
|
+
|
|
21
|
+
# Verify installation
|
|
22
|
+
claude --version`,
|
|
23
|
+
pkg: '@anthropic-ai/claude-code',
|
|
24
|
+
verify: 'claude --version',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
// 配置示例
|
|
29
|
+
config: `{
|
|
30
|
+
"$schema": "https://json.schemastore.org/claude-code-settings.json",
|
|
31
|
+
"env": {
|
|
32
|
+
"ANTHROPIC_BASE_URL": "http://7.237.94.74:32527",
|
|
33
|
+
"ANTHROPIC_AUTH_TOKEN": "sk-1234",
|
|
34
|
+
"DISABLE_UPDATES": "1",
|
|
35
|
+
"DISABLE_AUTOUPDATER": "1"
|
|
36
|
+
},
|
|
37
|
+
"model": "maas-glm-5-aliyun-codeagent",
|
|
38
|
+
"theme": "dark"
|
|
39
|
+
}`,
|
|
40
|
+
configFilename: '~/.claude/settings.json',
|
|
41
|
+
configFormat: 'json',
|
|
42
|
+
configTips: [
|
|
43
|
+
'ANTHROPIC_BASE_URL: API 基础 URL',
|
|
44
|
+
'ANTHROPIC_AUTH_TOKEN: 认证令牌',
|
|
45
|
+
'DISABLE_UPDATES: 禁用更新检查',
|
|
46
|
+
'DISABLE_AUTOUPDATER: 禁用自动更新',
|
|
47
|
+
'model: 模型名称',
|
|
48
|
+
'theme: 主题(dark/light)',
|
|
49
|
+
],
|
|
50
|
+
|
|
51
|
+
// 启动方式
|
|
52
|
+
startup: {
|
|
53
|
+
command: 'claude',
|
|
54
|
+
description: '启动 CLI 交互界面',
|
|
55
|
+
tips: [
|
|
56
|
+
'Windows PowerShell 需要新开窗口',
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
// 切换模型
|
|
61
|
+
modelSwitch: {
|
|
62
|
+
description: 'Claude Code 没有正式的 provider 配置机制,推荐两种方案:',
|
|
63
|
+
methods: [
|
|
64
|
+
{
|
|
65
|
+
title: '方案1:直接修改配置文件',
|
|
66
|
+
content: '修改 ~/.claude/settings.json 中的 base_url/auth_token/model 信息',
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
title: '方案2:多配置文件切换',
|
|
70
|
+
content: '为每个 provider 设置一个配置文件,启动时指定:',
|
|
71
|
+
command: 'claude --settings ~/.claude/settings-deepseek.json',
|
|
72
|
+
example: `settings-deepseek.json:
|
|
73
|
+
{
|
|
74
|
+
"model": "deepseek-v4-flash",
|
|
75
|
+
"env": {
|
|
76
|
+
"ANTHROPIC_BASE_URL": "https://api.deepseek.com/v1",
|
|
77
|
+
"ANTHROPIC_API_KEY": "sk-deepseek-key"
|
|
78
|
+
}
|
|
79
|
+
}`,
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
// 相关链接
|
|
85
|
+
links: [
|
|
86
|
+
{ labelKey: 'harness.tools.claude.links.0', url: 'https://docs.anthropic.com/claude-code' },
|
|
87
|
+
{ labelKey: 'harness.tools.claude.links.1', url: 'https://github.com/anthropics/claude-code' },
|
|
88
|
+
],
|
|
89
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// OpenAI Codex CLI 配置
|
|
2
|
+
export default {
|
|
3
|
+
id: 'codex',
|
|
4
|
+
nameKey: 'harness.tools.codex.name',
|
|
5
|
+
taglineKey: 'harness.tools.codex.tagline',
|
|
6
|
+
descriptionKey: 'harness.tools.codex.description',
|
|
7
|
+
badgeKey: 'harness.tools.codex.badge',
|
|
8
|
+
|
|
9
|
+
// 环境依赖
|
|
10
|
+
requirements: {
|
|
11
|
+
node: '>=18.0.0',
|
|
12
|
+
envVars: ['BLUES_LIU_API_KEY'],
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
// 启动方式
|
|
16
|
+
startup: {
|
|
17
|
+
command: 'codex',
|
|
18
|
+
description: '启动 CLI 交互界面',
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
install: {
|
|
22
|
+
// curl 一键安装
|
|
23
|
+
curl: {
|
|
24
|
+
display: `# One-line install via curl
|
|
25
|
+
curl -fsSL https://raw.githubusercontent.com/openai/codex/main/install.sh | bash
|
|
26
|
+
|
|
27
|
+
# Verify installation
|
|
28
|
+
codex --version`,
|
|
29
|
+
copy: {
|
|
30
|
+
unix: 'curl -fsSL https://raw.githubusercontent.com/openai/codex/main/install.sh | bash && codex --version',
|
|
31
|
+
windows: 'curl -fsSL https://raw.githubusercontent.com/openai/codex/main/install.sh | bash; codex --version',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
// npm 全局安装
|
|
36
|
+
npm: {
|
|
37
|
+
display: `# Install globally via npm
|
|
38
|
+
npm install -g @openai/codex
|
|
39
|
+
|
|
40
|
+
# Verify installation
|
|
41
|
+
codex --version`,
|
|
42
|
+
pkg: '@openai/codex',
|
|
43
|
+
verify: 'codex --version',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
// 配置示例
|
|
48
|
+
config: `model_provider = "bluesliu"
|
|
49
|
+
model = "maas-glm-5.1-zhipu"
|
|
50
|
+
|
|
51
|
+
[model_providers.bluesliu]
|
|
52
|
+
name = "BluesLiu"
|
|
53
|
+
base_url = "http://7.237.94.74:32527/v1"
|
|
54
|
+
env_key = "BLUES_LIU_API_KEY"`,
|
|
55
|
+
configFilename: '~/.codex/config.toml',
|
|
56
|
+
configFormat: 'toml',
|
|
57
|
+
|
|
58
|
+
// 切换模型
|
|
59
|
+
modelSwitch: '修改配置文件中 model 字段',
|
|
60
|
+
|
|
61
|
+
// 相关链接
|
|
62
|
+
links: [
|
|
63
|
+
{ labelKey: 'harness.tools.codex.links.0', url: 'https://openai.com/codex' },
|
|
64
|
+
{ labelKey: 'harness.tools.codex.links.1', url: 'https://github.com/openai/codex' },
|
|
65
|
+
],
|
|
66
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
// DeepSeek Harness 配置
|
|
2
|
+
export default {
|
|
3
|
+
id: 'dsh',
|
|
4
|
+
nameKey: 'harness.tools.dsh.name',
|
|
5
|
+
taglineKey: 'harness.tools.dsh.tagline',
|
|
6
|
+
descriptionKey: 'harness.tools.dsh.description',
|
|
7
|
+
badgeKey: 'harness.tools.dsh.badge',
|
|
8
|
+
|
|
9
|
+
// 环境依赖
|
|
10
|
+
requirements: {
|
|
11
|
+
node: '>=18.0.0',
|
|
12
|
+
envVars: ['BLUES_LIU_API_KEY'],
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
// 启动方式
|
|
16
|
+
startup: {
|
|
17
|
+
command: 'dsh web',
|
|
18
|
+
description: '启动 Web UI 界面',
|
|
19
|
+
tips: [
|
|
20
|
+
'关闭对话:直接关闭浏览器标签页',
|
|
21
|
+
'继续上次对话:重新运行 dsh web,自动恢复上次会话',
|
|
22
|
+
'根据 session id 对话:先运行 dsh session list 查看会话列表,再使用 dsh web --session <session-id>',
|
|
23
|
+
],
|
|
24
|
+
},
|
|
25
|
+
|
|
26
|
+
// 会话管理
|
|
27
|
+
sessionManagement: {
|
|
28
|
+
export: 'dsh session export <session-id> -o session.json',
|
|
29
|
+
import: 'dsh session import session.json',
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
install: {
|
|
33
|
+
// npm 全局安装
|
|
34
|
+
npm: {
|
|
35
|
+
display: `# Install globally via npm
|
|
36
|
+
npm install -g @deepseek-ai/dsh
|
|
37
|
+
|
|
38
|
+
# Verify installation
|
|
39
|
+
dsh --version`,
|
|
40
|
+
pkg: '@deepseek-ai/dsh',
|
|
41
|
+
verify: 'dsh --version',
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
// git clone(开发者用)
|
|
45
|
+
git: {
|
|
46
|
+
display: `# Clone from GitHub
|
|
47
|
+
git clone https://github.com/deepseek-ai/deepseek-harness
|
|
48
|
+
cd deepseek-harness
|
|
49
|
+
|
|
50
|
+
# Install dependencies
|
|
51
|
+
npm install
|
|
52
|
+
|
|
53
|
+
# Run in development mode
|
|
54
|
+
npm run dev`,
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
// 配置示例
|
|
59
|
+
config: `ui-onboarding:
|
|
60
|
+
welcomeNoticeVersion: 2026-08-13.1
|
|
61
|
+
llm-pi-ai:
|
|
62
|
+
providers:
|
|
63
|
+
blues-liu:
|
|
64
|
+
displayName: blues-liu
|
|
65
|
+
apiKeyEnv: BLUES_LIU_API_KEY
|
|
66
|
+
api: openai-completions
|
|
67
|
+
baseURL: http://7.237.94.74:32527/v1
|
|
68
|
+
models:
|
|
69
|
+
- id: maas-glm-5.1-zhipu
|
|
70
|
+
name: maas-glm-5.1-zhipu
|
|
71
|
+
agent-default-model:
|
|
72
|
+
provider: blues-liu
|
|
73
|
+
model: maas-glm-5.1-zhipu`,
|
|
74
|
+
configFilename: '~/.dsh/settings.yaml',
|
|
75
|
+
configFormat: 'yaml',
|
|
76
|
+
|
|
77
|
+
// 切换模型
|
|
78
|
+
modelSwitch: '修改配置文件中 agent-default-model.model 字段',
|
|
79
|
+
|
|
80
|
+
// 相关链接
|
|
81
|
+
links: [
|
|
82
|
+
{ labelKey: 'harness.tools.dsh.links.0', url: 'https://deepseek.com' },
|
|
83
|
+
{ labelKey: 'harness.tools.dsh.links.1', url: 'https://github.com/deepseek-ai/deepseek-harness' },
|
|
84
|
+
{ labelKey: 'harness.tools.dsh.links.2', url: 'https://deepseek-harness.github.io/deepseek-harness/en/guide/quickstart' },
|
|
85
|
+
],
|
|
86
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Hermes Agent 配置
|
|
2
|
+
export default {
|
|
3
|
+
id: 'hermes',
|
|
4
|
+
nameKey: 'harness.tools.hermes.name',
|
|
5
|
+
taglineKey: 'harness.tools.hermes.tagline',
|
|
6
|
+
descriptionKey: 'harness.tools.hermes.description',
|
|
7
|
+
badgeKey: 'harness.tools.hermes.badge',
|
|
8
|
+
|
|
9
|
+
// 环境依赖
|
|
10
|
+
requirements: {
|
|
11
|
+
node: '>=18.0.0',
|
|
12
|
+
envVars: ['BLUES_LIU_API_KEY'],
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
// 启动方式
|
|
16
|
+
startup: {
|
|
17
|
+
command: 'hermes chat',
|
|
18
|
+
description: '启动 CLI 交互界面',
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
install: {
|
|
22
|
+
// curl 一键安装
|
|
23
|
+
curl: {
|
|
24
|
+
display: `# One-line install via curl
|
|
25
|
+
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
|
|
26
|
+
|
|
27
|
+
# Reload shell environment
|
|
28
|
+
source ~/.bashrc
|
|
29
|
+
|
|
30
|
+
# Verify installation
|
|
31
|
+
hermes --version`,
|
|
32
|
+
copy: {
|
|
33
|
+
unix: 'curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash && source ~/.bashrc && hermes --version',
|
|
34
|
+
windows: 'curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash; source ~/.bashrc; hermes --version',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
// 配置示例
|
|
40
|
+
config: `model:
|
|
41
|
+
default: maas-glm-5.1-zhipu
|
|
42
|
+
provider: custom
|
|
43
|
+
base_url: http://7.237.94.74:32527/v1
|
|
44
|
+
api_mode: openai_completions
|
|
45
|
+
api_key: bluesliusharing`,
|
|
46
|
+
configFilename: '~/.hermes/config.yaml',
|
|
47
|
+
configFormat: 'yaml',
|
|
48
|
+
|
|
49
|
+
// 切换模型
|
|
50
|
+
modelSwitch: 'hermes chat -m <model-name> 或修改配置文件 model.default',
|
|
51
|
+
|
|
52
|
+
// 相关链接
|
|
53
|
+
links: [
|
|
54
|
+
{ labelKey: 'harness.tools.hermes.links.0', url: 'https://github.com/NousResearch/hermes-agent' },
|
|
55
|
+
],
|
|
56
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import dsh from './dsh.js'
|
|
2
|
+
import opencode from './opencode.js'
|
|
3
|
+
import codex from './codex.js'
|
|
4
|
+
import claude from './claude.js'
|
|
5
|
+
import hermes from './hermes.js'
|
|
6
|
+
|
|
7
|
+
export const harnessTools = [
|
|
8
|
+
dsh,
|
|
9
|
+
opencode,
|
|
10
|
+
codex,
|
|
11
|
+
claude,
|
|
12
|
+
hermes,
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
// npm 镜像源配置
|
|
16
|
+
export const npmMirrors = [
|
|
17
|
+
{ labelKey: 'harness.mirrors.official', value: '' },
|
|
18
|
+
{ labelKey: 'harness.mirrors.taobao', value: 'https://registry.npmmirror.com' },
|
|
19
|
+
{ labelKey: 'harness.mirrors.huawei', value: 'https://mirrors.tools.huawei.com/npm/' },
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
export default harnessTools
|