major agent refactoring: wiki knowledge base, no RAG, no Qdrant, no Ollama

This commit is contained in:
2026-04-21 21:03:24 -04:00
parent 7e4b54d701
commit 44a1688657
80 changed files with 2699 additions and 4267 deletions

View File

@@ -410,6 +410,24 @@ export class WebSocketHandler {
socket.send(JSON.stringify({ type: 'details_error', category, name, error: 'Failed to read details' }));
}
}
} else if (payload.type === 'read_output') {
// Read persisted output (analysis + images) for a research item
const { category, name } = payload;
if (!harness) {
socket.send(JSON.stringify({ type: 'output_error', category, name, error: 'Session not ready' }));
} else {
try {
const output = await harness.readOutput(category, name);
if (!output) {
socket.send(JSON.stringify({ type: 'output_error', category, name, error: 'No output found — run the script first' }));
} else {
socket.send(jsonStringifySafe({ type: 'output_data', category, name, ...output }));
}
} catch (error) {
logger.error({ error, category, name }, 'Error reading output');
socket.send(JSON.stringify({ type: 'output_error', category, name, error: 'Failed to read output' }));
}
}
} else if (payload.type === 'update_details') {
// User submitted a revised details string — diff and invoke the appropriate subagent
const { category, name, details: newDetails } = payload;
@@ -790,7 +808,7 @@ export class WebSocketHandler {
break;
}
try {
const mcpResult = await harness.callMcpTool('evaluate_indicator', {
const mcpResult = await harness.callMcpTool('EvaluateIndicator', {
symbol: payload.symbol,
from_time: payload.from_time,
to_time: payload.to_time,