MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / load

Method load

src/workspaces/session-registry.ts:81–87  ·  view source on GitHub ↗

* One-shot factory. Creates the sessions directory and runs `bootFixup` * across every existing session file so orphaned 'running' records flip * to 'paused' before the rest of the server comes online.

(stateRoot: string, logger: Logger)

Source from the content-addressed store, hash-verified

79 * to 'paused' before the rest of the server comes online.
80 */
81 static async load(stateRoot: string, logger: Logger): Promise<SessionRegistry> {
82 const dir = join(stateRoot, 'sessions');
83 await mkdir(dir, { recursive: true });
84 const reg = new SessionRegistry(dir, logger);
85 await reg.bootFixup();
86 return reg;
87 }
88
89 private async bootFixup(): Promise<void> {
90 let files: string[];

Callers 8

createWorkspaceServiceFunction · 0.45
SettingsSectionFunction · 0.45
ToolsSectionFunction · 0.45
ToolsTabFunction · 0.45
PortfolioPageFunction · 0.45
useConfigPageFunction · 0.45

Calls 1

bootFixupMethod · 0.95

Tested by

no test coverage detected