@fre4x/grok 1.0.46 → 1.0.47
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/dist/index.js +14 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -18436,7 +18436,8 @@ var require_follow_redirects = __commonJS({
|
|
|
18436
18436
|
});
|
|
18437
18437
|
|
|
18438
18438
|
// src/index.ts
|
|
18439
|
-
import {
|
|
18439
|
+
import { realpathSync } from "node:fs";
|
|
18440
|
+
import { fileURLToPath } from "node:url";
|
|
18440
18441
|
|
|
18441
18442
|
// ../packages/shared/dist/errors.js
|
|
18442
18443
|
function createApiError(message, statusCode) {
|
|
@@ -44431,8 +44432,18 @@ async function runServer() {
|
|
|
44431
44432
|
await server.connect(transport);
|
|
44432
44433
|
console.error("Grok MCP Server running on stdio");
|
|
44433
44434
|
}
|
|
44434
|
-
|
|
44435
|
-
if (
|
|
44435
|
+
function isMainModule(url3) {
|
|
44436
|
+
if (!process.argv[1]) return false;
|
|
44437
|
+
try {
|
|
44438
|
+
const scriptPath = fileURLToPath(url3);
|
|
44439
|
+
const realScriptPath = realpathSync(scriptPath);
|
|
44440
|
+
const realArgvPath = realpathSync(process.argv[1]);
|
|
44441
|
+
return realScriptPath === realArgvPath;
|
|
44442
|
+
} catch {
|
|
44443
|
+
return false;
|
|
44444
|
+
}
|
|
44445
|
+
}
|
|
44446
|
+
if (isMainModule(import.meta.url)) {
|
|
44436
44447
|
runServer().catch((error48) => {
|
|
44437
44448
|
console.error("Fatal error running server:", error48);
|
|
44438
44449
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fre4x/grok",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.47",
|
|
4
4
|
"description": "An MCP server for xAI (Grok) with search and generation capabilities.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"start": "node dist/index.js",
|
|
17
17
|
"dev": "tsx src/index.ts",
|
|
18
18
|
"watch": "tsc -w",
|
|
19
|
-
"inspector": "
|
|
19
|
+
"inspector": "node ../scripts/run-official-inspector.mjs node dist/index.js",
|
|
20
20
|
"prepublishOnly": "npm run build && npm run typecheck",
|
|
21
21
|
"test": "vitest run --passWithNoTests --exclude dist"
|
|
22
22
|
},
|