chore: ruff lint

This commit is contained in:
Richard Tang
2026-03-17 20:41:08 -07:00
parent 39c1042827
commit af10494b31
4 changed files with 41 additions and 13 deletions
+1 -3
View File
@@ -914,9 +914,7 @@ class SessionManager:
)
)
async def _emit_flowchart_on_restore(
self, session: Session, agent_path: str | Path
) -> None:
async def _emit_flowchart_on_restore(self, session: Session, agent_path: str | Path) -> None:
"""Emit FLOWCHART_MAP_UPDATED from persisted flowchart file on cold restore."""
from framework.runtime.event_bus import AgentEvent, EventType
from framework.tools.flowchart_utils import load_flowchart_file
+14 -6
View File
@@ -2123,10 +2123,14 @@ def register_queen_lifecycle_tools(
_agent_folder.mkdir(parents=True, exist_ok=True)
_save_flowchart_file(_agent_folder, original_copy, fmap)
phase_state.agent_path = str(_agent_folder)
_update_meta_json(session_manager, manager_session_id, {
"agent_path": str(_agent_folder),
"agent_name": _agent_name.replace("_", " ").title(),
})
_update_meta_json(
session_manager,
manager_session_id,
{
"agent_path": str(_agent_folder),
"agent_name": _agent_name.replace("_", " ").title(),
},
)
dissolved_count = len(original_nodes) - len(converted.get("nodes", []))
decision_count = sum(1 for n in original_nodes if n.get("flowchart_type") == "decision")
@@ -2301,9 +2305,13 @@ def register_queen_lifecycle_tools(
if parsed.get("success", True):
if phase_state is not None:
# Set agent_path so the frontend can query credentials
phase_state.agent_path = phase_state.agent_path or str(Path("exports") / agent_name)
phase_state.agent_path = phase_state.agent_path or str(
Path("exports") / agent_name
)
await phase_state.switch_to_building(source="tool")
_update_meta_json(session_manager, manager_session_id, {"phase": "building"})
_update_meta_json(
session_manager, manager_session_id, {"phase": "building"}
)
# Reset draft state after successful scaffolding
phase_state.build_confirmed = False
# Persist flowchart now that the agent folder exists
+25 -4
View File
@@ -34,9 +34,27 @@ def cli():
@cli.command()
@click.option("--contacts", "-c", type=str, required=True, help="JSON string or file path of contacts list")
@click.option("--goal", "-g", type=str, default="coffee chat", help="Outreach goal (e.g. 'coffee chat', 'sales pitch')")
@click.option("--background", "-b", type=str, default="", help="Your background/role for personalization")
@click.option(
"--contacts",
"-c",
type=str,
required=True,
help="JSON string or file path of contacts list",
)
@click.option(
"--goal",
"-g",
type=str,
default="coffee chat",
help="Outreach goal (e.g. 'coffee chat', 'sales pitch')",
)
@click.option(
"--background",
"-b",
type=str,
default="",
help="Your background/role for personalization",
)
@click.option(
"--max-contacts",
"-m",
@@ -44,7 +62,9 @@ def cli():
default=20,
help="Max contacts to process per batch (default: 20)",
)
@click.option("--mock", is_flag=True, help="Run in mock mode without LLM or Gmail calls")
@click.option(
"--mock", is_flag=True, help="Run in mock mode without LLM or Gmail calls"
)
@click.option("--quiet", "-q", is_flag=True, help="Only output result JSON")
@click.option("--verbose", "-v", is_flag=True, help="Show execution details")
@click.option("--debug", is_flag=True, help="Show debug logging")
@@ -204,6 +224,7 @@ async def _interactive_shell(verbose=False):
except Exception as e:
click.echo(f"Error: {e}", err=True)
import traceback
traceback.print_exc()
finally:
await agent.stop()
+1
View File
@@ -233,6 +233,7 @@ class SDRAgent:
if mock_mode:
from framework.llm.mock import MockLLMProvider
llm = MockLLMProvider()
else:
llm = LiteLLMProvider(