agentstack-cli 0.4.1__tar.gz → 0.4.1rc1__tar.gz
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.
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/PKG-INFO +1 -1
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/pyproject.toml +1 -1
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/agent.py +67 -1
- agentstack_cli-0.4.1rc1/src/agentstack_cli/data/helm-chart.tgz +0 -0
- agentstack_cli-0.4.1/src/agentstack_cli/data/helm-chart.tgz +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/README.md +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/__init__.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/api.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/async_typer.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/auth_manager.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/__init__.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/build.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/mcp.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/model.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/platform/__init__.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/platform/base_driver.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/platform/istio.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/platform/lima_driver.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/platform/wsl_driver.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/self.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/server.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/configuration.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/console.py +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/data/.gitignore +0 -0
- {agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/utils.py +0 -0
|
@@ -68,6 +68,7 @@ from pydantic import BaseModel
|
|
|
68
68
|
from rich.box import HORIZONTALS
|
|
69
69
|
from rich.console import ConsoleRenderable, Group, NewLine
|
|
70
70
|
from rich.panel import Panel
|
|
71
|
+
from rich.rule import Rule
|
|
71
72
|
from rich.text import Text
|
|
72
73
|
|
|
73
74
|
from agentstack_cli.commands.build import build
|
|
@@ -720,6 +721,54 @@ def _create_input_handler(
|
|
|
720
721
|
return handler
|
|
721
722
|
|
|
722
723
|
|
|
724
|
+
def _setup_sequential_workflow(providers: list[Provider], splash_screen: ConsoleRenderable | None = None):
|
|
725
|
+
prompt_agents = {
|
|
726
|
+
provider.agent_card.name: provider
|
|
727
|
+
for provider in providers
|
|
728
|
+
if (ProviderUtils.detail(provider) or {}).get("interaction_mode") == InteractionMode.SINGLE_TURN
|
|
729
|
+
}
|
|
730
|
+
steps = []
|
|
731
|
+
|
|
732
|
+
console.print(Rule(title="Configure Workflow", style="white"))
|
|
733
|
+
|
|
734
|
+
handle_input = _create_input_handler(
|
|
735
|
+
[], prompt="Agent: ", choice=list(prompt_agents), placeholder="Select agent", splash_screen=splash_screen
|
|
736
|
+
)
|
|
737
|
+
handle_instruction_input = _create_input_handler(
|
|
738
|
+
[], prompt="Instruction: ", placeholder="Enter agent instruction", splash_screen=splash_screen
|
|
739
|
+
)
|
|
740
|
+
i = 0
|
|
741
|
+
|
|
742
|
+
while True:
|
|
743
|
+
if not (agent := handle_input()):
|
|
744
|
+
console.print(Rule(style="white"))
|
|
745
|
+
break
|
|
746
|
+
instruction = handle_instruction_input()
|
|
747
|
+
|
|
748
|
+
if not steps:
|
|
749
|
+
# change prompt for other passes
|
|
750
|
+
handle_input = _create_input_handler(
|
|
751
|
+
[],
|
|
752
|
+
prompt="Agent: ",
|
|
753
|
+
placeholder="Select agent (Leave empty to execute)",
|
|
754
|
+
choice=list(prompt_agents),
|
|
755
|
+
optional=True,
|
|
756
|
+
splash_screen=splash_screen,
|
|
757
|
+
)
|
|
758
|
+
handle_instruction_input = _create_input_handler(
|
|
759
|
+
[],
|
|
760
|
+
prompt="Instruction: ",
|
|
761
|
+
placeholder="Enter agent instruction (leave empty to pass raw output from previous agent)",
|
|
762
|
+
optional=True,
|
|
763
|
+
splash_screen=splash_screen,
|
|
764
|
+
)
|
|
765
|
+
console.print(Rule(style="dim", characters="·"))
|
|
766
|
+
i += 1
|
|
767
|
+
steps.append({"provider_id": prompt_agents[agent].id, "instruction": instruction})
|
|
768
|
+
|
|
769
|
+
return steps
|
|
770
|
+
|
|
771
|
+
|
|
723
772
|
@app.command("run")
|
|
724
773
|
async def run_agent(
|
|
725
774
|
search_path: typing.Annotated[
|
|
@@ -761,6 +810,7 @@ async def run_agent(
|
|
|
761
810
|
|
|
762
811
|
ui_annotations = ProviderUtils.detail(provider) or {}
|
|
763
812
|
interaction_mode = ui_annotations.get("interaction_mode")
|
|
813
|
+
is_sequential_workflow = agent.name in {"sequential_workflow"}
|
|
764
814
|
|
|
765
815
|
user_greeting = ui_annotations.get("user_greeting", None) or "How can I help you?"
|
|
766
816
|
|
|
@@ -768,7 +818,10 @@ async def run_agent(
|
|
|
768
818
|
handle_input = _create_input_handler([], splash_screen=splash_screen)
|
|
769
819
|
|
|
770
820
|
if not input:
|
|
771
|
-
if
|
|
821
|
+
if (
|
|
822
|
+
interaction_mode not in {InteractionMode.MULTI_TURN, InteractionMode.SINGLE_TURN}
|
|
823
|
+
and not is_sequential_workflow
|
|
824
|
+
):
|
|
772
825
|
err_console.error(
|
|
773
826
|
f"Agent {agent.name} does not use any supported UIs.\n"
|
|
774
827
|
+ "Please use the agent according to the following examples and schema:"
|
|
@@ -814,6 +867,19 @@ async def run_agent(
|
|
|
814
867
|
dump_files_path=dump_files,
|
|
815
868
|
handle_input=handle_input,
|
|
816
869
|
)
|
|
870
|
+
elif is_sequential_workflow:
|
|
871
|
+
workflow_steps = _setup_sequential_workflow(providers, splash_screen=splash_screen)
|
|
872
|
+
console.print()
|
|
873
|
+
message_part = DataPart(data={"steps": workflow_steps}, metadata={"kind": "configuration"})
|
|
874
|
+
async with a2a_client(provider.agent_card) as client:
|
|
875
|
+
await _run_agent(
|
|
876
|
+
client,
|
|
877
|
+
message_part,
|
|
878
|
+
agent_card=agent,
|
|
879
|
+
context_token=context_token,
|
|
880
|
+
dump_files_path=dump_files,
|
|
881
|
+
handle_input=handle_input,
|
|
882
|
+
)
|
|
817
883
|
|
|
818
884
|
else:
|
|
819
885
|
async with a2a_client(provider.agent_card) as client:
|
|
Binary file
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/platform/__init__.py
RENAMED
|
File without changes
|
{agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/platform/base_driver.py
RENAMED
|
File without changes
|
{agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/platform/istio.py
RENAMED
|
File without changes
|
{agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/platform/lima_driver.py
RENAMED
|
File without changes
|
{agentstack_cli-0.4.1 → agentstack_cli-0.4.1rc1}/src/agentstack_cli/commands/platform/wsl_driver.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|