@lobehub/market-sdk 0.31.2 → 0.31.4

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
@@ -245,6 +245,8 @@ interface UnclaimedPluginItem {
245
245
  * Represents the full agent profile as returned by the API
246
246
  */
247
247
  interface AgentProfileEntity {
248
+ /** Agent avatar (emoji or URL) */
249
+ avatar: string;
248
250
  /** M2M client ID */
249
251
  clientId: string | null;
250
252
  /** Number of comments on the agent */
@@ -287,6 +289,8 @@ interface AgentProfileEntity {
287
289
  safetyCheck: string | null;
288
290
  /** Publication status */
289
291
  status: string;
292
+ /** Self-descriptive tags assigned by the agent */
293
+ tags: string[];
290
294
  /** Last update timestamp */
291
295
  updatedAt: string;
292
296
  /** Visibility level */
@@ -311,6 +315,8 @@ interface UpdateAgentProfileRequest {
311
315
  avatar?: string;
312
316
  /** Agent display name (max 255 chars) */
313
317
  name?: string;
318
+ /** Self-descriptive tags assigned by the agent */
319
+ tags?: string[];
314
320
  }
315
321
  /**
316
322
  * Update Agent Profile Response
@@ -1560,6 +1566,20 @@ interface MarketSDKOptions {
1560
1566
  * ```
1561
1567
  */
1562
1568
  trustedClientToken?: string;
1569
+ /**
1570
+ * Custom User-Agent string for identifying the client.
1571
+ *
1572
+ * If provided, this will be used instead of the default SDK User-Agent.
1573
+ * Useful for CLI tools or other clients that want to identify themselves.
1574
+ *
1575
+ * @example
1576
+ * ```typescript
1577
+ * const sdk = new MarketSDK({
1578
+ * userAgent: 'LobeHub-Market-CLI/1.0.0',
1579
+ * });
1580
+ * ```
1581
+ */
1582
+ userAgent?: string;
1563
1583
  }
1564
1584
  /**
1565
1585
  * Shared token state for SDK instances
@@ -2968,10 +2988,18 @@ interface MarketReportGitHubSkillResponse {
2968
2988
  * Skill identifier
2969
2989
  */
2970
2990
  identifier: string;
2991
+ /**
2992
+ * Skill identifiers (present when reporting a repository with multiple skills)
2993
+ */
2994
+ identifiers?: string[];
2971
2995
  /**
2972
2996
  * Status message
2973
2997
  */
2974
2998
  message: string;
2999
+ /**
3000
+ * Number of queued imports
3001
+ */
3002
+ queuedCount?: number;
2975
3003
  /**
2976
3004
  * Status of the report
2977
3005
  * - 'queued': Import request has been queued
@@ -4811,10 +4839,10 @@ declare class AgentProfileService extends BaseSDK {
4811
4839
  /**
4812
4840
  * Updates the current agent's display information
4813
4841
  *
4814
- * Allows updating the agent's name and avatar.
4842
+ * Allows updating the agent's name, avatar, and tags.
4815
4843
  * Requires M2M authentication.
4816
4844
  *
4817
- * @param data - The profile fields to update (name, avatar)
4845
+ * @param data - The profile fields to update (name, avatar, tags)
4818
4846
  * @param options - Optional request options
4819
4847
  * @returns Promise resolving to the updated agent profile response
4820
4848
  */
@@ -6716,6 +6744,18 @@ declare class MarketAPIError extends Error {
6716
6744
  toJSON(): any;
6717
6745
  }
6718
6746
 
6747
+ /**
6748
+ * SDK Version
6749
+ *
6750
+ * This version should be kept in sync with package.json version.
6751
+ * It is used for User-Agent header to identify SDK requests.
6752
+ */
6753
+ declare const SDK_VERSION = "0.31.3";
6754
+ /**
6755
+ * SDK User-Agent string
6756
+ */
6757
+ declare const SDK_USER_AGENT = "LobeHub-Market-SDK/0.31.3";
6758
+
6719
6759
  /**
6720
6760
  * Trusted Client Token Utilities
6721
6761
  *
@@ -6789,4 +6829,4 @@ declare function buildTrustedClientPayload(params: {
6789
6829
  userId: string;
6790
6830
  }): TrustedClientPayload;
6791
6831
 
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 };
6832
+ 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}`;
@@ -1630,10 +1636,10 @@ var AgentProfileService = class extends BaseSDK {
1630
1636
  /**
1631
1637
  * Updates the current agent's display information
1632
1638
  *
1633
- * Allows updating the agent's name and avatar.
1639
+ * Allows updating the agent's name, avatar, and tags.
1634
1640
  * Requires M2M authentication.
1635
1641
  *
1636
- * @param data - The profile fields to update (name, avatar)
1642
+ * @param data - The profile fields to update (name, avatar, tags)
1637
1643
  * @param options - Optional request options
1638
1644
  * @returns Promise resolving to the updated agent profile response
1639
1645
  */
@@ -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,