25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
import { buildAgentDownloadCatalogFromRegistry, type AgentDownloadCatalog, type AgentRegistry } from "./agentRegistry";
const AGENT_REGISTRY_URLS = ["https://dl.dbxio.com/agents/agent-registry.json", "https://cnb.cool/dbxio.com/dbx/-/releases/download/agents-latest/agent-registry.json"] as const;
function hasDownloadAssets(catalog: AgentDownloadCatalog): boolean {
return catalog.bundles.length > 0 || catalog.drivers.length > 0 || catalog.jres.length > 0 || catalog.nativeAgents.length > 0;
}
async function fetchRegistry(url: string): Promise<AgentRegistry> {
const response = await fetch(url, {
cache: "force-cache",
headers: { Accept: "application/json" },
});
if (!response.ok) throw new Error(`Download catalog request failed with ${response.status}`);
return response.json() as Promise<AgentRegistry>;
}
export async function fetchAgentDownloadCatalog(): Promise<AgentDownloadCatalog | null> {
const result = await fetchAgentDownloadCatalogWithRegistry();
return result?.catalog ?? null;
}
export async function fetchAgentDownloadCatalogWithRegistry(): Promise<{ catalog: AgentDownloadCatalog; registry: AgentRegistry } | null> {
for (const url of AGENT_REGISTRY_URLS) {
try {
const registry = await fetchRegistry(url);
const catalog = buildAgentDownloadCatalogFromRegistry(registry);
if (hasDownloadAssets(catalog)) return { catalog, registry };
} catch {
// Both sources contain the same generated registry; try the synchronized mirror next.
}
}
return null;
}