SACRAMENTO — Every homeless person in California would have a right to a bed year-round under a statewide “right to shelter” policy proposed by Sen. Scott Wiener.

The San Francisco Democrat announced SB48 on Wednesday, although key details of the bill — including how much the added shelters will cost, how they will be paid for and who will be responsible for ensuring enough beds are made available — will not be worked out until at least next year.

Wiener’s bill calls for the Legislature and stakeholders to work together to create the policy. Wiener said Tuesday that he hopes to have a finished bill in 2019, but that it’s possible he’ll need to work on it the following year as well.

“We don’t have enough shelter capacity in California,” Wiener said. “There are counties and cities that have no shelter capacity, or they only open in the winter.”

Wiener said his goal is a statewide guarantee that homeless people who want to sleep in a shelter will have beds. But he said he also wants flexibility so communities can shape the policy to fit their needs.

Wiener’s bill says the added shelters would be a way for homeless people to transition into permanent housing, rather than becoming long-term housing themselves.

“This is a way to get people off the streets and into stable housing,” he said.

Melody Gutierrez is the San Francisco Chronicle’s Sacramento bureau chief. Email: mgutierrez@sfchronicle.com Twitter: @MelodyGutierrez