-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmock_execution_agent.py
More file actions
45 lines (35 loc) · 1.36 KB
/
mock_execution_agent.py
File metadata and controls
45 lines (35 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
"""Mock execution agent: simulates hiring dashboard actions."""
from datetime import datetime, timezone
from task import Task, TaskStatus
from log_utils import log_step
def _log_entry(action: str, result: str = "success") -> dict[str, str]:
"""Build a single execution_logs entry."""
return {
"action": action,
"result": result,
"timestamp": datetime.now(timezone.utc).isoformat(),
}
class MockExecutionAgent:
"""
Simulates execution: login to hiring dashboard, update candidate score,
generate summary report. Appends to execution_logs and sets status to verified.
"""
def __init__(self) -> None:
pass
def execute(self, task: Task) -> Task:
"""
Simulate the three actions, append execution_logs, set status = verified.
"""
log_step("Execution Agent", "Simulating ATS actions")
logs = list(task.execution_logs or [])
logs.append(_log_entry("login_hiring_dashboard"))
logs.append(_log_entry("update_candidate_score"))
logs.append(_log_entry("generate_summary_report"))
log_step("Execution Agent", "ATS actions completed", {"actions_logged": len(logs)})
return task.model_copy(
update={
"execution_logs": logs,
"status": TaskStatus.verified,
},
deep=True,
)