import { createSidecarProxy } from '@@/sidecar/create-proxy'; import { mountPrefix } from '@@/plugins/manifest'; import { manifest } from '../manifest'; // /api/atelier/* — auth, then forward to officer-atelier. No routes of its own and no Atelier // knowledge: this file must never grow app logic. See plugins/offscale/api/router.ts, the pattern // this follows. // // Generation can run for tens of seconds and the queue can be mid-flight when a caller polls, so the // proxy is given a longer idle timeout than the default — the sidecar itself already bounds a single // poll at MAX_WAIT_SECONDS (sidecar/api/images.ts), this only has to outlast that plus network slack. const proxy = createSidecarProxy({ name: 'atelier', prefix: `/api${mountPrefix({ appName: 'atelier', manifest })}`, timeoutSeconds: 260, }); export const router = proxy.router; /** Base URL of the sidecar's HTTP server, or null if it hasn't reported in yet. */ export const getAtelierServerUrl = proxy.getHttpUrl;