ccman 3.3.29 → 3.3.31
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/dist/index.js +19 -25
- package/dist/templates/codex/config.toml +0 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -326,6 +326,12 @@ function removeDeprecatedKeys(config) {
|
|
|
326
326
|
if ("network_access" in config) {
|
|
327
327
|
delete config.network_access;
|
|
328
328
|
}
|
|
329
|
+
if ("profile" in config) {
|
|
330
|
+
delete config.profile;
|
|
331
|
+
}
|
|
332
|
+
if ("profiles" in config) {
|
|
333
|
+
delete config.profiles;
|
|
334
|
+
}
|
|
329
335
|
}
|
|
330
336
|
function loadExistingCodexConfig(configPath) {
|
|
331
337
|
if (!fileExists(configPath)) {
|
|
@@ -428,7 +434,6 @@ var init_codex = __esm({
|
|
|
428
434
|
sandbox_mode: "danger-full-access",
|
|
429
435
|
windows_wsl_setup_acknowledged: true,
|
|
430
436
|
approval_policy: "never",
|
|
431
|
-
profile: "auto-max",
|
|
432
437
|
file_opener: "vscode",
|
|
433
438
|
web_search: "cached",
|
|
434
439
|
suppress_unstable_features_warning: true,
|
|
@@ -455,23 +460,12 @@ var init_codex = __esm({
|
|
|
455
460
|
fast_mode: true,
|
|
456
461
|
personality: true
|
|
457
462
|
},
|
|
458
|
-
profiles: {
|
|
459
|
-
"auto-max": {
|
|
460
|
-
approval_policy: "never",
|
|
461
|
-
sandbox_mode: "workspace-write"
|
|
462
|
-
},
|
|
463
|
-
review: {
|
|
464
|
-
approval_policy: "on-request",
|
|
465
|
-
sandbox_mode: "workspace-write"
|
|
466
|
-
}
|
|
467
|
-
},
|
|
468
463
|
notice: {
|
|
469
464
|
hide_gpt5_1_migration_prompt: true
|
|
470
465
|
}
|
|
471
466
|
};
|
|
472
467
|
GMN_PROVIDER_HOSTS = [
|
|
473
468
|
"ai.gmncode.com",
|
|
474
|
-
"cdn-gmn.chuangzuoli.com",
|
|
475
469
|
"gmncodex.com",
|
|
476
470
|
"gmncode.cn",
|
|
477
471
|
"cdn.gmncode.cn",
|
|
@@ -3871,7 +3865,7 @@ var init_sync = __esm({
|
|
|
3871
3865
|
});
|
|
3872
3866
|
|
|
3873
3867
|
// src/index.ts
|
|
3874
|
-
import { Command as Command3 } from "commander";
|
|
3868
|
+
import { Command as Command3, Option as Option2 } from "commander";
|
|
3875
3869
|
import chalk57 from "chalk";
|
|
3876
3870
|
|
|
3877
3871
|
// src/utils/logo.ts
|
|
@@ -7837,11 +7831,6 @@ var GMN_PROFILE = {
|
|
|
7837
7831
|
label: "GMN \u4E3B\u7AD9",
|
|
7838
7832
|
url: "https://ai.gmncode.com",
|
|
7839
7833
|
description: "GMN \u4E3B\u57DF\u540D\u5165\u53E3"
|
|
7840
|
-
},
|
|
7841
|
-
{
|
|
7842
|
-
label: "GMN CDN",
|
|
7843
|
-
url: "https://cdn-gmn.chuangzuoli.com",
|
|
7844
|
-
description: "GMN CDN \u52A0\u901F\u5165\u53E3"
|
|
7845
7834
|
}
|
|
7846
7835
|
]
|
|
7847
7836
|
};
|
|
@@ -7850,7 +7839,7 @@ var GMN1_PROFILE = {
|
|
|
7850
7839
|
title: "GMN1",
|
|
7851
7840
|
defaultProviderName: "gmn1",
|
|
7852
7841
|
endpointGroupLabel: "\u6269\u5C55\u52A0\u901F\u7EBF\u8DEF",
|
|
7853
|
-
endpointGroupDescription: "\u5305\u542B\u9664
|
|
7842
|
+
endpointGroupDescription: "\u5305\u542B\u9664 gmn\u4E3B\u7AD9 \u4E4B\u5916\u7684\u5176\u4F59 5 \u6761\u5730\u5740",
|
|
7854
7843
|
baseUrls: [
|
|
7855
7844
|
{
|
|
7856
7845
|
label: "\u963F\u91CC\u4E91 CDN",
|
|
@@ -8317,8 +8306,18 @@ async function gmn1Command(apiKey, platformArg, providerNameArg, baseUrlArg) {
|
|
|
8317
8306
|
await runGmnCommand(GMN1_PROFILE, apiKey, platformArg, providerNameArg, baseUrlArg);
|
|
8318
8307
|
}
|
|
8319
8308
|
|
|
8309
|
+
// src/utils/version-args.ts
|
|
8310
|
+
var ROOT_VERSION_FLAGS = /* @__PURE__ */ new Set(["-v", "-V", "--version"]);
|
|
8311
|
+
function isRootVersionRequest(args) {
|
|
8312
|
+
return args.length === 1 && ROOT_VERSION_FLAGS.has(args[0]);
|
|
8313
|
+
}
|
|
8314
|
+
|
|
8320
8315
|
// src/index.ts
|
|
8321
8316
|
init_dist2();
|
|
8317
|
+
if (isRootVersionRequest(process.argv.slice(2))) {
|
|
8318
|
+
console.log(VERSION);
|
|
8319
|
+
process.exit(0);
|
|
8320
|
+
}
|
|
8322
8321
|
if (process.env.NODE_ENV === "development") {
|
|
8323
8322
|
console.log(chalk57.gray("\n[\u5F00\u53D1\u6A21\u5F0F] \u914D\u7F6E\u76EE\u5F55:"));
|
|
8324
8323
|
console.log(chalk57.gray(` ccman: ${getCcmanDir()}`));
|
|
@@ -8329,12 +8328,7 @@ if (process.env.NODE_ENV === "development") {
|
|
|
8329
8328
|
console.log();
|
|
8330
8329
|
}
|
|
8331
8330
|
var program = new Command3();
|
|
8332
|
-
program.name("ccman").description("Codex/Claude Code/Gemini/OpenCode/OpenClaw API \u670D\u52A1\u5546\u914D\u7F6E\u7BA1\u7406\u5DE5\u5177").version(VERSION).
|
|
8333
|
-
if (err.code === "commander.helpDisplayed" || err.code === "commander.version") {
|
|
8334
|
-
process.exit(0);
|
|
8335
|
-
}
|
|
8336
|
-
throw err;
|
|
8337
|
-
});
|
|
8331
|
+
program.name("ccman").description("Codex/Claude Code/Gemini/OpenCode/OpenClaw API \u670D\u52A1\u5546\u914D\u7F6E\u7BA1\u7406\u5DE5\u5177").version(VERSION).addOption(new Option2("-v, --version", "output the version number").hideHelp()).showHelpAfterError(false);
|
|
8338
8332
|
program.on("command:*", (operands) => {
|
|
8339
8333
|
const unknownCommand = operands[0];
|
|
8340
8334
|
console.error(chalk57.red(`
|
|
@@ -9,7 +9,6 @@ disable_response_storage = true
|
|
|
9
9
|
sandbox_mode = "danger-full-access"
|
|
10
10
|
windows_wsl_setup_acknowledged = true
|
|
11
11
|
approval_policy = "never"
|
|
12
|
-
profile = "auto-max"
|
|
13
12
|
file_opener = "vscode"
|
|
14
13
|
model_provider = "gmn"
|
|
15
14
|
web_search = "cached"
|
|
@@ -38,14 +37,6 @@ shell_snapshot = true
|
|
|
38
37
|
fast_mode = true
|
|
39
38
|
personality = true
|
|
40
39
|
|
|
41
|
-
[profiles.auto-max]
|
|
42
|
-
approval_policy = "never"
|
|
43
|
-
sandbox_mode = "workspace-write"
|
|
44
|
-
|
|
45
|
-
[profiles.review]
|
|
46
|
-
approval_policy = "on-request"
|
|
47
|
-
sandbox_mode = "workspace-write"
|
|
48
|
-
|
|
49
40
|
[notice]
|
|
50
41
|
hide_gpt5_1_migration_prompt = true
|
|
51
42
|
|