1
0
Fork 0
polaris-task-force/src/lib/npc-dialogue
Z8MB1E 1110315214 feat(npc-dialogue): testing-only conversations for superusers
An npc-dialogues document can be marked testing, which keeps it off the player
site while letting the superuser tier walk it live. Enforced in one module,
lib/npc-dialogue/visibility.ts: the offer skips the conversation, its new-message
badge never appears, and every node lookup re-checks visibility.

Those lookups now name their conversation. The client sends dialogue.id and the
server verifies it belongs to the NPC and is visible to the reader, so a player
cannot read a testing conversation's nodes by guessing an id. The old lookup
took limit: 1 on the NPC's conversations with no ordering, which with a testing
conversation present could read the wrong document and silently skip an effect.

Tester tier is system:admin-access, not every author: an officer who can edit
conversations still cannot reach a testing one on the player site. Only an
explicit true hides a conversation, so rows written before the flag stay live.
2026-11-24 18:29:20 -05:00
..
AGENTS.md feat(npc-dialogue): testing-only conversations for superusers 2026-11-24 18:29:20 -05:00
attachments.ts feat(npc-dialogue): voice clips on dialogue lines 2026-11-24 17:59:36 -05:00
dialogue.ts feat(npc-dialogue): voice clips on dialogue lines 2026-11-24 17:59:36 -05:00
DialogueText.tsx feat(npc-dialogue): type conversation lines out, with unit and player control 2026-11-24 17:50:11 -05:00
flags.ts feat(npc-dialogue): add defined checks to flag conditions 2026-11-24 17:34:40 -05:00
fragmentInsert.ts docs(npc-dialogue): sync the contract with the start-node exception 2026-11-24 15:05:19 -05:00
generation.ts fix(npc-dialogue): keep the conversation reachable when a branch attaches 2026-11-24 14:47:08 -05:00
generationPrompt.ts fix(npc-dialogue): keep the conversation reachable when a branch attaches 2026-11-24 14:47:08 -05:00
generationSchema.ts feat(npc-dialogue): add defined checks to flag conditions 2026-11-24 17:34:40 -05:00
generationSettings.ts feat(npc-dialogue): type conversation lines out, with unit and player control 2026-11-24 17:50:11 -05:00
interpolate.ts feat(npc-dialogue): voice clips on dialogue lines 2026-11-24 17:59:36 -05:00
normalize.ts fix(ai): bound the structured path too, and stop the dialog overpromising 2026-11-24 15:00:30 -05:00
presentation.ts feat(npc-dialogue): type conversation lines out, with unit and player control 2026-11-24 17:50:11 -05:00
reorder.ts feat(npc-dialogue): reorder choices in the dialogue editor 2026-10-07 14:01:00 -04:00
selection.ts feat(npc-dialogue): condition groups and ternary text tokens 2026-10-14 16:21:16 -04:00
states.ts feat(npc-dialogue): back NEW badges with server-side read markers 2026-10-14 15:35:47 -04:00
visibility.ts feat(npc-dialogue): testing-only conversations for superusers 2026-11-24 18:29:20 -05:00