mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-14 11:12:17 +03:00
feat(providers): integrate audited free-tier gateways (#9210)
* feat(providers): add Zylo UnoRouter and Poolside registries * feat(providers): integrate audited free-tier gateways * feat: add wave2 free-tier provider registries * feat(providers): add Mixlayer Speka and TokenReply registries * feat: add wave 2 free-tier provider registries * fix: align meganova provider slug * feat(providers): integrate wave2 free-tier gateways * feat(providers): add Wave 3-A free-tier registries * feat(providers): add HelyxAI Auriko and Poixe registries * feat(providers): add Naga AI and Chat Oripe registries * feat(providers): integrate wave3 free-tier gateways * feat(providers): add FreeInference registry * feat(providers): add Free.ai registry * feat(providers): integrate wave4 free-tier gateways * docs: synchronize provider and free-tier inventories * refactor(providers): split audited gateway catalog * feat(providers): add audited Void AI and HelixMind gateways * feat(providers): finalize audited free-tier integration * test(providers): update APIKEY split count to 229 after rebase onto release/v3.8.50 The rebase merged the release catalog (201 APIKEY providers) with the PR's 28 free-tier additions, yielding 229 total. Correct the characterization count so the partition assertion reflects the true merged state. --------- Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com> Co-authored-by: backryun <bakryun0718@proton.me>
This commit is contained in:
committed by
GitHub
parent
f6ccd3cf9f
commit
ecc89eef14
@@ -2,7 +2,7 @@
|
||||
* Integration tests for Agent Skills content integrity.
|
||||
*
|
||||
* Verifies:
|
||||
* 1. All 44 skill IDs from catalog have skills/{id}/ folder with SKILL.md.
|
||||
* 1. All 45 skill IDs from catalog have skills/{id}/ folder with SKILL.md.
|
||||
* 2. Zero omniroute-* folders remain (post-prune: old omniroute-* skill dirs were removed).
|
||||
* 3. 12 specific IDs have <!-- skill:custom-start --> ... <!-- skill:custom-end --> blocks:
|
||||
* omni-mcp, omni-compression, cli-providers, cli-eval, omni-agents-a2a,
|
||||
@@ -15,7 +15,8 @@ import assert from "node:assert/strict";
|
||||
import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
||||
const { API_SKILL_IDS, CLI_SKILL_IDS, CONFIG_SKILL_IDS } = await import("../../src/lib/agentSkills/catalog.ts");
|
||||
const { API_SKILL_IDS, CLI_SKILL_IDS, CONFIG_SKILL_IDS } =
|
||||
await import("../../src/lib/agentSkills/catalog.ts");
|
||||
|
||||
const SKILLS_DIR = path.resolve(process.cwd(), "skills");
|
||||
const ALL_IDS = [...API_SKILL_IDS, ...CLI_SKILL_IDS, ...CONFIG_SKILL_IDS] as string[];
|
||||
@@ -37,9 +38,9 @@ const CUSTOM_BLOCK_IDS = [
|
||||
"config-codex-cli",
|
||||
] as const;
|
||||
|
||||
// ── §1: All 42 catalog IDs have skills/{id}/SKILL.md ─────────────────────────
|
||||
// ── §1: All 45 catalog IDs have skills/{id}/SKILL.md ─────────────────────────
|
||||
|
||||
test("all 44 catalog IDs have a skills/{id}/ directory", () => {
|
||||
test("all 45 catalog IDs have a skills/{id}/ directory", () => {
|
||||
const missing: string[] = [];
|
||||
for (const id of ALL_IDS) {
|
||||
const dirPath = path.join(SKILLS_DIR, id);
|
||||
@@ -50,7 +51,7 @@ test("all 44 catalog IDs have a skills/{id}/ directory", () => {
|
||||
assert.deepEqual(missing, [], `Missing skill directories: ${missing.join(", ")}`);
|
||||
});
|
||||
|
||||
test("all 44 catalog IDs have a skills/{id}/SKILL.md file", () => {
|
||||
test("all 45 catalog IDs have a skills/{id}/SKILL.md file", () => {
|
||||
const missing: string[] = [];
|
||||
for (const id of ALL_IDS) {
|
||||
const skillPath = path.join(SKILLS_DIR, id, "SKILL.md");
|
||||
@@ -75,7 +76,7 @@ test("skills/ has zero omniroute-* directories (all pruned)", () => {
|
||||
assert.deepEqual(
|
||||
omniRouteDirs,
|
||||
[],
|
||||
`Found omniroute-* directories that should have been pruned: ${omniRouteDirs.join(", ")}`,
|
||||
`Found omniroute-* directories that should have been pruned: ${omniRouteDirs.join(", ")}`
|
||||
);
|
||||
});
|
||||
|
||||
@@ -85,11 +86,7 @@ test("skills/ directory only contains expected catalog IDs plus README", () => {
|
||||
const dirs = entries.filter((e) => e.isDirectory()).map((e) => e.name);
|
||||
const expectedSet = new Set(ALL_IDS);
|
||||
const unexpected = dirs.filter((d) => !expectedSet.has(d));
|
||||
assert.deepEqual(
|
||||
unexpected,
|
||||
[],
|
||||
`Unexpected directories in skills/: ${unexpected.join(", ")}`,
|
||||
);
|
||||
assert.deepEqual(unexpected, [], `Unexpected directories in skills/: ${unexpected.join(", ")}`);
|
||||
});
|
||||
|
||||
// ── §3: 10 specific IDs have custom blocks ───────────────────────────────────
|
||||
@@ -97,18 +94,15 @@ test("skills/ directory only contains expected catalog IDs plus README", () => {
|
||||
for (const id of CUSTOM_BLOCK_IDS) {
|
||||
test(`skills/${id}/SKILL.md has <!-- skill:custom-start --> block`, () => {
|
||||
const skillPath = path.join(SKILLS_DIR, id, "SKILL.md");
|
||||
assert.ok(
|
||||
fs.existsSync(skillPath),
|
||||
`skills/${id}/SKILL.md does not exist`,
|
||||
);
|
||||
assert.ok(fs.existsSync(skillPath), `skills/${id}/SKILL.md does not exist`);
|
||||
const content = fs.readFileSync(skillPath, "utf-8");
|
||||
assert.ok(
|
||||
content.includes("<!-- skill:custom-start -->"),
|
||||
`skills/${id}/SKILL.md missing <!-- skill:custom-start --> block`,
|
||||
`skills/${id}/SKILL.md missing <!-- skill:custom-start --> block`
|
||||
);
|
||||
assert.ok(
|
||||
content.includes("<!-- skill:custom-end -->"),
|
||||
`skills/${id}/SKILL.md missing <!-- skill:custom-end --> block`,
|
||||
`skills/${id}/SKILL.md missing <!-- skill:custom-end --> block`
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -130,7 +124,7 @@ test("exactly 13 skills have custom blocks", () => {
|
||||
assert.deepEqual(
|
||||
withCustomBlocks.sort(),
|
||||
expectedIds,
|
||||
`Expected exactly these 13 custom-block IDs: ${expectedIds.join(", ")}\nActual: ${withCustomBlocks.join(", ")}`,
|
||||
`Expected exactly these 13 custom-block IDs: ${expectedIds.join(", ")}\nActual: ${withCustomBlocks.join(", ")}`
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
* Integration tests for Agent Skills discovery.
|
||||
*
|
||||
* Verifies:
|
||||
* 1. Every ID in API_SKILL_IDS + CLI_SKILL_IDS has a skills/<id>/SKILL.md on disk.
|
||||
* 1. Every catalog ID has a skills/<id>/SKILL.md on disk.
|
||||
* 2. Each SKILL.md has valid frontmatter (name + description) and body ≥ 100 chars.
|
||||
* 3. MCP tool omniroute_agent_skills_list handler returns 44 entries.
|
||||
* 4. A2A skill list-capabilities returns 1 artifact with 44 lines.
|
||||
* 3. MCP tool omniroute_agent_skills_list handler returns 45 entries.
|
||||
* 4. A2A skill list-capabilities returns one artifact containing all 45 entries.
|
||||
*
|
||||
* Does NOT spin up a server — tests handlers directly via imports.
|
||||
*/
|
||||
@@ -15,7 +15,8 @@ import fs from "node:fs";
|
||||
import path from "node:path";
|
||||
|
||||
// Dynamic imports for ESM + tsx compatibility
|
||||
const { API_SKILL_IDS, CLI_SKILL_IDS } = await import("../../src/lib/agentSkills/catalog.ts");
|
||||
const { API_SKILL_IDS, CLI_SKILL_IDS, CONFIG_SKILL_IDS } =
|
||||
await import("../../src/lib/agentSkills/catalog.ts");
|
||||
const { agentSkillTools } = await import("../../open-sse/mcp-server/tools/agentSkillTools.ts");
|
||||
const { executeListCapabilities } = await import("../../src/lib/a2a/skills/listCapabilities.ts");
|
||||
import type { A2ATask } from "../../src/lib/a2a/taskManager.ts";
|
||||
@@ -41,7 +42,7 @@ function parseSkillMarkdown(content: string): { name: string; description: strin
|
||||
|
||||
// ── §1: Filesystem — every skill ID has a SKILL.md ───────────────────────────
|
||||
|
||||
const ALL_IDS = [...API_SKILL_IDS, ...CLI_SKILL_IDS] as string[];
|
||||
const ALL_IDS = [...API_SKILL_IDS, ...CLI_SKILL_IDS, ...CONFIG_SKILL_IDS] as string[];
|
||||
|
||||
test("skills/ directory exists and is readable", () => {
|
||||
assert.ok(fs.existsSync(SKILLS_DIR), `skills/ directory not found at ${SKILLS_DIR}`);
|
||||
@@ -69,8 +70,19 @@ test("every CLI skill ID has skills/<id>/SKILL.md on disk", () => {
|
||||
assert.deepEqual(missing, [], `Missing CLI SKILL.md files: ${missing.join(", ")}`);
|
||||
});
|
||||
|
||||
test("total skill count is exactly 44 (23 API + 21 CLI)", () => {
|
||||
assert.equal(API_SKILL_IDS.length + CLI_SKILL_IDS.length, 44);
|
||||
test("every config skill ID has skills/<id>/SKILL.md on disk", () => {
|
||||
const missing: string[] = [];
|
||||
for (const id of CONFIG_SKILL_IDS) {
|
||||
const skillPath = path.join(SKILLS_DIR, id, "SKILL.md");
|
||||
if (!fs.existsSync(skillPath)) {
|
||||
missing.push(id);
|
||||
}
|
||||
}
|
||||
assert.deepEqual(missing, [], `Missing config SKILL.md files: ${missing.join(", ")}`);
|
||||
});
|
||||
|
||||
test("total skill count is exactly 45 (23 API + 21 CLI + 1 config)", () => {
|
||||
assert.equal(ALL_IDS.length, 45);
|
||||
});
|
||||
|
||||
// ── §2: Frontmatter validation ────────────────────────────────────────────────
|
||||
@@ -120,14 +132,14 @@ test("each SKILL.md body is at least 100 chars", () => {
|
||||
|
||||
// ── §3: MCP tool omniroute_agent_skills_list ─────────────────────────────────
|
||||
|
||||
test("MCP omniroute_agent_skills_list handler returns count 45 (44 + config)", async () => {
|
||||
test("MCP omniroute_agent_skills_list handler returns count 45", async () => {
|
||||
const result = await agentSkillTools.omniroute_agent_skills_list.handler({});
|
||||
assert.equal(result.count, 45, `Expected 45 but got ${result.count}`);
|
||||
assert.ok(Array.isArray(result.skills));
|
||||
assert.equal(result.skills.length, 45);
|
||||
});
|
||||
|
||||
test("MCP omniroute_agent_skills_list result has all 42 IDs", async () => {
|
||||
test("MCP omniroute_agent_skills_list result has all 45 IDs", async () => {
|
||||
const result = await agentSkillTools.omniroute_agent_skills_list.handler({});
|
||||
const returnedIds = new Set(result.skills.map((s: { id: string }) => s.id));
|
||||
for (const id of ALL_IDS) {
|
||||
@@ -145,7 +157,7 @@ test("A2A list-capabilities returns exactly 1 artifact", async () => {
|
||||
assert.equal(result.artifacts[0].type, "text", "Artifact type should be 'text'");
|
||||
});
|
||||
|
||||
test("A2A list-capabilities artifact content contains 42 skill IDs as table rows", async () => {
|
||||
test("A2A list-capabilities artifact content contains 45 skill IDs as table rows", async () => {
|
||||
const result = await executeListCapabilities(stubTask);
|
||||
const content = result.artifacts[0].content;
|
||||
const rows = content
|
||||
@@ -154,15 +166,15 @@ test("A2A list-capabilities artifact content contains 42 skill IDs as table rows
|
||||
(line) => line.startsWith("| ") && !line.startsWith("| ID") && !line.startsWith("| ---")
|
||||
);
|
||||
// Each skill row starts with "| <id> |"
|
||||
assert.ok(rows.length >= 42, `Expected at least 42 data rows but got ${rows.length}`);
|
||||
assert.equal(rows.length, 45, `Expected 45 data rows but got ${rows.length}`);
|
||||
});
|
||||
|
||||
test("A2A list-capabilities metadata.totalSkills === 45 (44 + config)", async () => {
|
||||
test("A2A list-capabilities metadata.totalSkills === 45", async () => {
|
||||
const result = await executeListCapabilities(stubTask);
|
||||
assert.equal(result.metadata.totalSkills, 45);
|
||||
});
|
||||
|
||||
test("A2A list-capabilities artifact contains all 42 skill IDs", async () => {
|
||||
test("A2A list-capabilities artifact contains all 45 skill IDs", async () => {
|
||||
const result = await executeListCapabilities(stubTask);
|
||||
const content = result.artifacts[0].content;
|
||||
const missing: string[] = [];
|
||||
|
||||
Reference in New Issue
Block a user