data pipeline refactor and fix
This commit is contained in:
@@ -16,6 +16,8 @@ import { ContainerManager } from './k8s/container-manager.js';
|
||||
import { ZMQRelayClient } from './clients/zmq-relay-client.js';
|
||||
import { IcebergClient } from './clients/iceberg-client.js';
|
||||
import { ConversationStore } from './harness/memory/conversation-store.js';
|
||||
import { BlobStore } from './harness/memory/blob-store.js';
|
||||
import { ConversationService } from './services/conversation-service.js';
|
||||
import { AgentHarness, type HarnessSessionConfig } from './harness/agent-harness.js';
|
||||
import { OHLCService } from './services/ohlc-service.js';
|
||||
import { SymbolIndexService } from './services/symbol-index-service.js';
|
||||
@@ -369,12 +371,17 @@ try {
|
||||
const conversationStore = new ConversationStore(redis, app.log, icebergClient);
|
||||
app.log.debug('Conversation store initialized');
|
||||
|
||||
const blobStore = new BlobStore(icebergClient, app.log);
|
||||
const conversationService = new ConversationService(conversationStore, blobStore, app.log);
|
||||
app.log.debug('Blob store and conversation service initialized');
|
||||
|
||||
// Harness factory: captures infrastructure deps; channel handlers stay infrastructure-free
|
||||
function createHarness(sessionConfig: HarnessSessionConfig): AgentHarness {
|
||||
return new AgentHarness({
|
||||
...sessionConfig,
|
||||
providerConfig: config.providerConfig,
|
||||
conversationStore,
|
||||
blobStore,
|
||||
historyLimit: config.conversationHistoryLimit,
|
||||
});
|
||||
}
|
||||
@@ -391,6 +398,7 @@ const websocketHandler = new WebSocketHandler({
|
||||
createHarness,
|
||||
ohlcService, // Optional
|
||||
symbolIndexService, // Optional
|
||||
conversationService, // Optional - for history replay on reconnect
|
||||
});
|
||||
app.log.debug('WebSocket handler initialized');
|
||||
|
||||
@@ -614,6 +622,19 @@ try {
|
||||
mcpTools: [],
|
||||
});
|
||||
|
||||
// Strategy subagent: all strategy-related MCP tools
|
||||
toolRegistry.registerAgentTools({
|
||||
agentName: 'strategy',
|
||||
platformTools: [],
|
||||
mcpTools: [
|
||||
'python_write', 'python_edit', 'python_read', 'python_list',
|
||||
'python_log', 'python_revert',
|
||||
'backtest_strategy', 'activate_strategy', 'deactivate_strategy',
|
||||
'list_active_strategies', 'get_backtest_results',
|
||||
'get_strategy_trades', 'get_strategy_events',
|
||||
],
|
||||
});
|
||||
|
||||
app.log.info(
|
||||
{
|
||||
agents: toolRegistry.getRegisteredAgents(),
|
||||
|
||||
Reference in New Issue
Block a user