"""Read-only stdio MCP smoke test. Run with the course's kind kubeconfig.""" import asyncio from run import rpc async def main(): observed = await asyncio.wait_for(rpc("evidence", {"source": "deployment"}), 20) print("deployment generation:", observed["generation"]) try: await asyncio.wait_for(rpc("evidence", {"source": "not-a-source"}), 20) except ValueError as exc: if "unknown evidence source" not in str(exc): raise print("unsupported evidence source rejected") else: raise AssertionError("unexpected tool acceptance") if __name__ == "__main__": asyncio.run(main())