@bendyline/gezel-mcp 1.2.9 → 1.2.10
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/harness.js +2 -1
- package/dist/server.js +7 -3
- package/package.json +3 -3
package/dist/harness.js
CHANGED
|
@@ -2498,9 +2498,10 @@ ${doc.markdown}`);
|
|
|
2498
2498
|
const content = [];
|
|
2499
2499
|
if (res.b64Png) content.push({ type: "image", data: res.b64Png, mimeType: "image/png" });
|
|
2500
2500
|
const skipped = res.meta.img2imgSkippedReason ? `This image engine can't edit images (${res.meta.img2imgSkippedReason}), so it ignored inputImages and made a new image from the prompt alone. To change an image, describe the whole picture you want. ` : "";
|
|
2501
|
+
const settings = res.meta.settingsNotes?.length ? `Image settings: ${res.meta.settingsNotes.join(" ")} ` : "";
|
|
2501
2502
|
content.push({
|
|
2502
2503
|
type: "text",
|
|
2503
|
-
text: `${skipped}Saved to ${saved} (${res.meta.widthPx}x${res.meta.heightPx}, ${res.meta.model}). Copy it into the folder with your own file tools if it belongs there.`
|
|
2504
|
+
text: `${skipped}${settings}Saved to ${saved} (${res.meta.widthPx}x${res.meta.heightPx}, ${res.meta.model}). Copy it into the folder with your own file tools if it belongs there.`
|
|
2504
2505
|
});
|
|
2505
2506
|
return { content };
|
|
2506
2507
|
})
|
package/dist/server.js
CHANGED
|
@@ -2496,7 +2496,8 @@ function createEntityResolvers(deps) {
|
|
|
2496
2496
|
// src/generate-image-normalization.ts
|
|
2497
2497
|
var AGENT_IMAGE_MAX_SIDE_PX = 1024;
|
|
2498
2498
|
var SIZE_MULTIPLE = 64;
|
|
2499
|
-
function normalizeGenerateImageToolArgs(args) {
|
|
2499
|
+
function normalizeGenerateImageToolArgs(args, kind = "local") {
|
|
2500
|
+
if (kind === "cloud") return { args: { ...args } };
|
|
2500
2501
|
const next = { ...args };
|
|
2501
2502
|
const changes = [];
|
|
2502
2503
|
const originalSize = typeof args.width === "number" && typeof args.height === "number" ? `${args.width}x${args.height}` : void 0;
|
|
@@ -12582,7 +12583,9 @@ server.tool(
|
|
|
12582
12583
|
},
|
|
12583
12584
|
async (args) => {
|
|
12584
12585
|
try {
|
|
12585
|
-
const
|
|
12586
|
+
const config = await api.getConfig();
|
|
12587
|
+
const cloud = !args.model?.startsWith("remote:") && ["copilot", "codex-cli", "google-ai", "openai"].includes(config.imageProvider ?? "sd-cpp");
|
|
12588
|
+
const normalized = normalizeGenerateImageToolArgs(args, cloud ? "cloud" : "local");
|
|
12586
12589
|
const imageArgs = normalized.args;
|
|
12587
12590
|
const saveAs = imageArgs.saveAs || inferGeneratedImageSaveAs(imageArgs.prompt);
|
|
12588
12591
|
const res = await api.generateImage({
|
|
@@ -12620,10 +12623,11 @@ To display this image in HTML, copy this exact tag verbatim \u2014 do not add an
|
|
|
12620
12623
|
|
|
12621
12624
|
If you are working on a website/logo task and an HTML file already exists, your next tool call should patch that HTML with this exact tag using \`replace_in_file\` or \`write_file\`. Do not call \`generate_image\` again for the same missing image; the image asset already exists.` : "\n\nNOTE: workspace copy was skipped (project has an external workingDir not approved for writes). To reference from HTML, copy the image into the workspace yourself first via `write_file`.";
|
|
12622
12625
|
const normalizedLine = normalized.note ? ` ${normalized.note}` : "";
|
|
12626
|
+
const settingsLine = meta.settingsNotes?.length ? ` Image settings: ${meta.settingsNotes.join(" ")}` : "";
|
|
12623
12627
|
const skippedLine = meta.img2imgSkippedReason ? ` NOTE: the source image was not used \u2014 ${meta.img2imgSkippedReason}; the image was generated from the prompt alone.` : "";
|
|
12624
12628
|
const guideLine = promptGuide && !promptGuidesShown.has(meta.model) ? ` For your next prompt: ${promptGuide}` : "";
|
|
12625
12629
|
if (promptGuide) promptGuidesShown.add(meta.model);
|
|
12626
|
-
const summary = `Generated ${meta.widthPx}\xD7${meta.heightPx} image with ${meta.model} (seed ${meta.seed}, ${meta.steps} steps, ${meta.durationMs}ms).${normalizedLine}${skippedLine}${guideLine} The user already sees this image inline below the tool call \u2014 DO NOT embed it again as Markdown (e.g. \`\`); just refer to it by name in your reply when needed. To iterate on it, pass \`{ inputImages: [{ artifactPath: "${artifactPath}" }] }\` to a follow-up generate_image call. To read its bytes, call \`read_artifact\` with path \`${artifactPath}\`.${workspaceLine}`;
|
|
12630
|
+
const summary = `Generated ${meta.widthPx}\xD7${meta.heightPx} image with ${meta.model} (seed ${meta.seed}, ${meta.steps} steps, ${meta.durationMs}ms).${normalizedLine}${settingsLine}${skippedLine}${guideLine} The user already sees this image inline below the tool call \u2014 DO NOT embed it again as Markdown (e.g. \`\`); just refer to it by name in your reply when needed. To iterate on it, pass \`{ inputImages: [{ artifactPath: "${artifactPath}" }] }\` to a follow-up generate_image call. To read its bytes, call \`read_artifact\` with path \`${artifactPath}\`.${workspaceLine}`;
|
|
12627
12631
|
const content = [{ type: "text", text: summary }];
|
|
12628
12632
|
if (b64Png) {
|
|
12629
12633
|
content.push({ type: "image", data: b64Png, mimeType: "image/png" });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bendyline/gezel-mcp",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.10",
|
|
4
4
|
"description": "Gezel's Model Context Protocol server: gives gezels and other MCP clients access to memory, workspace files, artifacts, tasks, and team tools.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"!dist/**/*.map"
|
|
57
57
|
],
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@bendyline/gezel": "1.2.
|
|
60
|
-
"@bendyline/gezel-client": "1.2.
|
|
59
|
+
"@bendyline/gezel": "1.2.10",
|
|
60
|
+
"@bendyline/gezel-client": "1.2.10",
|
|
61
61
|
"@modelcontextprotocol/sdk": "1.31.0",
|
|
62
62
|
"typescript": "^6.0.3",
|
|
63
63
|
"zod": "^4.4.3"
|