feat(interface): Introduce non-interactive CLI mode and restructure UI layer

This commit is contained in:
Ahmed Allam
2025-10-29 06:14:08 +03:00
committed by Ahmed Allam
parent 85209bfc20
commit 86dd6f5330
29 changed files with 254 additions and 46 deletions

View File

@@ -231,12 +231,16 @@ def create_agent(
state = AgentState(task=task, agent_name=name, parent_id=parent_id, max_iterations=200)
llm_config = LLMConfig(prompt_modules=module_list)
agent = StrixAgent(
{
"llm_config": llm_config,
"state": state,
}
)
parent_agent = _agent_instances.get(parent_id)
agent_config = {
"llm_config": llm_config,
"state": state,
}
if parent_agent and hasattr(parent_agent, "non_interactive"):
agent_config["non_interactive"] = parent_agent.non_interactive
agent = StrixAgent(agent_config)
inherited_messages = []
if inherit_context:
@@ -487,7 +491,7 @@ def stop_agent(agent_id: str) -> dict[str, Any]:
agent_node["status"] = "stopping"
try:
from strix.cli.tracer import get_global_tracer
from strix.interface.tracer import get_global_tracer
tracer = get_global_tracer()
if tracer:
@@ -578,7 +582,7 @@ def wait_for_message(
_agent_graph["nodes"][agent_id]["waiting_reason"] = reason
try:
from strix.cli.tracer import get_global_tracer
from strix.interface.tracer import get_global_tracer
tracer = get_global_tracer()
if tracer:

View File

@@ -240,7 +240,7 @@ async def _execute_single_tool(
def _get_tracer_and_agent_id(agent_state: Any | None) -> tuple[Any | None, str]:
try:
from strix.cli.tracer import get_global_tracer
from strix.interface.tracer import get_global_tracer
tracer = get_global_tracer()
agent_id = agent_state.agent_id if agent_state else "unknown_agent"

View File

@@ -107,7 +107,7 @@ def _check_active_agents(agent_state: Any = None) -> dict[str, Any] | None:
def _finalize_with_tracer(content: str, success: bool) -> dict[str, Any]:
try:
from strix.cli.tracer import get_global_tracer
from strix.interface.tracer import get_global_tracer
tracer = get_global_tracer()
if tracer:

View File

@@ -27,7 +27,7 @@ def create_vulnerability_report(
return {"success": False, "message": validation_error}
try:
from strix.cli.tracer import get_global_tracer
from strix.interface.tracer import get_global_tracer
tracer = get_global_tracer()
if tracer: