agent-starter-pack 0.17.2__py3-none-any.whl → 0.17.3__py3-none-any.whl

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.

Potentially problematic release.


This version of agent-starter-pack might be problematic. Click here for more details.

@@ -470,7 +470,9 @@ def create(
470
470
  # Load template configuration based on whether it's remote or local
471
471
  if template_source_path:
472
472
  # Prepare CLI overrides for remote template config
473
- cli_overrides = {}
473
+ # Initialize cli_overrides if not provided (e.g., from enhance command)
474
+ if cli_overrides is None:
475
+ cli_overrides = {}
474
476
  if base_template:
475
477
  cli_overrides["base_template"] = base_template
476
478
 
@@ -491,7 +493,7 @@ def create(
491
493
  logging.debug(f"Using base template: {base_template_name}")
492
494
 
493
495
  base_template_path = (
494
- pathlib.Path(__file__).parent.parent.parent.parent
496
+ pathlib.Path(__file__).parent.parent.parent
495
497
  / "agents"
496
498
  / base_template_name
497
499
  / ".template"
@@ -504,7 +506,7 @@ def create(
504
506
  template_path = template_source_path / ".template"
505
507
  else:
506
508
  template_path = (
507
- pathlib.Path(__file__).parent.parent.parent.parent
509
+ pathlib.Path(__file__).parent.parent.parent
508
510
  / "agents"
509
511
  / final_agent
510
512
  / ".template"
@@ -329,10 +329,7 @@ def enhance(
329
329
  console.print()
330
330
 
331
331
  # Determine agent specification based on template_path
332
- # If base_template is specified, use it as the agent spec
333
- if base_template:
334
- agent_spec = base_template
335
- elif template_path == pathlib.Path("."):
332
+ if template_path == pathlib.Path("."):
336
333
  # Current directory - use local@ syntax
337
334
  agent_spec = "local@."
338
335
  elif template_path.is_dir():
@@ -367,6 +364,8 @@ def enhance(
367
364
  selected_base_template = display_base_template_selection(
368
365
  original_base_template_name
369
366
  )
367
+ # Always set base_template to the selected value (even if unchanged)
368
+ base_template = selected_base_template
370
369
  if selected_base_template != original_base_template_name:
371
370
  # Update CLI overrides with the selected base template
372
371
  cli_overrides["base_template"] = selected_base_template
@@ -374,7 +373,6 @@ def enhance(
374
373
  if agent_directory:
375
374
  cli_overrides["settings"] = cli_overrides.get("settings", {})
376
375
  cli_overrides["settings"]["agent_directory"] = agent_directory
377
- base_template = selected_base_template
378
376
  console.print(
379
377
  f"✅ Selected base template: [cyan]{selected_base_template}[/cyan]"
380
378
  )
@@ -582,9 +580,10 @@ def enhance(
582
580
  final_cli_overrides["base_template"] = base_template
583
581
 
584
582
  # For current directory templates, ensure agent_directory is included in cli_overrides
585
- if template_path == pathlib.Path(".") and agent_directory:
583
+ # final_agent_directory is set from interactive selection or CLI/detection
584
+ if template_path == pathlib.Path(".") and final_agent_directory:
586
585
  final_cli_overrides["settings"] = final_cli_overrides.get("settings", {})
587
- final_cli_overrides["settings"]["agent_directory"] = agent_directory
586
+ final_cli_overrides["settings"]["agent_directory"] = final_agent_directory
588
587
 
589
588
  # Call the create command with in-folder mode enabled
590
589
  ctx.invoke(
@@ -579,8 +579,8 @@ def process_template(
579
579
  )
580
580
  # Get agent directory from config early for use in file copying
581
581
  # Load config early to get agent_directory
582
- if is_remote:
583
- early_config = remote_config or {}
582
+ if remote_config:
583
+ early_config = remote_config
584
584
  else:
585
585
  template_path = pathlib.Path(template_dir)
586
586
  early_config = load_template_config(template_path)
@@ -620,25 +620,16 @@ def process_template(
620
620
  )
621
621
  copy_data_ingestion_files(project_template, datastore)
622
622
 
623
- # 4. Process frontend files
624
- # Load template config
625
- template_config = load_template_config(pathlib.Path(template_dir))
626
- frontend_type = template_config.get("settings", {}).get(
627
- "frontend_type", DEFAULT_FRONTEND
628
- )
629
- copy_frontend_files(frontend_type, project_template)
630
- logging.debug(f"4. Processed frontend files for type: {frontend_type}")
631
-
632
- # 6. Skip remote template files during cookiecutter processing
623
+ # 4. Skip remote template files during cookiecutter processing
633
624
  # Remote files will be copied after cookiecutter to avoid Jinja conflicts
634
625
  if is_remote and remote_template_path:
635
626
  logging.debug(
636
- "6. Skipping remote template files during cookiecutter processing - will copy after templating"
627
+ "4. Skipping remote template files during cookiecutter processing - will copy after templating"
637
628
  )
638
629
 
639
630
  # Load and validate template config first
640
- if is_remote:
641
- config = remote_config or {}
631
+ if remote_config:
632
+ config = remote_config
642
633
  else:
643
634
  template_path = pathlib.Path(template_dir)
644
635
  config = load_template_config(template_path)
@@ -659,7 +650,14 @@ def process_template(
659
650
  # Use the already loaded config
660
651
  template_config = config
661
652
 
662
- # 5. Copy agent-specific files to override base template (using final config)
653
+ # Process frontend files (after config is properly loaded with CLI overrides)
654
+ frontend_type = template_config.get("settings", {}).get(
655
+ "frontend_type", DEFAULT_FRONTEND
656
+ )
657
+ copy_frontend_files(frontend_type, project_template)
658
+ logging.debug(f"5. Processed frontend files for type: {frontend_type}")
659
+
660
+ # 6. Copy agent-specific files to override base template (using final config)
663
661
  if agent_path.exists():
664
662
  agent_directory = get_agent_directory(template_config, cli_overrides)
665
663
 
@@ -673,7 +671,7 @@ def process_template(
673
671
  target_agent_folder = project_template / agent_directory
674
672
  if source_agent_folder.exists():
675
673
  logging.debug(
676
- f"5. Copying agent folder {template_agent_directory} -> {agent_directory} with override"
674
+ f"6. Copying agent folder {template_agent_directory} -> {agent_directory} with override"
677
675
  )
678
676
  copy_files(
679
677
  source_agent_folder,
@@ -689,7 +687,7 @@ def process_template(
689
687
  agent_folder = agent_path / folder
690
688
  project_folder = project_template / folder
691
689
  if agent_folder.exists():
692
- logging.debug(f"5. Copying {folder} folder with override")
690
+ logging.debug(f"6. Copying {folder} folder with override")
693
691
  copy_files(
694
692
  agent_folder,
695
693
  project_folder,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agent-starter-pack
3
- Version: 0.17.2
3
+ Version: 0.17.3
4
4
  Summary: CLI to bootstrap production-ready Google Cloud GenAI agent projects from templates.
5
5
  Author-email: Google LLC <agent-starter-pack@google.com>
6
6
  License: Apache-2.0
@@ -69,8 +69,8 @@ agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/utils/gcs.py,s
69
69
  agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/utils/tracing.py,sha256=QxI-6NbiqMLFL2WSpZjNsxCPUY6xm2_maS2sRtbtG6Y,6040
70
70
  agent_starter_pack/base_template/{{cookiecutter.agent_directory}}/utils/typing.py,sha256=cfirFUBZQOwfQjEs9EYYP2nubv6BEpVzFHPj85PTMmg,4221
71
71
  agent_starter_pack/cli/main.py,sha256=eKi-Oi6pv2-LNiN3RYdrmvDiLXInWHkNMn8lGlkmVP4,1982
72
- agent_starter_pack/cli/commands/create.py,sha256=wuRL9lX6_AL6EucRSlixP91iIo5ROeDlLUAOIGOoCbA,47322
73
- agent_starter_pack/cli/commands/enhance.py,sha256=zFnxuQbEVTUtkRS3XuuuHlZ7wKIrpaNzggYN2100oYM,24622
72
+ agent_starter_pack/cli/commands/create.py,sha256=n81dkq-bO7mRlAv2Qw88b01Xg8KILQxw-biphQqdXKs,47434
73
+ agent_starter_pack/cli/commands/enhance.py,sha256=dpITDtlMMbo_FIfebNo_i8YxmOIOWCBqRgJ5G4s3nTU,24669
74
74
  agent_starter_pack/cli/commands/list.py,sha256=ZGol9eYB9Yon7JysMUCtpEOwdXzrApdTHzErx6KvT04,6856
75
75
  agent_starter_pack/cli/commands/setup_cicd.py,sha256=UnhU8p9emfBV-7_6uKYdUfTQBnsbSIFQbJoMHMq8pik,32507
76
76
  agent_starter_pack/cli/utils/__init__.py,sha256=_cTmsXGPqOtK0q8UW5164QTltbJRJFR_Efxq_BRL1-o,1311
@@ -79,7 +79,7 @@ agent_starter_pack/cli/utils/datastores.py,sha256=gv1V6eDcOEKx4MRNG5C3Y-VfixYq1A
79
79
  agent_starter_pack/cli/utils/gcp.py,sha256=N6pvNU9gT6DpS7Peipfs57ckvqcUWU7OK1zdqBcQV0M,9276
80
80
  agent_starter_pack/cli/utils/logging.py,sha256=61ulUY1hUrpxHDFi0szqsjPlrpxdBvwzfYEEV0o97GA,3530
81
81
  agent_starter_pack/cli/utils/remote_template.py,sha256=CD5imiJPGIMVRhGOCiB11oFsz9Pusy_A2kdxsvMfscE,24129
82
- agent_starter_pack/cli/utils/template.py,sha256=DawkOJzHV3PvT3MuVvTvoHNOdgYfEb_IR009ox3rNC8,52527
82
+ agent_starter_pack/cli/utils/template.py,sha256=9U3eZOqISbCQ-uOmGwLCWagTDjaGPmIKqiei1XiID8w,52459
83
83
  agent_starter_pack/cli/utils/version.py,sha256=F4udQmzniPStqWZFIgnv3Qg3l9non4mfy2An-Oveqmc,2916
84
84
  agent_starter_pack/data_ingestion/README.md,sha256=LNxSQoJW9JozK-TbyGQLj5L_MGWNwrfLk6V6RmQ2oBQ,4032
85
85
  agent_starter_pack/data_ingestion/pyproject.toml,sha256=-1Mf2QB8K70ICQV5UPZDpf-fN3UwEQLVzQyxfakCSTY,445
@@ -172,8 +172,8 @@ agent_starter_pack/utils/generate_locks.py,sha256=LwR46w25CV0_ySF_MS9W2vp7S1Nf17
172
172
  agent_starter_pack/utils/lock_utils.py,sha256=vqFHTN7lju9to74MKOmLvz80BA47G0CVkxrd1MyLWYQ,2309
173
173
  agent_starter_pack/utils/watch_and_rebuild.py,sha256=1hMn29eLpVblfvixV9FEo46u8efmnLuRIn-bPrfdW3g,6694
174
174
  llm.txt,sha256=z9FTkAnj3cErCzHj3IES9eB35wW3JGaVsd8a0wA7IMs,15380
175
- agent_starter_pack-0.17.2.dist-info/METADATA,sha256=yJSYoXd9l5G7IlDuSfpUOv28GDC3B8jyswf1j6hIqZo,11195
176
- agent_starter_pack-0.17.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
177
- agent_starter_pack-0.17.2.dist-info/entry_points.txt,sha256=QLSX_97UynG0vLpoZ3ePfyCQkaR-g0qglp2b26G4KHQ,71
178
- agent_starter_pack-0.17.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
179
- agent_starter_pack-0.17.2.dist-info/RECORD,,
175
+ agent_starter_pack-0.17.3.dist-info/METADATA,sha256=AoJJ2_IV8bTBJlXB2n_GYo42d_LNuF_olt-jlnKd9i0,11195
176
+ agent_starter_pack-0.17.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
177
+ agent_starter_pack-0.17.3.dist-info/entry_points.txt,sha256=QLSX_97UynG0vLpoZ3ePfyCQkaR-g0qglp2b26G4KHQ,71
178
+ agent_starter_pack-0.17.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
179
+ agent_starter_pack-0.17.3.dist-info/RECORD,,