feat: add interactive ask-user extension

This commit is contained in:
云服务部-叶林立
2026-08-24 20:23:54 +08:00
parent e941e71ed8
commit 939139b5f3
21 changed files with 937 additions and 2 deletions
+8
View File
@@ -37,6 +37,9 @@ test("all package extensions load together without global registration conflicts
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> };
@@ -52,6 +55,11 @@ test("all package extensions load together without global registration conflicts
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",