@claude-flow/shared weekly downloads statistics
By claude-flow (9 listings) · npm · MCP servers
Shared types, event bus, config schemas and validators, MCP transport helpers and resilience utilities used by the Ruflo (claude-flow) V3 packages.
@claude-flow/shared has 61,006 recorded weekly downloads on npm, a decrease of 22.5% over the past 30 days, ranking #729 of 3,247 tracked listings.
About @claude-flow/shared
@claude-flow/shared
<!-- adr-356:quickstart:start -->@claude-flow/shared — Shared types, Zod config schemas and validators, the event bus and resilience helpers that the other @claude-flow packages build on.
Supported environments: Node.js 20+ · ESM · Linux, macOS, Windows (pure JavaScript)
Quickstart
npm install @claude-flow/shared
import { validateAgentConfig } from '@claude-flow/shared';
const ok = validateAgentConfig({ id: 'coder-1', name: 'Coder', type: 'coder' });
console.log(ok.success, ok.data.maxConcurrentTasks, ok.data.priority);
const bad = validateAgentConfig({ id: 'coder-1', name: 'Coder', type: 'coder', priority: 500 });
console.log(bad.success, bad.errors.map((e) => `${e.path}: ${e.code}`).join(', '));
Expected output:
true 5 50
false priority: too_big
Next: @claude-flow/hooks builds its lifecycle hooks on these types.
Shared utilities, types, and core infrastructure for Claude Flow V3 - the foundation module used by all other @claude-flow packages.
Features
- Core Types - Agent, Task, Memory, MCP, and Swarm type definitions
- Core Interfaces - Agent, Task, Memory, Event, and Coordinator interfaces
- Configuration - Schema validation, loading, and default values
- Event System - Event bus, coordinator, and handler utilities
- Hooks System - Pre/post execution hooks for extensibility
- MCP Infrastructure - Server, transport, connection pool, and tool registry
- Health Monitoring - Health checks and monitoring utilities
Installation
npm install @claude-flow/shared
Quick Start
import {
AgentState,
TaskDefinition,
MemoryEntry,
EventBus,
ConfigLoader
} from '@claude-flow/shared';
// Use shared types
const agent: AgentState = {
id: { id: 'agent-1', swarmId: 'swarm-1', type: 'coder' },
name: 'Code Agent',
type: 'coder',
status: 'idle'
};
// Use configuration
const config = await ConfigLoader.load('./config.json');
// Use event system
const eventBus = new EventBus();
eventBus.on('task.completed', (event) => {
console.log(`Task ${event.taskId} completed`);
});
Package Exports
// Main entry (recommended - includes all modules)
import { ... } from '@claude-flow/shared';
// Submodule exports (for tree-shaking or specific imports)
import { ... } from '@claude-flow/shared/types'; // Type definitions
import { ... } from '@claude-flow/shared/core'; // Config, interfaces, orchestrator
import { ... } from '@claude-flow/shared/events'; // Event sourcing (ADR-007)
import { ... } from '@claude-flow/shared/hooks'; // Hooks system
import { ... } from '@claude-flow/shared/mcp'; // MCP server infrastructure
import { ... } from '@claude-flow/shared/security'; // Security utilities
import { ... } from '@claude-flow/shared/resilience'; // Retry, circuit breaker, rate limiter
API Reference
Types
import type {
// Agent types
AgentId,
AgentState,
AgentType,
AgentStatus,
AgentCapabilities,
AgentMetrics,
// Task types
TaskId,
TaskDefinition,
TaskType,
TaskStatus,
TaskPriority,
// Memory types
MemoryEntry,
MemoryType,
SearchResult,
// Swarm types
SwarmId,
SwarmStatus,
SwarmEvent,
CoordinatorConfig,
// MCP types
MCPTool,
MCPRequest,
MCPResponse
} from '@claude-flow/shared/types';
Core Interfaces
import type {
IAgent,
ITask,
IMemory,
ICoordinator,
IEventHandler
} from '@claude-flow/shared/core';
// Agent interface
interface IAgent {
getId(): AgentId;
getState(): AgentState;
execute(task: TaskDefinition): Promise<TaskResult>;
handleMessage(message: Message): Promise<void>;
}
// Memory interface
interface IMemory {
store(entry: MemoryEntry): Promise<string>;
retrieve(id: string): Promise<MemoryEntry | null>;
search(query: SearchQuery): Promise<SearchResult[]>;
delete(id: string): Promise<boolean>;
}
// Coordinator interface
interface ICoordinator {
initialize(): Promise<void>;
shutdown(): Promise<void>;
registerAgent(agent: IAgent): Promise<string>;
submitTask(task: TaskDefinition): Promise<string>;
}
Configuration
import {
ConfigLoader,
ConfigValidator,
defaultConfig,
ConfigSchema
} from '@claude-flow/shared/core';
// Load configuration
const config = await ConfigLoader.load('./config.json');
const config2 = await ConfigLoader.loadFromEnv();
// Validate configuration
const errors = ConfigValidator.validate(config);
if (errors.length > 0) {
console.error('Invalid config:', errors);
}
// Default configuration
const defaults = defaultConfig();
Event System
import { EventBus, EventCoordinator } from '@claude-flow/shared/events';
const eventBus = new EventBus();
// Subscribe to events
eventBus.on('agent.joined', (event) => {
console.log(`Agent ${event.agentId} joined`);
});
eventBus.on('task.*', (event) => {
console.log(`Task event: ${event.type}`);
});…
Description from the npm listing.
- ruflo
- claude-flow
- shared
- types
- event-bus
- config-validation
- zod
- mcp
- resilience
- typescript
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (142)Similar npm MCP servers plugins
All 20 @claude-flow/shared alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/@claude-flow/shared. First seen Nov 10, 2026; last successful collection Dec 6, 2026. See the methodology.