tokenizor-mcp 0.1.5 → 0.3.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.

Potentially problematic release.


This version of tokenizor-mcp might be problematic. Click here for more details.

@@ -20,7 +20,6 @@ if (!fs.existsSync(binPath)) {
20
20
  }
21
21
 
22
22
  const args = process.argv.slice(2);
23
- if (args.length === 0) args.push("run");
24
23
 
25
24
  try {
26
25
  const result = require("child_process").spawnSync(binPath, args, {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tokenizor-mcp",
3
- "version": "0.1.5",
4
- "description": "Tokenizor MCP — trusted local code indexing, retrieval, recovery, and repair for AI coding workflows",
3
+ "version": "0.3.1",
4
+ "description": "Tokenizor MCP — in-memory code intelligence with parasitic hook integration for Claude Code",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -23,7 +23,8 @@
23
23
  "code-retrieval",
24
24
  "ai-coding",
25
25
  "tree-sitter",
26
- "spacetimedb"
26
+ "claude-code",
27
+ "hooks"
27
28
  ],
28
29
  "engines": {
29
30
  "node": ">=18"
@@ -53,16 +53,35 @@ function download(url) {
53
53
  });
54
54
  }
55
55
 
56
+ function getInstalledVersion(binPath) {
57
+ try {
58
+ const output = execSync(`"${binPath}" --version`, {
59
+ encoding: "utf8",
60
+ timeout: 5000,
61
+ }).trim();
62
+ // Output format: "tokenizor-mcp x.y.z" or just "x.y.z"
63
+ const match = output.match(/(\d+\.\d+\.\d+)/);
64
+ return match ? match[1] : null;
65
+ } catch {
66
+ return null;
67
+ }
68
+ }
69
+
56
70
  async function main() {
57
71
  const binPath = getBinaryPath();
72
+ const version = getVersion();
58
73
 
59
- // Skip if binary already exists
74
+ // Skip only if binary exists AND matches the expected version
60
75
  if (fs.existsSync(binPath)) {
61
- console.log("tokenizor-mcp binary already installed.");
62
- return;
76
+ const installed = getInstalledVersion(binPath);
77
+ if (installed === version) {
78
+ console.log(`tokenizor-mcp v${version} already installed.`);
79
+ return;
80
+ }
81
+ console.log(
82
+ `tokenizor-mcp binary exists (v${installed || "unknown"}) but package wants v${version}. Updating...`
83
+ );
63
84
  }
64
-
65
- const version = getVersion();
66
85
  const artifact = getPlatformArtifact();
67
86
  const url = `https://github.com/${REPO}/releases/download/v${version}/${artifact}`;
68
87