feat(FN-4153): complete Step 3 — wire scheduler permanent-agent assignment toggle

Fusion-Task-Id: FN-4153
Fusion-Task-Lineage: 6ec09467-c7a0-4a9d-9a09-16d5ef6f7a86
This commit is contained in:
Fusion
2026-05-13 01:07:37 -07:00
committed by gsxdsm
parent 992ae3a92e
commit efd5a8a4aa
2 changed files with 54 additions and 12 deletions

View File

@@ -262,6 +262,18 @@ export class InProcessRuntime
}
}
// 5a. Initialize AgentStore (required for scheduler assignment, reflection service, and heartbeat monitoring)
let agentStoreForReflection: import("@fusion/core").AgentStore | undefined;
try {
const { AgentStore: AgentStoreClass } = await import("@fusion/core");
agentStoreForReflection = new AgentStoreClass({ rootDir: this.taskStore.getFusionDir(), taskStore: this.taskStore });
await agentStoreForReflection.init();
runtimeLog.log("AgentStore initialized for reflection service");
} catch (agentErr) {
runtimeLog.warn(`AgentStore initialization failed (reflection service will be unavailable):`, agentErr instanceof Error ? agentErr.message : agentErr);
}
this.agentStore = agentStoreForReflection;
// 5. Initialize Scheduler
const missionStore = this.taskStore.getMissionStore();
this.missionAutopilot = missionStore
@@ -337,18 +349,6 @@ export class InProcessRuntime
},
});
// 5a. Initialize AgentStore (required for reflection service and heartbeat monitoring)
let agentStoreForReflection: import("@fusion/core").AgentStore | undefined;
try {
const { AgentStore: AgentStoreClass } = await import("@fusion/core");
agentStoreForReflection = new AgentStoreClass({ rootDir: this.taskStore.getFusionDir(), taskStore: this.taskStore });
await agentStoreForReflection.init();
runtimeLog.log("AgentStore initialized for reflection service");
} catch (agentErr) {
runtimeLog.warn(`AgentStore initialization failed (reflection service will be unavailable):`, agentErr instanceof Error ? agentErr.message : agentErr);
}
this.agentStore = agentStoreForReflection;
// 5b. Initialize ReflectionStore for agent reflections
let reflectionStoreForService: import("@fusion/core").ReflectionStore | undefined;
try {