@askmesh/mcp 0.12.0 → 0.12.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/dist/index.js CHANGED
@@ -5,18 +5,29 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
5
5
  import { AskMeshClient } from './client/askmesh_client.js';
6
6
  import { SseListener } from './sse/sse_listener.js';
7
7
  import { AutoResponder } from './agent/auto_responder.js';
8
- import { registerAskMesh, registerSetupOnly } from './tools/askmesh.js';
8
+ import { registerAskMesh, registerSetupOnly, bootstrapSetupSkill } from './tools/askmesh.js';
9
9
  import * as statusCache from './statusline/cache.js';
10
10
  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.12.0',
14
+ version: '0.12.1',
15
15
  });
16
16
  if (!TOKEN) {
17
17
  // No token — start in setup-only mode
18
18
  console.error('[AskMesh] No ASKMESH_TOKEN found. Starting in setup mode.');
19
19
  registerSetupOnly(server);
20
+ // Bootstrap: write the /ask-setup slash command file so the user can
21
+ // discover it without having to know the natural-language path.
22
+ const boot = bootstrapSetupSkill();
23
+ if (boot.created) {
24
+ console.error(`[AskMesh] ✨ Created ${boot.path}`);
25
+ console.error('[AskMesh] Restart Claude Code to enable the /ask-setup slash command,');
26
+ console.error('[AskMesh] or just type "setup askmesh" right now to start the wizard.');
27
+ }
28
+ else {
29
+ console.error('[AskMesh] Tip: type "setup askmesh" to start the configuration wizard.');
30
+ }
20
31
  }
21
32
  else {
22
33
  // Full mode
@@ -1,4 +1,21 @@
1
1
  import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
2
  import type { AskMeshClient } from '../client/askmesh_client.js';
3
3
  export declare function registerAskMesh(server: McpServer, client: AskMeshClient): void;
4
+ /**
5
+ * Bootstrap: write the minimum file needed to expose /ask-setup as a slash
6
+ * command before any setup has run. Called automatically on first MCP start.
7
+ *
8
+ * Without this, there's a chicken-and-egg problem: /ask-setup is the skill
9
+ * that installs all the other skills, including itself. After a fresh install,
10
+ * the user has no slash command and has to discover the natural-language path
11
+ * "setup askmesh".
12
+ *
13
+ * After this bootstrap, the user only needs to (a) restart Claude Code to
14
+ * pick up the new slash command, or (b) just type "setup askmesh" in the
15
+ * current session — both work.
16
+ */
17
+ export declare function bootstrapSetupSkill(): {
18
+ created: boolean;
19
+ path: string;
20
+ };
4
21
  export declare function registerSetupOnly(server: McpServer): void;
@@ -256,6 +256,47 @@ Actions disponibles :
256
256
  }
257
257
  });
258
258
  }
259
+ /**
260
+ * Bootstrap: write the minimum file needed to expose /ask-setup as a slash
261
+ * command before any setup has run. Called automatically on first MCP start.
262
+ *
263
+ * Without this, there's a chicken-and-egg problem: /ask-setup is the skill
264
+ * that installs all the other skills, including itself. After a fresh install,
265
+ * the user has no slash command and has to discover the natural-language path
266
+ * "setup askmesh".
267
+ *
268
+ * After this bootstrap, the user only needs to (a) restart Claude Code to
269
+ * pick up the new slash command, or (b) just type "setup askmesh" in the
270
+ * current session — both work.
271
+ */
272
+ export function bootstrapSetupSkill() {
273
+ const cwd = process.cwd();
274
+ const commandsDir = join(cwd, '.claude', 'commands');
275
+ const filePath = join(commandsDir, 'ask-setup.md');
276
+ if (existsSync(filePath)) {
277
+ return { created: false, path: filePath };
278
+ }
279
+ try {
280
+ mkdirSync(commandsDir, { recursive: true });
281
+ const content = `Utilise l'outil MCP askmesh avec l'action "setup" pour installer ou mettre à jour la configuration AskMesh dans ce projet.
282
+
283
+ Cela va :
284
+ - Créer ou vérifier le .env avec le token AskMesh
285
+ - Installer les slash commands (/ask-inbox, /ask-broadcast, etc.)
286
+ - Configurer la status line
287
+ - Ajouter .env au .gitignore
288
+ - Créer un .askmeshignore template
289
+
290
+ Si l'utilisateur fournit un token dans les arguments ($ARGUMENTS), passe-le en paramètre "token".
291
+ Sinon, demande-lui d'aller sur https://askmesh.dev > Settings pour récupérer son API token.
292
+ `;
293
+ writeFileSync(filePath, content);
294
+ return { created: true, path: filePath };
295
+ }
296
+ catch {
297
+ return { created: false, path: filePath };
298
+ }
299
+ }
259
300
  export function registerSetupOnly(server) {
260
301
  server.tool('askmesh', `AskMesh — réseau de communication entre développeurs et agents IA.
261
302
 
@@ -282,7 +323,7 @@ Si l'utilisateur n'a pas encore de compte, dirige-le vers https://askmesh.dev po
282
323
  return text('Action inconnue.');
283
324
  });
284
325
  }
285
- const CURRENT_VERSION = '0.12.0';
326
+ const CURRENT_VERSION = '0.12.1';
286
327
  async function checkUpdateAndSetup() {
287
328
  const lines = [];
288
329
  lines.push(`Version actuelle : ${CURRENT_VERSION}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askmesh/mcp",
3
- "version": "0.12.0",
3
+ "version": "0.12.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": {