@fre4x/grok 1.1.6 → 1.1.8

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 +4 -5
  2. package/package.json +2 -1
package/dist/index.js CHANGED
@@ -46397,9 +46397,10 @@ async function handleGrokImagine(params, client = xaiClient) {
46397
46397
  prompt,
46398
46398
  aspect_ratio
46399
46399
  );
46400
+ const mediaClient = client === xaiClient ? axios_default : client;
46400
46401
  const mediaResults = IS_MOCK ? [buildMockImageContent()] : (await Promise.all(
46401
46402
  output.images.map(
46402
- (image) => buildImageContent(image.url, client)
46403
+ (image) => buildImageContent(image.url, mediaClient)
46403
46404
  )
46404
46405
  )).filter(
46405
46406
  (item) => item !== void 0
@@ -46478,10 +46479,8 @@ async function handleGrokVideoStatus(params, client = xaiClient) {
46478
46479
  let mediaContent = [];
46479
46480
  let extraText = "";
46480
46481
  if (output.video_url !== void 0) {
46481
- const mediaResult = IS_MOCK ? buildMockVideoContent(output.video_url) : await buildVideoContent(
46482
- output.video_url,
46483
- client
46484
- );
46482
+ const mediaClient = client === xaiClient ? axios_default : client;
46483
+ const mediaResult = IS_MOCK ? buildMockVideoContent(output.video_url) : await buildVideoContent(output.video_url, mediaClient);
46485
46484
  if (mediaResult) {
46486
46485
  mediaContent = [mediaResult.content];
46487
46486
  if (output_dir) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fre4x/grok",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "An MCP server for xAI (Grok) with search and generation capabilities.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -18,6 +18,7 @@
18
18
  "watch": "tsc -w",
19
19
  "inspector": "npm run build && node ../scripts/run-official-inspector.mjs node dist/index.js",
20
20
  "prepublishOnly": "npm run build && npm run typecheck",
21
+ "setup-env": "node scripts/setup-env.mjs",
21
22
  "test": "node ../scripts/run-vitest.mjs run --passWithNoTests --exclude dist"
22
23
  },
23
24
  "keywords": [