claudemesh-cli 0.9.6 → 0.9.8
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 +36 -18
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -40093,7 +40093,7 @@ var package_default;
|
|
|
40093
40093
|
var init_package = __esm(() => {
|
|
40094
40094
|
package_default = {
|
|
40095
40095
|
name: "claudemesh-cli",
|
|
40096
|
-
version: "0.9.
|
|
40096
|
+
version: "0.9.8",
|
|
40097
40097
|
description: "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
|
|
40098
40098
|
keywords: [
|
|
40099
40099
|
"claude-code",
|
|
@@ -53953,15 +53953,6 @@ function drawTopBar(extra) {
|
|
|
53953
53953
|
const gap = Math.max(1, cols - left.length - right.length - mid.length);
|
|
53954
53954
|
process.stdout.write(moveTo(1, 1) + bg + left + mid + " ".repeat(gap) + right + reset);
|
|
53955
53955
|
}
|
|
53956
|
-
function drawBottomBar(left, right) {
|
|
53957
|
-
const { cols, rows } = termSize();
|
|
53958
|
-
const bg = "\x1B[48;5;208m\x1B[30m";
|
|
53959
|
-
const reset = "\x1B[0m";
|
|
53960
|
-
const l = ` ${left}`;
|
|
53961
|
-
const r = right ? `${right} ` : "";
|
|
53962
|
-
const gap = Math.max(1, cols - l.length - r.length);
|
|
53963
|
-
process.stdout.write(moveTo(rows, 1) + bg + l + " ".repeat(gap) + r + reset);
|
|
53964
|
-
}
|
|
53965
53956
|
function enterFullScreen() {
|
|
53966
53957
|
process.stdout.write(HIDE_CURSOR + CLEAR_SCREEN);
|
|
53967
53958
|
drawTopBar();
|
|
@@ -54128,6 +54119,7 @@ function parseGroupsString(raw) {
|
|
|
54128
54119
|
async function runLaunchWizard(opts) {
|
|
54129
54120
|
if (!process.stdout.isTTY) {
|
|
54130
54121
|
return {
|
|
54122
|
+
mesh: opts.selectedMesh ?? opts.meshes[0],
|
|
54131
54123
|
role: opts.existingRole,
|
|
54132
54124
|
groups: opts.existingGroups,
|
|
54133
54125
|
messageMode: opts.existingMessageMode ?? "push",
|
|
@@ -54137,7 +54129,6 @@ async function runLaunchWizard(opts) {
|
|
|
54137
54129
|
const { rows } = termSize();
|
|
54138
54130
|
enterFullScreen();
|
|
54139
54131
|
drawTopBar();
|
|
54140
|
-
drawBottomBar("↑↓ navigate ⏎ select esc skip ctrl-c quit", `mesh: ${opts.meshSlug}`);
|
|
54141
54132
|
const logoTop = Math.floor((rows - FRAME_HEIGHT - 16) / 2);
|
|
54142
54133
|
const brandRow = logoTop + FRAME_HEIGHT + 1;
|
|
54143
54134
|
const subtitleRow = brandRow + 1;
|
|
@@ -54157,9 +54148,32 @@ async function runLaunchWizard(opts) {
|
|
|
54157
54148
|
writeCentered(row, `Directory ${green("✓")} ${process.cwd()}`);
|
|
54158
54149
|
row++;
|
|
54159
54150
|
writeCentered(row, `Name ${green("✓")} ${opts.displayName}`);
|
|
54160
|
-
row++;
|
|
54161
|
-
writeCentered(row, `Mesh ${green("✓")} ${opts.meshSlug}`);
|
|
54162
54151
|
row += 2;
|
|
54152
|
+
let mesh;
|
|
54153
|
+
if (opts.selectedMesh) {
|
|
54154
|
+
mesh = opts.selectedMesh;
|
|
54155
|
+
writeCentered(row, `Mesh ${green("✓")} ${mesh.slug}`);
|
|
54156
|
+
row++;
|
|
54157
|
+
} else if (opts.meshes.length === 1) {
|
|
54158
|
+
mesh = opts.meshes[0];
|
|
54159
|
+
writeCentered(row, `Mesh ${green("✓")} ${mesh.slug}`);
|
|
54160
|
+
row++;
|
|
54161
|
+
} else {
|
|
54162
|
+
spinner.stop();
|
|
54163
|
+
const choice = await menuSelect({
|
|
54164
|
+
title: "Select mesh",
|
|
54165
|
+
items: opts.meshes.map((m) => m.slug),
|
|
54166
|
+
row
|
|
54167
|
+
});
|
|
54168
|
+
mesh = opts.meshes[choice];
|
|
54169
|
+
for (let i = 0;i < opts.meshes.length + 1; i++) {
|
|
54170
|
+
writeCentered(row + i, " ");
|
|
54171
|
+
}
|
|
54172
|
+
writeCentered(row, `Mesh ${green("✓")} ${mesh.slug}`);
|
|
54173
|
+
spinner.start();
|
|
54174
|
+
row++;
|
|
54175
|
+
}
|
|
54176
|
+
row++;
|
|
54163
54177
|
let role = opts.existingRole;
|
|
54164
54178
|
let groups = opts.existingGroups;
|
|
54165
54179
|
let messageMode = opts.existingMessageMode ?? "push";
|
|
@@ -54229,11 +54243,10 @@ async function runLaunchWizard(opts) {
|
|
|
54229
54243
|
}
|
|
54230
54244
|
row += 2;
|
|
54231
54245
|
writeCentered(row, dim("Launching Claude Code..."));
|
|
54232
|
-
drawBottomBar(`${opts.displayName} on ${opts.meshSlug}`, `mode: ${messageMode}`);
|
|
54233
54246
|
await new Promise((r) => setTimeout(r, 800));
|
|
54234
54247
|
spinner.stop();
|
|
54235
54248
|
exitFullScreen();
|
|
54236
|
-
return { role, groups, messageMode, skipPermissions };
|
|
54249
|
+
return { mesh, role, groups, messageMode, skipPermissions };
|
|
54237
54250
|
}
|
|
54238
54251
|
function printBanner(name, meshSlug, role, groups, messageMode) {
|
|
54239
54252
|
const useColor = !process.env.NO_COLOR && process.env.TERM !== "dumb" && process.stdout.isTTY;
|
|
@@ -54381,8 +54394,10 @@ async function runLaunch(flags, rawArgs) {
|
|
|
54381
54394
|
process.exit(1);
|
|
54382
54395
|
}
|
|
54383
54396
|
mesh = found;
|
|
54397
|
+
} else if (config2.meshes.length === 1) {
|
|
54398
|
+
mesh = config2.meshes[0];
|
|
54384
54399
|
} else {
|
|
54385
|
-
mesh =
|
|
54400
|
+
mesh = null;
|
|
54386
54401
|
}
|
|
54387
54402
|
const displayName = args.name ?? `${hostname2()}-${process.pid}`;
|
|
54388
54403
|
let role = args.role;
|
|
@@ -54391,16 +54406,20 @@ async function runLaunch(flags, rawArgs) {
|
|
|
54391
54406
|
if (!args.quiet && !justSynced) {
|
|
54392
54407
|
const wizardResult = await runLaunchWizard({
|
|
54393
54408
|
displayName,
|
|
54394
|
-
|
|
54409
|
+
meshes: config2.meshes,
|
|
54410
|
+
selectedMesh: mesh ?? null,
|
|
54395
54411
|
existingRole: args.role,
|
|
54396
54412
|
existingGroups: parsedGroups,
|
|
54397
54413
|
existingMessageMode: args.messageMode ?? null,
|
|
54398
54414
|
skipPermConfirm: args.skipPermConfirm
|
|
54399
54415
|
});
|
|
54416
|
+
mesh = wizardResult.mesh;
|
|
54400
54417
|
role = wizardResult.role;
|
|
54401
54418
|
parsedGroups = wizardResult.groups;
|
|
54402
54419
|
messageMode = wizardResult.messageMode;
|
|
54403
54420
|
args.skipPermConfirm = wizardResult.skipPermissions;
|
|
54421
|
+
} else if (!mesh) {
|
|
54422
|
+
mesh = await pickMesh(config2.meshes);
|
|
54404
54423
|
}
|
|
54405
54424
|
const tmpBase = tmpdir();
|
|
54406
54425
|
try {
|
|
@@ -54901,7 +54920,6 @@ async function runWelcome() {
|
|
|
54901
54920
|
const { rows } = termSize();
|
|
54902
54921
|
enterFullScreen();
|
|
54903
54922
|
drawTopBar();
|
|
54904
|
-
drawBottomBar("↑↓ navigate ⏎ select ctrl-c quit", "claudemesh.com");
|
|
54905
54923
|
const logoTop = Math.floor((rows - FRAME_HEIGHT - 10) / 2);
|
|
54906
54924
|
const brandRow = logoTop + FRAME_HEIGHT + 1;
|
|
54907
54925
|
const subtitleRow = brandRow + 1;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claudemesh-cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.8",
|
|
4
4
|
"description": "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"prettier": "3.6.2",
|
|
49
49
|
"typescript": "5.9.3",
|
|
50
50
|
"vitest": "4.0.14",
|
|
51
|
-
"@turbostarter/vitest-config": "0.1.0",
|
|
52
|
-
"@turbostarter/tsconfig": "0.1.0",
|
|
53
51
|
"@turbostarter/prettier-config": "0.1.0",
|
|
54
|
-
"@turbostarter/eslint-config": "0.1.0"
|
|
52
|
+
"@turbostarter/eslint-config": "0.1.0",
|
|
53
|
+
"@turbostarter/vitest-config": "0.1.0",
|
|
54
|
+
"@turbostarter/tsconfig": "0.1.0"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"build": "bun build src/index.ts --target=node --outfile dist/index.js --banner \"#!/usr/bin/env node\" && chmod +x dist/index.js",
|