Skip to content

Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.

665 B
Raw Blame
/**
 * The capital ship's decks, top to bottom. The ids are a contract with the
 * cook (`art/verse/decks/<id>/`), the cooked content
 * (`public/verse/decks/<id>/manifest.json`) and the progression backend
 * (`deck_discovered` refs).
 */
export const DECK_IDS = ["bridge", "ops", "engineering", "hangar"] as const;

export type DeckId = (typeof DECK_IDS)[number];

export function isDeckId(value: unknown): value is DeckId {
  return typeof value === "string" && (DECK_IDS as readonly string[]).includes(value);
}

/** One-based deck number as shown on the turbolift panel. */
export function deckNumber(id: DeckId): number {
  return DECK_IDS.indexOf(id) + 1;
}