mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-10-26 10:45:22 +00:00
fix: 根 files 改为子包运行时白名单,并删除过期提示词快照
整目录列入子包时,pi-subagents 上游 .npmignore 覆盖 .gitignore,导致 嵌套 node_modules(含第二套 Pi runtime)与 dist 被打包:64.9MB/19,570 文件降至 1.2MB/471 文件。新增 tests/package-files.test.ts 守护:无嵌套 node_modules/dist、扩展入口与 file: 依赖清单在包内、包内源码相对引用闭包。 同时删除无引用的 pi-default-system-prompt.md 旧快照(可用 /dump-system-prompt)。 Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
e996f59469
commit
a254d4fd68
@@ -8,6 +8,9 @@ const packageJson = JSON.parse(await readFile(new URL("../package.json", import.
|
||||
pi: { extensions: string[]; skills: string[] };
|
||||
};
|
||||
|
||||
const filesIncludePackageDir = (files: string[], packageDir: string): boolean =>
|
||||
files.some((entry) => entry === packageDir || entry.startsWith(`${packageDir}/`));
|
||||
|
||||
test("pi-web-search is the single search surface and reads credentials from auth.json", () => {
|
||||
const entries = packageJson.pi.extensions;
|
||||
assert.ok(entries.includes("./pi-web-search/index.ts"), "the bundle must load pi-web-search");
|
||||
@@ -27,7 +30,7 @@ test("pi-web-search is the single search surface and reads credentials from auth
|
||||
|
||||
test("pi-web-search ships as a maintained file: dependency without upstream search packages", () => {
|
||||
assert.equal(packageJson.dependencies["pi-web-search"], "file:./pi-web-search");
|
||||
assert.ok(packageJson.files.includes("pi-web-search"));
|
||||
assert.ok(filesIncludePackageDir(packageJson.files, "pi-web-search"));
|
||||
assert.equal(packageJson.dependencies["@tavily/pi-extension"], undefined);
|
||||
assert.equal(packageJson.dependencies["@keenable/pi-search"], undefined);
|
||||
assert.equal(packageJson.dependencies["pi-mcp-adapter"], undefined, "Exa is a direct client now — no MCP adapter");
|
||||
|
||||
Reference in New Issue
Block a user