chore: docker, config, delivery sinks, dialogue, and agent docs
- Dockerfile: multi-stage build with CGO_ENABLED=0, embedder model copy, non-root user, healthcheck, and /data volume. - docker-compose.yml: mavend + mavweb services with shared volume, health checks, and restart policy. - .gitignore: ignore models/llm/*.gguf, deploy/telegram.env, tmp artifacts. - deploy/mavend.json: add LLM, phraser, voice sections (embedder, model paths, wake sensitivity). Add telegram token env-var expansion. - deploy/telegram.env.example: template for telegram bot token. - internal/config/config.go: add LLM config struct, voice config struct (embedder, llama, wake sensitivity), telegram token loading. - telegramsink: add chat intent delivery support alongside existing types. - voicesink: skip empty payloads in delivery. - dialogue/session: add chat intent to anaphora resolution, test coverage. - AGENTS.md: update with LLM embedder, LFM model download/configure steps, new UI conventions. - REARCH.md: architecture research document. - cmd/mavend/main.go: wire LLM config, phraser, embedder, telegram config, WebAuthn, IPC event/routine handlers, and reactive notes.
This commit is contained in:
@@ -13,6 +13,7 @@ const (
|
||||
IntentFact Intent = "fact"
|
||||
IntentNote Intent = "note"
|
||||
IntentQuery Intent = "query"
|
||||
IntentChat Intent = "chat"
|
||||
IntentSystem Intent = "system"
|
||||
)
|
||||
|
||||
|
||||
@@ -54,6 +54,24 @@ func TestSessionStoreDefaultTTL(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestSessionStoreCustomTTL(t *testing.T) {
|
||||
// A session with an explicit TTL should use that instead of the default.
|
||||
now := time.Date(2026, 7, 6, 12, 0, 0, 0, time.UTC)
|
||||
store := NewSessionStore(2 * time.Minute)
|
||||
|
||||
sess := &Session{Intent: IntentQuery, Timestamp: now, TTL: 15 * time.Minute}
|
||||
store.Put("chatty", sess)
|
||||
|
||||
// Should still be alive at 10 minutes (past the 2m default).
|
||||
if s := store.Get("chatty", now.Add(10*time.Minute)); s == nil {
|
||||
t.Error("chat session with 15m TTL expired at 10m — custom TTL not applied")
|
||||
}
|
||||
// Should be expired after 20 minutes.
|
||||
if s := store.Get("chatty", now.Add(20*time.Minute)); s != nil {
|
||||
t.Error("chat session with 15m TTL should be expired at 20m")
|
||||
}
|
||||
}
|
||||
|
||||
func TestInheritSlots(t *testing.T) {
|
||||
now := time.Date(2026, 7, 6, 0, 0, 0, 0, time.UTC)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user