From cc513433cbc34f8f86811273fa0f912d4fda623d Mon Sep 17 00:00:00 2001 From: "tembo[bot]" <208362400+tembo-io[bot]@users.noreply.github.com> Date: Thu, 16 Oct 2025 16:23:39 +0000 Subject: [PATCH 1/6] feat(create-kernel-app): Add Gemini CUA template Co-authored-by: null <> --- index.ts | 16 ++- templates/typescript/gemini-cua/README.md | 44 ++++++ templates/typescript/gemini-cua/_gitignore | 39 ++++++ templates/typescript/gemini-cua/index.ts | 131 ++++++++++++++++++ templates/typescript/gemini-cua/package.json | 14 ++ templates/typescript/gemini-cua/tsconfig.json | 23 +++ 6 files changed, 265 insertions(+), 2 deletions(-) create mode 100644 templates/typescript/gemini-cua/README.md create mode 100644 templates/typescript/gemini-cua/_gitignore create mode 100644 templates/typescript/gemini-cua/index.ts create mode 100644 templates/typescript/gemini-cua/package.json create mode 100644 templates/typescript/gemini-cua/tsconfig.json diff --git a/index.ts b/index.ts index d3860c6..0d1e4b7 100644 --- a/index.ts +++ b/index.ts @@ -20,7 +20,8 @@ type TemplateKey = | "advanced-sample" | "computer-use" | "cua" - | "magnitude"; + | "magnitude" + | "gemini-cua"; type LanguageInfo = { name: string; shorthand: string }; type TemplateInfo = { name: string; @@ -38,6 +39,7 @@ const TEMPLATE_ADVANCED_SAMPLE = "advanced-sample"; const TEMPLATE_COMPUTER_USE = "computer-use"; const TEMPLATE_CUA = "cua"; const TEMPLATE_MAGNITUDE = "magnitude"; +const TEMPLATE_GEMINI_CUA = "gemini-cua"; const LANGUAGE_SHORTHAND_TS = "ts"; const LANGUAGE_SHORTHAND_PY = "py"; @@ -86,6 +88,11 @@ const TEMPLATES: Record = { description: "Implements the Magnitude.run SDK", languages: [LANGUAGE_TYPESCRIPT], }, + [TEMPLATE_GEMINI_CUA]: { + name: "Gemini Computer Use", + description: "Implements Gemini 2.5 Computer Use Agent with Stagehand", + languages: [LANGUAGE_TYPESCRIPT], + }, }; const INVOKE_SAMPLES: Record< @@ -104,6 +111,8 @@ const INVOKE_SAMPLES: Record< 'kernel invoke ts-cua cua-task --payload \'{"task": "Go to https://news.ycombinator.com and get the top 5 articles"}\'', [TEMPLATE_MAGNITUDE]: 'kernel invoke ts-magnitude mag-url-extract --payload \'{"url": "https://en.wikipedia.org/wiki/Special:Random"}\'', + [TEMPLATE_GEMINI_CUA]: + 'kernel invoke ts-gemini-cua gemini-cua-task', }, [LANGUAGE_PYTHON]: { [TEMPLATE_SAMPLE_APP]: @@ -130,6 +139,7 @@ const REGISTERED_APP_NAMES: Record< [TEMPLATE_COMPUTER_USE]: "ts-cu", [TEMPLATE_CUA]: "ts-cua", [TEMPLATE_MAGNITUDE]: "ts-magnitude", + [TEMPLATE_GEMINI_CUA]: "ts-gemini-cua", }, [LANGUAGE_PYTHON]: { [TEMPLATE_SAMPLE_APP]: "python-basic", @@ -372,6 +382,8 @@ function printNextSteps( ? "kernel deploy index.ts --env ANTHROPIC_API_KEY=XXX" : language === LANGUAGE_TYPESCRIPT && template === TEMPLATE_CUA ? "kernel deploy index.ts --env OPENAI_API_KEY=XXX" + : language === LANGUAGE_TYPESCRIPT && template === TEMPLATE_GEMINI_CUA + ? "kernel deploy index.ts --env GOOGLE_API_KEY=XXX --env OPENAI_API_KEY=XXX" : language === LANGUAGE_PYTHON && (template === TEMPLATE_SAMPLE_APP || template === TEMPLATE_ADVANCED_SAMPLE) @@ -415,7 +427,7 @@ program ) .option( "-t, --template