Spaces:
Sleeping
Sleeping
Download src/macg/protocol.py from Navya-Sree/multi_agent_codegen: direct link, hf CLI and curl.
- Browser
- Download file 751 Bytes
-
https://huggingface.co/spaces/Navya-Sree/multi_agent_codegen/resolve/13a9561ce4e45618db4482fc5ffbefea07294da3/src/macg/protocol.py
- Command line
-
hf download hf://spaces/Navya-Sree/multi_agent_codegen@13a9561ce4e45618db4482fc5ffbefea07294da3/src/macg/protocol.py
-
curl -L -o protocol.py https://huggingface.co/spaces/Navya-Sree/multi_agent_codegen/resolve/13a9561ce4e45618db4482fc5ffbefea07294da3/src/macg/protocol.py
751 Bytes
| from __future__ import annotations | |
| from dataclasses import dataclass, field | |
| from typing import Any, Literal, Optional | |
| import time | |
| import uuid | |
| Role = Literal["user", "orchestrator", "coder", "reviewer", "tester", "tool"] | |
| class Message: | |
| role: Role | |
| content: str | |
| meta: dict[str, Any] = field(default_factory=dict) | |
| ts: float = field(default_factory=lambda: time.time()) | |
| id: str = field(default_factory=lambda: uuid.uuid4().hex) | |
| class Artifact: | |
| """A shared bundle agents pass around: code, tests, notes, scores, etc.""" | |
| task: str | |
| module_name: str = "solution" | |
| code: str = "" | |
| tests: str = "" | |
| review_notes: str = "" | |
| test_report: str = "" | |
| passed: bool = False | |
| iteration: int = 0 | |