claudemesh-cli 0.6.7 → 0.6.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.
Files changed (3) hide show
  1. package/LICENSE.md +37 -0
  2. package/dist/index.js +50 -44
  3. package/package.json +20 -21
package/LICENSE.md ADDED
@@ -0,0 +1,37 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 alezmad (claudemesh)
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
22
+
23
+ ---
24
+
25
+ ## Attribution
26
+
27
+ This project was originally scaffolded using TurboStarter (https://turbostarter.dev),
28
+ a proprietary SaaS starter kit. The TurboStarter scaffold code is covered by
29
+ your separate purchase agreement with TurboStarter and is NOT re-licensed by
30
+ this MIT license. The MIT license above covers claudemesh-specific additions,
31
+ modifications, and original code written on top of that scaffold — including
32
+ but not limited to: apps/broker, apps/cli, apps/web/src/modules/marketing/home,
33
+ packages/db/src/schema/mesh.ts, the protocol, and the documentation.
34
+
35
+ If you are redistributing this repository, you are responsible for compliance
36
+ with BOTH the TurboStarter EULA (for scaffold components) and this MIT license
37
+ (for claudemesh code).
package/dist/index.js CHANGED
@@ -47376,31 +47376,21 @@ var TOOLS = [
47376
47376
  },
47377
47377
  {
47378
47378
  name: "schedule_reminder",
47379
- description: "Schedule a reminder message delivered back to yourself at a future time. The broker fires it as a push when the time arrives. Use to prompt yourself to check on something later.",
47379
+ description: "Schedule a message for future delivery. Without `to`, it fires back to yourself (a self-reminder). With `to`, it delivers to a peer, @group, or * broadcast. The broker holds it and delivers when the time arrives. Receivers see `subtype: reminder` in the push envelope.",
47380
47380
  inputSchema: {
47381
47381
  type: "object",
47382
47382
  properties: {
47383
- message: { type: "string", description: "Reminder text" },
47383
+ message: { type: "string", description: "Message or reminder text" },
47384
47384
  deliver_at: { type: "number", description: "Unix timestamp (ms) when to deliver" },
47385
- in_seconds: { type: "number", description: "Alternative to deliver_at: fire after N seconds" }
47385
+ in_seconds: { type: "number", description: "Alternative to deliver_at: fire after N seconds" },
47386
+ to: {
47387
+ type: "string",
47388
+ description: "Recipient: display name, pubkey hex, @group, or * (omit for self-reminder)"
47389
+ }
47386
47390
  },
47387
47391
  required: ["message"]
47388
47392
  }
47389
47393
  },
47390
- {
47391
- name: "send_later",
47392
- description: "Send a message to a peer, @group, or broadcast (*) at a future time. The broker holds it and delivers when the time arrives.",
47393
- inputSchema: {
47394
- type: "object",
47395
- properties: {
47396
- to: { type: "string", description: "Recipient: display name, pubkey hex, @group, or *" },
47397
- message: { type: "string", description: "Message text" },
47398
- deliver_at: { type: "number", description: "Unix timestamp (ms) when to deliver" },
47399
- in_seconds: { type: "number", description: "Alternative to deliver_at: fire after N seconds" }
47400
- },
47401
- required: ["to", "message"]
47402
- }
47403
- },
47404
47394
  {
47405
47395
  name: "list_scheduled",
47406
47396
  description: "List all your pending scheduled messages: id, recipient, preview, and delivery time.",
@@ -47783,7 +47773,7 @@ class BrokerClient {
47783
47773
  return;
47784
47774
  this.ws.send(JSON.stringify({ type: "forget", memoryId }));
47785
47775
  }
47786
- async scheduleMessage(to, message, deliverAt) {
47776
+ async scheduleMessage(to, message, deliverAt, isReminder = false) {
47787
47777
  if (!this.ws || this.ws.readyState !== this.ws.OPEN)
47788
47778
  return null;
47789
47779
  return new Promise((resolve) => {
@@ -47792,7 +47782,14 @@ class BrokerClient {
47792
47782
  if (this.scheduledAckResolvers.delete(reqId))
47793
47783
  resolve(null);
47794
47784
  }, 8000) });
47795
- this.ws.send(JSON.stringify({ type: "schedule", to, message, deliverAt, _reqId: reqId }));
47785
+ this.ws.send(JSON.stringify({
47786
+ type: "schedule",
47787
+ to,
47788
+ message,
47789
+ deliverAt,
47790
+ ...isReminder ? { subtype: "reminder" } : {},
47791
+ _reqId: reqId
47792
+ }));
47796
47793
  });
47797
47794
  }
47798
47795
  async listScheduled() {
@@ -48236,7 +48233,8 @@ class BrokerClient {
48236
48233
  createdAt: String(msg.createdAt ?? ""),
48237
48234
  receivedAt: new Date().toISOString(),
48238
48235
  plaintext,
48239
- kind
48236
+ kind,
48237
+ ...msg.subtype ? { subtype: msg.subtype } : {}
48240
48238
  };
48241
48239
  this.pushBuffer.push(push);
48242
48240
  if (this.pushBuffer.length > 500)
@@ -48631,7 +48629,8 @@ function decryptFailedWarning(senderPubkey) {
48631
48629
  }
48632
48630
  function formatPush(p, meshSlug) {
48633
48631
  const body = p.plaintext ?? decryptFailedWarning(p.senderPubkey);
48634
- return `[${meshSlug}] from ${p.senderPubkey.slice(0, 12)}… (${p.priority}, ${p.createdAt}):
48632
+ const tag = p.subtype === "reminder" ? " [REMINDER]" : "";
48633
+ return `[${meshSlug}]${tag} from ${p.senderPubkey.slice(0, 12)}… (${p.priority}, ${p.createdAt}):
48635
48634
  ${body}`;
48636
48635
  }
48637
48636
  async function startMcpServer() {
@@ -48651,6 +48650,8 @@ You are "${myName}"${myRole ? ` (${myRole})` : ""} — a peer in the claudemesh
48651
48650
  ## Responding to messages
48652
48651
  When you receive a <channel source="claudemesh" ...> message, RESPOND IMMEDIATELY. Pause your current task, reply via send_message, then resume. Read from_name, mesh_slug, and priority from the channel attributes. Reply by setting \`to\` to the sender's from_name (display name). Stay in character per your system prompt. Do not ignore low-priority messages — acknowledge them briefly even if you defer action.
48653
48652
 
48653
+ If the channel meta contains \`subtype: reminder\`, this is a scheduled reminder you set for yourself — act on it immediately (no reply needed).
48654
+
48654
48655
  ## Tools
48655
48656
  | Tool | Description |
48656
48657
  |------|-------------|
@@ -48692,6 +48693,9 @@ When you receive a <channel source="claudemesh" ...> message, RESPOND IMMEDIATEL
48692
48693
  | claim_task(id) | Claim an unclaimed task. |
48693
48694
  | complete_task(id, result?) | Mark task done with optional result. |
48694
48695
  | list_tasks(status?, assignee?) | List tasks filtered by status/assignee. |
48696
+ | schedule_reminder(message, in_seconds?, deliver_at?, to?) | Schedule a reminder to yourself (no \`to\`) or a delayed message to a peer/group. Delivered as a push with \`subtype: reminder\` in the channel meta. |
48697
+ | list_scheduled() | List pending scheduled reminders and messages. |
48698
+ | cancel_scheduled(id) | Cancel a pending scheduled item. |
48695
48699
 
48696
48700
  If multiple meshes are joined, prefix \`to\` with \`<mesh-slug>:\` to disambiguate (e.g. \`dev-team:Alice\`).
48697
48701
 
@@ -48950,40 +48954,41 @@ ${lines.join(`
48950
48954
  await client2.forget(id);
48951
48955
  return text(`Forgotten: ${id}`);
48952
48956
  }
48953
- case "schedule_reminder":
48954
- case "send_later": {
48957
+ case "schedule_reminder": {
48955
48958
  const sArgs = args ?? {};
48956
48959
  if (!sArgs.message)
48957
- return text(`${name}: \`message\` required`, true);
48958
- const to = name === "schedule_reminder" ? "self" : sArgs.to ?? "";
48959
- if (name === "send_later" && !to)
48960
- return text("send_later: `to` required", true);
48960
+ return text("schedule_reminder: `message` required", true);
48961
48961
  let deliverAt;
48962
48962
  if (sArgs.deliver_at) {
48963
48963
  deliverAt = Number(sArgs.deliver_at);
48964
48964
  } else if (sArgs.in_seconds) {
48965
48965
  deliverAt = Date.now() + Number(sArgs.in_seconds) * 1000;
48966
48966
  } else {
48967
- return text(`${name}: provide \`deliver_at\` (ms timestamp) or \`in_seconds\``, true);
48968
- }
48969
- let targetSpec = to;
48970
- if (name === "send_later" && !to.startsWith("@") && to !== "*" && !/^[0-9a-f]{64}$/i.test(to) && to !== "self") {
48971
- const peers = await client.listPeers();
48972
- const match = peers.find((p) => p.displayName.toLowerCase() === to.toLowerCase());
48973
- if (!match) {
48974
- const names = peers.map((p) => p.displayName).join(", ");
48975
- return text(`send_later: peer "${to}" not found. Online: ${names || "(none)"}`, true);
48976
- }
48977
- targetSpec = match.pubkey;
48967
+ return text("schedule_reminder: provide `deliver_at` (ms timestamp) or `in_seconds`", true);
48978
48968
  }
48979
- if (name === "schedule_reminder") {
48969
+ const isSelf = !sArgs.to;
48970
+ let targetSpec;
48971
+ if (isSelf) {
48980
48972
  targetSpec = client.getSessionPubkey() ?? "*";
48973
+ } else {
48974
+ const to = sArgs.to;
48975
+ if (!to.startsWith("@") && to !== "*" && !/^[0-9a-f]{64}$/i.test(to)) {
48976
+ const peers = await client.listPeers();
48977
+ const match = peers.find((p) => p.displayName.toLowerCase() === to.toLowerCase());
48978
+ if (!match) {
48979
+ const names = peers.map((p) => p.displayName).join(", ");
48980
+ return text(`schedule_reminder: peer "${to}" not found. Online: ${names || "(none)"}`, true);
48981
+ }
48982
+ targetSpec = match.pubkey;
48983
+ } else {
48984
+ targetSpec = to;
48985
+ }
48981
48986
  }
48982
- const result = await client.scheduleMessage(targetSpec, sArgs.message, deliverAt);
48987
+ const result = await client.scheduleMessage(targetSpec, sArgs.message, deliverAt, true);
48983
48988
  if (!result)
48984
- return text(`${name}: broker did not acknowledge — check connection`, true);
48989
+ return text("schedule_reminder: broker did not acknowledge — check connection", true);
48985
48990
  const when = new Date(result.deliverAt).toISOString();
48986
- return text(name === "schedule_reminder" ? `Reminder scheduled (${result.scheduledId.slice(0, 8)}): "${sArgs.message.slice(0, 60)}" at ${when}` : `Message to "${to}" scheduled (${result.scheduledId.slice(0, 8)}) for ${when}`);
48991
+ return text(isSelf ? `Self-reminder scheduled (${result.scheduledId.slice(0, 8)}): "${sArgs.message.slice(0, 60)}" at ${when}` : `Reminder to "${sArgs.to}" scheduled (${result.scheduledId.slice(0, 8)}) for ${when}`);
48987
48992
  }
48988
48993
  case "list_scheduled": {
48989
48994
  const scheduled = await client.listScheduled();
@@ -49525,7 +49530,8 @@ ${rows.join(`
49525
49530
  priority: msg.priority,
49526
49531
  sent_at: msg.createdAt,
49527
49532
  delivered_at: msg.receivedAt,
49528
- kind: msg.kind
49533
+ kind: msg.kind,
49534
+ ...msg.subtype ? { subtype: msg.subtype } : {}
49529
49535
  }
49530
49536
  }
49531
49537
  });
@@ -50553,7 +50559,7 @@ init_config();
50553
50559
  // package.json
50554
50560
  var package_default = {
50555
50561
  name: "claudemesh-cli",
50556
- version: "0.6.7",
50562
+ version: "0.6.8",
50557
50563
  description: "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
50558
50564
  keywords: [
50559
50565
  "claude-code",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudemesh-cli",
3
- "version": "0.6.7",
3
+ "version": "0.6.8",
4
4
  "description": "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
5
5
  "keywords": [
6
6
  "claude-code",
@@ -30,17 +30,6 @@
30
30
  "publishConfig": {
31
31
  "access": "public"
32
32
  },
33
- "scripts": {
34
- "build": "bun build src/index.ts --target=node --outfile dist/index.js --banner \"#!/usr/bin/env node\" && chmod +x dist/index.js",
35
- "clean": "git clean -xdf .cache .turbo dist node_modules",
36
- "dev": "bun --hot src/index.ts",
37
- "start": "bun src/index.ts",
38
- "format": "prettier --check . --ignore-path ../../.gitignore",
39
- "lint": "eslint",
40
- "prepublishOnly": "bun run build",
41
- "test": "vitest run",
42
- "typecheck": "tsc --noEmit"
43
- },
44
33
  "prettier": "@turbostarter/prettier-config",
45
34
  "engines": {
46
35
  "node": ">=20"
@@ -53,15 +42,25 @@
53
42
  "zod": "4.1.13"
54
43
  },
55
44
  "devDependencies": {
56
- "@turbostarter/eslint-config": "workspace:*",
57
- "@turbostarter/prettier-config": "workspace:*",
58
- "@turbostarter/tsconfig": "workspace:*",
59
- "@turbostarter/vitest-config": "workspace:*",
60
45
  "@types/libsodium-wrappers": "0.7.14",
61
46
  "@types/ws": "8.5.13",
62
- "eslint": "catalog:",
63
- "prettier": "catalog:",
64
- "typescript": "catalog:",
65
- "vitest": "catalog:"
47
+ "eslint": "9.39.0",
48
+ "prettier": "3.6.2",
49
+ "typescript": "5.9.3",
50
+ "vitest": "4.0.14",
51
+ "@turbostarter/prettier-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
+ },
56
+ "scripts": {
57
+ "build": "bun build src/index.ts --target=node --outfile dist/index.js --banner \"#!/usr/bin/env node\" && chmod +x dist/index.js",
58
+ "clean": "git clean -xdf .cache .turbo dist node_modules",
59
+ "dev": "bun --hot src/index.ts",
60
+ "start": "bun src/index.ts",
61
+ "format": "prettier --check . --ignore-path ../../.gitignore",
62
+ "lint": "eslint",
63
+ "test": "vitest run",
64
+ "typecheck": "tsc --noEmit"
66
65
  }
67
- }
66
+ }