Spaces:
Sleeping
Sleeping
Commit History
-
feat: move agent loop server-side, multi-viewer SSE livestream
Previously each browser tab ran its own SinglePlayerGame, AgentMemory, and inference loop — two tabs meant two independent worlds with two independent agents. Now the agent runs once on a Bun server that owns the world state and broadcasts every turn to all connected viewers via Server-Sent Events. Multiple tabs see the same agent acting on the same world in lockstep. Files: - server.ts (new): Bun HTTP server. Lifts connect/callModel/callSummarizer/ agent loop verbatim from the previous client-side script. After each turn builds a JSON state snapshot {viewport, inventory, stats, actions, status, thinking, summary, debug} and broadcasts to a Set of SSE controllers. New connections get an immediate snapshot so they don't wait a full turn. All round-1+round-2 mechanics carry over: structured tool_calls, cache_prompt:true, enable_thinking:false, pair-aware trim, popLast on inference failure, n_ctx-derived budgets, LLM-summarization compaction. - index.html: stripped from a 3…f7df30f
-
chore: aggressive cleanup — keep only the browser harness
The repo started as a research project with a multi-agent REST API, ONNX-based eval scripts, a CLI agent client, and several test suites. The shipped browser harness now hits a remote llama.cpp endpoint directly and has no need for any of that infrastructure. Drop it. Removed: - server.ts, gameState.ts, aiService.ts (legacy multi-agent REST API) - middleware/, types.ts, agent-client.ts, replay.html - API.md, openapi.yaml (REST API docs) - __tests__/ entire directory: 10 ai-eval scripts (~1500 LOC) + their result JSONs, plus the e2e/integration/unit test suites for the multi-agent server - Dockerfile, package.json, bun.lockb (no runtime deps anymore) Slimmed: - engine.js: 481 → 175 LOC. Drops the prompt-building helpers (SYS_PROMPT, FEW_SHOT, buildUserPrompt, buildMessages, MCQ_*, getAdjacencyFromViewport, parseAction, isValidAction), the pixel-buffer renderers (renderMapToRGBA, renderAnnotatedMapToRGBA, EMOJI_COLOURS), and unexports the world-gen internals. Public surface…49df1c0 -
chore: squash pre-2026-05-06 history
Initial mini-world snapshot at c0da002 — collapses 25 commits of research and feature work into a single root: - single-player game engine (Perlin world gen, viewport rendering, image rendering for vision evals) - in-browser ONNX agent with pick_first strategy and 5 alternative prompting strategies for evals - multi-agent REST API server with auth, rate limiting, and SSE - 10 eval scripts comparing prompt strategies, tool calling, vision, and context compaction at 0.8B/2B/4B - agent-client.ts CLI for autonomous play against the API - replay viewer for recorded eval sessions The squashed history is preserved in reflog locally; for the public record this is the starting point that the remote-only harness + compaction work builds on.e208045