# .eventsourced/session.yaml for Circuit's frontend template (React + Vite + # Tailwind, with a mock API that vite.config.ts starts). Commit it at the # ROOT of the template project; every initiative created from the template # then has a ready dev server and a published preview when its session # starts, instead of waiting for the agent (or the preview tab) to start one. # See docs/circuit-session-startup.md for the design and how to verify it. # # It runs only where the deployment sets SESSION_STARTUP=true (Circuit's does), # and a session can opt out with the per-session `session_startup: false`. # Port exposure also needs the session to be allowed network.expose, which # every Circuit mode allows (TestNoCircuitModeDeniesNetworkExpose). # # Why each step is written the way it is: # # * Install only when node_modules is missing (a worker that kept its # workspace volume does not reinstall), with `npm ci` when there is a # lockfile and `npm install` when there is not. # # * The dev server binds 0.0.0.0 and uses --strictPort on 5173, the port the # template serves on (its README says so and vite.config.ts does not set # another). Circuit's own preview start takes whatever port is published # first, so the port declared here is the one the preview uses. # # * Vite refuses requests whose Host header it does not know ("Blocked # request. This host is not allowed"). The published host is #