Repository navigation
Land ravenstack: finish PR72 merge, Vercel deploy config, local-only text policy - #75
Open
jasandroidx wants to merge 54 commits into
Open
jasandroidx wants to merge 54 commits into
jasandroidx wants to merge 54 commits into
Conversation
Ravenstack Keep Phase 1: MCP server, painted hall UI, and agent gates
…d a live PGLite build fix Commits the accumulated working-tree changes for this branch (MCP server additions, ui-v2 gallery/keep-lib updates, docs, skills, farmer, schemas, CI workflow, misc repo housekeeping) plus fixes made while getting the live Keep app fully working end-to-end: - Fix Ollama endpoint box-local misconfiguration (was bound to the wrong loopback address; see AGENTS.md for the correct host on this box). - Point the FastMCP bridge at the already-running reclaw-platform-mcp service instead of leaving it unconfigured. - Add scripts/copy-pglite-assets.mjs and wire it into build/build:box: Nitro's server bundle was dropping PGLite's data/wasm files next to the bundled JS, so every DB-touching request threw ENOENT in a loop. Verified against a clean rebuild. Verified live via Playwright against the running ravenstack-keep-ui service: FastMCP badge connects, player movement + NPC dialogue work, and a live Ollama-generated reply came back grounded in the real room roster. No console/network errors on load or interaction. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… first - Remove the HALL_LIGHTS pointlight sprites in the Great Hall scene. They rendered as flat, hard-edged color blobs overlapping the painted background instead of a soft torch glow — visually broken, not atmospheric. this.hallLights stays permanently empty; the existing flicker-update loop and pulseTorch() already no-op safely on an empty array, so nothing else needed changing. - diagnoseMechanicWorkbench (Valerie's Mechanic workbench) called Gemini directly, skipping the local-first Ollama path every other agent in the Keep uses. Now tries Ollama first and only falls through to Gemini (kept for its live googleSearch grounding, which Ollama can't do here) when the local model fails. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…l-calling loop Operator-approved 2026-09-22 (see catalog.ts): Corvid moves from draft to approved, gaining real external research tools his spec already described but never had wired up. - src/lib/keep/corvid-tools.ts (new): keyless web_search (DuckDuckGo HTML + Wikipedia opensearch, mirrors skills/lib/free_sources.py's proven approach rather than reinventing a weaker one) and browser_render (read-only page text via a standalone Playwright subprocess). - scripts/render-page.mjs (new): the browser_render backend. Deliberately a subprocess, not an import from src/ — keeps Playwright and its browser binary out of the Nitro server bundle entirely (the same class of bundler risk that broke PGLite). `browser-use` was tried first and dropped: it's a CDP *client* needing an already-running Chrome with a debug port, which nothing on this box provides; standing up a persistent Chrome+CDP service was a bigger, separate infra call than "wire up a tool". - src/lib/keep/ai.ts: talkCorvid() — a real Ollama tool-calling loop (qwen3:4b; the speced phi4-mini hint tested unreliable at actually invoking tools, verified live). Wires web_search, browser_render, query_knowledge, and oracle_verify as callable tools, loops on tool_calls up to 4 turns, and appends a Sources: line to the final reply. Every other persona's path (complete(): Ollama-first, Gemini fallback) is unchanged. - src/lib/keep/fastmcp.ts: added query_knowledge to the typed tool allowlist (it was already referenced in corvid's spec but not actually callable). - catalog.ts: corvid status draft -> approved, tools/gates updated to match what's now real, localHint corrected to qwen3:4b with the reason recorded. Also: public/hall/painted/talk-valerie.jpg replaced with the operator- supplied portrait (the placeholder looked wrong in her dialogue panel). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VGSarcwFyzfmiT46Cugans
…acle's talk scene - public/hall/portraits/valerie.jpg: replaced the low-res sprite crop (looked blocky/pixelated upscaled into the 112px dialogue portrait box) with the same operator-supplied portrait already used for her talk backdrop. - public/hall/painted/talk-oracle.webp (new) + world.ts: Oracle gets his own dedicated talk-scene backdrop and portrait, an operator-supplied green-eye-in-chains piece matching his existing in-scene palette (#39ff14). He was previously falling back to the shared generic talk-scene image (the one depicting Raziel) like every agent except Valerie — same root cause the operator flagged this session, now fixed for a second agent via the same talkScene mechanism Valerie already proved out. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VGSarcwFyzfmiT46Cugans
…as broken Applied the same fix from origin/main to finish-pr72 so PR #73 can deploy. 1. firebase was declared only in the root package.json, never in ui-v2's own. Vercel builds ui-v2 as its own project root, so firebase/app could not be resolved during the Vercel build. 2. ui-v2/package.json pinned @google/genai to ^0.2.0, whose GenerateContentConfig shape lacks the imageConfig field that ai.ts already uses. Bumped to ^2.18.0. Verified: npm install clean, typecheck passes, lint passes, ui-v2 vite build (Vercel preset) succeeds with firebase__auth.mjs and @google/genai.mjs present. Co-Authored-By: Claude Code <noreply@anthropic.com>
Keeps the npm lockfile aligned with ui-v2/package.json so CI's npm ci installs the same versions that now typecheck and build clean. Co-Authored-By: Claude Code <noreply@anthropic.com>
… bundle Vercel build was succeeding then failing with: Error: No Output Directory named "dist" found after the Build completed. Add ui-v2/vercel.json with framework=tanstack-start and outputDirectory=.vercel/output so Vercel picks up the Nitro Vercel preset output instead of defaulting to dist. Also update copy-pglite-assets.mjs to copy pglite.wasm / pglite.data / initdb.wasm into .vercel/output/functions/__server.func/_libs, which is where the bundled PGLite JS lands on Vercel. Previously it only copied to the local node-server preset path (.output/server/_libs) and silently skipped on Vercel. Verified: clean rm -rf .output .vercel/output && npm run build produces .vercel/output with the three PGLite assets next to electric-sql__pglite.mjs. Co-Authored-By: Claude Code <noreply@anthropic.com>
The Vercel project has rootDirectory=null, so it builds from the repository root. The previous ui-v2/vercel.json was ignored because Vercel reads vercel.json from the project root, not from a subdirectory. Move it to the repo root and point outputDirectory at ui-v2/.vercel/output where Nitro's Vercel preset writes the build. Co-Authored-By: Claude Code <noreply@anthropic.com>
Resolve ai.ts (keep Corvid research loop from finish-pr72 + local-only text policy from ravenstack) and server.ts (keep box-adapter/mcp/router imports + getRoutingStatus). Harden root vercel.json with pinned npm install/build commands. Verified: tsc clean, full vercel-preset build + migrate-skip + PGLite asset copy all pass.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…osis (#87) Read latest.txt from KEEP_DROPS_DIR (capped at 12KB tail, preserving header) and append to Valerie's Mechanic Workbench diagnostic context. Display drop badge 'Reading drop: <filename> @ <mtime>' in UI. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
…aims Backend: - Add read-only probe scripts (sitrep, gateway, tailnet, ollama, keep, disk-mem, crashes) plus the /usr/local/bin/probe runner, committed under armory/ with a README documenting the box-side deploy step (this checkout has no filesystem access to /root/ravenstack-armory). - Add ui-v2/src/lib/keep/probes.ts: execFile-only runner, allowlist = the probes directory itself (KEEP_PROBES_DIR / KEEP_PROBE_BIN env-configurable per the box-path convention in drops.ts), 45s timeout, never a shell string. Wired as the runProbe server fn (auth-protected) plus listProbeNames/getMechanicConfig reads. - diagnoseMechanicWorkbench now runs on KEEP_MECHANIC_MODEL (default qwen3-coder:30b) instead of the shared talk-plane model; every other caller of ai.ts's complete() stays on KEEP_TALK_MODEL. UI (mechanic-workbench.tsx): - Removed every fake status claim: the "Live Monitoring Active / Google Search Grounding: ENABLED" boot banner, "OPENCLAW WORKBENCH v2026.7", "SYSTEM // MONITORED", "WORKSHOP ONLINE // SEARCH GROUNDED", the "Google Search Grounded" subtitle, "scrying search docs...", the "Search docs.openclaw.ai" chip, and the Chevy/Physical Shop chip + PHYS line. Boot banner and header subtitle now show the real mechanic model, FastMCP bridge reachability, and latest Raven Drop, each falling back to "—" when its own read fails. - Shell prompt replaced with "Ask Valerie ›". - New Probe Rack: one button per probe; clicking plays the relay-snap, streams output as [probe:<name>], auto-diagnoses with Valerie, then plays the ready chirp. "Check Control UI" -> gateway, "Probe FastMCP" -> sitrep, "Check Tailscale Funnel" -> tailnet. - Telemetry card now shows the latest sitrep probe's real verdict/detail + "PROBED HH:MM" instead of hardcoded host/gateway/model text. - Portrait swapped from the inline SVG sprite to VALERIE_PORTRAIT (/hall/portraits/valerie.jpg), larger frame, object-cover object-top. - Live Gateway Logs panel (fastmcp-gateway-streamer.tsx): shows last-polled time, surfaces empty/error reasons, stops polling after 3 consecutive errors, and adds a Retry button. - All existing sound effects (key tick, relay snap, diagnostic ready, copy chirp) kept and reused for the new probe flow. typecheck / test / build:box all pass.
The status pill under Valerie's portrait was reading getRoutingStatus()'s mcp.reachable, which goes through mcp.ts (MCP_BASE_URL/KEEP_MCP_URL, defaults to 127.0.0.1:8100 -- unreachable from a hosted deploy). The header's FastMCPStatusBadge and everything else on this page go through fastmcp.ts's executeFastMCPTool (FASTMCP_FUNNEL_URL/FASTMCP_INTERNAL_URL). That mismatch is exactly what showed the header connected while the pill under the portrait said unreachable. Switched to getStackHealth(), which already uses the same fastmcp.ts path and needs no auth.
signIn() throws on failure (broker rejects the callback origin, popup blocked, etc.), and the login button's onClick never caught it -- an unhandled promise rejection that reads as "the button does nothing" with no feedback at all. Now shown as a toast. Most likely trigger: the auth broker only recognizes a fixed set of redirect origins, so sign-in fails this way on any ad-hoc preview URL (e.g. a Vercel branch preview) that isn't on that allowlist -- this doesn't fix that allowlist gap, it just makes the failure visible instead of silent.
…aims (#88) Mechanic v3: real probe rack, mechanic model config, strip fake UI claims
Surface sign-in failures instead of failing silently
/usr/local/bin/probe was doing `bash "$script" | raven-drop "probe-<name>"` -- piping the probe script's already-rendered plain-text output INTO raven-drop. But raven-drop (per its own skill docs) takes a heredoc of commands on stdin and runs them itself; it does not just log stdin verbatim. Feeding it rendered output made it try to execute every line of that output as shell, which failed line by line (confirmed live via the run_probe MCP tool on the actual box) and buried the script's real SUMMARY line under raven-drop's own commands/output/footer wrapper. Now raven-drop gets the script's SOURCE (to run and archive to the vault, in the background, best-effort) and the script is separately exec'd directly so the wrapper's own stdout/exit code are exactly the script's -- nothing else appended after the SUMMARY line.
…ignette contain, portrait-first dialogue thumbs, /oracle nav, keyboard-capture fix (#92) - keep-hall boot hardens to exactly one Phaser.Game per mount and recenters the camera after the final resize settles. - scene: small pixel name tags above character NPCs; clicking a far NPC walks the player to a walkable approach tile then opens dialogue; a wedged dest (prop/wall between click and player) clears after ~500ms so the player never grinds a boundary; boot camera snap via centerCameraOnPlayer(); new setKeyboardEnabled() switches Phaser keyboard while modals own focus. - talk-sheet: talk scenes render object-contain over a blurred dimmed copy; the dialogue thumbnail prefers painted portraits, else the first actor-sheet sprite frame (CSS 400% crop on the 4x4 grids — never the raw grid), else a monogram. - Oracle button now navigates to /oracle instead of a scene manifestation. - Pause effect calls scene.setKeyboardEnabled (port of keep PR #85's keyboard capture fix; its .ts import rewrites and pnpm-lock are intentionally excluded). No serverFn polling change: the hall polls (getPendingGates 30s, getHallState 90s) already pause on document.hidden; the 2s WebRTC ping is dormant and the 4s Mechanic streamer is out of scope.
This change optimizes the high-frequency game loop function `isFacingTarget` in `ui-v2/src/lib/hall/locomotion.ts` by replacing `Math.sqrt` dot product calculations with squared distance comparisons. Duplicate PR Clusters Assessment: Cluster 1 (Bolt Math.sqrt / isFacingTarget - PRs #77, #94, #96, #100): - Surviving fix: This PR (`bolt-is-facing-target-math-sqrt`). - Close PRs #77, #94, #96, #100 as duplicates because they all propose the same `isFacingTarget` `Math.sqrt` optimization, whereas this PR provides the cleanest minimal diff against `ravenstack`. Cluster 2 (Palette ARIA/focus - PRs #76, #78, #93, #95, #97, #98, #99): - No changes touched in this task as instructed. - Close PRs #76, #78, #93, #95, #97, #98, #99 as duplicates when consolidating the Palette ARIA/focus cluster in a separate targeted PR. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
…put (#103) Fix probe wrapper: raven-drop runs commands, it doesn't log piped output
… sprite, FastMCP session handshake
…venlord sprite, FastMCP session handshake, walk screenshots
- PortalTrigger + debounced fadeOut(250) doors, exit-required guard so a spawn inside a return door does not instantly retrigger, 800ms grace. - Hall stairs-to-yard door -> HallTestCloneScene, return door -> Hall. Both directions verified live (scene-key, spawn, no retrigger loop). - RoomScene: lean reusable room scene (map, player, walk rects, solid circles, furniture markers, E-info, portal doors, debug hooks). - Recon room: painted 1600x1600 surveillance room (radar pedestal, 3 scrying mirrors, log shelves, spyglass perch), door in Hall library (300,200) -> Recon spawn (800,1400), return door -> Hall library. Radar labelled live (:8446 backend ok 2026-10-25); mirrors/shelves/ spyglass labelled FIXTURE, no faked live state. - Recon door walk-in/out NOT yet proven live (headless 1-3fps rig + hook lag); room is started, not claimed playable.
…e launchers, Valerie REA panel, delete Sentinel/Stack FreeLLMAPI-first route in router/ai with Ollama fallback; MCP port corrected 8100->8110. Four new walkable rooms reuse RoomScene; each has one animated hero launcher (radar sweep, desk unfurl, terminal flicker, rune ring, beacon sweep) opening its Raven Page in a new tab. Mechanic page is Valerie mechanic + REA handler only (health board removed). Sentinel and Stack routes + nav entries deleted; Sentinel-only workbench deleted with them. Phaser: oracleChains reset + anims.exists guards, drawn right-row walk kept.
One Teleport screen (HUD button + T key): instant travel to Great Hall/Recon/Search/Sploit/Citadel/Tower, 3 RESERVED slots greyed and locked. Settings on the same screen: sound, teleport animation, walk speed (slow/normal/fast via window slot the scenes read), camera follow — all persisted in localStorage. Teleport animation: fade + particle burst on exit/entry + camera pan to the room hero item (follow on only); sound is a synthesized WebAudio whoosh + chime, silent when sound is off. Outfit section on the same screen lists the 4 real registry skins with previews, no stats, no inventory; rooms now honor the saved skin across reloads like the Hall already did.
…Citadel portal swirl
docs: pitch README for the Keep
…schema The Keep's room vocabulary drifts across five files and migrations have been edited after shipping, so agents need written contracts before touching either. Adds two repo skills (world model, migrations + checklist), the JSON schema for keep-world.json, .mcp.json for context7/playwright/github/obsidian, and the tooling notes that say where each one is expected to run.
room-scene.ts imports Phaser at module scope, so a static import in keep-hall turned the whole route client-rendered. Import it inside boot() instead and gate the debug-frame global behind import.meta.env.DEV. The HUD and shell header clusters now wrap and truncate, which removes the 390px horizontal overflow without hiding any control.
decideGate, callFastMCP and commissionPortrait had no authMiddleware, so an anonymous POST could work the war table, read the bridge, and write portraits to a literal 'dev-user'. approveKeepGate also injected confirm: true itself, which made the bridge's confirm requirement decorative. The client now only states that a human confirmed; the server composes confirm: true after that check and discards any confirm arriving in args. The read passthrough is restricted to an explicit read-only allowlist, so gate tools cannot be reached through it. Portrait rows are keyed to the verified user, and a signed-out badge says so instead of claiming the bridge is down.
A missing services field parsed as "ok", a missing network field as "CONNECTED", a missing queue as "idle", and a missing count as 0 — so every way of hearing nothing was rendered as good news. Those fallbacks are now "unknown"/null, and a count is only derived when the payload really carries one. The paper fixture was a stale box snapshot with two named agents mid-shift, green services and a queue cursor. It is now a timestamp and a note: the box was not read, and it says so. The PulseBadge and the Hall HUD no longer print an active count under a paper source.
The room list lived in five places that disagreed (schema enum, catalog.ROOMS, world.ZONES, the pulse fixture, AGENTS.md prose), so a room could be live in one and invisible in another. keep-world.json now holds rooms, map-only places, unplaced capabilities and NPCs in one file, and world.test.ts pins ROOMS, ZONES and HALL_NPCS to it — any edit that skips the model fails in CI instead of drifting for months. Clawforge's room id is gone: no alchemy-lab in ROOM_TO_SPEC, no Spec claiming it, no zone. The Spec survives as retired and files under the Great Hall, since the Forge pages no longer exist to give the anvil a floor.
Add `npm run world:map`, which generates docs/keep/map.svg from WALK/SOLID/ ZONES/HALL_NPCS, the door list and walkable() itself: floors you can stand on, props you cannot, room zones, doors and their targets, who stands where and who wanders, the spawn, and a findings list. A test fails if the committed SVG is stale, so the blueprint cannot describe a Keep that no longer exists. Building it found four bugs the data was hiding. zoneAt returns the first rect containing the point, so gallery-arch (inside great-hall) and quarantine (inside yard) could never win: the doorway reported the hall, and scene.ts's cell-entry event never fired at all. Nested places now come first in zoneOrder. The Hall's stairs to the yard were a test door into a clone scene, so the yard could not be walked to - door and clone removed. The SPLOIT pad sat under the Cell and its NPC, so walking up to the Cell teleported you - moved to the free corner of the yard. Valerie's leash and the door list moved out of the component and into data the map can read. Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
The cell was a painted place with an NPC and a walk-in event that opened the newest unresolved claim. It is gone: no zone, no warden, no cell light, no enter-cell event, no warden persona or barks. The claim records themselves are untouched — quarantine_claims and its server functions still record what a model asserted and could not evidence, they are just no longer a room you walk into. Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
The point lights were pulled because a PointLight over the painting has no normal map and drew hard-edged colour discs. A radial-gradient texture on BlendModes.ADD only adds colour and fades out, so the same HALL_LIGHTS entries now read as torchlight; they sit above the time-of-day wash so the fires stay warm at night, and pulseTorch() drives a real brightness boost instead of writing a field nothing read. The map draws each light's radius and no longer claims 0 mounted. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Second walkable area through the courtyard gate: Fortress Interior on keep-map-v4.jpg (kitchen, bedroom, armory, library, storeroom, chapel, throne hall, bottom gate corridor). Lyra the Keep Cook lives in the kitchen with her talk panel; Valerie lines/persona and the shared talk-chain + interactables system come along. Previously only on the server, never committed.
Remove the throne/sit code that belonged to a later map, match the war-table collision to the painted tabletop, and probe NPC walkers at their feet so they stop standing on furniture. Also wires the Talk model to the box Ollama URL. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Keep both sides: the courtyard keeps the data-driven portal model, the painted-door rule and the corrected war-table collision, while the interior arrives with Lyra, the kitchen, the throne hall and the select E-gates. Reconstruct clock.ts and juice.ts, which the pushed commit imports but does not contain, and sync Valerie's greeting into keep-world.json. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Gate-only rooms are not in the teleport menu, so the zone label fell back to
the raw scene key ("FortressInterior"). Show "Fortress Interior" instead.
🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
…pads Five auto-fire floor pads in the yard teleported the player on a single step, on coordinates where the painting has no doorway, so crossing the yard felt like walking into a trap. They are gone; the E-gate in front of the courtyard portcullis is now the only way into the interior. The interior loads its own map key per scene, which stops the 48x48 placeholder being stretched over keep-map-v4, and gains a clock-driven dusk wash, room zones for the HUD, Lyra's patrol stops, a seatable throne, and CC0 fire and smoke sprites with their provenance in public/CREDITS.json. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
Composes the /hall/rooms plates from the reodesuxz castle-interior tileset. Deliberately not wired into an npm script: the tileset itself is not in the repo, so the script takes a --tiles path and only the composed plate ships. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finishes the stuck finish-pr72 merge and makes the tree Vercel-deployable.