Commit Graph
18 Commits
Author SHA1 Message Date
gitprovandClaude Opus 4.8 5754fa1f55 Auth slice 3: dev-only fallback + playthrough owner checks
resolveUserId now returns null for an anonymous request in production (no
shared identity); the fixed dev user only applies locally. Player-scoped
routes (create/advance/goto, achievements, reach, notebook, phone, dial)
require a user and verify ownership via ownsPlaythrough — a player can no
longer read or act on another's playthrough. Verified: dev anon still plays;
cross-user access returns 403/404.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 22:39:52 +02:00
gitprovandClaude Opus 4.8 e69558e0e7 Field notebook: capture NPC lines, tear pages onto the board
A dialogue line gains a "✎ Note this" capture that saves it to a
per-playthrough notebook (migration 035 + notebook endpoints). The inventory
notebook lists captured pages in a handwriting font (Google "Reenie Beanie")
and "✂ Tear to board" drops a page onto the current board as a note exhibit
(reusing addNote), then removes the page. Board notes render handwritten too.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 20:11:15 +02:00
gitprovandClaude Opus 4.8 56bf2f97d0 Phone runtime (2a): connected directory + dial resolution
GET /playthroughs/:id/phone returns the directory of the phone node the
current node is wired to; POST /playthroughs/:id/dial resolves a number to
connect (advance to the wired dialogue), voicemail (known contact, no line
here), or not-in-service. Barricelli's note-board is wired to the phone node
and Glitch Hunter's decline returns to it. Frontend (inventory on the board)
is 2b.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 19:38:46 +02:00
gitprovandClaude Opus 4.8 cbe107e0b3 Utterance award + requirement, and branching dialogue seeding
A dialogue line can award an achievement when reached (granted server-side,
validated against the player's current node so it can't be forged) and an
option can require an achievement to be offered (filtered out of the resolved
tree otherwise). authorGraph gains a branching form (utterance key/parent/
terminal) so option trees — not just linear lines — can be seeded. This is
gaps 1 & 2 for the Barricelli Dobby/Glitch-Hunter dialogues; phone dialing
stays stubbed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 18:34:52 +02:00
gitprovandClaude Opus 4.8 9c496bfe19 Seed phone + merit nodes (and NPC contacts) via the graph seeder
authorGraph now seeds merit nodes' awards_flag and phone-node terminals
bound to an NPC (npc key -> npc_id, the callee dialed); authorMystery seeds
cast phone_number/email. Importer types updated so mystery.json can carry
these, matching how Glass Harbour is seeded — the Barricelli graph can now
be authored as data.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 17:49:09 +02:00
gitprov af0ffe055e Merge main into Scene 7 evidence workflow 2026-08-22 17:23:47 +02:00
gitprov cea0d56cb9 Add Scene 7 claim report workflow 2026-08-22 17:02:30 +02:00
gitprovandClaude Opus 4.8 a925d61b7e Phone directory foundation: NPC contacts + phone node + terminal→NPC
NPCs gain phone_number and email (the phone book). A new 'phone' node type
holds a directory whose terminals each bind to an NPC via npc_id (the callee
reached by dialing that number) and wire to the dialogue that plays on
connect. Migration 029 adds the columns/type; repositories and admin API
thread contacts and the per-terminal NPC binding. Authoring foundation only
— the dial runtime and tools sidebar come next.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 16:55:45 +02:00
gitprovandClaude Opus 4.8 778c6d972f Add merit node type (Scene 8 ceremony + achievement award)
A merit node awards a configured achievement (awards_flag) to the player
the moment the playthrough arrives on it, with node provenance, then
presents a ceremony. Migration 028 extends node_type + the component_key
CHECK and adds awards_flag; the runtime grants the flag in advance/goto/
new-game write paths; MeritHost renders the ceremony (a component_key can
supply a bespoke one, e.g. a 3D model). Verified: teleport to a merit node
auto-grants its achievement.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 16:11:53 +02:00
gitprov a7f99a2a39 Implement Scene 7 evidence goal flow 2026-08-22 16:02:42 +02:00
gitprovandClaude Opus 4.8 5c514562a2 Splash case picker + playable-mystery list
GET /api/mysteries returns only mysteries with an entrypoint (empties are
filtered out), and the splash now lists them as case files with a per-case
BEGIN / RESUME action instead of a single hardcoded New Game.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-22 15:51:32 +02:00
gitprov 70c7506f1d Adding better routing 2026-08-22 15:12:56 +02:00
gitprov 94ccbfd1b9 Adding migrations and lot of work. Starting work on the demo scope 2026-08-22 14:53:23 +02:00
gitprovandClaude Opus 4.8 1b3ff1e78c Add per-node scene music volume control
Author a music track and volume (0-100%) per story node; the runtime
scales it to 0-1 and applies it without restarting the track when only
the level changes. Adds migration 024, threads music_volume through the
repository/runtime, and gives the node inspector a volume slider.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 21:02:16 +02:00
gitprovandClaude Opus 4.8 dafc70b047 Sound: per-node scene music + synthesized SFX (zero-dep)
- migration 023: story_nodes.music_asset_id (references the asset store).
- src/audio.ts: a tiny audio manager — one looping scene-music track (fade,
  dedup, gesture-primed autoplay) and synthesized one-shot SFX; global mute.
- Runtime: RuntimeNode.musicUrl; music follows the current node (null inherits,
  a finished playthrough stops). SFX blips on dialogue advance/choice (not in the
  editor preview). Floating mute toggle during play.
- Graph inspector: a "Scene music" picker sourced from uploaded audio assets.

No external library (we did not adopt react-winamp — it is a React 16 CRA app,
not an installable package). Bundle grew ~2 KB.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 19:51:44 +02:00
gitprovandClaude Opus 4.8 0b1e5e7fc7 Live dialogue preview in the editors (reuses the real DialoguePlayer)
- DialoguePlayer gains an `inline` mode (fills its container, no window key
  capture) and a `startId` to jump the walk to a given utterance.
- New DialoguePreview: a scaled-down mini player that fetches the resolved tree
  from GET /api/admin/story-nodes/:id/dialogue (same resolver as playback).
- Mystery graph: preview appears next to a selected dialogue node.
- Utterance editor: docked preview that jumps to the clicked/selected utterance
  and refreshes after each edit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 19:24:03 +02:00
gitprovandClaude Opus 4.8 7fe8fadd8a Admin: create/delete mysteries, asset library, cutscene component picker
- Mysteries tab: "+ New" (slug + title) and per-row delete; opens the graph editor.
- Assets tab: upload images/audio/PDFs to the shared osint.assets store, grid with
  thumbnails/icons, copy id/url, delete (blocked with 409 when the asset is in use).
- Cutscene component_key is now a datalist of registered keys with a
  "not registered" warning, instead of free text.

Backend: DELETE /api/admin/mysteries/:id and POST/GET/DELETE /api/admin/assets
(reusing the deduplicated, MinIO-backed asset store).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 19:05:29 +02:00
gitprovandClaude Opus 4.8 ddb3a386f0 Add story-graph narrative system (campaigns, editors, runtime)
Introduce the narrative layer as a directed story-flow graph: an authored
campaign a player walks node by node, replacing the interim slot/chapter model.

Schema (migrations 015-021):
- mysteries, global NPC templates + named poses, per-user playthroughs
- story_nodes, terminals, utterances (the flow graph and dialogue trees)
- clean cutover: retire slot cutscenes/chapters/seen_dialogue

Runtime:
- New Game creates a playthrough bound to the JWT identity (dev test-user fallback)
- advance() walks the graph cutscene -> dialogue -> level -> ..., auto-skipping gates
- branching dialogue: player choices route out through node terminals

Admin authoring:
- NPC editor: upload named poses to the gupi MinIO bucket
- mystery graph editor: vertical node canvas, wiring, entrypoint, delete-by-click
- dialogue crafter: utterance tree, Tab to add child, 1/2 speaker, undo

Content authored via the manifest importer / admin panel and seeded for Glass
Harbour. MinIO added to the dev stack; dev container runs in development mode.

Also includes a folder-widget simplification (removes open/close) and a
resolveUserId auth helper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-18 15:37:46 +02:00