pi-system-one 1.1.3 → 1.2.0

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.
@@ -0,0 +1,49 @@
1
+ // pi-system-one/tests/packaging.test.ts
2
+ //
3
+ // The skill and /judge prompt are runtime behavior (served via
4
+ // resources_discover), not just docs. Assert the published tarball
5
+ // actually contains them by inspecting the real `npm pack` file list
6
+ // rather than the source checkout.
7
+
8
+ import assert from "node:assert/strict";
9
+ import { execFileSync } from "node:child_process";
10
+ import { describe, it } from "node:test";
11
+ import { fileURLToPath } from "node:url";
12
+
13
+ const packageRoot = fileURLToPath(new URL("..", import.meta.url));
14
+
15
+ function packedFiles(): string[] {
16
+ const stdout = execFileSync("npm", ["pack", "--dry-run", "--json"], {
17
+ cwd: packageRoot,
18
+ encoding: "utf-8",
19
+ stdio: ["ignore", "pipe", "pipe"],
20
+ });
21
+ const parsed: unknown = JSON.parse(stdout);
22
+ const entry = Array.isArray(parsed) ? parsed[0] : undefined;
23
+ const files = (entry as { files?: Array<{ path?: string }> } | undefined)
24
+ ?.files;
25
+ assert.ok(
26
+ Array.isArray(files) && files.length > 0,
27
+ "npm pack --dry-run --json returned no files",
28
+ );
29
+ return (files as Array<{ path?: string }>)
30
+ .map((f) => f.path ?? "")
31
+ .filter((p) => p.length > 0);
32
+ }
33
+
34
+ describe("npm package runtime resources", () => {
35
+ it("packs the skill, its references, and the /judge prompt", () => {
36
+ const files = packedFiles();
37
+ for (const required of [
38
+ "skills/system-one/SKILL.md",
39
+ "skills/system-one/references/use-cases.md",
40
+ "prompts/judge.md",
41
+ "src/extension.ts",
42
+ ]) {
43
+ assert.ok(
44
+ files.includes(required),
45
+ `published package is missing runtime resource: ${required}`,
46
+ );
47
+ }
48
+ });
49
+ });