fix(FN-915): use getFusionDir() for agent storage location
- Add getFusionDir() method to TaskStore for resolving agent database path - Update in-process-runtime to use getFusionDir() instead of hardcoded path - Update dashboard routes AgentStore initialization to use getFusionDir() - Add changeset for published package patch bump
This commit is contained in:
@@ -13,6 +13,7 @@ vi.mock("@fusion/core", async () => {
|
||||
TaskStore: vi.fn().mockImplementation(function(this: TaskStore, rootDir: string) {
|
||||
const self = this as unknown as Record<string, unknown>;
|
||||
self.getRootDir = () => rootDir;
|
||||
self.getFusionDir = () => rootDir + "/.fusion";
|
||||
self.init = vi.fn().mockResolvedValue(undefined);
|
||||
self.listTasks = vi.fn().mockResolvedValue([]);
|
||||
self.getSettings = vi.fn().mockResolvedValue({});
|
||||
|
||||
@@ -208,7 +208,7 @@ export class InProcessRuntime
|
||||
// 6. Initialize AgentStore and HeartbeatMonitor
|
||||
try {
|
||||
const { AgentStore: AgentStoreClass } = await import("@fusion/core");
|
||||
this.agentStore = new AgentStoreClass({ rootDir: this.taskStore.getRootDir() });
|
||||
this.agentStore = new AgentStoreClass({ rootDir: this.taskStore.getFusionDir() });
|
||||
await this.agentStore.init();
|
||||
|
||||
this.heartbeatMonitor = new HeartbeatMonitor({
|
||||
|
||||
Reference in New Issue
Block a user