Never stop coding. Free MIT AI gateway: one endpoint, 375 providers (150+ free), 1,400+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 900+ contributors
TypeScript a2aai-agentsai-gatewayanthropicclaudeclaude-codeclinecodexcopilotcursordeepseekfree-aigeminikimillm-gatewaymcpopenaiopenai-proxyqwentoken-saver
/**
* A2A Skill: List Capabilities
*
* Returns the full catalog of OmniRoute agent skills (23 API + 21 CLI + 1 config)
* as a markdown table with raw SKILL.md URLs for orchestrating agents.
*/
import type { A2ATask, TaskArtifact } from "../taskManager";
import { getCatalog, computeCoverage } from "@/lib/agentSkills/catalog";
import type { AgentSkill } from "@/lib/agentSkills/types";
export interface ListCapabilitiesResult {
artifacts: TaskArtifact[];
metadata: {
coverage: {
api: { have: number; total: 23 };
cli: { have: number; total: 21 };
config: { have: number; total: 1 };
};
totalSkills: number;
generatedAt: string;
source: "agent-skills-catalog";
};
}
function buildMarkdownTable(skills: AgentSkill[]): string {
const header = "| ID | Name | Category | Area | Endpoints/Commands | Raw URL |";
const separator = "| --- | --- | --- | --- | --- | --- |";
const rows = skills.map((skill) => {
const endpointsOrCommands =
skill.category === "api"
? (skill.endpoints ?? []).join(", ") || "—"
: (skill.cliCommands ?? []).join(", ") || "—";
return `| ${skill.id} | ${skill.name} | ${skill.category} | ${skill.area} | ${endpointsOrCommands} | ${skill.rawUrl} |`;
});
return [header, separator, ...rows].join("\n");
}
export async function executeListCapabilities(_task: A2ATask): Promise<ListCapabilitiesResult> {
const catalog = getCatalog();
const coverage = computeCoverage();
const table = buildMarkdownTable(catalog);
const content = [
`# OmniRoute Agent Skills Catalog`,
``,
`Total: ${catalog.length} skills (${coverage.api.total} API + ${coverage.cli.total} CLI + ${coverage.config.total} config)`,
``,
table,
].join("\n");
return {
artifacts: [
{
type: "text",
content,
},
],
metadata: {
coverage: {
api: { have: coverage.api.have, total: 23 },
cli: { have: coverage.cli.have, total: 21 },
config: { have: coverage.config.have, total: 1 },
},
totalSkills: catalog.length,
generatedAt: coverage.generatedAt,
source: "agent-skills-catalog",
},
};
}