Context. surface studio · domain hathor · route /studio/hathor/npc-memory-system · auth signed-in + studio entitlement · source apps/oshun/web/src/app/studio/hathor/npc-memory-system/page.tsx
Last walked. 2026-05-29 automated runtime walk (Playwright headless) — render, /v1 data (2xx), console/page-errors, expected content, screenshot verified; live screen-reader, touch, offline, and telemetry-delivery checks pending a manual AT pass. Evidence: WALKTHROUGH/results/runtime-sweep-2026-05-29.md; body re-derived 2026-06-03 from current source (lane-console architecture)
Purpose#
Admin lane console for the real NPC memory-relevance ranker. Supply a set of NPC memories and a recall query, and read back the top-K recalled memories ranked by importance + access frequency + a 20-hour recency window + emotional salience + content match, scaled by the memory decay penalty. Admin-scoped and fail-closed.
Entry points#
- Quick-action link from
/studio/hathor/npc-emotional-state(this page links out to npc-emotional-state) - Aggregator embed:
StudioHathorLlmNpcWorkspacemounts this workspace inline as its "NPC Memory System Lane" - Direct URL / bookmark — yes;
alternates.canonicalset - Studio overview — see
../../studio-overview.md
Layout regions#
page.tsx renders inside <ShellLayout active="studio">:
- Workspace
<section data-hathor-npc-memory-system-workspace>:<h1>(WorkspaceHeading) "Hathor NPC Memory System Workspace"- Summary
<p data-hathor-npc-memory-system-summary> - Memory Recall Lane (
<h2 data-hathor-nms-lane-heading>) — the engine summary (data-hathor-nms-engine-summary, from the catalog) and the recall formdata-hathor-nms-form
- Route Map panel (
data-hathor-npc-memory-system-route-map):<h2>"Route Map" + 5 entries fromSTUDIO_HATHOR_NPC_MEMORY_SYSTEM_ROUTE_MAP - Quick-action lane: two
Link.quickActionanchors — NPC Emotional State, Back to Studio workspace index
States#
- Loading —
<p data-hathor-nms-loading> - Unauthorized —
data-hathor-nms-unauthorizedon 401/403 (admin Hathor scope required); fail-closed - Error —
data-hathor-nms-erroron non-OK GET / malformed catalog - Ready (form) — engine summary +
data-hathor-nms-formonce the catalog loads - Result —
data-hathor-nms-resultafter a 200 recall;data-hathor-nms-recall-errorfor invalid JSON / non-200
Interactions#
Memory Recall Lane#
- NPC memories (JSON array) —
<textarea data-hathor-nms-memories>(aria-label "npc memories json") - Recall query —
<input data-hathor-nms-query>(aria-label "recall query") - Now (epoch ms) —
<input data-hathor-nms-now>(aria-label "now ms") - Top K —
<input data-hathor-nms-topk>(aria-label "top k") - Recall memories —
<button data-hathor-nms-submit type="submit">→ POST/v1/admin/hathor/npc-memory-system/recall - Result —
data-hathor-nms-headline,data-hathor-nms-bounds,data-hathor-nms-now, and adata-hathor-nms-memories-listofdata-hathor-nms-memory-rowrows
Route Map panel#
- 5 route entries — verify match with
STUDIO_HATHOR_NPC_MEMORY_SYSTEM_ROUTE_MAP
Quick-action lane#
- "Open Hathor NPC Emotional State workspace" (→
/studio/hathor/npc-emotional-state) - "Back to Studio workspace index" (→
/studio)
Data & contracts#
- Reads: GET
/v1/admin/hathor/npc-memory-system(engine summary catalog) on mount - Writes: POST
/v1/admin/hathor/npc-memory-system/recall - Realtime: none
- Caching: client
fetchon mount,cache: 'no-store';buildBffAuthHeaders - Auth/role check: admin-scoped fail-closed (401/403); behind the signed-in
- studio proxy gate
Cross-references#
- Parent:
../../studio-overview.md - Shell:
../../../shell/04-auth-session.md - Sibling routes:
./studio-hathor-llm-npc.md(aggregator that embeds this workspace),./studio-hathor-npc-emotional-state.md - Component sources:
apps/oshun/web/src/components/studio/StudioHathorNpcMemorySystemWorkspace.tsxapps/oshun/web/src/components/studio/StudioHathorNpcMemorySystemRouteMap.ts
Open questions / known gaps#
- Hathor is
unconfirmed-v1perWALKTHROUGH/matrix/routes.csv. Confirm whether the dedicated/studio/hathor/*admin lane consoles ship in V1. - The recency half-life is fixed at a 20-hour window in the ranker; confirm whether decay/half-life is meant to be operator-tunable from this lane.
- Route Map advertises
profiles/,memories/,timelines/, andgovernance/sub-routes with nopage.tsxyet.