@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 +17 -28
- package/dist/index.js +1 -1
- package/dist/tools/askmesh.js +21 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,22 +25,21 @@ npx -y @askmesh/mcp
|
|
|
25
25
|
}
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
**Step 2** —
|
|
28
|
+
**Step 2** — Restart Claude Code, then type: `/ask-setup`
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
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
|
-
| `/
|
|
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
|
-
|
|
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.
|
|
14
|
+
version: '0.10.1',
|
|
15
15
|
});
|
|
16
16
|
if (!TOKEN) {
|
|
17
17
|
// No token — start in setup-only mode
|
package/dist/tools/askmesh.js
CHANGED
|
@@ -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
|
|
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
|
|
335
|
-
const
|
|
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
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
357
|
-
statusLineStatus =
|
|
361
|
+
else {
|
|
362
|
+
statusLineStatus = 'Status line : script source non trouvé';
|
|
358
363
|
}
|
|
359
364
|
}
|
|
360
|
-
|
|
361
|
-
statusLineStatus =
|
|
365
|
+
catch (e) {
|
|
366
|
+
statusLineStatus = `Status line : erreur — ${e}`;
|
|
362
367
|
}
|
|
363
368
|
// Build report
|
|
364
369
|
const lines = ['Setup AskMesh terminé !\n'];
|