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>
33 lines
830 B
Go
33 lines
830 B
Go
package main
|
|
|
|
import "gopkg.in/yaml.v3"
|
|
|
|
// parseDeploymentCredentials parses a battlegroup YAML and returns the DB user
|
|
// and password from spec.database.template.spec.deployment.spec.{user,password}.
|
|
func parseDeploymentCredentials(data []byte) (user, pass string) {
|
|
var root struct {
|
|
Spec struct {
|
|
Database struct {
|
|
Template struct {
|
|
Spec struct {
|
|
Deployment struct {
|
|
Spec struct {
|
|
User string `yaml:"user"`
|
|
Password string `yaml:"password"`
|
|
} `yaml:"spec"`
|
|
} `yaml:"deployment"`
|
|
} `yaml:"spec"`
|
|
} `yaml:"template"`
|
|
} `yaml:"database"`
|
|
} `yaml:"spec"`
|
|
}
|
|
if err := yaml.Unmarshal(data, &root); err != nil {
|
|
return "", ""
|
|
}
|
|
s := root.Spec.Database.Template.Spec.Deployment.Spec
|
|
if s.User == "" {
|
|
s.User = "dune"
|
|
}
|
|
return s.User, s.Password
|
|
}
|