@@ -17,7 +17,7 @@ type TemplateKey =
1717 | "sample-app"
1818 | "browser-use"
1919 | "stagehand"
20- | "persistent-browser "
20+ | "advanced-sample "
2121 | "computer-use" ;
2222type LanguageInfo = { name : string ; shorthand: string } ;
2323type TemplateInfo = {
@@ -32,7 +32,7 @@ const LANGUAGE_PYTHON = "python";
3232const TEMPLATE_SAMPLE_APP = "sample-app" ;
3333const TEMPLATE_BROWSER_USE = "browser-use" ;
3434const TEMPLATE_STAGEHAND = "stagehand" ;
35- const TEMPLATE_PERSISTENT_BROWSER = "persistent-browser " ;
35+ const TEMPLATE_ADVANCED_SAMPLE = "advanced-sample " ;
3636const TEMPLATE_COMPUTER_USE = "computer-use" ;
3737const LANGUAGE_SHORTHAND_TS = "ts" ;
3838const LANGUAGE_SHORTHAND_PY = "py" ;
@@ -62,10 +62,10 @@ const TEMPLATES: Record<TemplateKey, TemplateInfo> = {
6262 description : "Implements the Stagehand SDK" ,
6363 languages : [ LANGUAGE_TYPESCRIPT ] ,
6464 } ,
65- [ TEMPLATE_PERSISTENT_BROWSER ] : {
66- name : "Persistent Browser " ,
65+ [ TEMPLATE_ADVANCED_SAMPLE ] : {
66+ name : "Advanced Samples " ,
6767 description :
68- "Implements a persistent browser that maintains state across invocations " ,
68+ "Implements sample actions with advanced Kernel configs " ,
6969 languages : [ LANGUAGE_TYPESCRIPT , LANGUAGE_PYTHON ] ,
7070 } ,
7171 [ TEMPLATE_COMPUTER_USE ] : {
@@ -84,8 +84,8 @@ const INVOKE_SAMPLES: Record<
8484 'kernel invoke ts-basic get-page-title --payload \'{"url": "https://www.google.com"}\'' ,
8585 [ TEMPLATE_STAGEHAND ] :
8686 'kernel invoke ts-stagehand stagehand-task --payload \'{"query": "Best wired earbuds"}\'' ,
87- [ TEMPLATE_PERSISTENT_BROWSER ] :
88- 'kernel invoke ts-persistent-browser persistent-browser-task --payload \'{"url": "https://news.ycombinator.com/"}\' ' ,
87+ [ TEMPLATE_ADVANCED_SAMPLE ] :
88+ 'kernel invoke ts-advanced test-captcha-solver ' ,
8989 [ TEMPLATE_COMPUTER_USE ] :
9090 'kernel invoke ts-cu cu-task --payload \'{"query": "Return the first url of a search result for NYC restaurant reviews Pete Wells"}\'' ,
9191 } ,
@@ -94,8 +94,8 @@ const INVOKE_SAMPLES: Record<
9494 'kernel invoke python-basic get-page-title --payload \'{"url": "https://www.google.com"}\'' ,
9595 [ TEMPLATE_BROWSER_USE ] :
9696 'kernel invoke python-bu bu-task --payload \'{"task": "Compare the price of gpt-4o and DeepSeek-V3"}\'' ,
97- [ TEMPLATE_PERSISTENT_BROWSER ] :
98- 'kernel invoke python-persistent-browser persistent-browser-task --payload \'{"url": "https://news.ycombinator.com/"}\' ' ,
97+ [ TEMPLATE_ADVANCED_SAMPLE ] :
98+ 'kernel invoke python-advanced test-captcha-solver ' ,
9999 [ TEMPLATE_COMPUTER_USE ] :
100100 'kernel invoke python-cu cu-task --payload \'{"query": "Return the first url of a search result for NYC restaurant reviews Pete Wells"}\'' ,
101101 } ,
@@ -110,8 +110,8 @@ const REGISTERED_APP_NAMES: Record<
110110 'ts-basic' ,
111111 [ TEMPLATE_STAGEHAND ] :
112112 'ts-stagehand' ,
113- [ TEMPLATE_PERSISTENT_BROWSER ] :
114- 'ts-persistent-browser ' ,
113+ [ TEMPLATE_ADVANCED_SAMPLE ] :
114+ 'ts-advanced ' ,
115115 [ TEMPLATE_COMPUTER_USE ] :
116116 'ts-cu' ,
117117 } ,
@@ -120,8 +120,8 @@ const REGISTERED_APP_NAMES: Record<
120120 'python-basic' ,
121121 [ TEMPLATE_BROWSER_USE ] :
122122 'python-bu' ,
123- [ TEMPLATE_PERSISTENT_BROWSER ] :
124- 'python-persistent-browser ' ,
123+ [ TEMPLATE_ADVANCED_SAMPLE ] :
124+ 'python-advanced ' ,
125125 [ TEMPLATE_COMPUTER_USE ] :
126126 'python-cu' ,
127127 } ,
@@ -336,13 +336,13 @@ function printNextSteps(
336336) : void {
337337 // Determine which sample command to show based on language and template
338338 const deployCommand =
339- language === LANGUAGE_TYPESCRIPT && ( template === TEMPLATE_SAMPLE_APP || template === TEMPLATE_PERSISTENT_BROWSER )
339+ language === LANGUAGE_TYPESCRIPT && ( template === TEMPLATE_SAMPLE_APP || template === TEMPLATE_ADVANCED_SAMPLE )
340340 ? "kernel deploy index.ts"
341341 : language === LANGUAGE_TYPESCRIPT && template === TEMPLATE_STAGEHAND
342342 ? "kernel deploy index.ts --env OPENAI_API_KEY=XXX"
343343 : language === LANGUAGE_TYPESCRIPT && template === TEMPLATE_COMPUTER_USE
344344 ? "kernel deploy index.ts --env ANTHROPIC_API_KEY=XXX"
345- : language === LANGUAGE_PYTHON && template === TEMPLATE_SAMPLE_APP
345+ : language === LANGUAGE_PYTHON && ( template === TEMPLATE_SAMPLE_APP || template === TEMPLATE_ADVANCED_SAMPLE )
346346 ? "kernel deploy main.py"
347347 : language === LANGUAGE_PYTHON && template === TEMPLATE_BROWSER_USE
348348 ? "kernel deploy main.py --env OPENAI_API_KEY=XXX"
@@ -384,7 +384,7 @@ program
384384 )
385385 . option (
386386 "-t, --template <template>" ,
387- `Template type (${ TEMPLATE_SAMPLE_APP } , ${ TEMPLATE_BROWSER_USE } , ${ TEMPLATE_STAGEHAND } , ${ TEMPLATE_PERSISTENT_BROWSER } , ${ TEMPLATE_COMPUTER_USE } )`
387+ `Template type (${ TEMPLATE_SAMPLE_APP } , ${ TEMPLATE_BROWSER_USE } , ${ TEMPLATE_STAGEHAND } , ${ TEMPLATE_ADVANCED_SAMPLE } , ${ TEMPLATE_COMPUTER_USE } )`
388388 )
389389 . action (
390390 async (
0 commit comments