@@ -180,10 +180,36 @@ def init(
180180 "elicitation" : "Elicitation server example" ,
181181 "sampling" : "Sampling server example" ,
182182 "notifications" : "Notifications server example" ,
183+ "hello-world" : "Basic hello world cloud example" ,
184+ "mcp" : "Comprehensive MCP server example with tools, sampling, elicitation" ,
185+ "temporal" : "Temporal integration with durable workflows" ,
186+ "chatgpt-app" : "ChatGPT App with interactive UI widgets" ,
183187 }
184188
185189 templates = {** scaffolding_templates , ** example_templates }
186190
191+ # Map template names to their source paths (shared by quickstart and template modes)
192+ # Format: "name": (repo_path, dest_name) for repo examples
193+ # "name": (None, dest_name, pkg_rel) for packaged examples
194+ example_map = {
195+ "workflow" : (EXAMPLE_ROOT / "workflows" , "workflow" ),
196+ "researcher" : (EXAMPLE_ROOT / "usecases" / "mcp_researcher" , "researcher" ),
197+ "data-analysis" : (EXAMPLE_ROOT / "usecases" / "mcp_financial_analyzer" , "data-analysis" ),
198+ "state-transfer" : (EXAMPLE_ROOT / "workflows" / "workflow_router" , "state-transfer" ),
199+ "basic-agent-server" : (EXAMPLE_ROOT / "mcp_agent_server" / "asyncio" , "basic_agent_server" ),
200+ "mcp-basic-agent" : (None , "mcp_basic_agent" , "basic/mcp_basic_agent" ),
201+ "token-counter" : (None , "token_counter" , "basic/token_counter" ),
202+ "agent-factory" : (None , "agent_factory" , "basic/agent_factory" ),
203+ "reference-agent-server" : (None , "reference_agent_server" , "mcp_agent_server/reference" ),
204+ "elicitation" : (None , "elicitation" , "mcp_agent_server/elicitation" ),
205+ "sampling" : (None , "sampling" , "mcp_agent_server/sampling" ),
206+ "notifications" : (None , "notifications" , "mcp_agent_server/notifications" ),
207+ "hello-world" : (EXAMPLE_ROOT / "cloud" / "hello_world" , "hello_world" ),
208+ "mcp" : (EXAMPLE_ROOT / "cloud" / "mcp" , "mcp" ),
209+ "temporal" : (EXAMPLE_ROOT / "cloud" / "temporal" , "temporal" ),
210+ "chatgpt-app" : (EXAMPLE_ROOT / "cloud" / "chatgpt_app" , "chatgpt_app" ),
211+ }
212+
187213 if list_templates :
188214 console .print ("\n [bold]Available Templates:[/bold]\n " )
189215
@@ -220,25 +246,6 @@ def init(
220246 console .print ("[dim]Use --list to see all available templates[/dim]" )
221247 raise typer .Exit (1 )
222248
223- example_map = {
224- "workflow" : (EXAMPLE_ROOT / "workflows" , "workflow" ),
225- "researcher" : (EXAMPLE_ROOT / "usecases" / "mcp_researcher" , "researcher" ),
226- "data-analysis" : (EXAMPLE_ROOT / "usecases" / "mcp_financial_analyzer" , "data-analysis" ),
227- "state-transfer" : (EXAMPLE_ROOT / "workflows" / "workflow_router" , "state-transfer" ),
228- "basic-agent-server" : (EXAMPLE_ROOT / "mcp_agent_server" / "asyncio" , "basic_agent_server" ),
229- "mcp-basic-agent" : (None , "mcp_basic_agent" , "basic/mcp_basic_agent" ),
230- "token-counter" : (None , "token_counter" , "basic/token_counter" ),
231- "agent-factory" : (None , "agent_factory" , "basic/agent_factory" ),
232- "reference-agent-server" : (None , "reference_agent_server" , "mcp_agent_server/reference" ),
233- "elicitation" : (None , "elicitation" , "mcp_agent_server/elicitation" ),
234- "sampling" : (None , "sampling" , "mcp_agent_server/sampling" ),
235- "notifications" : (None , "notifications" , "mcp_agent_server/notifications" ),
236- "hello-world" : (EXAMPLE_ROOT / "cloud" / "hello_world" , "hello_world" ),
237- "mcp" : (EXAMPLE_ROOT / "cloud" / "mcp" , "mcp" ),
238- "temporal" : (EXAMPLE_ROOT / "cloud" / "temporal" , "temporal" ),
239- "chatgpt-app" : (EXAMPLE_ROOT / "cloud" / "chatgpt_app" , "chatgpt_app" ),
240- }
241-
242249 mapping = example_map .get (quickstart )
243250 if not mapping :
244251 console .print (f"[red]Quickstart example '{ quickstart } ' not found[/red]" )
@@ -305,28 +312,6 @@ def init(
305312
306313 # Handle example templates (copy from repository or package)
307314 if template in example_templates :
308- # Map template names to their source paths
309- # Format: "name": (repo_path, dest_name) for repo examples
310- # "name": (None, dest_name, pkg_rel) for packaged examples
311- example_map = {
312- "workflow" : (EXAMPLE_ROOT / "workflows" , "workflow" ),
313- "researcher" : (EXAMPLE_ROOT / "usecases" / "mcp_researcher" , "researcher" ),
314- "data-analysis" : (EXAMPLE_ROOT / "usecases" / "mcp_financial_analyzer" , "data-analysis" ),
315- "state-transfer" : (EXAMPLE_ROOT / "workflows" / "workflow_router" , "state-transfer" ),
316- "basic-agent-server" : (EXAMPLE_ROOT / "mcp_agent_server" / "asyncio" , "basic_agent_server" ),
317- "mcp-basic-agent" : (None , "mcp_basic_agent" , "basic/mcp_basic_agent" ),
318- "token-counter" : (None , "token_counter" , "basic/token_counter" ),
319- "agent-factory" : (None , "agent_factory" , "basic/agent_factory" ),
320- "reference-agent-server" : (None , "reference_agent_server" , "mcp_agent_server/reference" ),
321- "elicitation" : (None , "elicitation" , "mcp_agent_server/elicitation" ),
322- "sampling" : (None , "sampling" , "mcp_agent_server/sampling" ),
323- "notifications" : (None , "notifications" , "mcp_agent_server/notifications" ),
324- "hello-world" : (EXAMPLE_ROOT / "cloud" / "hello_world" , "hello_world" ),
325- "mcp" : (EXAMPLE_ROOT / "cloud" / "mcp" , "mcp" ),
326- "temporal" : (EXAMPLE_ROOT / "cloud" / "temporal" , "temporal" ),
327- "chatgpt-app" : (EXAMPLE_ROOT / "cloud" / "chatgpt_app" , "chatgpt_app" ),
328- }
329-
330315 mapping = example_map .get (template )
331316 if not mapping :
332317 console .print (f"[red]Example template '{ template } ' not found[/red]" )
0 commit comments