Skip to content

Commit 47afd9d

Browse files
Workspace Userclaude
andcommitted
docs(README): document v0.15.0 surfaces
Three additions to match what landed in bdf5a27: - /role_doc and /context: noted [πŸ“‹ Paste] / [⎘ Copy] buttons (raw terminal paste keys are intercepted by the OS terminal before reaching Textual's modal focus stack β€” the buttons go through pyperclip directly and are reliable across terminals). - /context: noted that the detail panel is now editable; [πŸ’Ύ Save edit] writes the change back to the row in place. - New "Named slots β€” persistent state primitive" section covering upsert_slot, the in-place mutable pinned-row primitive that lets agents track state-that-changes (HP, location, sensor readings, current status) without bloating the rolling window or routing through memory files. Includes the Aethon-style example. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent bdf5a27 commit 47afd9d

1 file changed

Lines changed: 58 additions & 2 deletions

File tree

β€ŽREADME.mdβ€Ž

Lines changed: 58 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,11 +363,17 @@ TUI-specific feature.
363363
/role <path> (REPL) swap role doc (also persists to config)
364364
/role_doc (TUI) open the role-doc editor modal β€” edit live; Ctrl+S
365365
saves; changes take effect on the next turn (the role doc
366-
is re-read on every API call)
366+
is re-read on every API call). Modal exposes
367+
[πŸ“‹ Paste] / [⎘ Copy] buttons (raw terminal paste keys
368+
can be intercepted by the OS terminal before reaching
369+
Textual's modal focus β€” the buttons go through pyperclip
370+
directly and are reliable across terminals).
367371
/context (TUI) open the context viewer β€” tabbed breakdown of where
368372
input tokens are going (tool schemas, role doc, manifest,
369373
pinned rows, working window) with browse / evict / pin
370-
actions and role filtering
374+
actions and role filtering. Detail panel is editable;
375+
[πŸ’Ύ Save edit] writes the change back to the row in
376+
place. [πŸ“‹ Paste] / [⎘ Copy] available too.
371377
/show (REPL) print the rolling window
372378
/clear comprehensive wipe β€” strips tool_use blocks, thinking
373379
blocks, and user/assistant turns; pinned rows preserved;
@@ -497,6 +503,56 @@ Format: append-only Markdown, one block per note:
497503
Worth remembering across sessions.
498504
```
499505

506+
## Named slots β€” persistent state primitive
507+
508+
Some state is neither a memory note (write-once, append-only) nor a turn
509+
in the rolling window (FIFO-evicted as the conversation grows). It's a
510+
single value that *changes in place* β€” current health, current location,
511+
current mood, the latest reading from a sensor, the value of a counter
512+
that ticks every frame.
513+
514+
Mnemara exposes a `upsert_slot` MCP tool for exactly that:
515+
516+
```
517+
upsert_slot(label, role, content) -> row_id
518+
```
519+
520+
- If a row with `pin_label == label` already exists, the row is **updated
521+
in place** β€” same `row_id`, content replaced, timestamp refreshed.
522+
- If no such row exists, a new pinned row is **inserted**.
523+
524+
Slot rows are pinned. They never get FIFO-evicted from the rolling window,
525+
no matter how long the session runs. The context viewer shows them with a
526+
`πŸ“Œ [slot: <label>]` badge so you can see the current state of the world
527+
at a glance.
528+
529+
**Why this matters:** without `upsert_slot`, an agent with mutable state
530+
(a game character with HP, a robot reporting battery level, a panel
531+
tracking the latest deploy status) has two bad options. Either it
532+
`append_turn` every tick β€” and the rolling window fills up with stale
533+
state-snapshots β€” or it relies on memory files, which require an extra
534+
read step and aren't always in context. Slots solve both: in context every
535+
turn, mutable in place, never bloating the window.
536+
537+
**Aethon-style example.** A character has health, stamina, and hunger.
538+
Each combat tick, the simulator updates the slots:
539+
540+
```
541+
upsert_slot("health", "system", "HP: 73 / 100")
542+
upsert_slot("stamina", "system", "stamina: 41 / 100")
543+
upsert_slot("hunger", "system", "hunger: 62 / 100 (eat soon)")
544+
```
545+
546+
The character's panel sees current values at slot 0..N every turn. No
547+
state-resolution math, no ECS, no separate game-state DB read into
548+
context β€” the context *is* the state. Tick the slot, the next agent turn
549+
reads the new value.
550+
551+
Combine with role-doc swap for state that changes the agent's *identity*
552+
rather than its inventory: pointing `role_doc_path` at `drunk.md` for the
553+
duration of an inebriation status doesn't add a debuff, it makes the
554+
agent run as a drunk person until the condition lifts.
555+
500556
## Context budget β€” agent-side eviction tools
501557

502558
The rolling window's row + token caps are the *floor* of context

0 commit comments

Comments
Β (0)