aikoql-mcp 0.1.17 → 0.1.19

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/package.json +2 -2
  2. package/run.js +12 -5
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "aikoql-mcp",
3
- "version": "0.1.17",
4
- "description": "Aikoql — The Agent-First Knowledge Database. Single binary, zero deps. 59 MCP tools.",
3
+ "version": "0.1.19",
4
+ "description": "Aikoql — The Agent-First Knowledge Database. Single binary, zero deps. MCP server for knowledge CRUD, aikoql queries, graph traversal, hybrid search, context compilation, document ingestion, and more.",
5
5
  "license": "Apache-2.0",
6
6
  "author": {
7
7
  "name": "Anckur Singh",
package/run.js CHANGED
@@ -73,7 +73,9 @@ function download() {
73
73
  const checksumUrl = chkUrl;
74
74
  let expected;
75
75
  if (process.platform === 'win32') {
76
- expected = execSync(`powershell -c "$ProgressPreference='SilentlyContinue'; (Invoke-WebRequest -Uri '${checksumUrl}').Content.Trim()"`, { encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] }).trim();
76
+ // WebClient, not Invoke-WebRequest: IWR throws NullReferenceException when
77
+ // its stdout is piped (no console host) — exactly how execSync runs it.
78
+ expected = execSync(`powershell -c "(New-Object System.Net.WebClient).DownloadString('${checksumUrl}')"`, { encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] }).trim();
77
79
  } else {
78
80
  expected = execSync(`curl -fsSL '${checksumUrl}'`, { encoding: 'utf8', stdio: ['ignore', 'pipe', 'pipe'] }).trim();
79
81
  }
@@ -100,17 +102,22 @@ function download() {
100
102
  }
101
103
  }
102
104
 
103
- if (!fs.existsSync(binPath)) {
105
+ // R7 (review round 3): AIKOQL_BINARY=<path> skips the release download and
106
+ // runs a local binary instead — the CI tarball smoke uses it because a PR's
107
+ // version has no GitHub Release yet.
108
+ const binary = process.env.AIKOQL_BINARY || binPath;
109
+
110
+ if (binary === binPath && !fs.existsSync(binPath)) {
104
111
  download();
105
112
  }
106
113
 
107
- if (!fs.existsSync(binPath)) {
108
- fail('binary not found after download.');
114
+ if (!fs.existsSync(binary)) {
115
+ fail(`binary not found: ${binary}`);
109
116
  }
110
117
 
111
118
  // Forward all args to the binary via long-lived spawn (MCP needs persistent stdio)
112
119
  const args = process.argv.slice(2);
113
- const child = spawn(binPath, args, { stdio: 'inherit' });
120
+ const child = spawn(binary, args, { stdio: 'inherit' });
114
121
 
115
122
  child.on('exit', (code, signal) => {
116
123
  if (signal) {