Skip to content

Add human-readable sector names - #318

Open
atomantic wants to merge 1 commit into
pipecat-ai:mainfrom
atomantic:sector-names
Open

Add human-readable sector names#318
atomantic wants to merge 1 commit into
pipecat-ai:mainfrom
atomantic:sector-names

Conversation

@atomantic

@atomantic atomantic commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Players previously navigated by raw sector numbers. This PR gives every sector a human-readable name, flows it through the server, agents, and client, and lets tool calls accept either an ID or a name.

Naming scheme

5000 unique names, deterministic (seed=42), drawn from 200 adjectives × 200 nouns with sci-fi flavor (Quantum, Pulsar, Orion, Kepler, Plasma, Hyperion, Aether, Nexus, etc.). ~65% are two-word, ~35% are three-word. Max token reuse is 61 out of 5000 names; 399 of 400 tokens appear at least once.

Two-word samples: Flux Gorge, Lost Aether, Infinite Network, Nebula Ingress, Deep Kessel, Hex Causeway, Iron Magnet, Echo Reach

Three-word samples: Photon Midnight Passage, Sapphire Sleeping Rampart, Rusted Royal Remnant, Jade Barren Path, Lazuli Drifting Sound, Searing Oblivion Nexus, Liminal High Ravine

Megaport grand names (applied at load time from meta.mega_port_sectors, cycled if a universe has more megaports than entries): Grand Nexus Station, Federation Prime Hub, Galactic Gateway, Sovereign Command, Imperium Bastion, Core Meridian

Changes

  • universe_structure gains a name column; idx_universe_structure_name_lower indexes LOWER(name) for case-insensitive resolution
  • scripts/generate_sector_names.py seeds the 5000 unique names; generator is universe-agnostic so megaport IDs can differ per environment
  • load_universe_to_supabase.py applies megaport grand names at load time based on universe.meta.mega_port_sectors
  • SectorSnapshot, LocalMapSector, MapSectorNode carry name to the client; new formatSectorLabel util used in banner, sector panel, and map-node popover
  • New resolveSectorParam(pg, payload, key) replaces per-caller sector-name resolution boilerplate in move, plot_course, path_with_region, local_map_region, combat_action
  • Agent tool schemas accept ["integer", "string"] for sector params; voice/task prompts teach the "ID - Name" display format
  • Fixes pre-existing pgClient connection leaks in plot_course, path_with_region, local_map_region, combat_action by adding finally { pgClient.release(); } symmetric to the move handler pattern

@jptaylor

Copy link
Copy Markdown
Collaborator

@atomantic really nice. Fun to think about how we could support sector naming in the future, once your corporation has enough interests in a space.

Will give this a good test before merging (thinking about critical-path database queries where index speed matters) but excited to do it.

We'll also need to think of a way of updating current world data, so we can migrate without a reset. Should be simple enough!

Every sector now has a human-readable name (e.g. "Iron Gate", "Photon
Midnight Passage"). Names flow from the DB through edge functions to
the client banner, sector panel, and map-node popover. Tool calls
accept either a sector number or name; the resolver is consolidated
into resolveSectorParam.

- universe_structure gains a `name` column (migration + LOWER(name) index)
- scripts/generate_sector_names.py seeds 5000 unique names (seed=42,
  200 adjectives × 200 nouns, ~65% two-word, ~35% three-word)
- load_universe_to_supabase.py applies megaport grand names at load
  time based on universe.meta.mega_port_sectors (so megaport IDs can
  differ per environment)
- SectorSnapshot / LocalMapSector / MapSectorNode carry name through
  to the client; new formatSectorLabel util used in 3 UI surfaces
- MOVE, PLOT_COURSE, PATH_WITH_REGION, LOCAL_MAP_REGION, and
  COMBAT_ACTION accept sector names in addition to IDs
- Voice/task agent prompts teach "ID - Name" display format
- Fixes pre-existing pgClient connection leaks in plot_course,
  path_with_region, local_map_region, combat_action
@atomantic

Copy link
Copy Markdown
Contributor Author

whoops, accidentally bundled another idea into this PR. will split into two.

@atomantic atomantic changed the title Add sector names and corp-member ship map glows Add human-readable sector names Apr 19, 2026
@atomantic

Copy link
Copy Markdown
Contributor Author

I'm not particular about these names just thought it was a fun stab so feel free to go with a different set when you review this idea or implement it a different way :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants