@robota-sdk/agent-core 3.0.0-beta.43 → 3.0.0-beta.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -87,8 +87,49 @@ interface IToolMessage extends IBaseMessage {
87
87
  }
88
88
  /**
89
89
  * Universal message union used across the SDK as the canonical contract.
90
+ * Used for AI provider communication. Extracted from IHistoryEntry[] via filtering.
90
91
  */
91
92
  type TUniversalMessage = IUserMessage | IAssistantMessage | ISystemMessage | IToolMessage;
93
+ /**
94
+ * Universal history entry — the base type for all records in conversation history.
95
+ *
96
+ * History is a universal timeline that records everything: AI chat messages,
97
+ * system events, skill invocations, permission decisions, etc.
98
+ * AI provider receives only chat entries (filtered and converted to TUniversalMessage).
99
+ * TUI can render any range of entries.
100
+ *
101
+ * - append-only, read-only
102
+ * - category + type for classification (free-form strings, no pre-defined enum)
103
+ * - data holds type-specific structured content
104
+ */
105
+ interface IHistoryEntry<T = unknown> {
106
+ /** Unique entry identifier */
107
+ id: string;
108
+ /** Entry creation timestamp */
109
+ timestamp: Date;
110
+ /** Top-level classification: 'chat', 'event', etc. */
111
+ category: string;
112
+ /** Sub-classification within category. Free-form, not pre-defined. */
113
+ type: string;
114
+ /** Type-specific structured data */
115
+ data?: T;
116
+ }
117
+ /** Check if a history entry is a chat message (for AI provider filtering). */
118
+ declare function isChatEntry(entry: IHistoryEntry): boolean;
119
+ /**
120
+ * Convert a chat history entry to TUniversalMessage for AI provider consumption.
121
+ * Only call on entries where isChatEntry() returns true.
122
+ */
123
+ declare function chatEntryToMessage(entry: IHistoryEntry): TUniversalMessage;
124
+ /**
125
+ * Convert a TUniversalMessage to an IHistoryEntry for storage.
126
+ */
127
+ declare function messageToHistoryEntry(message: TUniversalMessage): IHistoryEntry;
128
+ /**
129
+ * Filter history entries and convert chat entries to TUniversalMessage[].
130
+ * Used when passing conversation to AI provider.
131
+ */
132
+ declare function getMessagesForAPI(history: IHistoryEntry[]): TUniversalMessage[];
92
133
  /**
93
134
  * Type guards for the canonical TUniversalMessage union.
94
135
  *
@@ -3066,6 +3107,10 @@ declare class ConversationStore implements IConversationHistory {
3066
3107
  addSystemMessage(content: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3067
3108
  addToolMessage(content: string, toolCallId: string, toolName?: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3068
3109
  addToolMessageWithId(content: string, toolCallId: string, toolName: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3110
+ /** Add a raw history entry (events, etc.) */
3111
+ addEntry(entry: IHistoryEntry): void;
3112
+ /** Get all history entries (universal timeline) */
3113
+ getHistory(): IHistoryEntry[];
3069
3114
  getMessages(): TUniversalMessage[];
3070
3115
  getMessagesByRole(role: TUniversalMessageRole): TUniversalMessage[];
3071
3116
  getRecentMessages(count: number): TUniversalMessage[];
@@ -3100,6 +3145,8 @@ interface IConversationHistory {
3100
3145
  addAssistantMessage(content: string | null, toolCalls?: IToolCall[], metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3101
3146
  addSystemMessage(content: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3102
3147
  addToolMessageWithId(content: string, toolCallId: string, toolName: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3148
+ addEntry(entry: IHistoryEntry): void;
3149
+ getHistory(): IHistoryEntry[];
3103
3150
  getMessages(): TUniversalMessage[];
3104
3151
  getMessagesByRole(role: TUniversalMessageRole): TUniversalMessage[];
3105
3152
  getRecentMessages(count: number): TUniversalMessage[];
@@ -3360,6 +3407,22 @@ declare class Robota extends AbstractAgent<IAgentConfig, IRunOptions, TUniversal
3360
3407
  runStream(input: string, options?: IRunOptions): AsyncGenerator<string, void, undefined>;
3361
3408
  private executionDeps;
3362
3409
  getHistory(): TUniversalMessage[];
3410
+ /** Get full history timeline (IHistoryEntry[]) including events */
3411
+ getFullHistory(): Array<{
3412
+ id: string;
3413
+ timestamp: Date;
3414
+ category: string;
3415
+ type: string;
3416
+ data?: unknown;
3417
+ }>;
3418
+ /** Add an event entry to history */
3419
+ addHistoryEntry(entry: {
3420
+ id: string;
3421
+ timestamp: Date;
3422
+ category: string;
3423
+ type: string;
3424
+ data?: unknown;
3425
+ }): void;
3363
3426
  clearHistory(): void;
3364
3427
  /** Inject a message into conversation history without triggering execution. */
3365
3428
  injectMessage(role: 'user' | 'assistant' | 'system', content: string): void;
@@ -4450,4 +4513,4 @@ interface IRunHooksResult {
4450
4513
  }
4451
4514
  declare function runHooks(config: THooksConfig | undefined, event: THookEvent, input: IHookInput, executors?: IHookTypeExecutor[]): Promise<IRunHooksResult>;
4452
4515
 
4453
- export { AGENT_EVENTS, AGENT_EVENT_PREFIX, AbstractAIProvider, AbstractAgent, AbstractEventService, AbstractExecutor, AbstractManager, AbstractPlugin, AbstractTool, AgentFactory, AgentTemplates, AuthenticationError, CLAUDE_MODELS, CacheIntegrityError, CircuitBreakerOpenError, ConfigurationError, ConversationHistory, ConversationStore, DEFAULT_ABSTRACT_EVENT_SERVICE, DEFAULT_CONTEXT_WINDOW, DEFAULT_MAX_OUTPUT, DefaultEventService, EVENT_EMITTER_EVENTS, EXECUTION_EVENTS, EXECUTION_EVENT_PREFIX, ErrorUtils, EventEmitterPlugin, EventHistoryModule, ExecutionProxy, type IAIProvider, type IAIProviderInstance, type IAIProviderManager, type IAbstractTool, type IAbstractToolOptions, type IAgent, type IAgentConfig, type IAgentCreationOptions, type IAgentCreationStats, type IAgentEventData, type IAgentFactory, type IAgentFactoryOptions, type IAgentHookDefinition, type IAgentLifecycleEvents, type IAgentTemplate, type IAssistantMessage, type IBaseEventData, type IBaseMessage, type ICacheEntry, type ICacheKey, type ICacheOptions, type ICacheStats, type ICacheStorage, type IChatExecutionRequest, type IChatOptions, type ICommandHookDefinition, type IConfigValidationResult, type IContextOptions, type IContextTokenUsage, type IContextWindowState, type IConversationContext, type IConversationResponse, type IConversationService, type IConversationServiceOptions, type IEventContext, type IEventEmitterEventData, type IEventEmitterHierarchicalEventData, type IEventEmitterMetrics, type IEventEmitterMetricsSnapshot, type IEventEmitterPlugin, type IEventEmitterPluginOptions, type IEventHistoryModule, type IEventHistoryRecord, type IEventHistorySnapshot, type IEventObjectValue, type IEventService, type IEventServiceOwnerBinding, type IExecutionEventData, type IExecutionService, type IExecutionServiceOptions, type IExecutor, type IExecutorAwareProviderConfig, type IFunctionTool, type IHookDefinition, type IHookGroup, type IHookInput, type IHookResult, type IHookTypeExecutor, type IHttpHookDefinition, type IImageComposeRequest, type IImageEditRequest, type IImageGenerationProvider, type IImageGenerationRequest, type IImageGenerationResult, type IInlineImageInputSource, type IInlineImageMessagePart, type ILocalExecutorConfig, type ILogger, type IMCPToolConfig, type IMediaOutputRef, type IModelDefinition, type IOpenAPIToolConfig, type IOwnerPathSegment, type IParameterSchema, type IParameterValidationResult, type IPermissionLists, type IPlugin, type IPluginConfig, type IPluginContext, type IPluginContract, type IPluginData, type IPluginErrorContext, type IPluginExecutionContext, type IPluginExecutionResult, type IPluginHooks, type IPluginOptions, type IPluginStats, type IProgressReportingTool, type IPromptHookDefinition, type IProviderConfig, type IProviderMediaError, type IProviderOptions, type IProviderRequest, type IProviderSpecificOptions, type IRawProviderResponse, type IRemoteExecutorConfig, type IRunOptions, type ISimpleValidationResult, type IStreamExecutionRequest, type IStreamingChunk, type ISystemMessage, type ITemplateApplicationResult, type ITextMessagePart, type ITokenUsage, type ITool, type IToolCall, type IToolContract, type IToolEventData, type IToolExecutionContext, type IToolExecutionRequest, type IToolExecutionResult, type IToolExecutionService, type IToolExecutionStep, type IToolFactory, type IToolManager, type IToolMessage, type IToolRegistry, type IToolResult, type IToolSchema, type IToolWithEventService, type IUniversalObjectValue, type IUriImageInputSource, type IUriImageMessagePart, type IUserMessage, type IUtilLogEntry, type IValidationIssue, type IValidationOptions, type IValidationResult, type IVideoGenerationProvider, type IVideoGenerationRequest, type IVideoJobAccepted, type IVideoJobSnapshot, type IWorkflowConfig, type IWorkflowConversionOptions, type IWorkflowConversionResult, type IWorkflowConverter, type IWorkflowData, type IWorkflowMetadata, type IWorkflowValidator, InMemoryEventEmitterMetrics, LocalExecutor, MODE_POLICY, MessageConverter, ModelNotAvailableError, NetworkError, ObservableEventService, PluginCategory, PluginError, PluginPriority, ProviderError, RateLimitError, Robota, RobotaError, SilentLogger, StorageError, StructuredEventService, TASK_EVENTS, TASK_EVENT_PREFIX, type TAgentCreationMetadata, type TComplexConfigValue, type TConfigData, type TConfigValue, type TContextData, type TConversationContextMetadata, type TErrorContextData, type TErrorExternalInput, type TEventEmitterListener, type TEventExtensionValue, type TEventListener, type TEventLoggerData, type TEventName, type TEventUniversalValue, type TExecutionEventName, type TExecutionMetadata, type THookEvent, type THooksConfig, type TImageInputSource, type TJSONSchemaEnum, type TJSONSchemaKind, type TKnownToolName, type TLoggerData, type TManagerToolParameters, type TMessageState, type TMetadata, type TMetadataValue, TOOL_EVENTS, TOOL_EVENT_PREFIX, type TParameterDefaultValue, type TPermissionDecision, type TPermissionMode, type TPrimitiveValue, type TProviderConfigValue, type TProviderLoggingData, type TProviderMediaResult, type TProviderOptionValueBase, TRUST_TO_MODE, type TResponseMetadata, type TTextDeltaCallback, type TTimerId, type TToolArgs, type TToolExecutionFunction, type TToolExecutionParameters, type TToolExecutor, type TToolMetadata, type TToolParameters, type TToolProgressCallback, type TTrustLevel, type TUniversalArrayValue, type TUniversalMessage, type TUniversalMessageMetadata, type TUniversalMessagePart, type TUniversalMessageRole, type TUniversalValue, type TUserEvent, type TUtilLogLevel, ToolExecutionError, UNKNOWN_TOOL_FALLBACK, USER_EVENTS, USER_EVENT_PREFIX, ValidationError, ValidationSeverity, Validator, bindEventServiceOwner, bindWithOwnerPath, composeEventName, createAssistantMessage, createExecutionProxy, createLogger, createSystemMessage, createToolMessage, createUserMessage, evaluatePermission, formatTokenCount, getGlobalLogLevel, getModelContextWindow, getModelMaxOutput, getModelName, getToolEstimatedDuration, getToolExecutionSteps, isAssistantMessage, isDefaultEventService, isImageGenerationProvider, isProgressReportingTool, isSystemMessage, isToolMessage, isUserMessage, isVideoGenerationProvider, logger, runHooks, setGlobalLogLevel, setToolProgressCallback, startPeriodicTask, stopPeriodicTask, validateAgentConfig, validateApiKey, validateModelName, validateProviderName, validateUserInput, withEventEmission };
4516
+ export { AGENT_EVENTS, AGENT_EVENT_PREFIX, AbstractAIProvider, AbstractAgent, AbstractEventService, AbstractExecutor, AbstractManager, AbstractPlugin, AbstractTool, AgentFactory, AgentTemplates, AuthenticationError, CLAUDE_MODELS, CacheIntegrityError, CircuitBreakerOpenError, ConfigurationError, ConversationHistory, ConversationStore, DEFAULT_ABSTRACT_EVENT_SERVICE, DEFAULT_CONTEXT_WINDOW, DEFAULT_MAX_OUTPUT, DefaultEventService, EVENT_EMITTER_EVENTS, EXECUTION_EVENTS, EXECUTION_EVENT_PREFIX, ErrorUtils, EventEmitterPlugin, EventHistoryModule, ExecutionProxy, type IAIProvider, type IAIProviderInstance, type IAIProviderManager, type IAbstractTool, type IAbstractToolOptions, type IAgent, type IAgentConfig, type IAgentCreationOptions, type IAgentCreationStats, type IAgentEventData, type IAgentFactory, type IAgentFactoryOptions, type IAgentHookDefinition, type IAgentLifecycleEvents, type IAgentTemplate, type IAssistantMessage, type IBaseEventData, type IBaseMessage, type ICacheEntry, type ICacheKey, type ICacheOptions, type ICacheStats, type ICacheStorage, type IChatExecutionRequest, type IChatOptions, type ICommandHookDefinition, type IConfigValidationResult, type IContextOptions, type IContextTokenUsage, type IContextWindowState, type IConversationContext, type IConversationResponse, type IConversationService, type IConversationServiceOptions, type IEventContext, type IEventEmitterEventData, type IEventEmitterHierarchicalEventData, type IEventEmitterMetrics, type IEventEmitterMetricsSnapshot, type IEventEmitterPlugin, type IEventEmitterPluginOptions, type IEventHistoryModule, type IEventHistoryRecord, type IEventHistorySnapshot, type IEventObjectValue, type IEventService, type IEventServiceOwnerBinding, type IExecutionEventData, type IExecutionService, type IExecutionServiceOptions, type IExecutor, type IExecutorAwareProviderConfig, type IFunctionTool, type IHistoryEntry, type IHookDefinition, type IHookGroup, type IHookInput, type IHookResult, type IHookTypeExecutor, type IHttpHookDefinition, type IImageComposeRequest, type IImageEditRequest, type IImageGenerationProvider, type IImageGenerationRequest, type IImageGenerationResult, type IInlineImageInputSource, type IInlineImageMessagePart, type ILocalExecutorConfig, type ILogger, type IMCPToolConfig, type IMediaOutputRef, type IModelDefinition, type IOpenAPIToolConfig, type IOwnerPathSegment, type IParameterSchema, type IParameterValidationResult, type IPermissionLists, type IPlugin, type IPluginConfig, type IPluginContext, type IPluginContract, type IPluginData, type IPluginErrorContext, type IPluginExecutionContext, type IPluginExecutionResult, type IPluginHooks, type IPluginOptions, type IPluginStats, type IProgressReportingTool, type IPromptHookDefinition, type IProviderConfig, type IProviderMediaError, type IProviderOptions, type IProviderRequest, type IProviderSpecificOptions, type IRawProviderResponse, type IRemoteExecutorConfig, type IRunOptions, type ISimpleValidationResult, type IStreamExecutionRequest, type IStreamingChunk, type ISystemMessage, type ITemplateApplicationResult, type ITextMessagePart, type ITokenUsage, type ITool, type IToolCall, type IToolContract, type IToolEventData, type IToolExecutionContext, type IToolExecutionRequest, type IToolExecutionResult, type IToolExecutionService, type IToolExecutionStep, type IToolFactory, type IToolManager, type IToolMessage, type IToolRegistry, type IToolResult, type IToolSchema, type IToolWithEventService, type IUniversalObjectValue, type IUriImageInputSource, type IUriImageMessagePart, type IUserMessage, type IUtilLogEntry, type IValidationIssue, type IValidationOptions, type IValidationResult, type IVideoGenerationProvider, type IVideoGenerationRequest, type IVideoJobAccepted, type IVideoJobSnapshot, type IWorkflowConfig, type IWorkflowConversionOptions, type IWorkflowConversionResult, type IWorkflowConverter, type IWorkflowData, type IWorkflowMetadata, type IWorkflowValidator, InMemoryEventEmitterMetrics, LocalExecutor, MODE_POLICY, MessageConverter, ModelNotAvailableError, NetworkError, ObservableEventService, PluginCategory, PluginError, PluginPriority, ProviderError, RateLimitError, Robota, RobotaError, SilentLogger, StorageError, StructuredEventService, TASK_EVENTS, TASK_EVENT_PREFIX, type TAgentCreationMetadata, type TComplexConfigValue, type TConfigData, type TConfigValue, type TContextData, type TConversationContextMetadata, type TErrorContextData, type TErrorExternalInput, type TEventEmitterListener, type TEventExtensionValue, type TEventListener, type TEventLoggerData, type TEventName, type TEventUniversalValue, type TExecutionEventName, type TExecutionMetadata, type THookEvent, type THooksConfig, type TImageInputSource, type TJSONSchemaEnum, type TJSONSchemaKind, type TKnownToolName, type TLoggerData, type TManagerToolParameters, type TMessageState, type TMetadata, type TMetadataValue, TOOL_EVENTS, TOOL_EVENT_PREFIX, type TParameterDefaultValue, type TPermissionDecision, type TPermissionMode, type TPrimitiveValue, type TProviderConfigValue, type TProviderLoggingData, type TProviderMediaResult, type TProviderOptionValueBase, TRUST_TO_MODE, type TResponseMetadata, type TTextDeltaCallback, type TTimerId, type TToolArgs, type TToolExecutionFunction, type TToolExecutionParameters, type TToolExecutor, type TToolMetadata, type TToolParameters, type TToolProgressCallback, type TTrustLevel, type TUniversalArrayValue, type TUniversalMessage, type TUniversalMessageMetadata, type TUniversalMessagePart, type TUniversalMessageRole, type TUniversalValue, type TUserEvent, type TUtilLogLevel, ToolExecutionError, UNKNOWN_TOOL_FALLBACK, USER_EVENTS, USER_EVENT_PREFIX, ValidationError, ValidationSeverity, Validator, bindEventServiceOwner, bindWithOwnerPath, chatEntryToMessage, composeEventName, createAssistantMessage, createExecutionProxy, createLogger, createSystemMessage, createToolMessage, createUserMessage, evaluatePermission, formatTokenCount, getGlobalLogLevel, getMessagesForAPI, getModelContextWindow, getModelMaxOutput, getModelName, getToolEstimatedDuration, getToolExecutionSteps, isAssistantMessage, isChatEntry, isDefaultEventService, isImageGenerationProvider, isProgressReportingTool, isSystemMessage, isToolMessage, isUserMessage, isVideoGenerationProvider, logger, messageToHistoryEntry, runHooks, setGlobalLogLevel, setToolProgressCallback, startPeriodicTask, stopPeriodicTask, validateAgentConfig, validateApiKey, validateModelName, validateProviderName, validateUserInput, withEventEmission };
@@ -87,8 +87,49 @@ interface IToolMessage extends IBaseMessage {
87
87
  }
88
88
  /**
89
89
  * Universal message union used across the SDK as the canonical contract.
90
+ * Used for AI provider communication. Extracted from IHistoryEntry[] via filtering.
90
91
  */
91
92
  type TUniversalMessage = IUserMessage | IAssistantMessage | ISystemMessage | IToolMessage;
93
+ /**
94
+ * Universal history entry — the base type for all records in conversation history.
95
+ *
96
+ * History is a universal timeline that records everything: AI chat messages,
97
+ * system events, skill invocations, permission decisions, etc.
98
+ * AI provider receives only chat entries (filtered and converted to TUniversalMessage).
99
+ * TUI can render any range of entries.
100
+ *
101
+ * - append-only, read-only
102
+ * - category + type for classification (free-form strings, no pre-defined enum)
103
+ * - data holds type-specific structured content
104
+ */
105
+ interface IHistoryEntry<T = unknown> {
106
+ /** Unique entry identifier */
107
+ id: string;
108
+ /** Entry creation timestamp */
109
+ timestamp: Date;
110
+ /** Top-level classification: 'chat', 'event', etc. */
111
+ category: string;
112
+ /** Sub-classification within category. Free-form, not pre-defined. */
113
+ type: string;
114
+ /** Type-specific structured data */
115
+ data?: T;
116
+ }
117
+ /** Check if a history entry is a chat message (for AI provider filtering). */
118
+ declare function isChatEntry(entry: IHistoryEntry): boolean;
119
+ /**
120
+ * Convert a chat history entry to TUniversalMessage for AI provider consumption.
121
+ * Only call on entries where isChatEntry() returns true.
122
+ */
123
+ declare function chatEntryToMessage(entry: IHistoryEntry): TUniversalMessage;
124
+ /**
125
+ * Convert a TUniversalMessage to an IHistoryEntry for storage.
126
+ */
127
+ declare function messageToHistoryEntry(message: TUniversalMessage): IHistoryEntry;
128
+ /**
129
+ * Filter history entries and convert chat entries to TUniversalMessage[].
130
+ * Used when passing conversation to AI provider.
131
+ */
132
+ declare function getMessagesForAPI(history: IHistoryEntry[]): TUniversalMessage[];
92
133
  /**
93
134
  * Type guards for the canonical TUniversalMessage union.
94
135
  *
@@ -3066,6 +3107,10 @@ declare class ConversationStore implements IConversationHistory {
3066
3107
  addSystemMessage(content: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3067
3108
  addToolMessage(content: string, toolCallId: string, toolName?: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3068
3109
  addToolMessageWithId(content: string, toolCallId: string, toolName: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3110
+ /** Add a raw history entry (events, etc.) */
3111
+ addEntry(entry: IHistoryEntry): void;
3112
+ /** Get all history entries (universal timeline) */
3113
+ getHistory(): IHistoryEntry[];
3069
3114
  getMessages(): TUniversalMessage[];
3070
3115
  getMessagesByRole(role: TUniversalMessageRole): TUniversalMessage[];
3071
3116
  getRecentMessages(count: number): TUniversalMessage[];
@@ -3100,6 +3145,8 @@ interface IConversationHistory {
3100
3145
  addAssistantMessage(content: string | null, toolCalls?: IToolCall[], metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3101
3146
  addSystemMessage(content: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3102
3147
  addToolMessageWithId(content: string, toolCallId: string, toolName: string, metadata?: TUniversalMessageMetadata, parts?: TUniversalMessagePart[]): void;
3148
+ addEntry(entry: IHistoryEntry): void;
3149
+ getHistory(): IHistoryEntry[];
3103
3150
  getMessages(): TUniversalMessage[];
3104
3151
  getMessagesByRole(role: TUniversalMessageRole): TUniversalMessage[];
3105
3152
  getRecentMessages(count: number): TUniversalMessage[];
@@ -3360,6 +3407,22 @@ declare class Robota extends AbstractAgent<IAgentConfig, IRunOptions, TUniversal
3360
3407
  runStream(input: string, options?: IRunOptions): AsyncGenerator<string, void, undefined>;
3361
3408
  private executionDeps;
3362
3409
  getHistory(): TUniversalMessage[];
3410
+ /** Get full history timeline (IHistoryEntry[]) including events */
3411
+ getFullHistory(): Array<{
3412
+ id: string;
3413
+ timestamp: Date;
3414
+ category: string;
3415
+ type: string;
3416
+ data?: unknown;
3417
+ }>;
3418
+ /** Add an event entry to history */
3419
+ addHistoryEntry(entry: {
3420
+ id: string;
3421
+ timestamp: Date;
3422
+ category: string;
3423
+ type: string;
3424
+ data?: unknown;
3425
+ }): void;
3363
3426
  clearHistory(): void;
3364
3427
  /** Inject a message into conversation history without triggering execution. */
3365
3428
  injectMessage(role: 'user' | 'assistant' | 'system', content: string): void;
@@ -4450,4 +4513,4 @@ interface IRunHooksResult {
4450
4513
  }
4451
4514
  declare function runHooks(config: THooksConfig | undefined, event: THookEvent, input: IHookInput, executors?: IHookTypeExecutor[]): Promise<IRunHooksResult>;
4452
4515
 
4453
- export { AGENT_EVENTS, AGENT_EVENT_PREFIX, AbstractAIProvider, AbstractAgent, AbstractEventService, AbstractExecutor, AbstractManager, AbstractPlugin, AbstractTool, AgentFactory, AgentTemplates, AuthenticationError, CLAUDE_MODELS, CacheIntegrityError, CircuitBreakerOpenError, ConfigurationError, ConversationHistory, ConversationStore, DEFAULT_ABSTRACT_EVENT_SERVICE, DEFAULT_CONTEXT_WINDOW, DEFAULT_MAX_OUTPUT, DefaultEventService, EVENT_EMITTER_EVENTS, EXECUTION_EVENTS, EXECUTION_EVENT_PREFIX, ErrorUtils, EventEmitterPlugin, EventHistoryModule, ExecutionProxy, type IAIProvider, type IAIProviderInstance, type IAIProviderManager, type IAbstractTool, type IAbstractToolOptions, type IAgent, type IAgentConfig, type IAgentCreationOptions, type IAgentCreationStats, type IAgentEventData, type IAgentFactory, type IAgentFactoryOptions, type IAgentHookDefinition, type IAgentLifecycleEvents, type IAgentTemplate, type IAssistantMessage, type IBaseEventData, type IBaseMessage, type ICacheEntry, type ICacheKey, type ICacheOptions, type ICacheStats, type ICacheStorage, type IChatExecutionRequest, type IChatOptions, type ICommandHookDefinition, type IConfigValidationResult, type IContextOptions, type IContextTokenUsage, type IContextWindowState, type IConversationContext, type IConversationResponse, type IConversationService, type IConversationServiceOptions, type IEventContext, type IEventEmitterEventData, type IEventEmitterHierarchicalEventData, type IEventEmitterMetrics, type IEventEmitterMetricsSnapshot, type IEventEmitterPlugin, type IEventEmitterPluginOptions, type IEventHistoryModule, type IEventHistoryRecord, type IEventHistorySnapshot, type IEventObjectValue, type IEventService, type IEventServiceOwnerBinding, type IExecutionEventData, type IExecutionService, type IExecutionServiceOptions, type IExecutor, type IExecutorAwareProviderConfig, type IFunctionTool, type IHookDefinition, type IHookGroup, type IHookInput, type IHookResult, type IHookTypeExecutor, type IHttpHookDefinition, type IImageComposeRequest, type IImageEditRequest, type IImageGenerationProvider, type IImageGenerationRequest, type IImageGenerationResult, type IInlineImageInputSource, type IInlineImageMessagePart, type ILocalExecutorConfig, type ILogger, type IMCPToolConfig, type IMediaOutputRef, type IModelDefinition, type IOpenAPIToolConfig, type IOwnerPathSegment, type IParameterSchema, type IParameterValidationResult, type IPermissionLists, type IPlugin, type IPluginConfig, type IPluginContext, type IPluginContract, type IPluginData, type IPluginErrorContext, type IPluginExecutionContext, type IPluginExecutionResult, type IPluginHooks, type IPluginOptions, type IPluginStats, type IProgressReportingTool, type IPromptHookDefinition, type IProviderConfig, type IProviderMediaError, type IProviderOptions, type IProviderRequest, type IProviderSpecificOptions, type IRawProviderResponse, type IRemoteExecutorConfig, type IRunOptions, type ISimpleValidationResult, type IStreamExecutionRequest, type IStreamingChunk, type ISystemMessage, type ITemplateApplicationResult, type ITextMessagePart, type ITokenUsage, type ITool, type IToolCall, type IToolContract, type IToolEventData, type IToolExecutionContext, type IToolExecutionRequest, type IToolExecutionResult, type IToolExecutionService, type IToolExecutionStep, type IToolFactory, type IToolManager, type IToolMessage, type IToolRegistry, type IToolResult, type IToolSchema, type IToolWithEventService, type IUniversalObjectValue, type IUriImageInputSource, type IUriImageMessagePart, type IUserMessage, type IUtilLogEntry, type IValidationIssue, type IValidationOptions, type IValidationResult, type IVideoGenerationProvider, type IVideoGenerationRequest, type IVideoJobAccepted, type IVideoJobSnapshot, type IWorkflowConfig, type IWorkflowConversionOptions, type IWorkflowConversionResult, type IWorkflowConverter, type IWorkflowData, type IWorkflowMetadata, type IWorkflowValidator, InMemoryEventEmitterMetrics, LocalExecutor, MODE_POLICY, MessageConverter, ModelNotAvailableError, NetworkError, ObservableEventService, PluginCategory, PluginError, PluginPriority, ProviderError, RateLimitError, Robota, RobotaError, SilentLogger, StorageError, StructuredEventService, TASK_EVENTS, TASK_EVENT_PREFIX, type TAgentCreationMetadata, type TComplexConfigValue, type TConfigData, type TConfigValue, type TContextData, type TConversationContextMetadata, type TErrorContextData, type TErrorExternalInput, type TEventEmitterListener, type TEventExtensionValue, type TEventListener, type TEventLoggerData, type TEventName, type TEventUniversalValue, type TExecutionEventName, type TExecutionMetadata, type THookEvent, type THooksConfig, type TImageInputSource, type TJSONSchemaEnum, type TJSONSchemaKind, type TKnownToolName, type TLoggerData, type TManagerToolParameters, type TMessageState, type TMetadata, type TMetadataValue, TOOL_EVENTS, TOOL_EVENT_PREFIX, type TParameterDefaultValue, type TPermissionDecision, type TPermissionMode, type TPrimitiveValue, type TProviderConfigValue, type TProviderLoggingData, type TProviderMediaResult, type TProviderOptionValueBase, TRUST_TO_MODE, type TResponseMetadata, type TTextDeltaCallback, type TTimerId, type TToolArgs, type TToolExecutionFunction, type TToolExecutionParameters, type TToolExecutor, type TToolMetadata, type TToolParameters, type TToolProgressCallback, type TTrustLevel, type TUniversalArrayValue, type TUniversalMessage, type TUniversalMessageMetadata, type TUniversalMessagePart, type TUniversalMessageRole, type TUniversalValue, type TUserEvent, type TUtilLogLevel, ToolExecutionError, UNKNOWN_TOOL_FALLBACK, USER_EVENTS, USER_EVENT_PREFIX, ValidationError, ValidationSeverity, Validator, bindEventServiceOwner, bindWithOwnerPath, composeEventName, createAssistantMessage, createExecutionProxy, createLogger, createSystemMessage, createToolMessage, createUserMessage, evaluatePermission, formatTokenCount, getGlobalLogLevel, getModelContextWindow, getModelMaxOutput, getModelName, getToolEstimatedDuration, getToolExecutionSteps, isAssistantMessage, isDefaultEventService, isImageGenerationProvider, isProgressReportingTool, isSystemMessage, isToolMessage, isUserMessage, isVideoGenerationProvider, logger, runHooks, setGlobalLogLevel, setToolProgressCallback, startPeriodicTask, stopPeriodicTask, validateAgentConfig, validateApiKey, validateModelName, validateProviderName, validateUserInput, withEventEmission };
4516
+ export { AGENT_EVENTS, AGENT_EVENT_PREFIX, AbstractAIProvider, AbstractAgent, AbstractEventService, AbstractExecutor, AbstractManager, AbstractPlugin, AbstractTool, AgentFactory, AgentTemplates, AuthenticationError, CLAUDE_MODELS, CacheIntegrityError, CircuitBreakerOpenError, ConfigurationError, ConversationHistory, ConversationStore, DEFAULT_ABSTRACT_EVENT_SERVICE, DEFAULT_CONTEXT_WINDOW, DEFAULT_MAX_OUTPUT, DefaultEventService, EVENT_EMITTER_EVENTS, EXECUTION_EVENTS, EXECUTION_EVENT_PREFIX, ErrorUtils, EventEmitterPlugin, EventHistoryModule, ExecutionProxy, type IAIProvider, type IAIProviderInstance, type IAIProviderManager, type IAbstractTool, type IAbstractToolOptions, type IAgent, type IAgentConfig, type IAgentCreationOptions, type IAgentCreationStats, type IAgentEventData, type IAgentFactory, type IAgentFactoryOptions, type IAgentHookDefinition, type IAgentLifecycleEvents, type IAgentTemplate, type IAssistantMessage, type IBaseEventData, type IBaseMessage, type ICacheEntry, type ICacheKey, type ICacheOptions, type ICacheStats, type ICacheStorage, type IChatExecutionRequest, type IChatOptions, type ICommandHookDefinition, type IConfigValidationResult, type IContextOptions, type IContextTokenUsage, type IContextWindowState, type IConversationContext, type IConversationResponse, type IConversationService, type IConversationServiceOptions, type IEventContext, type IEventEmitterEventData, type IEventEmitterHierarchicalEventData, type IEventEmitterMetrics, type IEventEmitterMetricsSnapshot, type IEventEmitterPlugin, type IEventEmitterPluginOptions, type IEventHistoryModule, type IEventHistoryRecord, type IEventHistorySnapshot, type IEventObjectValue, type IEventService, type IEventServiceOwnerBinding, type IExecutionEventData, type IExecutionService, type IExecutionServiceOptions, type IExecutor, type IExecutorAwareProviderConfig, type IFunctionTool, type IHistoryEntry, type IHookDefinition, type IHookGroup, type IHookInput, type IHookResult, type IHookTypeExecutor, type IHttpHookDefinition, type IImageComposeRequest, type IImageEditRequest, type IImageGenerationProvider, type IImageGenerationRequest, type IImageGenerationResult, type IInlineImageInputSource, type IInlineImageMessagePart, type ILocalExecutorConfig, type ILogger, type IMCPToolConfig, type IMediaOutputRef, type IModelDefinition, type IOpenAPIToolConfig, type IOwnerPathSegment, type IParameterSchema, type IParameterValidationResult, type IPermissionLists, type IPlugin, type IPluginConfig, type IPluginContext, type IPluginContract, type IPluginData, type IPluginErrorContext, type IPluginExecutionContext, type IPluginExecutionResult, type IPluginHooks, type IPluginOptions, type IPluginStats, type IProgressReportingTool, type IPromptHookDefinition, type IProviderConfig, type IProviderMediaError, type IProviderOptions, type IProviderRequest, type IProviderSpecificOptions, type IRawProviderResponse, type IRemoteExecutorConfig, type IRunOptions, type ISimpleValidationResult, type IStreamExecutionRequest, type IStreamingChunk, type ISystemMessage, type ITemplateApplicationResult, type ITextMessagePart, type ITokenUsage, type ITool, type IToolCall, type IToolContract, type IToolEventData, type IToolExecutionContext, type IToolExecutionRequest, type IToolExecutionResult, type IToolExecutionService, type IToolExecutionStep, type IToolFactory, type IToolManager, type IToolMessage, type IToolRegistry, type IToolResult, type IToolSchema, type IToolWithEventService, type IUniversalObjectValue, type IUriImageInputSource, type IUriImageMessagePart, type IUserMessage, type IUtilLogEntry, type IValidationIssue, type IValidationOptions, type IValidationResult, type IVideoGenerationProvider, type IVideoGenerationRequest, type IVideoJobAccepted, type IVideoJobSnapshot, type IWorkflowConfig, type IWorkflowConversionOptions, type IWorkflowConversionResult, type IWorkflowConverter, type IWorkflowData, type IWorkflowMetadata, type IWorkflowValidator, InMemoryEventEmitterMetrics, LocalExecutor, MODE_POLICY, MessageConverter, ModelNotAvailableError, NetworkError, ObservableEventService, PluginCategory, PluginError, PluginPriority, ProviderError, RateLimitError, Robota, RobotaError, SilentLogger, StorageError, StructuredEventService, TASK_EVENTS, TASK_EVENT_PREFIX, type TAgentCreationMetadata, type TComplexConfigValue, type TConfigData, type TConfigValue, type TContextData, type TConversationContextMetadata, type TErrorContextData, type TErrorExternalInput, type TEventEmitterListener, type TEventExtensionValue, type TEventListener, type TEventLoggerData, type TEventName, type TEventUniversalValue, type TExecutionEventName, type TExecutionMetadata, type THookEvent, type THooksConfig, type TImageInputSource, type TJSONSchemaEnum, type TJSONSchemaKind, type TKnownToolName, type TLoggerData, type TManagerToolParameters, type TMessageState, type TMetadata, type TMetadataValue, TOOL_EVENTS, TOOL_EVENT_PREFIX, type TParameterDefaultValue, type TPermissionDecision, type TPermissionMode, type TPrimitiveValue, type TProviderConfigValue, type TProviderLoggingData, type TProviderMediaResult, type TProviderOptionValueBase, TRUST_TO_MODE, type TResponseMetadata, type TTextDeltaCallback, type TTimerId, type TToolArgs, type TToolExecutionFunction, type TToolExecutionParameters, type TToolExecutor, type TToolMetadata, type TToolParameters, type TToolProgressCallback, type TTrustLevel, type TUniversalArrayValue, type TUniversalMessage, type TUniversalMessageMetadata, type TUniversalMessagePart, type TUniversalMessageRole, type TUniversalValue, type TUserEvent, type TUtilLogLevel, ToolExecutionError, UNKNOWN_TOOL_FALLBACK, USER_EVENTS, USER_EVENT_PREFIX, ValidationError, ValidationSeverity, Validator, bindEventServiceOwner, bindWithOwnerPath, chatEntryToMessage, composeEventName, createAssistantMessage, createExecutionProxy, createLogger, createSystemMessage, createToolMessage, createUserMessage, evaluatePermission, formatTokenCount, getGlobalLogLevel, getMessagesForAPI, getModelContextWindow, getModelMaxOutput, getModelName, getToolEstimatedDuration, getToolExecutionSteps, isAssistantMessage, isChatEntry, isDefaultEventService, isImageGenerationProvider, isProgressReportingTool, isSystemMessage, isToolMessage, isUserMessage, isVideoGenerationProvider, logger, messageToHistoryEntry, runHooks, setGlobalLogLevel, setToolProgressCallback, startPeriodicTask, stopPeriodicTask, validateAgentConfig, validateApiKey, validateModelName, validateProviderName, validateUserInput, withEventEmission };