Major WHOOSH system refactoring and feature enhancements

- Migrated from HIVE branding to WHOOSH across all components
- Enhanced backend API with new services: AI models, BZZZ integration, templates, members
- Added comprehensive testing suite with security, performance, and integration tests
- Improved frontend with new components for project setup, AI models, and team management
- Updated MCP server implementation with WHOOSH-specific tools and resources
- Enhanced deployment configurations with production-ready Docker setups
- Added comprehensive documentation and setup guides
- Implemented age encryption service and UCXL integration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
anthonyrawlins
2025-08-27 08:34:48 +10:00
parent 0e9844ef13
commit 268214d971
399 changed files with 57390 additions and 2045 deletions

View File

@@ -1 +0,0 @@
{"version":3,"file":"hive-client.d.ts","sourceRoot":"","sources":["../src/hive-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,SAAS,MAAM,IAAI,CAAC;AAE3B,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,KAAK;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;IACzC,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC9B,UAAU,CAAC,EAAE;QACX,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,WAAW,CAAC,EAAE,MAA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AE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC;IAWb,YAAY,IAAI,OAAO,CAAC,GAAG,EAAE,CAAC;IAK9B,cAAc,CAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IAKnF,eAAe,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,CAAC;IAMpG,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC;IAK1C,UAAU,IAAI,OAAO,CAAC,MAAM,CAAC;IAK7B,aAAa,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC;IAOlD,gBAAgB,CAAC,KAAK,GAAE,MAAkB,GAAG,OAAO,CAAC,SAAS,CAAC;IA0B/D,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAMlC"}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
{"version":3,"file":"hive-resources.d.ts","sourceRoot":"","sources":["../src/hive-resources.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,qBAAa,aAAa;IACxB,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAI5B,eAAe,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAqDtC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC;YA0ClH,wBAAwB;YAcxB,iBAAiB;YAkCjB,sBAAsB;YA0BtB,yBAAyB;YA4BzB,oBAAoB;YA0BpB,qBAAqB;YA6BrB,kBAAkB;YAclB,uBAAuB;IAyDrC,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,qBAAqB;IAa7B,OAAO,CAAC,gBAAgB;IAqBxB,OAAO,CAAC,oBAAoB;IAiB5B,OAAO,CAAC,0BAA0B;IAOlC,OAAO,CAAC,iBAAiB;CAM1B"}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
{"version":3,"file":"hive-tools.d.ts","sourceRoot":"","sources":["../src/hive-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAe,MAAM,kBAAkB,CAAC;AAM3D,qBAAa,SAAS;IACpB,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC,WAAW,IAAI,IAAI,EAAE;IA2Qf,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;YA2E1D,SAAS;YAiDT,aAAa;YAkBb,UAAU;YA6BV,OAAO;YAoBP,QAAQ;YAsBR,YAAY;YAqBZ,cAAc;YAiBd,eAAe;YAiBf,gBAAgB;YAuBhB,UAAU;YAaV,aAAa;YAsBb,qBAAqB;YAuCrB,eAAe;YA0Ff,gBAAgB;YA4ChB,YAAY;YAyCZ,2BAA2B;CAuD1C"}

File diff suppressed because one or more lines are too long

View File

@@ -1,8 +1,8 @@
#!/usr/bin/env node
/**
* Hive MCP Server
* WHOOSH MCP Server
*
* Exposes the Hive Distributed AI Orchestration Platform via Model Context Protocol (MCP)
* Exposes the WHOOSH Distributed AI Orchestration Platform via Model Context Protocol (MCP)
* Allows AI assistants like Claude to directly orchestrate distributed development tasks
*/
export {};

View File

@@ -1,26 +1,26 @@
#!/usr/bin/env node
/**
* Hive MCP Server
* WHOOSH MCP Server
*
* Exposes the Hive Distributed AI Orchestration Platform via Model Context Protocol (MCP)
* Exposes the WHOOSH Distributed AI Orchestration Platform via Model Context Protocol (MCP)
* Allows AI assistants like Claude to directly orchestrate distributed development tasks
*/
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { CallToolRequestSchema, ListResourcesRequestSchema, ListToolsRequestSchema, ReadResourceRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
import { HiveClient } from './hive-client.js';
import { HiveTools } from './hive-tools.js';
import { HiveResources } from './hive-resources.js';
class HiveMCPServer {
import { WHOOSHClient } from './whoosh-client.js';
import { WHOOSHTools } from './whoosh-tools.js';
import { WHOOSHResources } from './whoosh-resources.js';
class WHOOSHMCPServer {
server;
hiveClient;
hiveTools;
hiveResources;
whooshClient;
whooshTools;
whooshResources;
discoveryInterval;
isDaemonMode = false;
constructor() {
this.server = new Server({
name: 'hive-mcp-server',
name: 'whoosh-mcp-server',
version: '1.0.0',
}, {
capabilities: {
@@ -28,32 +28,32 @@ class HiveMCPServer {
resources: {},
},
});
// Initialize Hive client and handlers
this.hiveClient = new HiveClient();
this.hiveTools = new HiveTools(this.hiveClient);
this.hiveResources = new HiveResources(this.hiveClient);
// Initialize WHOOSH client and handlers
this.whooshClient = new WHOOSHClient();
this.whooshTools = new WHOOSHTools(this.whooshClient);
this.whooshResources = new WHOOSHResources(this.whooshClient);
this.setupHandlers();
}
setupHandlers() {
// Tools handler - exposes Hive operations as MCP tools
// Tools handler - exposes WHOOSH operations as MCP tools
this.server.setRequestHandler(ListToolsRequestSchema, async () => {
return {
tools: this.hiveTools.getAllTools(),
tools: this.whooshTools.getAllTools(),
};
});
this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
const { name, arguments: args } = request.params;
return await this.hiveTools.executeTool(name, args || {});
return await this.whooshTools.executeTool(name, args || {});
});
// Resources handler - exposes Hive cluster state as MCP resources
// Resources handler - exposes WHOOSH cluster state as MCP resources
this.server.setRequestHandler(ListResourcesRequestSchema, async () => {
return {
resources: await this.hiveResources.getAllResources(),
resources: await this.whooshResources.getAllResources(),
};
});
this.server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
const { uri } = request.params;
return await this.hiveResources.readResource(uri);
return await this.whooshResources.readResource(uri);
});
// Error handling
this.server.onerror = (error) => {
@@ -71,19 +71,19 @@ class HiveMCPServer {
});
}
async start() {
console.log('🐝 Starting Hive MCP Server...');
console.log('🐝 Starting WHOOSH MCP Server...');
// Check for daemon mode
this.isDaemonMode = process.argv.includes('--daemon');
if (this.isDaemonMode) {
console.log('🔧 Running in daemon mode');
}
// Test connection to Hive backend
// Test connection to WHOOSH backend
try {
await this.hiveClient.testConnection();
console.log('✅ Connected to Hive backend successfully');
await this.whooshClient.testConnection();
console.log('✅ Connected to WHOOSH backend successfully');
}
catch (error) {
console.error('❌ Failed to connect to Hive backend:', error);
console.error('❌ Failed to connect to WHOOSH backend:', error);
process.exit(1);
}
// Auto-discover and register agents on startup
@@ -100,7 +100,7 @@ class HiveMCPServer {
this.setupPeriodicDiscovery();
}
if (this.isDaemonMode) {
console.log('🚀 Hive MCP Server running in daemon mode');
console.log('🚀 WHOOSH MCP Server running in daemon mode');
console.log('🔗 Monitoring cluster and auto-discovering agents...');
// Keep the process alive in daemon mode
setInterval(() => {
@@ -110,7 +110,7 @@ class HiveMCPServer {
else {
const transport = new StdioServerTransport();
await this.server.connect(transport);
console.log('🚀 Hive MCP Server running on stdio');
console.log('🚀 WHOOSH MCP Server running on stdio');
console.log('🔗 AI assistants can now orchestrate your distributed cluster!');
}
}
@@ -129,8 +129,8 @@ class HiveMCPServer {
}, interval);
}
async autoDiscoverAgents() {
// Use the existing hive_bring_online functionality
const result = await this.hiveTools.executeTool('hive_bring_online', {
// Use the existing whoosh_bring_online functionality
const result = await this.whooshTools.executeTool('whoosh_bring_online', {
force_refresh: false,
subnet_scan: true
});
@@ -139,20 +139,20 @@ class HiveMCPServer {
}
}
async shutdown() {
console.log('🛑 Shutting down Hive MCP Server...');
console.log('🛑 Shutting down WHOOSH MCP Server...');
if (this.discoveryInterval) {
clearInterval(this.discoveryInterval);
console.log('✅ Stopped periodic auto-discovery');
}
await this.server.close();
console.log('✅ Hive MCP Server stopped');
console.log('✅ WHOOSH MCP Server stopped');
process.exit(0);
}
}
// Start the server
const server = new HiveMCPServer();
const server = new WHOOSHMCPServer();
server.start().catch((error) => {
console.error('Failed to start Hive MCP Server:', error);
console.error('Failed to start WHOOSH MCP Server:', error);
process.exit(1);
});
//# sourceMappingURL=index.js.map

View File

@@ -1,10 +1,10 @@
/**
* Hive Client
* WHOOSH Client
*
* Handles communication with the Hive backend API
* Handles communication with the WHOOSH backend API
*/
import WebSocket from 'ws';
export interface HiveConfig {
export interface WHOOSHConfig {
baseUrl: string;
wsUrl: string;
timeout: number;
@@ -59,11 +59,11 @@ export interface ClusterStatus {
failed: number;
};
}
export declare class HiveClient {
export declare class WHOOSHClient {
private api;
private config;
private wsConnection?;
constructor(config?: Partial<HiveConfig>);
constructor(config?: Partial<WHOOSHConfig>);
testConnection(): Promise<boolean>;
getAgents(): Promise<Agent[]>;
registerAgent(agentData: Partial<Agent>): Promise<{
@@ -117,4 +117,4 @@ export declare class HiveClient {
connectWebSocket(topic?: string): Promise<WebSocket>;
disconnect(): Promise<void>;
}
//# sourceMappingURL=hive-client.d.ts.map
//# sourceMappingURL=whoosh-client.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"whoosh-client.d.ts","sourceRoot":"","sources":["../src/whoosh-client.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,SAAS,MAAM,IAAI,CAAC;AAE3B,MAAM,WAAW,UAAU;IAC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O,CAAC,GAAG,EAAE,CAAC;IAOlD,gBAAgB,CAAC,KAAK,GAAE,MAAkB,GAAG,OAAO,CAAC,SAAS,CAAC;IA0B/D,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAMlC"}

View File

@@ -1,19 +1,19 @@
/**
* Hive Client
* WHOOSH Client
*
* Handles communication with the Hive backend API
* Handles communication with the WHOOSH backend API
*/
import axios from 'axios';
import WebSocket from 'ws';
export class HiveClient {
export class WHOOSHClient {
api;
config;
wsConnection;
constructor(config) {
this.config = {
baseUrl: process.env.HIVE_API_URL || 'https://hive.home.deepblack.cloud/api',
wsUrl: process.env.HIVE_WS_URL || 'wss://hive.home.deepblack.cloud/socket.io',
timeout: parseInt(process.env.HIVE_TIMEOUT || '30000'),
baseUrl: process.env.WHOOSH_API_URL || 'https://whoosh.home.deepblack.cloud/api',
wsUrl: process.env.WHOOSH_WS_URL || 'wss://whoosh.home.deepblack.cloud/socket.io',
timeout: parseInt(process.env.WHOOSH_TIMEOUT || '30000'),
...config,
};
this.api = axios.create({
@@ -30,7 +30,7 @@ export class HiveClient {
return response.data.status === 'healthy' || response.status === 200;
}
catch (error) {
throw new Error(`Failed to connect to Hive: ${error}`);
throw new Error(`Failed to connect to WHOOSH: ${error}`);
}
}
// Agent Management
@@ -119,7 +119,7 @@ export class HiveClient {
return new Promise((resolve, reject) => {
const ws = new WebSocket(`${this.config.wsUrl}/ws/${topic}`);
ws.on('open', () => {
console.log(`🔗 Connected to Hive WebSocket (${topic})`);
console.log(`🔗 Connected to WHOOSH WebSocket (${topic})`);
this.wsConnection = ws;
resolve(ws);
});
@@ -130,7 +130,7 @@ export class HiveClient {
ws.on('message', (data) => {
try {
const message = JSON.parse(data.toString());
console.log('📨 Hive update:', message);
console.log('📨 WHOOSH update:', message);
}
catch (error) {
console.error('Failed to parse WebSocket message:', error);
@@ -145,4 +145,4 @@ export class HiveClient {
}
}
}
//# sourceMappingURL=hive-client.js.map
//# sourceMappingURL=whoosh-client.js.map

1
mcp-server/dist/whoosh-client.js.map vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,13 +1,13 @@
/**
* Hive Resources
* WHOOSH Resources
*
* Defines MCP resources that expose Hive cluster state and real-time data
* Defines MCP resources that expose WHOOSH cluster state and real-time data
*/
import { Resource } from '@modelcontextprotocol/sdk/types.js';
import { HiveClient } from './hive-client.js';
export declare class HiveResources {
private hiveClient;
constructor(hiveClient: HiveClient);
import { WHOOSHClient } from './whoosh-client.js';
export declare class WHOOSHResources {
private whooshClient;
constructor(whooshClient: WHOOSHClient);
getAllResources(): Promise<Resource[]>;
readResource(uri: string): Promise<{
contents: Array<{
@@ -32,4 +32,4 @@ export declare class HiveResources {
private summarizeExecutionStatuses;
private calculateDuration;
}
//# sourceMappingURL=hive-resources.d.ts.map
//# sourceMappingURL=whoosh-resources.d.ts.map

View File

@@ -0,0 +1 @@
{"version":3,"file":"whoosh-resources.d.ts","sourceRoot":"","sources":["../src/whoosh-resources.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oCAAoC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,qBAAa,aAAa;IACxB,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAI5B,eAAe,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;IAqDtC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,QAAQ,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,IAAI,CAAC,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE,CAAC;YA0ClH,wBAAwB;YAcxB,iBAAiB;YAkCjB,sBAAsB;YA0BtB,yBAAyB;YA4BzB,oBAAoB;YA0BpB,qBAAqB;YA6BrB,kBAAkB;YAclB,uBAAuB;IAyDrC,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,qBAAqB;IAa7B,OAAO,CAAC,gBAAgB;IAqBxB,OAAO,CAAC,oBAAoB;IAiB5B,OAAO,CAAC,0BAA0B;IAOlC,OAAO,CAAC,iBAAiB;CAM1B"}

View File

@@ -1,59 +1,59 @@
/**
* Hive Resources
* WHOOSH Resources
*
* Defines MCP resources that expose Hive cluster state and real-time data
* Defines MCP resources that expose WHOOSH cluster state and real-time data
*/
export class HiveResources {
hiveClient;
constructor(hiveClient) {
this.hiveClient = hiveClient;
export class WHOOSHResources {
whooshClient;
constructor(whooshClient) {
this.whooshClient = whooshClient;
}
async getAllResources() {
return [
{
uri: 'hive://cluster/status',
uri: 'whoosh://cluster/status',
name: 'Cluster Status',
description: 'Real-time status of the entire Hive cluster including agents and tasks',
description: 'Real-time status of the entire WHOOSH cluster including agents and tasks',
mimeType: 'application/json',
},
{
uri: 'hive://agents/list',
uri: 'whoosh://agents/list',
name: 'Agent Registry',
description: 'List of all registered AI agents with their capabilities and current status',
mimeType: 'application/json',
},
{
uri: 'hive://tasks/active',
uri: 'whoosh://tasks/active',
name: 'Active Tasks',
description: 'Currently running and pending tasks across the cluster',
mimeType: 'application/json',
},
{
uri: 'hive://tasks/completed',
uri: 'whoosh://tasks/completed',
name: 'Completed Tasks',
description: 'Recently completed tasks with results and performance metrics',
mimeType: 'application/json',
},
{
uri: 'hive://workflows/available',
uri: 'whoosh://workflows/available',
name: 'Available Workflows',
description: 'All configured workflows ready for execution',
mimeType: 'application/json',
},
{
uri: 'hive://executions/recent',
uri: 'whoosh://executions/recent',
name: 'Recent Executions',
description: 'Recent workflow executions with status and results',
mimeType: 'application/json',
},
{
uri: 'hive://metrics/prometheus',
uri: 'whoosh://metrics/prometheus',
name: 'Cluster Metrics',
description: 'Prometheus metrics for monitoring cluster performance',
mimeType: 'text/plain',
},
{
uri: 'hive://capabilities/overview',
uri: 'whoosh://capabilities/overview',
name: 'Cluster Capabilities',
description: 'Overview of available agent types and their specializations',
mimeType: 'application/json',
@@ -63,21 +63,21 @@ export class HiveResources {
async readResource(uri) {
try {
switch (uri) {
case 'hive://cluster/status':
case 'whoosh://cluster/status':
return await this.getClusterStatusResource();
case 'hive://agents/list':
case 'whoosh://agents/list':
return await this.getAgentsResource();
case 'hive://tasks/active':
case 'whoosh://tasks/active':
return await this.getActiveTasksResource();
case 'hive://tasks/completed':
case 'whoosh://tasks/completed':
return await this.getCompletedTasksResource();
case 'hive://workflows/available':
case 'whoosh://workflows/available':
return await this.getWorkflowsResource();
case 'hive://executions/recent':
case 'whoosh://executions/recent':
return await this.getExecutionsResource();
case 'hive://metrics/prometheus':
case 'whoosh://metrics/prometheus':
return await this.getMetricsResource();
case 'hive://capabilities/overview':
case 'whoosh://capabilities/overview':
return await this.getCapabilitiesResource();
default:
throw new Error(`Resource not found: ${uri}`);
@@ -95,7 +95,7 @@ export class HiveResources {
}
}
async getClusterStatusResource() {
const status = await this.hiveClient.getClusterStatus();
const status = await this.whooshClient.getClusterStatus();
return {
contents: [
{
@@ -107,7 +107,7 @@ export class HiveResources {
};
}
async getAgentsResource() {
const agents = await this.hiveClient.getAgents();
const agents = await this.whooshClient.getAgents();
const agentData = {
total_agents: agents.length,
agents: agents.map(agent => ({
@@ -138,8 +138,8 @@ export class HiveResources {
};
}
async getActiveTasksResource() {
const pendingTasks = await this.hiveClient.getTasks({ status: 'pending', limit: 50 });
const runningTasks = await this.hiveClient.getTasks({ status: 'in_progress', limit: 50 });
const pendingTasks = await this.whooshClient.getTasks({ status: 'pending', limit: 50 });
const runningTasks = await this.whooshClient.getTasks({ status: 'in_progress', limit: 50 });
const activeData = {
summary: {
pending: pendingTasks.length,
@@ -161,8 +161,8 @@ export class HiveResources {
};
}
async getCompletedTasksResource() {
const completedTasks = await this.hiveClient.getTasks({ status: 'completed', limit: 20 });
const failedTasks = await this.hiveClient.getTasks({ status: 'failed', limit: 10 });
const completedTasks = await this.whooshClient.getTasks({ status: 'completed', limit: 20 });
const failedTasks = await this.whooshClient.getTasks({ status: 'failed', limit: 10 });
const completedData = {
summary: {
completed: completedTasks.length,
@@ -186,7 +186,7 @@ export class HiveResources {
};
}
async getWorkflowsResource() {
const workflows = await this.hiveClient.getWorkflows();
const workflows = await this.whooshClient.getWorkflows();
const workflowData = {
total_workflows: workflows.length,
workflows: workflows.map(wf => ({
@@ -209,7 +209,7 @@ export class HiveResources {
};
}
async getExecutionsResource() {
const executions = await this.hiveClient.getExecutions();
const executions = await this.whooshClient.getExecutions();
const executionData = {
total_executions: executions.length,
recent_executions: executions.slice(0, 10).map(exec => ({
@@ -235,7 +235,7 @@ export class HiveResources {
};
}
async getMetricsResource() {
const metrics = await this.hiveClient.getMetrics();
const metrics = await this.whooshClient.getMetrics();
return {
contents: [
{
@@ -247,7 +247,7 @@ export class HiveResources {
};
}
async getCapabilitiesResource() {
const agents = await this.hiveClient.getAgents();
const agents = await this.whooshClient.getAgents();
const capabilities = {
agent_specializations: {
kernel_dev: {
@@ -367,4 +367,4 @@ export class HiveResources {
return `${minutes}m ${seconds}s`;
}
}
//# sourceMappingURL=hive-resources.js.map
//# sourceMappingURL=whoosh-resources.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1,13 +1,13 @@
/**
* Hive Tools
* WHOOSH Tools
*
* Defines MCP tools that expose Hive operations to AI assistants
* Defines MCP tools that expose WHOOSH operations to AI assistants
*/
import { Tool } from '@modelcontextprotocol/sdk/types.js';
import { HiveClient } from './hive-client.js';
export declare class HiveTools {
private hiveClient;
constructor(hiveClient: HiveClient);
import { WHOOSHClient } from './whoosh-client.js';
export declare class WHOOSHTools {
private whooshClient;
constructor(whooshClient: WHOOSHClient);
getAllTools(): Tool[];
executeTool(name: string, args: Record<string, any>): Promise<any>;
private getAgents;
@@ -22,9 +22,9 @@ export declare class HiveTools {
private getMetrics;
private getExecutions;
private coordinateDevelopment;
private bringHiveOnline;
private bringWHOOSHOnline;
private registerCliAgent;
private getCliAgents;
private registerPredefinedCliAgents;
}
//# sourceMappingURL=hive-tools.d.ts.map
//# sourceMappingURL=whoosh-tools.d.ts.map

1
mcp-server/dist/whoosh-tools.d.ts.map vendored Normal file
View File

@@ -0,0 +1 @@
{"version":3,"file":"whoosh-tools.d.ts","sourceRoot":"","sources":["../src/whoosh-tools.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAe,MAAM,kBAAkB,CAAC;AAM3D,qBAAa,SAAS;IACpB,OAAO,CAAC,UAAU,CAAa;gBAEnB,UAAU,EAAE,UAAU;IAIlC,WAAW,IAAI,IAAI,EAAE;IA2Qf,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;YA2E1D,SAAS;YAiDT,aAAa;YAkBb,UAAU;YA6BV,OAAO;YAoBP,QAAQ;YAsBR,YAAY;YAqBZ,cAAc;YAiBd,eAAe;YAiBf,gBAAgB;YAuBhB,UAAU;YAaV,aAAa;YAsBb,qBAAqB;YAuCrB,eAAe;YA0Ff,gBAAgB;YA4ChB,YAAY;YAyCZ,2BAA2B;CAuD1C"}

View File

@@ -1,30 +1,30 @@
/**
* Hive Tools
* WHOOSH Tools
*
* Defines MCP tools that expose Hive operations to AI assistants
* Defines MCP tools that expose WHOOSH operations to AI assistants
*/
import { v4 as uuidv4 } from 'uuid';
import { spawn } from 'child_process';
import * as path from 'path';
export class HiveTools {
hiveClient;
constructor(hiveClient) {
this.hiveClient = hiveClient;
export class WHOOSHTools {
whooshClient;
constructor(whooshClient) {
this.whooshClient = whooshClient;
}
getAllTools() {
return [
// Agent Management Tools
{
name: 'hive_get_agents',
description: 'Get all registered AI agents in the Hive cluster with their current status',
name: 'whoosh_get_agents',
description: 'Get all registered AI agents in the WHOOSH cluster with their current status',
inputSchema: {
type: 'object',
properties: {},
},
},
{
name: 'hive_register_agent',
description: 'Register a new AI agent in the Hive cluster',
name: 'whoosh_register_agent',
description: 'Register a new AI agent in the WHOOSH cluster',
inputSchema: {
type: 'object',
properties: {
@@ -42,8 +42,8 @@ export class HiveTools {
},
},
{
name: 'hive_register_cli_agent',
description: 'Register a new CLI-based AI agent (e.g., Gemini CLI) in the Hive cluster',
name: 'whoosh_register_cli_agent',
description: 'Register a new CLI-based AI agent (e.g., Gemini CLI) in the WHOOSH cluster',
inputSchema: {
type: 'object',
properties: {
@@ -66,15 +66,15 @@ export class HiveTools {
},
},
{
name: 'hive_get_cli_agents',
description: 'Get all registered CLI agents in the Hive cluster',
name: 'whoosh_get_cli_agents',
description: 'Get all registered CLI agents in the WHOOSH cluster',
inputSchema: {
type: 'object',
properties: {},
},
},
{
name: 'hive_register_predefined_cli_agents',
name: 'whoosh_register_predefined_cli_agents',
description: 'Register predefined CLI agents (walnut-gemini, ironwood-gemini) with verified configurations',
inputSchema: {
type: 'object',
@@ -83,8 +83,8 @@ export class HiveTools {
},
// Task Management Tools
{
name: 'hive_create_task',
description: 'Create and assign a development task to the Hive cluster',
name: 'whoosh_create_task',
description: 'Create and assign a development task to the WHOOSH cluster',
inputSchema: {
type: 'object',
properties: {
@@ -115,7 +115,7 @@ export class HiveTools {
},
},
{
name: 'hive_get_task',
name: 'whoosh_get_task',
description: 'Get details and status of a specific task',
inputSchema: {
type: 'object',
@@ -126,7 +126,7 @@ export class HiveTools {
},
},
{
name: 'hive_get_tasks',
name: 'whoosh_get_tasks',
description: 'Get list of tasks with optional filtering',
inputSchema: {
type: 'object',
@@ -143,15 +143,15 @@ export class HiveTools {
},
// Workflow Management Tools
{
name: 'hive_get_workflows',
description: 'Get all available workflows in the Hive platform',
name: 'whoosh_get_workflows',
description: 'Get all available workflows in the WHOOSH platform',
inputSchema: {
type: 'object',
properties: {},
},
},
{
name: 'hive_create_workflow',
name: 'whoosh_create_workflow',
description: 'Create a new workflow for distributed task orchestration',
inputSchema: {
type: 'object',
@@ -177,7 +177,7 @@ export class HiveTools {
},
},
{
name: 'hive_execute_workflow',
name: 'whoosh_execute_workflow',
description: 'Execute a workflow with optional input parameters',
inputSchema: {
type: 'object',
@@ -194,23 +194,23 @@ export class HiveTools {
},
// Monitoring and Status Tools
{
name: 'hive_get_cluster_status',
description: 'Get comprehensive status of the entire Hive cluster',
name: 'whoosh_get_cluster_status',
description: 'Get comprehensive status of the entire WHOOSH cluster',
inputSchema: {
type: 'object',
properties: {},
},
},
{
name: 'hive_get_metrics',
description: 'Get Prometheus metrics from the Hive cluster',
name: 'whoosh_get_metrics',
description: 'Get Prometheus metrics from the WHOOSH cluster',
inputSchema: {
type: 'object',
properties: {},
},
},
{
name: 'hive_get_executions',
name: 'whoosh_get_executions',
description: 'Get workflow execution history and status',
inputSchema: {
type: 'object',
@@ -221,7 +221,7 @@ export class HiveTools {
},
// Coordination Tools
{
name: 'hive_coordinate_development',
name: 'whoosh_coordinate_development',
description: 'Coordinate a complex development task across multiple specialized agents',
inputSchema: {
type: 'object',
@@ -252,8 +252,8 @@ export class HiveTools {
},
// Cluster Management Tools
{
name: 'hive_bring_online',
description: 'Automatically discover and register all available Ollama agents on the network, bringing the entire Hive cluster online',
name: 'whoosh_bring_online',
description: 'Automatically discover and register all available Ollama agents on the network, bringing the entire WHOOSH cluster online',
inputSchema: {
type: 'object',
properties: {
@@ -276,43 +276,43 @@ export class HiveTools {
try {
switch (name) {
// Agent Management
case 'hive_get_agents':
case 'whoosh_get_agents':
return await this.getAgents();
case 'hive_register_agent':
case 'whoosh_register_agent':
return await this.registerAgent(args);
case 'hive_register_cli_agent':
case 'whoosh_register_cli_agent':
return await this.registerCliAgent(args);
case 'hive_get_cli_agents':
case 'whoosh_get_cli_agents':
return await this.getCliAgents();
case 'hive_register_predefined_cli_agents':
case 'whoosh_register_predefined_cli_agents':
return await this.registerPredefinedCliAgents();
// Task Management
case 'hive_create_task':
case 'whoosh_create_task':
return await this.createTask(args);
case 'hive_get_task':
case 'whoosh_get_task':
return await this.getTask(args.task_id);
case 'hive_get_tasks':
case 'whoosh_get_tasks':
return await this.getTasks(args);
// Workflow Management
case 'hive_get_workflows':
case 'whoosh_get_workflows':
return await this.getWorkflows();
case 'hive_create_workflow':
case 'whoosh_create_workflow':
return await this.createWorkflow(args);
case 'hive_execute_workflow':
case 'whoosh_execute_workflow':
return await this.executeWorkflow(args.workflow_id, args.inputs);
// Monitoring
case 'hive_get_cluster_status':
case 'whoosh_get_cluster_status':
return await this.getClusterStatus();
case 'hive_get_metrics':
case 'whoosh_get_metrics':
return await this.getMetrics();
case 'hive_get_executions':
case 'whoosh_get_executions':
return await this.getExecutions(args.workflow_id);
// Coordination
case 'hive_coordinate_development':
case 'whoosh_coordinate_development':
return await this.coordinateDevelopment(args);
// Cluster Management
case 'hive_bring_online':
return await this.bringHiveOnline(args);
case 'whoosh_bring_online':
return await this.bringWHOOSHOnline(args);
default:
throw new Error(`Unknown tool: ${name}`);
}
@@ -331,7 +331,7 @@ export class HiveTools {
}
// Tool Implementation Methods
async getAgents() {
const agents = await this.hiveClient.getAgents();
const agents = await this.whooshClient.getAgents();
// Group agents by type
const ollamaAgents = agents.filter(agent => !agent.agent_type || agent.agent_type === 'ollama');
const cliAgents = agents.filter(agent => agent.agent_type === 'cli');
@@ -344,7 +344,7 @@ export class HiveTools {
` • Status: ${agent.status}\n` +
` • Tasks: ${agent.current_tasks}/${agent.max_concurrent}\n`;
};
let text = `📋 **Hive Cluster Agents** (${agents.length} total)\n\n`;
let text = `📋 **WHOOSH Cluster Agents** (${agents.length} total)\n\n`;
if (ollamaAgents.length > 0) {
text += `🤖 **Ollama Agents** (${ollamaAgents.length}):\n`;
text += ollamaAgents.map(formatAgent).join('\n') + '\n';
@@ -356,10 +356,10 @@ export class HiveTools {
if (agents.length === 0) {
text += 'No agents registered yet.\n\n';
text += '**Getting Started:**\n';
text += '• Use `hive_register_agent` for Ollama agents\n';
text += '• Use `hive_register_cli_agent` for CLI agents\n';
text += '• Use `hive_register_predefined_cli_agents` for quick CLI setup\n';
text += '• Use `hive_bring_online` for auto-discovery';
text += '• Use `whoosh_register_agent` for Ollama agents\n';
text += '• Use `whoosh_register_cli_agent` for CLI agents\n';
text += '• Use `whoosh_register_predefined_cli_agents` for quick CLI setup\n';
text += '• Use `whoosh_bring_online` for auto-discovery';
}
return {
content: [
@@ -371,12 +371,12 @@ export class HiveTools {
};
}
async registerAgent(args) {
const result = await this.hiveClient.registerAgent(args);
const result = await this.whooshClient.registerAgent(args);
return {
content: [
{
type: 'text',
text: `✅ Successfully registered agent **${args.id}** in the Hive cluster!\n\n` +
text: `✅ Successfully registered agent **${args.id}** in the WHOOSH cluster!\n\n` +
`🤖 Agent Details:\n` +
`• ID: ${args.id}\n` +
`• Specialization: ${args.specialty}\n` +
@@ -396,7 +396,7 @@ export class HiveTools {
...args.context,
},
};
const task = await this.hiveClient.createTask(taskData);
const task = await this.whooshClient.createTask(taskData);
return {
content: [
{
@@ -414,7 +414,7 @@ export class HiveTools {
};
}
async getTask(taskId) {
const task = await this.hiveClient.getTask(taskId);
const task = await this.whooshClient.getTask(taskId);
return {
content: [
{
@@ -432,12 +432,12 @@ export class HiveTools {
};
}
async getTasks(args) {
const tasks = await this.hiveClient.getTasks(args);
const tasks = await this.whooshClient.getTasks(args);
return {
content: [
{
type: 'text',
text: `📋 Hive Tasks (${tasks.length} found):\n\n${tasks.length > 0
text: `📋 WHOOSH Tasks (${tasks.length} found):\n\n${tasks.length > 0
? tasks.map(task => `🎯 **${task.id}** (${task.type})\n` +
` • Status: ${task.status}\n` +
` • Priority: ${task.priority}/5\n` +
@@ -449,23 +449,23 @@ export class HiveTools {
};
}
async getWorkflows() {
const workflows = await this.hiveClient.getWorkflows();
const workflows = await this.whooshClient.getWorkflows();
return {
content: [
{
type: 'text',
text: `🔄 Hive Workflows (${workflows.length} total):\n\n${workflows.length > 0
text: `🔄 WHOOSH Workflows (${workflows.length} total):\n\n${workflows.length > 0
? workflows.map(wf => `🔄 **${wf.name || wf.id}**\n` +
` • ID: ${wf.id}\n` +
` • Description: ${wf.description || 'No description'}\n` +
` • Status: ${wf.status || 'Unknown'}\n`).join('\n')
: 'No workflows created yet. Use hive_create_workflow to create distributed workflows.'}`,
: 'No workflows created yet. Use whoosh_create_workflow to create distributed workflows.'}`,
},
],
};
}
async createWorkflow(args) {
const result = await this.hiveClient.createWorkflow(args);
const result = await this.whooshClient.createWorkflow(args);
return {
content: [
{
@@ -474,13 +474,13 @@ export class HiveTools {
`🔄 Workflow ID: ${result.workflow_id}\n` +
`📋 Description: ${args.description || 'No description provided'}\n` +
`🔧 Steps: ${args.steps.length} configured\n\n` +
`The workflow is ready for execution using hive_execute_workflow.`,
`The workflow is ready for execution using whoosh_execute_workflow.`,
},
],
};
}
async executeWorkflow(workflowId, inputs) {
const result = await this.hiveClient.executeWorkflow(workflowId, inputs);
const result = await this.whooshClient.executeWorkflow(workflowId, inputs);
return {
content: [
{
@@ -489,18 +489,18 @@ export class HiveTools {
`🔄 Workflow ID: ${workflowId}\n` +
`⚡ Execution ID: ${result.execution_id}\n` +
`📥 Inputs: ${inputs ? JSON.stringify(inputs, null, 2) : 'None'}\n\n` +
`Use hive_get_executions to monitor progress.`,
`Use whoosh_get_executions to monitor progress.`,
},
],
};
}
async getClusterStatus() {
const status = await this.hiveClient.getClusterStatus();
const status = await this.whooshClient.getClusterStatus();
return {
content: [
{
type: 'text',
text: `🐝 **Hive Cluster Status**\n\n` +
text: `🐝 **WHOOSH Cluster Status**\n\n` +
`🟢 **System**: ${status.system.status} (v${status.system.version})\n` +
`⏱️ **Uptime**: ${Math.floor(status.system.uptime / 3600)}h ${Math.floor((status.system.uptime % 3600) / 60)}m\n\n` +
`🤖 **Agents**: ${status.agents.total} total\n` +
@@ -516,18 +516,18 @@ export class HiveTools {
};
}
async getMetrics() {
const metrics = await this.hiveClient.getMetrics();
const metrics = await this.whooshClient.getMetrics();
return {
content: [
{
type: 'text',
text: `📊 **Hive Cluster Metrics**\n\n\`\`\`\n${metrics}\n\`\`\``,
text: `📊 **WHOOSH Cluster Metrics**\n\n\`\`\`\n${metrics}\n\`\`\``,
},
],
};
}
async getExecutions(workflowId) {
const executions = await this.hiveClient.getExecutions(workflowId);
const executions = await this.whooshClient.getExecutions(workflowId);
return {
content: [
{
@@ -558,7 +558,7 @@ export class HiveTools {
coordination_id: uuidv4(),
},
};
const task = await this.hiveClient.createTask(taskData);
const task = await this.whooshClient.createTask(taskData);
createdTasks.push(task);
}
return {
@@ -575,17 +575,17 @@ export class HiveTools {
],
};
}
async bringHiveOnline(args) {
async bringWHOOSHOnline(args) {
const { force_refresh = false, subnet_scan = true } = args;
try {
// Get the path to the auto-discovery script
const scriptPath = path.resolve('/home/tony/AI/projects/hive/scripts/auto_discover_agents.py');
const scriptPath = path.resolve('/home/tony/AI/projects/whoosh/scripts/auto_discover_agents.py');
return new Promise((resolve, reject) => {
let output = '';
let errorOutput = '';
// Execute the auto-discovery script
const child = spawn('python3', [scriptPath], {
cwd: '/home/tony/AI/projects/hive',
cwd: '/home/tony/AI/projects/whoosh',
stdio: 'pipe',
});
child.stdout.on('data', (data) => {
@@ -614,17 +614,17 @@ export class HiveTools {
content: [
{
type: 'text',
text: `🐝 **Hive Cluster Online!** 🚀\n\n` +
text: `🐝 **WHOOSH Cluster Online!** 🚀\n\n` +
`🔍 **Auto-Discovery Complete**\n` +
`• Discovered: ${discovered} agents\n` +
`• Registered: ${registered} agents\n` +
`• Failed: ${failed} agents\n\n` +
`🤖 **Active Agents:**\n${agentDetails.join('\n')}\n\n` +
`✅ **Status**: The Hive cluster is now fully operational and ready for distributed AI orchestration!\n\n` +
`✅ **Status**: The WHOOSH cluster is now fully operational and ready for distributed AI orchestration!\n\n` +
`🎯 **Next Steps:**\n` +
`• Use \`hive_get_cluster_status\` to view detailed status\n` +
`• Use \`hive_coordinate_development\` to start distributed tasks\n` +
`• Use \`hive_create_workflow\` to build complex workflows`,
`• Use \`whoosh_get_cluster_status\` to view detailed status\n` +
`• Use \`whoosh_coordinate_development\` to start distributed tasks\n` +
`• Use \`whoosh_create_workflow\` to build complex workflows`,
},
],
});
@@ -643,11 +643,11 @@ export class HiveTools {
content: [
{
type: 'text',
text: `❌ **Failed to bring Hive online**\n\n` +
text: `❌ **Failed to bring WHOOSH online**\n\n` +
`Error: ${error instanceof Error ? error.message : String(error)}\n\n` +
`Please ensure:\n` +
`• The Hive backend is running\n` +
`• The auto-discovery script exists at /home/tony/AI/projects/hive/scripts/auto_discover_agents.py\n` +
`• The WHOOSH backend is running\n` +
`• The auto-discovery script exists at /home/tony/AI/projects/whoosh/scripts/auto_discover_agents.py\n` +
`• Python3 is available and required dependencies are installed`,
},
],
@@ -657,7 +657,7 @@ export class HiveTools {
}
async registerCliAgent(args) {
try {
const result = await this.hiveClient.registerCliAgent(args);
const result = await this.whooshClient.registerCliAgent(args);
return {
content: [
{
@@ -691,7 +691,7 @@ export class HiveTools {
`• Verify SSH connectivity to ${args.host}\n` +
`• Ensure Gemini CLI is installed and accessible\n` +
`• Check Node.js version ${args.node_version} is available\n` +
`• Confirm Hive backend is running and accessible`,
`• Confirm WHOOSH backend is running and accessible`,
},
],
isError: true,
@@ -700,7 +700,7 @@ export class HiveTools {
}
async getCliAgents() {
try {
const cliAgents = await this.hiveClient.getCliAgents();
const cliAgents = await this.whooshClient.getCliAgents();
return {
content: [
{
@@ -715,8 +715,8 @@ export class HiveTools {
` • Endpoint: ${agent.endpoint}\n`).join('\n')
: 'No CLI agents registered yet.\n\n' +
'**Getting Started:**\n' +
'• Use `hive_register_cli_agent` to register individual CLI agents\n' +
'• Use `hive_register_predefined_cli_agents` to register walnut-gemini and ironwood-gemini automatically'}`,
'• Use `whoosh_register_cli_agent` to register individual CLI agents\n' +
'• Use `whoosh_register_predefined_cli_agents` to register walnut-gemini and ironwood-gemini automatically'}`,
},
],
};
@@ -728,7 +728,7 @@ export class HiveTools {
type: 'text',
text: `❌ **Failed to get CLI agents**\n\n` +
`Error: ${error instanceof Error ? error.message : String(error)}\n\n` +
`Please ensure the Hive backend is running and accessible.`,
`Please ensure the WHOOSH backend is running and accessible.`,
},
],
isError: true,
@@ -737,7 +737,7 @@ export class HiveTools {
}
async registerPredefinedCliAgents() {
try {
const result = await this.hiveClient.registerPredefinedCliAgents();
const result = await this.whooshClient.registerPredefinedCliAgents();
const successCount = result.results.filter((r) => r.status === 'success').length;
const existingCount = result.results.filter((r) => r.status === 'already_exists').length;
const failedCount = result.results.filter((r) => r.status === 'failed').length;
@@ -779,7 +779,7 @@ export class HiveTools {
`• Ensure WALNUT and IRONWOOD are accessible via SSH\n` +
`• Verify Gemini CLI is installed on both machines\n` +
`• Check that Node.js v22.14.0 (WALNUT) and v22.17.0 (IRONWOOD) are available\n` +
`• Confirm Hive backend is running with CLI agent support`,
`• Confirm WHOOSH backend is running with CLI agent support`,
},
],
isError: true,
@@ -787,4 +787,4 @@ export class HiveTools {
}
}
}
//# sourceMappingURL=hive-tools.js.map
//# sourceMappingURL=whoosh-tools.js.map

1
mcp-server/dist/whoosh-tools.js.map vendored Normal file

File diff suppressed because one or more lines are too long