feat(FN-1182): add agent reflection service and executor integration

- Extend project settings with reflection enablement, interval, and post-task trigger defaults
- Implement AgentReflectionService to gather agent/task history, generate structured AI reflections, and persist reflection metrics
- Add reflect_on_performance tool factory with optional focus area input and human-readable reflection output
- Wire reflection tool into TaskExecutor only when reflection is enabled and the task has an assigned agent
- Add comprehensive reflection service/tool tests and stabilize agent-store org tree expectation ordering
This commit is contained in:
gsxdsm
2026-04-08 05:55:36 -07:00
parent 7becb33972
commit a7eb95909a
7 changed files with 1086 additions and 2 deletions

View File

@@ -742,7 +742,7 @@ describe("AgentStore", () => {
});
const tree = await store.getOrgTree();
expect(tree.map((node) => node.agent.id)).toEqual([root.id, orphan.id]);
expect(tree.map((node) => node.agent.id).sort()).toEqual([root.id, orphan.id].sort());
});
});