32 lines
1.1 KiB
TypeScript
32 lines
1.1 KiB
TypeScript
/**
|
||
* Server bootstrap — Phase 1 scaffold (T-1.0).
|
||
*
|
||
* Creates the HTTP + WebSocket server and wires up legacy routes.
|
||
* Route placeholders will be populated by T-1.5 / T-1.6 / T-1.7.
|
||
*
|
||
* Architecture:
|
||
* server/server.ts — this file: bootstrap, exports startServer()
|
||
* server/upgrade.ts — WebSocket upgrade routing (extracted from legacy)
|
||
* server/legacy-server.ts — LEGACY: original server implementation,
|
||
* to be gradually carved into route modules
|
||
* server/routes/ — stubs; T-1.5..T-1.7 will implement
|
||
*/
|
||
import type {
|
||
ExtensionAPI,
|
||
ExtensionContext,
|
||
} from "@earendil-works/pi-coding-agent";
|
||
import { startServer as startLegacyServer } from "./legacy-server.js";
|
||
export type { RemoteServer } from "./legacy-server.js";
|
||
|
||
/**
|
||
* Start the remote-control server.
|
||
*
|
||
* Currently delegates to the legacy server monolith; T-1.5–T-1.7 will
|
||
* incrementally replace legacy routes with the modular route handlers
|
||
* under server/routes/.
|
||
*/
|
||
export const startServer: (
|
||
pi: ExtensionAPI,
|
||
ctx: ExtensionContext,
|
||
) => Promise<import("./legacy-server.js").RemoteServer> = startLegacyServer;
|