@superatomai/sdk-node 0.0.18 → 0.0.20

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.mts CHANGED
@@ -1,6 +1,17 @@
1
1
  import { z } from 'zod';
2
2
  import Anthropic from '@anthropic-ai/sdk';
3
3
 
4
+ /**
5
+ * Unified UIBlock structure for database storage
6
+ * Used in both bookmarks and user-conversations tables
7
+ */
8
+ interface DBUIBlock {
9
+ id: string;
10
+ component: Record<string, any> | null;
11
+ analysis: string | null;
12
+ user_prompt: string;
13
+ }
14
+
4
15
  /**
5
16
  * Log levels in hierarchical order
6
17
  * - errors: only error logs
@@ -566,11 +577,11 @@ declare const ToolSchema: z.ZodObject<{
566
577
  type Tool$1 = z.infer<typeof ToolSchema>;
567
578
  type CollectionOperation = 'getMany' | 'getOne' | 'query' | 'mutation' | 'updateOne' | 'deleteOne' | 'createOne';
568
579
  type CollectionHandler<TParams = any, TResult = any> = (params: TParams) => Promise<TResult> | TResult;
569
- type LLMProvider = 'anthropic' | 'groq';
580
+ type LLMProvider = 'anthropic' | 'groq' | 'gemini' | 'openai';
570
581
 
571
582
  interface SuperatomSDKConfig {
572
583
  url?: string;
573
- apiKey: string;
584
+ apiKey?: string;
574
585
  projectId: string;
575
586
  userId?: string;
576
587
  type?: string;
@@ -578,6 +589,8 @@ interface SuperatomSDKConfig {
578
589
  promptsDir?: string;
579
590
  ANTHROPIC_API_KEY?: string;
580
591
  GROQ_API_KEY?: string;
592
+ GEMINI_API_KEY?: string;
593
+ OPENAI_API_KEY?: string;
581
594
  LLM_PROVIDERS?: LLMProvider[];
582
595
  logLevel?: LogLevel;
583
596
  }
@@ -895,6 +908,12 @@ declare class LLM {
895
908
  private static _anthropicStreamWithTools;
896
909
  private static _groqText;
897
910
  private static _groqStream;
911
+ private static _geminiText;
912
+ private static _geminiStream;
913
+ private static _geminiStreamWithTools;
914
+ private static _openaiText;
915
+ private static _openaiStream;
916
+ private static _openaiStreamWithTools;
898
917
  /**
899
918
  * Parse JSON string, handling markdown code blocks and surrounding text
900
919
  * Enhanced version with jsonrepair to handle malformed JSON from LLMs
@@ -1340,7 +1359,7 @@ type MessageTypeHandler = (message: IncomingMessage) => void | Promise<void>;
1340
1359
  declare class SuperatomSDK {
1341
1360
  private ws;
1342
1361
  private url;
1343
- private apiKey;
1362
+ private apiKey?;
1344
1363
  private projectId;
1345
1364
  private userId;
1346
1365
  private type;
@@ -1355,6 +1374,8 @@ declare class SuperatomSDK {
1355
1374
  private tools;
1356
1375
  private anthropicApiKey;
1357
1376
  private groqApiKey;
1377
+ private geminiApiKey;
1378
+ private openaiApiKey;
1358
1379
  private llmProviders;
1359
1380
  private userManager;
1360
1381
  private dashboardManager;
@@ -1437,4 +1458,4 @@ declare class SuperatomSDK {
1437
1458
  getTools(): Tool$1[];
1438
1459
  }
1439
1460
 
1440
- export { type Action, CONTEXT_CONFIG, type CapturedLog, CleanupService, type CollectionHandler, type CollectionOperation, type IncomingMessage, LLM, type LogLevel, type Message, SDK_VERSION, STORAGE_CONFIG, SuperatomSDK, type SuperatomSDKConfig, Thread, ThreadManager, type Tool$1 as Tool, UIBlock, UILogCollector, type User, UserManager, type UsersData, logger };
1461
+ export { type Action, CONTEXT_CONFIG, type CapturedLog, CleanupService, type CollectionHandler, type CollectionOperation, type DBUIBlock, type IncomingMessage, LLM, type LogLevel, type Message, SDK_VERSION, STORAGE_CONFIG, SuperatomSDK, type SuperatomSDKConfig, Thread, ThreadManager, type Tool$1 as Tool, UIBlock, UILogCollector, type User, UserManager, type UsersData, logger };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,17 @@
1
1
  import { z } from 'zod';
2
2
  import Anthropic from '@anthropic-ai/sdk';
3
3
 
4
+ /**
5
+ * Unified UIBlock structure for database storage
6
+ * Used in both bookmarks and user-conversations tables
7
+ */
8
+ interface DBUIBlock {
9
+ id: string;
10
+ component: Record<string, any> | null;
11
+ analysis: string | null;
12
+ user_prompt: string;
13
+ }
14
+
4
15
  /**
5
16
  * Log levels in hierarchical order
6
17
  * - errors: only error logs
@@ -566,11 +577,11 @@ declare const ToolSchema: z.ZodObject<{
566
577
  type Tool$1 = z.infer<typeof ToolSchema>;
567
578
  type CollectionOperation = 'getMany' | 'getOne' | 'query' | 'mutation' | 'updateOne' | 'deleteOne' | 'createOne';
568
579
  type CollectionHandler<TParams = any, TResult = any> = (params: TParams) => Promise<TResult> | TResult;
569
- type LLMProvider = 'anthropic' | 'groq';
580
+ type LLMProvider = 'anthropic' | 'groq' | 'gemini' | 'openai';
570
581
 
571
582
  interface SuperatomSDKConfig {
572
583
  url?: string;
573
- apiKey: string;
584
+ apiKey?: string;
574
585
  projectId: string;
575
586
  userId?: string;
576
587
  type?: string;
@@ -578,6 +589,8 @@ interface SuperatomSDKConfig {
578
589
  promptsDir?: string;
579
590
  ANTHROPIC_API_KEY?: string;
580
591
  GROQ_API_KEY?: string;
592
+ GEMINI_API_KEY?: string;
593
+ OPENAI_API_KEY?: string;
581
594
  LLM_PROVIDERS?: LLMProvider[];
582
595
  logLevel?: LogLevel;
583
596
  }
@@ -895,6 +908,12 @@ declare class LLM {
895
908
  private static _anthropicStreamWithTools;
896
909
  private static _groqText;
897
910
  private static _groqStream;
911
+ private static _geminiText;
912
+ private static _geminiStream;
913
+ private static _geminiStreamWithTools;
914
+ private static _openaiText;
915
+ private static _openaiStream;
916
+ private static _openaiStreamWithTools;
898
917
  /**
899
918
  * Parse JSON string, handling markdown code blocks and surrounding text
900
919
  * Enhanced version with jsonrepair to handle malformed JSON from LLMs
@@ -1340,7 +1359,7 @@ type MessageTypeHandler = (message: IncomingMessage) => void | Promise<void>;
1340
1359
  declare class SuperatomSDK {
1341
1360
  private ws;
1342
1361
  private url;
1343
- private apiKey;
1362
+ private apiKey?;
1344
1363
  private projectId;
1345
1364
  private userId;
1346
1365
  private type;
@@ -1355,6 +1374,8 @@ declare class SuperatomSDK {
1355
1374
  private tools;
1356
1375
  private anthropicApiKey;
1357
1376
  private groqApiKey;
1377
+ private geminiApiKey;
1378
+ private openaiApiKey;
1358
1379
  private llmProviders;
1359
1380
  private userManager;
1360
1381
  private dashboardManager;
@@ -1437,4 +1458,4 @@ declare class SuperatomSDK {
1437
1458
  getTools(): Tool$1[];
1438
1459
  }
1439
1460
 
1440
- export { type Action, CONTEXT_CONFIG, type CapturedLog, CleanupService, type CollectionHandler, type CollectionOperation, type IncomingMessage, LLM, type LogLevel, type Message, SDK_VERSION, STORAGE_CONFIG, SuperatomSDK, type SuperatomSDKConfig, Thread, ThreadManager, type Tool$1 as Tool, UIBlock, UILogCollector, type User, UserManager, type UsersData, logger };
1461
+ export { type Action, CONTEXT_CONFIG, type CapturedLog, CleanupService, type CollectionHandler, type CollectionOperation, type DBUIBlock, type IncomingMessage, LLM, type LogLevel, type Message, SDK_VERSION, STORAGE_CONFIG, SuperatomSDK, type SuperatomSDKConfig, Thread, ThreadManager, type Tool$1 as Tool, UIBlock, UILogCollector, type User, UserManager, type UsersData, logger };