|
2 | 2 |
|
3 | 3 | from typing import Optional |
4 | 4 | from datetime import datetime |
5 | | -from typing_extensions import Literal |
6 | 5 |
|
| 6 | +from ..scope import Scope |
7 | 7 | from ..._models import BaseModel |
8 | 8 | from ..user_profile import UserProfile |
9 | 9 | from ..ambient_agent_config import AmbientAgentConfig |
10 | 10 | from ..cloud_environment_config import CloudEnvironmentConfig |
| 11 | +from .scheduled_agent_history_item import ScheduledAgentHistoryItem |
11 | 12 |
|
12 | | -__all__ = ["ScheduledAgentItem", "History", "Scope"] |
13 | | - |
14 | | - |
15 | | -class History(BaseModel): |
16 | | - """Scheduler-derived history metadata for a scheduled agent""" |
17 | | - |
18 | | - last_ran: Optional[datetime] = None |
19 | | - """Timestamp of the last successful run (RFC3339)""" |
20 | | - |
21 | | - next_run: Optional[datetime] = None |
22 | | - """Timestamp of the next scheduled run (RFC3339)""" |
23 | | - |
24 | | - |
25 | | -class Scope(BaseModel): |
26 | | - """Ownership scope for a resource (team or personal)""" |
27 | | - |
28 | | - type: Literal["User", "Team"] |
29 | | - """Type of ownership ("User" for personal, "Team" for team-owned)""" |
30 | | - |
31 | | - uid: Optional[str] = None |
32 | | - """UID of the owning user or team""" |
| 13 | +__all__ = ["ScheduledAgentItem"] |
33 | 14 |
|
34 | 15 |
|
35 | 16 | class ScheduledAgentItem(BaseModel): |
@@ -65,7 +46,7 @@ class ScheduledAgentItem(BaseModel): |
65 | 46 | environment: Optional[CloudEnvironmentConfig] = None |
66 | 47 | """Configuration for a cloud environment used by scheduled agents""" |
67 | 48 |
|
68 | | - history: Optional[History] = None |
| 49 | + history: Optional[ScheduledAgentHistoryItem] = None |
69 | 50 | """Scheduler-derived history metadata for a scheduled agent""" |
70 | 51 |
|
71 | 52 | last_spawn_error: Optional[str] = None |
|
0 commit comments