feat(deploy): finalize MVP deployment and file transfer approach
This commit is contained in:
parent
6369721876
commit
0f79494fbe
43 changed files with 3078 additions and 645 deletions
|
|
@ -211,7 +211,7 @@ async def test_invite_event_is_idempotent_per_user():
|
|||
|
||||
assert client.join.await_count == 2
|
||||
assert client.room_create.await_count == 2
|
||||
client.room_send.assert_awaited_once()
|
||||
assert client.room_send.await_count == 2
|
||||
|
||||
|
||||
async def test_bot_ignores_its_own_messages():
|
||||
|
|
@ -348,7 +348,8 @@ async def test_bot_downloads_matrix_file_to_configured_agent_workspace(tmp_path,
|
|||
base_url="http://lambda.coredump.ru:7000/agent_17/",
|
||||
workspace_path=str(tmp_path / "agents" / "17"),
|
||||
)
|
||||
]
|
||||
],
|
||||
user_agents={"@alice:example.org": "agent-17"},
|
||||
)
|
||||
await set_room_meta(
|
||||
runtime.store,
|
||||
|
|
@ -381,7 +382,7 @@ async def test_bot_downloads_matrix_file_to_configured_agent_workspace(tmp_path,
|
|||
staged = await get_staged_attachments(
|
||||
runtime.store, "!chat17:example.org", "@alice:example.org"
|
||||
)
|
||||
assert staged[0]["workspace_path"].startswith("incoming/")
|
||||
assert staged[0]["workspace_path"] == "report.pdf"
|
||||
assert (
|
||||
tmp_path / "agents" / "17" / staged[0]["workspace_path"]
|
||||
).read_bytes() == b"%PDF-1.7"
|
||||
|
|
@ -389,7 +390,7 @@ async def test_bot_downloads_matrix_file_to_configured_agent_workspace(tmp_path,
|
|||
|
||||
async def test_bot_uploads_agent_output_from_configured_agent_workspace(tmp_path, monkeypatch):
|
||||
monkeypatch.setenv("SURFACES_WORKSPACE_DIR", str(tmp_path / "agents"))
|
||||
output_file = tmp_path / "agents" / "17" / "output" / "result.txt"
|
||||
output_file = tmp_path / "agents" / "17" / "result.txt"
|
||||
output_file.parent.mkdir(parents=True)
|
||||
output_file.write_text("ready", encoding="utf-8")
|
||||
runtime = build_runtime(platform=MockPlatformClient())
|
||||
|
|
@ -401,7 +402,8 @@ async def test_bot_uploads_agent_output_from_configured_agent_workspace(tmp_path
|
|||
base_url="http://lambda.coredump.ru:7000/agent_17/",
|
||||
workspace_path=str(tmp_path / "agents" / "17"),
|
||||
)
|
||||
]
|
||||
],
|
||||
user_agents={"@alice:example.org": "agent-17"},
|
||||
)
|
||||
await set_room_meta(
|
||||
runtime.store,
|
||||
|
|
@ -429,7 +431,7 @@ async def test_bot_uploads_agent_output_from_configured_agent_workspace(tmp_path
|
|||
type="document",
|
||||
filename="result.txt",
|
||||
mime_type="text/plain",
|
||||
workspace_path="output/result.txt",
|
||||
workspace_path="result.txt",
|
||||
)
|
||||
],
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue