@keystrokehq/gemini 0.1.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.
Files changed (90) hide show
  1. package/README.md +17 -0
  2. package/dist/action.cjs +21 -0
  3. package/dist/action.cjs.map +1 -0
  4. package/dist/action.mjs +21 -0
  5. package/dist/action.mjs.map +1 -0
  6. package/dist/actions/count-tokens.cjs +26 -0
  7. package/dist/actions/count-tokens.cjs.map +1 -0
  8. package/dist/actions/count-tokens.d.cts +9 -0
  9. package/dist/actions/count-tokens.d.cts.map +1 -0
  10. package/dist/actions/count-tokens.d.mts +9 -0
  11. package/dist/actions/count-tokens.d.mts.map +1 -0
  12. package/dist/actions/count-tokens.mjs +25 -0
  13. package/dist/actions/count-tokens.mjs.map +1 -0
  14. package/dist/actions/embed-content.cjs +25 -0
  15. package/dist/actions/embed-content.cjs.map +1 -0
  16. package/dist/actions/embed-content.d.cts +9 -0
  17. package/dist/actions/embed-content.d.cts.map +1 -0
  18. package/dist/actions/embed-content.d.mts +9 -0
  19. package/dist/actions/embed-content.d.mts.map +1 -0
  20. package/dist/actions/embed-content.mjs +22 -0
  21. package/dist/actions/embed-content.mjs.map +1 -0
  22. package/dist/actions/generate-content.cjs +66 -0
  23. package/dist/actions/generate-content.cjs.map +1 -0
  24. package/dist/actions/generate-content.d.cts +9 -0
  25. package/dist/actions/generate-content.d.cts.map +1 -0
  26. package/dist/actions/generate-content.d.mts +9 -0
  27. package/dist/actions/generate-content.d.mts.map +1 -0
  28. package/dist/actions/generate-content.mjs +63 -0
  29. package/dist/actions/generate-content.mjs.map +1 -0
  30. package/dist/actions/generate-image.cjs +65 -0
  31. package/dist/actions/generate-image.cjs.map +1 -0
  32. package/dist/actions/generate-image.d.cts +9 -0
  33. package/dist/actions/generate-image.d.cts.map +1 -0
  34. package/dist/actions/generate-image.d.mts +9 -0
  35. package/dist/actions/generate-image.d.mts.map +1 -0
  36. package/dist/actions/generate-image.mjs +64 -0
  37. package/dist/actions/generate-image.mjs.map +1 -0
  38. package/dist/actions/generate-videos.cjs +49 -0
  39. package/dist/actions/generate-videos.cjs.map +1 -0
  40. package/dist/actions/generate-videos.d.cts +9 -0
  41. package/dist/actions/generate-videos.d.cts.map +1 -0
  42. package/dist/actions/generate-videos.d.mts +9 -0
  43. package/dist/actions/generate-videos.d.mts.map +1 -0
  44. package/dist/actions/generate-videos.mjs +48 -0
  45. package/dist/actions/generate-videos.mjs.map +1 -0
  46. package/dist/actions/index.cjs +15 -0
  47. package/dist/actions/index.d.cts +8 -0
  48. package/dist/actions/index.d.mts +8 -0
  49. package/dist/actions/index.mjs +8 -0
  50. package/dist/actions/list-models.cjs +42 -0
  51. package/dist/actions/list-models.cjs.map +1 -0
  52. package/dist/actions/list-models.d.cts +9 -0
  53. package/dist/actions/list-models.d.cts.map +1 -0
  54. package/dist/actions/list-models.d.mts +9 -0
  55. package/dist/actions/list-models.d.mts.map +1 -0
  56. package/dist/actions/list-models.mjs +41 -0
  57. package/dist/actions/list-models.mjs.map +1 -0
  58. package/dist/actions/wait-for-video.cjs +31 -0
  59. package/dist/actions/wait-for-video.cjs.map +1 -0
  60. package/dist/actions/wait-for-video.d.cts +9 -0
  61. package/dist/actions/wait-for-video.d.cts.map +1 -0
  62. package/dist/actions/wait-for-video.d.mts +9 -0
  63. package/dist/actions/wait-for-video.d.mts.map +1 -0
  64. package/dist/actions/wait-for-video.mjs +30 -0
  65. package/dist/actions/wait-for-video.mjs.map +1 -0
  66. package/dist/app.cjs +9 -0
  67. package/dist/app.cjs.map +1 -0
  68. package/dist/app.d.cts +5 -0
  69. package/dist/app.d.cts.map +1 -0
  70. package/dist/app.d.mts +5 -0
  71. package/dist/app.d.mts.map +1 -0
  72. package/dist/app.mjs +10 -0
  73. package/dist/app.mjs.map +1 -0
  74. package/dist/catalog.cjs +15 -0
  75. package/dist/catalog.cjs.map +1 -0
  76. package/dist/catalog.d.cts +14 -0
  77. package/dist/catalog.d.cts.map +1 -0
  78. package/dist/catalog.d.mts +14 -0
  79. package/dist/catalog.d.mts.map +1 -0
  80. package/dist/catalog.mjs +15 -0
  81. package/dist/catalog.mjs.map +1 -0
  82. package/dist/execute.cjs +18 -0
  83. package/dist/execute.cjs.map +1 -0
  84. package/dist/execute.mjs +18 -0
  85. package/dist/execute.mjs.map +1 -0
  86. package/dist/index.cjs +20 -0
  87. package/dist/index.d.cts +10 -0
  88. package/dist/index.d.mts +10 -0
  89. package/dist/index.mjs +11 -0
  90. package/package.json +49 -0
package/README.md ADDED
@@ -0,0 +1,17 @@
1
+ # @keystrokehq/gemini
2
+
3
+ Keystroke-managed integration.
4
+
5
+ **App:** `gemini`
6
+ **Version:** `20260618_00`
7
+ **Actions:** 7
8
+
9
+ ```ts
10
+ import { defineAgent } from "@keystrokehq/keystroke/agent";
11
+ import { geminiCountTokens } from "@keystrokehq/gemini/actions";
12
+
13
+ export default defineAgent({
14
+ key: "gemini-agent",
15
+ tools: [geminiCountTokens],
16
+ });
17
+ ```
@@ -0,0 +1,21 @@
1
+ const require_app = require("./app.cjs");
2
+ const require_execute = require("./execute.cjs");
3
+ require("zod");
4
+ //#region src/action.ts
5
+ /** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
6
+ function action(tool, def) {
7
+ return require_app.gemini.action({
8
+ slug: def.slug,
9
+ name: def.name,
10
+ description: def.description,
11
+ input: def.input,
12
+ output: def.output,
13
+ async run(input) {
14
+ return def.output.parse(await require_execute.executeGeminiTool(tool, input));
15
+ }
16
+ });
17
+ }
18
+ //#endregion
19
+ exports.action = action;
20
+
21
+ //# sourceMappingURL=action.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.cjs","names":["gemini","executeGeminiTool"],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { gemini } from \"./app\";\nimport { executeGeminiTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return gemini.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeGeminiTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAOA,YAAAA,OAAO,OAAO;EACnB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAMC,gBAAAA,kBAAkB,MAAM,KAAgC,CAAC;EACzF;CACF,CAAC;AACH"}
@@ -0,0 +1,21 @@
1
+ import { gemini } from "./app.mjs";
2
+ import { executeGeminiTool } from "./execute.mjs";
3
+ import "zod";
4
+ //#region src/action.ts
5
+ /** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */
6
+ function action(tool, def) {
7
+ return gemini.action({
8
+ slug: def.slug,
9
+ name: def.name,
10
+ description: def.description,
11
+ input: def.input,
12
+ output: def.output,
13
+ async run(input) {
14
+ return def.output.parse(await executeGeminiTool(tool, input));
15
+ }
16
+ });
17
+ }
18
+ //#endregion
19
+ export { action };
20
+
21
+ //# sourceMappingURL=action.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"action.mjs","names":[],"sources":["../src/action.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { gemini } from \"./app\";\nimport { executeGeminiTool } from \"./execute\";\n\n/** Bind one gateway tool to a typed app action; the call's output is parsed against `def.output`. */\nexport function action(\n tool: string,\n def: {\n slug: string;\n name: string;\n description: string;\n input: z.ZodTypeAny;\n output: z.ZodTypeAny;\n },\n) {\n return gemini.action({\n slug: def.slug,\n name: def.name,\n description: def.description,\n input: def.input,\n output: def.output,\n async run(input) {\n return def.output.parse(await executeGeminiTool(tool, input as Record<string, unknown>));\n },\n });\n}\n"],"mappings":";;;;;AAMA,SAAgB,OACd,MACA,KAOA;CACA,OAAO,OAAO,OAAO;EACnB,MAAM,IAAI;EACV,MAAM,IAAI;EACV,aAAa,IAAI;EACjB,OAAO,IAAI;EACX,QAAQ,IAAI;EACZ,MAAM,IAAI,OAAO;GACf,OAAO,IAAI,OAAO,MAAM,MAAM,kBAAkB,MAAM,KAAgC,CAAC;EACzF;CACF,CAAC;AACH"}
@@ -0,0 +1,26 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/count-tokens.ts
4
+ const GeminiCountTokensInput = zod.z.object({
5
+ text: zod.z.string().describe("Text to count tokens for"),
6
+ model: zod.z.string().default("gemini-2.0-flash").describe("Model to use for token counting. Must be a model that supports the countTokens method. Use the ListModels action to see available models and their supported methods.").optional()
7
+ });
8
+ const GeminiCountTokens_TokenDetailsSchema = zod.z.object({
9
+ modality: zod.z.string().describe("The modality of the tokens (e.g., 'TEXT', 'IMAGE')"),
10
+ token_count: zod.z.number().int().describe("Number of tokens for this modality")
11
+ }).describe("Details about tokens for a specific modality.");
12
+ const GeminiCountTokensOutput = zod.z.object({
13
+ total_tokens: zod.z.number().int().describe("Total number of tokens in the input"),
14
+ token_details: zod.z.array(GeminiCountTokens_TokenDetailsSchema).describe("Breakdown of tokens by modality (e.g., text, image)").nullable().optional()
15
+ });
16
+ const geminiCountTokens = require_action.action("GEMINI_COUNT_TOKENS", {
17
+ slug: "gemini-count-tokens",
18
+ name: "Count Tokens (Gemini)",
19
+ description: "Counts the number of tokens in text using Gemini tokenization. Useful for estimating costs, checking input limits, and optimizing prompts before making API calls.",
20
+ input: GeminiCountTokensInput,
21
+ output: GeminiCountTokensOutput
22
+ });
23
+ //#endregion
24
+ exports.geminiCountTokens = geminiCountTokens;
25
+
26
+ //# sourceMappingURL=count-tokens.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"count-tokens.cjs","names":["z","action"],"sources":["../../src/actions/count-tokens.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const GeminiCountTokensInput: z.ZodTypeAny = z.object({\n text: z.string().describe(\"Text to count tokens for\"),\n model: z.string().default(\"gemini-2.0-flash\").describe(\"Model to use for token counting. Must be a model that supports the countTokens method. Use the ListModels action to see available models and their supported methods.\").optional(),\n});\nconst GeminiCountTokens_TokenDetailsSchema: z.ZodTypeAny = z.object({\n modality: z.string().describe(\"The modality of the tokens (e.g., 'TEXT', 'IMAGE')\"),\n token_count: z.number().int().describe(\"Number of tokens for this modality\"),\n}).describe(\"Details about tokens for a specific modality.\");\nexport const GeminiCountTokensOutput: z.ZodTypeAny = z.object({\n total_tokens: z.number().int().describe(\"Total number of tokens in the input\"),\n token_details: z.array(GeminiCountTokens_TokenDetailsSchema).describe(\"Breakdown of tokens by modality (e.g., text, image)\").nullable().optional(),\n});\n\nexport const geminiCountTokens = action(\"GEMINI_COUNT_TOKENS\", {\n slug: \"gemini-count-tokens\",\n name: \"Count Tokens (Gemini)\",\n description: \"Counts the number of tokens in text using Gemini tokenization. Useful for estimating costs, checking input limits, and optimizing prompts before making API calls.\",\n input: GeminiCountTokensInput,\n output: GeminiCountTokensOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAuCA,IAAAA,EAAE,OAAO;CAC3D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B;CACpD,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,QAAQ,kBAAkB,CAAC,CAAC,SAAS,uKAAuK,CAAC,CAAC,SAAS;AAC3O,CAAC;AACD,MAAM,uCAAqDA,IAAAA,EAAE,OAAO;CAClE,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD;CAClF,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oCAAoC;AAC7E,CAAC,CAAC,CAAC,SAAS,+CAA+C;AAC3D,MAAa,0BAAwCA,IAAAA,EAAE,OAAO;CAC5D,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qCAAqC;CAC7E,eAAeA,IAAAA,EAAE,MAAM,oCAAoC,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AACnJ,CAAC;AAED,MAAa,oBAAoBC,eAAAA,OAAO,uBAAuB;CAC7D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/count-tokens.d.ts
4
+ declare const GeminiCountTokensInput: z.ZodTypeAny;
5
+ declare const GeminiCountTokensOutput: z.ZodTypeAny;
6
+ declare const geminiCountTokens: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { geminiCountTokens };
9
+ //# sourceMappingURL=count-tokens.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"count-tokens.d.cts","names":[],"sources":["../../src/actions/count-tokens.ts"],"mappings":";;;cAIa,sBAAA,EAAwB,CAAA,CAAE,UAGrC;AAAA,cAKW,uBAAA,EAAyB,CAAA,CAAE,UAGtC;AAAA,cAEW,iBAAA,gCAAiB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/count-tokens.d.ts
4
+ declare const GeminiCountTokensInput: z.ZodTypeAny;
5
+ declare const GeminiCountTokensOutput: z.ZodTypeAny;
6
+ declare const geminiCountTokens: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { geminiCountTokens };
9
+ //# sourceMappingURL=count-tokens.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"count-tokens.d.mts","names":[],"sources":["../../src/actions/count-tokens.ts"],"mappings":";;;cAIa,sBAAA,EAAwB,CAAA,CAAE,UAGrC;AAAA,cAKW,uBAAA,EAAyB,CAAA,CAAE,UAGtC;AAAA,cAEW,iBAAA,gCAAiB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,25 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ //#region src/actions/count-tokens.ts
4
+ const GeminiCountTokensInput = z.object({
5
+ text: z.string().describe("Text to count tokens for"),
6
+ model: z.string().default("gemini-2.0-flash").describe("Model to use for token counting. Must be a model that supports the countTokens method. Use the ListModels action to see available models and their supported methods.").optional()
7
+ });
8
+ const GeminiCountTokens_TokenDetailsSchema = z.object({
9
+ modality: z.string().describe("The modality of the tokens (e.g., 'TEXT', 'IMAGE')"),
10
+ token_count: z.number().int().describe("Number of tokens for this modality")
11
+ }).describe("Details about tokens for a specific modality.");
12
+ const geminiCountTokens = action("GEMINI_COUNT_TOKENS", {
13
+ slug: "gemini-count-tokens",
14
+ name: "Count Tokens (Gemini)",
15
+ description: "Counts the number of tokens in text using Gemini tokenization. Useful for estimating costs, checking input limits, and optimizing prompts before making API calls.",
16
+ input: GeminiCountTokensInput,
17
+ output: z.object({
18
+ total_tokens: z.number().int().describe("Total number of tokens in the input"),
19
+ token_details: z.array(GeminiCountTokens_TokenDetailsSchema).describe("Breakdown of tokens by modality (e.g., text, image)").nullable().optional()
20
+ })
21
+ });
22
+ //#endregion
23
+ export { geminiCountTokens };
24
+
25
+ //# sourceMappingURL=count-tokens.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"count-tokens.mjs","names":[],"sources":["../../src/actions/count-tokens.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const GeminiCountTokensInput: z.ZodTypeAny = z.object({\n text: z.string().describe(\"Text to count tokens for\"),\n model: z.string().default(\"gemini-2.0-flash\").describe(\"Model to use for token counting. Must be a model that supports the countTokens method. Use the ListModels action to see available models and their supported methods.\").optional(),\n});\nconst GeminiCountTokens_TokenDetailsSchema: z.ZodTypeAny = z.object({\n modality: z.string().describe(\"The modality of the tokens (e.g., 'TEXT', 'IMAGE')\"),\n token_count: z.number().int().describe(\"Number of tokens for this modality\"),\n}).describe(\"Details about tokens for a specific modality.\");\nexport const GeminiCountTokensOutput: z.ZodTypeAny = z.object({\n total_tokens: z.number().int().describe(\"Total number of tokens in the input\"),\n token_details: z.array(GeminiCountTokens_TokenDetailsSchema).describe(\"Breakdown of tokens by modality (e.g., text, image)\").nullable().optional(),\n});\n\nexport const geminiCountTokens = action(\"GEMINI_COUNT_TOKENS\", {\n slug: \"gemini-count-tokens\",\n name: \"Count Tokens (Gemini)\",\n description: \"Counts the number of tokens in text using Gemini tokenization. Useful for estimating costs, checking input limits, and optimizing prompts before making API calls.\",\n input: GeminiCountTokensInput,\n output: GeminiCountTokensOutput,\n});\n"],"mappings":";;;AAIA,MAAa,yBAAuC,EAAE,OAAO;CAC3D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,0BAA0B;CACpD,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,kBAAkB,CAAC,CAAC,SAAS,uKAAuK,CAAC,CAAC,SAAS;AAC3O,CAAC;AACD,MAAM,uCAAqD,EAAE,OAAO;CAClE,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,oDAAoD;CAClF,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,oCAAoC;AAC7E,CAAC,CAAC,CAAC,SAAS,+CAA+C;AAM3D,MAAa,oBAAoB,OAAO,uBAAuB;CAC7D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAVmD,EAAE,OAAO;EAC5D,cAAc,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,qCAAqC;EAC7E,eAAe,EAAE,MAAM,oCAAoC,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACnJ,CAOU;AACV,CAAC"}
@@ -0,0 +1,25 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/embed-content.ts
4
+ const GeminiEmbedContentInput = zod.z.object({
5
+ text: zod.z.string().describe("The text content to generate embeddings for."),
6
+ model: zod.z.string().default("text-embedding-004").describe("Embedding model to use. Options: 'text-embedding-004' (768 dimensions, default), 'gemini-embedding-001' (3072 dimensions, latest).").optional(),
7
+ title: zod.z.string().describe("Optional title for the content. Use with task_type='RETRIEVAL_DOCUMENT' to improve embedding quality for document search.").optional(),
8
+ task_type: zod.z.string().describe("Specifies the intended use case to optimize the embedding. Options: 'RETRIEVAL_QUERY' (search queries), 'RETRIEVAL_DOCUMENT' (documents to be searched), 'SEMANTIC_SIMILARITY' (text similarity), 'CLASSIFICATION' (categorization), 'CLUSTERING' (grouping), 'QUESTION_ANSWERING' (question-document matching). Note: Some task types like 'CODE_RETRIEVAL_QUERY' may only be supported by certain models.").optional(),
9
+ output_dimensionality: zod.z.number().int().describe("Truncate the embedding to this number of dimensions. Only supported by 'gemini-embedding-001' model. Recommended values: 768, 1536, or 3072. Lower dimensions reduce storage but may affect quality.").optional()
10
+ });
11
+ const GeminiEmbedContentOutput = zod.z.object({
12
+ embedding: zod.z.array(zod.z.number()).describe("The embedding vector as a list of floating-point numbers. Use for similarity calculations (e.g., cosine similarity) or as input to ML models."),
13
+ dimensions: zod.z.number().int().describe("The number of dimensions in the embedding vector.")
14
+ });
15
+ const geminiEmbedContent = require_action.action("GEMINI_EMBED_CONTENT", {
16
+ slug: "gemini-embed-content",
17
+ name: "Embed Content (Gemini)",
18
+ description: "Generates text embeddings using Gemini embedding models. Converts text into numerical vectors for semantic search, similarity comparison, clustering, and classification tasks.",
19
+ input: GeminiEmbedContentInput,
20
+ output: GeminiEmbedContentOutput
21
+ });
22
+ //#endregion
23
+ exports.geminiEmbedContent = geminiEmbedContent;
24
+
25
+ //# sourceMappingURL=embed-content.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embed-content.cjs","names":["z","action"],"sources":["../../src/actions/embed-content.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const GeminiEmbedContentInput: z.ZodTypeAny = z.object({\n text: z.string().describe(\"The text content to generate embeddings for.\"),\n model: z.string().default(\"text-embedding-004\").describe(\"Embedding model to use. Options: 'text-embedding-004' (768 dimensions, default), 'gemini-embedding-001' (3072 dimensions, latest).\").optional(),\n title: z.string().describe(\"Optional title for the content. Use with task_type='RETRIEVAL_DOCUMENT' to improve embedding quality for document search.\").optional(),\n task_type: z.string().describe(\"Specifies the intended use case to optimize the embedding. Options: 'RETRIEVAL_QUERY' (search queries), 'RETRIEVAL_DOCUMENT' (documents to be searched), 'SEMANTIC_SIMILARITY' (text similarity), 'CLASSIFICATION' (categorization), 'CLUSTERING' (grouping), 'QUESTION_ANSWERING' (question-document matching). Note: Some task types like 'CODE_RETRIEVAL_QUERY' may only be supported by certain models.\").optional(),\n output_dimensionality: z.number().int().describe(\"Truncate the embedding to this number of dimensions. Only supported by 'gemini-embedding-001' model. Recommended values: 768, 1536, or 3072. Lower dimensions reduce storage but may affect quality.\").optional(),\n});\nexport const GeminiEmbedContentOutput: z.ZodTypeAny = z.object({\n embedding: z.array(z.number()).describe(\"The embedding vector as a list of floating-point numbers. Use for similarity calculations (e.g., cosine similarity) or as input to ML models.\"),\n dimensions: z.number().int().describe(\"The number of dimensions in the embedding vector.\"),\n});\n\nexport const geminiEmbedContent = action(\"GEMINI_EMBED_CONTENT\", {\n slug: \"gemini-embed-content\",\n name: \"Embed Content (Gemini)\",\n description: \"Generates text embeddings using Gemini embedding models. Converts text into numerical vectors for semantic search, similarity comparison, clustering, and classification tasks.\",\n input: GeminiEmbedContentInput,\n output: GeminiEmbedContentOutput,\n});\n"],"mappings":";;;AAIA,MAAa,0BAAwCA,IAAAA,EAAE,OAAO;CAC5D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C;CACxE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,QAAQ,oBAAoB,CAAC,CAAC,SAAS,oIAAoI,CAAC,CAAC,SAAS;CACxM,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2HAA2H,CAAC,CAAC,SAAS;CACjK,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,6YAA6Y,CAAC,CAAC,SAAS;CACvb,uBAAuBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,sMAAsM,CAAC,CAAC,SAAS;AACpQ,CAAC;AACD,MAAa,2BAAyCA,IAAAA,EAAE,OAAO;CAC7D,WAAWA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,+IAA+I;CACvL,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mDAAmD;AAC3F,CAAC;AAED,MAAa,qBAAqBC,eAAAA,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/embed-content.d.ts
4
+ declare const GeminiEmbedContentInput: z.ZodTypeAny;
5
+ declare const GeminiEmbedContentOutput: z.ZodTypeAny;
6
+ declare const geminiEmbedContent: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { geminiEmbedContent };
9
+ //# sourceMappingURL=embed-content.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embed-content.d.cts","names":[],"sources":["../../src/actions/embed-content.ts"],"mappings":";;;cAIa,uBAAA,EAAyB,CAAA,CAAE,UAMtC;AAAA,cACW,wBAAA,EAA0B,CAAA,CAAE,UAGvC;AAAA,cAEW,kBAAA,gCAAkB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/embed-content.d.ts
4
+ declare const GeminiEmbedContentInput: z.ZodTypeAny;
5
+ declare const GeminiEmbedContentOutput: z.ZodTypeAny;
6
+ declare const geminiEmbedContent: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { geminiEmbedContent };
9
+ //# sourceMappingURL=embed-content.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embed-content.d.mts","names":[],"sources":["../../src/actions/embed-content.ts"],"mappings":";;;cAIa,uBAAA,EAAyB,CAAA,CAAE,UAMtC;AAAA,cACW,wBAAA,EAA0B,CAAA,CAAE,UAGvC;AAAA,cAEW,kBAAA,gCAAkB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,22 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ const geminiEmbedContent = action("GEMINI_EMBED_CONTENT", {
4
+ slug: "gemini-embed-content",
5
+ name: "Embed Content (Gemini)",
6
+ description: "Generates text embeddings using Gemini embedding models. Converts text into numerical vectors for semantic search, similarity comparison, clustering, and classification tasks.",
7
+ input: z.object({
8
+ text: z.string().describe("The text content to generate embeddings for."),
9
+ model: z.string().default("text-embedding-004").describe("Embedding model to use. Options: 'text-embedding-004' (768 dimensions, default), 'gemini-embedding-001' (3072 dimensions, latest).").optional(),
10
+ title: z.string().describe("Optional title for the content. Use with task_type='RETRIEVAL_DOCUMENT' to improve embedding quality for document search.").optional(),
11
+ task_type: z.string().describe("Specifies the intended use case to optimize the embedding. Options: 'RETRIEVAL_QUERY' (search queries), 'RETRIEVAL_DOCUMENT' (documents to be searched), 'SEMANTIC_SIMILARITY' (text similarity), 'CLASSIFICATION' (categorization), 'CLUSTERING' (grouping), 'QUESTION_ANSWERING' (question-document matching). Note: Some task types like 'CODE_RETRIEVAL_QUERY' may only be supported by certain models.").optional(),
12
+ output_dimensionality: z.number().int().describe("Truncate the embedding to this number of dimensions. Only supported by 'gemini-embedding-001' model. Recommended values: 768, 1536, or 3072. Lower dimensions reduce storage but may affect quality.").optional()
13
+ }),
14
+ output: z.object({
15
+ embedding: z.array(z.number()).describe("The embedding vector as a list of floating-point numbers. Use for similarity calculations (e.g., cosine similarity) or as input to ML models."),
16
+ dimensions: z.number().int().describe("The number of dimensions in the embedding vector.")
17
+ })
18
+ });
19
+ //#endregion
20
+ export { geminiEmbedContent };
21
+
22
+ //# sourceMappingURL=embed-content.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"embed-content.mjs","names":[],"sources":["../../src/actions/embed-content.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const GeminiEmbedContentInput: z.ZodTypeAny = z.object({\n text: z.string().describe(\"The text content to generate embeddings for.\"),\n model: z.string().default(\"text-embedding-004\").describe(\"Embedding model to use. Options: 'text-embedding-004' (768 dimensions, default), 'gemini-embedding-001' (3072 dimensions, latest).\").optional(),\n title: z.string().describe(\"Optional title for the content. Use with task_type='RETRIEVAL_DOCUMENT' to improve embedding quality for document search.\").optional(),\n task_type: z.string().describe(\"Specifies the intended use case to optimize the embedding. Options: 'RETRIEVAL_QUERY' (search queries), 'RETRIEVAL_DOCUMENT' (documents to be searched), 'SEMANTIC_SIMILARITY' (text similarity), 'CLASSIFICATION' (categorization), 'CLUSTERING' (grouping), 'QUESTION_ANSWERING' (question-document matching). Note: Some task types like 'CODE_RETRIEVAL_QUERY' may only be supported by certain models.\").optional(),\n output_dimensionality: z.number().int().describe(\"Truncate the embedding to this number of dimensions. Only supported by 'gemini-embedding-001' model. Recommended values: 768, 1536, or 3072. Lower dimensions reduce storage but may affect quality.\").optional(),\n});\nexport const GeminiEmbedContentOutput: z.ZodTypeAny = z.object({\n embedding: z.array(z.number()).describe(\"The embedding vector as a list of floating-point numbers. Use for similarity calculations (e.g., cosine similarity) or as input to ML models.\"),\n dimensions: z.number().int().describe(\"The number of dimensions in the embedding vector.\"),\n});\n\nexport const geminiEmbedContent = action(\"GEMINI_EMBED_CONTENT\", {\n slug: \"gemini-embed-content\",\n name: \"Embed Content (Gemini)\",\n description: \"Generates text embeddings using Gemini embedding models. Converts text into numerical vectors for semantic search, similarity comparison, clustering, and classification tasks.\",\n input: GeminiEmbedContentInput,\n output: GeminiEmbedContentOutput,\n});\n"],"mappings":";;AAgBA,MAAa,qBAAqB,OAAO,wBAAwB;CAC/D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAhBmD,EAAE,OAAO;EAC5D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C;EACxE,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,oBAAoB,CAAC,CAAC,SAAS,oIAAoI,CAAC,CAAC,SAAS;EACxM,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,2HAA2H,CAAC,CAAC,SAAS;EACjK,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,6YAA6Y,CAAC,CAAC,SAAS;EACvb,uBAAuB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,sMAAsM,CAAC,CAAC,SAAS;CACpQ,CAUS;CACP,QAVoD,EAAE,OAAO;EAC7D,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,+IAA+I;EACvL,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,mDAAmD;CAC3F,CAOU;AACV,CAAC"}
@@ -0,0 +1,66 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/generate-content.ts
4
+ const GeminiGenerateContentInput = zod.z.object({
5
+ model: zod.z.string().default("gemini-2.5-flash").describe("Model to use for generation. Text generation models: 'gemini-2.5-flash' (default, fast & efficient), 'gemini-2.5-pro' (advanced reasoning), 'gemini-2.0-flash' (previous generation), 'gemini-2.0-flash-lite' (cost-optimized). Text-to-speech models: 'gemini-2.5-flash-preview-tts' (low latency), 'gemini-2.5-pro-preview-tts' (high quality). Note: TTS models require voice_name parameter and return audio data instead of text.").optional(),
6
+ top_k: zod.z.number().int().describe("Top-k sampling parameter").optional(),
7
+ top_p: zod.z.number().describe("Nucleus sampling parameter (0.0 to 1.0)").optional(),
8
+ prompt: zod.z.string().describe("REQUIRED. The text prompt for content generation. This field must be provided. Example: 'Write a short poem about the ocean' or 'Explain quantum computing in simple terms'. For TTS models, include style instructions in the prompt (e.g., 'Say cheerfully: Hello!')."),
9
+ voice_name: zod.z.enum([
10
+ "Achernar",
11
+ "Achird",
12
+ "Algenib",
13
+ "Algieba",
14
+ "Alnilam",
15
+ "Aoede",
16
+ "Autonoe",
17
+ "Callirrhoe",
18
+ "Charon",
19
+ "Despina",
20
+ "Enceladus",
21
+ "Erinome",
22
+ "Fenrir",
23
+ "Gacrux",
24
+ "Iapetus",
25
+ "Kore",
26
+ "Laomedeia",
27
+ "Leda",
28
+ "Orus",
29
+ "Puck",
30
+ "Pulcherrima",
31
+ "Rasalgethi",
32
+ "Sadachbia",
33
+ "Sadaltager",
34
+ "Schedar",
35
+ "Sulafat",
36
+ "Umbriel",
37
+ "Vindemiatrix",
38
+ "Zephyr",
39
+ "Zubenelgenubi"
40
+ ]).describe("Available prebuilt voices for text-to-speech generation.\n\nComplete list of 30 official Gemini TTS voices as documented at:\nhttps://ai.google.dev/gemini-api/docs/speech-generation").optional(),
41
+ temperature: zod.z.number().describe("Controls randomness (0.0 to 2.0)").optional(),
42
+ stop_sequences: zod.z.array(zod.z.string()).describe("Sequences where generation should stop").optional(),
43
+ safety_settings: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).describe("Safety filter settings").optional(),
44
+ max_output_tokens: zod.z.number().int().describe("Maximum number of tokens to generate If response finishReason='MAX_TOKENS', output was truncated; narrow prompt scope or increase this value and regenerate.").optional(),
45
+ system_instruction: zod.z.string().describe("System instruction to guide the model's behavior").optional()
46
+ });
47
+ const GeminiGenerateContentOutput = zod.z.object({
48
+ raw: zod.z.record(zod.z.string(), zod.z.unknown()).nullable().optional(),
49
+ text: zod.z.string().describe("Generated text content (for text generation models)").nullable().optional(),
50
+ mime_type: zod.z.string().describe("MIME type of the audio data (e.g., 'audio/pcm')").nullable().optional(),
51
+ audio_data: zod.z.string().describe("Base64-encoded audio data (for TTS models). PCM format: 24000 Hz, mono, 16-bit.").nullable().optional(),
52
+ candidates: zod.z.array(zod.z.record(zod.z.string(), zod.z.unknown())).nullable().optional(),
53
+ usage_metadata: zod.z.record(zod.z.string(), zod.z.unknown()).nullable().optional(),
54
+ composio_execution_message: zod.z.string().describe("Informational message about execution").nullable().optional()
55
+ });
56
+ const geminiGenerateContent = require_action.action("GEMINI_GENERATE_CONTENT", {
57
+ slug: "gemini-generate-content",
58
+ name: "Generate Content (Gemini)",
59
+ description: "Generates text content or speech audio from prompts using Gemini models. Supports text generation models (Gemini Flash, Pro) and text-to-speech models with configurable parameters. Generated text is nested at results[i].response.data.text. Output may be wrapped in markdown fences (e.g., ```html...```) or preceded by explanatory prose; strip these before file writing or rendering.",
60
+ input: GeminiGenerateContentInput,
61
+ output: GeminiGenerateContentOutput
62
+ });
63
+ //#endregion
64
+ exports.geminiGenerateContent = geminiGenerateContent;
65
+
66
+ //# sourceMappingURL=generate-content.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-content.cjs","names":["z","action"],"sources":["../../src/actions/generate-content.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const GeminiGenerateContentInput: z.ZodTypeAny = z.object({\n model: z.string().default(\"gemini-2.5-flash\").describe(\"Model to use for generation. Text generation models: 'gemini-2.5-flash' (default, fast & efficient), 'gemini-2.5-pro' (advanced reasoning), 'gemini-2.0-flash' (previous generation), 'gemini-2.0-flash-lite' (cost-optimized). Text-to-speech models: 'gemini-2.5-flash-preview-tts' (low latency), 'gemini-2.5-pro-preview-tts' (high quality). Note: TTS models require voice_name parameter and return audio data instead of text.\").optional(),\n top_k: z.number().int().describe(\"Top-k sampling parameter\").optional(),\n top_p: z.number().describe(\"Nucleus sampling parameter (0.0 to 1.0)\").optional(),\n prompt: z.string().describe(\"REQUIRED. The text prompt for content generation. This field must be provided. Example: 'Write a short poem about the ocean' or 'Explain quantum computing in simple terms'. For TTS models, include style instructions in the prompt (e.g., 'Say cheerfully: Hello!').\"),\n voice_name: z.enum([\"Achernar\", \"Achird\", \"Algenib\", \"Algieba\", \"Alnilam\", \"Aoede\", \"Autonoe\", \"Callirrhoe\", \"Charon\", \"Despina\", \"Enceladus\", \"Erinome\", \"Fenrir\", \"Gacrux\", \"Iapetus\", \"Kore\", \"Laomedeia\", \"Leda\", \"Orus\", \"Puck\", \"Pulcherrima\", \"Rasalgethi\", \"Sadachbia\", \"Sadaltager\", \"Schedar\", \"Sulafat\", \"Umbriel\", \"Vindemiatrix\", \"Zephyr\", \"Zubenelgenubi\"]).describe(\"Available prebuilt voices for text-to-speech generation.\\n\\nComplete list of 30 official Gemini TTS voices as documented at:\\nhttps://ai.google.dev/gemini-api/docs/speech-generation\").optional(),\n temperature: z.number().describe(\"Controls randomness (0.0 to 2.0)\").optional(),\n stop_sequences: z.array(z.string()).describe(\"Sequences where generation should stop\").optional(),\n safety_settings: z.array(z.record(z.string(), z.unknown())).describe(\"Safety filter settings\").optional(),\n max_output_tokens: z.number().int().describe(\"Maximum number of tokens to generate If response finishReason='MAX_TOKENS', output was truncated; narrow prompt scope or increase this value and regenerate.\").optional(),\n system_instruction: z.string().describe(\"System instruction to guide the model's behavior\").optional(),\n});\nexport const GeminiGenerateContentOutput: z.ZodTypeAny = z.object({\n raw: z.record(z.string(), z.unknown()).nullable().optional(),\n text: z.string().describe(\"Generated text content (for text generation models)\").nullable().optional(),\n mime_type: z.string().describe(\"MIME type of the audio data (e.g., 'audio/pcm')\").nullable().optional(),\n audio_data: z.string().describe(\"Base64-encoded audio data (for TTS models). PCM format: 24000 Hz, mono, 16-bit.\").nullable().optional(),\n candidates: z.array(z.record(z.string(), z.unknown())).nullable().optional(),\n usage_metadata: z.record(z.string(), z.unknown()).nullable().optional(),\n composio_execution_message: z.string().describe(\"Informational message about execution\").nullable().optional(),\n});\n\nexport const geminiGenerateContent = action(\"GEMINI_GENERATE_CONTENT\", {\n slug: \"gemini-generate-content\",\n name: \"Generate Content (Gemini)\",\n description: \"Generates text content or speech audio from prompts using Gemini models. Supports text generation models (Gemini Flash, Pro) and text-to-speech models with configurable parameters. Generated text is nested at results[i].response.data.text. Output may be wrapped in markdown fences (e.g., ```html...```) or preceded by explanatory prose; strip these before file writing or rendering.\",\n input: GeminiGenerateContentInput,\n output: GeminiGenerateContentOutput,\n});\n"],"mappings":";;;AAIA,MAAa,6BAA2CA,IAAAA,EAAE,OAAO;CAC/D,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,QAAQ,kBAAkB,CAAC,CAAC,SAAS,waAAwa,CAAC,CAAC,SAAS;CAC1e,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CACtE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC/E,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yQAAyQ;CACrS,YAAYA,IAAAA,EAAE,KAAK;EAAC;EAAY;EAAU;EAAW;EAAW;EAAW;EAAS;EAAW;EAAc;EAAU;EAAW;EAAa;EAAW;EAAU;EAAU;EAAW;EAAQ;EAAa;EAAQ;EAAQ;EAAQ;EAAe;EAAc;EAAa;EAAc;EAAW;EAAW;EAAW;EAAgB;EAAU;CAAe,CAAC,CAAC,CAAC,SAAS,uLAAuL,CAAC,CAAC,SAAS;CACtjB,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;CAC9E,gBAAgBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;CAChG,iBAAiBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS;CACxG,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8JAA8J,CAAC,CAAC,SAAS;CACtN,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;AACvG,CAAC;AACD,MAAa,8BAA4CA,IAAAA,EAAE,OAAO;CAChE,KAAKA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACrG,WAAWA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtG,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACvI,YAAYA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3E,gBAAgBA,IAAAA,EAAE,OAAOA,IAAAA,EAAE,OAAO,GAAGA,IAAAA,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACtE,4BAA4BA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC/G,CAAC;AAED,MAAa,wBAAwBC,eAAAA,OAAO,2BAA2B;CACrE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/generate-content.d.ts
4
+ declare const GeminiGenerateContentInput: z.ZodTypeAny;
5
+ declare const GeminiGenerateContentOutput: z.ZodTypeAny;
6
+ declare const geminiGenerateContent: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { geminiGenerateContent };
9
+ //# sourceMappingURL=generate-content.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-content.d.cts","names":[],"sources":["../../src/actions/generate-content.ts"],"mappings":";;;cAIa,0BAAA,EAA4B,CAAA,CAAE,UAWzC;AAAA,cACW,2BAAA,EAA6B,CAAA,CAAE,UAQ1C;AAAA,cAEW,qBAAA,gCAAqB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/generate-content.d.ts
4
+ declare const GeminiGenerateContentInput: z.ZodTypeAny;
5
+ declare const GeminiGenerateContentOutput: z.ZodTypeAny;
6
+ declare const geminiGenerateContent: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { geminiGenerateContent };
9
+ //# sourceMappingURL=generate-content.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-content.d.mts","names":[],"sources":["../../src/actions/generate-content.ts"],"mappings":";;;cAIa,0BAAA,EAA4B,CAAA,CAAE,UAWzC;AAAA,cACW,2BAAA,EAA6B,CAAA,CAAE,UAQ1C;AAAA,cAEW,qBAAA,gCAAqB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,63 @@
1
+ import { action } from "../action.mjs";
2
+ import { z } from "zod";
3
+ const geminiGenerateContent = action("GEMINI_GENERATE_CONTENT", {
4
+ slug: "gemini-generate-content",
5
+ name: "Generate Content (Gemini)",
6
+ description: "Generates text content or speech audio from prompts using Gemini models. Supports text generation models (Gemini Flash, Pro) and text-to-speech models with configurable parameters. Generated text is nested at results[i].response.data.text. Output may be wrapped in markdown fences (e.g., ```html...```) or preceded by explanatory prose; strip these before file writing or rendering.",
7
+ input: z.object({
8
+ model: z.string().default("gemini-2.5-flash").describe("Model to use for generation. Text generation models: 'gemini-2.5-flash' (default, fast & efficient), 'gemini-2.5-pro' (advanced reasoning), 'gemini-2.0-flash' (previous generation), 'gemini-2.0-flash-lite' (cost-optimized). Text-to-speech models: 'gemini-2.5-flash-preview-tts' (low latency), 'gemini-2.5-pro-preview-tts' (high quality). Note: TTS models require voice_name parameter and return audio data instead of text.").optional(),
9
+ top_k: z.number().int().describe("Top-k sampling parameter").optional(),
10
+ top_p: z.number().describe("Nucleus sampling parameter (0.0 to 1.0)").optional(),
11
+ prompt: z.string().describe("REQUIRED. The text prompt for content generation. This field must be provided. Example: 'Write a short poem about the ocean' or 'Explain quantum computing in simple terms'. For TTS models, include style instructions in the prompt (e.g., 'Say cheerfully: Hello!')."),
12
+ voice_name: z.enum([
13
+ "Achernar",
14
+ "Achird",
15
+ "Algenib",
16
+ "Algieba",
17
+ "Alnilam",
18
+ "Aoede",
19
+ "Autonoe",
20
+ "Callirrhoe",
21
+ "Charon",
22
+ "Despina",
23
+ "Enceladus",
24
+ "Erinome",
25
+ "Fenrir",
26
+ "Gacrux",
27
+ "Iapetus",
28
+ "Kore",
29
+ "Laomedeia",
30
+ "Leda",
31
+ "Orus",
32
+ "Puck",
33
+ "Pulcherrima",
34
+ "Rasalgethi",
35
+ "Sadachbia",
36
+ "Sadaltager",
37
+ "Schedar",
38
+ "Sulafat",
39
+ "Umbriel",
40
+ "Vindemiatrix",
41
+ "Zephyr",
42
+ "Zubenelgenubi"
43
+ ]).describe("Available prebuilt voices for text-to-speech generation.\n\nComplete list of 30 official Gemini TTS voices as documented at:\nhttps://ai.google.dev/gemini-api/docs/speech-generation").optional(),
44
+ temperature: z.number().describe("Controls randomness (0.0 to 2.0)").optional(),
45
+ stop_sequences: z.array(z.string()).describe("Sequences where generation should stop").optional(),
46
+ safety_settings: z.array(z.record(z.string(), z.unknown())).describe("Safety filter settings").optional(),
47
+ max_output_tokens: z.number().int().describe("Maximum number of tokens to generate If response finishReason='MAX_TOKENS', output was truncated; narrow prompt scope or increase this value and regenerate.").optional(),
48
+ system_instruction: z.string().describe("System instruction to guide the model's behavior").optional()
49
+ }),
50
+ output: z.object({
51
+ raw: z.record(z.string(), z.unknown()).nullable().optional(),
52
+ text: z.string().describe("Generated text content (for text generation models)").nullable().optional(),
53
+ mime_type: z.string().describe("MIME type of the audio data (e.g., 'audio/pcm')").nullable().optional(),
54
+ audio_data: z.string().describe("Base64-encoded audio data (for TTS models). PCM format: 24000 Hz, mono, 16-bit.").nullable().optional(),
55
+ candidates: z.array(z.record(z.string(), z.unknown())).nullable().optional(),
56
+ usage_metadata: z.record(z.string(), z.unknown()).nullable().optional(),
57
+ composio_execution_message: z.string().describe("Informational message about execution").nullable().optional()
58
+ })
59
+ });
60
+ //#endregion
61
+ export { geminiGenerateContent };
62
+
63
+ //# sourceMappingURL=generate-content.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-content.mjs","names":[],"sources":["../../src/actions/generate-content.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const GeminiGenerateContentInput: z.ZodTypeAny = z.object({\n model: z.string().default(\"gemini-2.5-flash\").describe(\"Model to use for generation. Text generation models: 'gemini-2.5-flash' (default, fast & efficient), 'gemini-2.5-pro' (advanced reasoning), 'gemini-2.0-flash' (previous generation), 'gemini-2.0-flash-lite' (cost-optimized). Text-to-speech models: 'gemini-2.5-flash-preview-tts' (low latency), 'gemini-2.5-pro-preview-tts' (high quality). Note: TTS models require voice_name parameter and return audio data instead of text.\").optional(),\n top_k: z.number().int().describe(\"Top-k sampling parameter\").optional(),\n top_p: z.number().describe(\"Nucleus sampling parameter (0.0 to 1.0)\").optional(),\n prompt: z.string().describe(\"REQUIRED. The text prompt for content generation. This field must be provided. Example: 'Write a short poem about the ocean' or 'Explain quantum computing in simple terms'. For TTS models, include style instructions in the prompt (e.g., 'Say cheerfully: Hello!').\"),\n voice_name: z.enum([\"Achernar\", \"Achird\", \"Algenib\", \"Algieba\", \"Alnilam\", \"Aoede\", \"Autonoe\", \"Callirrhoe\", \"Charon\", \"Despina\", \"Enceladus\", \"Erinome\", \"Fenrir\", \"Gacrux\", \"Iapetus\", \"Kore\", \"Laomedeia\", \"Leda\", \"Orus\", \"Puck\", \"Pulcherrima\", \"Rasalgethi\", \"Sadachbia\", \"Sadaltager\", \"Schedar\", \"Sulafat\", \"Umbriel\", \"Vindemiatrix\", \"Zephyr\", \"Zubenelgenubi\"]).describe(\"Available prebuilt voices for text-to-speech generation.\\n\\nComplete list of 30 official Gemini TTS voices as documented at:\\nhttps://ai.google.dev/gemini-api/docs/speech-generation\").optional(),\n temperature: z.number().describe(\"Controls randomness (0.0 to 2.0)\").optional(),\n stop_sequences: z.array(z.string()).describe(\"Sequences where generation should stop\").optional(),\n safety_settings: z.array(z.record(z.string(), z.unknown())).describe(\"Safety filter settings\").optional(),\n max_output_tokens: z.number().int().describe(\"Maximum number of tokens to generate If response finishReason='MAX_TOKENS', output was truncated; narrow prompt scope or increase this value and regenerate.\").optional(),\n system_instruction: z.string().describe(\"System instruction to guide the model's behavior\").optional(),\n});\nexport const GeminiGenerateContentOutput: z.ZodTypeAny = z.object({\n raw: z.record(z.string(), z.unknown()).nullable().optional(),\n text: z.string().describe(\"Generated text content (for text generation models)\").nullable().optional(),\n mime_type: z.string().describe(\"MIME type of the audio data (e.g., 'audio/pcm')\").nullable().optional(),\n audio_data: z.string().describe(\"Base64-encoded audio data (for TTS models). PCM format: 24000 Hz, mono, 16-bit.\").nullable().optional(),\n candidates: z.array(z.record(z.string(), z.unknown())).nullable().optional(),\n usage_metadata: z.record(z.string(), z.unknown()).nullable().optional(),\n composio_execution_message: z.string().describe(\"Informational message about execution\").nullable().optional(),\n});\n\nexport const geminiGenerateContent = action(\"GEMINI_GENERATE_CONTENT\", {\n slug: \"gemini-generate-content\",\n name: \"Generate Content (Gemini)\",\n description: \"Generates text content or speech audio from prompts using Gemini models. Supports text generation models (Gemini Flash, Pro) and text-to-speech models with configurable parameters. Generated text is nested at results[i].response.data.text. Output may be wrapped in markdown fences (e.g., ```html...```) or preceded by explanatory prose; strip these before file writing or rendering.\",\n input: GeminiGenerateContentInput,\n output: GeminiGenerateContentOutput,\n});\n"],"mappings":";;AA0BA,MAAa,wBAAwB,OAAO,2BAA2B;CACrE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OA1BsD,EAAE,OAAO;EAC/D,OAAO,EAAE,OAAO,CAAC,CAAC,QAAQ,kBAAkB,CAAC,CAAC,SAAS,waAAwa,CAAC,CAAC,SAAS;EAC1e,OAAO,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;EACtE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;EAC/E,QAAQ,EAAE,OAAO,CAAC,CAAC,SAAS,yQAAyQ;EACrS,YAAY,EAAE,KAAK;GAAC;GAAY;GAAU;GAAW;GAAW;GAAW;GAAS;GAAW;GAAc;GAAU;GAAW;GAAa;GAAW;GAAU;GAAU;GAAW;GAAQ;GAAa;GAAQ;GAAQ;GAAQ;GAAe;GAAc;GAAa;GAAc;GAAW;GAAW;GAAW;GAAgB;GAAU;EAAe,CAAC,CAAC,CAAC,SAAS,uLAAuL,CAAC,CAAC,SAAS;EACtjB,aAAa,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;EAC9E,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,wCAAwC,CAAC,CAAC,SAAS;EAChG,iBAAiB,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,wBAAwB,CAAC,CAAC,SAAS;EACxG,mBAAmB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,8JAA8J,CAAC,CAAC,SAAS;EACtN,oBAAoB,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CACvG,CAeS;CACP,QAfuD,EAAE,OAAO;EAChE,KAAK,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3D,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,qDAAqD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACrG,WAAW,EAAE,OAAO,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACtG,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACvI,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC3E,gBAAgB,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACtE,4BAA4B,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC/G,CAOU;AACV,CAAC"}
@@ -0,0 +1,65 @@
1
+ const require_action = require("../action.cjs");
2
+ let zod = require("zod");
3
+ //#region src/actions/generate-image.ts
4
+ const GeminiGenerateImageInput = zod.z.object({
5
+ model: zod.z.enum([
6
+ "gemini-2.5-flash-image",
7
+ "gemini-3-pro-image-preview",
8
+ "gemini-2.0-flash-exp-image-generation"
9
+ ]).default("gemini-3-pro-image-preview").describe("Model to use for image generation. Options: 'gemini-2.5-flash-image' (GA stable, fast), 'gemini-3-pro-image-preview' (advanced with 4K, thinking mode), 'gemini-2.0-flash-exp-image-generation' (2.0 Flash experimental).").optional(),
10
+ top_k: zod.z.number().int().describe("Top-k sampling parameter").optional(),
11
+ top_p: zod.z.number().describe("Nucleus sampling parameter (0.0 to 1.0)").optional(),
12
+ prompt: zod.z.string().describe("Text prompt for image generation Sensitive, trademarked, or explicit content triggers HTTP 400 (PROHIBITED_CONTENT or IMAGE_RECITATION) with no image returned — rephrase into neutral, policy-compliant language rather than retrying identical prompts."),
13
+ timeout: zod.z.number().default(300).describe("Request timeout in seconds. Default is 300 seconds (5 minutes). Increase for complex prompts or high-resolution images. Minimum 120 seconds, maximum 600 seconds.").optional(),
14
+ image_size: zod.z.enum([
15
+ "1K",
16
+ "2K",
17
+ "4K"
18
+ ]).default("1K").describe("Output resolution (only for 'gemini-3-pro-image-preview'). Options: 1K, 2K, 4K.").optional(),
19
+ temperature: zod.z.number().describe("Controls randomness (0.0 to 2.0)").optional(),
20
+ aspect_ratio: zod.z.enum([
21
+ "1:1",
22
+ "2:3",
23
+ "3:2",
24
+ "3:4",
25
+ "4:3",
26
+ "4:5",
27
+ "5:4",
28
+ "9:16",
29
+ "16:9",
30
+ "21:9"
31
+ ]).default("1:1").describe("Aspect ratio for generated image. Not supported by 'gemini-2.0-flash-exp-image-generation' model. Accepted values: '1:1', '4:5', '16:9', '9:16'. Unsupported strings will fail or silently default to 1:1.").optional(),
32
+ safety_settings: zod.z.array(zod.z.object({
33
+ category: zod.z.enum([
34
+ "HARM_CATEGORY_HARASSMENT",
35
+ "HARM_CATEGORY_HATE_SPEECH",
36
+ "HARM_CATEGORY_SEXUALLY_EXPLICIT",
37
+ "HARM_CATEGORY_DANGEROUS_CONTENT"
38
+ ]).describe("The category of harmful content to filter"),
39
+ threshold: zod.z.enum([
40
+ "BLOCK_NONE",
41
+ "BLOCK_LOW_AND_ABOVE",
42
+ "BLOCK_MEDIUM_AND_ABOVE",
43
+ "BLOCK_ONLY_HIGH"
44
+ ]).describe("The threshold for blocking content in this category")
45
+ })).describe("Safety filter settings. List of objects specifying content categories to filter and threshold levels. Each setting requires 'category' (HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, or HARM_CATEGORY_DANGEROUS_CONTENT) and 'threshold' (BLOCK_NONE, BLOCK_LOW_AND_ABOVE, BLOCK_MEDIUM_AND_ABOVE, or BLOCK_ONLY_HIGH).").optional(),
46
+ max_output_tokens: zod.z.number().int().describe("Maximum number of tokens to generate (max 32,768). For image generation, images consume tokens based on resolution: 1K/2K consume 1,120 tokens, 4K consumes 2,000 tokens. If set too low, the API may return MAX_TOKENS finish reason with no image. If not specified, the API uses its default which is sufficient for image generation.").optional(),
47
+ system_instruction: zod.z.string().describe("System instruction to guide image generation behavior").optional()
48
+ });
49
+ const GeminiGenerateImage_FileDownloadableSchema = zod.z.object({
50
+ name: zod.z.string().describe("Name of the file"),
51
+ s3url: zod.z.string().describe("S3 URL of the downloaded file."),
52
+ mimetype: zod.z.string().describe("Mime type of the file.")
53
+ });
54
+ const GeminiGenerateImageOutput = zod.z.object({ image: GeminiGenerateImage_FileDownloadableSchema.nullable() });
55
+ const geminiGenerateImage = require_action.action("GEMINI_GENERATE_IMAGE", {
56
+ slug: "gemini-generate-image",
57
+ name: "Generate Image (Nano Banana)",
58
+ description: "Generates images from text prompts using Gemini models (Nano Banana). Supports models: 'gemini-2.5-flash-image' (GA stable, fast), 'gemini-3-pro-image-preview' (Nano Banana Pro - advanced with 4K resolution, thinking mode, up to 14 reference images), and 'gemini-2.0-flash-exp-image-generation' (2.0 Flash experimental). Returns one image per call; images are uploaded to S3. Parse response at data.image.s3url or the text-type entry in data.content — prefer the URL to avoid base64 blobs. Always validate s3url before treating call as successful; a 200 response may contain only text with no image. Store s3url immediately as URLs can expire. Output formats are raster only (JPG/PNG/WebP); request PNG for transparency. Concurrent usage may trigger HTTP 429/RESOURCE_EXHAUSTED — keep concurrency ≤3 and use exponential backoff (1s→2s→4s, ~5 retries). NOTE NEVER EVER TRUE SYNC_TO_WORKBENCH IN RUBE_MULTI_EXECUTE_TOOL",
59
+ input: GeminiGenerateImageInput,
60
+ output: GeminiGenerateImageOutput
61
+ });
62
+ //#endregion
63
+ exports.geminiGenerateImage = geminiGenerateImage;
64
+
65
+ //# sourceMappingURL=generate-image.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-image.cjs","names":["z","action"],"sources":["../../src/actions/generate-image.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const GeminiGenerateImageInput: z.ZodTypeAny = z.object({\n model: z.enum([\"gemini-2.5-flash-image\", \"gemini-3-pro-image-preview\", \"gemini-2.0-flash-exp-image-generation\"]).default(\"gemini-3-pro-image-preview\").describe(\"Model to use for image generation. Options: 'gemini-2.5-flash-image' (GA stable, fast), 'gemini-3-pro-image-preview' (advanced with 4K, thinking mode), 'gemini-2.0-flash-exp-image-generation' (2.0 Flash experimental).\").optional(),\n top_k: z.number().int().describe(\"Top-k sampling parameter\").optional(),\n top_p: z.number().describe(\"Nucleus sampling parameter (0.0 to 1.0)\").optional(),\n prompt: z.string().describe(\"Text prompt for image generation Sensitive, trademarked, or explicit content triggers HTTP 400 (PROHIBITED_CONTENT or IMAGE_RECITATION) with no image returned — rephrase into neutral, policy-compliant language rather than retrying identical prompts.\"),\n timeout: z.number().default(300).describe(\"Request timeout in seconds. Default is 300 seconds (5 minutes). Increase for complex prompts or high-resolution images. Minimum 120 seconds, maximum 600 seconds.\").optional(),\n image_size: z.enum([\"1K\", \"2K\", \"4K\"]).default(\"1K\").describe(\"Output resolution (only for 'gemini-3-pro-image-preview'). Options: 1K, 2K, 4K.\").optional(),\n temperature: z.number().describe(\"Controls randomness (0.0 to 2.0)\").optional(),\n aspect_ratio: z.enum([\"1:1\", \"2:3\", \"3:2\", \"3:4\", \"4:3\", \"4:5\", \"5:4\", \"9:16\", \"16:9\", \"21:9\"]).default(\"1:1\").describe(\"Aspect ratio for generated image. Not supported by 'gemini-2.0-flash-exp-image-generation' model. Accepted values: '1:1', '4:5', '16:9', '9:16'. Unsupported strings will fail or silently default to 1:1.\").optional(),\n safety_settings: z.array(z.object({\n category: z.enum([\"HARM_CATEGORY_HARASSMENT\", \"HARM_CATEGORY_HATE_SPEECH\", \"HARM_CATEGORY_SEXUALLY_EXPLICIT\", \"HARM_CATEGORY_DANGEROUS_CONTENT\"]).describe(\"The category of harmful content to filter\"),\n threshold: z.enum([\"BLOCK_NONE\", \"BLOCK_LOW_AND_ABOVE\", \"BLOCK_MEDIUM_AND_ABOVE\", \"BLOCK_ONLY_HIGH\"]).describe(\"The threshold for blocking content in this category\"),\n})).describe(\"Safety filter settings. List of objects specifying content categories to filter and threshold levels. Each setting requires 'category' (HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_HATE_SPEECH, HARM_CATEGORY_SEXUALLY_EXPLICIT, or HARM_CATEGORY_DANGEROUS_CONTENT) and 'threshold' (BLOCK_NONE, BLOCK_LOW_AND_ABOVE, BLOCK_MEDIUM_AND_ABOVE, or BLOCK_ONLY_HIGH).\").optional(),\n max_output_tokens: z.number().int().describe(\"Maximum number of tokens to generate (max 32,768). For image generation, images consume tokens based on resolution: 1K/2K consume 1,120 tokens, 4K consumes 2,000 tokens. If set too low, the API may return MAX_TOKENS finish reason with no image. If not specified, the API uses its default which is sufficient for image generation.\").optional(),\n system_instruction: z.string().describe(\"System instruction to guide image generation behavior\").optional(),\n});\nconst GeminiGenerateImage_FileDownloadableSchema: z.ZodTypeAny = z.object({\n name: z.string().describe(\"Name of the file\"),\n s3url: z.string().describe(\"S3 URL of the downloaded file.\"),\n mimetype: z.string().describe(\"Mime type of the file.\"),\n});\nexport const GeminiGenerateImageOutput: z.ZodTypeAny = z.object({\n image: GeminiGenerateImage_FileDownloadableSchema.nullable(),\n});\n\nexport const geminiGenerateImage = action(\"GEMINI_GENERATE_IMAGE\", {\n slug: \"gemini-generate-image\",\n name: \"Generate Image (Nano Banana)\",\n description: \"Generates images from text prompts using Gemini models (Nano Banana). Supports models: 'gemini-2.5-flash-image' (GA stable, fast), 'gemini-3-pro-image-preview' (Nano Banana Pro - advanced with 4K resolution, thinking mode, up to 14 reference images), and 'gemini-2.0-flash-exp-image-generation' (2.0 Flash experimental). Returns one image per call; images are uploaded to S3. Parse response at data.image.s3url or the text-type entry in data.content — prefer the URL to avoid base64 blobs. Always validate s3url before treating call as successful; a 200 response may contain only text with no image. Store s3url immediately as URLs can expire. Output formats are raster only (JPG/PNG/WebP); request PNG for transparency. Concurrent usage may trigger HTTP 429/RESOURCE_EXHAUSTED — keep concurrency ≤3 and use exponential backoff (1s→2s→4s, ~5 retries). NOTE NEVER EVER TRUE SYNC_TO_WORKBENCH IN RUBE_MULTI_EXECUTE_TOOL\",\n input: GeminiGenerateImageInput,\n output: GeminiGenerateImageOutput,\n});\n"],"mappings":";;;AAIA,MAAa,2BAAyCA,IAAAA,EAAE,OAAO;CAC7D,OAAOA,IAAAA,EAAE,KAAK;EAAC;EAA0B;EAA8B;CAAuC,CAAC,CAAC,CAAC,QAAQ,4BAA4B,CAAC,CAAC,SAAS,2NAA2N,CAAC,CAAC,SAAS;CACtY,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,0BAA0B,CAAC,CAAC,SAAS;CACtE,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAC/E,QAAQA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2PAA2P;CACvR,SAASA,IAAAA,EAAE,OAAO,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,SAAS,mKAAmK,CAAC,CAAC,SAAS;CACxN,YAAYA,IAAAA,EAAE,KAAK;EAAC;EAAM;EAAM;CAAI,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,CAAC,SAAS,iFAAiF,CAAC,CAAC,SAAS;CAC1J,aAAaA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kCAAkC,CAAC,CAAC,SAAS;CAC9E,cAAcA,IAAAA,EAAE,KAAK;EAAC;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAO;EAAQ;EAAQ;CAAM,CAAC,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,4MAA4M,CAAC,CAAC,SAAS;CAC/U,iBAAiBA,IAAAA,EAAE,MAAMA,IAAAA,EAAE,OAAO;EAClC,UAAUA,IAAAA,EAAE,KAAK;GAAC;GAA4B;GAA6B;GAAmC;EAAiC,CAAC,CAAC,CAAC,SAAS,2CAA2C;EACtM,WAAWA,IAAAA,EAAE,KAAK;GAAC;GAAc;GAAuB;GAA0B;EAAiB,CAAC,CAAC,CAAC,SAAS,qDAAqD;CACtK,CAAC,CAAC,CAAC,CAAC,SAAS,kWAAkW,CAAC,CAAC,SAAS;CACxX,mBAAmBA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,2UAA2U,CAAC,CAAC,SAAS;CACnY,oBAAoBA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;AAC5G,CAAC;AACD,MAAM,6CAA2DA,IAAAA,EAAE,OAAO;CACxE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kBAAkB;CAC5C,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC;CAC3D,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,wBAAwB;AACxD,CAAC;AACD,MAAa,4BAA0CA,IAAAA,EAAE,OAAO,EAC9D,OAAO,2CAA2C,SAAS,EAC7D,CAAC;AAED,MAAa,sBAAsBC,eAAAA,OAAO,yBAAyB;CACjE,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/generate-image.d.ts
4
+ declare const GeminiGenerateImageInput: z.ZodTypeAny;
5
+ declare const GeminiGenerateImageOutput: z.ZodTypeAny;
6
+ declare const geminiGenerateImage: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { geminiGenerateImage };
9
+ //# sourceMappingURL=generate-image.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-image.d.cts","names":[],"sources":["../../src/actions/generate-image.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UAevC;AAAA,cAMW,yBAAA,EAA2B,CAAA,CAAE,UAExC;AAAA,cAEW,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
@@ -0,0 +1,9 @@
1
+ import { z } from "zod";
2
+
3
+ //#region src/actions/generate-image.d.ts
4
+ declare const GeminiGenerateImageInput: z.ZodTypeAny;
5
+ declare const GeminiGenerateImageOutput: z.ZodTypeAny;
6
+ declare const geminiGenerateImage: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
7
+ //#endregion
8
+ export { geminiGenerateImage };
9
+ //# sourceMappingURL=generate-image.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-image.d.mts","names":[],"sources":["../../src/actions/generate-image.ts"],"mappings":";;;cAIa,wBAAA,EAA0B,CAAA,CAAE,UAevC;AAAA,cAMW,yBAAA,EAA2B,CAAA,CAAE,UAExC;AAAA,cAEW,mBAAA,gCAAmB,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}