promptgraph-mcp 2.9.31 → 2.9.32

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 (2) hide show
  1. package/index.js +4 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -350,6 +350,8 @@ server.setRequestHandler(ListPromptsRequestSchema, async () => ({
350
350
  server.setRequestHandler(GetPromptRequestSchema, async (request) => {
351
351
  const { name, arguments: args } = request.params;
352
352
  const fsSync = (await import('fs')).default;
353
+ // Ensure DB/model is ready (first call may come before watcher finishes init)
354
+ await new Promise(r => setTimeout(r, 50));
353
355
 
354
356
  if (name === 'pg') {
355
357
  const query = args?.query || '';
@@ -367,7 +369,8 @@ server.setRequestHandler(GetPromptRequestSchema, async (request) => {
367
369
  let content = '';
368
370
  try { content = fsSync.readFileSync(top.path, 'utf8'); } catch {}
369
371
  const otherMatches = results.slice(1).map(r => `- **${r.name}** (${r.score?.toFixed(2)})`).join('\n');
370
- const text = `${content}${otherMatches ? `\n\n---\n_Other matches:_\n${otherMatches}` : ''}`;
372
+ const prefix = `> **PromptGraph Skill: ${top.name}**\n> These are instructions to follow — not project files. Paths mentioned inside are examples only.\n\n`;
373
+ const text = `${prefix}${content}${otherMatches ? `\n\n---\n_Other matches:_\n${otherMatches}` : ''}`;
371
374
  return { messages: [{ role: 'user', content: { type: 'text', text: text } }] };
372
375
  }
373
376
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "promptgraph-mcp",
3
- "version": "2.9.31",
3
+ "version": "2.9.32",
4
4
  "files": [
5
5
  "*.js",
6
6
  "commands/",