| 24788 | AgentRegistrySpawnResult = AgentRegistrySpawnSpawned | AgentRegistrySpawnError | AgentRegistrySpawnRegistryTimeout | AgentRegistrySpawnValidationError |
| 24789 | |
| 24790 | def _load_AgentRegistrySpawnResult(obj: Any) -> "AgentRegistrySpawnResult": |
| 24791 | assert isinstance(obj, dict) |
| 24792 | kind = obj.get("kind") |
| 24793 | match kind: |
| 24794 | case "spawned": return AgentRegistrySpawnSpawned.from_dict(obj) |
| 24795 | case "spawn-error": return AgentRegistrySpawnError.from_dict(obj) |
| 24796 | case "registry-timeout": return AgentRegistrySpawnRegistryTimeout.from_dict(obj) |
| 24797 | case "validation-error": return AgentRegistrySpawnValidationError.from_dict(obj) |
| 24798 | case _: raise ValueError(f"Unknown AgentRegistrySpawnResult kind: {kind!r}") |
| 24799 | |
| 24800 | # Initial authentication info for the session. |
| 24801 | AuthInfo = HMACAuthInfo | EnvAuthInfo | TokenAuthInfo | CopilotAPITokenAuthInfo | UserAuthInfo | GhCLIAuthInfo | APIKeyAuthInfo |