@easbot/types 0.2.44 → 0.2.46

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/dist/index.d.cts CHANGED
@@ -598,6 +598,30 @@ interface AgentResultMetadata {
598
598
  [key: string]: unknown;
599
599
  }
600
600
  type AgentCallback = (result: AgentResult) => Promise<void>;
601
+ interface AgentToolCall {
602
+ name: string;
603
+ status: 'completed' | 'error';
604
+ output?: unknown;
605
+ error?: string;
606
+ }
607
+ interface AgentMessage {
608
+ role: 'user' | 'assistant';
609
+ text?: string;
610
+ thinking?: string;
611
+ tools?: AgentToolCall[];
612
+ metadata: {
613
+ sessionId: string;
614
+ messageId: string;
615
+ timestamp: number;
616
+ tokens?: {
617
+ input: number;
618
+ output: number;
619
+ total: number;
620
+ };
621
+ sessionStatus?: 'idle' | 'busy' | 'retry' | 'error';
622
+ error?: string;
623
+ };
624
+ }
601
625
 
602
626
  type RunMode = 'ephemeral' | 'persistent';
603
627
  type TransportType = 'stdio' | 'http' | 'websocket' | 'cli';
@@ -658,11 +682,14 @@ interface SubAgentEvent {
658
682
  error?: Error;
659
683
  timestamp: number;
660
684
  }
685
+ interface SubAgentExecuteOptions {
686
+ onMessage?: (message: AgentMessage) => Promise<void> | void;
687
+ }
661
688
  interface SubAgentHandler {
662
689
  start(config: SubAgentConfig): Promise<void>;
663
690
  stop(): Promise<void>;
664
691
  isRunning(): boolean;
665
- execute(input: SubAgentInput): Promise<SubAgentResult>;
692
+ execute(input: SubAgentInput, options?: SubAgentExecuteOptions): Promise<SubAgentResult>;
666
693
  interrupt(): Promise<void>;
667
694
  checkHealth?(): Promise<boolean>;
668
695
  }
@@ -1182,4 +1209,4 @@ type PromptPart = {
1182
1209
  mime?: string;
1183
1210
  };
1184
1211
 
1185
- export { type AgentAction, type AgentAdapter, type AgentCallback, AgentCapability, type AgentCreate, type AgentExecute, type AgentExecutionResult, type AgentInfo, type AgentInput, type AgentModel, type AgentPromptPart, type AgentQuery, type AgentResult, type AgentResultMetadata, AgentState, type AgentStatistics, type AgentStatusInfo, type AgentUpdate, type ApiResponse, ApiResponseBuilder, type ApiResult, type AskInput, type AuthInfo, type BaseKnowledgeConfig, type BaseSearchResult, type ChannelInfo, type ChannelListResponse, type ChannelPluginInfo, type CodebaseKnowledgeConfig, type CodebaseKnowledgeConfigWithModels, DEFAULT_EMBEDDING_CONFIG, DEFAULT_INDEXER_CONFIG, DEFAULT_NOTE_CHUNK_CONFIG, DEFAULT_PARSER_CONFIG, DEFAULT_SEARCH_CONFIG, DEFAULT_SYNC_CONFIG, type DatabaseConfig, type EasbotShell, type EasbotShellError, type EasbotShellOutput, type EasbotShellPromise, type EmbeddingConfig, type ErrorDetails, type ErrorMessageMode, type ErrorResponse, type FilterExpression, type FilterRule, GRAPH_ENTITY_TYPE_DEFINITIONS, GRAPH_RELATION_TYPE_DEFINITIONS, type GatewayConfig, type GatewayHookHandler, type GatewayMessage, type GatewayMessageDeliveredInput, type GatewayMessagePromptPart, type GatewayMessageReadInput, type GatewayMessageReceiveInput, type GatewayMessageSendInput, type GatewayServerConfig, gateway as GatewayTypes, type GraphLlmConfig, HTTPMethod, type HTTPRequestConfig, type HTTPResponseConfig, HTTPStatusCode, HttpStatus, type HybridSearchConfig, type IGatewayServer, type IGlobal, type IHookRegistry, type IInstance, type ISubAgentRunner, type ITool, type IndexerConfig, type KnowledgeSearchOptions, type KnowledgeSearchSource, type Language, type LlmConfig, type MemoryKnowledgeConfig, type MemoryKnowledgeConfigWithModels, type MessageAttachment, type MessageContext, type MessageMetadata, type MessageQuery, type MessageReaction, type MessageSend, MessageSender, type MessageStorage, MessageType$1 as MessageType, type NoteKnowledgeConfig, type NoteKnowledgeConfigWithModels, type NoteKnowledgeSource, type OAuth2Token, type PageParams, type PageResult, type ParserConfig, type PlatformType, type PromptPart, Protocol, type RequestOptions, type RerankLlmConfig, type RetryRequest, type RunMode, type SearchConfig, type SessionCreate, type SessionInfo, type SessionMessage, type SessionQuery, type SessionStatistics, SessionStatus, type SessionUpdate, type ShellExpression, type ShellFunction, type SortingField, type SubAgentConfig, type SubAgentEvent, type SubAgentHandler, type SubAgentInput, type SubAgentInstance, type SubAgentResult, type SubAgentStatus, type SuccessMessageMode, type SyncConfig, type TaskCreate, type TaskExecutionResult, type TaskInfo, type TaskLog, TaskPriority, type TaskQuery, TaskStatus, type TaskStep, type TaskUpdate, type ToolContext, type ToolDefinition, type ToolFunction, type TransportType, type UploadFileParams, type UploadFileResult, type WebSocketConnectionConfig, type WebSocketEvent, type WebSocketMessage, WebSocketMessageType, WebSocketState, buildToolArgs, createTool, getDefaultDatabasePath, getWorkspaceDatabasePath, toolSchema };
1212
+ export { type AgentAction, type AgentAdapter, type AgentCallback, AgentCapability, type AgentCreate, type AgentExecute, type AgentExecutionResult, type AgentInfo, type AgentInput, type AgentMessage, type AgentModel, type AgentPromptPart, type AgentQuery, type AgentResult, type AgentResultMetadata, AgentState, type AgentStatistics, type AgentStatusInfo, type AgentToolCall, type AgentUpdate, type ApiResponse, ApiResponseBuilder, type ApiResult, type AskInput, type AuthInfo, type BaseKnowledgeConfig, type BaseSearchResult, type ChannelInfo, type ChannelListResponse, type ChannelPluginInfo, type CodebaseKnowledgeConfig, type CodebaseKnowledgeConfigWithModels, DEFAULT_EMBEDDING_CONFIG, DEFAULT_INDEXER_CONFIG, DEFAULT_NOTE_CHUNK_CONFIG, DEFAULT_PARSER_CONFIG, DEFAULT_SEARCH_CONFIG, DEFAULT_SYNC_CONFIG, type DatabaseConfig, type EasbotShell, type EasbotShellError, type EasbotShellOutput, type EasbotShellPromise, type EmbeddingConfig, type ErrorDetails, type ErrorMessageMode, type ErrorResponse, type FilterExpression, type FilterRule, GRAPH_ENTITY_TYPE_DEFINITIONS, GRAPH_RELATION_TYPE_DEFINITIONS, type GatewayConfig, type GatewayHookHandler, type GatewayMessage, type GatewayMessageDeliveredInput, type GatewayMessagePromptPart, type GatewayMessageReadInput, type GatewayMessageReceiveInput, type GatewayMessageSendInput, type GatewayServerConfig, gateway as GatewayTypes, type GraphLlmConfig, HTTPMethod, type HTTPRequestConfig, type HTTPResponseConfig, HTTPStatusCode, HttpStatus, type HybridSearchConfig, type IGatewayServer, type IGlobal, type IHookRegistry, type IInstance, type ISubAgentRunner, type ITool, type IndexerConfig, type KnowledgeSearchOptions, type KnowledgeSearchSource, type Language, type LlmConfig, type MemoryKnowledgeConfig, type MemoryKnowledgeConfigWithModels, type MessageAttachment, type MessageContext, type MessageMetadata, type MessageQuery, type MessageReaction, type MessageSend, MessageSender, type MessageStorage, MessageType$1 as MessageType, type NoteKnowledgeConfig, type NoteKnowledgeConfigWithModels, type NoteKnowledgeSource, type OAuth2Token, type PageParams, type PageResult, type ParserConfig, type PlatformType, type PromptPart, Protocol, type RequestOptions, type RerankLlmConfig, type RetryRequest, type RunMode, type SearchConfig, type SessionCreate, type SessionInfo, type SessionMessage, type SessionQuery, type SessionStatistics, SessionStatus, type SessionUpdate, type ShellExpression, type ShellFunction, type SortingField, type SubAgentConfig, type SubAgentEvent, type SubAgentExecuteOptions, type SubAgentHandler, type SubAgentInput, type SubAgentInstance, type SubAgentResult, type SubAgentStatus, type SuccessMessageMode, type SyncConfig, type TaskCreate, type TaskExecutionResult, type TaskInfo, type TaskLog, TaskPriority, type TaskQuery, TaskStatus, type TaskStep, type TaskUpdate, type ToolContext, type ToolDefinition, type ToolFunction, type TransportType, type UploadFileParams, type UploadFileResult, type WebSocketConnectionConfig, type WebSocketEvent, type WebSocketMessage, WebSocketMessageType, WebSocketState, buildToolArgs, createTool, getDefaultDatabasePath, getWorkspaceDatabasePath, toolSchema };
package/dist/index.d.ts CHANGED
@@ -598,6 +598,30 @@ interface AgentResultMetadata {
598
598
  [key: string]: unknown;
599
599
  }
600
600
  type AgentCallback = (result: AgentResult) => Promise<void>;
601
+ interface AgentToolCall {
602
+ name: string;
603
+ status: 'completed' | 'error';
604
+ output?: unknown;
605
+ error?: string;
606
+ }
607
+ interface AgentMessage {
608
+ role: 'user' | 'assistant';
609
+ text?: string;
610
+ thinking?: string;
611
+ tools?: AgentToolCall[];
612
+ metadata: {
613
+ sessionId: string;
614
+ messageId: string;
615
+ timestamp: number;
616
+ tokens?: {
617
+ input: number;
618
+ output: number;
619
+ total: number;
620
+ };
621
+ sessionStatus?: 'idle' | 'busy' | 'retry' | 'error';
622
+ error?: string;
623
+ };
624
+ }
601
625
 
602
626
  type RunMode = 'ephemeral' | 'persistent';
603
627
  type TransportType = 'stdio' | 'http' | 'websocket' | 'cli';
@@ -658,11 +682,14 @@ interface SubAgentEvent {
658
682
  error?: Error;
659
683
  timestamp: number;
660
684
  }
685
+ interface SubAgentExecuteOptions {
686
+ onMessage?: (message: AgentMessage) => Promise<void> | void;
687
+ }
661
688
  interface SubAgentHandler {
662
689
  start(config: SubAgentConfig): Promise<void>;
663
690
  stop(): Promise<void>;
664
691
  isRunning(): boolean;
665
- execute(input: SubAgentInput): Promise<SubAgentResult>;
692
+ execute(input: SubAgentInput, options?: SubAgentExecuteOptions): Promise<SubAgentResult>;
666
693
  interrupt(): Promise<void>;
667
694
  checkHealth?(): Promise<boolean>;
668
695
  }
@@ -1182,4 +1209,4 @@ type PromptPart = {
1182
1209
  mime?: string;
1183
1210
  };
1184
1211
 
1185
- export { type AgentAction, type AgentAdapter, type AgentCallback, AgentCapability, type AgentCreate, type AgentExecute, type AgentExecutionResult, type AgentInfo, type AgentInput, type AgentModel, type AgentPromptPart, type AgentQuery, type AgentResult, type AgentResultMetadata, AgentState, type AgentStatistics, type AgentStatusInfo, type AgentUpdate, type ApiResponse, ApiResponseBuilder, type ApiResult, type AskInput, type AuthInfo, type BaseKnowledgeConfig, type BaseSearchResult, type ChannelInfo, type ChannelListResponse, type ChannelPluginInfo, type CodebaseKnowledgeConfig, type CodebaseKnowledgeConfigWithModels, DEFAULT_EMBEDDING_CONFIG, DEFAULT_INDEXER_CONFIG, DEFAULT_NOTE_CHUNK_CONFIG, DEFAULT_PARSER_CONFIG, DEFAULT_SEARCH_CONFIG, DEFAULT_SYNC_CONFIG, type DatabaseConfig, type EasbotShell, type EasbotShellError, type EasbotShellOutput, type EasbotShellPromise, type EmbeddingConfig, type ErrorDetails, type ErrorMessageMode, type ErrorResponse, type FilterExpression, type FilterRule, GRAPH_ENTITY_TYPE_DEFINITIONS, GRAPH_RELATION_TYPE_DEFINITIONS, type GatewayConfig, type GatewayHookHandler, type GatewayMessage, type GatewayMessageDeliveredInput, type GatewayMessagePromptPart, type GatewayMessageReadInput, type GatewayMessageReceiveInput, type GatewayMessageSendInput, type GatewayServerConfig, gateway as GatewayTypes, type GraphLlmConfig, HTTPMethod, type HTTPRequestConfig, type HTTPResponseConfig, HTTPStatusCode, HttpStatus, type HybridSearchConfig, type IGatewayServer, type IGlobal, type IHookRegistry, type IInstance, type ISubAgentRunner, type ITool, type IndexerConfig, type KnowledgeSearchOptions, type KnowledgeSearchSource, type Language, type LlmConfig, type MemoryKnowledgeConfig, type MemoryKnowledgeConfigWithModels, type MessageAttachment, type MessageContext, type MessageMetadata, type MessageQuery, type MessageReaction, type MessageSend, MessageSender, type MessageStorage, MessageType$1 as MessageType, type NoteKnowledgeConfig, type NoteKnowledgeConfigWithModels, type NoteKnowledgeSource, type OAuth2Token, type PageParams, type PageResult, type ParserConfig, type PlatformType, type PromptPart, Protocol, type RequestOptions, type RerankLlmConfig, type RetryRequest, type RunMode, type SearchConfig, type SessionCreate, type SessionInfo, type SessionMessage, type SessionQuery, type SessionStatistics, SessionStatus, type SessionUpdate, type ShellExpression, type ShellFunction, type SortingField, type SubAgentConfig, type SubAgentEvent, type SubAgentHandler, type SubAgentInput, type SubAgentInstance, type SubAgentResult, type SubAgentStatus, type SuccessMessageMode, type SyncConfig, type TaskCreate, type TaskExecutionResult, type TaskInfo, type TaskLog, TaskPriority, type TaskQuery, TaskStatus, type TaskStep, type TaskUpdate, type ToolContext, type ToolDefinition, type ToolFunction, type TransportType, type UploadFileParams, type UploadFileResult, type WebSocketConnectionConfig, type WebSocketEvent, type WebSocketMessage, WebSocketMessageType, WebSocketState, buildToolArgs, createTool, getDefaultDatabasePath, getWorkspaceDatabasePath, toolSchema };
1212
+ export { type AgentAction, type AgentAdapter, type AgentCallback, AgentCapability, type AgentCreate, type AgentExecute, type AgentExecutionResult, type AgentInfo, type AgentInput, type AgentMessage, type AgentModel, type AgentPromptPart, type AgentQuery, type AgentResult, type AgentResultMetadata, AgentState, type AgentStatistics, type AgentStatusInfo, type AgentToolCall, type AgentUpdate, type ApiResponse, ApiResponseBuilder, type ApiResult, type AskInput, type AuthInfo, type BaseKnowledgeConfig, type BaseSearchResult, type ChannelInfo, type ChannelListResponse, type ChannelPluginInfo, type CodebaseKnowledgeConfig, type CodebaseKnowledgeConfigWithModels, DEFAULT_EMBEDDING_CONFIG, DEFAULT_INDEXER_CONFIG, DEFAULT_NOTE_CHUNK_CONFIG, DEFAULT_PARSER_CONFIG, DEFAULT_SEARCH_CONFIG, DEFAULT_SYNC_CONFIG, type DatabaseConfig, type EasbotShell, type EasbotShellError, type EasbotShellOutput, type EasbotShellPromise, type EmbeddingConfig, type ErrorDetails, type ErrorMessageMode, type ErrorResponse, type FilterExpression, type FilterRule, GRAPH_ENTITY_TYPE_DEFINITIONS, GRAPH_RELATION_TYPE_DEFINITIONS, type GatewayConfig, type GatewayHookHandler, type GatewayMessage, type GatewayMessageDeliveredInput, type GatewayMessagePromptPart, type GatewayMessageReadInput, type GatewayMessageReceiveInput, type GatewayMessageSendInput, type GatewayServerConfig, gateway as GatewayTypes, type GraphLlmConfig, HTTPMethod, type HTTPRequestConfig, type HTTPResponseConfig, HTTPStatusCode, HttpStatus, type HybridSearchConfig, type IGatewayServer, type IGlobal, type IHookRegistry, type IInstance, type ISubAgentRunner, type ITool, type IndexerConfig, type KnowledgeSearchOptions, type KnowledgeSearchSource, type Language, type LlmConfig, type MemoryKnowledgeConfig, type MemoryKnowledgeConfigWithModels, type MessageAttachment, type MessageContext, type MessageMetadata, type MessageQuery, type MessageReaction, type MessageSend, MessageSender, type MessageStorage, MessageType$1 as MessageType, type NoteKnowledgeConfig, type NoteKnowledgeConfigWithModels, type NoteKnowledgeSource, type OAuth2Token, type PageParams, type PageResult, type ParserConfig, type PlatformType, type PromptPart, Protocol, type RequestOptions, type RerankLlmConfig, type RetryRequest, type RunMode, type SearchConfig, type SessionCreate, type SessionInfo, type SessionMessage, type SessionQuery, type SessionStatistics, SessionStatus, type SessionUpdate, type ShellExpression, type ShellFunction, type SortingField, type SubAgentConfig, type SubAgentEvent, type SubAgentExecuteOptions, type SubAgentHandler, type SubAgentInput, type SubAgentInstance, type SubAgentResult, type SubAgentStatus, type SuccessMessageMode, type SyncConfig, type TaskCreate, type TaskExecutionResult, type TaskInfo, type TaskLog, TaskPriority, type TaskQuery, TaskStatus, type TaskStep, type TaskUpdate, type ToolContext, type ToolDefinition, type ToolFunction, type TransportType, type UploadFileParams, type UploadFileResult, type WebSocketConnectionConfig, type WebSocketEvent, type WebSocketMessage, WebSocketMessageType, WebSocketState, buildToolArgs, createTool, getDefaultDatabasePath, getWorkspaceDatabasePath, toolSchema };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easbot/types",
3
- "version": "0.2.44",
3
+ "version": "0.2.46",
4
4
  "description": "Shared types library for EASBOT ecosystem",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -46,7 +46,7 @@
46
46
  "ai": "^6.0.176",
47
47
  "axios": "^1.16.1",
48
48
  "zod": "^4.4.3",
49
- "@easbot/sdk": "0.2.44"
49
+ "@easbot/sdk": "0.2.46"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@biomejs/biome": "^2.4.14",