mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-08-28 08:35:57 +00:00
Merge branch 'main' of bitbucket.org:siakitem/my-pi
# Conflicts: # AGENTS.md # README.md # package-lock.json # package.json # pi-tool-search/CHANGELOG.md # pi-tool-search/README.md # pi-tool-search/docs/dynamic-tool-loading.md # pi-tool-search/extensions/bundle-groups.ts # pi-tool-search/test/bundle-groups.test.ts
This commit is contained in:
@@ -49,6 +49,10 @@ test("all package extensions load together without global registration conflicts
|
||||
files: string[];
|
||||
pi: { extensions: string[] };
|
||||
};
|
||||
assert.ok(
|
||||
packageJson.pi.extensions.includes("./extensions/plugin-init.ts"),
|
||||
"the bundle must expose the project plugin initializer command",
|
||||
);
|
||||
assert.ok(
|
||||
packageJson.pi.extensions.includes("./hippo-memory-pi/index.ts"),
|
||||
"the bundle must load the vendored official Hippo Memory extension",
|
||||
@@ -61,6 +65,36 @@ test("all package extensions load together without global registration conflicts
|
||||
packageJson.pi.extensions.includes("./pi-extension-codex-fast-mode/index.ts"),
|
||||
"the bundle must load the locally maintained Codex Fast mode extension",
|
||||
);
|
||||
assert.ok(packageJson.pi.extensions.includes("./pi-ssh/index.ts"), "the bundle must load the locally maintained SSH extension");
|
||||
assert.equal(packageJson.dependencies["pi-ssh"], "file:./pi-ssh");
|
||||
assert.equal(packageJson.dependencies.ssh2, "1.17.0", "the packed bundle must install pi-ssh's runtime transport");
|
||||
assert.equal(packageJson.dependencies.jiti, "2.7.0", "the packed helper must load local TypeScript outside Pi");
|
||||
assert.ok(packageJson.files.includes("pi-ssh"), "the packed bundle must include the locally maintained SSH source");
|
||||
assert.ok(packageJson.files.includes("ssh_config.sh"), "the packed bundle must include the SSH host import helper");
|
||||
assert.ok(packageJson.pi.extensions.includes("./pi-ask-user/index.ts"), "the bundle must load pi-ask-user");
|
||||
assert.equal(packageJson.dependencies["pi-ask-user"], "file:./pi-ask-user");
|
||||
assert.ok(packageJson.files.includes("pi-ask-user"), "the packed bundle must include pi-ask-user source");
|
||||
const permissionConfig = JSON.parse(
|
||||
await readFile(join(repositoryRoot, "config", "pi-permission-system.json"), "utf8"),
|
||||
) as { authorizerChain: string[]; permission: Record<string, unknown> };
|
||||
assert.equal(permissionConfig.permission.ssh_connect, "ask", "SSH connection must enter the permission gate");
|
||||
assert.equal(permissionConfig.permission.ssh_cd, "ask", "remote workspace changes must enter the permission gate");
|
||||
assert.deepEqual(permissionConfig.authorizerChain, ["auto-review"], "SSH connection asks must reach AutoReview");
|
||||
assert.ok(
|
||||
packageJson.pi.extensions.indexOf("./extensions/permission-system.ts") <
|
||||
packageJson.pi.extensions.indexOf("./pi-ssh/index.ts"),
|
||||
"the permission service must load before pi-ssh registers its permission bridge",
|
||||
);
|
||||
assert.ok(
|
||||
packageJson.pi.extensions.indexOf("./pi-ssh/index.ts") <
|
||||
packageJson.pi.extensions.indexOf("./pi-tool-search/extensions/index.ts"),
|
||||
"pi-ssh tools must register before Tool Search builds its catalog",
|
||||
);
|
||||
assert.ok(
|
||||
packageJson.pi.extensions.indexOf("./pi-ask-user/index.ts") <
|
||||
packageJson.pi.extensions.indexOf("./pi-tool-search/extensions/index.ts"),
|
||||
"ask_user_question must register before Tool Search builds its catalog",
|
||||
);
|
||||
assert.equal(
|
||||
packageJson.dependencies["@firstpick/pi-extension-codex-fast-mode"],
|
||||
"file:./pi-extension-codex-fast-mode",
|
||||
@@ -69,6 +103,15 @@ test("all package extensions load together without global registration conflicts
|
||||
packageJson.files.includes("pi-extension-codex-fast-mode"),
|
||||
"the packed bundle must include the locally maintained Codex Fast mode source",
|
||||
);
|
||||
assert.ok(
|
||||
packageJson.pi.extensions.includes("./pi-notify/src/index.ts"),
|
||||
"the bundle must load the locally maintained Kitty notification extension",
|
||||
);
|
||||
assert.equal(packageJson.dependencies["@smoose/pi-notify"], "file:./pi-notify");
|
||||
assert.ok(
|
||||
packageJson.files.includes("pi-notify"),
|
||||
"the packed bundle must include the locally maintained notification source",
|
||||
);
|
||||
assert.equal(packageJson.dependencies["@ogulcancelik/pi-minimal-footer"], "file:./pi-minimal-footer");
|
||||
assert.equal(packageJson.dependencies["@tintinweb/pi-subagents"], "file:./pi-subagents");
|
||||
assert.ok(packageJson.pi.extensions.includes("./extensions/subagents.ts"));
|
||||
@@ -108,4 +151,8 @@ test("all package extensions load together without global registration conflicts
|
||||
|
||||
assert.equal(result.status, 0, `${result.stdout}\n${result.stderr}`);
|
||||
assert.doesNotMatch(`${result.stdout}\n${result.stderr}`, /Failed to load extension|conflicts with/u);
|
||||
const deployedPermissionConfig = JSON.parse(
|
||||
await readFile(join(home, ".pi-agent", "extensions", "pi-permission-system", "config.json"), "utf8"),
|
||||
);
|
||||
assert.deepEqual(deployedPermissionConfig, permissionConfig, "the deployed permission config must match the bundle source");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user