@lobehub/market-sdk 0.31.2 → 0.31.3

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
@@ -1560,6 +1560,20 @@ interface MarketSDKOptions {
1560
1560
  * ```
1561
1561
  */
1562
1562
  trustedClientToken?: string;
1563
+ /**
1564
+ * Custom User-Agent string for identifying the client.
1565
+ *
1566
+ * If provided, this will be used instead of the default SDK User-Agent.
1567
+ * Useful for CLI tools or other clients that want to identify themselves.
1568
+ *
1569
+ * @example
1570
+ * ```typescript
1571
+ * const sdk = new MarketSDK({
1572
+ * userAgent: 'LobeHub-Market-CLI/1.0.0',
1573
+ * });
1574
+ * ```
1575
+ */
1576
+ userAgent?: string;
1563
1577
  }
1564
1578
  /**
1565
1579
  * Shared token state for SDK instances
@@ -2968,10 +2982,18 @@ interface MarketReportGitHubSkillResponse {
2968
2982
  * Skill identifier
2969
2983
  */
2970
2984
  identifier: string;
2985
+ /**
2986
+ * Skill identifiers (present when reporting a repository with multiple skills)
2987
+ */
2988
+ identifiers?: string[];
2971
2989
  /**
2972
2990
  * Status message
2973
2991
  */
2974
2992
  message: string;
2993
+ /**
2994
+ * Number of queued imports
2995
+ */
2996
+ queuedCount?: number;
2975
2997
  /**
2976
2998
  * Status of the report
2977
2999
  * - 'queued': Import request has been queued
@@ -6716,6 +6738,18 @@ declare class MarketAPIError extends Error {
6716
6738
  toJSON(): any;
6717
6739
  }
6718
6740
 
6741
+ /**
6742
+ * SDK Version
6743
+ *
6744
+ * This version should be kept in sync with package.json version.
6745
+ * It is used for User-Agent header to identify SDK requests.
6746
+ */
6747
+ declare const SDK_VERSION = "0.31.3";
6748
+ /**
6749
+ * SDK User-Agent string
6750
+ */
6751
+ declare const SDK_USER_AGENT = "LobeHub-Market-SDK/0.31.3";
6752
+
6719
6753
  /**
6720
6754
  * Trusted Client Token Utilities
6721
6755
  *
@@ -6789,4 +6823,4 @@ declare function buildTrustedClientPayload(params: {
6789
6823
  userId: string;
6790
6824
  }): TrustedClientPayload;
6791
6825
 
6792
- 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 CreateMemberAgent, 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 GetSkillStatusResponse, type GetSkillToolResponse, type GlobLocalFilesParams, type GrepContentParams, type InteractionTargetType, type KillCommandParams, type LikeListResponse, type LikeQuery, type LikeRequest, type ListConnectProvidersResponse, type ListConnectionsResponse, 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 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 PluginI18nImportParams, type PluginI18nImportResponse, type PluginItem, type PluginListResponse, type PluginLocalization, type PluginQueryParams, 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, type SearchLocalFilesParams, type SharedTokenState, type SkillCallParams, type SkillCommentAuthor, type SkillCommentItem, type SkillCommentListQuery, type SkillCommentListResponse, type SkillErrorResponse, 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 UpdateMemberAgent, type UpdateUserInfoRequest, type UpdateUserInfoResponse, type UserAgentGroupItem, type UserAgentItem, type UserInfoQuery, type UserInfoResponse, type UserProfile, VisibilityEnumSchema, type WriteLocalFileParams, buildTrustedClientPayload, createTrustedClientToken, generateNonce };
6826
+ 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 CreateMemberAgent, 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 GetSkillStatusResponse, type GetSkillToolResponse, type GlobLocalFilesParams, type GrepContentParams, type InteractionTargetType, type KillCommandParams, type LikeListResponse, type LikeQuery, type LikeRequest, type ListConnectProvidersResponse, type ListConnectionsResponse, 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 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 PluginI18nImportParams, type PluginI18nImportResponse, type PluginItem, type PluginListResponse, type PluginLocalization, type PluginQueryParams, 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 SkillCommentItem, type SkillCommentListQuery, type SkillCommentListResponse, type SkillErrorResponse, 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 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
@@ -49,6 +49,10 @@ var MarketAPIError = class _MarketAPIError extends Error {
49
49
  }
50
50
  };
51
51
 
52
+ // src/core/version.ts
53
+ var SDK_VERSION = "0.31.3";
54
+ var SDK_USER_AGENT = `LobeHub-Market-SDK/${SDK_VERSION}`;
55
+
52
56
  // src/core/BaseSDK.ts
53
57
  var log = debug("lobe-market-sdk:core");
54
58
  var BaseSDK = class {
@@ -69,14 +73,16 @@ var BaseSDK = class {
69
73
  this.clientSecret = options.clientSecret;
70
74
  this.sharedTokenState = sharedTokenState;
71
75
  const apiKey = options.apiKey || process.env.MARKET_API_KEY;
76
+ const userAgent = options.userAgent || SDK_USER_AGENT;
72
77
  if (sharedHeaders) {
73
78
  this.headers = sharedHeaders;
74
79
  log("Using shared headers object");
75
80
  } else {
76
81
  this.headers = {
77
- "Content-Type": "application/json"
82
+ "Content-Type": "application/json",
83
+ "User-Agent": userAgent
78
84
  };
79
- log("Created new headers object");
85
+ log("Created new headers object with User-Agent: %s", userAgent);
80
86
  }
81
87
  if (apiKey) {
82
88
  this.headers.Authorization = `Bearer ${apiKey}`;
@@ -4715,6 +4721,8 @@ export {
4715
4721
  MarketAdmin,
4716
4722
  MarketSDK,
4717
4723
  ReviewStatusEnumSchema,
4724
+ SDK_USER_AGENT,
4725
+ SDK_VERSION,
4718
4726
  StatusEnumSchema,
4719
4727
  VisibilityEnumSchema,
4720
4728
  buildTrustedClientPayload,