feat: implement DCOS source tree, tests, and build configuration

Complete implementation of the DCOS package including:
- 40+ Python source files across agents, communication, core, learning, memory, protocols, utils
- pyproject.toml build configuration
- 102 unit tests across all subsystems
- Fixed flake.nix (Python 3.12, proper dependencies, pyproject build)
- Fixed .woodpecker.yml (correct paths, removed silent-fail flags)
- Added .gitignore
- Cleared stale pytest cache
This commit is contained in:
Celes Renata
2026-08-02 03:29:55 -07:00
parent 38bb291a02
commit 57619860d5
157 changed files with 2742 additions and 10 deletions
@@ -0,0 +1,27 @@
"""
Tests for UserInterface.
"""
import pytest
from dcos.protocols.user_interface import UserInterface, UserRequest, SystemResponse
class TestUserInterface:
def test_process_input(self):
ui = UserInterface()
request = UserRequest(input="hello", user_id="user_1")
parsed = ui.process_input(request)
assert parsed["intent"] == "query"
def test_format_response(self):
ui = UserInterface()
response = SystemResponse(output="Hello!", agent_id="agent_1")
formatted = ui.format_response(response)
assert "[agent_1]" in formatted
def test_history(self):
ui = UserInterface()
ui.format_response(SystemResponse(output="msg1", agent_id="a"))
ui.format_response(SystemResponse(output="msg2", agent_id="b"))
history = ui.get_history()
assert len(history) == 2