@askmesh/mcp 0.10.0 → 0.10.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/README.md CHANGED
@@ -25,22 +25,21 @@ npx -y @askmesh/mcp
25
25
  }
26
26
  ```
27
27
 
28
- **Step 2** — Add your token in `.env` (never committed):
28
+ **Step 2** — Restart Claude Code, then type: `/ask-setup`
29
29
 
30
- ```
31
- ASKMESH_TOKEN=your_token_here
32
- ASKMESH_URL=https://api.askmesh.dev
33
- ```
34
-
35
- **Step 3** — Restart Claude Code, then type: `setup askmesh`
30
+ That's it. The setup wizard will:
31
+ - Ask for your token (from [askmesh.dev](https://askmesh.dev) → Settings)
32
+ - Save it in `.env` (auto-added to `.gitignore`)
33
+ - Install slash commands (`/ask-inbox`, `/ask-broadcast`, etc.)
34
+ - Configure the status line
36
35
 
37
- This installs slash commands (`/inbox`, `/broadcast`, etc.) and configures the status line.
36
+ No env vars needed in `.mcp.json` everything lives in your `.env`.
38
37
 
39
38
  ## Get your token
40
39
 
41
40
  1. Sign up at [askmesh.dev](https://askmesh.dev)
42
41
  2. Go to **Settings** → create an agent → copy the API token
43
- 3. Paste it in your `.env`
42
+ 3. Run `/ask-setup` and paste it when prompted
44
43
 
45
44
  ## Usage
46
45
 
@@ -76,16 +75,17 @@ One single tool `askmesh` — Claude understands natural language:
76
75
 
77
76
  ### Slash commands (skills)
78
77
 
79
- Add these as `.claude/commands/*.md` in your project for quick access:
78
+ Installed automatically by `/ask-setup`:
80
79
 
81
80
  | Command | Description |
82
81
  |---|---|
83
- | `/inbox` | Check pending + sent messages |
84
- | `/broadcast <msg>` | Broadcast to your team |
85
- | `/reply <id> <msg>` | Reply to a thread |
86
- | `/board` | View team kanban board |
87
- | `/threads` | List active conversations |
88
- | `/mesh-status` | See who's online |
82
+ | `/ask-inbox` | Check pending + sent messages |
83
+ | `/ask-broadcast <msg>` | Broadcast to your team |
84
+ | `/ask-reply <id> <msg>` | Reply to a thread |
85
+ | `/ask-board` | View team kanban board |
86
+ | `/ask-threads` | List active conversations |
87
+ | `/ask-status` | See who's online |
88
+ | `/ask-setup` | Install or update AskMesh config |
89
89
 
90
90
  ## Status line
91
91
 
@@ -101,18 +101,7 @@ mesh 3↓ 1~ 2>
101
101
 
102
102
  ### Setup
103
103
 
104
- Add to your Claude Code settings (`~/.claude/settings.json`):
105
-
106
- ```json
107
- {
108
- "statusLine": {
109
- "type": "command",
110
- "command": "/path/to/node_modules/@askmesh/mcp/statusline.sh"
111
- }
112
- }
113
- ```
114
-
115
- The MCP server updates a local cache file in real-time via SSE events. The status line script reads it — no polling, no API calls.
104
+ Configured automatically by `/ask-setup`. The MCP server updates a local cache file in real-time via SSE events. The status line script reads it — no polling, no API calls.
116
105
 
117
106
  ## Auto-responder
118
107
 
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ const TOKEN = process.env.ASKMESH_TOKEN;
11
11
  const URL = process.env.ASKMESH_URL || 'https://api.askmesh.dev';
12
12
  const server = new McpServer({
13
13
  name: 'askmesh',
14
- version: '0.10.0',
14
+ version: '0.10.1',
15
15
  });
16
16
  if (!TOKEN) {
17
17
  // No token — start in setup-only mode
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { mkdirSync, writeFileSync, readFileSync, appendFileSync, existsSync, unlinkSync } from 'fs';
2
+ import { mkdirSync, writeFileSync, readFileSync, appendFileSync, existsSync, unlinkSync, copyFileSync, chmodSync } from 'fs';
3
3
  import { join, dirname } from 'path';
4
4
  import { homedir } from 'os';
5
5
  import { fileURLToPath } from 'url';
@@ -329,36 +329,41 @@ function setupSkillsAndStatusLine(token) {
329
329
  gitignoreStatus = '.gitignore : .env ajouté';
330
330
  }
331
331
  }
332
- // Auto-configure status line in ~/.claude/settings.json
332
+ // Auto-configure status line
333
+ // Copy statusline.sh to a stable location (~/.claude/) so it survives npx cache clears
333
334
  const mcpDir = dirname(fileURLToPath(import.meta.url));
334
- const statusLineScript = join(mcpDir, '..', 'statusline.sh');
335
- const statusLineExists = existsSync(statusLineScript);
335
+ const sourceScript = join(mcpDir, '..', 'statusline.sh');
336
+ const claudeSettingsDir = join(homedir(), '.claude');
337
+ const stableScript = join(claudeSettingsDir, 'askmesh-statusline.sh');
338
+ const claudeSettingsPath = join(claudeSettingsDir, 'settings.json');
336
339
  let statusLineStatus = '';
337
- if (statusLineExists) {
338
- const claudeSettingsDir = join(homedir(), '.claude');
339
- const claudeSettingsPath = join(claudeSettingsDir, 'settings.json');
340
- try {
341
- mkdirSync(claudeSettingsDir, { recursive: true });
340
+ try {
341
+ mkdirSync(claudeSettingsDir, { recursive: true });
342
+ // Copy script to stable location
343
+ if (existsSync(sourceScript)) {
344
+ copyFileSync(sourceScript, stableScript);
345
+ chmodSync(stableScript, 0o755);
346
+ }
347
+ if (existsSync(stableScript)) {
342
348
  let settings = {};
343
349
  if (existsSync(claudeSettingsPath)) {
344
350
  settings = JSON.parse(readFileSync(claudeSettingsPath, 'utf-8'));
345
351
  }
346
- const currentCommand = settings.statusLine?.command;
347
- if (currentCommand === statusLineScript) {
352
+ if (settings.statusLine?.command === stableScript) {
348
353
  statusLineStatus = 'Status line : déjà configurée';
349
354
  }
350
355
  else {
351
- settings.statusLine = { type: 'command', command: statusLineScript };
356
+ settings.statusLine = { type: 'command', command: stableScript };
352
357
  writeFileSync(claudeSettingsPath, JSON.stringify(settings, null, 2) + '\n');
353
358
  statusLineStatus = 'Status line : configurée automatiquement';
354
359
  }
355
360
  }
356
- catch (e) {
357
- statusLineStatus = `Status line : erreur de configuration — ${e}`;
361
+ else {
362
+ statusLineStatus = 'Status line : script source non trouvé';
358
363
  }
359
364
  }
360
- else {
361
- statusLineStatus = 'Status line : script non trouvé (sera disponible après npm install)';
365
+ catch (e) {
366
+ statusLineStatus = `Status line : erreur ${e}`;
362
367
  }
363
368
  // Build report
364
369
  const lines = ['Setup AskMesh terminé !\n'];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askmesh/mcp",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "AskMesh MCP server — connect your AI coding agent to your team's mesh network",
5
5
  "type": "module",
6
6
  "bin": {