@bunny-agent/runner-cli 0.9.32 → 0.9.33

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/bundle.mjs +38 -15
  2. package/package.json +4 -4
package/dist/bundle.mjs CHANGED
@@ -1388,20 +1388,37 @@ var generateImageSchema = {
1388
1388
  size: {
1389
1389
  type: "string",
1390
1390
  enum: [
1391
+ "auto",
1392
+ "1024x1024",
1393
+ "1536x1024",
1394
+ "1024x1536",
1391
1395
  "256x256",
1392
1396
  "512x512",
1393
- "1024x1024",
1394
1397
  "1792x1024",
1395
- "1024x1792",
1396
- "1280x1280",
1397
- "1568x1056",
1398
- "1056x1568",
1399
- "1472x1088",
1400
- "1088x1472",
1401
- "1728x960",
1402
- "960x1728"
1398
+ "1024x1792"
1403
1399
  ],
1404
- description: "Image dimensions. Common: 1024x1024 (square), 1280x1280, 1568x1056 (landscape), 1056x1568 (portrait), 1728x960 (wide), 960x1728 (tall)."
1400
+ description: "Image dimensions. Supported values: auto, 1024x1024, 1536x1024, 1024x1536, 256x256, 512x512, 1792x1024, 1024x1792."
1401
+ },
1402
+ aspectRatio: {
1403
+ type: "string",
1404
+ enum: [
1405
+ "1:1",
1406
+ "3:2",
1407
+ "2:3",
1408
+ "3:4",
1409
+ "4:3",
1410
+ "4:5",
1411
+ "5:4",
1412
+ "9:16",
1413
+ "16:9",
1414
+ "21:9"
1415
+ ],
1416
+ description: "Image aspect ratio. Use this instead of size for models that support it when exact proportions matter. Supported values: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9."
1417
+ },
1418
+ imageSize: {
1419
+ type: "string",
1420
+ enum: ["1K", "2K", "4K"],
1421
+ description: "Image resolution for models that support K-resolution output. Use this for requests like 2K or 4K."
1405
1422
  },
1406
1423
  quality: {
1407
1424
  type: "string",
@@ -1556,19 +1573,23 @@ function buildImageGenerateTool(cwd, imageModelId, baseUrl, apiKey) {
1556
1573
  name: "generate_image",
1557
1574
  label: "generate image",
1558
1575
  description: "Generate an image from a text prompt. Saves the image to disk and returns the file path.",
1559
- promptSnippet: "generate_image(prompt, filename?, size?, quality?) - generate an image from text",
1576
+ promptSnippet: "generate_image(prompt, filename?, size?, aspectRatio?, imageSize?, quality?) - generate an image from text",
1560
1577
  promptGuidelines: [
1561
1578
  "Use generate_image when the user asks to create, draw, or visualize something.",
1562
1579
  "Be descriptive in the prompt \u2014 more detail produces better results.",
1563
- "Provide a filename with extension, e.g. 'cat.png'."
1580
+ "Provide a filename with extension, e.g. 'cat.png'.",
1581
+ "Use aspectRatio (e.g. '3:4') when the requested output needs specific proportions.",
1582
+ "Use imageSize (e.g. '2K') when the user requests 1K, 2K, or 4K resolution."
1564
1583
  ],
1565
1584
  // biome-ignore lint/suspicious/noExplicitAny: plain JSON Schema compatible with TypeBox TSchema
1566
1585
  parameters: generateImageSchema,
1567
1586
  async execute(_toolCallId, params, signal, _onUpdate) {
1568
1587
  const p = params;
1569
1588
  const prompt = p.prompt;
1570
- const size = p.size ?? "1024x1024";
1589
+ const size = p.size;
1571
1590
  const quality = p.quality ?? "auto";
1591
+ const aspectRatio = p.aspectRatio;
1592
+ const imageSize = p.imageSize;
1572
1593
  const rawFilename = p.filename;
1573
1594
  const filename = rawFilename ? extname(rawFilename) ? rawFilename : `${rawFilename}.png` : `image_${Date.now()}.png`;
1574
1595
  const filePath = join6(cwd, filename.replace(/[^a-zA-Z0-9_\-./]/g, "_"));
@@ -1584,10 +1605,12 @@ function buildImageGenerateTool(cwd, imageModelId, baseUrl, apiKey) {
1584
1605
  model: imageModelId,
1585
1606
  prompt,
1586
1607
  n: 1,
1587
- size,
1588
1608
  quality,
1589
1609
  response_format: "b64_json",
1590
- output_format: "png"
1610
+ output_format: "png",
1611
+ ...aspectRatio ? { aspect_ratio: aspectRatio } : {},
1612
+ ...imageSize ? { image_size: imageSize } : {},
1613
+ ...size ? { size } : !aspectRatio && !imageSize ? { size: "1024x1024" } : {}
1591
1614
  }),
1592
1615
  signal
1593
1616
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bunny-agent/runner-cli",
3
- "version": "0.9.32",
3
+ "version": "0.9.33",
4
4
  "description": "BunnyAgent Runner CLI - Like gemini-cli or claude-code, runs in your local terminal with AI SDK UI streaming",
5
5
  "type": "module",
6
6
  "bin": {
@@ -54,10 +54,10 @@
54
54
  "typescript": "^5.3.0",
55
55
  "vitest": "^1.6.1",
56
56
  "@bunny-agent/runner-harness": "0.1.1-beta.0",
57
- "@bunny-agent/runner-opencode": "0.6.2",
58
- "@bunny-agent/runner-gemini": "0.6.2",
59
- "@bunny-agent/runner-codex": "0.6.2",
60
57
  "@bunny-agent/runner-claude": "0.6.2",
58
+ "@bunny-agent/runner-codex": "0.6.2",
59
+ "@bunny-agent/runner-gemini": "0.6.2",
60
+ "@bunny-agent/runner-opencode": "0.6.2",
61
61
  "@bunny-agent/runner-pi": "0.6.4-beta.0"
62
62
  },
63
63
  "scripts": {