feat(FN-1690): wire RoadmapStore access via TaskStore.getRoadmapStore()

This commit is contained in:
gsxdsm
2026-04-14 09:40:42 -07:00
parent 356c6808da
commit 47153cb1e0
2 changed files with 16 additions and 0 deletions

View File

@@ -273,6 +273,8 @@ export type {
} from "./mission-types.js";
export { MissionStore } from "./mission-store.js";
export type { MissionStoreEvents, MissionSummary } from "./mission-store.js";
export { RoadmapStore } from "./roadmap-store.js";
export type { RoadmapStoreEvents } from "./roadmap-store.js";
// ── Central Infrastructure (Multi-Project Support) ───────────────────────────

View File

@@ -10,6 +10,7 @@ import { Database, toJson, toJsonNullable, fromJson } from "./db.js";
import { detectLegacyData, migrateFromLegacy } from "./db-migrate.js";
import { MissionStore } from "./mission-store.js";
import { PluginStore } from "./plugin-store.js";
import { RoadmapStore } from "./roadmap-store.js";
import { BackwardCompat, ProjectRequiredError } from "./migration.js";
import { CentralCore } from "./central-core.js";
import { getTaskMergeBlocker } from "./task-merge.js";
@@ -130,6 +131,8 @@ export class TaskStore extends EventEmitter<TaskStoreEvents> {
private missionStore: MissionStore | null = null;
/** Cached PluginStore instance */
private pluginStore: PluginStore | null = null;
/** Cached RoadmapStore instance */
private roadmapStore: RoadmapStore | null = null;
constructor(private rootDir: string, globalSettingsDir?: string) {
super();
@@ -4529,6 +4532,17 @@ ${notificationsSection}`;
return this.pluginStore;
}
/**
* Get the RoadmapStore instance for standalone roadmap operations.
* Lazily initializes the RoadmapStore on first access.
*/
getRoadmapStore(): RoadmapStore {
if (!this.roadmapStore) {
this.roadmapStore = new RoadmapStore(this.db);
}
return this.roadmapStore;
}
// ── Backward Compatibility (Multi-Project Support) ────────────────────────
}