Cluster-Work

This commit is contained in:
2026-08-07 21:54:37 +02:00
parent f8bf8c944e
commit dc2af7ca75
761 changed files with 939 additions and 35364 deletions

View File

@@ -159,7 +159,7 @@
$('summaryQualitySub').textContent = 'Komponenten · Wissenswaisen · Widerspruchs-Edges';
const settings = system.runtime_settings || {};
$('summaryThinking').textContent = settings.thinking_enabled ? (system.enrich_running ? 'LÄUFT' : 'AKTIV') : 'PAUSIERT';
$('summaryThinkingSub').textContent = `${num(system.relations_created)} Relationen · ${num(system.articles_created)} Artikel seit Prozessstart`;
$('summaryThinkingSub').textContent = `${num(system.relations_created)} Relationen · ${num(system.articles_created)} Artikel · ${(settings.processing_mode === 'clustered' ? 'CLUSTER/FAST' : 'PRÄZISE')}`;
const autonomous = system.autonomous_research || {};
const queue = autonomous.counts || {};
$('summaryAutonomous').textContent = settings.autonomous_research_enabled ? (autonomous.running ? 'LÄUFT' : 'AKTIV') : 'PAUSIERT';
@@ -246,7 +246,7 @@
if (!filtered.length) { body.innerHTML='<tr><td colspan="6" class="empty-state">Keine Läufe entsprechen den Filtern.</td></tr>'; return; }
body.innerHTML = filtered.map(run => {
const metrics = run.metrics || {};
const metricText = [metrics.comparisons ? `${num(metrics.comparisons)} Vergleiche` : '', metrics.research_search_results ? `${num(metrics.research_search_results)} Treffer` : '', metrics.research_accepted ? `${num(metrics.research_accepted)} Belege` : '', metrics.articles_created ? `${num(metrics.articles_created)} Artikel` : ''].filter(Boolean).join(' · ') || `${num(run.event_count)} Events`;
const metricText = [metrics.exact_comparisons ? `${num(metrics.exact_comparisons)} Cosine` : (metrics.comparisons ? `${num(metrics.comparisons)} Vergleiche` : ''), metrics.coarse_comparisons ? `${num(metrics.coarse_comparisons)} Hash` : '', metrics.research_search_results ? `${num(metrics.research_search_results)} Treffer` : '', metrics.research_accepted ? `${num(metrics.research_accepted)} Belege` : '', metrics.articles_created ? `${num(metrics.articles_created)} Artikel` : ''].filter(Boolean).join(' · ') || `${num(run.event_count)} Events`;
const open = state.openRun === run.id;
return `<tr class="run-row" data-run-id="${esc(run.id)}"><td>${clock(run.started_at)}<span class="run-meta">${new Date(run.started_at).toLocaleDateString('de-DE')}</span></td><td><span class="run-title">${esc(run.title)}</span><span class="run-meta">${esc(run.kind)}${run.trigger?` · ${esc(run.trigger)}`:''}</span></td><td><span class="status-pill ${statusClass(run.status)}">${esc(run.verdict||run.status)}</span><span class="run-meta">${esc(run.outcome||'')}</span></td><td><div class="delta-tags">${deltaTags(run.mutations)}</div></td><td>${esc(metricText)}</td><td>${run.status==='running'?'läuft':duration(run.duration_ms)}</td></tr>${open ? runDetails(run) : ''}`;
}).join('');

View File

@@ -68,3 +68,5 @@ body.low-power .glass{backdrop-filter:blur(12px)}
.filter-scope-summary{margin:2px 0 10px;line-height:1.45}.source-option.disabled{opacity:.38}.source-option.disabled span{cursor:not-allowed;border-style:dashed}.source-option span small{display:block;margin-top:2px;font-size:7px;letter-spacing:.04em;color:#8a6f79}.filter-scope-summary.warn{color:#ffb37f}.filter-scope-summary.ok{color:#7898aa}
.autonomous-research-settings{flex:0 0 auto}.autonomous-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0}.autonomous-grid label{display:block;padding:8px;border:1px solid rgba(133,200,255,.11);border-radius:10px;background:rgba(255,255,255,.02)}.autonomous-grid span{display:block;font-size:8px;color:#7893a6;margin-bottom:5px}.autonomous-grid input{width:100%;border:1px solid rgba(133,200,255,.14);background:rgba(2,8,17,.62);color:var(--text);border-radius:8px;padding:7px 8px;outline:0}.autonomous-actions{flex-wrap:wrap}.autonomous-actions button{flex:1 1 120px}.queue-title{margin-top:14px}.autonomous-queue{display:flex;flex-direction:column;gap:7px;max-height:260px;overflow:auto;padding-right:3px}.autonomous-task{position:relative;padding:9px 10px;border:1px solid rgba(133,200,255,.11);border-radius:11px;background:rgba(255,255,255,.024)}.autonomous-task.running{border-color:rgba(93,255,189,.3);box-shadow:0 0 18px rgba(93,255,189,.07)}.autonomous-task.failed{border-color:rgba(255,105,125,.24)}.autonomous-task.completed{opacity:.72}.autonomous-task-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}.autonomous-task b{font-size:10px;color:#d9f3ff;line-height:1.35}.autonomous-task em{font-style:normal;font-size:8px;color:#82e7ff;border:1px solid rgba(82,231,255,.2);border-radius:999px;padding:2px 6px;white-space:nowrap}.autonomous-task p{margin:5px 0 0;color:#7893a6;font-size:8px;line-height:1.4}.autonomous-task-meta{display:flex;gap:5px;flex-wrap:wrap;margin-top:7px}.autonomous-task-meta span{font-size:7px;color:#86a3b7;background:rgba(255,255,255,.035);border-radius:999px;padding:3px 6px}.autonomous-task button{position:absolute;right:8px;bottom:8px;border:0;background:transparent;color:#ff8ba0;font-size:8px;cursor:pointer}.autonomous-task button:hover{color:#ffc0ca}@media(max-width:720px){.autonomous-grid{grid-template-columns:1fr}.autonomous-actions button{flex-basis:100%}}
.dock .analysis-dashboard-link{display:inline-flex;align-items:center;border:1px solid rgba(82,231,255,.2);background:rgba(82,231,255,.055);color:#a9dbe8;border-radius:11px;padding:9px 11px;font-weight:700;letter-spacing:.08em;font-size:10px;white-space:nowrap}.dock .analysis-dashboard-link:hover{background:rgba(82,231,255,.12);color:#e5fbff}
.settings-processing-mode{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-top:7px}.settings-processing-mode button{border:1px solid rgba(133,200,255,.14);background:rgba(255,255,255,.025);color:#7893a6;border-radius:10px;padding:8px 9px;font-size:9px;letter-spacing:.08em;cursor:pointer}.settings-processing-mode button.active{color:var(--cyan);border-color:rgba(82,231,255,.38);background:rgba(82,231,255,.1);box-shadow:inset 0 0 18px rgba(82,231,255,.035)}

View File

@@ -51,7 +51,7 @@
lodOpenUntil: new Map(), lodHotUntil: new Map(), lodDirty: true, lodLastBuild: 0, lodNextExpiry: 0, lodZoomBand: 2,
renderNodes: [], renderEdges: [], renderIdleEdges: [], renderNodeById: new Map(), renderEdgeById: new Map(), visibleForNode: new Map(),
edgeRenderMap: new Map(), renderActive: new Map(), renderEdgeActive: new Map(), renderStats: {nodes: 0, edges: 0, hiddenNodes: 0, hiddenEdges: 0},
fullSnapshot: null, fullNodeById: new Map(), runtimeSettings: {source_filter_version: 1, learning_enabled: true, thinking_enabled: true, learning_sources: [], display_sources: [], thinking_sources: [], glpi_kb_source: '', view_mode: 'neural', max_display_nodes: 0, low_power_mode: false, autonomous_research_enabled: false, autonomous_research_idle_only: true, autonomous_research_min_priority: 0.65, autonomous_research_max_tasks_per_day: 12, autonomous_research_tasks_per_cycle: 1},
fullSnapshot: null, fullNodeById: new Map(), runtimeSettings: {source_filter_version: 1, learning_enabled: true, thinking_enabled: true, learning_sources: [], display_sources: [], thinking_sources: [], glpi_kb_source: '', view_mode: 'neural', max_display_nodes: 0, low_power_mode: false, processing_mode: 'precise', autonomous_research_enabled: false, autonomous_research_idle_only: true, autonomous_research_min_priority: 0.65, autonomous_research_max_tasks_per_day: 12, autonomous_research_tasks_per_cycle: 1},
availableSources: [], viewMode: 'neural', honeycombNodes: [], honeycombSpacing: 0, honeySlotByID: new Map(), honeyPointPool: [], honeyFreeSlots: [],
constellationNodes: [], constellationLinks: [], settingsOpen: false, settingsDraft: null,
forcedDisplayUntil: new Map(), nextDisplayLimitExpiry: 0, graphVersion: null, displaySignature: '', displayLimitStats: {limit: 0, eligible: 0, shown: 0},
@@ -328,6 +328,9 @@
if ($('settingsViewHoneycomb')) $('settingsViewHoneycomb').classList.toggle('active', panelSettings.view_mode === 'honeycomb');
if ($('settingsViewConstellation')) $('settingsViewConstellation').classList.toggle('active', panelSettings.view_mode === 'constellation');
if ($('settingsLowPower')) $('settingsLowPower').checked = Boolean(panelSettings.low_power_mode);
if ($('settingsProcessingPrecise')) $('settingsProcessingPrecise').classList.toggle('active', panelSettings.processing_mode !== 'clustered');
if ($('settingsProcessingClustered')) $('settingsProcessingClustered').classList.toggle('active', panelSettings.processing_mode === 'clustered');
if ($('processingModeHint')) $('processingModeHint').textContent = panelSettings.processing_mode === 'clustered' ? 'Cluster/Fast: Semantic Hashing ersetzt den Vollscan; nur Top-K-Kandidaten erhalten exakte Cosine-Bewertungen. Der Artikelreview nutzt einen kompakten, priorisierten Evidenzsatz.' : 'Präzise: vollständige Cosine-Suche über jeden Anchor und den gesamten gefilterten Wissensraum.';
if ($('settingsMaxDisplayNodes')) $('settingsMaxDisplayNodes').value = String(Math.max(0, Number(panelSettings.max_display_nodes || 0)));
if ($('settingsAutonomousResearch')) $('settingsAutonomousResearch').checked = Boolean(panelSettings.autonomous_research_enabled);
if ($('settingsAutonomousIdleOnly')) $('settingsAutonomousIdleOnly').checked = panelSettings.autonomous_research_idle_only !== false;
@@ -423,6 +426,7 @@
view_mode: ['neural', 'honeycomb', 'constellation'].includes(settings.view_mode) ? settings.view_mode : 'neural',
max_display_nodes: Math.max(0, Math.min(500000, Math.trunc(Number(settings.max_display_nodes) || 0))),
low_power_mode: Boolean(settings.low_power_mode),
processing_mode: settings.processing_mode === 'clustered' ? 'clustered' : 'precise',
autonomous_research_enabled: Boolean(settings.autonomous_research_enabled),
autonomous_research_idle_only: settings.autonomous_research_idle_only !== false,
autonomous_research_min_priority: Math.max(0, Math.min(1, Number(settings.autonomous_research_min_priority ?? 0.65))),
@@ -3067,6 +3071,8 @@
$('sourceSearch').addEventListener('input', e => renderSourceFilters(e.currentTarget.value));
$('settingsLearning').addEventListener('change', e => { if (state.settingsDraft) state.settingsDraft.learning_enabled = e.currentTarget.checked; });
$('settingsThinking').addEventListener('change', e => { if (state.settingsDraft) state.settingsDraft.thinking_enabled = e.currentTarget.checked; });
$('settingsProcessingPrecise')?.addEventListener('click', () => { if (state.settingsDraft) { state.settingsDraft.processing_mode = 'precise'; syncRuntimeControls(); } });
$('settingsProcessingClustered')?.addEventListener('click', () => { if (state.settingsDraft) { state.settingsDraft.processing_mode = 'clustered'; syncRuntimeControls(); } });
$('settingsLowPower').addEventListener('change', e => { if (state.settingsDraft) state.settingsDraft.low_power_mode = e.currentTarget.checked; });
$('settingsAutonomousResearch')?.addEventListener('change', e => { if (state.settingsDraft) state.settingsDraft.autonomous_research_enabled = e.currentTarget.checked; });
$('settingsAutonomousIdleOnly')?.addEventListener('change', e => { if (state.settingsDraft) state.settingsDraft.autonomous_research_idle_only = e.currentTarget.checked; });
@@ -3121,6 +3127,7 @@
state.settingsDraft.learning_enabled = $('settingsLearning').checked;
state.settingsDraft.thinking_enabled = $('settingsThinking').checked;
state.settingsDraft.low_power_mode = $('settingsLowPower').checked;
state.settingsDraft.processing_mode = state.settingsDraft.processing_mode === 'clustered' ? 'clustered' : 'precise';
state.settingsDraft.max_display_nodes = Math.max(0, Math.min(500000, Math.trunc(Number($('settingsMaxDisplayNodes').value) || 0)));
state.settingsDraft.autonomous_research_enabled = Boolean($('settingsAutonomousResearch')?.checked);
state.settingsDraft.autonomous_research_idle_only = $('settingsAutonomousIdleOnly')?.checked !== false;

View File

@@ -104,6 +104,12 @@
<span><b>Eco-Modus</b><small>30 FPS, geringere Pixeldichte und günstigere Glow-Effekte. Aktivität, Rechercheanimationen und Fades bleiben sichtbar.</small></span>
<input id="settingsLowPower" type="checkbox">
</label>
<div class="settings-section-title performance-subtitle"><h2>Brain-Verarbeitung</h2><span>Relationen & Artikel</span></div>
<div class="settings-processing-mode" role="group" aria-label="Verarbeitungsmodus">
<button id="settingsProcessingPrecise" class="active" type="button">PRÄZISE</button>
<button id="settingsProcessingClustered" type="button">CLUSTER / FAST</button>
</div>
<p id="processingModeHint" class="setting-hint">Präzise: vollständige Cosine-Suche. Cluster/Fast: Semantic Hashing + exakte Top-K-Prüfung und kompakterer Artikelreview.</p>
<div class="settings-section-title performance-subtitle"><h2>GPU-Limit</h2><span>0 = unbegrenzt</span></div>
<label class="number-setting" for="settingsMaxDisplayNodes">
<span><b>Maximal angezeigte Nodes</b><small>Begrenzt Neural- und Honeycomb-Ansicht. Aktive Notes werden bei Bedarf temporär eingeblendet und ersetzen inaktive Nodes.</small></span>