feat(FN-3321): add agent self-improvement service and heartbeat evaluation

This merge delivers agent self-improvement (FN-3321) — adding evaluation identity tools, wiring evaluation into the heartbeat loop, implementing a self-improvement service, and providing test coverage. It also expands the dashboard guide view with regression tests, adds org chart full-view mode with

Fusion-Task-Id: FN-3321
This commit is contained in:
Fusion
2026-05-05 03:44:01 -07:00
committed by gsxdsm
parent 02a0c48bad
commit 499417bc8e
14 changed files with 667 additions and 16 deletions

View File

@@ -358,6 +358,21 @@ export class InProcessRuntime
}
}
let selfImproveService: import("../agent-self-improve.js").AgentSelfImproveService | undefined;
if (agentStoreForReflection && reflectionStoreForService) {
try {
const { AgentSelfImproveService: AgentSelfImproveServiceClass } = await import("../agent-self-improve.js");
selfImproveService = new AgentSelfImproveServiceClass({
agentStore: agentStoreForReflection,
reflectionStore: reflectionStoreForService,
rootDir: this.config.workingDirectory,
});
runtimeLog.log("AgentSelfImproveService initialized");
} catch (selfImproveErr) {
runtimeLog.warn(`AgentSelfImproveService initialization failed:`, selfImproveErr instanceof Error ? selfImproveErr.message : selfImproveErr);
}
}
const executorOptions: TaskExecutorOptions = {
semaphore: this.globalSemaphore,
pool: this.worktreePool,
@@ -537,6 +552,9 @@ export class InProcessRuntime
rootDir: this.config.workingDirectory,
messageStore: this.messageStore,
pluginRunner: this.pluginRunner,
reflectionStore: reflectionStoreForService,
reflectionService,
selfImproveService,
onMissed: (agentId, reason) => {
runtimeLog.warn(`Agent ${agentId} missed heartbeat: ${reason}`);
},