unoverse 0.1.197 → 0.1.199
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/skills.mjs
CHANGED
|
@@ -80,11 +80,19 @@ export function skillFileText(skill, rel, text) {
|
|
|
80
80
|
return `---\nname: ${skill}\ndescription: ${desc}\n---\n\n${body}`;
|
|
81
81
|
}
|
|
82
82
|
|
|
83
|
+
/**
|
|
84
|
+
* The site sits behind a CDN that serves llms.txt and pages from cache for a while after
|
|
85
|
+
* a release (observed 2026-09-05: ninety minutes, and the new skill pages absent from the
|
|
86
|
+
* listing throughout). An installer that read the cache would install last release's
|
|
87
|
+
* skills right after this one. A fresh query string is a fresh cache key.
|
|
88
|
+
*/
|
|
89
|
+
const fresh = (url) => `${url}?t=${Date.now()}`;
|
|
90
|
+
|
|
83
91
|
export async function installSkills() {
|
|
84
92
|
const target = join(homedir(), ".claude", "skills");
|
|
85
93
|
let files;
|
|
86
94
|
try {
|
|
87
|
-
const res = await fetch(`${DOCS}/llms.txt`);
|
|
95
|
+
const res = await fetch(fresh(`${DOCS}/llms.txt`));
|
|
88
96
|
if (!res.ok) throw new Error(`HTTP ${res.status}`);
|
|
89
97
|
files = skillFilesFromLlms(await res.text());
|
|
90
98
|
} catch {
|
|
@@ -101,7 +109,7 @@ export async function installSkills() {
|
|
|
101
109
|
const tmp = mkdtempSync(join(tmpdir(), "unoverse-skills-"));
|
|
102
110
|
try {
|
|
103
111
|
for (const f of files) {
|
|
104
|
-
const res = await fetch(f.url);
|
|
112
|
+
const res = await fetch(fresh(f.url));
|
|
105
113
|
if (!res.ok) throw new Error(`${f.url}: HTTP ${res.status}`);
|
|
106
114
|
const p = join(tmp, f.skill, f.rel);
|
|
107
115
|
mkdirSync(dirname(p), { recursive: true });
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*
|
|
16
16
|
* FOUR TIERS (docs/architecture/DECLARATIVE_NODES.md §6). This is tiers 2 and 3.
|
|
17
17
|
* 1 editor $schema pointers + .vscode yaml.schemas, no tool
|
|
18
|
-
* 2 structural every part validated against nodes
|
|
18
|
+
* 2 structural every part validated against the node schemas (packages/docs/schemas/nodes)
|
|
19
19
|
* 3 semantic the cross-file rules a schema cannot express
|
|
20
20
|
* 4 dry run `unoverse node test`, executes against testData, not here
|
|
21
21
|
*/
|
|
@@ -36,16 +36,17 @@ import { lintPackage } from "./package.mjs";
|
|
|
36
36
|
/**
|
|
37
37
|
* Where the node schemas are, for this run.
|
|
38
38
|
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
* validating nothing while looking busy. So the schemas travel with the
|
|
43
|
-
* they sit beside this file (copy-lint.mjs puts them there, and the CLI
|
|
44
|
-
* folder); from source they are the
|
|
39
|
+
* Their home is packages/docs/schemas/nodes, which the docs site serves at the URL every
|
|
40
|
+
* node file's `$schema:` names (so any editor validates online). The linter runs offline
|
|
41
|
+
* and a developer's workspace holds no copy, and a linter that warned "no schema found" on
|
|
42
|
+
* every file was validating nothing while looking busy. So the schemas travel with the
|
|
43
|
+
* linter: in dist they sit beside this file (copy-lint.mjs puts them there, and the CLI
|
|
44
|
+
* vendors that folder); from source they are the docs tree's copy. A `_schema` folder in
|
|
45
|
+
* the workspace itself still wins, for anyone pinning a version.
|
|
45
46
|
*/
|
|
46
47
|
function schemaHome(home) {
|
|
47
48
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
48
|
-
for (const c of [join(home, "_schema"), join(here, "_schema"), resolve(here, "
|
|
49
|
+
for (const c of [join(home, "_schema"), join(here, "_schema"), resolve(here, "../../../../docs/schemas/nodes")])
|
|
49
50
|
if (existsSync(c)) return c;
|
|
50
51
|
return join(home, "_schema");
|
|
51
52
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Tier 2: structural validation against nodes
|
|
2
|
+
* Tier 2: structural validation against the node schemas (packages/docs/schemas/nodes).
|
|
3
3
|
*
|
|
4
4
|
* A JSON Schema catches shape. Everything a schema CANNOT express (cross-file agreement,
|
|
5
5
|
* ordering, reachability) is tier 3 and lives in the rule modules.
|
|
@@ -53,7 +53,7 @@ export function loadSchemas() {
|
|
|
53
53
|
export function validateAgainst(schemaId, doc, file, label) {
|
|
54
54
|
const schema = state.schemas[schemaId];
|
|
55
55
|
if (!schema) {
|
|
56
|
-
report("warn", file, `no schema found for ${label}.
|
|
56
|
+
report("warn", file, `no schema found for ${label}. The linter's bundled schemas are missing; rebuild base`);
|
|
57
57
|
return;
|
|
58
58
|
}
|
|
59
59
|
const v = new Validator(schema, "7", false);
|