debug-ledger-mcp 0.1.6 → 0.1.8

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
@@ -7,7 +7,7 @@
7
7
  ---
8
8
 
9
9
  ## Example: AI Debug With Memory
10
- ![Example: AI Debug With Memory](./example-ai-debug-with-memory.gif)
10
+ ![Example: AI Debug With Memory](https://github.com/hi0001234d/debug-ledger/blob/main/example-ai-debug-with-memory.gif)
11
11
 
12
12
  **Note:** Do not forget to add this line **"Before starting, call the list_ledger_files MCP tool and show me the output."** at last in every prompt when you want to apply your project constraint or debug memory.
13
13
 
@@ -3,6 +3,7 @@ import { Server } from "@modelcontextprotocol/sdk/server/index.js";
3
3
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
4
  import { ListToolsRequestSchema, CallToolRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
5
5
  import { assembleLedgerContext } from "./contextAssembler.js";
6
+ import { setupIfNeeded } from "./setup.js";
6
7
  /**
7
8
  * debug-ledger MCP server
8
9
  *
@@ -19,6 +20,7 @@ const server = new Server({
19
20
  tools: {},
20
21
  },
21
22
  });
23
+ setupIfNeeded();
22
24
  import { listLedgerFiles } from "./ledgerIndexer.js";
23
25
  /**
24
26
  * Tool registry
package/dist/mcp/setup.js CHANGED
@@ -8,14 +8,14 @@ export function setupIfNeeded() {
8
8
  const ledgerDir = path.join(projectDir, "debug_ledger");
9
9
  if (fs.existsSync(ledgerDir))
10
10
  return;
11
+ // npm package ની debug_ledger/ folder copy કરો
12
+ const sourceDir = path.join(__dirname, "../../debug_ledger");
11
13
  fs.mkdirSync(ledgerDir, { recursive: true });
12
- const templates = {
13
- "bugs.md": `# Bug Log\n\n| Date | Bug | Fix | Rejected Approaches |\n|------|-----|-----|--------------------|\n`,
14
- "fixes.md": `# Fix Log\n\n| Date | Fix | Why it worked |\n|------|-----|---------------|\n`,
15
- "README.md": `# Debug Ledger\n\nAI-readable log of past bugs and fixes.\n`,
16
- };
17
- for (const [filename, content] of Object.entries(templates)) {
18
- fs.writeFileSync(path.join(ledgerDir, filename), content);
19
- }
20
- console.log("debug_ledger/ created");
14
+ const files = fs.readdirSync(sourceDir);
15
+ files.forEach((file) => {
16
+ if (file.endsWith(".md")) {
17
+ fs.copyFileSync(path.join(sourceDir, file), path.join(ledgerDir, file));
18
+ }
19
+ });
20
+ console.log("debug_ledger/ created with all files");
21
21
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "debug-ledger-mcp",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Read-only debug memory for AI — a repo-local ledger of past bugs, rejected fixes, and historical constraints so AI debugs with context, not amnesia.",
5
5
  "type": "module",
6
6
  "engines": {