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.cjs +179 -15
- package/dist/index.d.cts +247 -11
- package/dist/index.d.mts +247 -11
- package/dist/index.d.ts +247 -11
- package/dist/index.mjs +179 -16
- package/package.json +3 -2
package/dist/index.d.ts
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
|
|
99
|
-
|
|
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
|
-
|
|
141
|
-
|
|
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(
|
|
872
|
+
getConnectionStatus(params: GetConnectionStatusParams): Promise<ConnectionStatusResponse>;
|
|
726
873
|
/**
|
|
727
874
|
* Get all connections for a user
|
|
728
875
|
*/
|
|
729
|
-
getUserConnections(
|
|
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(
|
|
903
|
+
checkAppEnabled(params: CheckAppEnabledParams): Promise<AppEnabledResponse>;
|
|
752
904
|
/**
|
|
753
905
|
* Enable or disable an app for the tenant
|
|
754
906
|
*/
|
|
755
|
-
updateAppStatus(
|
|
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 {
|
|
@@ -1159,4 +1395,4 @@ declare class ProgressTracker {
|
|
|
1159
1395
|
}
|
|
1160
1396
|
|
|
1161
1397
|
export = LumnisClient;
|
|
1162
|
-
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, displayProgress, formatProgressEntry };
|
|
1398
|
+
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, displayProgress, formatProgressEntry };
|
package/dist/index.mjs
CHANGED
|
@@ -202,19 +202,27 @@ class IntegrationsResource {
|
|
|
202
202
|
/**
|
|
203
203
|
* Check the status of a specific connection
|
|
204
204
|
*/
|
|
205
|
-
async getConnectionStatus(
|
|
205
|
+
async getConnectionStatus(params) {
|
|
206
|
+
const { userId, appName, provider } = params;
|
|
207
|
+
const queryParams = new URLSearchParams();
|
|
208
|
+
if (provider)
|
|
209
|
+
queryParams.append("provider", provider);
|
|
210
|
+
const query = queryParams.toString() ? `?${queryParams.toString()}` : "";
|
|
206
211
|
return this.http.get(
|
|
207
|
-
`/integrations/connections/${encodeURIComponent(userId)}/${appName.toUpperCase()}`
|
|
212
|
+
`/integrations/connections/${encodeURIComponent(userId)}/${appName.toUpperCase()}${query}`
|
|
208
213
|
);
|
|
209
214
|
}
|
|
210
215
|
/**
|
|
211
216
|
* Get all connections for a user
|
|
212
217
|
*/
|
|
213
|
-
async getUserConnections(
|
|
214
|
-
const
|
|
218
|
+
async getUserConnections(params) {
|
|
219
|
+
const { userId, provider, appFilter } = params;
|
|
220
|
+
const queryParams = new URLSearchParams();
|
|
221
|
+
if (provider)
|
|
222
|
+
queryParams.append("provider", provider);
|
|
215
223
|
if (appFilter)
|
|
216
|
-
|
|
217
|
-
const query =
|
|
224
|
+
queryParams.append("app_filter", appFilter);
|
|
225
|
+
const query = queryParams.toString() ? `?${queryParams.toString()}` : "";
|
|
218
226
|
return this.http.get(
|
|
219
227
|
`/integrations/connections/${encodeURIComponent(userId)}${query}`
|
|
220
228
|
);
|
|
@@ -252,23 +260,41 @@ class IntegrationsResource {
|
|
|
252
260
|
const urlParams = new URLSearchParams();
|
|
253
261
|
if (params?.includeAvailable)
|
|
254
262
|
urlParams.append("include_available", "true");
|
|
263
|
+
if (params?.provider)
|
|
264
|
+
urlParams.append("provider", params.provider);
|
|
255
265
|
const query = urlParams.toString() ? `?${urlParams.toString()}` : "";
|
|
256
266
|
return this.http.get(`/integrations/apps${query}`);
|
|
257
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* List available integration providers
|
|
270
|
+
*/
|
|
271
|
+
async listProviders() {
|
|
272
|
+
return this.http.get("/integrations/providers");
|
|
273
|
+
}
|
|
258
274
|
/**
|
|
259
275
|
* Check if a specific app is enabled
|
|
260
276
|
*/
|
|
261
|
-
async checkAppEnabled(
|
|
277
|
+
async checkAppEnabled(params) {
|
|
278
|
+
const { appName, provider } = params;
|
|
279
|
+
const queryParams = new URLSearchParams();
|
|
280
|
+
if (provider)
|
|
281
|
+
queryParams.append("provider", provider);
|
|
282
|
+
const query = queryParams.toString() ? `?${queryParams.toString()}` : "";
|
|
262
283
|
return this.http.get(
|
|
263
|
-
`/integrations/apps/${appName.toUpperCase()}/enabled`
|
|
284
|
+
`/integrations/apps/${appName.toUpperCase()}/enabled${query}`
|
|
264
285
|
);
|
|
265
286
|
}
|
|
266
287
|
/**
|
|
267
288
|
* Enable or disable an app for the tenant
|
|
268
289
|
*/
|
|
269
|
-
async updateAppStatus(
|
|
290
|
+
async updateAppStatus(params) {
|
|
291
|
+
const { appName, enabled, provider } = params;
|
|
292
|
+
const queryParams = new URLSearchParams();
|
|
293
|
+
queryParams.append("enabled", String(enabled));
|
|
294
|
+
if (provider)
|
|
295
|
+
queryParams.append("provider", provider);
|
|
270
296
|
return this.http.put(
|
|
271
|
-
`/integrations/apps/${appName.toUpperCase()}
|
|
297
|
+
`/integrations/apps/${appName.toUpperCase()}?${queryParams.toString()}`
|
|
272
298
|
);
|
|
273
299
|
}
|
|
274
300
|
/**
|
|
@@ -281,14 +307,14 @@ class IntegrationsResource {
|
|
|
281
307
|
);
|
|
282
308
|
}
|
|
283
309
|
// Aliases for backward compatibility with client methods
|
|
284
|
-
async isAppEnabled(appName) {
|
|
285
|
-
return this.checkAppEnabled(appName);
|
|
310
|
+
async isAppEnabled(appName, provider) {
|
|
311
|
+
return this.checkAppEnabled({ appName, provider });
|
|
286
312
|
}
|
|
287
313
|
async setAppEnabled(appName, data) {
|
|
288
|
-
return this.updateAppStatus(appName, data.enabled);
|
|
314
|
+
return this.updateAppStatus({ appName, enabled: data.enabled, provider: data.provider });
|
|
289
315
|
}
|
|
290
316
|
async listConnections(userId, params) {
|
|
291
|
-
return this.getUserConnections(userId, params?.appFilter);
|
|
317
|
+
return this.getUserConnections({ userId, appFilter: params?.appFilter, provider: params?.provider });
|
|
292
318
|
}
|
|
293
319
|
}
|
|
294
320
|
|
|
@@ -577,6 +603,116 @@ class ResponsesResource {
|
|
|
577
603
|
}
|
|
578
604
|
}
|
|
579
605
|
|
|
606
|
+
class SkillsResource {
|
|
607
|
+
constructor(http) {
|
|
608
|
+
this.http = http;
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* Create a new skill guideline
|
|
612
|
+
* @param skillData - Skill guideline data
|
|
613
|
+
* @param options - Optional parameters
|
|
614
|
+
* @param options.userId - Optional user ID for skill ownership
|
|
615
|
+
*/
|
|
616
|
+
async create(skillData, options) {
|
|
617
|
+
const params = {};
|
|
618
|
+
if (options?.userId) {
|
|
619
|
+
params.user_id = options.userId;
|
|
620
|
+
}
|
|
621
|
+
return this.http.post("/skills", skillData, { params });
|
|
622
|
+
}
|
|
623
|
+
/**
|
|
624
|
+
* List skill guidelines with optional filtering
|
|
625
|
+
* @param params - Optional filter parameters
|
|
626
|
+
* @param params.category - Filter by skill category
|
|
627
|
+
* @param params.isActive - Filter by active status
|
|
628
|
+
* @param params.page - Page number for pagination
|
|
629
|
+
* @param params.pageSize - Number of items per page
|
|
630
|
+
*/
|
|
631
|
+
async list(params) {
|
|
632
|
+
const queryParams = {};
|
|
633
|
+
if (params?.category)
|
|
634
|
+
queryParams.category = params.category;
|
|
635
|
+
if (params?.isActive !== void 0)
|
|
636
|
+
queryParams.is_active = params.isActive;
|
|
637
|
+
if (params?.page)
|
|
638
|
+
queryParams.page = params.page;
|
|
639
|
+
if (params?.pageSize)
|
|
640
|
+
queryParams.page_size = params.pageSize;
|
|
641
|
+
return this.http.get("/skills", { params: queryParams });
|
|
642
|
+
}
|
|
643
|
+
/**
|
|
644
|
+
* Get a skill guideline by ID
|
|
645
|
+
* @param skillId - The skill ID
|
|
646
|
+
*/
|
|
647
|
+
async get(skillId) {
|
|
648
|
+
return this.http.get(`/skills/${skillId}`);
|
|
649
|
+
}
|
|
650
|
+
/**
|
|
651
|
+
* Update a skill guideline
|
|
652
|
+
* @param skillId - The skill ID
|
|
653
|
+
* @param updates - Fields to update
|
|
654
|
+
*/
|
|
655
|
+
async update(skillId, updates) {
|
|
656
|
+
return this.http.put(`/skills/${skillId}`, updates);
|
|
657
|
+
}
|
|
658
|
+
/**
|
|
659
|
+
* Delete a skill guideline
|
|
660
|
+
* @param skillId - The skill ID
|
|
661
|
+
*/
|
|
662
|
+
async delete(skillId) {
|
|
663
|
+
await this.http.delete(`/skills/${skillId}`);
|
|
664
|
+
}
|
|
665
|
+
/**
|
|
666
|
+
* Create a skill usage record
|
|
667
|
+
* @param usageData - Skill usage data
|
|
668
|
+
*/
|
|
669
|
+
async createUsage(usageData) {
|
|
670
|
+
return this.http.post("/skills/usage", usageData);
|
|
671
|
+
}
|
|
672
|
+
/**
|
|
673
|
+
* List skill usage records
|
|
674
|
+
* @param params - Optional filter parameters
|
|
675
|
+
* @param params.skillId - Filter by skill ID
|
|
676
|
+
* @param params.responseId - Filter by response ID
|
|
677
|
+
* @param params.page - Page number for pagination
|
|
678
|
+
* @param params.pageSize - Number of items per page
|
|
679
|
+
*/
|
|
680
|
+
async listUsage(params) {
|
|
681
|
+
const queryParams = {};
|
|
682
|
+
if (params?.skillId)
|
|
683
|
+
queryParams.skill_id = params.skillId;
|
|
684
|
+
if (params?.responseId)
|
|
685
|
+
queryParams.response_id = params.responseId;
|
|
686
|
+
if (params?.page)
|
|
687
|
+
queryParams.page = params.page;
|
|
688
|
+
if (params?.pageSize)
|
|
689
|
+
queryParams.page_size = params.pageSize;
|
|
690
|
+
return this.http.get("/skills/usage", { params: queryParams });
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Update a skill usage record
|
|
694
|
+
* @param usageId - The usage record ID
|
|
695
|
+
* @param updates - Fields to update
|
|
696
|
+
*/
|
|
697
|
+
async updateUsage(usageId, updates) {
|
|
698
|
+
return this.http.put(`/skills/usage/${usageId}`, updates);
|
|
699
|
+
}
|
|
700
|
+
/**
|
|
701
|
+
* Get skill effectiveness metrics
|
|
702
|
+
* @param request - Analytics request parameters
|
|
703
|
+
*/
|
|
704
|
+
async getAnalytics(request) {
|
|
705
|
+
const queryParams = {};
|
|
706
|
+
if (request?.skillId)
|
|
707
|
+
queryParams.skill_id = request.skillId;
|
|
708
|
+
if (request?.tenantId)
|
|
709
|
+
queryParams.tenant_id = request.tenantId;
|
|
710
|
+
if (request?.daysBack)
|
|
711
|
+
queryParams.days_back = request.daysBack;
|
|
712
|
+
return this.http.get("/skills/analytics", { params: queryParams });
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
580
716
|
class TenantInfoResource {
|
|
581
717
|
constructor(http) {
|
|
582
718
|
this.http = http;
|
|
@@ -875,6 +1011,7 @@ class LumnisClient {
|
|
|
875
1011
|
integrations;
|
|
876
1012
|
modelPreferences;
|
|
877
1013
|
mcpServers;
|
|
1014
|
+
skills;
|
|
878
1015
|
_scopedUserId;
|
|
879
1016
|
_defaultScope;
|
|
880
1017
|
constructor(options = {}) {
|
|
@@ -904,6 +1041,7 @@ class LumnisClient {
|
|
|
904
1041
|
this.integrations = new IntegrationsResource(this.http);
|
|
905
1042
|
this.modelPreferences = new ModelPreferencesResource(this.http);
|
|
906
1043
|
this.mcpServers = new MCPServersResource(this.http);
|
|
1044
|
+
this.skills = new SkillsResource(this.http);
|
|
907
1045
|
}
|
|
908
1046
|
forUser(userId) {
|
|
909
1047
|
return new LumnisClient({
|
|
@@ -1081,7 +1219,7 @@ class LumnisClient {
|
|
|
1081
1219
|
return this.integrations.initiateConnection(params);
|
|
1082
1220
|
}
|
|
1083
1221
|
async getConnectionStatus(userId, appName) {
|
|
1084
|
-
return this.integrations.getConnectionStatus(userId, appName);
|
|
1222
|
+
return this.integrations.getConnectionStatus({ userId, appName });
|
|
1085
1223
|
}
|
|
1086
1224
|
async listConnections(userId, params) {
|
|
1087
1225
|
return this.integrations.listConnections(userId, params);
|
|
@@ -1118,6 +1256,22 @@ class LumnisClient {
|
|
|
1118
1256
|
async testMcpServer(serverId) {
|
|
1119
1257
|
return this.mcpServers.testConnection(serverId);
|
|
1120
1258
|
}
|
|
1259
|
+
// Skills methods
|
|
1260
|
+
async createSkill(skillData, options) {
|
|
1261
|
+
return this.skills.create(skillData, options);
|
|
1262
|
+
}
|
|
1263
|
+
async getSkill(skillId) {
|
|
1264
|
+
return this.skills.get(skillId);
|
|
1265
|
+
}
|
|
1266
|
+
async listSkills(params) {
|
|
1267
|
+
return this.skills.list(params);
|
|
1268
|
+
}
|
|
1269
|
+
async updateSkill(skillId, updates) {
|
|
1270
|
+
return this.skills.update(skillId, updates);
|
|
1271
|
+
}
|
|
1272
|
+
async deleteSkill(skillId) {
|
|
1273
|
+
return this.skills.delete(skillId);
|
|
1274
|
+
}
|
|
1121
1275
|
}
|
|
1122
1276
|
function createSimpleProgressCallback() {
|
|
1123
1277
|
let lastStatus;
|
|
@@ -1158,6 +1312,15 @@ function createSimpleProgressCallback() {
|
|
|
1158
1312
|
};
|
|
1159
1313
|
}
|
|
1160
1314
|
|
|
1315
|
+
var ProviderType = /* @__PURE__ */ ((ProviderType2) => {
|
|
1316
|
+
ProviderType2["COMPOSIO"] = "composio";
|
|
1317
|
+
ProviderType2["UNIPILE"] = "unipile";
|
|
1318
|
+
ProviderType2["NANGO"] = "nango";
|
|
1319
|
+
ProviderType2["ARCADE"] = "arcade";
|
|
1320
|
+
ProviderType2["MERGE"] = "merge";
|
|
1321
|
+
return ProviderType2;
|
|
1322
|
+
})(ProviderType || {});
|
|
1323
|
+
|
|
1161
1324
|
function displayProgress(update, indent = " ") {
|
|
1162
1325
|
if (update.state === "tool_update") {
|
|
1163
1326
|
if (update.toolCalls && update.toolCalls.length > 0) {
|
|
@@ -1253,4 +1416,4 @@ class ProgressTracker {
|
|
|
1253
1416
|
}
|
|
1254
1417
|
}
|
|
1255
1418
|
|
|
1256
|
-
export { AuthenticationError, InternalServerError, LocalFileNotSupportedError, LumnisClient, LumnisError, NotFoundError, ProgressTracker, RateLimitError, ValidationError, LumnisClient as default, displayProgress, formatProgressEntry };
|
|
1419
|
+
export { AuthenticationError, InternalServerError, LocalFileNotSupportedError, LumnisClient, LumnisError, NotFoundError, ProgressTracker, ProviderType, RateLimitError, ValidationError, LumnisClient as default, displayProgress, formatProgressEntry };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lumnisai",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.5",
|
|
5
5
|
"description": "Official Node.js SDK for the Lumnis AI API",
|
|
6
6
|
"author": "Lumnis AI",
|
|
7
7
|
"license": "MIT",
|
|
@@ -66,6 +66,7 @@
|
|
|
66
66
|
"release": "bumpp && pnpm publish",
|
|
67
67
|
"start": "tsx src/index.ts",
|
|
68
68
|
"test": "vitest",
|
|
69
|
-
"typecheck": "tsc --noEmit"
|
|
69
|
+
"typecheck": "tsc --noEmit",
|
|
70
|
+
"example:skills": "tsx examples/skills-example.ts"
|
|
70
71
|
}
|
|
71
72
|
}
|