@radaros/core 0.3.0 → 0.3.1

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.ts CHANGED
@@ -1148,4 +1148,136 @@ declare class A2ARemoteAgent {
1148
1148
  private partsToText;
1149
1149
  }
1150
1150
 
1151
- export { type A2AAgentCard, type A2AArtifact, type A2ADataPart, type A2AFilePart, type A2AJsonRpcRequest, type A2AJsonRpcResponse, type A2AMessage, type A2APart, A2ARemoteAgent, type A2ARemoteAgentConfig, type A2ASendParams, type A2ASkill, type A2ATask, type A2ATaskQueryParams, type A2ATaskState, type A2ATextPart, Agent, type AgentConfig, type AgentEventMap, type AgentHooks, type AgentStep, AnthropicProvider, type Artifact, type AudioPart, BaseVectorStore, type ChatMessage, type ConditionStep, type ContentPart, type EmbeddingProvider, EventBus, type FilePart, type FunctionStep, GoogleEmbedding, type GoogleEmbeddingConfig, GoogleProvider, type GuardrailResult, type ImagePart, InMemoryStorage, InMemoryVectorStore, type InputGuardrail, KnowledgeBase, type KnowledgeBaseConfig, type KnowledgeBaseToolConfig, LLMLoop, type LogLevel, Logger, type LoggerConfig, MCPToolProvider, type MCPToolProviderConfig, Memory, type MemoryConfig, type MemoryEntry, type MessageContent, type MessageRole, type ModelConfig, type ModelProvider, ModelRegistry, type ModelResponse, MongoDBStorage, type MongoDBVectorConfig, MongoDBVectorStore, OllamaProvider, OpenAIEmbedding, type OpenAIEmbeddingConfig, OpenAIProvider, type OutputGuardrail, type ParallelStep, type PgVectorConfig, PgVectorStore, PostgresStorage, type QdrantConfig, QdrantVectorStore, RunContext, type RunOpts, type RunOutput, type Session, SessionManager, SqliteStorage, type StepDef, type StepResult, type StorageDriver, type StreamChunk, Team, type TeamConfig, TeamMode, type TextPart, type TokenUsage, type ToolCall, type ToolCallResult, type ToolDef, type ToolDefinition, ToolExecutor, type ToolResult, type VectorDocument, type VectorSearchOptions, type VectorSearchResult, type VectorStore, type VertexAIConfig, VertexAIProvider, Workflow, type WorkflowConfig, type WorkflowResult, anthropic, defineTool, getTextContent, google, isMultiModal, ollama, openai, registry, vertex };
1151
+ /**
1152
+ * Base class for all RadarOS Toolkits.
1153
+ * A Toolkit is a collection of related tools that share configuration.
1154
+ */
1155
+ declare abstract class Toolkit {
1156
+ abstract readonly name: string;
1157
+ /**
1158
+ * Returns all tools provided by this toolkit as ToolDef[].
1159
+ * Spread them into an Agent's `tools` array.
1160
+ */
1161
+ abstract getTools(): ToolDef[];
1162
+ }
1163
+
1164
+ interface WebSearchConfig {
1165
+ /** Search provider: "tavily" or "serpapi". */
1166
+ provider: "tavily" | "serpapi";
1167
+ /** API key for the search provider. Falls back to TAVILY_API_KEY or SERPAPI_API_KEY env vars. */
1168
+ apiKey?: string;
1169
+ /** Max results to return per search (default 5). */
1170
+ maxResults?: number;
1171
+ }
1172
+ /**
1173
+ * Web Search Toolkit — search the web from your agent.
1174
+ *
1175
+ * Supports Tavily and SerpAPI backends.
1176
+ *
1177
+ * @example
1178
+ * ```ts
1179
+ * const search = new WebSearchToolkit({ provider: "tavily" });
1180
+ * const agent = new Agent({ tools: [...search.getTools()] });
1181
+ * ```
1182
+ */
1183
+ declare class WebSearchToolkit extends Toolkit {
1184
+ readonly name = "websearch";
1185
+ private config;
1186
+ constructor(config: WebSearchConfig);
1187
+ private getApiKey;
1188
+ getTools(): ToolDef[];
1189
+ private searchTavily;
1190
+ private searchSerpApi;
1191
+ }
1192
+
1193
+ interface GmailConfig {
1194
+ /** Path to OAuth2 credentials JSON file. Falls back to GMAIL_CREDENTIALS_PATH env var. */
1195
+ credentialsPath?: string;
1196
+ /** Path to saved token JSON file. Falls back to GMAIL_TOKEN_PATH env var. */
1197
+ tokenPath?: string;
1198
+ /** Pre-authenticated OAuth2 client (if you handle auth yourself). */
1199
+ authClient?: any;
1200
+ }
1201
+ /**
1202
+ * Gmail Toolkit — send, search, and read emails from your agent.
1203
+ *
1204
+ * Requires: npm install googleapis
1205
+ *
1206
+ * @example
1207
+ * ```ts
1208
+ * const gmail = new GmailToolkit({ credentialsPath: "./credentials.json", tokenPath: "./token.json" });
1209
+ * const agent = new Agent({ tools: [...gmail.getTools()] });
1210
+ * ```
1211
+ */
1212
+ declare class GmailToolkit extends Toolkit {
1213
+ readonly name = "gmail";
1214
+ private config;
1215
+ private gmail;
1216
+ constructor(config?: GmailConfig);
1217
+ private getGmailClient;
1218
+ getTools(): ToolDef[];
1219
+ }
1220
+
1221
+ interface WhatsAppConfig {
1222
+ /** WhatsApp Business API access token. Falls back to WHATSAPP_ACCESS_TOKEN env var. */
1223
+ accessToken?: string;
1224
+ /** WhatsApp Business phone number ID. Falls back to WHATSAPP_PHONE_NUMBER_ID env var. */
1225
+ phoneNumberId?: string;
1226
+ /** API version (default "v22.0"). Falls back to WHATSAPP_VERSION env var. */
1227
+ version?: string;
1228
+ /** Default recipient WhatsApp ID. Falls back to WHATSAPP_RECIPIENT_WAID env var. */
1229
+ recipientWaid?: string;
1230
+ }
1231
+ /**
1232
+ * WhatsApp Toolkit — send messages via WhatsApp Business Cloud API (Meta).
1233
+ *
1234
+ * Uses the WhatsApp Cloud API directly (no Twilio).
1235
+ * Setup: https://developers.facebook.com/docs/whatsapp/cloud-api/get-started
1236
+ *
1237
+ * @example
1238
+ * ```ts
1239
+ * const whatsapp = new WhatsAppToolkit({
1240
+ * accessToken: "...",
1241
+ * phoneNumberId: "...",
1242
+ * });
1243
+ * const agent = new Agent({ tools: [...whatsapp.getTools()] });
1244
+ * ```
1245
+ */
1246
+ declare class WhatsAppToolkit extends Toolkit {
1247
+ readonly name = "whatsapp";
1248
+ private accessToken;
1249
+ private phoneNumberId;
1250
+ private version;
1251
+ private recipientWaid;
1252
+ constructor(config?: WhatsAppConfig);
1253
+ private getBaseUrl;
1254
+ private validate;
1255
+ private resolveRecipient;
1256
+ getTools(): ToolDef[];
1257
+ }
1258
+
1259
+ interface HackerNewsConfig {
1260
+ /** Enable fetching top stories (default true). */
1261
+ enableGetTopStories?: boolean;
1262
+ /** Enable fetching user details (default true). */
1263
+ enableGetUserDetails?: boolean;
1264
+ }
1265
+ /**
1266
+ * Hacker News Toolkit — search top stories and user details from HN.
1267
+ *
1268
+ * No API key required — uses the public Hacker News API.
1269
+ *
1270
+ * @example
1271
+ * ```ts
1272
+ * const hn = new HackerNewsToolkit();
1273
+ * const agent = new Agent({ tools: [...hn.getTools()] });
1274
+ * ```
1275
+ */
1276
+ declare class HackerNewsToolkit extends Toolkit {
1277
+ readonly name = "hackernews";
1278
+ private config;
1279
+ constructor(config?: HackerNewsConfig);
1280
+ getTools(): ToolDef[];
1281
+ }
1282
+
1283
+ export { type A2AAgentCard, type A2AArtifact, type A2ADataPart, type A2AFilePart, type A2AJsonRpcRequest, type A2AJsonRpcResponse, type A2AMessage, type A2APart, A2ARemoteAgent, type A2ARemoteAgentConfig, type A2ASendParams, type A2ASkill, type A2ATask, type A2ATaskQueryParams, type A2ATaskState, type A2ATextPart, Agent, type AgentConfig, type AgentEventMap, type AgentHooks, type AgentStep, AnthropicProvider, type Artifact, type AudioPart, BaseVectorStore, type ChatMessage, type ConditionStep, type ContentPart, type EmbeddingProvider, EventBus, type FilePart, type FunctionStep, type GmailConfig, GmailToolkit, GoogleEmbedding, type GoogleEmbeddingConfig, GoogleProvider, type GuardrailResult, type HackerNewsConfig, HackerNewsToolkit, type ImagePart, InMemoryStorage, InMemoryVectorStore, type InputGuardrail, KnowledgeBase, type KnowledgeBaseConfig, type KnowledgeBaseToolConfig, LLMLoop, type LogLevel, Logger, type LoggerConfig, MCPToolProvider, type MCPToolProviderConfig, Memory, type MemoryConfig, type MemoryEntry, type MessageContent, type MessageRole, type ModelConfig, type ModelProvider, ModelRegistry, type ModelResponse, MongoDBStorage, type MongoDBVectorConfig, MongoDBVectorStore, OllamaProvider, OpenAIEmbedding, type OpenAIEmbeddingConfig, OpenAIProvider, type OutputGuardrail, type ParallelStep, type PgVectorConfig, PgVectorStore, PostgresStorage, type QdrantConfig, QdrantVectorStore, RunContext, type RunOpts, type RunOutput, type Session, SessionManager, SqliteStorage, type StepDef, type StepResult, type StorageDriver, type StreamChunk, Team, type TeamConfig, TeamMode, type TextPart, type TokenUsage, type ToolCall, type ToolCallResult, type ToolDef, type ToolDefinition, ToolExecutor, type ToolResult, Toolkit, type VectorDocument, type VectorSearchOptions, type VectorSearchResult, type VectorStore, type VertexAIConfig, VertexAIProvider, type WebSearchConfig, WebSearchToolkit, type WhatsAppConfig, WhatsAppToolkit, Workflow, type WorkflowConfig, type WorkflowResult, anthropic, defineTool, getTextContent, google, isMultiModal, ollama, openai, registry, vertex };