ccman 3.3.22 → 3.3.23
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 +40 -18
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -9,6 +9,33 @@ var __export = (target, all) => {
|
|
|
9
9
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
+
// ../core/dist/version.js
|
|
13
|
+
import { existsSync, readFileSync } from "fs";
|
|
14
|
+
import { dirname, join } from "path";
|
|
15
|
+
import { fileURLToPath } from "url";
|
|
16
|
+
function resolveVersionFromRuntimeDir(runtimeDir) {
|
|
17
|
+
const candidates = [join(runtimeDir, "../package.json"), join(runtimeDir, "../../package.json")];
|
|
18
|
+
for (const packageJsonPath of candidates) {
|
|
19
|
+
if (!existsSync(packageJsonPath)) {
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
const pkg = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
|
|
23
|
+
if (typeof pkg.version === "string" && pkg.version.length > 0) {
|
|
24
|
+
return pkg.version;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
throw new Error(`Unable to resolve package.json version from runtime dir: ${runtimeDir}`);
|
|
28
|
+
}
|
|
29
|
+
function loadVersion(moduleUrl = import.meta.url) {
|
|
30
|
+
const runtimeDir = dirname(fileURLToPath(moduleUrl));
|
|
31
|
+
return resolveVersionFromRuntimeDir(runtimeDir);
|
|
32
|
+
}
|
|
33
|
+
var init_version = __esm({
|
|
34
|
+
"../core/dist/version.js"() {
|
|
35
|
+
"use strict";
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
12
39
|
// ../types/dist/index.js
|
|
13
40
|
var TOOL_TYPES, MAIN_TOOL_TYPES, TOOL_CONFIG;
|
|
14
41
|
var init_dist = __esm({
|
|
@@ -242,7 +269,7 @@ var init_template = __esm({
|
|
|
242
269
|
// ../core/dist/writers/codex.js
|
|
243
270
|
import * as fs2 from "fs";
|
|
244
271
|
import * as path3 from "path";
|
|
245
|
-
import { fileURLToPath } from "url";
|
|
272
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
246
273
|
import { parse as parseToml, stringify as stringifyToml } from "@iarna/toml";
|
|
247
274
|
function resolveTemplatePath(relativePath) {
|
|
248
275
|
const candidates = [
|
|
@@ -371,7 +398,7 @@ var init_codex = __esm({
|
|
|
371
398
|
init_paths();
|
|
372
399
|
init_file();
|
|
373
400
|
init_template();
|
|
374
|
-
__filename =
|
|
401
|
+
__filename = fileURLToPath2(import.meta.url);
|
|
375
402
|
__dirname = path3.dirname(__filename);
|
|
376
403
|
CODEX_DEFAULT_CONFIG = {
|
|
377
404
|
model: "gpt-5.4",
|
|
@@ -437,7 +464,7 @@ var init_codex = __esm({
|
|
|
437
464
|
// ../core/dist/writers/claude.js
|
|
438
465
|
import * as fs3 from "fs";
|
|
439
466
|
import * as path4 from "path";
|
|
440
|
-
import { fileURLToPath as
|
|
467
|
+
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
441
468
|
function resolveTemplatePath2(relativePath) {
|
|
442
469
|
const candidates = [
|
|
443
470
|
// @ccman/core runtime (dist/writers -> templates)
|
|
@@ -494,7 +521,7 @@ var init_claude = __esm({
|
|
|
494
521
|
init_paths();
|
|
495
522
|
init_file();
|
|
496
523
|
init_template();
|
|
497
|
-
__filename2 =
|
|
524
|
+
__filename2 = fileURLToPath3(import.meta.url);
|
|
498
525
|
__dirname2 = path4.dirname(__filename2);
|
|
499
526
|
CLAUDE_CONFIG_TEMPLATE = {
|
|
500
527
|
env: {
|
|
@@ -834,7 +861,7 @@ var init_openclaw = __esm({
|
|
|
834
861
|
// ../core/dist/writers/gemini.js
|
|
835
862
|
import * as fs5 from "fs";
|
|
836
863
|
import * as path6 from "path";
|
|
837
|
-
import { fileURLToPath as
|
|
864
|
+
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
838
865
|
function resolveTemplatePath3(relativePath) {
|
|
839
866
|
const candidates = [
|
|
840
867
|
// @ccman/core runtime (dist/writers -> templates)
|
|
@@ -994,7 +1021,7 @@ var init_gemini2 = __esm({
|
|
|
994
1021
|
init_paths();
|
|
995
1022
|
init_file();
|
|
996
1023
|
init_template();
|
|
997
|
-
__filename3 =
|
|
1024
|
+
__filename3 = fileURLToPath4(import.meta.url);
|
|
998
1025
|
__dirname3 = path6.dirname(__filename3);
|
|
999
1026
|
GEMINI_SETTINGS_TEMPLATE = {
|
|
1000
1027
|
ide: {
|
|
@@ -1017,7 +1044,7 @@ var init_gemini2 = __esm({
|
|
|
1017
1044
|
// ../core/dist/writers/opencode.js
|
|
1018
1045
|
import * as fs6 from "fs";
|
|
1019
1046
|
import * as path7 from "path";
|
|
1020
|
-
import { fileURLToPath as
|
|
1047
|
+
import { fileURLToPath as fileURLToPath5 } from "url";
|
|
1021
1048
|
function resolveTemplatePath4(relativePath) {
|
|
1022
1049
|
const candidates = [
|
|
1023
1050
|
// @ccman/core runtime (dist/writers -> templates)
|
|
@@ -1151,7 +1178,7 @@ var init_opencode2 = __esm({
|
|
|
1151
1178
|
OPENCODE_MODEL = "openai/gpt-5.4";
|
|
1152
1179
|
OPENCODE_MODEL_KEY = "gpt-5.4";
|
|
1153
1180
|
OPENCODE_SECONDARY_MODEL_KEY = "gpt-5.3-codex";
|
|
1154
|
-
__filename4 =
|
|
1181
|
+
__filename4 = fileURLToPath5(import.meta.url);
|
|
1155
1182
|
__dirname4 = path7.dirname(__filename4);
|
|
1156
1183
|
DEFAULT_MODELS = {
|
|
1157
1184
|
[OPENCODE_MODEL_KEY]: {
|
|
@@ -1210,7 +1237,7 @@ var init_opencode2 = __esm({
|
|
|
1210
1237
|
// ../core/dist/writers/openclaw.js
|
|
1211
1238
|
import * as fs7 from "fs";
|
|
1212
1239
|
import * as path8 from "path";
|
|
1213
|
-
import { fileURLToPath as
|
|
1240
|
+
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
1214
1241
|
function resolveTemplatePath5(relativePath) {
|
|
1215
1242
|
const candidates = [
|
|
1216
1243
|
// @ccman/core runtime (dist/writers -> templates)
|
|
@@ -1381,7 +1408,7 @@ var init_openclaw2 = __esm({
|
|
|
1381
1408
|
SECONDARY_MODEL_ID = "gpt-5.3-codex";
|
|
1382
1409
|
PRIMARY_MODEL_INPUTS = ["text", "image"];
|
|
1383
1410
|
SECONDARY_MODEL_INPUTS = ["text", "image"];
|
|
1384
|
-
__filename5 =
|
|
1411
|
+
__filename5 = fileURLToPath6(import.meta.url);
|
|
1385
1412
|
__dirname5 = path8.dirname(__filename5);
|
|
1386
1413
|
OPENCLAW_CONFIG_TEMPLATE = {
|
|
1387
1414
|
models: {
|
|
@@ -2872,13 +2899,11 @@ var init_claude_clean = __esm({
|
|
|
2872
2899
|
});
|
|
2873
2900
|
|
|
2874
2901
|
// ../core/dist/index.js
|
|
2875
|
-
|
|
2876
|
-
import { join as join5, dirname as dirname7 } from "path";
|
|
2877
|
-
import { fileURLToPath as fileURLToPath6 } from "url";
|
|
2878
|
-
var __filename6, __dirname6, pkg, VERSION;
|
|
2902
|
+
var VERSION;
|
|
2879
2903
|
var init_dist2 = __esm({
|
|
2880
2904
|
"../core/dist/index.js"() {
|
|
2881
2905
|
"use strict";
|
|
2906
|
+
init_version();
|
|
2882
2907
|
init_constants();
|
|
2883
2908
|
init_tool_manager();
|
|
2884
2909
|
init_codex2();
|
|
@@ -2897,10 +2922,7 @@ var init_dist2 = __esm({
|
|
|
2897
2922
|
init_merge_advanced();
|
|
2898
2923
|
init_export();
|
|
2899
2924
|
init_claude_clean();
|
|
2900
|
-
|
|
2901
|
-
__dirname6 = dirname7(__filename6);
|
|
2902
|
-
pkg = JSON.parse(readFileSync10(join5(__dirname6, "../../package.json"), "utf-8"));
|
|
2903
|
-
VERSION = pkg.version;
|
|
2925
|
+
VERSION = loadVersion();
|
|
2904
2926
|
}
|
|
2905
2927
|
});
|
|
2906
2928
|
|