The targeted /search + /kinds approach is the only POI search now;
nothing consumes embeddings. Drop:
- poi_vec data + the 'vector' extension (DB)
- embed/ (embedpoi), 20-vector.sql, db/ (the pgvector image workaround
— compose goes back to plain postgis/postgis:16-3.4)
- /semantic endpoint + embed client code from spatiald
- EMBED_* env vars and README sections
- .gitignore: ignore the spatial/ go build artifact
The dev directory now holds source code + compiled binaries only:
~/trips/osm/ OSM PBF extracts (was osm/, 1.4 GB)
~/trips/tilecache/ mock tile cache (was mock/.tilecache)
~/trips/store/mock/ per-trip uploads + chat logs (was mock/store, PII)
~/trips/logs/ server.log
~/trips/stale-osm-build/ stale source/tarball dup of ~/osm-build
(repo osm/build had no binaries; the live OSRM
toolchain + graphs already lived in ~/osm-build)
Code now points at the new locations, all overridable via env:
- mock/server.js: TRIPS_HOME (default ~/trips) for tile cache + store
- setup-osrm.sh / setup-osrm-colombia.sh: OSM_DIR (default ~/trips/osm)
- spatial/compose+import.sh: OSM_DIR (default ~/trips/osm)
- .gitignore: rewritten — no artifact paths remain in-tree
Milestone 1 — live web search:
- mock/server.js: /search + /search-status proxy to the self-hosted
SearXNG (third leg of the 3-source blend; engine endpoint stays
server-side), /spatial + /spatial-status proxy to the spatial service
- mock/app.js: background enrichment of suggestion cards — each
candidate gets a web element (discovery cards + "you might like"
rows) that is checked via SearXNG in the background (one in-flight
query per place, 1 h TTL, failures retry in ~5 min) and APPENDS
sourced facts with provenance URLs; never reorders/rewrites the plan.
New LLM tools: web_search (cite URLs) and poi_near (PostGIS). Status
badge gains 'web' / 'spatial'.
- styles.css: .cc-web live-facts blocks, t-web verified chip
Milestone 2 — PostGIS spatial DB (code complete; needs docker access
to run — see spatial/README.md):
- spatial/: docker-compose (postgis/postgis:16-3.4 + osm2pgsql:16
one-shot importer + spatiald), schema.sql (poi table w/ GIST index,
spatial_extract bookkeeping, refresh_poi()), import.sh for the PBF
extracts in ../osm, spatiald (Go, lib/pq): /health, /near
(ST_DWithin), /nearest (KNN), /corridor (ST_Buffer along a route),
with kind/name/extract/limit filters
Context and documents now live on the server between turns (and across
reloads), per project, as requested:
mock/store/<trip>/docs/<docId>-<file> ORIGINAL uploaded bytes
mock/store/<trip>/docs/<docId>-<file>.txt extracted text (+ header)
mock/store/<trip>/chat.jsonl full LLM conversation
Endpoints: GET /trip-store/:trip (manifest incl. doc texts),
GET .../doc/:docId, GET .../chat (last 100 turns), POST .../doc,
POST .../chat. /parse-doc's extraction factored into shared finishParse()
so both paths use identical logic. The store dir is gitignored (PII).
Client: enterTrip rehydrates tripDocs + chatLog from the server
(loadTripStore, race-guarded, one-time migration of localStorage docs
from older builds), re-renders past turns in the chat panel, and
askLLM persists each turn fire-and-forget. localStorage now carries
only the plan state.
Verified end-to-end: drop 133 KB email → direct re-anchor, original +
parsed files on disk, both turns in chat.jsonl → full page reload →
doc chip, document and conversation restored from the server → question
asked without re-upload answered correctly (AK-77Q2ZD, 14C/22A).
Co-Authored-By: Claude <noreply@anthropic.com>
The mock can now work several trips at once: a trip picker in the
topbar, per-trip state in localStorage (edits + version history survive
switching), and a per-trip router key so each trip routes on its own
OSRM extract.
Colombia (Cartagena -> Santa Marta, 8 days) becomes the default working
trip, inside a new walking-profile OSRM instance:
- scripts/crop_pbf.py: streaming 3-pass PBF cropper (no PBF library;
the country file is too big for osmium extract -s complete_ways on
this box). Framing validated against osmium test fixtures and
osrm-extract. Drops relations (foot profile ignores restrictions).
- scripts/setup-osrm-colombia.sh: download -> crop (~4.6 MB) ->
extract/partition/customize with the official foot.lua -> serve
:5003. Verified: Getsemaní -> Castillo San Felipe 7.98 km / 96 min.
- server.js: ROUTERS map, ?router=colombia|northeast on /route,
/table, /router-status (per-router probe points).
- app.js: legs touching a transit stop are fixed (flight/taxi/bus via
M.multimodal), never re-routed; distance-0 router answers (both
points on one node) read as adjacent stops, not out-of-coverage.
- multi-hotel fix: day-scope map fit uses the stays covering THAT day,
so a two-city trip no longer fits the whole country per day.
Also: pre-cache-tiles.sh (Cartagena+Santa Marta z14-16, 2560 tiles),
tile cache write fix (Node rejects flags:'x'; buffer-then-write),
favicon, renderHotelMks load-order guard, tests updated for the new
default trip (all four puppeteer suites green, zero console errors).