#!/usr/bin/env node
import'./chunk-XHJ27CER.js';import o from'chalk';async function a(s,n){let t=s||process.cwd(),e=parseInt(n.port||"3840",10),i=n.open!==false;console.log(o.cyan(`
Starting Lore Timeline...
`));try{let{startLoreServer:r}=await import('./lore-server-A3KKZLSY.js');console.log(o.gray(`Project: ${t}`)),console.log(o.gray(`Port: ${e}`)),console.log(),await r({port:e,projectDir:t,open:i}),console.log(o.green(`
Lore Timeline is running at http://localhost:${e}`)),console.log(o.gray(`
Press Ctrl+C to stop
`)),await new Promise(()=>{});}catch(r){r.code==="EADDRINUSE"?(console.error(o.red(`
Error: Port ${e} is already in use.`)),console.log(o.gray(`Try: paradigm lore --port ${e+1}
`))):console.error(o.red(`
Failed to start Lore Timeline:`),r),process.exit(1);}}export{a as loreServeCommand};