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,11 @@
-- delete_all_dungeon_completions(in_dungeon_id text) -> void
-- oid: 58202 kind: FUNCTION category: dungeon
CREATE OR REPLACE FUNCTION dune.delete_all_dungeon_completions(in_dungeon_id text)
RETURNS void
LANGUAGE plpgsql
AS $function$
begin
DELETE FROM dungeon_completion WHERE dungeon_id = in_dungeon_id;
end
$function$

View File

@@ -0,0 +1,20 @@
-- delete_all_dungeon_completions_by_player(in_dungeon_id text, in_player_id bigint, in_keep_completion_for_other_players boolean) -> void
-- oid: 58203 kind: FUNCTION category: dungeon
CREATE OR REPLACE FUNCTION dune.delete_all_dungeon_completions_by_player(in_dungeon_id text, in_player_id bigint, in_keep_completion_for_other_players boolean)
RETURNS void
LANGUAGE plpgsql
AS $function$
begin
DELETE FROM dungeon_completion WHERE
NOT in_keep_completion_for_other_players AND
dungeon_id = in_dungeon_id AND
completion_id IN (SELECT completion_id FROM dungeon_completion_players WHERE player_id = in_player_id);
DELETE FROM dungeon_completion_players
WHERE
in_keep_completion_for_other_players AND
player_id = in_player_id AND
completion_id IN (SELECT completion_id FROM dungeon_completion WHERE dungeon_id = in_dungeon_id);
end
$function$

View File

@@ -0,0 +1,15 @@
-- delete_all_dungeon_completions_for_all_dungeons_by_player(in_player_id bigint, in_keep_completion_for_other_players boolean) -> void
-- oid: 58204 kind: FUNCTION category: dungeon
CREATE OR REPLACE FUNCTION dune.delete_all_dungeon_completions_for_all_dungeons_by_player(in_player_id bigint, in_keep_completion_for_other_players boolean)
RETURNS void
LANGUAGE plpgsql
AS $function$
begin
DELETE FROM dungeon_completion WHERE
NOT in_keep_completion_for_other_players AND
completion_id IN (SELECT completion_id FROM dungeon_completion_players WHERE player_id = in_player_id);
DELETE FROM dungeon_completion_players WHERE in_keep_completion_for_other_players AND player_id = in_player_id;
end
$function$

View File

@@ -0,0 +1,15 @@
-- record_dungeon_completion(in_dungeon_id text, in_difficulty integer, in_duration_ms integer, players_ids bigint[]) -> void
-- oid: 58503 kind: FUNCTION category: dungeon
CREATE OR REPLACE FUNCTION dune.record_dungeon_completion(in_dungeon_id text, in_difficulty integer, in_duration_ms integer, players_ids bigint[])
RETURNS void
LANGUAGE plpgsql
AS $function$
DECLARE
new_completion_id BIGINT;
begin
INSERT INTO dungeon_completion VALUES (DEFAULT, in_dungeon_id, in_difficulty, in_duration_ms, array_length(players_ids, 1))
RETURNING completion_id INTO new_completion_id;
INSERT INTO dungeon_completion_players SELECT t.player_id, new_completion_id FROM UNNEST(players_ids) AS t(player_id);
end
$function$