@fre4x/grok 1.0.55 → 1.0.58

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/dist/index.js +14 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -18444,22 +18444,26 @@ import { fileURLToPath } from "node:url";
18444
18444
  // ../packages/shared/dist/errors.js
18445
18445
  function createApiError(message, statusCode) {
18446
18446
  let hint = "Check your network connection and retry.";
18447
+ let type = "Service Error";
18447
18448
  if (statusCode === 429) {
18448
- hint = "Rate limit exceeded. Suggestion: Wait for 60 seconds (Exponential Backoff) before retrying or reduce concurrent calls.";
18449
+ type = "Rate Limit";
18450
+ hint = "Request volume is too high. Suggestion: Wait briefly before retrying or reduce concurrent calls.";
18449
18451
  } else if (statusCode === 401 || statusCode === 403) {
18450
- hint = "Authentication failed. Suggestion: Verify your API key or token in the environment configuration.";
18452
+ type = "Authentication Error";
18453
+ hint = "The request could not be authorized. Suggestion: Verify your API key or token in the environment configuration.";
18451
18454
  } else if (statusCode && statusCode >= 500) {
18452
- hint = "Upstream service is having issues. Suggestion: This is a temporary external error. Try again in a few minutes.";
18455
+ type = "Upstream Error";
18456
+ hint = "The remote service is experiencing temporary issues. Suggestion: Try again in a few minutes.";
18453
18457
  } else if (statusCode === 404) {
18454
- hint = "The requested resource was not found. Suggestion: Check if the ID or Ticker is correct, or search for it first.";
18458
+ type = "Not Found";
18459
+ hint = "The requested information could not be found. Suggestion: Check if the ID, Ticker, or query parameters are correct.";
18455
18460
  }
18456
- const detail = statusCode ? ` (HTTP ${statusCode})` : "";
18457
18461
  return {
18458
18462
  isError: true,
18459
18463
  content: [
18460
18464
  {
18461
18465
  type: "text",
18462
- text: `API Error${detail}: ${message}
18466
+ text: `${type}: ${message}
18463
18467
 
18464
18468
  **Next Action**: ${hint}`
18465
18469
  }
@@ -32541,7 +32545,8 @@ config(en_default());
32541
32545
  var zod_default = external_exports;
32542
32546
 
32543
32547
  // ../packages/shared/dist/pagination.js
32544
- var z2 = external_exports || zod_default || zod_exports;
32548
+ var zodCompat = zod_exports;
32549
+ var z2 = zodCompat.z ?? zodCompat.default?.z ?? zodCompat.default ?? zodCompat;
32545
32550
  var paginationSchema = z2.object({
32546
32551
  limit: z2.number().int().min(1).max(100).default(20).describe("Maximum results to return (1\u2013100, default 20)"),
32547
32552
  offset: z2.number().int().min(0).default(0).describe("Number of results to skip for pagination (default 0)")
@@ -46045,7 +46050,8 @@ var MOCK_FIXTURES = {
46045
46050
  };
46046
46051
 
46047
46052
  // src/index.ts
46048
- var z3 = external_exports || zod_default || zod_exports;
46053
+ var zodCompat2 = zod_exports;
46054
+ var z3 = zodCompat2.z ?? zodCompat2.default?.z ?? zodCompat2.default ?? zodCompat2;
46049
46055
  var XAI_API_KEY = process.env.XAI_API_KEY;
46050
46056
  var PACKAGE_VERSION = getPackageVersion(import.meta.url);
46051
46057
  var GROK_SEARCH_MODEL = process.env.GROK_SEARCH_MODEL || "grok-4-1-fast-reasoning";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fre4x/grok",
3
- "version": "1.0.55",
3
+ "version": "1.0.58",
4
4
  "description": "An MCP server for xAI (Grok) with search and generation capabilities.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",