Something went wrong. Try again.
small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243"""Legacy host-route payload shape: E2E sees the decoder's rejection but cannotassert the Python binding omitted a key instead of encoding JSON null."""
import asynciofrom pathlib import Pathimport sysimport unittest
ROOT = Path(__file__).resolve().parents[2]sys.path.insert(0, str(ROOT / "priv" / "python"))from albedo_plugins import agents as binding # noqa: E402
class AgentsModelsPayloadTests(unittest.TestCase): def test_ordinary_omits_optional_field_and_blue_sends_explicit_value(self): calls = [] previous = getattr(binding, "host", None)
async def host(method, payload): calls.append((method, payload)) return ["codex/model"]
binding.host = host try: client = binding.Agents() self.assertEqual(asyncio.run(client.models()), ["codex/model"]) self.assertEqual( asyncio.run(client.models(cyber_access="daybreak_blue")), ["codex/model"], ) self.assertEqual( calls, [ ("agents.models", {}), ("agents.models", {"cyber_access": "daybreak_blue"}), ], ) finally: if previous is None: del binding.host else: binding.host = previous