@chrischall/gemini-mcp 1.6.0 → 1.6.2
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/dist/blob-store.js +18 -2
- package/dist/bundle.js +610 -600
- package/dist/client.js +24 -6
- package/dist/errors.js +120 -0
- package/dist/index.js +6 -25
- package/dist/media-url.js +10 -3
- package/dist/registrars.js +50 -0
- package/dist/signed-url.js +42 -0
- package/dist/storage/media.js +6 -3
- package/dist/tools/uploads.js +42 -19
- package/dist/upload-url.js +24 -4
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "MCP server for Google Gemini image generation and editing — generate and edit images via the Gemini API",
|
|
10
|
-
"version": "1.6.
|
|
10
|
+
"version": "1.6.2"
|
|
11
11
|
},
|
|
12
12
|
"plugins": [
|
|
13
13
|
{
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"displayName": "Gemini Images",
|
|
16
16
|
"source": "./",
|
|
17
17
|
"description": "Generate and edit images with Google Gemini image models (Nano Banana / Nano Banana Pro) via natural language prompts",
|
|
18
|
-
"version": "1.6.
|
|
18
|
+
"version": "1.6.2",
|
|
19
19
|
"author": {
|
|
20
20
|
"name": "Chris Hall"
|
|
21
21
|
},
|
package/dist/blob-store.js
CHANGED
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
* They also happen to be the shapes this MCP's own connector used, which is why
|
|
34
34
|
* media links minted before the migration still resolve. Do not "tidy" them.
|
|
35
35
|
*/
|
|
36
|
+
import { signedLinks } from './signed-url.js';
|
|
36
37
|
const READ = (key, exp) => `${key}\n${exp}`;
|
|
37
38
|
const WRITE = (key, ct, exp) => `put\0${key}\0${ct}\0${exp}`;
|
|
38
39
|
/**
|
|
@@ -61,7 +62,22 @@ async function hmac(secret, payload) {
|
|
|
61
62
|
* care how many segments the host uses.
|
|
62
63
|
*/
|
|
63
64
|
export function prefixFromBaseUrl(baseUrl) {
|
|
64
|
-
|
|
65
|
+
let parsed;
|
|
66
|
+
try {
|
|
67
|
+
parsed = new URL(baseUrl);
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
// This runs at module scope (client.ts builds its singleton eagerly), so a
|
|
71
|
+
// stale or half-substituted value does not fail a request — it stops the
|
|
72
|
+
// server booting. `TypeError: Invalid URL`, thrown from a stack with no
|
|
73
|
+
// mention of storage, is a miserable thing to debug from a host's logs;
|
|
74
|
+
// name the variable and the value instead. Still a throw: a store nobody
|
|
75
|
+
// can address is not something to degrade quietly around, because media,
|
|
76
|
+
// the library and signed uploads would all silently vanish.
|
|
77
|
+
throw new Error(`MCP_BLOB_BASE_URL is not a valid URL (got ${JSON.stringify(baseUrl)}). ` +
|
|
78
|
+
'It should look like https://<host>/b/<registrationId> — check the deployment\'s environment.');
|
|
79
|
+
}
|
|
80
|
+
const path = parsed.pathname.replace(/^\/+|\/+$/g, '');
|
|
65
81
|
const marker = path.startsWith('b/') ? path.slice(2) : path;
|
|
66
82
|
return marker;
|
|
67
83
|
}
|
|
@@ -172,5 +188,5 @@ export function blobStoreFromEnv(env = process.env, overrides = {}) {
|
|
|
172
188
|
if (!baseUrl || !signingKey)
|
|
173
189
|
return undefined;
|
|
174
190
|
const bucket = createBlobBucket({ ...overrides, baseUrl, signingKey });
|
|
175
|
-
return { bucket, baseUrl, signRead: bucket.signRead, signWrite: bucket.signWrite };
|
|
191
|
+
return { bucket, baseUrl, links: signedLinks(baseUrl), signRead: bucket.signRead, signWrite: bucket.signWrite };
|
|
176
192
|
}
|