mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-09 22:13:39 +09:00
checkpoint: File edit:
🚀 Generated with [Claude Code](https://claude.com/claude-code) 📊 V3 Development Progress Checkpoint Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
This commit is contained in:
1 parent
8395c4749d
commit
fb4cdc84ce
3 files changed
+143
No files matched your search
@@ -18,6 +18,7 @@ export * from './events/index.js';
|
||||
export * from './plugin-interface.js';
|
||||
export * from './plugin-loader.js';
|
||||
export * from './plugin-registry.js';
|
||||
export * from './plugins/index.js';
|
||||
|
||||
// Re-export from submodules for convenience
|
||||
export * from './types/index.js';
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* Plugins System - ADR-004 Implementation
|
||||
*
|
||||
* Plugin architecture for extending Claude Flow functionality.
|
||||
*
|
||||
* @module v3/shared/plugins
|
||||
*/
|
||||
|
||||
// Types
|
||||
export type {
|
||||
PluginConfig,
|
||||
PluginContext,
|
||||
PluginEvent,
|
||||
PluginEventHandler,
|
||||
ClaudeFlowPlugin,
|
||||
PluginMetadata,
|
||||
IPluginRegistry,
|
||||
IPluginLoader,
|
||||
} from './types.js';
|
||||
|
||||
// Official Plugins
|
||||
export {
|
||||
HiveMindPlugin,
|
||||
createHiveMindPlugin,
|
||||
type HiveMindConfig,
|
||||
type CollectiveDecision,
|
||||
type EmergentPattern,
|
||||
MaestroPlugin,
|
||||
createMaestroPlugin,
|
||||
type MaestroConfig,
|
||||
type WorkflowStep,
|
||||
type Workflow,
|
||||
type OrchestrationResult,
|
||||
} from './official/index.js';
|
||||
@@ -0,0 +1,108 @@
|
||||
/**
|
||||
* Plugin Types - ADR-004 Implementation
|
||||
*
|
||||
* Type definitions for the plugin system.
|
||||
*
|
||||
* @module v3/shared/plugins/types
|
||||
*/
|
||||
|
||||
import type { HookRegistry } from '../hooks/index.js';
|
||||
|
||||
/**
|
||||
* Plugin configuration base
|
||||
*/
|
||||
export interface PluginConfig {
|
||||
enabled: boolean;
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
/**
|
||||
* Plugin context provided during initialization
|
||||
*/
|
||||
export interface PluginContext {
|
||||
hooks?: HookRegistry;
|
||||
services?: Record<string, unknown>;
|
||||
config?: Record<string, unknown>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Plugin lifecycle events
|
||||
*/
|
||||
export type PluginEvent = 'initialized' | 'shutdown' | 'error';
|
||||
|
||||
/**
|
||||
* Plugin event handler
|
||||
*/
|
||||
export type PluginEventHandler = (event: PluginEvent, data?: unknown) => void;
|
||||
|
||||
/**
|
||||
* Claude Flow Plugin Interface
|
||||
*
|
||||
* All plugins must implement this interface.
|
||||
*/
|
||||
export interface ClaudeFlowPlugin {
|
||||
/** Unique plugin identifier */
|
||||
readonly id: string;
|
||||
|
||||
/** Human-readable name */
|
||||
readonly name: string;
|
||||
|
||||
/** Plugin version */
|
||||
readonly version: string;
|
||||
|
||||
/** Plugin description */
|
||||
readonly description: string;
|
||||
|
||||
/** Dependencies on other plugins */
|
||||
readonly dependencies?: string[];
|
||||
|
||||
/**
|
||||
* Initialize the plugin
|
||||
* @param context Plugin context with hooks and services
|
||||
*/
|
||||
initialize(context: PluginContext): Promise<void>;
|
||||
|
||||
/**
|
||||
* Shutdown the plugin
|
||||
*/
|
||||
shutdown(): Promise<void>;
|
||||
|
||||
/**
|
||||
* Optional event handler
|
||||
*/
|
||||
onEvent?: PluginEventHandler;
|
||||
}
|
||||
|
||||
/**
|
||||
* Plugin metadata
|
||||
*/
|
||||
export interface PluginMetadata {
|
||||
id: string;
|
||||
name: string;
|
||||
version: string;
|
||||
description: string;
|
||||
author?: string;
|
||||
license?: string;
|
||||
homepage?: string;
|
||||
dependencies?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Plugin registry
|
||||
*/
|
||||
export interface IPluginRegistry {
|
||||
register(plugin: ClaudeFlowPlugin): void;
|
||||
unregister(pluginId: string): void;
|
||||
get(pluginId: string): ClaudeFlowPlugin | undefined;
|
||||
getAll(): ClaudeFlowPlugin[];
|
||||
isRegistered(pluginId: string): boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Plugin loader interface
|
||||
*/
|
||||
export interface IPluginLoader {
|
||||
loadFromPath(path: string): Promise<ClaudeFlowPlugin>;
|
||||
loadFromPackage(packageName: string): Promise<ClaudeFlowPlugin>;
|
||||
loadBuiltin(pluginId: string): Promise<ClaudeFlowPlugin>;
|
||||
}
|
||||
Reference in new issue
Block a user