GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — cli/tools/knowledge-skill-assets.test.ts at main · modelstudioai/cli

Expand file tree

/

knowledge-skill-assets.test.ts

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
35 lines (32 loc) · 1.79 KB
/

knowledge-skill-assets.test.ts

Copy path

File metadata and controls

35 lines (32 loc) · 1.79 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import { readFileSync, existsSync } from "node:fs";
import { dirname, resolve } from "node:path";
import { fileURLToPath } from "node:url";
import { parse } from "yaml";
import { expect, test } from "vite-plus/test";
import { validateSkillDir } from "../packages/core/src/skills/validate.ts";
import cliPackage from "../packages/cli/package.json" with { type: "json" };
const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");
const directory = resolve(root, "skills/bailian-knowledge");
test("knowledge skill is installable, version aligned, and all relative document links resolve", () => {
expect(validateSkillDir(directory, "bailian-knowledge").name).toBe("bailian-knowledge");
const skill = readFileSync(resolve(directory, "SKILL.md"), "utf8");
const header = parse(/^---\n([\s\S]*?)\n---/.exec(skill)![1]);
expect(header.metadata.version).toBe(cliPackage.version);
expect(header.companions).toBeUndefined();
const links = [...skill.matchAll(/\]\(([^)]+)\)/g)].map((match) => match[1]);
expect(links).toEqual(
expect.arrayContaining(["../bailian-protocol/SKILL.md", "reference/index.md"]),
);
for (const link of links.filter((link) => !link.includes("://"))) {
expect(existsSync(resolve(directory, link.split("#")[0])), link).toBe(true);
}
});
test("generated knowledge references and skill metadata are covered by delivery checks", () => {
const hook = readFileSync(resolve(root, ".vite-hooks/pre-commit"), "utf8");
const release = readFileSync(resolve(root, "tools/release/check.mjs"), "utf8");
for (const asset of ["skills/bailian-knowledge/SKILL.md", "skills/bailian-knowledge/reference"]) {
expect(hook).toContain(asset);
expect(release).toContain(asset);
}
expect(cliPackage.scripts["generate:reference"]).toContain("skills/bailian-knowledge/reference");
});
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.