agent-starter-pack 0.17.1__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.
- agent_starter_pack/cli/commands/create.py +5 -3
- agent_starter_pack/cli/commands/enhance.py +14 -6
- agent_starter_pack/cli/utils/template.py +16 -18
- {agent_starter_pack-0.17.1.dist-info → agent_starter_pack-0.17.3.dist-info}/METADATA +1 -1
- {agent_starter_pack-0.17.1.dist-info → agent_starter_pack-0.17.3.dist-info}/RECORD +8 -8
- {agent_starter_pack-0.17.1.dist-info → agent_starter_pack-0.17.3.dist-info}/WHEEL +0 -0
- {agent_starter_pack-0.17.1.dist-info → agent_starter_pack-0.17.3.dist-info}/entry_points.txt +0 -0
- {agent_starter_pack-0.17.1.dist-info → agent_starter_pack-0.17.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -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
|
|
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
|
|
509
|
+
pathlib.Path(__file__).parent.parent.parent
|
|
508
510
|
/ "agents"
|
|
509
511
|
/ final_agent
|
|
510
512
|
/ ".template"
|
|
@@ -94,16 +94,22 @@ def display_base_template_selection(current_base: str) -> str:
|
|
|
94
94
|
|
|
95
95
|
|
|
96
96
|
def display_agent_directory_selection(
|
|
97
|
-
current_dir: pathlib.Path, detected_directory: str
|
|
97
|
+
current_dir: pathlib.Path, detected_directory: str, base_template: str | None = None
|
|
98
98
|
) -> str:
|
|
99
99
|
"""Display available directories and prompt for agent directory selection."""
|
|
100
|
+
# Determine the required object name based on base template
|
|
101
|
+
is_adk = base_template and "adk" in base_template.lower()
|
|
102
|
+
required_object = "root_agent" if is_adk else "agent"
|
|
103
|
+
|
|
100
104
|
while True:
|
|
101
105
|
console.print()
|
|
102
106
|
console.print("📁 [bold]Agent Directory Selection[/bold]")
|
|
103
107
|
console.print()
|
|
104
108
|
console.print("Your project needs an agent directory containing:")
|
|
105
109
|
console.print(" • [cyan]agent.py[/cyan] file with your agent logic")
|
|
106
|
-
console.print(
|
|
110
|
+
console.print(
|
|
111
|
+
f" • [cyan]{required_object}[/cyan] variable defined in agent.py"
|
|
112
|
+
)
|
|
107
113
|
console.print()
|
|
108
114
|
console.print("Choose where your agent code is located:")
|
|
109
115
|
|
|
@@ -358,6 +364,8 @@ def enhance(
|
|
|
358
364
|
selected_base_template = display_base_template_selection(
|
|
359
365
|
original_base_template_name
|
|
360
366
|
)
|
|
367
|
+
# Always set base_template to the selected value (even if unchanged)
|
|
368
|
+
base_template = selected_base_template
|
|
361
369
|
if selected_base_template != original_base_template_name:
|
|
362
370
|
# Update CLI overrides with the selected base template
|
|
363
371
|
cli_overrides["base_template"] = selected_base_template
|
|
@@ -365,7 +373,6 @@ def enhance(
|
|
|
365
373
|
if agent_directory:
|
|
366
374
|
cli_overrides["settings"] = cli_overrides.get("settings", {})
|
|
367
375
|
cli_overrides["settings"]["agent_directory"] = agent_directory
|
|
368
|
-
base_template = selected_base_template
|
|
369
376
|
console.print(
|
|
370
377
|
f"✅ Selected base template: [cyan]{selected_base_template}[/cyan]"
|
|
371
378
|
)
|
|
@@ -421,7 +428,7 @@ def enhance(
|
|
|
421
428
|
# Interactive agent directory selection if not provided via CLI and not auto-approved
|
|
422
429
|
if not agent_directory and not auto_approve:
|
|
423
430
|
selected_agent_directory = display_agent_directory_selection(
|
|
424
|
-
current_dir, detected_agent_directory
|
|
431
|
+
current_dir, detected_agent_directory, base_template
|
|
425
432
|
)
|
|
426
433
|
final_agent_directory = selected_agent_directory
|
|
427
434
|
console.print(
|
|
@@ -573,9 +580,10 @@ def enhance(
|
|
|
573
580
|
final_cli_overrides["base_template"] = base_template
|
|
574
581
|
|
|
575
582
|
# For current directory templates, ensure agent_directory is included in cli_overrides
|
|
576
|
-
|
|
583
|
+
# final_agent_directory is set from interactive selection or CLI/detection
|
|
584
|
+
if template_path == pathlib.Path(".") and final_agent_directory:
|
|
577
585
|
final_cli_overrides["settings"] = final_cli_overrides.get("settings", {})
|
|
578
|
-
final_cli_overrides["settings"]["agent_directory"] =
|
|
586
|
+
final_cli_overrides["settings"]["agent_directory"] = final_agent_directory
|
|
579
587
|
|
|
580
588
|
# Call the create command with in-folder mode enabled
|
|
581
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
|
|
583
|
-
early_config = remote_config
|
|
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.
|
|
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
|
-
"
|
|
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
|
|
641
|
-
config = remote_config
|
|
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
|
-
#
|
|
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"
|
|
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"
|
|
690
|
+
logging.debug(f"6. Copying {folder} folder with override")
|
|
693
691
|
copy_files(
|
|
694
692
|
agent_folder,
|
|
695
693
|
project_folder,
|
|
@@ -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=
|
|
73
|
-
agent_starter_pack/cli/commands/enhance.py,sha256=
|
|
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=
|
|
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.
|
|
176
|
-
agent_starter_pack-0.17.
|
|
177
|
-
agent_starter_pack-0.17.
|
|
178
|
-
agent_starter_pack-0.17.
|
|
179
|
-
agent_starter_pack-0.17.
|
|
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,,
|
|
File without changes
|
{agent_starter_pack-0.17.1.dist-info → agent_starter_pack-0.17.3.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{agent_starter_pack-0.17.1.dist-info → agent_starter_pack-0.17.3.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|