@@ -24,10 +24,6 @@ import {
2424// Import from the defining modules, not the short-term-promotion barrel: the
2525// barrel pulls memory-host-events/kysely, which doctor enumeration cold-loads.
2626import { normalizeShortTermPhaseSignalStore } from "../short-term-promotion-store.js" ;
27- import {
28- SHORT_TERM_PHASE_SIGNAL_RELATIVE_PATH ,
29- SHORT_TERM_STORE_RELATIVE_PATH ,
30- } from "../short-term-promotion-types.js" ;
3127import { normalizeShortTermRecallStore } from "../short-term-promotion-utils.js" ;
3228import { resolveConfiguredWorkspaces } from "./doctor-workspaces.js" ;
3329import { dreamingStateComparison } from "./dreaming-state-comparison.js" ;
@@ -38,17 +34,6 @@ type LegacySource = {
3834 filePath : string ;
3935} ;
4036
41- const LEGACY_DAILY_INGESTION_STATE_RELATIVE_PATH = path . join (
42- "memory" ,
43- ".dreams" ,
44- "daily-ingestion.json" ,
45- ) ;
46- const LEGACY_SESSION_INGESTION_STATE_RELATIVE_PATH = path . join (
47- "memory" ,
48- ".dreams" ,
49- "session-ingestion.json" ,
50- ) ;
51-
5237async function readJsonFile ( filePath : string ) : Promise < unknown > {
5338 return JSON . parse ( await fs . readFile ( filePath , "utf8" ) ) ;
5439}
@@ -58,15 +43,15 @@ async function collectLegacySources(
5843 env : NodeJS . ProcessEnv ,
5944) : Promise < LegacySource [ ] > {
6045 const sources : LegacySource [ ] = [ ] ;
61- for ( const workspaceDir of resolveConfiguredWorkspaces ( config , env ) ) {
46+ for ( const workspaceDir of await resolveConfiguredWorkspaces ( config , env ) ) {
6247 const candidates = [
63- { label : "daily ingestion" , relativePath : LEGACY_DAILY_INGESTION_STATE_RELATIVE_PATH } ,
64- { label : "session ingestion" , relativePath : LEGACY_SESSION_INGESTION_STATE_RELATIVE_PATH } ,
65- { label : "short-term recall" , relativePath : SHORT_TERM_STORE_RELATIVE_PATH } ,
66- { label : "phase signals" , relativePath : SHORT_TERM_PHASE_SIGNAL_RELATIVE_PATH } ,
48+ { label : "daily ingestion" , fileName : "daily-ingestion.json" } ,
49+ { label : "session ingestion" , fileName : "session-ingestion.json" } ,
50+ { label : "short-term recall" , fileName : "short-term-recall.json" } ,
51+ { label : "phase signals" , fileName : "phase-signals.json" } ,
6752 ] ;
6853 for ( const candidate of candidates ) {
69- const filePath = path . join ( workspaceDir , candidate . relativePath ) ;
54+ const filePath = path . join ( workspaceDir , "memory" , ".dreams" , candidate . fileName ) ;
7055 if ( await legacyStateFileExists ( filePath ) ) {
7156 sources . push ( { workspaceDir, label : candidate . label , filePath } ) ;
7257 }
0 commit comments