Skip to content

feat(keep): local Ollama NPC dialogue + neutral ambient events (curated #62) - #67

Merged
jasandroidx merged 3 commits into
ravenstackfrom
chore/land-ollama-dialogue
Sep 21, 2026
Merged

jasandroidx merged 3 commits into
ravenstackfrom
chore/land-ollama-dialogue

Conversation

@jasandroidx

Copy link
Copy Markdown
Owner

Curated landing of #62 — see closing comment there for full accounting.

  • Backend verbatim: mcp/src/ollama_service.py, /api/dialogue + /api/ambient-event routes (ported additive hunks onto current http_api, not the stale base), test_ollama converted to TestCase style so unittest collects it. mcp suite 13/13.
  • Frontend rewritten: ollama.ts is server fns (createServerFn) with KEEP_HTTP_URL loopback base — no browser URL, no CORS.
  • Ambient lines category weather (never torchlight) so Owl doesn't pulse hall lights.
  • pickBarkAsync/pickHeraldLineAsync fall back to rule pools when Ollama/API unreachable.

Rejected from original: hardcoded :8120 fetch base, browser-side ollama client, torchlight-tagged lines, bun test syntax, @google/genai, /gallery regression.
Zero new typecheck errors vs base; build:box green.

Land the backend half of PR #62 verbatim (ollama_service.py, /api/dialogue
and /api/ambient-event routes, TestCase-style tests so unittest collects
them — 13/13 green) and curate the frontend half:
- ollama.ts is now server fns (createServerFn) talking to the Keep HTTP
  API over loopback with the KEEP_HTTP_URL base, no browser URL, no CORS;
  internals exported separately for node test runner.
- herald getpick: dynamic ambient line from Ollama is tagged category
  weather, never torchlight, so it never pulses the hall lights.
- barks/herald/duty: pickBarkAsync/pickHeraldLineAsync fall back to the
  rule pools when Ollama or the API is unreachable.

Rejected from the original PR: hardcoded :8120 fetch base, browser-local
ollama client, torchlight-tagged ambient lines, bun test syntax, /gallery
regression.
The #62 import swap made pickBarkAsync the only import; the near-NPC Talk
button still called bare pickBark. Route it through pickBarkAsync with the
rule-pool fallback so the name is gone everywhere.
keep #66's getPendingGates import alongside #67's pickBarkAsync.
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.

1 participant