The best way to control Claude Code, Codex and more from any computer or phone
| 1 | import { ProviderDriverKind } from "@t3tools/contracts"; |
| 2 | import { describe, expect, it } from "vite-plus/test"; |
| 3 | |
| 4 | import { resolveProviderInstanceAcpRegistryIconUrl } from "./ProviderInstanceIcon"; |
| 5 | |
| 6 | describe("resolveProviderInstanceAcpRegistryIconUrl", () => { |
| 7 | it("uses allowlisted catalog metadata and rejects untrusted overrides", () => { |
| 8 | expect( |
| 9 | resolveProviderInstanceAcpRegistryIconUrl({ |
| 10 | driverKind: ProviderDriverKind.make("acpRegistry"), |
| 11 | agentId: "kilo", |
| 12 | iconUrl: "https://cdn.agentclientprotocol.com/registry/icons/kilo.svg", |
| 13 | }), |
| 14 | ).toBe("https://cdn.agentclientprotocol.com/registry/icons/kilo.svg"); |
| 15 | expect( |
| 16 | resolveProviderInstanceAcpRegistryIconUrl({ |
| 17 | driverKind: ProviderDriverKind.make("acpRegistry"), |
| 18 | agentId: "generic-agent", |
| 19 | iconUrl: "https://example.com/not-official.svg", |
| 20 | }), |
| 21 | ).toBe("https://cdn.agentclientprotocol.com/registry/v1/latest/generic-agent.svg"); |
| 22 | }); |
| 23 | }); |