@lobehub/market-sdk 0.33.3 → 0.33.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 +179 -1
- package/dist/index.mjs +160 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2226,6 +2226,39 @@ interface ConnectProviderDetail extends ConnectProvider {
|
|
|
2226
2226
|
*/
|
|
2227
2227
|
proxyBaseUrl?: string;
|
|
2228
2228
|
}
|
|
2229
|
+
/**
|
|
2230
|
+
* OAuth Client ID Metadata Document for CIMD providers.
|
|
2231
|
+
*/
|
|
2232
|
+
interface CimdClientMetadata {
|
|
2233
|
+
/**
|
|
2234
|
+
* Client identifier. For CIMD this is the metadata document URL itself.
|
|
2235
|
+
*/
|
|
2236
|
+
client_id: string;
|
|
2237
|
+
/**
|
|
2238
|
+
* Human-readable client name shown in consent screens.
|
|
2239
|
+
*/
|
|
2240
|
+
client_name: string;
|
|
2241
|
+
/**
|
|
2242
|
+
* Client homepage URL.
|
|
2243
|
+
*/
|
|
2244
|
+
client_uri: string;
|
|
2245
|
+
/**
|
|
2246
|
+
* Supported OAuth grant types.
|
|
2247
|
+
*/
|
|
2248
|
+
grant_types: string[];
|
|
2249
|
+
/**
|
|
2250
|
+
* Exact redirect URIs accepted for this client.
|
|
2251
|
+
*/
|
|
2252
|
+
redirect_uris: string[];
|
|
2253
|
+
/**
|
|
2254
|
+
* Supported OAuth response types.
|
|
2255
|
+
*/
|
|
2256
|
+
response_types: string[];
|
|
2257
|
+
/**
|
|
2258
|
+
* Token endpoint authentication method.
|
|
2259
|
+
*/
|
|
2260
|
+
token_endpoint_auth_method: 'none';
|
|
2261
|
+
}
|
|
2229
2262
|
/**
|
|
2230
2263
|
* User's OAuth connection to a provider
|
|
2231
2264
|
*/
|
|
@@ -2514,6 +2547,7 @@ interface AuthorizeResponse {
|
|
|
2514
2547
|
/**
|
|
2515
2548
|
* Represents a tool/function that can be called through a skill provider
|
|
2516
2549
|
*/
|
|
2550
|
+
type SkillToolsSource = 'static' | 'live';
|
|
2517
2551
|
interface SkillTool {
|
|
2518
2552
|
/**
|
|
2519
2553
|
* Optional description of the tool
|
|
@@ -2608,6 +2642,11 @@ interface ListSkillToolsResponse {
|
|
|
2608
2642
|
* Provider identifier
|
|
2609
2643
|
*/
|
|
2610
2644
|
provider: string;
|
|
2645
|
+
/**
|
|
2646
|
+
* Source of the returned tools. Static tools come from the public catalog;
|
|
2647
|
+
* live tools are discovered from the connected provider for the current user.
|
|
2648
|
+
*/
|
|
2649
|
+
source?: SkillToolsSource;
|
|
2611
2650
|
/**
|
|
2612
2651
|
* Whether the request was successful
|
|
2613
2652
|
*/
|
|
@@ -5793,6 +5832,17 @@ declare class ConnectService extends BaseSDK {
|
|
|
5793
5832
|
* @returns Promise resolving to the provider details
|
|
5794
5833
|
*/
|
|
5795
5834
|
getProvider(provider: string, options?: globalThis.RequestInit): Promise<GetConnectProviderResponse>;
|
|
5835
|
+
/**
|
|
5836
|
+
* Gets the OAuth Client ID Metadata Document for a CIMD provider.
|
|
5837
|
+
*
|
|
5838
|
+
* This public, versioned document is used as `client_id` by providers that
|
|
5839
|
+
* support OAuth Client ID Metadata Documents.
|
|
5840
|
+
*
|
|
5841
|
+
* @param provider - The provider ID
|
|
5842
|
+
* @param options - Optional request options
|
|
5843
|
+
* @returns Promise resolving to the CIMD client metadata document
|
|
5844
|
+
*/
|
|
5845
|
+
getClientMetadata(provider: string, options?: globalThis.RequestInit): Promise<CimdClientMetadata>;
|
|
5796
5846
|
/**
|
|
5797
5847
|
* Requests an authorization code for initiating OAuth flow
|
|
5798
5848
|
*
|
|
@@ -6564,6 +6614,19 @@ declare class SkillService extends BaseSDK {
|
|
|
6564
6614
|
* @returns Promise resolving to the list of available tools
|
|
6565
6615
|
*/
|
|
6566
6616
|
listTools(provider: string, options?: globalThis.RequestInit): Promise<ListSkillToolsResponse>;
|
|
6617
|
+
/**
|
|
6618
|
+
* Lists live tools for a connected provider
|
|
6619
|
+
*
|
|
6620
|
+
* Returns the tools/functions discovered from the connected provider for the
|
|
6621
|
+
* current authenticated user. For MCP providers this calls remote tool
|
|
6622
|
+
* discovery and reflects token/scopes-dependent availability.
|
|
6623
|
+
* Requires authentication and an active provider connection.
|
|
6624
|
+
*
|
|
6625
|
+
* @param provider - The provider ID (e.g., 'linear', 'github')
|
|
6626
|
+
* @param options - Optional request options (must include authentication)
|
|
6627
|
+
* @returns Promise resolving to the list of live available tools
|
|
6628
|
+
*/
|
|
6629
|
+
listLiveTools(provider: string, options?: globalThis.RequestInit): Promise<ListSkillToolsResponse>;
|
|
6567
6630
|
/**
|
|
6568
6631
|
* Gets details of a specific tool
|
|
6569
6632
|
*
|
|
@@ -7284,6 +7347,116 @@ declare class UserLikeService extends BaseSDK {
|
|
|
7284
7347
|
getUserLikedPlugins(userId: number, params?: Pick<LikeQuery, 'limit' | 'offset'>, options?: globalThis.RequestInit): Promise<LikeListResponse>;
|
|
7285
7348
|
}
|
|
7286
7349
|
|
|
7350
|
+
interface UserPlugin {
|
|
7351
|
+
createdAt: string;
|
|
7352
|
+
id: number;
|
|
7353
|
+
identifier: string;
|
|
7354
|
+
isClaimed: boolean | null;
|
|
7355
|
+
latestVersion: string | null;
|
|
7356
|
+
name: string | null;
|
|
7357
|
+
status: string;
|
|
7358
|
+
updatedAt: string;
|
|
7359
|
+
}
|
|
7360
|
+
interface UserSkill {
|
|
7361
|
+
createdAt: string;
|
|
7362
|
+
id: number;
|
|
7363
|
+
identifier: string;
|
|
7364
|
+
latestVersion: string | null;
|
|
7365
|
+
name: string | null;
|
|
7366
|
+
status: string;
|
|
7367
|
+
updatedAt: string;
|
|
7368
|
+
}
|
|
7369
|
+
interface PublishVersionResponse {
|
|
7370
|
+
identifier: string;
|
|
7371
|
+
message: string;
|
|
7372
|
+
version: string;
|
|
7373
|
+
versionId: number;
|
|
7374
|
+
}
|
|
7375
|
+
interface ClaimableAsset {
|
|
7376
|
+
id: number;
|
|
7377
|
+
identifier: string;
|
|
7378
|
+
type: string;
|
|
7379
|
+
}
|
|
7380
|
+
interface ClaimAssetResponse {
|
|
7381
|
+
success: boolean;
|
|
7382
|
+
}
|
|
7383
|
+
interface PluginPublishData {
|
|
7384
|
+
author?: string;
|
|
7385
|
+
authorUrl?: string;
|
|
7386
|
+
category?: string;
|
|
7387
|
+
cloudEndpoint?: string;
|
|
7388
|
+
description?: string;
|
|
7389
|
+
homepage?: string;
|
|
7390
|
+
icon?: string;
|
|
7391
|
+
name: string;
|
|
7392
|
+
prompts?: Record<string, unknown>[];
|
|
7393
|
+
resources?: Record<string, unknown>[];
|
|
7394
|
+
tags?: string[];
|
|
7395
|
+
tools?: Record<string, unknown>[];
|
|
7396
|
+
version: string;
|
|
7397
|
+
}
|
|
7398
|
+
/**
|
|
7399
|
+
* User Publish Service
|
|
7400
|
+
*
|
|
7401
|
+
* Provides functionality for authenticated users to list their owned assets
|
|
7402
|
+
* and publish new versions of their skills and plugins.
|
|
7403
|
+
*/
|
|
7404
|
+
declare class UserPublishService extends BaseSDK {
|
|
7405
|
+
/**
|
|
7406
|
+
* Lists all plugins owned by the authenticated user
|
|
7407
|
+
*
|
|
7408
|
+
* @param options - Optional request options (must include authentication)
|
|
7409
|
+
* @returns Promise resolving to the list of user's plugins
|
|
7410
|
+
*/
|
|
7411
|
+
listPlugins(options?: globalThis.RequestInit): Promise<{
|
|
7412
|
+
data: UserPlugin[];
|
|
7413
|
+
}>;
|
|
7414
|
+
/**
|
|
7415
|
+
* Lists all skills owned by the authenticated user
|
|
7416
|
+
*
|
|
7417
|
+
* @param options - Optional request options (must include authentication)
|
|
7418
|
+
* @returns Promise resolving to the list of user's skills
|
|
7419
|
+
*/
|
|
7420
|
+
listSkills(options?: globalThis.RequestInit): Promise<{
|
|
7421
|
+
data: UserSkill[];
|
|
7422
|
+
}>;
|
|
7423
|
+
/**
|
|
7424
|
+
* Publishes a new version of a skill by uploading a ZIP package
|
|
7425
|
+
*
|
|
7426
|
+
* @param identifier - The skill identifier
|
|
7427
|
+
* @param zipBuffer - The ZIP file buffer containing the skill package
|
|
7428
|
+
* @param options - Optional request options (must include authentication)
|
|
7429
|
+
* @returns Promise resolving to the publish result
|
|
7430
|
+
*/
|
|
7431
|
+
publishSkillVersion(identifier: string, zipBuffer: ArrayBuffer | Buffer, options?: globalThis.RequestInit): Promise<PublishVersionResponse>;
|
|
7432
|
+
/**
|
|
7433
|
+
* Scans for assets claimable by the authenticated user (matched via connected GitHub account)
|
|
7434
|
+
*
|
|
7435
|
+
* @param assetType - 'plugins' or 'skills'
|
|
7436
|
+
* @returns Promise resolving to the list of claimable assets
|
|
7437
|
+
*/
|
|
7438
|
+
scanClaimableAssets(assetType: 'plugins' | 'skills'): Promise<{
|
|
7439
|
+
data: ClaimableAsset[];
|
|
7440
|
+
}>;
|
|
7441
|
+
/**
|
|
7442
|
+
* Claims ownership of an asset
|
|
7443
|
+
*
|
|
7444
|
+
* @param assetId - The numeric asset ID
|
|
7445
|
+
* @param assetType - 'plugin' or 'skill'
|
|
7446
|
+
* @returns Promise resolving to the claim result
|
|
7447
|
+
*/
|
|
7448
|
+
claimAsset(assetId: number, assetType: 'plugin' | 'skill'): Promise<ClaimAssetResponse>;
|
|
7449
|
+
/**
|
|
7450
|
+
* Publishes a new version of a plugin by submitting JSON data
|
|
7451
|
+
*
|
|
7452
|
+
* @param identifier - The plugin identifier
|
|
7453
|
+
* @param data - The plugin version data (lhm.plugin.json content)
|
|
7454
|
+
* @param options - Optional request options (must include authentication)
|
|
7455
|
+
* @returns Promise resolving to the publish result
|
|
7456
|
+
*/
|
|
7457
|
+
publishPluginVersion(identifier: string, data: PluginPublishData, options?: globalThis.RequestInit): Promise<PublishVersionResponse>;
|
|
7458
|
+
}
|
|
7459
|
+
|
|
7287
7460
|
/**
|
|
7288
7461
|
* LobeHub Market SDK Client
|
|
7289
7462
|
*
|
|
@@ -7333,6 +7506,11 @@ declare class MarketSDK extends BaseSDK {
|
|
|
7333
7506
|
* Provides methods to retrieve user profiles and their published agents
|
|
7334
7507
|
*/
|
|
7335
7508
|
readonly user: UserService;
|
|
7509
|
+
/**
|
|
7510
|
+
* User publish service for managing and publishing owned assets
|
|
7511
|
+
* Provides methods to list owned plugins/skills and publish new versions
|
|
7512
|
+
*/
|
|
7513
|
+
readonly userPublish: UserPublishService;
|
|
7336
7514
|
/**
|
|
7337
7515
|
* User follow service for follow operations
|
|
7338
7516
|
* Provides methods to follow/unfollow users and retrieve follow relationships
|
|
@@ -7510,4 +7688,4 @@ declare function buildTrustedClientPayload(params: {
|
|
|
7510
7688
|
userId: string;
|
|
7511
7689
|
}): TrustedClientPayload;
|
|
7512
7690
|
|
|
7513
|
-
export { type AccountMeta, type AdminListQueryParams, type AdminListResponse, type AdminPluginParams, type AgentCreateRequest, type AgentCreateResponse, type AgentDetailQuery, type AgentExtension, type AgentForkItem, type AgentForkRequest, type AgentForkResponse, type AgentForkSourceResponse, type AgentForksResponse, type AgentGroupCreateRequest, type AgentGroupCreateResponse, type AgentGroupDetail, type AgentGroupDetailQuery, type AgentGroupForkItem, type AgentGroupForkRequest, type AgentGroupForkResponse, type AgentGroupForkSourceResponse, type AgentGroupForksResponse, type AgentGroupItem, type AgentGroupListQuery, type AgentGroupListResponse, type AgentGroupModifyRequest, type AgentGroupModifyResponse, type AgentGroupStatus, type AgentGroupStatusChangeResponse, type AgentGroupVersionCreateRequest, type AgentGroupVersionCreateResponse, type AgentInstallCountRequest, type AgentInstallCountResponse, type AgentInterface, type AgentItemDetail, type AgentListQuery, type AgentListResponse, type AgentModifyRequest, type AgentModifyResponse, type AgentProfileEntity, type AgentProfileResponse, type AgentSecurityRequirement, type AgentSecurityScheme, type AgentSkill, type AgentStatus, type AgentStatusChangeResponse, type AgentUploadRequest, type AgentUploadResponse, type AgentUploadVersion, type AgentVersionCreateRequest, type AgentVersionCreateResponse, type AgentVersionLocalization, type AgentVersionModifyRequest, type AgentVersionModifyResponse, type AuthorizationCodeTokenRequest, type AuthorizeParams, type AuthorizeResponse, type CallSkillToolResponse, type CheckFavoriteQuery, type CheckFavoriteResponse, type CheckFollowQuery, type CheckFollowResponse, type CheckLikeQuery, type CheckLikeResponse, type ClientRegistrationError, type ClientRegistrationRequest, type ClientRegistrationResponse, type CodeInterpreterToolName, type CodeInterpreterToolParams, type ConnectProvider, type ConnectProviderDetail, type ConnectProviderScopes, type ConnectionHealth, type ConnectionStats, type CreateFileCredRequest, type CreateKVCredRequest, type CreateMemberAgent, type CreateOAuthCredRequest, type CredWithPlaintext, type DeleteCredResponse, type DiscoveryDocument, type EditLocalFileParams, type ExecuteCodeParams, type ExportFileParams, type FavoriteListResponse, type FavoriteQuery, type FavoriteRequest, type FeedbackClientInfo, type FollowListItem, type FollowListResponse, type FollowRequest, type GetAllConnectionsHealthResponse, type GetAuthorizeUrlParams, type GetCommandOutputParams, type GetConnectProviderResponse, type GetConnectionHealthResponse, type GetConnectionStatsResponse, type GetConnectionStatusResponse, type GetCredOptions, type GetSkillStatusResponse, type GetSkillToolResponse, type GlobLocalFilesParams, type GrepContentParams, type InteractionTargetType, type KillCommandParams, type LikeListResponse, type LikeQuery, type LikeRequest, type ListConnectProvidersResponse, type ListConnectionsResponse, type ListCredsResponse, type ListLocalFilesParams, type ListSkillProvidersResponse, type ListSkillToolsResponse, MarketAPIError, MarketAdmin, type MarketReportGitHubSkillParams, type MarketReportGitHubSkillResponse, type MarketReportSkillInstallParams, type MarketReportSkillInstallResponse, MarketSDK, type MarketSDKOptions, type MarketSkillAuthor, type MarketSkillCategory, type MarketSkillCategoryQuery, type MarketSkillCollectionDetail, type MarketSkillCollectionDetailQuery, type MarketSkillCollectionItemSort, type MarketSkillCollectionListItem, type MarketSkillCollectionListQuery, type MarketSkillCollectionListResponse, type MarketSkillDetail, type MarketSkillDetailQuery, type MarketSkillGitHubMeta, type MarketSkillListItem, type MarketSkillListQuery, type MarketSkillListResponse, type MarketSkillManifest, type MarketSkillResource, type MarketSkillVersionSummary, type MarketSkillVersionsResponse, type MemberAgent, type MoveLocalFilesParams, type MoveOperation, type OAuthConnection, type OAuthTokenResponse, type OwnAgentGroupListQuery, type OwnAgentListQuery, type PaginationQuery, type PluginCommentAuthor, type PluginCommentCreateItem, type PluginCommentCreateResponse, type PluginCommentDeleteResponse, type PluginCommentItem, type PluginCommentListQuery, type PluginCommentListResponse, type PluginCommentRating, type PluginCommentReactionResponse, type PluginI18nImportParams, type PluginI18nImportResponse, type PluginItem, type PluginLatestOwnComment, type PluginListResponse, type PluginLocalization, type PluginQueryParams, type PluginRatingDistribution, type PluginUpdateParams, type PluginVersionCreateParams, type PluginVersionUpdateParams, type ProgrammingLanguage, type ReadLocalFileParams, type RefreshConnectionResponse, type RefreshTokenRequest, type RegisterUserRequest, type RegisterUserResponse, type RegisteredUserProfile, type RenameLocalFileParams, type ReviewStatus, ReviewStatusEnumSchema, type RevokeConnectionResponse, type RunBuildInToolsError, type RunBuildInToolsRequest, type RunBuildInToolsResponse, type RunBuildInToolsSuccessData, type RunCommandParams, SDK_USER_AGENT, SDK_VERSION, type SearchLocalFilesParams, type SharedTokenState, type SkillCallParams, type SkillCommentAuthor, type SkillCommentCreateItem, type SkillCommentCreateResponse, type SkillCommentDeleteResponse, type SkillCommentItem, type SkillCommentListItem, type SkillCommentListQuery, type SkillCommentListResponse, type SkillCommentRating, type SkillErrorResponse, type SkillLatestOwnComment, type SkillProviderInfo, type SkillProviderStatus, type SkillRatingDistribution, type SkillTool, StatusEnumSchema, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SuccessResponse, type ToggleLikeResponse, type TrustedClientPayload, type UnclaimedPluginItem, type UpdateAgentProfileRequest, type UpdateAgentProfileResponse, type UpdateCredRequest, type UpdateMemberAgent, type UpdateUserInfoRequest, type UpdateUserInfoResponse, type UserAgentGroupItem, type UserAgentItem, type UserInfoQuery, type UserInfoResponse, type UserProfile, VisibilityEnumSchema, type WriteLocalFileParams, buildTrustedClientPayload, createTrustedClientToken, generateNonce };
|
|
7691
|
+
export { type AccountMeta, type AdminListQueryParams, type AdminListResponse, type AdminPluginParams, type AgentCreateRequest, type AgentCreateResponse, type AgentDetailQuery, type AgentExtension, type AgentForkItem, type AgentForkRequest, type AgentForkResponse, type AgentForkSourceResponse, type AgentForksResponse, type AgentGroupCreateRequest, type AgentGroupCreateResponse, type AgentGroupDetail, type AgentGroupDetailQuery, type AgentGroupForkItem, type AgentGroupForkRequest, type AgentGroupForkResponse, type AgentGroupForkSourceResponse, type AgentGroupForksResponse, type AgentGroupItem, type AgentGroupListQuery, type AgentGroupListResponse, type AgentGroupModifyRequest, type AgentGroupModifyResponse, type AgentGroupStatus, type AgentGroupStatusChangeResponse, type AgentGroupVersionCreateRequest, type AgentGroupVersionCreateResponse, type AgentInstallCountRequest, type AgentInstallCountResponse, type AgentInterface, type AgentItemDetail, type AgentListQuery, type AgentListResponse, type AgentModifyRequest, type AgentModifyResponse, type AgentProfileEntity, type AgentProfileResponse, type AgentSecurityRequirement, type AgentSecurityScheme, type AgentSkill, type AgentStatus, type AgentStatusChangeResponse, type AgentUploadRequest, type AgentUploadResponse, type AgentUploadVersion, type AgentVersionCreateRequest, type AgentVersionCreateResponse, type AgentVersionLocalization, type AgentVersionModifyRequest, type AgentVersionModifyResponse, type AuthorizationCodeTokenRequest, type AuthorizeParams, type AuthorizeResponse, type CallSkillToolResponse, type CheckFavoriteQuery, type CheckFavoriteResponse, type CheckFollowQuery, type CheckFollowResponse, type CheckLikeQuery, type CheckLikeResponse, type CimdClientMetadata, type ClientRegistrationError, type ClientRegistrationRequest, type ClientRegistrationResponse, type CodeInterpreterToolName, type CodeInterpreterToolParams, type ConnectProvider, type ConnectProviderDetail, type ConnectProviderScopes, type ConnectionHealth, type ConnectionStats, type CreateFileCredRequest, type CreateKVCredRequest, type CreateMemberAgent, type CreateOAuthCredRequest, type CredWithPlaintext, type DeleteCredResponse, type DiscoveryDocument, type EditLocalFileParams, type ExecuteCodeParams, type ExportFileParams, type FavoriteListResponse, type FavoriteQuery, type FavoriteRequest, type FeedbackClientInfo, type FollowListItem, type FollowListResponse, type FollowRequest, type GetAllConnectionsHealthResponse, type GetAuthorizeUrlParams, type GetCommandOutputParams, type GetConnectProviderResponse, type GetConnectionHealthResponse, type GetConnectionStatsResponse, type GetConnectionStatusResponse, type GetCredOptions, type GetSkillStatusResponse, type GetSkillToolResponse, type GlobLocalFilesParams, type GrepContentParams, type InteractionTargetType, type KillCommandParams, type LikeListResponse, type LikeQuery, type LikeRequest, type ListConnectProvidersResponse, type ListConnectionsResponse, type ListCredsResponse, type ListLocalFilesParams, type ListSkillProvidersResponse, type ListSkillToolsResponse, MarketAPIError, MarketAdmin, type MarketReportGitHubSkillParams, type MarketReportGitHubSkillResponse, type MarketReportSkillInstallParams, type MarketReportSkillInstallResponse, MarketSDK, type MarketSDKOptions, type MarketSkillAuthor, type MarketSkillCategory, type MarketSkillCategoryQuery, type MarketSkillCollectionDetail, type MarketSkillCollectionDetailQuery, type MarketSkillCollectionItemSort, type MarketSkillCollectionListItem, type MarketSkillCollectionListQuery, type MarketSkillCollectionListResponse, type MarketSkillDetail, type MarketSkillDetailQuery, type MarketSkillGitHubMeta, type MarketSkillListItem, type MarketSkillListQuery, type MarketSkillListResponse, type MarketSkillManifest, type MarketSkillResource, type MarketSkillVersionSummary, type MarketSkillVersionsResponse, type MemberAgent, type MoveLocalFilesParams, type MoveOperation, type OAuthConnection, type OAuthTokenResponse, type OwnAgentGroupListQuery, type OwnAgentListQuery, type PaginationQuery, type PluginCommentAuthor, type PluginCommentCreateItem, type PluginCommentCreateResponse, type PluginCommentDeleteResponse, type PluginCommentItem, type PluginCommentListQuery, type PluginCommentListResponse, type PluginCommentRating, type PluginCommentReactionResponse, type PluginI18nImportParams, type PluginI18nImportResponse, type PluginItem, type PluginLatestOwnComment, type PluginListResponse, type PluginLocalization, type PluginQueryParams, type PluginRatingDistribution, type PluginUpdateParams, type PluginVersionCreateParams, type PluginVersionUpdateParams, type ProgrammingLanguage, type ReadLocalFileParams, type RefreshConnectionResponse, type RefreshTokenRequest, type RegisterUserRequest, type RegisterUserResponse, type RegisteredUserProfile, type RenameLocalFileParams, type ReviewStatus, ReviewStatusEnumSchema, type RevokeConnectionResponse, type RunBuildInToolsError, type RunBuildInToolsRequest, type RunBuildInToolsResponse, type RunBuildInToolsSuccessData, type RunCommandParams, SDK_USER_AGENT, SDK_VERSION, type SearchLocalFilesParams, type SharedTokenState, type SkillCallParams, type SkillCommentAuthor, type SkillCommentCreateItem, type SkillCommentCreateResponse, type SkillCommentDeleteResponse, type SkillCommentItem, type SkillCommentListItem, type SkillCommentListQuery, type SkillCommentListResponse, type SkillCommentRating, type SkillErrorResponse, type SkillLatestOwnComment, type SkillProviderInfo, type SkillProviderStatus, type SkillRatingDistribution, type SkillTool, type SkillToolsSource, StatusEnumSchema, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SuccessResponse, type ToggleLikeResponse, type TrustedClientPayload, type UnclaimedPluginItem, type UpdateAgentProfileRequest, type UpdateAgentProfileResponse, type UpdateCredRequest, type UpdateMemberAgent, type UpdateUserInfoRequest, type UpdateUserInfoResponse, type UserAgentGroupItem, type UserAgentItem, type UserInfoQuery, type UserInfoResponse, type UserProfile, VisibilityEnumSchema, type WriteLocalFileParams, buildTrustedClientPayload, createTrustedClientToken, generateNonce };
|
package/dist/index.mjs
CHANGED
|
@@ -1733,7 +1733,7 @@ var MarketAdmin = class extends BaseSDK {
|
|
|
1733
1733
|
};
|
|
1734
1734
|
|
|
1735
1735
|
// src/market/market-sdk.ts
|
|
1736
|
-
import
|
|
1736
|
+
import debug28 from "debug";
|
|
1737
1737
|
|
|
1738
1738
|
// src/market/services/AgentProfileService.ts
|
|
1739
1739
|
import debug11 from "debug";
|
|
@@ -2867,6 +2867,25 @@ var ConnectService = class extends BaseSDK {
|
|
|
2867
2867
|
log15("Retrieved provider: %s", (_a = result.provider) == null ? void 0 : _a.name);
|
|
2868
2868
|
return result;
|
|
2869
2869
|
}
|
|
2870
|
+
/**
|
|
2871
|
+
* Gets the OAuth Client ID Metadata Document for a CIMD provider.
|
|
2872
|
+
*
|
|
2873
|
+
* This public, versioned document is used as `client_id` by providers that
|
|
2874
|
+
* support OAuth Client ID Metadata Documents.
|
|
2875
|
+
*
|
|
2876
|
+
* @param provider - The provider ID
|
|
2877
|
+
* @param options - Optional request options
|
|
2878
|
+
* @returns Promise resolving to the CIMD client metadata document
|
|
2879
|
+
*/
|
|
2880
|
+
async getClientMetadata(provider, options) {
|
|
2881
|
+
log15("Getting CIMD client metadata for provider: %s", provider);
|
|
2882
|
+
const result = await this.request(
|
|
2883
|
+
`/connect/${encodeURIComponent(provider)}/oauth/client-metadata/v1.json`,
|
|
2884
|
+
options
|
|
2885
|
+
);
|
|
2886
|
+
log15("Retrieved CIMD client metadata: %s", result.client_id);
|
|
2887
|
+
return result;
|
|
2888
|
+
}
|
|
2870
2889
|
/**
|
|
2871
2890
|
* Requests an authorization code for initiating OAuth flow
|
|
2872
2891
|
*
|
|
@@ -4123,6 +4142,28 @@ var SkillService = class extends BaseSDK {
|
|
|
4123
4142
|
log20("Found %d tools for provider %s", ((_a = result.tools) == null ? void 0 : _a.length) || 0, provider);
|
|
4124
4143
|
return result;
|
|
4125
4144
|
}
|
|
4145
|
+
/**
|
|
4146
|
+
* Lists live tools for a connected provider
|
|
4147
|
+
*
|
|
4148
|
+
* Returns the tools/functions discovered from the connected provider for the
|
|
4149
|
+
* current authenticated user. For MCP providers this calls remote tool
|
|
4150
|
+
* discovery and reflects token/scopes-dependent availability.
|
|
4151
|
+
* Requires authentication and an active provider connection.
|
|
4152
|
+
*
|
|
4153
|
+
* @param provider - The provider ID (e.g., 'linear', 'github')
|
|
4154
|
+
* @param options - Optional request options (must include authentication)
|
|
4155
|
+
* @returns Promise resolving to the list of live available tools
|
|
4156
|
+
*/
|
|
4157
|
+
async listLiveTools(provider, options) {
|
|
4158
|
+
var _a;
|
|
4159
|
+
log20("Listing live tools for provider: %s", provider);
|
|
4160
|
+
const result = await this.request(
|
|
4161
|
+
`/v1/skill/${encodeURIComponent(provider)}/tools/live`,
|
|
4162
|
+
options
|
|
4163
|
+
);
|
|
4164
|
+
log20("Found %d live tools for provider %s", ((_a = result.tools) == null ? void 0 : _a.length) || 0, provider);
|
|
4165
|
+
return result;
|
|
4166
|
+
}
|
|
4126
4167
|
/**
|
|
4127
4168
|
* Gets details of a specific tool
|
|
4128
4169
|
*
|
|
@@ -5391,8 +5432,122 @@ var UserLikeService = class extends BaseSDK {
|
|
|
5391
5432
|
}
|
|
5392
5433
|
};
|
|
5393
5434
|
|
|
5435
|
+
// src/market/services/UserPublishService.ts
|
|
5436
|
+
import debug27 from "debug";
|
|
5437
|
+
var log27 = debug27("lobe-market-sdk:user-publish");
|
|
5438
|
+
var UserPublishService = class extends BaseSDK {
|
|
5439
|
+
/**
|
|
5440
|
+
* Lists all plugins owned by the authenticated user
|
|
5441
|
+
*
|
|
5442
|
+
* @param options - Optional request options (must include authentication)
|
|
5443
|
+
* @returns Promise resolving to the list of user's plugins
|
|
5444
|
+
*/
|
|
5445
|
+
async listPlugins(options) {
|
|
5446
|
+
var _a;
|
|
5447
|
+
log27("Listing user plugins");
|
|
5448
|
+
const result = await this.request("/v1/user/plugins", options);
|
|
5449
|
+
log27("Found %d user plugins", ((_a = result.data) == null ? void 0 : _a.length) || 0);
|
|
5450
|
+
return result;
|
|
5451
|
+
}
|
|
5452
|
+
/**
|
|
5453
|
+
* Lists all skills owned by the authenticated user
|
|
5454
|
+
*
|
|
5455
|
+
* @param options - Optional request options (must include authentication)
|
|
5456
|
+
* @returns Promise resolving to the list of user's skills
|
|
5457
|
+
*/
|
|
5458
|
+
async listSkills(options) {
|
|
5459
|
+
var _a;
|
|
5460
|
+
log27("Listing user skills");
|
|
5461
|
+
const result = await this.request("/v1/user/skills", options);
|
|
5462
|
+
log27("Found %d user skills", ((_a = result.data) == null ? void 0 : _a.length) || 0);
|
|
5463
|
+
return result;
|
|
5464
|
+
}
|
|
5465
|
+
/**
|
|
5466
|
+
* Publishes a new version of a skill by uploading a ZIP package
|
|
5467
|
+
*
|
|
5468
|
+
* @param identifier - The skill identifier
|
|
5469
|
+
* @param zipBuffer - The ZIP file buffer containing the skill package
|
|
5470
|
+
* @param options - Optional request options (must include authentication)
|
|
5471
|
+
* @returns Promise resolving to the publish result
|
|
5472
|
+
*/
|
|
5473
|
+
async publishSkillVersion(identifier, zipBuffer, options) {
|
|
5474
|
+
log27("Publishing skill version for: %s", identifier);
|
|
5475
|
+
const formData = new FormData();
|
|
5476
|
+
const arrayBuffer = zipBuffer instanceof ArrayBuffer ? zipBuffer : zipBuffer.buffer.slice(
|
|
5477
|
+
zipBuffer.byteOffset,
|
|
5478
|
+
zipBuffer.byteOffset + zipBuffer.byteLength
|
|
5479
|
+
);
|
|
5480
|
+
const blob = new Blob([arrayBuffer], { type: "application/zip" });
|
|
5481
|
+
formData.append("file", blob, `${identifier}.zip`);
|
|
5482
|
+
const result = await this.request(
|
|
5483
|
+
`/v1/user/skills/${encodeURIComponent(identifier)}/versions`,
|
|
5484
|
+
{
|
|
5485
|
+
body: formData,
|
|
5486
|
+
method: "POST",
|
|
5487
|
+
...options
|
|
5488
|
+
}
|
|
5489
|
+
);
|
|
5490
|
+
log27("Published skill version: %s@%s", identifier, result.version);
|
|
5491
|
+
return result;
|
|
5492
|
+
}
|
|
5493
|
+
/**
|
|
5494
|
+
* Scans for assets claimable by the authenticated user (matched via connected GitHub account)
|
|
5495
|
+
*
|
|
5496
|
+
* @param assetType - 'plugins' or 'skills'
|
|
5497
|
+
* @returns Promise resolving to the list of claimable assets
|
|
5498
|
+
*/
|
|
5499
|
+
async scanClaimableAssets(assetType) {
|
|
5500
|
+
var _a;
|
|
5501
|
+
log27("Scanning claimable %s", assetType);
|
|
5502
|
+
const result = await this.request(
|
|
5503
|
+
`/v1/user/claims/scan/${assetType}`
|
|
5504
|
+
);
|
|
5505
|
+
log27("Found %d claimable %s", ((_a = result.data) == null ? void 0 : _a.length) || 0, assetType);
|
|
5506
|
+
return result;
|
|
5507
|
+
}
|
|
5508
|
+
/**
|
|
5509
|
+
* Claims ownership of an asset
|
|
5510
|
+
*
|
|
5511
|
+
* @param assetId - The numeric asset ID
|
|
5512
|
+
* @param assetType - 'plugin' or 'skill'
|
|
5513
|
+
* @returns Promise resolving to the claim result
|
|
5514
|
+
*/
|
|
5515
|
+
async claimAsset(assetId, assetType) {
|
|
5516
|
+
log27("Claiming %s with id: %d", assetType, assetId);
|
|
5517
|
+
const result = await this.request("/v1/user/claims", {
|
|
5518
|
+
body: JSON.stringify({ assetId, assetType }),
|
|
5519
|
+
headers: { "Content-Type": "application/json" },
|
|
5520
|
+
method: "POST"
|
|
5521
|
+
});
|
|
5522
|
+
log27("Claim result for %s %d: %s", assetType, assetId, result.success);
|
|
5523
|
+
return result;
|
|
5524
|
+
}
|
|
5525
|
+
/**
|
|
5526
|
+
* Publishes a new version of a plugin by submitting JSON data
|
|
5527
|
+
*
|
|
5528
|
+
* @param identifier - The plugin identifier
|
|
5529
|
+
* @param data - The plugin version data (lhm.plugin.json content)
|
|
5530
|
+
* @param options - Optional request options (must include authentication)
|
|
5531
|
+
* @returns Promise resolving to the publish result
|
|
5532
|
+
*/
|
|
5533
|
+
async publishPluginVersion(identifier, data, options) {
|
|
5534
|
+
log27("Publishing plugin version for: %s", identifier);
|
|
5535
|
+
const result = await this.request(
|
|
5536
|
+
`/v1/user/plugins/${encodeURIComponent(identifier)}/versions`,
|
|
5537
|
+
{
|
|
5538
|
+
body: JSON.stringify(data),
|
|
5539
|
+
headers: { "Content-Type": "application/json" },
|
|
5540
|
+
method: "POST",
|
|
5541
|
+
...options
|
|
5542
|
+
}
|
|
5543
|
+
);
|
|
5544
|
+
log27("Published plugin version: %s@%s", identifier, result.version);
|
|
5545
|
+
return result;
|
|
5546
|
+
}
|
|
5547
|
+
};
|
|
5548
|
+
|
|
5394
5549
|
// src/market/market-sdk.ts
|
|
5395
|
-
var
|
|
5550
|
+
var log28 = debug28("lobe-market-sdk");
|
|
5396
5551
|
var MarketSDK = class extends BaseSDK {
|
|
5397
5552
|
/**
|
|
5398
5553
|
* Creates a new MarketSDK instance
|
|
@@ -5405,7 +5560,7 @@ var MarketSDK = class extends BaseSDK {
|
|
|
5405
5560
|
tokenExpiry: void 0
|
|
5406
5561
|
};
|
|
5407
5562
|
super(options, void 0, sharedTokenState);
|
|
5408
|
-
|
|
5563
|
+
log28("MarketSDK instance created");
|
|
5409
5564
|
this.agentProfile = new AgentProfileService(options, this.headers, sharedTokenState);
|
|
5410
5565
|
this.agents = new AgentService2(options, this.headers, sharedTokenState);
|
|
5411
5566
|
this.agentGroups = new AgentGroupService(options, this.headers, sharedTokenState);
|
|
@@ -5414,6 +5569,7 @@ var MarketSDK = class extends BaseSDK {
|
|
|
5414
5569
|
this.creds = new CredService(options, this.headers, sharedTokenState);
|
|
5415
5570
|
this.plugins = new PluginsService(options, this.headers, sharedTokenState);
|
|
5416
5571
|
this.user = new UserService(options, this.headers, sharedTokenState);
|
|
5572
|
+
this.userPublish = new UserPublishService(options, this.headers, sharedTokenState);
|
|
5417
5573
|
this.follows = new UserFollowService(options, this.headers, sharedTokenState);
|
|
5418
5574
|
this.favorites = new UserFavoriteService(options, this.headers, sharedTokenState);
|
|
5419
5575
|
this.likes = new UserLikeService(options, this.headers, sharedTokenState);
|
|
@@ -5451,7 +5607,7 @@ var MarketSDK = class extends BaseSDK {
|
|
|
5451
5607
|
* @deprecated Use auth.registerClient() instead
|
|
5452
5608
|
*/
|
|
5453
5609
|
async registerClient(request) {
|
|
5454
|
-
|
|
5610
|
+
log28("Registering client (deprecated method, use auth.registerClient): %s", request.clientName);
|
|
5455
5611
|
return this.auth.registerClient(request);
|
|
5456
5612
|
}
|
|
5457
5613
|
};
|