feat: add MCP run status query tools
This commit is contained in:
@@ -39,6 +39,11 @@ class RunStore:
|
||||
)
|
||||
return cls(path=path, state=state, repo_root=repo_root)
|
||||
|
||||
@classmethod
|
||||
def load(cls, *, path: Path, repo_root: Path | None = None) -> "RunStore":
|
||||
state = RunState.model_validate(json.loads(path.read_text(encoding="utf-8-sig")))
|
||||
return cls(path=path, state=state, repo_root=repo_root)
|
||||
|
||||
def save(self) -> None:
|
||||
self.state.updated_at = datetime.now(tz=self.state.started_at.tzinfo)
|
||||
self.path.parent.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
Reference in New Issue
Block a user