update to 0.2.0 stable #2
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Import the parser's {title, messages} JSON into Lyra's memory so past conversations seed recall (and, later, the era-rollup tier). - lyra/ingest.py: one conversation -> one session, text messages -> exchanges; skips non-text (image asset) messages and non user/assistant roles; embeddings batched; idempotent by filename-derived session id; `lyra-import <dir>` CLI - memory.add_exchanges_bulk: batched insert of pre-embedded rows Format has no timestamps yet, so imports are stamped at import time; a future dated export will let era memory group by real calendar time. Verified on the 68-file lyra dev set: 7519 exchanges, idempotent re-run, recall returns relevant history. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>OpenAI's export changed: conversations.json is now sharded into conversations-000.json..NNN.json, each a JSON array of conversations with the mapping tree and per-message create_time. ingest now reads that format directly (supersedes the old convert/trim/split scripts): walks each conversation's mapping ordered by create_time, keeps text and multimodal_text (drops thoughts/reasoning_recap), captures real per-message timestamps, and imports idempotently by conversation_id. `lyra-import <dir>` auto-detects raw-export vs legacy {title,messages} dirs; optional limit arg. Verified on 15 conversations: real dates, correct ordering, recall returns dated poker history. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Derive a standing profile of the user from session gists and inject it into every prompt, so identity/abstract questions ("what kind of player am I", "what are my leaks") are answered from distilled knowledge instead of noisy single-vector recall (which finds passages, not patterns). - memory: profile table + get/set_profile, list_summaries - lyra/profile.py: rebuild_profile map-reduces all gists (batch -> extract durable facts -> fold-merge) into one profile doc; `lyra-profile` CLI - chat.build_messages injects "What you know about Brian" after the persona Run after lyra-summarize (needs gists). Verified (stubbed): map-reduce, storage, and prompt injection. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Complete the consolidation pipeline: summaries -> profile + eras -> narrative. - memory: eras table (per-month digests) + Era, summaries_by_month, store_era, list_eras, recall_eras; narrative table + set/get_narrative - lyra/era.py (lyra-era): groups session gists by the month the session occurred (real timestamps) and map-reduces each month into a "what was happening" digest - lyra/narrative.py (lyra-narrative): distills profile + recent eras into the current arc/trends/callbacks ("remember when…", "you're trending toward…") - chat.build_messages injects the narrative alongside the profile Verified on the real corpus: 17 monthly eras (Dec 2024-Jun 2026) + a narrative that surfaces specific callbacks (the $573 Hollywood session, 4 years sober). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Two RLHF reflexes were leaking through: ending every turn with "is there anything else?"/"how does that sound?", and disclaiming feelings ("I don't really experience emotions like humans"). Add explicit persona instructions to stop tacking on help-desk offers and to own her moods plainly instead of giving qualia disclaimers. (Small models partially resist; stronger chat model holds it better.) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>She had no clock: current date/time and the gap since Brian last spoke were invisible between turns, and reflection was timeless. Now: - lyra/clock.py: wall-clock stamp + coarse human gaps ("3 days") - chat: inject a 'now' note (date/time + gap since last turn) after her self-state — when she is, before the world - reflect(): feed current time + silence gap into reflection, neutrally — prompt invites her to weigh elapsed time "to whatever degree it genuinely affects you" (no prescribed feeling; whether silence means anything is left to emerge) - memory.last_exchange_at(): timestamp of the most recent exchange Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Live finding: her real reflections ARE injected every turn, but unlabeled — so when asked about her "dream cycle" she recited the obsolete Dec-2025 spec from imported memory (NVGRAM/awake-sleep) and confabulated fake example reflections instead of reading the real ones in front of her. - self_state.render_for_context: label the reflections as her own autonomously generated dream-cycle thoughts ("these are really yours, not hypotheticals"), not a vague "on your mind lately" - persona: describe the dream cycle as her actual running mechanism, instruct her to answer from the inner-state block, not recite old design docs, and never invent example reflections to demo the feature Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>The MI50 llama.cpp server 500s on the `tools` param unless launched with --jinja, so sending tools to mi50 broke chat on that backend. Gate tools to TOOL_BACKENDS={"cloud"} for now; mi50 chat works again (just without tools). Add "mi50" once its server runs with --jinja. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Brian's idea: vomit rough shorthand, Lyra rebuilds it into a structured, replayable hand history. - poker.parse_hand(): focused LLM pass turning shorthand into a canonical hand JSON (positions, stacks, hero cards, chronological actions w/ board reveals, result); store_hand_history() persists JSON + extracted flat fields; record_hand() = parse+store; standalone hands attach to a 'Hand Reviews' session - poker_hands gains a `structured` JSON column (ALTER-migrated for existing DBs) - record_hand tool wired into chat: "log this hand: ..." -> reconstructed + a /hand/{id} link - web: GET /hand/{id} viewer + /hand/{id}/data — a felt table with seats placed around the oval (hero at bottom), hole cards, progressive board reveal, and prev/next/end step-through of the action with running pot - tests: store/get roundtrip, record_hand tool (stubbed parse) Verified live: parsed a real AKs hand (BTN, 14 actions, full board) end to end. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Completes the poker copilot loop: talk through a session -> structured capture -> generated writeup in Brian's format, remembered + exportable. - poker.generate_recap(): LLM produces Brian's .md log (Session Header, Money Flow, Overview, Timeline, Key Hands w/ assessments, Villain Notes, Confidence Bank, Scar Notes, Mental Game, Final Assessment) from the session's structured data + the linked chat conversation; stored on poker_sessions.recap_md - sessions now capture chat_session_id (via tool ctx) to pull the right convo; list_recent_hands() for browsing - generate_recap tool ("write up the recap") - web: /recap/{id} (renders the md) + /recap/{id}/download (.md attachment) + /hands browser (recent hands -> /hand/{id}); nav links added (desktop + mobile) - tests: recap generation (stubbed), recent-hands listing Verified live: recap for the Meadows session rendered + downloaded; all pages 200. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>Named players in recorded hands now auto-enrich a persistent dossier, and stats emerge once the sample is big enough — laying groundwork for A. - poker: player_observations table (per named player per hand: vpip/pfr/saw_flop/ showed/cards/summary); record_hand auto-links named players via link_hand_players; player_profile(name) returns dossier + reads + shown hands, with inferred VPIP/PFR/WTSD gated behind MIN_STATS_SAMPLE (12) so thin samples don't lie; list_players() - player_profile tool ("what do I know about X"); thin files return a blunt "don't generalize" directive - persona: she MUST call player_profile before discussing an opponent and answer only from it — fixes observed confabulation (she invented a whole read from one hand / from memory). Verified: now reports only the real logged hand. - tests: observation linking, profile, stat-emergence at sample threshold Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>