From be7abbd18f70371e2c173848ce7377bbb27df5e5 Mon Sep 17 00:00:00 2001 From: wuyang <5700876+banisherwy@user.noreply.gitee.com> Date: Sun, 26 Jul 2026 15:10:56 +0800 Subject: [PATCH] fix: report workspace status success --- agent_platform/gateway/schemas.py | 1 + tests/test_gateway_security.py | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/agent_platform/gateway/schemas.py b/agent_platform/gateway/schemas.py index c6dc7ca..f051ced 100644 --- a/agent_platform/gateway/schemas.py +++ b/agent_platform/gateway/schemas.py @@ -67,6 +67,7 @@ class ToolResult(BaseModel): class WorkspaceStatus(BaseModel): + ok: bool = True workspace_id: str provider: Literal["local-docker", "ssh-docker"] container_name: str diff --git a/tests/test_gateway_security.py b/tests/test_gateway_security.py index 7c8d38f..c94f144 100644 --- a/tests/test_gateway_security.py +++ b/tests/test_gateway_security.py @@ -98,6 +98,10 @@ def test_gateway_requires_service_key_and_signed_identity(settings, identity_jwt response = client.post("/v1/tools/list_files", headers=headers, json={"path": "src"}) assert response.status_code == 200 assert response.json()["output"] == "user-123:src" + status = client.post("/v1/tools/workspace_status", headers=headers, json={}) + assert status.status_code == 200 + assert status.json()["ok"] is True + assert status.json()["state"] == "running" listing = client.get("/v1/files", headers=headers, params={"path": "."}) assert listing.status_code == 200 assert listing.json()["entries"][0]["name"] == "报告.md"