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,9 @@
-- debug_add_test_table_data(in_entry text) -> void
-- oid: 58187 kind: FUNCTION category: debug
CREATE OR REPLACE FUNCTION dune.debug_add_test_table_data(in_entry text)
RETURNS void
LANGUAGE sql
AS $function$
insert into debug_test_table("entry") VALUES (in_entry);
$function$

View File

@@ -0,0 +1,9 @@
-- debug_collect_test_table_data() -> SETOF text
-- oid: 58188 kind: FUNCTION category: debug
CREATE OR REPLACE FUNCTION dune.debug_collect_test_table_data()
RETURNS SETOF text
LANGUAGE sql
AS $function$
select entry from debug_test_table;
$function$

View File

@@ -0,0 +1,12 @@
-- debug_echo(in_text text, in_notices text[]) -> text
-- oid: 58189 kind: FUNCTION category: debug
CREATE OR REPLACE FUNCTION dune.debug_echo(in_text text, in_notices text[])
RETURNS text
LANGUAGE plpgsql
AS $function$
BEGIN
perform debug_raise_notices(in_notices);
return in_text;
END;
$function$

View File

@@ -0,0 +1,42 @@
-- debug_get_coriolis_seeds() -> TABLE(farm_seed integer, map_names text[], map_seeds integer[], partitions_ids bigint[], partitions_map text[], partitions_seeds integer[])
-- oid: 58190 kind: FUNCTION category: debug
CREATE OR REPLACE FUNCTION dune.debug_get_coriolis_seeds()
RETURNS TABLE(farm_seed integer, map_names text[], map_seeds integer[], partitions_ids bigint[], partitions_map text[], partitions_seeds integer[])
LANGUAGE plpgsql
AS $function$
begin
RETURN QUERY
WITH
map_seeds as (
SELECT array_agg(map_name) as map_name, array_agg(seed) as seed
FROM (
SELECT COALESCE(map_seed.map, partition.map) AS map_name, COALESCE(map_seed.world_reset_seed, -1) AS seed
FROM world_map_reset_seed AS map_seed FULL JOIN world_partition as partition ON map_seed.map = partition.map
GROUP BY map_seed.map, partition.map, map_seed.world_reset_seed
ORDER BY map_name ASC
) as maps_temp
),
partitions_seeds as (
SELECT array_agg(partition_id) as partition_id, array_agg(map_name) as map_name, array_agg(seed) as seed
FROM (
SELECT partition.partition_id as partition_id, partition.map as map_name, COALESCE(partition_seed.world_reset_seed, -1) AS seed
FROM world_partition_reset_seed AS partition_seed FULL JOIN world_partition as partition ON partition_seed.partition_id = partition.partition_id
GROUP BY partition.map, partition.partition_id, partition_seed.world_reset_seed
ORDER BY partition.partition_id ASC
) as partitions_temp
)
SELECT
COALESCE(world_reset_seed, -1),
COALESCE(map_seeds.map_name, array[]::TEXT[]),
COALESCE(map_seeds.seed, array[]::Integer[]),
COALESCE(partitions_seeds.partition_id, array[]::BigInt[]),
COALESCE(partitions_seeds.map_name, array[]::TEXT[]),
COALESCE(partitions_seeds.seed, array[]::Integer[])
FROM
world_farm_reset_seed,
map_seeds,
partitions_seeds;
end
$function$

View File

@@ -0,0 +1,12 @@
-- debug_raise_exception(in_exception text, in_notices text[]) -> void
-- oid: 58191 kind: FUNCTION category: debug
CREATE OR REPLACE FUNCTION dune.debug_raise_exception(in_exception text, in_notices text[])
RETURNS void
LANGUAGE plpgsql
AS $function$
BEGIN
perform debug_raise_notices(in_notices);
RAISE EXCEPTION '%', in_exception;
END;
$function$

View File

@@ -0,0 +1,16 @@
-- debug_raise_notices(in_notices text[]) -> void
-- oid: 58192 kind: FUNCTION category: debug
CREATE OR REPLACE FUNCTION dune.debug_raise_notices(in_notices text[])
RETURNS void
LANGUAGE plpgsql
AS $function$
BEGIN
IF array_length(in_notices, 1) IS NOT NULL THEN
FOR i IN 0..array_length(in_notices, 1)-1
LOOP
RAISE NOTICE '%', in_notices[i];
END LOOP;
END IF;
END;
$function$

View File

@@ -0,0 +1,9 @@
-- debug_reset_test_table() -> void
-- oid: 58193 kind: FUNCTION category: debug
CREATE OR REPLACE FUNCTION dune.debug_reset_test_table()
RETURNS void
LANGUAGE sql
AS $function$
truncate debug_test_table;
$function$

View File

@@ -0,0 +1,21 @@
-- debug_set_farm_seed(in_new_coriolis_seed integer) -> void
-- oid: 58194 kind: FUNCTION category: debug
CREATE OR REPLACE FUNCTION dune.debug_set_farm_seed(in_new_coriolis_seed integer)
RETURNS void
LANGUAGE plpgsql
AS $function$
begin
UPDATE world_farm_reset_seed SET world_reset_seed = in_new_coriolis_seed WHERE onerow_id = TRUE;
UPDATE world_map_reset_seed SET world_reset_seed = in_new_coriolis_seed;
INSERT INTO world_map_reset_seed SELECT map, in_new_coriolis_seed FROM world_partition GROUP BY map
ON CONFLICT(map) DO
UPDATE SET world_reset_seed = in_new_coriolis_seed;
UPDATE world_partition_reset_seed SET world_reset_seed = in_new_coriolis_seed;
INSERT INTO world_partition_reset_seed SELECT partition_id, in_new_coriolis_seed FROM world_partition GROUP BY partition_id
ON CONFLICT(partition_id) DO
UPDATE SET world_reset_seed = in_new_coriolis_seed;
end
$function$

View File

@@ -0,0 +1,18 @@
-- debug_set_map_seed(in_map text, in_new_coriolis_seed integer) -> void
-- oid: 58195 kind: FUNCTION category: debug
CREATE OR REPLACE FUNCTION dune.debug_set_map_seed(in_map text, in_new_coriolis_seed integer)
RETURNS void
LANGUAGE plpgsql
AS $function$
begin
INSERT INTO world_map_reset_seed (map, world_reset_seed) Values(in_server_info.map, in_new_coriolis_seed)
ON CONFLICT(map) DO
UPDATE SET world_reset_seed = in_new_coriolis_seed;
UPDATE world_partition_reset_seed SET world_reset_seed = in_new_coriolis_seed WHERE map = in_map;
INSERT INTO world_partition_reset_seed SELECT partition_id, in_new_coriolis_seed FROM world_partition WHERE map = in_map GROUP BY partition_id
ON CONFLICT(partition_id) DO
UPDATE SET world_reset_seed = in_new_coriolis_seed;
end
$function$

View File

@@ -0,0 +1,13 @@
-- debug_set_partition_seed(in_partition_id bigint, in_new_coriolis_seed integer) -> void
-- oid: 58196 kind: FUNCTION category: debug
CREATE OR REPLACE FUNCTION dune.debug_set_partition_seed(in_partition_id bigint, in_new_coriolis_seed integer)
RETURNS void
LANGUAGE plpgsql
AS $function$
begin
INSERT INTO world_partition_reset_seed (partition_id, world_reset_seed) Values(in_server_info.partition_id, in_new_coriolis_seed)
ON CONFLICT(partition_id) DO
UPDATE SET world_reset_seed = in_new_coriolis_seed;
end
$function$