@lobehub/market-sdk 0.39.2 → 0.40.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -8099,15 +8099,15 @@ interface ClaimAssetResponse {
8099
8099
  success: boolean;
8100
8100
  }
8101
8101
  interface SubmitRepoParams {
8102
- /** Optional branch name (only used for skill imports) */
8102
+ /** Optional branch name */
8103
8103
  branch?: string;
8104
- /** GitHub repository URL (must be owned by the authenticated user) */
8104
+ /** GitHub repository URL (authenticated user must own it or have push access) */
8105
8105
  gitUrl: string;
8106
- /** Asset type to import the repository as */
8107
- type: 'plugin' | 'skill';
8106
+ /** Repository submissions are only supported for skill imports */
8107
+ type: 'skill';
8108
8108
  }
8109
8109
  interface SubmitRepoResponse {
8110
- /** Predicted identifier (skills only; null for plugins — assigned during import) */
8110
+ /** Predicted skill identifier, when available */
8111
8111
  identifier: string | null;
8112
8112
  message: string;
8113
8113
  parsedUrl: {
@@ -8173,6 +8173,38 @@ interface PluginPublishData {
8173
8173
  tools?: Record<string, unknown>[];
8174
8174
  version: string;
8175
8175
  }
8176
+ type PluginCategory = 'business' | 'developer' | 'gaming-entertainment' | 'health-wellness' | 'lifestyle' | 'media-generate' | 'news' | 'productivity' | 'science-education' | 'social' | 'stocks-finance' | 'tools' | 'travel-transport' | 'weather' | 'web-search';
8177
+ interface FirstPluginLocalizationInput extends PluginLocalizationInput {
8178
+ description: string;
8179
+ name: string;
8180
+ }
8181
+ interface PublishPluginParams extends Omit<PluginPublishData, 'category' | 'description' | 'localizations'> {
8182
+ /** Category values supported by marketplace navigation */
8183
+ category?: PluginCategory;
8184
+ /** Required source description for the first publication */
8185
+ description: string;
8186
+ /** GitHub repository URL (authenticated user must own it or have push access) */
8187
+ gitUrl: string;
8188
+ /** Owner-declared marketplace identifier */
8189
+ identifier: string;
8190
+ /** A first publication must provide complete rows for any custom localization */
8191
+ localizations?: FirstPluginLocalizationInput[];
8192
+ }
8193
+ interface PublishPluginResponse {
8194
+ action: 'created' | 'updated';
8195
+ identifier: string;
8196
+ message: string;
8197
+ parsedUrl: {
8198
+ fullName: string;
8199
+ owner: string;
8200
+ repo: string;
8201
+ };
8202
+ status: 'processing';
8203
+ success: true;
8204
+ version: string;
8205
+ versionId: number;
8206
+ workflowRunId?: string;
8207
+ }
8176
8208
  /**
8177
8209
  * User Publish Service
8178
8210
  *
@@ -8225,17 +8257,36 @@ declare class UserPublishService extends BaseSDK {
8225
8257
  */
8226
8258
  claimAsset(assetId: number, assetType: 'plugin' | 'skill'): Promise<ClaimAssetResponse>;
8227
8259
  /**
8228
- * Submits a GitHub repository owned by the authenticated user for import as a
8229
- * new marketplace listing (skill or MCP plugin)
8260
+ * Claims ownership of an asset by its public identifier
8261
+ *
8262
+ * Prefer this over {@link claimAsset}: it does not require the caller to
8263
+ * resolve a numeric asset ID through a scan first.
8264
+ *
8265
+ * @param identifier - The public asset identifier
8266
+ * @param assetType - 'plugin' or 'skill'
8267
+ * @returns Promise resolving to the claim result
8268
+ */
8269
+ claimAssetByIdentifier(identifier: string, assetType: 'plugin' | 'skill'): Promise<ClaimAssetResponse>;
8270
+ /**
8271
+ * Submits a GitHub repository the authenticated user owns or can push to for
8272
+ * import as a new skill listing
8230
8273
  *
8231
8274
  * The import runs asynchronously on the server. The user must have a verified
8232
- * GitHub profile and the repository owner must match their GitHub username.
8275
+ * GitHub profile. Organization repositories require push or admin access.
8233
8276
  *
8234
8277
  * @param params - The repository submission parameters
8235
8278
  * @param options - Optional request options (must include authentication)
8236
8279
  * @returns Promise resolving to the submission result
8237
8280
  */
8238
8281
  submitRepo(params: SubmitRepoParams, options?: globalThis.RequestInit): Promise<SubmitRepoResponse>;
8282
+ /**
8283
+ * Publishes an owner-declared MCP plugin and starts repository enrichment
8284
+ *
8285
+ * @param params - Repository URL and lhm.plugin.json content
8286
+ * @param options - Optional request options (must include authentication)
8287
+ * @returns Promise resolving immediately with the plugin identifier and version
8288
+ */
8289
+ publishPlugin(params: PublishPluginParams, options?: globalThis.RequestInit): Promise<PublishPluginResponse>;
8239
8290
  /**
8240
8291
  * Deletes an owned skill permanently
8241
8292
  *
@@ -8542,4 +8593,4 @@ declare function buildTrustedClientPayload(params: {
8542
8593
  workspaceId?: string;
8543
8594
  }): TrustedClientPayload;
8544
8595
 
8545
- 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 GetClientMetadataParams, 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 OrgRef, type OrganizationInfoQuery, type OrganizationInfoResponse, type OrganizationProfile, 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 RevokeTokenRequest, type RunBuildInToolsError, type RunBuildInToolsRequest, type RunBuildInToolsResponse, type RunBuildInToolsSuccessData, type RunCommandParams, SDK_USER_AGENT, SDK_VERSION, type SearchLocalFilesParams, type ShareCredRequest, 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 SubmitRepoParams, type SubmitRepoResponse, type SuccessResponse, type TaskTemplate, type TaskTemplateCategory, type TaskTemplateConnector, type TaskTemplateConnectorReference, type TaskTemplateConnectorSource, type TaskTemplateIcon, type TaskTemplateInterestAreaKey, type TaskTemplateItem, type TaskTemplateLocalizedContent, type TaskTemplateRecommendationQuery, type TaskTemplateRecommendationResponse, 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 UserPluginItem, type UserProfile, type UserSkillItem, VisibilityEnumSchema, type WriteLocalFileParams, buildTrustedClientPayload, createTrustedClientToken, generateNonce, orgRefToPathSegment };
8596
+ 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 FirstPluginLocalizationInput, type FollowListItem, type FollowListResponse, type FollowRequest, type GetAllConnectionsHealthResponse, type GetAuthorizeUrlParams, type GetClientMetadataParams, 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 OrgRef, type OrganizationInfoQuery, type OrganizationInfoResponse, type OrganizationProfile, type OwnAgentGroupListQuery, type OwnAgentListQuery, type PaginationQuery, type PluginCategory, 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 PublishPluginParams, type PublishPluginResponse, type ReadLocalFileParams, type RefreshConnectionResponse, type RefreshTokenRequest, type RegisterUserRequest, type RegisterUserResponse, type RegisteredUserProfile, type RenameLocalFileParams, type ReviewStatus, ReviewStatusEnumSchema, type RevokeConnectionResponse, type RevokeTokenRequest, type RunBuildInToolsError, type RunBuildInToolsRequest, type RunBuildInToolsResponse, type RunBuildInToolsSuccessData, type RunCommandParams, SDK_USER_AGENT, SDK_VERSION, type SearchLocalFilesParams, type ShareCredRequest, 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 SubmitRepoParams, type SubmitRepoResponse, type SuccessResponse, type TaskTemplate, type TaskTemplateCategory, type TaskTemplateConnector, type TaskTemplateConnectorReference, type TaskTemplateConnectorSource, type TaskTemplateIcon, type TaskTemplateInterestAreaKey, type TaskTemplateItem, type TaskTemplateLocalizedContent, type TaskTemplateRecommendationQuery, type TaskTemplateRecommendationResponse, 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 UserPluginItem, type UserProfile, type UserSkillItem, VisibilityEnumSchema, type WriteLocalFileParams, buildTrustedClientPayload, createTrustedClientToken, generateNonce, orgRefToPathSegment };
package/dist/index.mjs CHANGED
@@ -6209,11 +6209,31 @@ var UserPublishService = class extends BaseSDK {
6209
6209
  return result;
6210
6210
  }
6211
6211
  /**
6212
- * Submits a GitHub repository owned by the authenticated user for import as a
6213
- * new marketplace listing (skill or MCP plugin)
6212
+ * Claims ownership of an asset by its public identifier
6213
+ *
6214
+ * Prefer this over {@link claimAsset}: it does not require the caller to
6215
+ * resolve a numeric asset ID through a scan first.
6216
+ *
6217
+ * @param identifier - The public asset identifier
6218
+ * @param assetType - 'plugin' or 'skill'
6219
+ * @returns Promise resolving to the claim result
6220
+ */
6221
+ async claimAssetByIdentifier(identifier, assetType) {
6222
+ log32("Claiming %s with identifier: %s", assetType, identifier);
6223
+ const result = await this.request("/v1/user/claims", {
6224
+ body: JSON.stringify({ assetType, identifier }),
6225
+ headers: { "Content-Type": "application/json" },
6226
+ method: "POST"
6227
+ });
6228
+ log32("Claim result for %s %s: %s", assetType, identifier, result.success);
6229
+ return result;
6230
+ }
6231
+ /**
6232
+ * Submits a GitHub repository the authenticated user owns or can push to for
6233
+ * import as a new skill listing
6214
6234
  *
6215
6235
  * The import runs asynchronously on the server. The user must have a verified
6216
- * GitHub profile and the repository owner must match their GitHub username.
6236
+ * GitHub profile. Organization repositories require push or admin access.
6217
6237
  *
6218
6238
  * @param params - The repository submission parameters
6219
6239
  * @param options - Optional request options (must include authentication)
@@ -6230,6 +6250,24 @@ var UserPublishService = class extends BaseSDK {
6230
6250
  log32("Submit result for %s: %s", params.gitUrl, result.success);
6231
6251
  return result;
6232
6252
  }
6253
+ /**
6254
+ * Publishes an owner-declared MCP plugin and starts repository enrichment
6255
+ *
6256
+ * @param params - Repository URL and lhm.plugin.json content
6257
+ * @param options - Optional request options (must include authentication)
6258
+ * @returns Promise resolving immediately with the plugin identifier and version
6259
+ */
6260
+ async publishPlugin(params, options) {
6261
+ log32("Publishing plugin: %s@%s", params.identifier, params.version);
6262
+ const result = await this.request("/v1/user/plugins", {
6263
+ body: JSON.stringify(params),
6264
+ headers: { "Content-Type": "application/json" },
6265
+ method: "POST",
6266
+ ...options
6267
+ });
6268
+ log32("Published plugin: %s@%s (%s)", result.identifier, result.version, result.status);
6269
+ return result;
6270
+ }
6233
6271
  /**
6234
6272
  * Deletes an owned skill permanently
6235
6273
  *