docs(reference): import Dune: Awakening server-manager references
All checks were successful
CI / backend-types (push) Successful in 10s
CI / frontend-build (push) Successful in 15s
CI / agent-tests (push) Successful in 39s
CI / integration (push) Successful in 22s

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:
Vantz Stockwell
2026-06-11 21:08:05 -04:00
parent 0715492ddf
commit 651a35d4be
1334 changed files with 238971 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
-- load_takeoverable_user_ids() -> SETOF dune.takeovercharacterdatacomposite
-- oid: 58463 kind: FUNCTION category: takeover
CREATE OR REPLACE FUNCTION dune.load_takeoverable_user_ids()
RETURNS SETOF dune.takeovercharacterdatacomposite
LANGUAGE plpgsql
AS $function$
BEGIN
RETURN QUERY
SELECT acc.user, ps.character_name
FROM accounts acc LEFT JOIN player_state ps ON acc.id=ps.account_id
WHERE acc.takeoverable=true;
END; $function$

View File

@@ -0,0 +1,10 @@
-- set_account_as_takeoverable(in_user_id text, in_new_user_id text) -> void
-- oid: 58587 kind: FUNCTION category: takeover
CREATE OR REPLACE FUNCTION dune.set_account_as_takeoverable(in_user_id text, in_new_user_id text)
RETURNS void
LANGUAGE plpgsql
AS $function$
BEGIN
UPDATE accounts SET "user"=in_new_user_id, takeoverable=TRUE WHERE "user"=in_user_id;
END; $function$

View File

@@ -0,0 +1,26 @@
-- takeover_account(in_user_to_takeover text, in_current_user text) -> void
-- oid: 58601 kind: FUNCTION category: takeover
CREATE OR REPLACE FUNCTION dune.takeover_account(in_user_to_takeover text, in_current_user text)
RETURNS void
LANGUAGE plpgsql
AS $function$
DECLARE
current_funcom_id ByteA;
current_account_id BigInt;
takeover_funcom_id ByteA;
takeover_account_id BigInt;
BEGIN
select "encrypted_funcom_id", "id" into current_funcom_id, current_account_id
from encrypted_accounts WHERE "user"=in_current_user;
select "encrypted_funcom_id", "id" into takeover_funcom_id, takeover_account_id
from encrypted_accounts WHERE "user"=in_user_to_takeover;
-- Account swap
UPDATE encrypted_accounts SET "user"=in_current_user || 'TempTakeover' WHERE "id"=current_account_id;
UPDATE encrypted_accounts SET "user"=in_current_user, "encrypted_funcom_id"=current_funcom_id WHERE "id"=takeover_account_id;
UPDATE encrypted_accounts SET "user"=in_user_to_takeover, "encrypted_funcom_id"=takeover_funcom_id WHERE "id"=current_account_id;
END
$function$