mirror of
https://github.com/zvx-echo6/meshai.git
synced 2026-05-21 23:24:44 +02:00
Add passive mesh context awareness — observe channel traffic, inject into LLM prompts
New context.py module: ring buffer (50K hard cap, ~25MB ceiling) passively records all channel broadcasts. Observations are formatted with relative timestamps and injected into the system prompt when generating LLM responses. Only public channel traffic is observed; DMs to the bot are excluded (already in per-user history). Bot's own node ID is auto-added to ignore list. Config: context.enabled, observe_channels, ignore_nodes, max_age, max_context_items TUI: new Context settings submenu (menu item 7) Hourly prune removes expired observations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
1e033316fb
commit
63a2caad37
7 changed files with 302 additions and 12 deletions
|
|
@ -40,6 +40,14 @@ memory:
|
|||
window_size: 4 # Recent message pairs to keep in full
|
||||
summarize_threshold: 8 # Messages before re-summarizing
|
||||
|
||||
# === MESH CONTEXT ===
|
||||
context:
|
||||
enabled: true # Observe channel traffic for LLM context
|
||||
observe_channels: [] # Channel indices to observe (empty = all)
|
||||
ignore_nodes: [] # Node IDs to exclude from observation
|
||||
max_age: 2592000 # Max age in seconds (default 30 days)
|
||||
max_context_items: 20 # Max observations injected into LLM context
|
||||
|
||||
# === LLM BACKEND ===
|
||||
llm:
|
||||
backend: openai # openai | anthropic | google
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue