- VoiceConfig: add QueryMinScore (default 0.55) + Persona config fields - voice.go: remove queryMinScore const, wire from cfg.Voice.QueryMinScore as reactiveHandler field - llmphraser.go: add Persona to Config, prepend to system prompts in chat and query paths (systemPrompt/querySystemPrompt methods) - main.go: pass personaFromCfg into both phraser config blocks - Makefile: add download-embedder target (Xenova/paraphrase-multilingual- MiniLM-L12-v2, ~90MB ONNX) - AGENTS.md: document embedder model download + libonnxruntime setup - server.go: fix pre-existing wg.Add vs wg.Wait data race using accept mutex. make test green, zero races across all 29 packages.
3.2 KiB
Maven — Agent Context
Vikunja
This repo maps to Maven (project ID: 2) in Vikunja.
Feature work, bugs, deployment tasks all go here.
MCP endpoint: http://localhost:9100/mcp (or http://192.168.1.104:9100/mcp from workpc)
Rendering / previewing the web UI locally
To see mavweb pages with real data without touching the production stack:
R=/tmp/mvn-preview; mkdir -p $R
go build -o $R/mavend ./cmd/mavend/ && go build -o $R/mavweb ./cmd/mavweb/
cat > $R/mavend.json <<EOF
{ "db_path": "$R/maven.db", "socket_path": "$R/mavend.sock",
"state_dir": "$R", "tick_interval": "10s" }
EOF
$R/mavend -config $R/mavend.json &
$R/mavweb -addr 127.0.0.1:9299 -core $R/mavend.sock &
- No models/voice/phraser config needed — the phraser stub covers it; mavend
runs fine bare. mavweb serves
/,/dash,/history,/trace,/notifications,/tools. - Socket path must be short — unix sockets cap at ~108 chars; a deep tmp
dir fails with
bind: invalid argument. - Seed data through
ipc.Client(internal package — the seeder must live inside the module, e.g. a throwawaycmd/seedtmp/main.go, deleted after):WriteFact,RecordNudge+ResolveNudge,CreateReminder,ProposeTool. /traceis empty until the first tick fires (wait onetick_interval).- Screenshots:
chromium --headless --disable-gpu --screenshot=out.png --window-size=1280,900 --hide-scrollbars --virtual-time-budget=2000 http://127.0.0.1:9299/dash(use--window-size=430,900for the phone/PWA view). Always pass--virtual-time-budget— without it the screenshot can snap mid-layout and silently drop elements (the PWA lang toggle "disappeared" this way).
Embedder model for intent routing
The router uses a multilingual sentence embedder to classify intents and recall
notes. Without it, the floor HashEmbedder is used — deterministic but weak
(Russian recall rarely clears the confidence gate, many commands fall to
"clarify").
Download the embedder (ONNX, ~90 MB):
make download-embedder
This fetches paraphrase-multilingual-MiniLM-L12-v2 (384-dim, 12-layer,
supports 50+ languages including Russian) to models/embedder/.
Also need ONNX Runtime (libonnxruntime.so):
curl -sL "https://github.com/microsoft/onnxruntime/releases/download/v1.15.1/onnxruntime-linux-x64-1.15.1.tgz" | tar xz
sudo cp onnxruntime-linux-x64-1.15.1/lib/libonnxruntime.so* /usr/local/lib/
Configure in deploy/mavend.json:
"voice": {
"embedder": {
"model_path": "models/embedder/model_quantized.onnx",
"tokenizer_path": "models/embedder/tokenizer.json",
"lib_path": "/usr/local/lib/libonnxruntime.so"
}
}
Without the embedder block, the daemon uses HashEmbedder (works, but weak on
Russian recall — you may see many "clarify" responses).
Web UI conventions
- All server-rendered pages share
cmd/mavweb/static/ui.css(served at/ui.css) and thenavtemplate partial (navHTMLincmd/mavweb/main.go, invoked as{{template "nav" "<active-page>"}}). New pages must link both — no per-page inline<style>beyond true one-offs. - Wrap every table in
<div class=scroll>so wide data pans on a phone instead of breaking the layout.