diff --git a/package.json b/package.json index 09abe4d..89c5a3b 100644 --- a/package.json +++ b/package.json @@ -45,6 +45,9 @@ "scripts/openclaw-after-tool-call-messages.patch.sh", "scripts/setup-offload.sh", "hermes-plugin/", + "!hermes-plugin/**/__pycache__/**", + "!hermes-plugin/**/*.pyc", + "!hermes-plugin/**/tests/**", "openclaw.plugin.json", "README.md", "CHANGELOG.md", diff --git a/src/package-files.test.ts b/src/package-files.test.ts new file mode 100644 index 0000000..2ba1548 --- /dev/null +++ b/src/package-files.test.ts @@ -0,0 +1,19 @@ +import { describe, expect, it } from "vitest"; +import { readFileSync } from "node:fs"; + +type PackageJson = { + files?: string[]; +}; + +const packageJson = JSON.parse( + readFileSync(new URL("../package.json", import.meta.url), "utf8"), +) as PackageJson; + +describe("package files", () => { + it("keeps Hermes runtime while excluding Python cache and tests", () => { + expect(packageJson.files).toContain("hermes-plugin/"); + expect(packageJson.files).toContain("!hermes-plugin/**/__pycache__/**"); + expect(packageJson.files).toContain("!hermes-plugin/**/*.pyc"); + expect(packageJson.files).toContain("!hermes-plugin/**/tests/**"); + }); +});