Spaces:
Running
Running
Commit
·
2fa7104
1
Parent(s):
d70b208
Fix session_manager imports - define Operation/Submission locally
Browse filesOperation and Submission dataclasses are defined in agent/main.py,
not exported from agent.core.session. Define them locally in
session_manager.py to match the expected structure.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- backend/session_manager.py +19 -2
backend/session_manager.py
CHANGED
|
@@ -5,14 +5,31 @@ import logging
|
|
| 5 |
import uuid
|
| 6 |
from dataclasses import dataclass, field
|
| 7 |
from datetime import datetime
|
| 8 |
-
from typing import Any
|
| 9 |
|
| 10 |
from agent.config import load_config
|
| 11 |
from agent.core.agent_loop import process_submission
|
| 12 |
-
from agent.core.session import Event,
|
| 13 |
from agent.core.tools import ToolRouter
|
| 14 |
from websocket import manager as ws_manager
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
logger = logging.getLogger(__name__)
|
| 17 |
|
| 18 |
|
|
|
|
| 5 |
import uuid
|
| 6 |
from dataclasses import dataclass, field
|
| 7 |
from datetime import datetime
|
| 8 |
+
from typing import Any, Optional
|
| 9 |
|
| 10 |
from agent.config import load_config
|
| 11 |
from agent.core.agent_loop import process_submission
|
| 12 |
+
from agent.core.session import Event, OpType, Session
|
| 13 |
from agent.core.tools import ToolRouter
|
| 14 |
from websocket import manager as ws_manager
|
| 15 |
|
| 16 |
+
|
| 17 |
+
# These dataclasses match agent/main.py structure
|
| 18 |
+
@dataclass
|
| 19 |
+
class Operation:
|
| 20 |
+
"""Operation to be executed by the agent."""
|
| 21 |
+
|
| 22 |
+
op_type: OpType
|
| 23 |
+
data: Optional[dict[str, Any]] = None
|
| 24 |
+
|
| 25 |
+
|
| 26 |
+
@dataclass
|
| 27 |
+
class Submission:
|
| 28 |
+
"""Submission to the agent loop."""
|
| 29 |
+
|
| 30 |
+
id: str
|
| 31 |
+
operation: Operation
|
| 32 |
+
|
| 33 |
logger = logging.getLogger(__name__)
|
| 34 |
|
| 35 |
|