feat(FN-1872): merge fusion/fn-1872
This commit is contained in:
@@ -15,6 +15,7 @@ import { PrMonitor } from "./pr-monitor.js";
|
||||
import { PrCommentHandler } from "./pr-comment-handler.js";
|
||||
import { NtfyNotifier } from "./notifier.js";
|
||||
import { CronRunner, createAiPromptExecutor } from "./cron-runner.js";
|
||||
import type { RoutineRunner } from "./routine-runner.js";
|
||||
import { aiMergeTask } from "./merger.js";
|
||||
import { PRIORITY_MERGE } from "./concurrency.js";
|
||||
import { runtimeLog } from "./logger.js";
|
||||
@@ -286,6 +287,16 @@ export class ProjectEngine {
|
||||
return this.automationStore;
|
||||
}
|
||||
|
||||
/** Get the RoutineStore (if initialized). */
|
||||
getRoutineStore(): import("@fusion/core").RoutineStore | undefined {
|
||||
return this.runtime.getRoutineStore();
|
||||
}
|
||||
|
||||
/** Get the RoutineRunner (if initialized). */
|
||||
getRoutineRunner(): RoutineRunner | undefined {
|
||||
return this.runtime.getRoutineRunner();
|
||||
}
|
||||
|
||||
/** Get the HeartbeatTriggerScheduler from the underlying runtime, if initialized. */
|
||||
getHeartbeatTriggerScheduler(): HeartbeatTriggerScheduler | undefined {
|
||||
return this.runtime.getTriggerScheduler();
|
||||
|
||||
@@ -9,6 +9,7 @@ import type {
|
||||
PluginStore,
|
||||
PluginLoader,
|
||||
MessageStore,
|
||||
RoutineStore,
|
||||
} from "@fusion/core";
|
||||
import { Scheduler } from "../scheduler.js";
|
||||
import { TaskExecutor, type TaskExecutorOptions } from "../executor.js";
|
||||
@@ -88,6 +89,7 @@ export class InProcessRuntime
|
||||
private pluginStore?: PluginStore;
|
||||
private pluginLoader?: PluginLoader;
|
||||
private routineRunner?: RoutineRunner;
|
||||
private routineStore?: RoutineStore;
|
||||
private routineScheduler?: RoutineScheduler;
|
||||
private missionExecutionLoop?: MissionExecutionLoop;
|
||||
private missionAutopilot?: MissionAutopilot;
|
||||
@@ -446,6 +448,7 @@ export class InProcessRuntime
|
||||
if (typeof RoutineStoreClass.prototype.getDueRoutines === "function") {
|
||||
const routineStore = new RoutineStoreClass(this.taskStore.getFusionDir());
|
||||
await routineStore.init();
|
||||
this.routineStore = routineStore;
|
||||
|
||||
if (this.heartbeatMonitor) {
|
||||
const routineRunnerOptions: RoutineRunnerOptions = {
|
||||
@@ -754,6 +757,14 @@ export class InProcessRuntime
|
||||
return this.routineRunner;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the RoutineStore instance (if initialized).
|
||||
* Returns undefined when RoutineStore is not available.
|
||||
*/
|
||||
getRoutineStore(): RoutineStore | undefined {
|
||||
return this.routineStore;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the RoutineScheduler instance (if initialized).
|
||||
* Returns undefined when RoutineStore is not available.
|
||||
|
||||
Reference in New Issue
Block a user