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:
@@ -250,7 +250,7 @@ describe("executeHeartbeat", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("passes action gate context for permanent heartbeat agents", async () => {
|
||||
it("passes action gate and permanent gating context for permanent heartbeat agents", async () => {
|
||||
const store = createStoreWithAgentForExec({ taskId: "FN-001" });
|
||||
const mockSession = createMockAgentSession();
|
||||
mockedCreateFnAgent.mockResolvedValue({ session: mockSession as any });
|
||||
@@ -258,9 +258,13 @@ describe("executeHeartbeat", () => {
|
||||
|
||||
await monitor.executeHeartbeat({ agentId: "agent-001", source: "on_demand" });
|
||||
|
||||
const args = mockedCreateFnAgent.mock.calls[0]?.[0] as { actionGateContext?: { agentId: string; isEphemeral: boolean } };
|
||||
const args = mockedCreateFnAgent.mock.calls[0]?.[0] as {
|
||||
actionGateContext?: { agentId: string; isEphemeral: boolean };
|
||||
permanentAgentGating?: { permissionPolicy?: { presetId: string } };
|
||||
};
|
||||
expect(args.actionGateContext?.agentId).toBe("agent-001");
|
||||
expect(args.actionGateContext?.isEphemeral).toBe(false);
|
||||
expect(args.permanentAgentGating?.permissionPolicy?.presetId).toBe("unrestricted");
|
||||
});
|
||||
|
||||
describe("dependency validation", () => {
|
||||
|
||||
Reference in New Issue
Block a user