ccman 3.3.24 → 3.3.25
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 +12 -8
- package/dist/index.js +42 -34
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -226,32 +226,36 @@ ccman mcp remove # 删除 MCP 服务器
|
|
|
226
226
|
|
|
227
227
|
添加服务商时可以选择"使用预设模板",只需填写 API Key:
|
|
228
228
|
|
|
229
|
-
### Claude Code 预设(
|
|
229
|
+
### Claude Code 预设(3 个)
|
|
230
230
|
|
|
231
|
-
| 预设名称 | Base URL
|
|
232
|
-
| ------------------ |
|
|
233
|
-
| Anthropic Official | `https://api.anthropic.com`
|
|
234
|
-
| GMN | `https://gmn.chuangzuoli.com
|
|
231
|
+
| 预设名称 | Base URL |
|
|
232
|
+
| ------------------ | --------------------------- |
|
|
233
|
+
| Anthropic Official | `https://api.anthropic.com` |
|
|
234
|
+
| GMN | `https://gmn.chuangzuoli.com` |
|
|
235
|
+
| GMN1 | `https://gmncode.cn` |
|
|
235
236
|
|
|
236
|
-
### Gemini CLI 预设(
|
|
237
|
+
### Gemini CLI 预设(3 个)
|
|
237
238
|
|
|
238
239
|
| 预设名称 | Base URL |
|
|
239
240
|
| ----------------------- | ----------------------------- |
|
|
240
241
|
| Google Gemini (API Key) | 官方默认 |
|
|
241
242
|
| GMN | `https://gmn.chuangzuoli.com` |
|
|
243
|
+
| GMN1 | `https://gmncode.cn` |
|
|
242
244
|
|
|
243
|
-
### Codex 预设(
|
|
245
|
+
### Codex 预设(3 个)
|
|
244
246
|
|
|
245
247
|
| 预设名称 | Base URL |
|
|
246
248
|
| --------------- | ----------------------------- |
|
|
247
249
|
| OpenAI Official | `https://api.openai.com/v1` |
|
|
248
250
|
| GMN | `https://gmn.chuangzuoli.com` |
|
|
251
|
+
| GMN1 | `https://gmncode.cn` |
|
|
249
252
|
|
|
250
|
-
### OpenCode 预设(
|
|
253
|
+
### OpenCode 预设(2 个)
|
|
251
254
|
|
|
252
255
|
| 预设名称 | Base URL |
|
|
253
256
|
| -------- | ----------------------------- |
|
|
254
257
|
| GMN | `https://gmn.chuangzuoli.com` |
|
|
258
|
+
| GMN1 | `https://gmncode.cn` |
|
|
255
259
|
|
|
256
260
|
### MCP 预设(多个)
|
|
257
261
|
|
package/dist/index.js
CHANGED
|
@@ -698,22 +698,43 @@ var init_mcp = __esm({
|
|
|
698
698
|
}
|
|
699
699
|
});
|
|
700
700
|
|
|
701
|
+
// ../core/dist/presets/gmn.js
|
|
702
|
+
function createDualGmnPresets(transformBaseUrl = (baseUrl) => baseUrl) {
|
|
703
|
+
return [
|
|
704
|
+
{
|
|
705
|
+
name: "GMN",
|
|
706
|
+
baseUrl: transformBaseUrl(GMN_ROOT_URL),
|
|
707
|
+
description: "GMN \u4E3B\u57DF\u540D\u7EBF\u8DEF (gmn.chuangzuoli.com)"
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
name: "GMN1",
|
|
711
|
+
baseUrl: transformBaseUrl(GMN1_ROOT_URL),
|
|
712
|
+
description: "GMN1 \u5907\u7528\u57DF\u540D\u7EBF\u8DEF (gmncode.cn)"
|
|
713
|
+
}
|
|
714
|
+
];
|
|
715
|
+
}
|
|
716
|
+
var GMN_ROOT_URL, GMN1_ROOT_URL;
|
|
717
|
+
var init_gmn = __esm({
|
|
718
|
+
"../core/dist/presets/gmn.js"() {
|
|
719
|
+
"use strict";
|
|
720
|
+
GMN_ROOT_URL = "https://gmn.chuangzuoli.com";
|
|
721
|
+
GMN1_ROOT_URL = "https://gmncode.cn";
|
|
722
|
+
}
|
|
723
|
+
});
|
|
724
|
+
|
|
701
725
|
// ../core/dist/presets/codex.js
|
|
702
726
|
var CODEX_PRESETS;
|
|
703
727
|
var init_codex2 = __esm({
|
|
704
728
|
"../core/dist/presets/codex.js"() {
|
|
705
729
|
"use strict";
|
|
730
|
+
init_gmn();
|
|
706
731
|
CODEX_PRESETS = [
|
|
707
732
|
{
|
|
708
733
|
name: "OpenAI Official",
|
|
709
734
|
baseUrl: "https://api.openai.com/v1",
|
|
710
735
|
description: "OpenAI \u5B98\u65B9 API"
|
|
711
736
|
},
|
|
712
|
-
|
|
713
|
-
name: "GMN",
|
|
714
|
-
baseUrl: "https://gmn.chuangzuoli.com",
|
|
715
|
-
description: "GMN \u670D\u52A1 (OpenAI/Codex \u517C\u5BB9)"
|
|
716
|
-
}
|
|
737
|
+
...createDualGmnPresets()
|
|
717
738
|
];
|
|
718
739
|
}
|
|
719
740
|
});
|
|
@@ -723,17 +744,14 @@ var CC_PRESETS;
|
|
|
723
744
|
var init_claude2 = __esm({
|
|
724
745
|
"../core/dist/presets/claude.js"() {
|
|
725
746
|
"use strict";
|
|
747
|
+
init_gmn();
|
|
726
748
|
CC_PRESETS = [
|
|
727
749
|
{
|
|
728
750
|
name: "Anthropic Official",
|
|
729
751
|
baseUrl: "https://api.anthropic.com",
|
|
730
752
|
description: "Anthropic \u5B98\u65B9 API"
|
|
731
753
|
},
|
|
732
|
-
|
|
733
|
-
name: "GMN",
|
|
734
|
-
baseUrl: "https://gmn.chuangzuoli.com/api",
|
|
735
|
-
description: "GMN \u670D\u52A1 (Claude \u517C\u5BB9)"
|
|
736
|
-
}
|
|
754
|
+
...createDualGmnPresets()
|
|
737
755
|
];
|
|
738
756
|
}
|
|
739
757
|
});
|
|
@@ -813,17 +831,14 @@ var GEMINI_PRESETS;
|
|
|
813
831
|
var init_gemini = __esm({
|
|
814
832
|
"../core/dist/presets/gemini.js"() {
|
|
815
833
|
"use strict";
|
|
834
|
+
init_gmn();
|
|
816
835
|
GEMINI_PRESETS = [
|
|
817
836
|
{
|
|
818
837
|
name: "Google Gemini (API Key)",
|
|
819
838
|
baseUrl: "",
|
|
820
839
|
description: "\u4F7F\u7528\u5B98\u65B9 Gemini API\uFF08\u901A\u8FC7 GEMINI_API_KEY \u6216 GOOGLE_API_KEY \u8BA4\u8BC1\uFF09"
|
|
821
840
|
},
|
|
822
|
-
|
|
823
|
-
name: "GMN",
|
|
824
|
-
baseUrl: "https://gmn.chuangzuoli.com",
|
|
825
|
-
description: "GMN \u670D\u52A1 (Gemini \u517C\u5BB9)"
|
|
826
|
-
}
|
|
841
|
+
...createDualGmnPresets()
|
|
827
842
|
];
|
|
828
843
|
}
|
|
829
844
|
});
|
|
@@ -833,13 +848,8 @@ var OPENCODE_PRESETS;
|
|
|
833
848
|
var init_opencode = __esm({
|
|
834
849
|
"../core/dist/presets/opencode.js"() {
|
|
835
850
|
"use strict";
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
name: "GMN",
|
|
839
|
-
baseUrl: "https://gmn.chuangzuoli.com",
|
|
840
|
-
description: "GMN \u670D\u52A1 (OpenCode \u517C\u5BB9)"
|
|
841
|
-
}
|
|
842
|
-
];
|
|
851
|
+
init_gmn();
|
|
852
|
+
OPENCODE_PRESETS = [...createDualGmnPresets()];
|
|
843
853
|
}
|
|
844
854
|
});
|
|
845
855
|
|
|
@@ -848,12 +858,9 @@ var OPENCLAW_PRESETS;
|
|
|
848
858
|
var init_openclaw = __esm({
|
|
849
859
|
"../core/dist/presets/openclaw.js"() {
|
|
850
860
|
"use strict";
|
|
861
|
+
init_gmn();
|
|
851
862
|
OPENCLAW_PRESETS = [
|
|
852
|
-
{
|
|
853
|
-
name: "GMN",
|
|
854
|
-
baseUrl: "https://gmn.chuangzuoli.com/v1",
|
|
855
|
-
description: "GMN \u670D\u52A1 (OpenClaw \u517C\u5BB9)"
|
|
856
|
-
}
|
|
863
|
+
...createDualGmnPresets((baseUrl) => `${baseUrl}/v1`)
|
|
857
864
|
];
|
|
858
865
|
}
|
|
859
866
|
});
|
|
@@ -7265,6 +7272,7 @@ function pickDefaultEndpoint(results) {
|
|
|
7265
7272
|
var GMN_PROFILE = {
|
|
7266
7273
|
commandName: "gmn",
|
|
7267
7274
|
title: "GMN",
|
|
7275
|
+
defaultProviderName: "gmn",
|
|
7268
7276
|
endpointGroupLabel: "GMN \u57DF\u540D\u7EBF\u8DEF",
|
|
7269
7277
|
endpointGroupDescription: "\u4EC5\u5305\u542B\u4E3B\u57DF\u540D\u548C CDN \u7684 2 \u6761\u5730\u5740",
|
|
7270
7278
|
baseUrls: [
|
|
@@ -7283,6 +7291,7 @@ var GMN_PROFILE = {
|
|
|
7283
7291
|
var GMN1_PROFILE = {
|
|
7284
7292
|
commandName: "gmn1",
|
|
7285
7293
|
title: "GMN1",
|
|
7294
|
+
defaultProviderName: "gmn1",
|
|
7286
7295
|
endpointGroupLabel: "\u6269\u5C55\u52A0\u901F\u7EBF\u8DEF",
|
|
7287
7296
|
endpointGroupDescription: "\u5305\u542B\u9664 chuangzuoli \u4E4B\u5916\u7684\u5176\u4F59 5 \u6761\u5730\u5740",
|
|
7288
7297
|
baseUrls: [
|
|
@@ -7322,7 +7331,6 @@ function formatEndpointChoiceLabel(result, index) {
|
|
|
7322
7331
|
}
|
|
7323
7332
|
|
|
7324
7333
|
// src/commands/gmn.ts
|
|
7325
|
-
var DEFAULT_PROVIDER_NAME2 = "gmn";
|
|
7326
7334
|
var VALID_PLATFORMS = ["codex", "opencode", "openclaw"];
|
|
7327
7335
|
var DEFAULT_PLATFORMS = ["codex", "opencode"];
|
|
7328
7336
|
var TOTAL_STEPS = 4;
|
|
@@ -7521,16 +7529,16 @@ async function resolveOpenAiBaseUrl(profile, platforms, baseUrlArg) {
|
|
|
7521
7529
|
]);
|
|
7522
7530
|
return answers.baseUrl;
|
|
7523
7531
|
}
|
|
7524
|
-
function resolveProviderName2(providerNameArg) {
|
|
7532
|
+
function resolveProviderName2(profile, providerNameArg) {
|
|
7525
7533
|
if (providerNameArg === void 0) {
|
|
7526
|
-
return
|
|
7534
|
+
return profile.defaultProviderName;
|
|
7527
7535
|
}
|
|
7528
7536
|
const providerName = providerNameArg.trim();
|
|
7529
7537
|
if (!providerName) {
|
|
7530
7538
|
throw new Error("\u670D\u52A1\u5546\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A");
|
|
7531
7539
|
}
|
|
7532
|
-
if (providerName.toLowerCase() ===
|
|
7533
|
-
return
|
|
7540
|
+
if (providerName.toLowerCase() === profile.defaultProviderName) {
|
|
7541
|
+
return profile.defaultProviderName;
|
|
7534
7542
|
}
|
|
7535
7543
|
return providerName;
|
|
7536
7544
|
}
|
|
@@ -7618,7 +7626,7 @@ async function runGmnCommand(profile, apiKey, platformArg, providerNameArg, base
|
|
|
7618
7626
|
console.log(chalk54.cyan(`
|
|
7619
7627
|
${renderStep(1, TOTAL_STEPS, "\u9009\u62E9\u8981\u914D\u7F6E\u7684\u5DE5\u5177")}`));
|
|
7620
7628
|
platforms = await resolvePlatforms(platformArg, profile.title);
|
|
7621
|
-
providerName = resolveProviderName2(providerNameArg);
|
|
7629
|
+
providerName = resolveProviderName2(profile, providerNameArg);
|
|
7622
7630
|
} catch (error) {
|
|
7623
7631
|
console.error(chalk54.red(`\u274C ${error.message}`));
|
|
7624
7632
|
process.exit(1);
|
|
@@ -7850,7 +7858,7 @@ importCommand(program);
|
|
|
7850
7858
|
program.command("gmn [apiKey]").description("\u914D\u7F6E GMN \u5230 Codex\u3001OpenCode\u3001OpenClaw\uFF08\u6D4B\u901F\u5E76\u9009\u62E9\u6700\u4F4E\u5EF6\u8FDF\u8DEF\u7EBF\uFF09").option("-p, --platform <platforms>", "\u6307\u5B9A\u5E73\u53F0 (codex,opencode,openclaw,all)").option("-n, --name <providerName>", "\u6307\u5B9A\u670D\u52A1\u5546\u540D\u79F0\uFF08\u9ED8\u8BA4: gmn\uFF09").option("-b, --base-url <baseUrl>", "\u6307\u5B9A Base URL\uFF1B\u4E0D\u6307\u5B9A\u65F6\u81EA\u52A8\u6D4B\u901F\u5E76\u53EF\u624B\u52A8\u5207\u6362").action(async (apiKey, options) => {
|
|
7851
7859
|
await gmnCommand(apiKey, options.platform, options.name, options.baseUrl);
|
|
7852
7860
|
});
|
|
7853
|
-
program.command("gmn1 [apiKey]").alias("gmncode").description("\u914D\u7F6E GMN1 \u5230 Codex\u3001OpenCode\u3001OpenClaw\uFF08\u6D4B\u901F\u5E76\u9009\u62E9\u6700\u4F4E\u5EF6\u8FDF\u8DEF\u7EBF\uFF09").option("-p, --platform <platforms>", "\u6307\u5B9A\u5E73\u53F0 (codex,opencode,openclaw,all)").option("-n, --name <providerName>", "\u6307\u5B9A\u670D\u52A1\u5546\u540D\u79F0\uFF08\u9ED8\u8BA4:
|
|
7861
|
+
program.command("gmn1 [apiKey]").alias("gmncode").description("\u914D\u7F6E GMN1 \u5230 Codex\u3001OpenCode\u3001OpenClaw\uFF08\u6D4B\u901F\u5E76\u9009\u62E9\u6700\u4F4E\u5EF6\u8FDF\u8DEF\u7EBF\uFF09").option("-p, --platform <platforms>", "\u6307\u5B9A\u5E73\u53F0 (codex,opencode,openclaw,all)").option("-n, --name <providerName>", "\u6307\u5B9A\u670D\u52A1\u5546\u540D\u79F0\uFF08\u9ED8\u8BA4: gmn1\uFF09").option("-b, --base-url <baseUrl>", "\u6307\u5B9A Base URL\uFF1B\u4E0D\u6307\u5B9A\u65F6\u81EA\u52A8\u6D4B\u901F\u5E76\u53EF\u624B\u52A8\u5207\u6362").action(async (apiKey, options) => {
|
|
7854
7862
|
await gmn1Command(apiKey, options.platform, options.name, options.baseUrl);
|
|
7855
7863
|
});
|
|
7856
7864
|
(async () => {
|