context-mode 0.9.11 → 0.9.12

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.
@@ -13,7 +13,7 @@
13
13
  "name": "context-mode",
14
14
  "source": "./",
15
15
  "description": "Claude Code MCP plugin that saves 98% of your context window. Sandboxed code execution in 11 languages, FTS5 knowledge base with BM25 ranking, and intent-driven search.",
16
- "version": "0.9.11",
16
+ "version": "0.9.12",
17
17
  "author": {
18
18
  "name": "Mert Koseoğlu"
19
19
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "context-mode",
3
- "version": "0.9.11",
3
+ "version": "0.9.12",
4
4
  "description": "Claude Code MCP plugin that saves 98% of your context window. Sandboxed code execution in 11 languages, FTS5 knowledge base with BM25 ranking, and intent-driven search.",
5
5
  "author": {
6
6
  "name": "Mert Koseoğlu",
@@ -67,6 +67,27 @@ try {
67
67
  }
68
68
 
69
69
  writeFileSync(ipPath, JSON.stringify(ip, null, 2) + "\n", "utf-8");
70
+
71
+ // Create start.mjs if missing (old versions used start.sh)
72
+ const startMjs = resolve(myRoot, "start.mjs");
73
+ if (!existsSync(startMjs)) {
74
+ const shim = [
75
+ '#!/usr/bin/env node',
76
+ 'import { existsSync } from "node:fs";',
77
+ 'import { dirname, resolve } from "node:path";',
78
+ 'import { fileURLToPath } from "node:url";',
79
+ 'const __dirname = dirname(fileURLToPath(import.meta.url));',
80
+ 'process.chdir(__dirname);',
81
+ 'if (!process.env.CLAUDE_PROJECT_DIR) process.env.CLAUDE_PROJECT_DIR = process.cwd();',
82
+ 'if (existsSync(resolve(__dirname, "server.bundle.mjs"))) {',
83
+ ' await import("./server.bundle.mjs");',
84
+ '} else if (existsSync(resolve(__dirname, "build", "server.js"))) {',
85
+ ' await import("./build/server.js");',
86
+ '}',
87
+ ].join("\n");
88
+ writeFileSync(startMjs, shim, "utf-8");
89
+ }
90
+
70
91
  writeFileSync(marker, Date.now().toString(), "utf-8");
71
92
  }
72
93
  } catch { /* best effort — don't block hook */ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "context-mode",
3
- "version": "0.9.11",
3
+ "version": "0.9.12",
4
4
  "type": "module",
5
5
  "description": "Claude Code MCP plugin that saves 98% of your context window. Sandboxed code execution, FTS5 knowledge base, and intent-driven search.",
6
6
  "author": "Mert Koseoğlu",