lumnisai 0.1.3 → 0.1.5

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
@@ -50,7 +50,7 @@ interface TenantDetailsResponse {
50
50
  updatedAt: string;
51
51
  }
52
52
 
53
- type ApiProvider = 'OPENAI_API_KEY' | 'ANTHROPIC_API_KEY' | 'EXA_API_KEY' | 'COHERE_API_KEY' | 'GOOGLE_API_KEY' | 'SERPAPI_API_KEY' | 'GROQ_API_KEY' | 'NVIDIA_API_KEY' | 'FIREWORKS_API_KEY' | 'MISTRAL_API_KEY' | 'TOGETHER_API_KEY' | 'XAI_API_KEY' | 'PPLX_API_KEY' | 'HUGGINGFACE_API_KEY' | 'DEEPSEEK_API_KEY' | 'IBM_API_KEY' | 'E2B_API_KEY';
53
+ type ApiProvider = 'OPENAI_API_KEY' | 'ANTHROPIC_API_KEY' | 'EXA_API_KEY' | 'COHERE_API_KEY' | 'CORESIGNAL_API_KEY' | 'GOOGLE_API_KEY' | 'SERPAPI_API_KEY' | 'GROQ_API_KEY' | 'NVIDIA_API_KEY' | 'FIREWORKS_API_KEY' | 'MISTRAL_API_KEY' | 'TOGETHER_API_KEY' | 'XAI_API_KEY' | 'PPLX_API_KEY' | 'HUGGINGFACE_API_KEY' | 'DEEPSEEK_API_KEY' | 'IBM_API_KEY' | 'E2B_API_KEY';
54
54
  interface StoreApiKeyRequest {
55
55
  provider: ApiProvider;
56
56
  apiKey: string;
@@ -73,11 +73,24 @@ interface DeleteApiKeyResponse {
73
73
  message: string;
74
74
  }
75
75
 
76
+ /**
77
+ * Integration provider types
78
+ */
79
+ declare enum ProviderType {
80
+ COMPOSIO = "composio",
81
+ UNIPILE = "unipile",
82
+ NANGO = "nango",// Future
83
+ ARCADE = "arcade",// Future
84
+ MERGE = "merge"
85
+ }
76
86
  type ConnectionStatus = 'pending' | 'active' | 'failed' | 'expired' | 'not_connected';
77
87
  interface InitiateConnectionRequest {
78
88
  userId: string;
79
89
  appName: string;
90
+ provider?: ProviderType;
80
91
  redirectUrl?: string;
92
+ successRedirectUrl?: string;
93
+ failureRedirectUrl?: string;
81
94
  authMode?: string;
82
95
  connectionParams?: Record<string, any>;
83
96
  }
@@ -93,10 +106,14 @@ interface ConnectionStatusResponse {
93
106
  errorMessage?: string | null;
94
107
  }
95
108
  interface ConnectionInfo {
109
+ connectionId: string | null;
110
+ tenantId: string;
111
+ userId: string;
112
+ provider: ProviderType;
96
113
  appName: string;
97
114
  status: ConnectionStatus;
98
- connectedAt?: string | null;
99
- errorMessage?: string | null;
115
+ connectedAt: string | null;
116
+ metadata: Record<string, any>;
100
117
  }
101
118
  interface UserConnectionsResponse {
102
119
  userId: string;
@@ -104,6 +121,7 @@ interface UserConnectionsResponse {
104
121
  }
105
122
  interface GetToolsRequest {
106
123
  userId: string;
124
+ provider?: ProviderType;
107
125
  appFilter?: string[];
108
126
  }
109
127
  interface ToolInfo {
@@ -120,6 +138,7 @@ interface GetToolsResponse {
120
138
  interface DisconnectRequest {
121
139
  userId: string;
122
140
  appName: string;
141
+ provider?: ProviderType;
123
142
  }
124
143
  interface DisconnectResponse {
125
144
  success: boolean;
@@ -137,12 +156,15 @@ interface ConnectionCallbackResponse {
137
156
  message: string;
138
157
  }
139
158
  interface AppsListResponse {
140
- enabledApps: string[];
141
- totalEnabled: number;
159
+ providers: Record<string, string[]>;
160
+ totalProviders: number;
161
+ enabledApps?: string[];
162
+ totalEnabled?: number;
142
163
  availableApps?: string[];
143
164
  totalAvailable?: number;
144
165
  }
145
166
  interface AppEnabledResponse {
167
+ provider: ProviderType;
146
168
  appName: string;
147
169
  enabled: boolean;
148
170
  message: string;
@@ -153,6 +175,29 @@ interface UpdateAppStatusResponse {
153
175
  message: string;
154
176
  updatedAt: string;
155
177
  }
178
+ interface ListProvidersResponse {
179
+ providers: string[];
180
+ total: number;
181
+ }
182
+ interface GetConnectionStatusParams {
183
+ userId: string;
184
+ appName: string;
185
+ provider?: ProviderType;
186
+ }
187
+ interface GetUserConnectionsParams {
188
+ userId: string;
189
+ provider?: ProviderType;
190
+ appFilter?: string;
191
+ }
192
+ interface CheckAppEnabledParams {
193
+ appName: string;
194
+ provider?: ProviderType;
195
+ }
196
+ interface UpdateAppStatusParams {
197
+ appName: string;
198
+ enabled: boolean;
199
+ provider?: ProviderType;
200
+ }
156
201
 
157
202
  type MCPTransport = 'stdio' | 'streamable_http' | 'sse';
158
203
  type MCPScope = 'tenant' | 'user';
@@ -270,6 +315,7 @@ interface AgentConfig {
270
315
  useCognitiveTools?: boolean;
271
316
  enableTaskValidation?: boolean;
272
317
  generateComprehensiveOutput?: boolean;
318
+ skillIds?: string[];
273
319
  }
274
320
  interface ModelOverrides {
275
321
  [key: string]: string;
@@ -385,6 +431,107 @@ interface FeedbackListResponse {
385
431
  note: string;
386
432
  }
387
433
 
434
+ interface SkillGuidelineBase {
435
+ name: string;
436
+ description: string;
437
+ content: string;
438
+ category?: string;
439
+ version: string;
440
+ }
441
+ interface SkillGuidelineCreate extends SkillGuidelineBase {
442
+ }
443
+ interface SkillGuidelineUpdate {
444
+ name?: string;
445
+ description?: string;
446
+ content?: string;
447
+ category?: string;
448
+ version?: string;
449
+ isActive?: boolean;
450
+ }
451
+ interface SkillGuidelineResponse extends SkillGuidelineBase {
452
+ id: string;
453
+ tenantId?: string;
454
+ userId?: string;
455
+ isActive: boolean;
456
+ createdAt: string;
457
+ updatedAt: string;
458
+ }
459
+ interface SkillGuidelineListResponse {
460
+ skills: SkillGuidelineResponse[];
461
+ total: number;
462
+ page: number;
463
+ pageSize: number;
464
+ }
465
+ interface SkillUsageBase {
466
+ responseId: string;
467
+ skillId: string;
468
+ skillName: string;
469
+ }
470
+ interface SkillUsageCreate extends SkillUsageBase {
471
+ tenantId: string;
472
+ userId?: string;
473
+ relevanceScore?: number;
474
+ }
475
+ interface SkillUsageUpdate {
476
+ plannerSelected?: boolean;
477
+ usageReasoning?: string;
478
+ priority?: number;
479
+ executionOutcome?: 'success' | 'partial' | 'failed' | 'cancelled' | 'not_executed';
480
+ effectivenessScore?: number;
481
+ feedbackNotes?: string;
482
+ }
483
+ interface SkillUsageResponse extends SkillUsageBase {
484
+ id: string;
485
+ tenantId: string;
486
+ userId?: string;
487
+ relevanceScore?: number;
488
+ retrievedAt?: string;
489
+ plannerSelected: boolean;
490
+ usageReasoning?: string;
491
+ priority?: number;
492
+ selectedAt?: string;
493
+ executionOutcome?: string;
494
+ effectivenessScore?: number;
495
+ feedbackNotes?: string;
496
+ executedAt?: string;
497
+ createdAt: string;
498
+ updatedAt: string;
499
+ }
500
+ interface SkillUsageListResponse {
501
+ usages: SkillUsageResponse[];
502
+ total: number;
503
+ page: number;
504
+ pageSize: number;
505
+ }
506
+ interface SkillEffectivenessMetrics {
507
+ skillId?: string;
508
+ totalRetrievals: number;
509
+ totalSelections: number;
510
+ successfulExecutions: number;
511
+ selectionRate: number;
512
+ successRate: number;
513
+ avgEffectiveness: number;
514
+ usageFrequency: number;
515
+ }
516
+ interface SkillAnalyticsRequest {
517
+ skillId?: string;
518
+ tenantId?: string;
519
+ daysBack?: number;
520
+ }
521
+ interface SelectedSkill {
522
+ skillId: string;
523
+ skillName: string;
524
+ relevanceScore: number;
525
+ usageReasoning: string;
526
+ priority: number;
527
+ }
528
+ interface SkillRetrievalMetadata {
529
+ skillId: string;
530
+ skillName: string;
531
+ relevanceScore: number;
532
+ content: string;
533
+ }
534
+
388
535
  interface ThreadObject {
389
536
  threadId: UUID;
390
537
  tenantId: UUID;
@@ -722,11 +869,11 @@ declare class IntegrationsResource {
722
869
  /**
723
870
  * Check the status of a specific connection
724
871
  */
725
- getConnectionStatus(userId: string, appName: string): Promise<ConnectionStatusResponse>;
872
+ getConnectionStatus(params: GetConnectionStatusParams): Promise<ConnectionStatusResponse>;
726
873
  /**
727
874
  * Get all connections for a user
728
875
  */
729
- getUserConnections(userId: string, appFilter?: string): Promise<UserConnectionsResponse>;
876
+ getUserConnections(params: GetUserConnectionsParams): Promise<UserConnectionsResponse>;
730
877
  /**
731
878
  * Get available tools for a user based on connections
732
879
  */
@@ -744,25 +891,32 @@ declare class IntegrationsResource {
744
891
  */
745
892
  listApps(params?: {
746
893
  includeAvailable?: boolean;
894
+ provider?: string;
747
895
  }): Promise<AppsListResponse>;
896
+ /**
897
+ * List available integration providers
898
+ */
899
+ listProviders(): Promise<ListProvidersResponse>;
748
900
  /**
749
901
  * Check if a specific app is enabled
750
902
  */
751
- checkAppEnabled(appName: string): Promise<AppEnabledResponse>;
903
+ checkAppEnabled(params: CheckAppEnabledParams): Promise<AppEnabledResponse>;
752
904
  /**
753
905
  * Enable or disable an app for the tenant
754
906
  */
755
- updateAppStatus(appName: string, enabled: boolean): Promise<UpdateAppStatusResponse>;
907
+ updateAppStatus(params: UpdateAppStatusParams): Promise<UpdateAppStatusResponse>;
756
908
  /**
757
909
  * Get required fields for non-OAuth authentication (future)
758
910
  */
759
911
  getNonOAuthRequiredFields(appName: string, authScheme: string): Promise<any>;
760
- isAppEnabled(appName: string): Promise<AppEnabledResponse>;
912
+ isAppEnabled(appName: string, provider?: string): Promise<AppEnabledResponse>;
761
913
  setAppEnabled(appName: string, data: {
762
914
  enabled: boolean;
915
+ provider?: string;
763
916
  }): Promise<UpdateAppStatusResponse>;
764
917
  listConnections(userId: string, params?: {
765
918
  appFilter?: string;
919
+ provider?: string;
766
920
  }): Promise<UserConnectionsResponse>;
767
921
  }
768
922
 
@@ -910,6 +1064,80 @@ declare class ResponsesResource {
910
1064
  }): Promise<FeedbackListResponse>;
911
1065
  }
912
1066
 
1067
+ declare class SkillsResource {
1068
+ private readonly http;
1069
+ constructor(http: Http);
1070
+ /**
1071
+ * Create a new skill guideline
1072
+ * @param skillData - Skill guideline data
1073
+ * @param options - Optional parameters
1074
+ * @param options.userId - Optional user ID for skill ownership
1075
+ */
1076
+ create(skillData: SkillGuidelineCreate, options?: {
1077
+ userId?: string;
1078
+ }): Promise<SkillGuidelineResponse>;
1079
+ /**
1080
+ * List skill guidelines with optional filtering
1081
+ * @param params - Optional filter parameters
1082
+ * @param params.category - Filter by skill category
1083
+ * @param params.isActive - Filter by active status
1084
+ * @param params.page - Page number for pagination
1085
+ * @param params.pageSize - Number of items per page
1086
+ */
1087
+ list(params?: {
1088
+ category?: string;
1089
+ isActive?: boolean;
1090
+ page?: number;
1091
+ pageSize?: number;
1092
+ }): Promise<SkillGuidelineListResponse>;
1093
+ /**
1094
+ * Get a skill guideline by ID
1095
+ * @param skillId - The skill ID
1096
+ */
1097
+ get(skillId: string): Promise<SkillGuidelineResponse>;
1098
+ /**
1099
+ * Update a skill guideline
1100
+ * @param skillId - The skill ID
1101
+ * @param updates - Fields to update
1102
+ */
1103
+ update(skillId: string, updates: SkillGuidelineUpdate): Promise<SkillGuidelineResponse>;
1104
+ /**
1105
+ * Delete a skill guideline
1106
+ * @param skillId - The skill ID
1107
+ */
1108
+ delete(skillId: string): Promise<void>;
1109
+ /**
1110
+ * Create a skill usage record
1111
+ * @param usageData - Skill usage data
1112
+ */
1113
+ createUsage(usageData: SkillUsageCreate): Promise<SkillUsageResponse>;
1114
+ /**
1115
+ * List skill usage records
1116
+ * @param params - Optional filter parameters
1117
+ * @param params.skillId - Filter by skill ID
1118
+ * @param params.responseId - Filter by response ID
1119
+ * @param params.page - Page number for pagination
1120
+ * @param params.pageSize - Number of items per page
1121
+ */
1122
+ listUsage(params?: {
1123
+ skillId?: string;
1124
+ responseId?: string;
1125
+ page?: number;
1126
+ pageSize?: number;
1127
+ }): Promise<SkillUsageListResponse>;
1128
+ /**
1129
+ * Update a skill usage record
1130
+ * @param usageId - The usage record ID
1131
+ * @param updates - Fields to update
1132
+ */
1133
+ updateUsage(usageId: string, updates: SkillUsageUpdate): Promise<SkillUsageResponse>;
1134
+ /**
1135
+ * Get skill effectiveness metrics
1136
+ * @param request - Analytics request parameters
1137
+ */
1138
+ getAnalytics(request?: SkillAnalyticsRequest): Promise<SkillEffectivenessMetrics>;
1139
+ }
1140
+
913
1141
  declare class TenantInfoResource {
914
1142
  private readonly http;
915
1143
  constructor(http: Http);
@@ -1024,6 +1252,7 @@ declare class LumnisClient {
1024
1252
  readonly integrations: IntegrationsResource;
1025
1253
  readonly modelPreferences: ModelPreferencesResource;
1026
1254
  readonly mcpServers: MCPServersResource;
1255
+ readonly skills: SkillsResource;
1027
1256
  private readonly _scopedUserId?;
1028
1257
  private readonly _defaultScope;
1029
1258
  constructor(options?: LumnisClientOptions);
@@ -1070,6 +1299,13 @@ declare class LumnisClient {
1070
1299
  deleteMcpServer(serverId: string): Promise<void>;
1071
1300
  listMcpServerTools(serverId: string): Promise<MCPToolListResponse>;
1072
1301
  testMcpServer(serverId: string): Promise<TestConnectionResponse>;
1302
+ createSkill(skillData: SkillGuidelineCreate, options?: {
1303
+ userId?: string;
1304
+ }): Promise<SkillGuidelineResponse>;
1305
+ getSkill(skillId: string): Promise<SkillGuidelineResponse>;
1306
+ listSkills(params?: Parameters<SkillsResource['list']>[0]): Promise<SkillGuidelineListResponse>;
1307
+ updateSkill(skillId: string, updates: SkillGuidelineUpdate): Promise<SkillGuidelineResponse>;
1308
+ deleteSkill(skillId: string): Promise<void>;
1073
1309
  }
1074
1310
 
1075
1311
  interface LumnisErrorOptions {
@@ -1158,4 +1394,4 @@ declare class ProgressTracker {
1158
1394
  reset(): void;
1159
1395
  }
1160
1396
 
1161
- export { type AgentConfig, type ApiKeyMode, type ApiKeyModeRequest, type ApiKeyModeResponse, type ApiProvider, type AppEnabledResponse, type AppsListResponse, type ArtifactObject, type ArtifactsListResponse, AuthenticationError, type BaseResource, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelResponseResponse, type ChunkingStrategy, type ConnectionCallbackRequest, type ConnectionCallbackResponse, type ConnectionInfo, type ConnectionStatus, type ConnectionStatusResponse, type ContentType, type CreateFeedbackRequest, type CreateFeedbackResponse, type CreateResponseRequest, type CreateResponseResponse, type CreateThreadRequest, type DatabaseStatus, type DeleteApiKeyResponse, type DisconnectRequest, type DisconnectResponse, type DuplicateHandling, type Email, type ErrorResponse, ExternalAPIKeysResource, type ExternalApiKeyResponse, type FeedbackListResponse, type FeedbackObject, type FeedbackType, type FileAttachment, type FileChunk, type FileContentResponse, type FileListResponse, type FileMetadata, type FileScope, type FileScopeUpdateRequest, type FileSearchRequest, type FileSearchResponse, type FileSearchResult, type FileStatisticsResponse, type FileUploadResponse, FilesResource, type GetToolsRequest, type GetToolsResponse, type InitiateConnectionRequest, type InitiateConnectionResponse, IntegrationsResource, InternalServerError, LocalFileNotSupportedError, LumnisClient, type LumnisClientOptions, LumnisError, type LumnisErrorOptions, type MCPScope, type MCPServerCreateRequest, type MCPServerListResponse, type MCPServerResponse, type MCPServerUpdateRequest, MCPServersResource, type MCPToolListResponse, type MCPToolResponse, type MCPTransport, type Message, type ModelAvailability, type ModelOverrides, type ModelPreferenceCreate, type ModelPreferencesBulkUpdate, ModelPreferencesResource, type ModelProvider, type ModelType, NotFoundError, type PaginationInfo, type PaginationParams, type Plan, type ProcessingStatus, type ProcessingStatusResponse, type ProgressEntry, ProgressTracker, RateLimitError, type RateLimitErrorOptions, type ResponseArtifact, type ResponseListResponse, type ResponseObject, type ResponseStatus, ResponsesResource, type Scope, type StoreApiKeyRequest, type TenantDetailsResponse, TenantInfoResource, type TenantModelPreference, type TenantModelPreferencesResponse, type TestConnectionResponse, type ThreadListResponse, type ThreadObject, type ThreadResponsesParams, ThreadsResource, type ToolInfo, type UUID, type UpdateAppStatusResponse, type UpdateThreadRequest, type UserConnectionsResponse, type UserCreateRequest, type UserDeleteResponse, type UserIdentifier, type UserListResponse, type UserResponse, type UserUpdateRequest, UsersResource, ValidationError, LumnisClient as default, displayProgress, formatProgressEntry };
1397
+ export { type AgentConfig, type ApiKeyMode, type ApiKeyModeRequest, type ApiKeyModeResponse, type ApiProvider, type AppEnabledResponse, type AppsListResponse, type ArtifactObject, type ArtifactsListResponse, AuthenticationError, type BaseResource, type BillingStatus, type BulkDeleteRequest, type BulkDeleteResponse, type BulkUploadResponse, type CancelResponseResponse, type CheckAppEnabledParams, type ChunkingStrategy, type ConnectionCallbackRequest, type ConnectionCallbackResponse, type ConnectionInfo, type ConnectionStatus, type ConnectionStatusResponse, type ContentType, type CreateFeedbackRequest, type CreateFeedbackResponse, type CreateResponseRequest, type CreateResponseResponse, type CreateThreadRequest, type DatabaseStatus, type DeleteApiKeyResponse, type DisconnectRequest, type DisconnectResponse, type DuplicateHandling, type Email, type ErrorResponse, ExternalAPIKeysResource, type ExternalApiKeyResponse, type FeedbackListResponse, type FeedbackObject, type FeedbackType, type FileAttachment, type FileChunk, type FileContentResponse, type FileListResponse, type FileMetadata, type FileScope, type FileScopeUpdateRequest, type FileSearchRequest, type FileSearchResponse, type FileSearchResult, type FileStatisticsResponse, type FileUploadResponse, FilesResource, type GetConnectionStatusParams, type GetToolsRequest, type GetToolsResponse, type GetUserConnectionsParams, type InitiateConnectionRequest, type InitiateConnectionResponse, IntegrationsResource, InternalServerError, type ListProvidersResponse, LocalFileNotSupportedError, LumnisClient, type LumnisClientOptions, LumnisError, type LumnisErrorOptions, type MCPScope, type MCPServerCreateRequest, type MCPServerListResponse, type MCPServerResponse, type MCPServerUpdateRequest, MCPServersResource, type MCPToolListResponse, type MCPToolResponse, type MCPTransport, type Message, type ModelAvailability, type ModelOverrides, type ModelPreferenceCreate, type ModelPreferencesBulkUpdate, ModelPreferencesResource, type ModelProvider, type ModelType, NotFoundError, type PaginationInfo, type PaginationParams, type Plan, type ProcessingStatus, type ProcessingStatusResponse, type ProgressEntry, ProgressTracker, ProviderType, RateLimitError, type RateLimitErrorOptions, type ResponseArtifact, type ResponseListResponse, type ResponseObject, type ResponseStatus, ResponsesResource, type Scope, type SelectedSkill, type SkillAnalyticsRequest, type SkillEffectivenessMetrics, type SkillGuidelineBase, type SkillGuidelineCreate, type SkillGuidelineListResponse, type SkillGuidelineResponse, type SkillGuidelineUpdate, type SkillRetrievalMetadata, type SkillUsageBase, type SkillUsageCreate, type SkillUsageListResponse, type SkillUsageResponse, type SkillUsageUpdate, SkillsResource, type StoreApiKeyRequest, type TenantDetailsResponse, TenantInfoResource, type TenantModelPreference, type TenantModelPreferencesResponse, type TestConnectionResponse, type ThreadListResponse, type ThreadObject, type ThreadResponsesParams, ThreadsResource, type ToolInfo, type UUID, type UpdateAppStatusParams, type UpdateAppStatusResponse, type UpdateThreadRequest, type UserConnectionsResponse, type UserCreateRequest, type UserDeleteResponse, type UserIdentifier, type UserListResponse, type UserResponse, type UserUpdateRequest, UsersResource, ValidationError, LumnisClient as default, displayProgress, formatProgressEntry };