@robota-sdk/agent-core 3.0.0-beta.53 → 3.0.0-beta.55
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.
- package/CHANGELOG.md +16 -0
- package/dist/browser/index.d.ts +114 -45
- package/dist/browser/index.js +7 -7
- package/dist/node/index.cjs +7 -7
- package/dist/node/index.d.cts +114 -45
- package/dist/node/index.d.ts +114 -45
- package/dist/node/index.js +7 -7
- package/package.json +5 -2
package/dist/node/index.d.cts
CHANGED
|
@@ -202,6 +202,16 @@ interface IPluginContext {
|
|
|
202
202
|
error?: Error;
|
|
203
203
|
executionContext?: TContextData;
|
|
204
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
* Type utility functions for safe type checking and validation
|
|
207
|
+
* @internal
|
|
208
|
+
*/
|
|
209
|
+
declare const TypeUtils: {
|
|
210
|
+
isPrimitive: (value: TUniversalValue) => value is TPrimitiveValue;
|
|
211
|
+
isArray: (value: TUniversalValue) => value is TUniversalArrayValue;
|
|
212
|
+
isObject: (value: TUniversalValue) => value is IUniversalObjectValue;
|
|
213
|
+
isUniversalValue: (value: TUniversalValue) => value is TUniversalValue;
|
|
214
|
+
};
|
|
205
215
|
|
|
206
216
|
/**
|
|
207
217
|
* Reusable type definitions for provider layer
|
|
@@ -234,6 +244,7 @@ interface IToolSchema {
|
|
|
234
244
|
type: 'object';
|
|
235
245
|
properties: Record<string, IParameterSchema>;
|
|
236
246
|
required?: string[];
|
|
247
|
+
additionalProperties?: boolean | IParameterSchema;
|
|
237
248
|
};
|
|
238
249
|
}
|
|
239
250
|
/**
|
|
@@ -917,6 +928,24 @@ interface ILogger {
|
|
|
917
928
|
* - Inject a real logger explicitly if you want output.
|
|
918
929
|
*/
|
|
919
930
|
declare const SilentLogger: ILogger;
|
|
931
|
+
/**
|
|
932
|
+
* Console logger implementation
|
|
933
|
+
* @internal
|
|
934
|
+
*/
|
|
935
|
+
declare class ConsoleLogger implements ILogger {
|
|
936
|
+
private level?;
|
|
937
|
+
private packageName;
|
|
938
|
+
private sinkLogger;
|
|
939
|
+
constructor(packageName: string, logger?: ILogger);
|
|
940
|
+
debug(...args: Array<TUniversalValue | TLoggerData | Error>): void;
|
|
941
|
+
info(...args: Array<TUniversalValue | TLoggerData | Error>): void;
|
|
942
|
+
warn(...args: Array<TUniversalValue | TLoggerData | Error>): void;
|
|
943
|
+
error(...args: Array<TUniversalValue | TLoggerData | Error>): void;
|
|
944
|
+
log(...args: Array<TUniversalValue | TLoggerData | Error>): void;
|
|
945
|
+
private getLevel;
|
|
946
|
+
private shouldLog;
|
|
947
|
+
private forward;
|
|
948
|
+
}
|
|
920
949
|
/**
|
|
921
950
|
* Create a named logger instance for a package or module.
|
|
922
951
|
* Use this to create loggers with a specific name prefix for easy log filtering.
|
|
@@ -1604,6 +1633,8 @@ interface IRunOptions {
|
|
|
1604
1633
|
metadata?: TMetadata;
|
|
1605
1634
|
/** AbortSignal for cancelling execution */
|
|
1606
1635
|
signal?: AbortSignal;
|
|
1636
|
+
/** Per-run streaming text callback. Prefer this over mutating provider callback state. */
|
|
1637
|
+
onTextDelta?: TTextDeltaCallback;
|
|
1607
1638
|
}
|
|
1608
1639
|
/**
|
|
1609
1640
|
* Generic agent interface with type parameters for enhanced type safety
|
|
@@ -1650,6 +1681,50 @@ interface ISafetySetting {
|
|
|
1650
1681
|
[key: string]: TConfigValue;
|
|
1651
1682
|
}
|
|
1652
1683
|
|
|
1684
|
+
interface IProviderConfig$1 {
|
|
1685
|
+
name: string;
|
|
1686
|
+
model: string;
|
|
1687
|
+
apiKey?: string;
|
|
1688
|
+
baseURL?: string;
|
|
1689
|
+
timeout?: number;
|
|
1690
|
+
}
|
|
1691
|
+
interface IProviderProfileDefaults {
|
|
1692
|
+
model?: string;
|
|
1693
|
+
apiKey?: string;
|
|
1694
|
+
baseURL?: string;
|
|
1695
|
+
timeout?: number;
|
|
1696
|
+
}
|
|
1697
|
+
interface IProviderProfileConfig {
|
|
1698
|
+
type?: string;
|
|
1699
|
+
model?: string;
|
|
1700
|
+
apiKey?: string;
|
|
1701
|
+
baseURL?: string;
|
|
1702
|
+
timeout?: number;
|
|
1703
|
+
}
|
|
1704
|
+
interface IProviderProbeResult {
|
|
1705
|
+
ok: boolean;
|
|
1706
|
+
message: string;
|
|
1707
|
+
models?: string[];
|
|
1708
|
+
}
|
|
1709
|
+
type TProviderSetupField = 'baseURL' | 'model' | 'apiKey';
|
|
1710
|
+
interface IProviderSetupStepDefinition {
|
|
1711
|
+
key: TProviderSetupField;
|
|
1712
|
+
title: string;
|
|
1713
|
+
defaultValue?: string;
|
|
1714
|
+
required?: boolean;
|
|
1715
|
+
masked?: boolean;
|
|
1716
|
+
}
|
|
1717
|
+
interface IProviderDefinition {
|
|
1718
|
+
type: string;
|
|
1719
|
+
defaults?: IProviderProfileDefaults;
|
|
1720
|
+
setupSteps?: readonly IProviderSetupStepDefinition[];
|
|
1721
|
+
requiresApiKey?: boolean;
|
|
1722
|
+
createProvider: (config: IProviderConfig$1) => IAIProvider;
|
|
1723
|
+
probeProfile?: (profile: IProviderProfileConfig) => Promise<IProviderProbeResult>;
|
|
1724
|
+
}
|
|
1725
|
+
declare function findProviderDefinition(definitions: readonly IProviderDefinition[], type: string): IProviderDefinition | undefined;
|
|
1726
|
+
declare function formatSupportedProviderTypes(definitions: readonly IProviderDefinition[]): string;
|
|
1727
|
+
|
|
1653
1728
|
/**
|
|
1654
1729
|
* Provider-agnostic media output reference.
|
|
1655
1730
|
* Providers must not return raw binary payloads in this contract.
|
|
@@ -2702,55 +2777,26 @@ declare abstract class AbstractExecutor implements IExecutor {
|
|
|
2702
2777
|
protected validateResponse(response: TUniversalMessage): void;
|
|
2703
2778
|
}
|
|
2704
2779
|
|
|
2705
|
-
interface IOpenAIMessage {
|
|
2706
|
-
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
2707
|
-
content: string | null;
|
|
2708
|
-
tool_calls?: {
|
|
2709
|
-
id: string;
|
|
2710
|
-
type: 'function';
|
|
2711
|
-
function: {
|
|
2712
|
-
name: string;
|
|
2713
|
-
arguments: string;
|
|
2714
|
-
};
|
|
2715
|
-
}[];
|
|
2716
|
-
tool_call_id?: string;
|
|
2717
|
-
name?: string;
|
|
2718
|
-
}
|
|
2719
|
-
interface IAnthropicProviderMessage {
|
|
2720
|
-
role: 'user' | 'assistant';
|
|
2721
|
-
content: string;
|
|
2722
|
-
}
|
|
2723
|
-
interface IGoogleProviderMessage {
|
|
2724
|
-
role: 'user' | 'model';
|
|
2725
|
-
parts: {
|
|
2726
|
-
text: string;
|
|
2727
|
-
}[];
|
|
2728
|
-
}
|
|
2729
2780
|
/**
|
|
2730
|
-
* Provider message format
|
|
2781
|
+
* Provider message format type.
|
|
2782
|
+
*
|
|
2783
|
+
* Provider packages own concrete message shapes. Core only carries the generic
|
|
2784
|
+
* conversion hook and never branches on provider names.
|
|
2731
2785
|
*/
|
|
2732
|
-
type TProviderMessage =
|
|
2786
|
+
type TProviderMessage = TUniversalMessage | IUniversalObjectValue;
|
|
2787
|
+
type TMessageFormatConverter<TMessage extends TProviderMessage = TProviderMessage> = (messages: readonly TUniversalMessage[]) => TMessage[];
|
|
2788
|
+
type TMessageConverterRegistry = Readonly<Record<string, TMessageFormatConverter>>;
|
|
2733
2789
|
/**
|
|
2734
2790
|
* Universal message converter utility
|
|
2735
|
-
*
|
|
2791
|
+
*
|
|
2792
|
+
* The converter is registry-based so provider-specific message conversion is
|
|
2793
|
+
* injected by provider packages or callers instead of being hardcoded in core.
|
|
2736
2794
|
*/
|
|
2737
2795
|
declare class MessageConverter {
|
|
2738
2796
|
/**
|
|
2739
|
-
* Convert messages
|
|
2740
|
-
*/
|
|
2741
|
-
static toProviderFormat(messages: TUniversalMessage[], providerName: string): TProviderMessage[];
|
|
2742
|
-
/**
|
|
2743
|
-
* Convert to OpenAI format
|
|
2744
|
-
*/
|
|
2745
|
-
private static toOpenAIFormat;
|
|
2746
|
-
/**
|
|
2747
|
-
* Convert to Anthropic format
|
|
2797
|
+
* Convert messages using an injected converter or converter registry.
|
|
2748
2798
|
*/
|
|
2749
|
-
|
|
2750
|
-
/**
|
|
2751
|
-
* Convert to Google format
|
|
2752
|
-
*/
|
|
2753
|
-
private static toGoogleFormat;
|
|
2799
|
+
static toProviderFormat(messages: TUniversalMessage[], converter?: TMessageFormatConverter | string, registry?: TMessageConverterRegistry): TProviderMessage[];
|
|
2754
2800
|
/**
|
|
2755
2801
|
* Convert to universal format (no conversion)
|
|
2756
2802
|
*/
|
|
@@ -2796,7 +2842,7 @@ declare class Validator {
|
|
|
2796
2842
|
/**
|
|
2797
2843
|
* Validate API key format (basic check)
|
|
2798
2844
|
*/
|
|
2799
|
-
static validateApiKey(apiKey: string
|
|
2845
|
+
static validateApiKey(apiKey: string): ISimpleValidationResult;
|
|
2800
2846
|
}
|
|
2801
2847
|
declare const validateAgentConfig: typeof Validator.validateAgentConfig;
|
|
2802
2848
|
declare const validateUserInput: typeof Validator.validateUserInput;
|
|
@@ -3108,6 +3154,8 @@ declare class ConversationHistory {
|
|
|
3108
3154
|
conversationIds: string[];
|
|
3109
3155
|
totalMessages: number;
|
|
3110
3156
|
};
|
|
3157
|
+
/** @internal */
|
|
3158
|
+
private cleanupOldConversations;
|
|
3111
3159
|
}
|
|
3112
3160
|
|
|
3113
3161
|
/**
|
|
@@ -3238,7 +3286,6 @@ interface IEventEmitterHierarchicalEventData extends IEventEmitterEventData {
|
|
|
3238
3286
|
actualResult?: IToolResult;
|
|
3239
3287
|
};
|
|
3240
3288
|
}
|
|
3241
|
-
|
|
3242
3289
|
/** Event emitter configuration */
|
|
3243
3290
|
interface IEventEmitterPluginOptions extends IPluginOptions {
|
|
3244
3291
|
events?: TEventName[];
|
|
@@ -3301,6 +3348,12 @@ declare class EventEmitterPlugin extends AbstractPlugin<IEventEmitterPluginOptio
|
|
|
3301
3348
|
destroy(): Promise<void>;
|
|
3302
3349
|
}
|
|
3303
3350
|
|
|
3351
|
+
/**
|
|
3352
|
+
* Configuration and tool management delegate for the Robota agent.
|
|
3353
|
+
*
|
|
3354
|
+
* Extracted from robota.ts to keep the main class under 300 lines.
|
|
3355
|
+
*/
|
|
3356
|
+
|
|
3304
3357
|
/** Agent statistics metadata type */
|
|
3305
3358
|
type TAgentStatsMetadata = Record<string, string | number | boolean | Date | string[]>;
|
|
3306
3359
|
|
|
@@ -4316,7 +4369,9 @@ declare function formatTokenCount(tokens: number): string;
|
|
|
4316
4369
|
* Hook system types — Claude Code compatible event/hook model.
|
|
4317
4370
|
*/
|
|
4318
4371
|
/** Hook lifecycle events */
|
|
4319
|
-
type THookEvent = 'PreToolUse' | 'PostToolUse' | 'SessionStart' | 'Stop' | 'PreCompact' | 'PostCompact' | 'UserPromptSubmit';
|
|
4372
|
+
type THookEvent = 'PreToolUse' | 'PostToolUse' | 'SessionStart' | 'SessionEnd' | 'Stop' | 'StopFailure' | 'PreCompact' | 'PostCompact' | 'UserPromptSubmit' | 'SubagentStart' | 'SubagentStop' | 'WorktreeCreate' | 'WorktreeRemove';
|
|
4373
|
+
/** Claude Code compatible session end reasons. */
|
|
4374
|
+
type TSessionEndReason = 'clear' | 'resume' | 'logout' | 'prompt_input_exit' | 'bypass_permissions_disabled' | 'other';
|
|
4320
4375
|
/** Command hook — executes a shell command */
|
|
4321
4376
|
interface ICommandHookDefinition {
|
|
4322
4377
|
type: 'command';
|
|
@@ -4373,6 +4428,20 @@ interface IHookInput {
|
|
|
4373
4428
|
prompt?: string;
|
|
4374
4429
|
/** Assistant response text (Stop only) */
|
|
4375
4430
|
response?: string;
|
|
4431
|
+
/** Last assistant message text (StopFailure only) */
|
|
4432
|
+
last_assistant_message?: string;
|
|
4433
|
+
/** Stop hook recursion guard (Stop/StopFailure only) */
|
|
4434
|
+
stop_hook_active?: boolean;
|
|
4435
|
+
/** Session end reason (SessionEnd only) */
|
|
4436
|
+
reason?: TSessionEndReason | string;
|
|
4437
|
+
/** Session transcript path when available (SessionEnd/SubagentStop only) */
|
|
4438
|
+
transcript_path?: string;
|
|
4439
|
+
/** Subagent identifier (SubagentStart/SubagentStop only) */
|
|
4440
|
+
agent_id?: string;
|
|
4441
|
+
/** Subagent type/name (SubagentStart/SubagentStop only) */
|
|
4442
|
+
agent_type?: string;
|
|
4443
|
+
/** Subagent transcript path when available (SubagentStop only) */
|
|
4444
|
+
agent_transcript_path?: string;
|
|
4376
4445
|
/** Additional environment variables to pass to hook child processes */
|
|
4377
4446
|
env?: Record<string, string>;
|
|
4378
4447
|
}
|
|
@@ -4423,4 +4492,4 @@ interface IRunHooksResult {
|
|
|
4423
4492
|
}
|
|
4424
4493
|
declare function runHooks(config: THooksConfig | undefined, event: THookEvent, input: IHookInput, executors?: IHookTypeExecutor[]): Promise<IRunHooksResult>;
|
|
4425
4494
|
|
|
4426
|
-
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 };
|
|
4495
|
+
export { AGENT_EVENTS, AGENT_EVENT_PREFIX, AbstractAIProvider, AbstractAgent, AbstractEventService, AbstractExecutor, AbstractManager, AbstractPlugin, AbstractTool, AgentFactory, AgentTemplates, AuthenticationError, CLAUDE_MODELS, CacheIntegrityError, CircuitBreakerOpenError, ConfigurationError, ConsoleLogger, 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$1 as IProviderConfig, type IProviderDefinition, type IProviderMediaError, type IProviderOptions, type IProviderProbeResult, type IProviderProfileConfig, type IProviderProfileDefaults, type IProviderRequest, type IProviderSetupStepDefinition, 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 TMessageConverterRegistry, type TMessageFormatConverter, 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 TProviderMessage, type TProviderOptionValueBase, type TProviderSetupField, TRUST_TO_MODE, type TResponseMetadata, type TSessionEndReason, 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, TypeUtils, UNKNOWN_TOOL_FALLBACK, USER_EVENTS, USER_EVENT_PREFIX, ValidationError, ValidationSeverity, Validator, bindEventServiceOwner, bindWithOwnerPath, chatEntryToMessage, composeEventName, createAssistantMessage, createExecutionProxy, createLogger, createSystemMessage, createToolMessage, createUserMessage, evaluatePermission, findProviderDefinition, formatSupportedProviderTypes, 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 };
|
package/dist/node/index.d.ts
CHANGED
|
@@ -202,6 +202,16 @@ interface IPluginContext {
|
|
|
202
202
|
error?: Error;
|
|
203
203
|
executionContext?: TContextData;
|
|
204
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
* Type utility functions for safe type checking and validation
|
|
207
|
+
* @internal
|
|
208
|
+
*/
|
|
209
|
+
declare const TypeUtils: {
|
|
210
|
+
isPrimitive: (value: TUniversalValue) => value is TPrimitiveValue;
|
|
211
|
+
isArray: (value: TUniversalValue) => value is TUniversalArrayValue;
|
|
212
|
+
isObject: (value: TUniversalValue) => value is IUniversalObjectValue;
|
|
213
|
+
isUniversalValue: (value: TUniversalValue) => value is TUniversalValue;
|
|
214
|
+
};
|
|
205
215
|
|
|
206
216
|
/**
|
|
207
217
|
* Reusable type definitions for provider layer
|
|
@@ -234,6 +244,7 @@ interface IToolSchema {
|
|
|
234
244
|
type: 'object';
|
|
235
245
|
properties: Record<string, IParameterSchema>;
|
|
236
246
|
required?: string[];
|
|
247
|
+
additionalProperties?: boolean | IParameterSchema;
|
|
237
248
|
};
|
|
238
249
|
}
|
|
239
250
|
/**
|
|
@@ -917,6 +928,24 @@ interface ILogger {
|
|
|
917
928
|
* - Inject a real logger explicitly if you want output.
|
|
918
929
|
*/
|
|
919
930
|
declare const SilentLogger: ILogger;
|
|
931
|
+
/**
|
|
932
|
+
* Console logger implementation
|
|
933
|
+
* @internal
|
|
934
|
+
*/
|
|
935
|
+
declare class ConsoleLogger implements ILogger {
|
|
936
|
+
private level?;
|
|
937
|
+
private packageName;
|
|
938
|
+
private sinkLogger;
|
|
939
|
+
constructor(packageName: string, logger?: ILogger);
|
|
940
|
+
debug(...args: Array<TUniversalValue | TLoggerData | Error>): void;
|
|
941
|
+
info(...args: Array<TUniversalValue | TLoggerData | Error>): void;
|
|
942
|
+
warn(...args: Array<TUniversalValue | TLoggerData | Error>): void;
|
|
943
|
+
error(...args: Array<TUniversalValue | TLoggerData | Error>): void;
|
|
944
|
+
log(...args: Array<TUniversalValue | TLoggerData | Error>): void;
|
|
945
|
+
private getLevel;
|
|
946
|
+
private shouldLog;
|
|
947
|
+
private forward;
|
|
948
|
+
}
|
|
920
949
|
/**
|
|
921
950
|
* Create a named logger instance for a package or module.
|
|
922
951
|
* Use this to create loggers with a specific name prefix for easy log filtering.
|
|
@@ -1604,6 +1633,8 @@ interface IRunOptions {
|
|
|
1604
1633
|
metadata?: TMetadata;
|
|
1605
1634
|
/** AbortSignal for cancelling execution */
|
|
1606
1635
|
signal?: AbortSignal;
|
|
1636
|
+
/** Per-run streaming text callback. Prefer this over mutating provider callback state. */
|
|
1637
|
+
onTextDelta?: TTextDeltaCallback;
|
|
1607
1638
|
}
|
|
1608
1639
|
/**
|
|
1609
1640
|
* Generic agent interface with type parameters for enhanced type safety
|
|
@@ -1650,6 +1681,50 @@ interface ISafetySetting {
|
|
|
1650
1681
|
[key: string]: TConfigValue;
|
|
1651
1682
|
}
|
|
1652
1683
|
|
|
1684
|
+
interface IProviderConfig$1 {
|
|
1685
|
+
name: string;
|
|
1686
|
+
model: string;
|
|
1687
|
+
apiKey?: string;
|
|
1688
|
+
baseURL?: string;
|
|
1689
|
+
timeout?: number;
|
|
1690
|
+
}
|
|
1691
|
+
interface IProviderProfileDefaults {
|
|
1692
|
+
model?: string;
|
|
1693
|
+
apiKey?: string;
|
|
1694
|
+
baseURL?: string;
|
|
1695
|
+
timeout?: number;
|
|
1696
|
+
}
|
|
1697
|
+
interface IProviderProfileConfig {
|
|
1698
|
+
type?: string;
|
|
1699
|
+
model?: string;
|
|
1700
|
+
apiKey?: string;
|
|
1701
|
+
baseURL?: string;
|
|
1702
|
+
timeout?: number;
|
|
1703
|
+
}
|
|
1704
|
+
interface IProviderProbeResult {
|
|
1705
|
+
ok: boolean;
|
|
1706
|
+
message: string;
|
|
1707
|
+
models?: string[];
|
|
1708
|
+
}
|
|
1709
|
+
type TProviderSetupField = 'baseURL' | 'model' | 'apiKey';
|
|
1710
|
+
interface IProviderSetupStepDefinition {
|
|
1711
|
+
key: TProviderSetupField;
|
|
1712
|
+
title: string;
|
|
1713
|
+
defaultValue?: string;
|
|
1714
|
+
required?: boolean;
|
|
1715
|
+
masked?: boolean;
|
|
1716
|
+
}
|
|
1717
|
+
interface IProviderDefinition {
|
|
1718
|
+
type: string;
|
|
1719
|
+
defaults?: IProviderProfileDefaults;
|
|
1720
|
+
setupSteps?: readonly IProviderSetupStepDefinition[];
|
|
1721
|
+
requiresApiKey?: boolean;
|
|
1722
|
+
createProvider: (config: IProviderConfig$1) => IAIProvider;
|
|
1723
|
+
probeProfile?: (profile: IProviderProfileConfig) => Promise<IProviderProbeResult>;
|
|
1724
|
+
}
|
|
1725
|
+
declare function findProviderDefinition(definitions: readonly IProviderDefinition[], type: string): IProviderDefinition | undefined;
|
|
1726
|
+
declare function formatSupportedProviderTypes(definitions: readonly IProviderDefinition[]): string;
|
|
1727
|
+
|
|
1653
1728
|
/**
|
|
1654
1729
|
* Provider-agnostic media output reference.
|
|
1655
1730
|
* Providers must not return raw binary payloads in this contract.
|
|
@@ -2702,55 +2777,26 @@ declare abstract class AbstractExecutor implements IExecutor {
|
|
|
2702
2777
|
protected validateResponse(response: TUniversalMessage): void;
|
|
2703
2778
|
}
|
|
2704
2779
|
|
|
2705
|
-
interface IOpenAIMessage {
|
|
2706
|
-
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
2707
|
-
content: string | null;
|
|
2708
|
-
tool_calls?: {
|
|
2709
|
-
id: string;
|
|
2710
|
-
type: 'function';
|
|
2711
|
-
function: {
|
|
2712
|
-
name: string;
|
|
2713
|
-
arguments: string;
|
|
2714
|
-
};
|
|
2715
|
-
}[];
|
|
2716
|
-
tool_call_id?: string;
|
|
2717
|
-
name?: string;
|
|
2718
|
-
}
|
|
2719
|
-
interface IAnthropicProviderMessage {
|
|
2720
|
-
role: 'user' | 'assistant';
|
|
2721
|
-
content: string;
|
|
2722
|
-
}
|
|
2723
|
-
interface IGoogleProviderMessage {
|
|
2724
|
-
role: 'user' | 'model';
|
|
2725
|
-
parts: {
|
|
2726
|
-
text: string;
|
|
2727
|
-
}[];
|
|
2728
|
-
}
|
|
2729
2780
|
/**
|
|
2730
|
-
* Provider message format
|
|
2781
|
+
* Provider message format type.
|
|
2782
|
+
*
|
|
2783
|
+
* Provider packages own concrete message shapes. Core only carries the generic
|
|
2784
|
+
* conversion hook and never branches on provider names.
|
|
2731
2785
|
*/
|
|
2732
|
-
type TProviderMessage =
|
|
2786
|
+
type TProviderMessage = TUniversalMessage | IUniversalObjectValue;
|
|
2787
|
+
type TMessageFormatConverter<TMessage extends TProviderMessage = TProviderMessage> = (messages: readonly TUniversalMessage[]) => TMessage[];
|
|
2788
|
+
type TMessageConverterRegistry = Readonly<Record<string, TMessageFormatConverter>>;
|
|
2733
2789
|
/**
|
|
2734
2790
|
* Universal message converter utility
|
|
2735
|
-
*
|
|
2791
|
+
*
|
|
2792
|
+
* The converter is registry-based so provider-specific message conversion is
|
|
2793
|
+
* injected by provider packages or callers instead of being hardcoded in core.
|
|
2736
2794
|
*/
|
|
2737
2795
|
declare class MessageConverter {
|
|
2738
2796
|
/**
|
|
2739
|
-
* Convert messages
|
|
2740
|
-
*/
|
|
2741
|
-
static toProviderFormat(messages: TUniversalMessage[], providerName: string): TProviderMessage[];
|
|
2742
|
-
/**
|
|
2743
|
-
* Convert to OpenAI format
|
|
2744
|
-
*/
|
|
2745
|
-
private static toOpenAIFormat;
|
|
2746
|
-
/**
|
|
2747
|
-
* Convert to Anthropic format
|
|
2797
|
+
* Convert messages using an injected converter or converter registry.
|
|
2748
2798
|
*/
|
|
2749
|
-
|
|
2750
|
-
/**
|
|
2751
|
-
* Convert to Google format
|
|
2752
|
-
*/
|
|
2753
|
-
private static toGoogleFormat;
|
|
2799
|
+
static toProviderFormat(messages: TUniversalMessage[], converter?: TMessageFormatConverter | string, registry?: TMessageConverterRegistry): TProviderMessage[];
|
|
2754
2800
|
/**
|
|
2755
2801
|
* Convert to universal format (no conversion)
|
|
2756
2802
|
*/
|
|
@@ -2796,7 +2842,7 @@ declare class Validator {
|
|
|
2796
2842
|
/**
|
|
2797
2843
|
* Validate API key format (basic check)
|
|
2798
2844
|
*/
|
|
2799
|
-
static validateApiKey(apiKey: string
|
|
2845
|
+
static validateApiKey(apiKey: string): ISimpleValidationResult;
|
|
2800
2846
|
}
|
|
2801
2847
|
declare const validateAgentConfig: typeof Validator.validateAgentConfig;
|
|
2802
2848
|
declare const validateUserInput: typeof Validator.validateUserInput;
|
|
@@ -3108,6 +3154,8 @@ declare class ConversationHistory {
|
|
|
3108
3154
|
conversationIds: string[];
|
|
3109
3155
|
totalMessages: number;
|
|
3110
3156
|
};
|
|
3157
|
+
/** @internal */
|
|
3158
|
+
private cleanupOldConversations;
|
|
3111
3159
|
}
|
|
3112
3160
|
|
|
3113
3161
|
/**
|
|
@@ -3238,7 +3286,6 @@ interface IEventEmitterHierarchicalEventData extends IEventEmitterEventData {
|
|
|
3238
3286
|
actualResult?: IToolResult;
|
|
3239
3287
|
};
|
|
3240
3288
|
}
|
|
3241
|
-
|
|
3242
3289
|
/** Event emitter configuration */
|
|
3243
3290
|
interface IEventEmitterPluginOptions extends IPluginOptions {
|
|
3244
3291
|
events?: TEventName[];
|
|
@@ -3301,6 +3348,12 @@ declare class EventEmitterPlugin extends AbstractPlugin<IEventEmitterPluginOptio
|
|
|
3301
3348
|
destroy(): Promise<void>;
|
|
3302
3349
|
}
|
|
3303
3350
|
|
|
3351
|
+
/**
|
|
3352
|
+
* Configuration and tool management delegate for the Robota agent.
|
|
3353
|
+
*
|
|
3354
|
+
* Extracted from robota.ts to keep the main class under 300 lines.
|
|
3355
|
+
*/
|
|
3356
|
+
|
|
3304
3357
|
/** Agent statistics metadata type */
|
|
3305
3358
|
type TAgentStatsMetadata = Record<string, string | number | boolean | Date | string[]>;
|
|
3306
3359
|
|
|
@@ -4316,7 +4369,9 @@ declare function formatTokenCount(tokens: number): string;
|
|
|
4316
4369
|
* Hook system types — Claude Code compatible event/hook model.
|
|
4317
4370
|
*/
|
|
4318
4371
|
/** Hook lifecycle events */
|
|
4319
|
-
type THookEvent = 'PreToolUse' | 'PostToolUse' | 'SessionStart' | 'Stop' | 'PreCompact' | 'PostCompact' | 'UserPromptSubmit';
|
|
4372
|
+
type THookEvent = 'PreToolUse' | 'PostToolUse' | 'SessionStart' | 'SessionEnd' | 'Stop' | 'StopFailure' | 'PreCompact' | 'PostCompact' | 'UserPromptSubmit' | 'SubagentStart' | 'SubagentStop' | 'WorktreeCreate' | 'WorktreeRemove';
|
|
4373
|
+
/** Claude Code compatible session end reasons. */
|
|
4374
|
+
type TSessionEndReason = 'clear' | 'resume' | 'logout' | 'prompt_input_exit' | 'bypass_permissions_disabled' | 'other';
|
|
4320
4375
|
/** Command hook — executes a shell command */
|
|
4321
4376
|
interface ICommandHookDefinition {
|
|
4322
4377
|
type: 'command';
|
|
@@ -4373,6 +4428,20 @@ interface IHookInput {
|
|
|
4373
4428
|
prompt?: string;
|
|
4374
4429
|
/** Assistant response text (Stop only) */
|
|
4375
4430
|
response?: string;
|
|
4431
|
+
/** Last assistant message text (StopFailure only) */
|
|
4432
|
+
last_assistant_message?: string;
|
|
4433
|
+
/** Stop hook recursion guard (Stop/StopFailure only) */
|
|
4434
|
+
stop_hook_active?: boolean;
|
|
4435
|
+
/** Session end reason (SessionEnd only) */
|
|
4436
|
+
reason?: TSessionEndReason | string;
|
|
4437
|
+
/** Session transcript path when available (SessionEnd/SubagentStop only) */
|
|
4438
|
+
transcript_path?: string;
|
|
4439
|
+
/** Subagent identifier (SubagentStart/SubagentStop only) */
|
|
4440
|
+
agent_id?: string;
|
|
4441
|
+
/** Subagent type/name (SubagentStart/SubagentStop only) */
|
|
4442
|
+
agent_type?: string;
|
|
4443
|
+
/** Subagent transcript path when available (SubagentStop only) */
|
|
4444
|
+
agent_transcript_path?: string;
|
|
4376
4445
|
/** Additional environment variables to pass to hook child processes */
|
|
4377
4446
|
env?: Record<string, string>;
|
|
4378
4447
|
}
|
|
@@ -4423,4 +4492,4 @@ interface IRunHooksResult {
|
|
|
4423
4492
|
}
|
|
4424
4493
|
declare function runHooks(config: THooksConfig | undefined, event: THookEvent, input: IHookInput, executors?: IHookTypeExecutor[]): Promise<IRunHooksResult>;
|
|
4425
4494
|
|
|
4426
|
-
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 };
|
|
4495
|
+
export { AGENT_EVENTS, AGENT_EVENT_PREFIX, AbstractAIProvider, AbstractAgent, AbstractEventService, AbstractExecutor, AbstractManager, AbstractPlugin, AbstractTool, AgentFactory, AgentTemplates, AuthenticationError, CLAUDE_MODELS, CacheIntegrityError, CircuitBreakerOpenError, ConfigurationError, ConsoleLogger, 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$1 as IProviderConfig, type IProviderDefinition, type IProviderMediaError, type IProviderOptions, type IProviderProbeResult, type IProviderProfileConfig, type IProviderProfileDefaults, type IProviderRequest, type IProviderSetupStepDefinition, 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 TMessageConverterRegistry, type TMessageFormatConverter, 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 TProviderMessage, type TProviderOptionValueBase, type TProviderSetupField, TRUST_TO_MODE, type TResponseMetadata, type TSessionEndReason, 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, TypeUtils, UNKNOWN_TOOL_FALLBACK, USER_EVENTS, USER_EVENT_PREFIX, ValidationError, ValidationSeverity, Validator, bindEventServiceOwner, bindWithOwnerPath, chatEntryToMessage, composeEventName, createAssistantMessage, createExecutionProxy, createLogger, createSystemMessage, createToolMessage, createUserMessage, evaluatePermission, findProviderDefinition, formatSupportedProviderTypes, 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 };
|