2026-01-14 23:29:18 +08:00
|
|
|
from typing import NotRequired, TypedDict
|
2026-01-14 12:32:34 +08:00
|
|
|
|
|
|
|
|
from langchain.agents import AgentState
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SandboxState(TypedDict):
|
2026-01-14 23:29:18 +08:00
|
|
|
sandbox_id: NotRequired[str | None]
|
2026-01-14 12:32:34 +08:00
|
|
|
|
|
|
|
|
|
2026-01-15 13:22:30 +08:00
|
|
|
class ThreadDataState(TypedDict):
|
|
|
|
|
workspace_path: NotRequired[str | None]
|
|
|
|
|
uploads_path: NotRequired[str | None]
|
|
|
|
|
outputs_path: NotRequired[str | None]
|
|
|
|
|
|
|
|
|
|
|
2026-01-14 12:32:34 +08:00
|
|
|
class ThreadState(AgentState):
|
2026-01-14 23:29:18 +08:00
|
|
|
sandbox: NotRequired[SandboxState | None]
|
2026-01-15 13:22:30 +08:00
|
|
|
thread_data: NotRequired[ThreadDataState | None]
|
2026-01-14 23:29:18 +08:00
|
|
|
title: NotRequired[str | None]
|
2026-01-16 23:04:38 +08:00
|
|
|
artifacts: NotRequired[list[str] | None]
|
2026-01-21 16:14:00 +08:00
|
|
|
todos: NotRequired[list | None]
|
2026-01-23 18:47:39 +08:00
|
|
|
uploaded_files: NotRequired[list[dict] | None]
|