Files
semprini-maintainer/config.example.json
T
paulandClaude Opus 5.5 61dca2c3ca Run on the workstation, on pydantic-ai with cloud and local models
The daemon moves from the Lightsail host to WSL on the workstation (EVAI),
where the RTX 4090 can run local models and the data platform and home
cluster live. It reaches the core host over one multiplexed SSH connection:
each health check pipes probe.py to the host's python3 and gets Kuma, disk,
memory, OOM kills, restarts and reboots back in one snapshot. The agent edits
and commits core's live checkout there, as semprini-core's rules expect, and
the service desk still runs on the host. Off the host, it now notices when
the host itself stops answering.

The agent runs in-process with pydantic-ai instead of Claude Code headless.
Model profiles (anthropic, ollama, any OpenAI-compatible server) are routed
per kind of task: an unreachable model hands over at once (FallbackModel), a
run that fails as a run restarts on the next profile. The result is a typed
envelope; conversations persist as message histories; cancel stops the
command in flight; each reply names the model and its cost. `model` in Matrix
pins a room to a profile; --try-model checks a model calls tools and uses
what they return (qwen3-coder does not; GLM-4.7-Flash, the local default, does).

Cloud runs now need an API key (--set-api-key) and are billed per token; the
subscription token was for Claude Code only. Back-off is per kind of task, so
a cloud-only upgrade waiting on a key does not stall work the local model
can do. A queued task held back by a hold no longer spins the main loop.

--hold and --resume stay stdlib-only, so sync-to-host.sh can still hold the
daemon from the host's checkout; the daemon reads the host's hold each minute.
install.sh sets up WSL and retires the host's service: one Matrix bot, one
daemon.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 01:46:03 +12:00

100 lines
3.4 KiB
JSON

{
"hosts": {
"core": {
"ssh": "ubuntu@3.107.254.151",
"about": "the core stack host, AWS Lightsail Semprini-Core, Ubuntu, user ubuntu (docker group, passwordless sudo). Docker Compose runs the core stack, semprini-blog and conk; Loki, Kuma and Gitea are here. kubectl (as elz-operator) and `ssh sem-k8s-1..3`, `ssh sem-gw` reach the home cluster from here, through the tunnel"
},
"local": {
"about": "the operator's workstation, WSL Ubuntu, where this daemon runs. curl, git and ssh; GITEA_* is set for API calls. The operator's own checkouts are under /mnt/c/Dev: read them, never commit there"
},
"windows": {
"shell": "powershell",
"powershell_bin": "/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe",
"about": "the same workstation's Windows, as the operator's user (Hyper-V Administrators): the home cluster VMs sem-k8s-1..3 and sem-gw (Get-VM; C:\\Dev\\semprini-core\\infra\\hyperv\\cluster.ps1 status)"
}
},
"repo_host": "core",
"repo_dir": "/home/ubuntu/semprini-core",
"extra_dirs": ["/home/ubuntu/semprini-blog", "/home/ubuntu/conk"],
"agent_file": "agents/stack-support.agent.md",
"runbook_file": "docs/stack-support-runbook.md",
"models": {
"cloud": {"model": "anthropic:claude-sonnet-5", "api_key": ""},
"local": {"model": "ollama:hf.co/bartowski/zai-org_GLM-4.7-Flash-GGUF:Q5_K_S", "base_url": "http://{windows_host}:11434/v1", "context_tokens": 32768}
},
"routing": {
"operator": ["cloud", "local"],
"alerts": ["local", "cloud"],
"health": ["cloud", "local"],
"upgrade": ["cloud"]
},
"limits": {
"request_limit": 150,
"tool_calls_limit": 300,
"cost_usd": {"default": 5, "upgrade": 15}
},
"agent_timeout_seconds": 2700,
"kuma_volume": "uptime-kuma-data",
"sqlite_image": "keinos/sqlite3",
"autonomy": "full",
"health_interval_seconds": 300,
"down_confirmations": 2,
"upgrade_weekday": 5,
"upgrade_hour_utc": 22,
"digest_hour_utc": 21,
"conversation_ttl_seconds": 14400,
"escalation_expiry_seconds": 604800,
"self_update_interval_seconds": 3600,
"state_file": "/home/paul/.local/state/semprini-maintainer/state.json",
"remote_hold_file": "/home/ubuntu/.local/state/semprini-maintainer/hold.json",
"uv_bin": "/home/paul/.local/bin/uv",
"alerts": {
"sender": "@alerts:semprini.me",
"batch_seconds": 60,
"cooldown_seconds": 43200,
"ignore": ["PipelineTest"]
},
"host": {
"disk_warn_percent": 85,
"mem_available_min_mb": 400,
"kuma_stale_seconds": 600,
"check_cooldown_seconds": 43200
},
"git": {
"repos": [{"path": "/home/ubuntu/semprini-core", "slug": "paul/semprini-core", "host": "core"}],
"branch": "main"
},
"gitea": {
"api_base": "https://git.semprini.me/api/v1",
"web_base": "https://git.semprini.me",
"user": "claude-code",
"repo": "paul/semprini-core",
"token": "FILLED_BY_register-gitea-bot.sh",
"git_author_name": "Claude Code",
"git_author_email": "claude-code@semprini.me"
},
"desk": {
"script": "core_stack/scripts/service-desk.py",
"interval_seconds": 60,
"timeout_seconds": 900
},
"matrix": {
"homeserver": "https://matrix.semprini.me",
"user_id": "@maintainer-bot:semprini.me",
"access_token": "FILLED_BY_register-matrix-bot.sh",
"room_id": "FILLED_BY_register-matrix-bot.sh",
"alerts_room": "#stack-alerts:semprini.me",
"admin_user_id": "@paul:semprini.me"
}
}