Return resources shared by the graph and dcode operation routes.
Builds once and caches. A construction failure is converted into a
startup-error marker (scraped by the parent app process) before
sys.exit(1), which is right for the langgraph.json graph factory at
startup. Callers in request scope must contain that exit -- SystemExit is a
BaseException -- as offload_api._execute_offload does, mapping it to a 503
rather than killing the server mid-request.