claudemesh-cli 1.0.0-alpha.0 → 1.0.0-alpha.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/dist/entrypoints/cli.js +3853 -2934
- package/dist/entrypoints/cli.js.map +9 -5
- package/dist/entrypoints/mcp.js +63 -1
- package/dist/entrypoints/mcp.js.map +2 -2
- package/package.json +4 -4
package/dist/entrypoints/mcp.js
CHANGED
|
@@ -1004,6 +1004,10 @@ function readConfig() {
|
|
|
1004
1004
|
throw new Error(`Failed to load ${PATHS.CONFIG_FILE}: ${e instanceof Error ? e.message : String(e)}`);
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
|
+
function getMeshConfig(slug) {
|
|
1008
|
+
const config = readConfig();
|
|
1009
|
+
return config.meshes.find((m) => m.slug === slug);
|
|
1010
|
+
}
|
|
1007
1011
|
var init_read = __esm(() => {
|
|
1008
1012
|
init_paths();
|
|
1009
1013
|
});
|
|
@@ -1049,6 +1053,16 @@ function setMeshConfig(slug, mesh) {
|
|
|
1049
1053
|
}
|
|
1050
1054
|
writeConfig(config);
|
|
1051
1055
|
}
|
|
1056
|
+
function removeMeshConfig(slug) {
|
|
1057
|
+
const config = readConfig();
|
|
1058
|
+
const before = config.meshes.length;
|
|
1059
|
+
config.meshes = config.meshes.filter((m) => m.slug !== slug);
|
|
1060
|
+
if (config.meshes.length < before) {
|
|
1061
|
+
writeConfig(config);
|
|
1062
|
+
return true;
|
|
1063
|
+
}
|
|
1064
|
+
return false;
|
|
1065
|
+
}
|
|
1052
1066
|
var isWindows;
|
|
1053
1067
|
var init_write = __esm(() => {
|
|
1054
1068
|
init_paths();
|
|
@@ -1057,6 +1071,17 @@ var init_write = __esm(() => {
|
|
|
1057
1071
|
});
|
|
1058
1072
|
|
|
1059
1073
|
// src/services/config/facade.ts
|
|
1074
|
+
var exports_facade = {};
|
|
1075
|
+
__export(exports_facade, {
|
|
1076
|
+
writeConfig: () => writeConfig,
|
|
1077
|
+
setMeshConfig: () => setMeshConfig,
|
|
1078
|
+
removeMeshConfig: () => removeMeshConfig,
|
|
1079
|
+
readConfig: () => readConfig,
|
|
1080
|
+
getMeshConfig: () => getMeshConfig,
|
|
1081
|
+
getConfigPath: () => getConfigPath,
|
|
1082
|
+
ensureConfigDir: () => ensureConfigDir,
|
|
1083
|
+
emptyConfig: () => emptyConfig
|
|
1084
|
+
});
|
|
1060
1085
|
function getConfigPath() {
|
|
1061
1086
|
return PATHS.CONFIG_FILE;
|
|
1062
1087
|
}
|
|
@@ -1175,14 +1200,51 @@ var init_box = __esm(() => {
|
|
|
1175
1200
|
});
|
|
1176
1201
|
|
|
1177
1202
|
// src/services/crypto/random.ts
|
|
1203
|
+
async function randomBytes(n) {
|
|
1204
|
+
const s = await ensureSodium();
|
|
1205
|
+
return s.randombytes_buf(n);
|
|
1206
|
+
}
|
|
1207
|
+
async function randomHex(n) {
|
|
1208
|
+
const s = await ensureSodium();
|
|
1209
|
+
return s.to_hex(s.randombytes_buf(n));
|
|
1210
|
+
}
|
|
1178
1211
|
var init_random = __esm(() => {
|
|
1179
1212
|
init_keypair();
|
|
1180
1213
|
});
|
|
1181
1214
|
|
|
1182
1215
|
// src/services/crypto/facade.ts
|
|
1216
|
+
var exports_facade2 = {};
|
|
1217
|
+
__export(exports_facade2, {
|
|
1218
|
+
verify: () => verify,
|
|
1219
|
+
sign: () => sign,
|
|
1220
|
+
randomHex: () => randomHex,
|
|
1221
|
+
randomBytes: () => randomBytes,
|
|
1222
|
+
isDirectTarget: () => isDirectTarget,
|
|
1223
|
+
generateKeypair: () => generateKeypair2,
|
|
1224
|
+
ensureSodium: () => ensureSodium,
|
|
1225
|
+
encryptDirect: () => encryptDirect,
|
|
1226
|
+
encrypt: () => encryptFile,
|
|
1227
|
+
decryptDirect: () => decryptDirect,
|
|
1228
|
+
decrypt: () => decryptFile,
|
|
1229
|
+
boxSeal: () => sealKeyForPeer,
|
|
1230
|
+
boxOpen: () => openSealedKey
|
|
1231
|
+
});
|
|
1183
1232
|
async function generateKeypair2() {
|
|
1184
1233
|
return generateKeypair();
|
|
1185
1234
|
}
|
|
1235
|
+
async function sign(message, secretKeyHex) {
|
|
1236
|
+
const s = await ensureSodium();
|
|
1237
|
+
const sig = s.crypto_sign_detached(s.from_string(message), s.from_hex(secretKeyHex));
|
|
1238
|
+
return s.to_hex(sig);
|
|
1239
|
+
}
|
|
1240
|
+
async function verify(message, signatureHex, publicKeyHex) {
|
|
1241
|
+
const s = await ensureSodium();
|
|
1242
|
+
try {
|
|
1243
|
+
return s.crypto_sign_verify_detached(s.from_hex(signatureHex), s.from_string(message), s.from_hex(publicKeyHex));
|
|
1244
|
+
} catch {
|
|
1245
|
+
return false;
|
|
1246
|
+
}
|
|
1247
|
+
}
|
|
1186
1248
|
var init_facade2 = __esm(() => {
|
|
1187
1249
|
init_keypair();
|
|
1188
1250
|
init_file_crypto();
|
|
@@ -5359,4 +5421,4 @@ startMcpServer().catch((err) => {
|
|
|
5359
5421
|
process.exit(1);
|
|
5360
5422
|
});
|
|
5361
5423
|
|
|
5362
|
-
//# debugId=
|
|
5424
|
+
//# debugId=F4442514279DCE8564756E2164756E21
|