mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-26 09:52:11 +03:00
Release v3.8.42 — full CHANGELOG in CHANGELOG.md. CI: 103 checks green incl. CodeQL (all languages), Semgrep, all 8 unit shards, coverage, Node 24 compat, and integration tests. Full unit suite validated locally: 19437 pass / 0 fail. The 3 red checks are advisory and do not gate main (no required status checks): SonarCloud/SonarQube new-code coverage gate, and PR Test Policy (test-masking detector flagging the legitimate dead-Phind provider removal in #5530 — reviewed, correct). Includes cycle-close reconciliation + repair of inherited base-red tests from #5480/#5527/#5427/#5521 that the PR->release fast-path did not exercise.
47 lines
1.4 KiB
TypeScript
47 lines
1.4 KiB
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
import {
|
|
SkillConfigSchema,
|
|
SkillCreateInputSchema,
|
|
SkillSchema,
|
|
SkillUpdateInputSchema,
|
|
} from "../../src/lib/skills/schemas.ts";
|
|
import { SkillMode } from "../../src/lib/skills/types.ts";
|
|
|
|
test("skills schema module keeps runtime schemas exported", () => {
|
|
assert.equal(typeof SkillSchema.safeParse, "function");
|
|
assert.equal(typeof SkillCreateInputSchema.safeParse, "function");
|
|
assert.equal(typeof SkillUpdateInputSchema.safeParse, "function");
|
|
assert.equal(typeof SkillConfigSchema.safeParse, "function");
|
|
});
|
|
|
|
test("SkillCreateInputSchema accepts a valid custom skill definition", () => {
|
|
const result = SkillCreateInputSchema.safeParse({
|
|
name: "memory-search",
|
|
version: "1.2.3",
|
|
description: "Search memory entries",
|
|
schema: {
|
|
input: { query: "string" },
|
|
output: { results: "array" },
|
|
},
|
|
handler: "export default async function run() {}",
|
|
});
|
|
|
|
assert.equal(result.success, true);
|
|
});
|
|
|
|
test("SkillConfigSchema applies defaults for execution settings", () => {
|
|
const result = SkillConfigSchema.safeParse({
|
|
enabled: true,
|
|
mode: SkillMode.HYBRID,
|
|
allowedSkills: ["memory-search"],
|
|
});
|
|
|
|
assert.equal(result.success, true);
|
|
if (result.success) {
|
|
assert.equal(result.data.timeout, 30000);
|
|
assert.equal(result.data.maxRetries, 3);
|
|
}
|
|
});
|