/**
 * Compatibility shim.
 *
 * The worker-mode startup logic that used to live here moved to
 * `worker-bootstrap.ts` in the Phase 1 AAO Gateway split. The new
 * canonical entry point is `src/main.ts`, which dispatches on
 * `AAO_MODE` and calls either worker-bootstrap.start() or
 * gateway/bootstrap.start().
 *
 * This file stays so anything that still does `node dist/index.js`
 * (legacy service managers, older docker images, the test harness)
 * keeps working unchanged. New deployments should switch to
 * `node dist/main.js` — see package.json's `scripts.start`.
 */
import { logger } from './logger.js';
import { start } from './worker-bootstrap.js';

start().catch((err: unknown) => {
  logger.error(`Fatal error: ${err}`);
  process.exit(1);
});
