feat(FN-3561): wire permanent-agent approval context in runtime paths
Wired permanent-agent approval context into runtime paths for FN-3561, updating the agents documentation and adding test coverage for the heartbeat executor to validate the runtime behavior. Fusion-Task-Id: FN-3561
This commit is contained in:
@@ -26,6 +26,21 @@ describe("permanent-agent-gating", () => {
|
||||
expect(classifyPermanentAgentToolCall("fn_research_get").category).toBe("none");
|
||||
});
|
||||
|
||||
it("uses only canonical action-category names", () => {
|
||||
const categories = [
|
||||
classifyPermanentAgentToolCall("bash", { command: "git commit -m x" }).category,
|
||||
classifyPermanentAgentToolCall("write").category,
|
||||
classifyPermanentAgentToolCall("bash", { command: "echo hi" }).category,
|
||||
classifyPermanentAgentToolCall("fn_research_run").category,
|
||||
classifyPermanentAgentToolCall("fn_task_create").category,
|
||||
classifyPermanentAgentToolCall("read").category,
|
||||
];
|
||||
|
||||
expect(new Set(categories)).toEqual(
|
||||
new Set(["git_write", "file_write_delete", "command_execution", "network_api", "task_agent_mutation", "none"]),
|
||||
);
|
||||
});
|
||||
|
||||
it("uses unknown-tool fallback to approval-required", () => {
|
||||
const decision = resolvePermanentAgentToolDecision({
|
||||
toolName: "plugin_custom_tool",
|
||||
|
||||
Reference in New Issue
Block a user