@lobehub/market-sdk 0.31.0 → 0.31.2

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
@@ -2502,7 +2502,7 @@ interface MarketSkillListQuery {
2502
2502
  * Sort field
2503
2503
  * @default 'createdAt'
2504
2504
  */
2505
- sort?: 'createdAt' | 'forks' | 'installCount' | 'name' | 'relevance' | 'stars' | 'updatedAt' | 'watchers';
2505
+ sort?: 'commentCount' | 'createdAt' | 'forks' | 'installCount' | 'name' | 'ratingAverage' | 'relevance' | 'stars' | 'updatedAt' | 'watchers';
2506
2506
  }
2507
2507
  /**
2508
2508
  * Query parameters for getting skill detail
@@ -2587,6 +2587,10 @@ interface MarketSkillListItem {
2587
2587
  * Category
2588
2588
  */
2589
2589
  category?: string;
2590
+ /**
2591
+ * Number of comments
2592
+ */
2593
+ commentCount: number;
2590
2594
  /**
2591
2595
  * Creation timestamp (ISO string)
2592
2596
  */
@@ -2975,6 +2979,36 @@ interface MarketReportGitHubSkillResponse {
2975
2979
  */
2976
2980
  status: 'exists' | 'queued';
2977
2981
  }
2982
+ /**
2983
+ * Parameters for reporting a skill installation
2984
+ */
2985
+ interface MarketReportSkillInstallParams {
2986
+ /** Error code if installation failed */
2987
+ errorCode?: string;
2988
+ /** Error message if installation failed */
2989
+ errorMessage?: string;
2990
+ /** Skill identifier */
2991
+ identifier: string;
2992
+ /** Installation duration in milliseconds */
2993
+ installDurationMs: number;
2994
+ /** Additional metadata */
2995
+ metadata?: Record<string, any>;
2996
+ /** Platform information */
2997
+ platform?: string;
2998
+ /** Whether the installation was successful */
2999
+ success: boolean;
3000
+ /** Skill version (optional, omit = latest) */
3001
+ version?: string;
3002
+ }
3003
+ /**
3004
+ * Response from reporting a skill installation
3005
+ */
3006
+ interface MarketReportSkillInstallResponse {
3007
+ /** Message about the processing result */
3008
+ message: string;
3009
+ /** Whether the report was successfully recorded */
3010
+ success: boolean;
3011
+ }
2978
3012
  /**
2979
3013
  * Response for skill versions list
2980
3014
  */
@@ -6127,6 +6161,28 @@ declare class MarketSkillService extends BaseSDK {
6127
6161
  * ```
6128
6162
  */
6129
6163
  reportGitHubSkill(params: MarketReportGitHubSkillParams, options?: globalThis.RequestInit): Promise<MarketReportGitHubSkillResponse>;
6164
+ /**
6165
+ * Reports a skill installation attempt
6166
+ *
6167
+ * Submits installation telemetry data including success/failure status,
6168
+ * duration, and optional error information. Used by the CLI after
6169
+ * downloading and extracting a skill package.
6170
+ *
6171
+ * @param params - Installation report parameters
6172
+ * @param options - Optional request options
6173
+ * @returns Promise resolving to the report response
6174
+ *
6175
+ * @example
6176
+ * ```typescript
6177
+ * await sdk.marketSkills.reportSkillInstall({
6178
+ * identifier: 'github.owner.repo',
6179
+ * success: true,
6180
+ * installDurationMs: 1234,
6181
+ * platform: 'darwin-arm64',
6182
+ * });
6183
+ * ```
6184
+ */
6185
+ reportSkillInstall(params: MarketReportSkillInstallParams, options?: globalThis.RequestInit): Promise<MarketReportSkillInstallResponse>;
6130
6186
  /**
6131
6187
  * Submits or updates a rating for a skill
6132
6188
  *
@@ -6156,14 +6212,21 @@ declare class MarketSkillService extends BaseSDK {
6156
6212
  */
6157
6213
  getComments(identifier: string, params?: SkillCommentListQuery, options?: globalThis.RequestInit): Promise<SkillCommentListResponse>;
6158
6214
  /**
6159
- * Creates a comment on a skill
6215
+ * Creates a comment on a skill, optionally with a rating
6160
6216
  *
6161
6217
  * @param identifier - Unique skill identifier
6162
- * @param content - Comment text content
6218
+ * @param data - Comment data with content and optional score
6163
6219
  * @param options - Optional request options
6164
- * @returns Promise resolving to the created comment
6165
- */
6166
- createComment(identifier: string, content: string, options?: globalThis.RequestInit): Promise<SkillCommentItem>;
6220
+ * @returns Promise resolving to the created comment (with optional rating field)
6221
+ */
6222
+ createComment(identifier: string, data: {
6223
+ content: string;
6224
+ score?: number;
6225
+ }, options?: globalThis.RequestInit): Promise<SkillCommentItem & {
6226
+ rating?: {
6227
+ score: number;
6228
+ };
6229
+ }>;
6167
6230
  /**
6168
6231
  * Adds or updates a reaction on a comment
6169
6232
  *
@@ -6726,4 +6789,4 @@ declare function buildTrustedClientPayload(params: {
6726
6789
  userId: string;
6727
6790
  }): TrustedClientPayload;
6728
6791
 
6729
- 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, 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 };
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 };
package/dist/index.mjs CHANGED
@@ -3841,6 +3841,40 @@ var MarketSkillService = class extends BaseSDK {
3841
3841
  log19("GitHub skill reported: %s (status: %s)", result.identifier, result.status);
3842
3842
  return result;
3843
3843
  }
3844
+ /**
3845
+ * Reports a skill installation attempt
3846
+ *
3847
+ * Submits installation telemetry data including success/failure status,
3848
+ * duration, and optional error information. Used by the CLI after
3849
+ * downloading and extracting a skill package.
3850
+ *
3851
+ * @param params - Installation report parameters
3852
+ * @param options - Optional request options
3853
+ * @returns Promise resolving to the report response
3854
+ *
3855
+ * @example
3856
+ * ```typescript
3857
+ * await sdk.marketSkills.reportSkillInstall({
3858
+ * identifier: 'github.owner.repo',
3859
+ * success: true,
3860
+ * installDurationMs: 1234,
3861
+ * platform: 'darwin-arm64',
3862
+ * });
3863
+ * ```
3864
+ */
3865
+ async reportSkillInstall(params, options) {
3866
+ log19("Reporting skill install: %s (success: %s)", params.identifier, params.success);
3867
+ const result = await this.request(
3868
+ "/v1/skills/report/installation",
3869
+ {
3870
+ ...options,
3871
+ body: JSON.stringify(params),
3872
+ method: "POST"
3873
+ }
3874
+ );
3875
+ log19("Skill install reported: %s", result.message);
3876
+ return result;
3877
+ }
3844
3878
  /**
3845
3879
  * Submits or updates a rating for a skill
3846
3880
  *
@@ -3903,20 +3937,20 @@ var MarketSkillService = class extends BaseSDK {
3903
3937
  return result;
3904
3938
  }
3905
3939
  /**
3906
- * Creates a comment on a skill
3940
+ * Creates a comment on a skill, optionally with a rating
3907
3941
  *
3908
3942
  * @param identifier - Unique skill identifier
3909
- * @param content - Comment text content
3943
+ * @param data - Comment data with content and optional score
3910
3944
  * @param options - Optional request options
3911
- * @returns Promise resolving to the created comment
3945
+ * @returns Promise resolving to the created comment (with optional rating field)
3912
3946
  */
3913
- async createComment(identifier, content, options) {
3947
+ async createComment(identifier, data, options) {
3914
3948
  log19("Creating comment on skill %s", identifier);
3915
3949
  const result = await this.request(
3916
3950
  `/v1/skills/${encodeURIComponent(identifier)}/comments`,
3917
3951
  {
3918
3952
  ...options,
3919
- body: JSON.stringify({ content }),
3953
+ body: JSON.stringify(data),
3920
3954
  method: "POST"
3921
3955
  }
3922
3956
  );