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:
36
docs/reference-repos/icehunter/cmd/dune-admin/helpers.go
Normal file
36
docs/reference-repos/icehunter/cmd/dune-admin/helpers.go
Normal file
@@ -0,0 +1,36 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
// parseDurString parses a duration string (e.g. "5m0s") falling back to def.
|
||||
func parseDurString(s string, def time.Duration) time.Duration {
|
||||
if s == "" {
|
||||
return def
|
||||
}
|
||||
d, err := time.ParseDuration(s)
|
||||
if err != nil || d <= 0 {
|
||||
return def
|
||||
}
|
||||
return d
|
||||
}
|
||||
|
||||
func shellQuote(s string) string {
|
||||
return "'" + strings.ReplaceAll(s, "'", "'\\''") + "'"
|
||||
}
|
||||
|
||||
// shortClass strips the UE class path prefix and _C suffix from an actor class name.
|
||||
func shortClass(s string) string {
|
||||
if idx := strings.LastIndex(s, "/"); idx >= 0 {
|
||||
s = s[idx+1:]
|
||||
}
|
||||
s = strings.TrimSuffix(s, "_C")
|
||||
replacer := strings.NewReplacer(
|
||||
"BP_DunePlayerCharacter", "PlayerCharacter",
|
||||
"BP_DunePlayerController", "PlayerController",
|
||||
"DunePlayerState", "PlayerState",
|
||||
)
|
||||
return replacer.Replace(s)
|
||||
}
|
||||
Reference in New Issue
Block a user