runline 0.12.0 → 0.13.0

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.
@@ -20,6 +20,7 @@
20
20
  import { writeFileSync } from "node:fs";
21
21
  import { tmpdir } from "node:os";
22
22
  import { join } from "node:path";
23
+ import * as t from "typebox";
23
24
  const BASE = "https://generativelanguage.googleapis.com/v1beta/models";
24
25
  export default function googleImage(rl) {
25
26
  rl.setName("googleImage");
@@ -35,23 +36,19 @@ export default function googleImage(rl) {
35
36
  rl.registerAction("image.create", {
36
37
  access: "write",
37
38
  description: "Generate an image with Google's Gemini image models (Nano Banana / Imagen). Writes the image(s) to disk and returns their file `path`s — not base64. Deliver each image to the user with send_file using its `path`.",
38
- inputSchema: {
39
- prompt: {
40
- type: "string",
41
- required: true,
39
+ inputSchema: t.Object({
40
+ prompt: t.String({
41
+ minLength: 1,
42
42
  description: "Detailed description of the image",
43
- },
44
- model: {
45
- type: "string",
46
- required: false,
47
- description: "gemini-2.5-flash-image (Nano Banana, default) | gemini-3-pro-image-preview | gemini-3.1-flash-image-preview",
48
- },
49
- saveDir: {
50
- type: "string",
51
- required: false,
52
- description: "Directory to write the image file(s) into. Defaults to the OS temp dir.",
53
- },
54
- },
43
+ }),
44
+ model: t.Optional(t.String({
45
+ minLength: 1,
46
+ description: "Gemini image model ID. Defaults to gemini-2.5-flash-image.",
47
+ })),
48
+ saveDir: t.Optional(t.String({
49
+ description: "Directory to write the image file(s) into. Empty or omitted uses the OS temp directory.",
50
+ })),
51
+ }, { additionalProperties: false }),
55
52
  async execute(input, ctx) {
56
53
  const p = (input ?? {});
57
54
  if (typeof p.prompt !== "string" || p.prompt.length === 0) {