@starlink-awaken/agentmesh 1.2.5 → 1.2.6
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/src/cli/connect.js +9 -8
- package/dist/src/cli.js +1 -1
- package/package.json +1 -1
package/dist/src/cli/connect.js
CHANGED
|
@@ -30,33 +30,34 @@ function backupFile(originalPath) {
|
|
|
30
30
|
return backupPath;
|
|
31
31
|
}
|
|
32
32
|
// TOML 简单序列化(够用,不引入额外依赖)
|
|
33
|
-
function toToml(obj,
|
|
33
|
+
function toToml(obj, parentKey = '') {
|
|
34
34
|
const lines = [];
|
|
35
35
|
for (const [key, value] of Object.entries(obj)) {
|
|
36
36
|
if (value === null || value === undefined)
|
|
37
37
|
continue;
|
|
38
|
+
const fullKey = parentKey ? `${parentKey}.${key}` : key;
|
|
38
39
|
if (typeof value === 'object' && !Array.isArray(value)) {
|
|
39
|
-
lines.push(
|
|
40
|
-
lines.push(toToml(value,
|
|
40
|
+
lines.push(`[${fullKey}]`);
|
|
41
|
+
lines.push(toToml(value, fullKey));
|
|
41
42
|
}
|
|
42
43
|
else if (Array.isArray(value)) {
|
|
43
44
|
for (const item of value) {
|
|
44
45
|
if (typeof item === 'string') {
|
|
45
|
-
lines.push(`${
|
|
46
|
+
lines.push(`${key} = "${item}"`);
|
|
46
47
|
}
|
|
47
48
|
else {
|
|
48
|
-
lines.push(`${
|
|
49
|
+
lines.push(`${key} = ${JSON.stringify(item)}`);
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
else if (typeof value === 'string') {
|
|
53
|
-
lines.push(`${
|
|
54
|
+
lines.push(`${key} = "${value}"`);
|
|
54
55
|
}
|
|
55
56
|
else if (typeof value === 'boolean') {
|
|
56
|
-
lines.push(`${
|
|
57
|
+
lines.push(`${key} = ${value}`);
|
|
57
58
|
}
|
|
58
59
|
else {
|
|
59
|
-
lines.push(`${
|
|
60
|
+
lines.push(`${key} = ${value}`);
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
63
|
return lines.join('\n');
|
package/dist/src/cli.js
CHANGED
|
@@ -7,7 +7,7 @@ import { existsSync, readFileSync } from 'node:fs';
|
|
|
7
7
|
import { resolve, dirname, join } from 'node:path';
|
|
8
8
|
import { initLogger } from './core/logger.js';
|
|
9
9
|
const PROJECT_ROOT = resolve(dirname(import.meta.dir), '..');
|
|
10
|
-
const VERSION = '1.2.
|
|
10
|
+
const VERSION = '1.2.6';
|
|
11
11
|
const BANNER = `
|
|
12
12
|
█████╗ ██████╗ ███████╗███╗ ██╗████████╗
|
|
13
13
|
██╔══██╗██╔════╝ ██╔════╝████╗ ██║╚══██╔══╝
|