Full parity with claude-peers:
1. Push-injection (the "tap on shoulder" UX)
- MCP server now declares experimental.claude/channel capability
- BrokerClient onPush handlers emit server.notification({
method: "notifications/claude/channel",
params: { content, meta: {from_id, from_name, mesh_slug,
mesh_id, priority, sent_at, delivered_at, kind}}
})
- Claude Code injects each push as <channel source="claudemesh">
system reminder, so the receiver session sees inbound messages
WITHOUT calling check_messages manually
- Updated MCP instructions with the "RESPOND IMMEDIATELY" framing
(adapted from claude-peers)
2. Status hooks in install (default-on, --no-hooks to opt out)
- new apps/cli/src/commands/hook.ts: reads stdin JSON (Claude Code
hook payload), extracts cwd+session_id, POSTs /hook/set-status
to every joined mesh's broker in parallel with process.ppid +
1s timeout per POST. Silent fail, fire-and-forget.
- install.ts: writes to ~/.claude/settings.json registering
`claudemesh hook idle` on Stop + `claudemesh hook working` on
UserPromptSubmit. Idempotent, preserves other hook entries.
- uninstall.ts: removes both hook entries + MCP entry; leaves
unrelated hook/MCP entries alone.
- dedupes by brokerUrl (multiple meshes on same broker → one POST)
3. CLI surface
- new subcommand: `claudemesh hook <status>` (internal, but
exposed so Claude Code can invoke it via the hook shell command)
- `install --no-hooks` for users who want bare MCP registration
- --help updated
Coexistence with claude-peers: both tools register Stop and
UserPromptSubmit hooks, each POSTs to its own broker. Claude Code
fires multiple hooks per event without conflict.
npm version 0.1.0 → 0.1.1 (patch).
Verified:
- install with hooks → 2 entries added to settings.json ✓
- install --no-hooks → "Hooks skipped" ✓
- uninstall → both MCP entry + 2 hook entries removed ✓
- `echo '{...}' | claudemesh hook idle` with no joined meshes →
silent no-op ("no joined meshes, nothing to do") ✓
- MCP initialize response includes experimental.claude/channel ✓
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
67 lines
1.8 KiB
JSON
67 lines
1.8 KiB
JSON
{
|
|
"name": "claudemesh-cli",
|
|
"version": "0.1.1",
|
|
"description": "Claude Code MCP client for claudemesh — peer mesh messaging between Claude sessions.",
|
|
"keywords": [
|
|
"claude-code",
|
|
"mcp",
|
|
"model-context-protocol",
|
|
"claudemesh",
|
|
"peer-messaging",
|
|
"multi-agent"
|
|
],
|
|
"author": "Alejandro Gutiérrez",
|
|
"license": "MIT",
|
|
"homepage": "https://claudemesh.com",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/alezmad/claudemesh.git",
|
|
"directory": "apps/cli"
|
|
},
|
|
"type": "module",
|
|
"bin": {
|
|
"claudemesh": "./dist/index.js"
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"publishConfig": {
|
|
"access": "public"
|
|
},
|
|
"scripts": {
|
|
"build": "bun build src/index.ts --target=node --outfile dist/index.js --banner \"#!/usr/bin/env node\" && chmod +x dist/index.js",
|
|
"clean": "git clean -xdf .cache .turbo dist node_modules",
|
|
"dev": "bun --hot src/index.ts",
|
|
"start": "bun src/index.ts",
|
|
"format": "prettier --check . --ignore-path ../../.gitignore",
|
|
"lint": "eslint",
|
|
"prepublishOnly": "bun run build",
|
|
"test": "vitest run",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"prettier": "@turbostarter/prettier-config",
|
|
"engines": {
|
|
"node": ">=20"
|
|
},
|
|
"dependencies": {
|
|
"@modelcontextprotocol/sdk": "1.27.1",
|
|
"libsodium-wrappers": "0.7.15",
|
|
"ws": "8.20.0",
|
|
"zod": "4.1.13"
|
|
},
|
|
"devDependencies": {
|
|
"@turbostarter/eslint-config": "workspace:*",
|
|
"@turbostarter/prettier-config": "workspace:*",
|
|
"@turbostarter/tsconfig": "workspace:*",
|
|
"@turbostarter/vitest-config": "workspace:*",
|
|
"@types/libsodium-wrappers": "0.7.14",
|
|
"@types/ws": "8.5.13",
|
|
"eslint": "catalog:",
|
|
"prettier": "catalog:",
|
|
"typescript": "catalog:",
|
|
"vitest": "catalog:"
|
|
}
|
|
}
|