Files
station-master-startos/startos/fileModels/store.json.ts
T
Jesse de28b30eea Initial StartOS package for Station Master (v0.5.1)
Built from source via a git submodule pinned to a tag, not a published image
— the Dockerfile, main.ts, and manifest should never need to change for an
ordinary version bump, only the submodule pin (see UPDATING.md). One volume,
one interface serving the browser client + lobby/intent API + SSE stream
from a single origin, no dependencies. The server-wide join secret (D14) is
seeded on install, exposed via the Get Join Secret action, and blocks start
behind a critical task until retrieved — the same first-set/rotation pattern
as actual-budget-startos's admin password.

Verified on phoenix.local: installs, the critical task correctly blocks an
ordinary start, force-starting confirms the daemon binds its port and serves
the client, and store.json correctly holds the install-seeded join secret.
Not verified: the Get Join Secret action's execution end-to-end — start-cli's
`package action run` fails with a client-side deserialization error that
reproduces identically against actual-budget's already-shipped equivalent
action, so this looks like a start-cli issue rather than a defect here.

icon.svg is still the scaffold's hello-world placeholder — no real Station
Master icon exists yet to ship in its place.
2026-08-21 08:44:07 -04:00

15 lines
625 B
TypeScript

import { FileHelper, z } from '@start9labs/start-sdk'
import { sdk } from '../sdk'
/**
* `joinSecret` is D14's server-wide secret (`docs/architecture/multiplayer.md` in the game repo):
* whoever holds it may create a game, and may join any created game that has not started. The
* server refuses to start without one (`src/server/index.ts`), so `joinSecret` is seeded on
* install (`init/generateJoinSecret.ts`) and never left unset.
*/
const shape = z.object({
joinSecret: z.string().optional().catch(undefined),
})
export const storeJson = FileHelper.json({ base: sdk.volumes.data, subpath: 'store.json' }, shape)