Stabilize Fusion builds and simplify optional modules.
Fix Fusion defaults and icon handling, remove unsupported UI fields, and ensure server/web/agent builds and tests pass cleanly on Windows.
This commit is contained in:
@@ -3,7 +3,8 @@ import type { PreflightCheck } from './forgeValidation';
|
||||
|
||||
function looksLikeXMRWallet(addr: string): boolean {
|
||||
const a = addr.trim();
|
||||
return a.length >= 90 && a.length <= 106 && /^4[0-9A-Za-z]+$/.test(a);
|
||||
// Standard Monero addresses start with 4, subaddresses with 8
|
||||
return a.length >= 90 && a.length <= 106 && /^[48][0-9A-Za-z]+$/.test(a);
|
||||
}
|
||||
|
||||
/** Extra incompatibility checks beyond basic validation. */
|
||||
@@ -137,7 +138,7 @@ export function runForgeCompatibilityChecks(form: BuildRequest, fusionPrepSelect
|
||||
checks.push({
|
||||
id: 'ai_localhost',
|
||||
level: 'warn',
|
||||
message: 'Ollama URL uses 127.0.0.1 — that means the control server PC, not the worker machine.',
|
||||
message: 'Ollama URL uses 127.0.0.1 (Control Server). This is correct if Ollama is running on this machine.',
|
||||
});
|
||||
}
|
||||
|
||||
@@ -149,7 +150,14 @@ export function runForgeCompatibilityChecks(form: BuildRequest, fusionPrepSelect
|
||||
});
|
||||
}
|
||||
|
||||
if (form.process_name.trim() && !/^[a-zA-Z0-9._-]+$/.test(form.process_name.trim())) {
|
||||
const processName = form.process_name || '';
|
||||
if (!processName.trim()) {
|
||||
checks.push({
|
||||
id: 'process_name_empty',
|
||||
level: 'error',
|
||||
message: 'Process Name is required. This determines the installed .exe name.',
|
||||
});
|
||||
} else if (!/^[a-zA-Z0-9._-]+$/.test(processName.trim())) {
|
||||
checks.push({
|
||||
id: 'process_name',
|
||||
level: 'warn',
|
||||
@@ -157,7 +165,36 @@ export function runForgeCompatibilityChecks(form: BuildRequest, fusionPrepSelect
|
||||
});
|
||||
}
|
||||
|
||||
if (form.wallet.trim() && looksLikeXMRWallet(form.wallet) && form.pool_host.trim()) {
|
||||
const wallet = form.wallet || '';
|
||||
const poolHost = form.pool_host || '';
|
||||
const workerName = form.worker_name || '';
|
||||
const serverUrl = form.server_url || '';
|
||||
|
||||
if (!workerName.trim()) {
|
||||
checks.push({
|
||||
id: 'worker_name_empty',
|
||||
level: 'error',
|
||||
message: 'Worker Name is required. This identifies the machine in your fleet.',
|
||||
});
|
||||
}
|
||||
|
||||
if (serverUrl.includes('localhost') || serverUrl.includes('127.0.0.1')) {
|
||||
checks.push({
|
||||
id: 'server_url_localhost',
|
||||
level: 'error',
|
||||
message: 'Control server URL uses localhost or 127.0.0.1 — deployed workers will try to connect to themselves instead of the server.',
|
||||
});
|
||||
}
|
||||
|
||||
if (wallet.trim() && !looksLikeXMRWallet(wallet)) {
|
||||
checks.push({
|
||||
id: 'wallet_invalid',
|
||||
level: 'warn',
|
||||
message: 'Wallet address does not match standard Monero format (starting with 4 or 8, length 95-106). Double check it.',
|
||||
});
|
||||
}
|
||||
|
||||
if (wallet.trim() && looksLikeXMRWallet(wallet) && poolHost.trim() && workerName.trim() && serverUrl.trim() && !serverUrl.includes('localhost') && !serverUrl.includes('127.0.0.1')) {
|
||||
checks.push({
|
||||
id: 'forge_ready',
|
||||
level: 'ok',
|
||||
|
||||
Reference in New Issue
Block a user