feat(FN-3560): add permanent agent gating enforcement in pi with tool class

The merge lands three major features: a permanent-agent gating system (FN-3560, 6 steps) that classifies and enforces tool access policies for permanent agents in the PI extension, with full test coverage and updated agent docs; an OpenClaw MCP bridge (FN-3717) adding MCP config, schema server, and

Fusion-Task-Id: FN-3560
This commit is contained in:
Fusion
2026-05-07 18:03:38 -07:00
committed by gsxdsm
parent 836ca6807a
commit 2e3be32f1b
17 changed files with 647 additions and 124 deletions

View File

@@ -128,14 +128,22 @@ describe("Runtime Selection Regression Tests", () => {
const { createResolvedAgentSession } = await import("../agent-session-helpers.js");
const permanentAgentGating = {
permissionPolicy: {
presetId: "approval-required",
rules: { command_execution: "require-approval" as const },
},
};
await createResolvedAgentSession({
sessionPurpose: "executor",
pluginRunner: {} as any,
cwd: "/test/path",
systemPrompt: "Test prompt",
permanentAgentGating,
});
expect(mockCreateSession).toHaveBeenCalled();
expect(mockCreateSession).toHaveBeenCalledWith(expect.objectContaining({ permanentAgentGating }));
});
it("should return runtime metadata along with session", async () => {