docs(reference): import Dune: Awakening server-manager references
Phase 2 references for the host-agent Dune adapter, moved out of volatile /tmp
into docs/reference-repos/ (per Commander). Three upstream projects, .git +
node_modules + compiled binaries stripped (16MB source). Nested AI-instruction
files (.claude/, CLAUDE.md) removed so they don't pollute Corrosion sessions.
- icehunter/ dune-admin (Go+React) — 4 control planes; SETUP_DOCKER.md is the
closest analog to our agent's Dune docker control plane (compose
lifecycle, docker logs, RabbitMQ-via-exec, dune Postgres schema)
- adainrivers/ Rust/Tauri desktop — SSH+k8s BattleGroup control, maintenance
daemon, in-game admin console (Rust idiom reference)
- the4rchangel/ Node web UI replacing battlegroup.bat — matches the Commander's
Hyper-V self-host path + game-config schema
See docs/reference-repos/README.md for the full index + how we use each.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# ADR 0008 — Extend config.yaml for embedded-bot settings
|
||||
|
||||
**Status:** Implemented (Phase 2), updated (Phase 3)
|
||||
**Date:** 2025-05-27
|
||||
|
||||
## Context
|
||||
|
||||
Embedding the bot (ADR 0002) requires dedicated in-process settings plus moving hardcoded broker credentials to config.
|
||||
|
||||
## Decision
|
||||
|
||||
New fields added to `appConfig` in `cmd/dune-admin/main.go`:
|
||||
|
||||
```yaml
|
||||
# Embedded market bot (in-process)
|
||||
market_bot_enabled: false # bool; true starts embedded bot
|
||||
market_bot_cache_db: "" # SQLite path; default: ~/.dune-admin/market-bot-cache.db
|
||||
market_bot_item_data: "" # item-data.json path; default: ./item-data.json
|
||||
market_bot_buy_interval: 5m # time.Duration string
|
||||
market_bot_list_interval: 30m
|
||||
market_bot_buy_threshold: 1.05 # float64
|
||||
market_bot_max_buys: 50 # int
|
||||
|
||||
# Broker credentials (moved from hardcoded constants)
|
||||
broker_user: "" # AMQP username (env: BROKER_USER); default: dune_cap
|
||||
broker_pass: "" # AMQP password (env: BROKER_PASS)
|
||||
broker_jwt_secret: "" # base64 HMAC key for CaptureJWT (env: BROKER_JWT_SECRET)
|
||||
```
|
||||
|
||||
`market_bot_enabled: true` activates the embedded goroutine via `marketbot.Run(ctx, BotConfig{...})` in `main()`.
|
||||
|
||||
`broker_user`/`broker_pass`/`broker_jwt_secret` are loaded through `setEnvIfMissing` so the env-var path also works for containerised deployments.
|
||||
|
||||
## Consequences
|
||||
|
||||
- Existing installs with no new fields default to `market_bot_enabled: false`
|
||||
- The `BotConfig` struct in `internal/marketbot` exactly mirrors these fields
|
||||
- `handlers_market_bot.go` routes all market-bot endpoints to the embedded instance
|
||||
- `broker_user`/`broker_pass` default to `dune_cap`/`DuneCap2026!` via `brokerCredentials()` for backward compat
|
||||
- External proxy fields (`market_bot_addr`, `market_bot_token`, `market_bot_container`, `market_bot_namespace`) were removed in Phase 3
|
||||
Reference in New Issue
Block a user