@lobehub/market-sdk 0.29.3 → 0.30.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 +236 -18
- package/dist/index.mjs +110 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.d.mts
CHANGED
|
@@ -2409,7 +2409,7 @@ interface MarketSkillListQuery {
|
|
|
2409
2409
|
* Sort field
|
|
2410
2410
|
* @default 'createdAt'
|
|
2411
2411
|
*/
|
|
2412
|
-
sort?: 'createdAt' | '
|
|
2412
|
+
sort?: 'createdAt' | 'forks' | 'installCount' | 'name' | 'stars' | 'updatedAt' | 'watchers';
|
|
2413
2413
|
}
|
|
2414
2414
|
/**
|
|
2415
2415
|
* Query parameters for getting skill detail
|
|
@@ -2503,17 +2503,57 @@ interface MarketSkillListItem {
|
|
|
2503
2503
|
*/
|
|
2504
2504
|
description: string;
|
|
2505
2505
|
/**
|
|
2506
|
-
*
|
|
2506
|
+
* GitHub stats
|
|
2507
2507
|
*/
|
|
2508
|
-
|
|
2508
|
+
github?: {
|
|
2509
|
+
forks?: number;
|
|
2510
|
+
stars?: number;
|
|
2511
|
+
watchers?: number;
|
|
2512
|
+
};
|
|
2513
|
+
/**
|
|
2514
|
+
* Icon URL (GitHub org avatar)
|
|
2515
|
+
*/
|
|
2516
|
+
icon?: string;
|
|
2509
2517
|
/**
|
|
2510
2518
|
* Unique skill identifier
|
|
2511
2519
|
*/
|
|
2512
2520
|
identifier: string;
|
|
2521
|
+
/**
|
|
2522
|
+
* Install/download count
|
|
2523
|
+
*/
|
|
2524
|
+
installCount: number;
|
|
2525
|
+
/**
|
|
2526
|
+
* Whether the skill is featured
|
|
2527
|
+
*/
|
|
2528
|
+
isFeatured: boolean;
|
|
2529
|
+
/**
|
|
2530
|
+
* Whether the skill is validated
|
|
2531
|
+
*/
|
|
2532
|
+
isValidated: boolean;
|
|
2533
|
+
/**
|
|
2534
|
+
* License name
|
|
2535
|
+
*/
|
|
2536
|
+
license?: string;
|
|
2537
|
+
/**
|
|
2538
|
+
* Logo URL
|
|
2539
|
+
*/
|
|
2540
|
+
logo?: string;
|
|
2513
2541
|
/**
|
|
2514
2542
|
* Skill display name
|
|
2515
2543
|
*/
|
|
2516
2544
|
name: string;
|
|
2545
|
+
/**
|
|
2546
|
+
* Average rating
|
|
2547
|
+
*/
|
|
2548
|
+
ratingAvg?: number;
|
|
2549
|
+
/**
|
|
2550
|
+
* Number of ratings
|
|
2551
|
+
*/
|
|
2552
|
+
ratingCount: number;
|
|
2553
|
+
/**
|
|
2554
|
+
* Number of resources
|
|
2555
|
+
*/
|
|
2556
|
+
resourcesCount?: number;
|
|
2517
2557
|
/**
|
|
2518
2558
|
* Tags for discovery
|
|
2519
2559
|
*/
|
|
@@ -2626,6 +2666,10 @@ interface MarketSkillResource {
|
|
|
2626
2666
|
* Version summary for version list
|
|
2627
2667
|
*/
|
|
2628
2668
|
interface MarketSkillVersionSummary {
|
|
2669
|
+
/**
|
|
2670
|
+
* Changelog for this version
|
|
2671
|
+
*/
|
|
2672
|
+
changelog?: string;
|
|
2629
2673
|
/**
|
|
2630
2674
|
* Creation timestamp (ISO string)
|
|
2631
2675
|
*/
|
|
@@ -2634,6 +2678,10 @@ interface MarketSkillVersionSummary {
|
|
|
2634
2678
|
* Whether this is the latest version
|
|
2635
2679
|
*/
|
|
2636
2680
|
isLatest: boolean;
|
|
2681
|
+
/**
|
|
2682
|
+
* Whether this version is validated
|
|
2683
|
+
*/
|
|
2684
|
+
isValidated?: boolean;
|
|
2637
2685
|
/**
|
|
2638
2686
|
* Version string
|
|
2639
2687
|
*/
|
|
@@ -2650,7 +2698,10 @@ interface MarketSkillDetail {
|
|
|
2650
2698
|
/**
|
|
2651
2699
|
* Author information
|
|
2652
2700
|
*/
|
|
2653
|
-
author?:
|
|
2701
|
+
author?: {
|
|
2702
|
+
name: string;
|
|
2703
|
+
url?: string;
|
|
2704
|
+
};
|
|
2654
2705
|
/**
|
|
2655
2706
|
* Category
|
|
2656
2707
|
*/
|
|
@@ -2668,17 +2719,51 @@ interface MarketSkillDetail {
|
|
|
2668
2719
|
*/
|
|
2669
2720
|
description: string;
|
|
2670
2721
|
/**
|
|
2671
|
-
*
|
|
2722
|
+
* GitHub metadata
|
|
2723
|
+
*/
|
|
2724
|
+
github?: {
|
|
2725
|
+
forks?: number;
|
|
2726
|
+
fullName?: string;
|
|
2727
|
+
openIssues?: number;
|
|
2728
|
+
stars?: number;
|
|
2729
|
+
url?: string;
|
|
2730
|
+
watchers?: number;
|
|
2731
|
+
};
|
|
2732
|
+
/**
|
|
2733
|
+
* Homepage URL
|
|
2734
|
+
*/
|
|
2735
|
+
homepage?: string;
|
|
2736
|
+
/**
|
|
2737
|
+
* Icon URL (GitHub org avatar)
|
|
2672
2738
|
*/
|
|
2673
|
-
|
|
2739
|
+
icon?: string;
|
|
2674
2740
|
/**
|
|
2675
2741
|
* Unique skill identifier
|
|
2676
2742
|
*/
|
|
2677
2743
|
identifier: string;
|
|
2678
2744
|
/**
|
|
2679
|
-
*
|
|
2745
|
+
* Install/download count
|
|
2680
2746
|
*/
|
|
2681
|
-
|
|
2747
|
+
installCount: number;
|
|
2748
|
+
/**
|
|
2749
|
+
* Whether the skill is featured
|
|
2750
|
+
*/
|
|
2751
|
+
isFeatured: boolean;
|
|
2752
|
+
/**
|
|
2753
|
+
* Whether the skill is validated
|
|
2754
|
+
*/
|
|
2755
|
+
isValidated: boolean;
|
|
2756
|
+
/**
|
|
2757
|
+
* License information
|
|
2758
|
+
*/
|
|
2759
|
+
license?: {
|
|
2760
|
+
name: string;
|
|
2761
|
+
url?: string;
|
|
2762
|
+
};
|
|
2763
|
+
/**
|
|
2764
|
+
* Logo URL
|
|
2765
|
+
*/
|
|
2766
|
+
logo?: string;
|
|
2682
2767
|
/**
|
|
2683
2768
|
* Complete manifest from SKILL.md
|
|
2684
2769
|
*/
|
|
@@ -2688,21 +2773,27 @@ interface MarketSkillDetail {
|
|
|
2688
2773
|
*/
|
|
2689
2774
|
name: string;
|
|
2690
2775
|
/**
|
|
2691
|
-
*
|
|
2776
|
+
* Overview information
|
|
2692
2777
|
*/
|
|
2693
|
-
|
|
2778
|
+
overview: {
|
|
2779
|
+
summary?: string;
|
|
2780
|
+
};
|
|
2694
2781
|
/**
|
|
2695
|
-
*
|
|
2782
|
+
* Average rating
|
|
2696
2783
|
*/
|
|
2697
|
-
|
|
2784
|
+
ratingAverage?: number;
|
|
2698
2785
|
/**
|
|
2699
|
-
*
|
|
2786
|
+
* Number of ratings
|
|
2700
2787
|
*/
|
|
2701
|
-
|
|
2788
|
+
ratingCount: number;
|
|
2702
2789
|
/**
|
|
2703
|
-
*
|
|
2790
|
+
* GitHub repository URL
|
|
2704
2791
|
*/
|
|
2705
|
-
|
|
2792
|
+
repository?: string;
|
|
2793
|
+
/**
|
|
2794
|
+
* Resource files: path -> metadata
|
|
2795
|
+
*/
|
|
2796
|
+
resources: Record<string, MarketSkillResource>;
|
|
2706
2797
|
/**
|
|
2707
2798
|
* Tags
|
|
2708
2799
|
*/
|
|
@@ -2711,6 +2802,10 @@ interface MarketSkillDetail {
|
|
|
2711
2802
|
* Last update timestamp (ISO string)
|
|
2712
2803
|
*/
|
|
2713
2804
|
updatedAt: string;
|
|
2805
|
+
/**
|
|
2806
|
+
* Validation timestamp (ISO string)
|
|
2807
|
+
*/
|
|
2808
|
+
validatedAt?: string;
|
|
2714
2809
|
/**
|
|
2715
2810
|
* Current version string
|
|
2716
2811
|
*/
|
|
@@ -2737,6 +2832,60 @@ interface MarketSkillCategory {
|
|
|
2737
2832
|
*/
|
|
2738
2833
|
count: number;
|
|
2739
2834
|
}
|
|
2835
|
+
/**
|
|
2836
|
+
* Query parameters for skill categories
|
|
2837
|
+
*/
|
|
2838
|
+
interface MarketSkillCategoryQuery {
|
|
2839
|
+
/**
|
|
2840
|
+
* Locale for localized content (e.g., 'en-US', 'zh-CN')
|
|
2841
|
+
*/
|
|
2842
|
+
locale?: string;
|
|
2843
|
+
/**
|
|
2844
|
+
* Search query to filter skills before counting categories
|
|
2845
|
+
*/
|
|
2846
|
+
q?: string;
|
|
2847
|
+
}
|
|
2848
|
+
/**
|
|
2849
|
+
* Parameters for reporting a GitHub skill
|
|
2850
|
+
*/
|
|
2851
|
+
interface MarketReportGitHubSkillParams {
|
|
2852
|
+
/**
|
|
2853
|
+
* Branch name (optional, defaults to default branch)
|
|
2854
|
+
*/
|
|
2855
|
+
branch?: string;
|
|
2856
|
+
/**
|
|
2857
|
+
* GitHub repository URL
|
|
2858
|
+
*/
|
|
2859
|
+
gitUrl: string;
|
|
2860
|
+
}
|
|
2861
|
+
/**
|
|
2862
|
+
* Response from reporting a GitHub skill
|
|
2863
|
+
*/
|
|
2864
|
+
interface MarketReportGitHubSkillResponse {
|
|
2865
|
+
/**
|
|
2866
|
+
* Skill identifier
|
|
2867
|
+
*/
|
|
2868
|
+
identifier: string;
|
|
2869
|
+
/**
|
|
2870
|
+
* Status message
|
|
2871
|
+
*/
|
|
2872
|
+
message: string;
|
|
2873
|
+
/**
|
|
2874
|
+
* Status of the report
|
|
2875
|
+
* - 'queued': Import request has been queued
|
|
2876
|
+
* - 'exists': Skill already exists in the marketplace
|
|
2877
|
+
*/
|
|
2878
|
+
status: 'exists' | 'queued';
|
|
2879
|
+
}
|
|
2880
|
+
/**
|
|
2881
|
+
* Response for skill versions list
|
|
2882
|
+
*/
|
|
2883
|
+
interface MarketSkillVersionsResponse {
|
|
2884
|
+
/**
|
|
2885
|
+
* List of version summaries
|
|
2886
|
+
*/
|
|
2887
|
+
data: MarketSkillVersionSummary[];
|
|
2888
|
+
}
|
|
2740
2889
|
|
|
2741
2890
|
/**
|
|
2742
2891
|
* User-related type definitions for LobeHub Market SDK
|
|
@@ -5691,17 +5840,23 @@ declare class MarketSkillService extends BaseSDK {
|
|
|
5691
5840
|
*
|
|
5692
5841
|
* Returns a list of categories along with the number of skills
|
|
5693
5842
|
* in each category. Useful for building category filters.
|
|
5843
|
+
* Supports optional search filtering via 'q' parameter and locale specification.
|
|
5694
5844
|
*
|
|
5845
|
+
* @param params - Query parameters for filtering categories
|
|
5695
5846
|
* @param options - Optional request options
|
|
5696
5847
|
* @returns Promise resolving to an array of categories with counts
|
|
5697
5848
|
*
|
|
5698
5849
|
* @example
|
|
5699
5850
|
* ```typescript
|
|
5851
|
+
* // Get all categories
|
|
5700
5852
|
* const categories = await sdk.marketSkills.getCategories();
|
|
5701
5853
|
* // [{ category: 'development', count: 25 }, { category: 'productivity', count: 18 }, ...]
|
|
5854
|
+
*
|
|
5855
|
+
* // Get categories with search filter
|
|
5856
|
+
* const filtered = await sdk.marketSkills.getCategories({ q: 'code' });
|
|
5702
5857
|
* ```
|
|
5703
5858
|
*/
|
|
5704
|
-
getCategories(options?: globalThis.RequestInit): Promise<MarketSkillCategory[]>;
|
|
5859
|
+
getCategories(params?: MarketSkillCategoryQuery, options?: globalThis.RequestInit): Promise<MarketSkillCategory[]>;
|
|
5705
5860
|
/**
|
|
5706
5861
|
* Retrieves all published skill identifiers
|
|
5707
5862
|
*
|
|
@@ -5724,6 +5879,69 @@ declare class MarketSkillService extends BaseSDK {
|
|
|
5724
5879
|
* @returns Promise resolving to true if skill exists, false otherwise
|
|
5725
5880
|
*/
|
|
5726
5881
|
checkSkillExists(identifier: string, options?: globalThis.RequestInit): Promise<boolean>;
|
|
5882
|
+
/**
|
|
5883
|
+
* Retrieves all versions of a skill
|
|
5884
|
+
*
|
|
5885
|
+
* Returns a list of all versions for a specific skill,
|
|
5886
|
+
* including version string, creation date, and whether it's the latest version.
|
|
5887
|
+
*
|
|
5888
|
+
* @param identifier - Unique skill identifier
|
|
5889
|
+
* @param options - Optional request options
|
|
5890
|
+
* @returns Promise resolving to an array of version summaries
|
|
5891
|
+
*
|
|
5892
|
+
* @example
|
|
5893
|
+
* ```typescript
|
|
5894
|
+
* const versions = await sdk.marketSkills.getSkillVersions('github.owner.repo');
|
|
5895
|
+
* // [{ version: '1.0.0', createdAt: '...', isLatest: true }, ...]
|
|
5896
|
+
* ```
|
|
5897
|
+
*/
|
|
5898
|
+
getSkillVersions(identifier: string, options?: globalThis.RequestInit): Promise<MarketSkillVersionSummary[]>;
|
|
5899
|
+
/**
|
|
5900
|
+
* Retrieves detailed information about a specific skill version
|
|
5901
|
+
*
|
|
5902
|
+
* Returns complete skill information for a specific version,
|
|
5903
|
+
* including manifest, content, resources, and version history.
|
|
5904
|
+
*
|
|
5905
|
+
* @param identifier - Unique skill identifier
|
|
5906
|
+
* @param version - Version string (e.g., '1.0.0')
|
|
5907
|
+
* @param params - Query parameters for locale
|
|
5908
|
+
* @param options - Optional request options
|
|
5909
|
+
* @returns Promise resolving to the skill detail for the specified version
|
|
5910
|
+
*
|
|
5911
|
+
* @example
|
|
5912
|
+
* ```typescript
|
|
5913
|
+
* const skill = await sdk.marketSkills.getSkillVersion('github.owner.repo', '1.0.0');
|
|
5914
|
+
* ```
|
|
5915
|
+
*/
|
|
5916
|
+
getSkillVersion(identifier: string, version: string, params?: {
|
|
5917
|
+
locale?: string;
|
|
5918
|
+
}, options?: globalThis.RequestInit): Promise<MarketSkillDetail>;
|
|
5919
|
+
/**
|
|
5920
|
+
* Reports a GitHub repository for skill import
|
|
5921
|
+
*
|
|
5922
|
+
* Submits a GitHub repository URL for async skill import.
|
|
5923
|
+
* The import will be processed in the background and the skill
|
|
5924
|
+
* will be available once the import completes.
|
|
5925
|
+
*
|
|
5926
|
+
* @param params - Report parameters containing gitUrl and optional branch
|
|
5927
|
+
* @param options - Optional request options
|
|
5928
|
+
* @returns Promise resolving to the report response with status
|
|
5929
|
+
*
|
|
5930
|
+
* @example
|
|
5931
|
+
* ```typescript
|
|
5932
|
+
* // Report a skill for import
|
|
5933
|
+
* const result = await sdk.marketSkills.reportGitHubSkill({
|
|
5934
|
+
* gitUrl: 'https://github.com/owner/repo'
|
|
5935
|
+
* });
|
|
5936
|
+
*
|
|
5937
|
+
* if (result.status === 'queued') {
|
|
5938
|
+
* console.log('Import queued:', result.identifier);
|
|
5939
|
+
* } else if (result.status === 'exists') {
|
|
5940
|
+
* console.log('Skill already exists:', result.identifier);
|
|
5941
|
+
* }
|
|
5942
|
+
* ```
|
|
5943
|
+
*/
|
|
5944
|
+
reportGitHubSkill(params: MarketReportGitHubSkillParams, options?: globalThis.RequestInit): Promise<MarketReportGitHubSkillResponse>;
|
|
5727
5945
|
}
|
|
5728
5946
|
|
|
5729
5947
|
/**
|
|
@@ -6258,4 +6476,4 @@ declare function buildTrustedClientPayload(params: {
|
|
|
6258
6476
|
userId: string;
|
|
6259
6477
|
}): TrustedClientPayload;
|
|
6260
6478
|
|
|
6261
|
-
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 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, MarketSDK, type MarketSDKOptions, type MarketSkillAuthor, type MarketSkillCategory, type MarketSkillDetail, type MarketSkillDetailQuery, type MarketSkillGitHubMeta, type MarketSkillListItem, type MarketSkillListQuery, type MarketSkillListResponse, type MarketSkillManifest, type MarketSkillResource, type MarketSkillVersionSummary, 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 SkillErrorResponse, type SkillProviderInfo, type SkillProviderStatus, type SkillTool, StatusEnumSchema, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SuccessResponse, type ToggleLikeResponse, type TrustedClientPayload, type UnclaimedPluginItem, type UpdateMemberAgent, type UpdateUserInfoRequest, type UpdateUserInfoResponse, type UserAgentGroupItem, type UserAgentItem, type UserInfoQuery, type UserInfoResponse, type UserProfile, VisibilityEnumSchema, type WriteLocalFileParams, buildTrustedClientPayload, createTrustedClientToken, generateNonce };
|
|
6479
|
+
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 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 SkillErrorResponse, type SkillProviderInfo, type SkillProviderStatus, type SkillTool, StatusEnumSchema, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SuccessResponse, type ToggleLikeResponse, type TrustedClientPayload, type UnclaimedPluginItem, 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
|
@@ -3508,11 +3508,13 @@ var MarketSkillService = class extends BaseSDK {
|
|
|
3508
3508
|
const queryParams = { ...params, locale };
|
|
3509
3509
|
const queryString = this.buildQueryString(queryParams);
|
|
3510
3510
|
log18("Getting skill list: %O", queryParams);
|
|
3511
|
-
const result = await this.request(
|
|
3512
|
-
|
|
3513
|
-
|
|
3511
|
+
const result = await this.request(`/v1/skills${queryString}`, options);
|
|
3512
|
+
log18(
|
|
3513
|
+
"Retrieved %d skills (page %d/%d)",
|
|
3514
|
+
result.items.length,
|
|
3515
|
+
result.currentPage,
|
|
3516
|
+
result.totalPages
|
|
3514
3517
|
);
|
|
3515
|
-
log18("Retrieved %d skills (page %d/%d)", result.items.length, result.currentPage, result.totalPages);
|
|
3516
3518
|
return result;
|
|
3517
3519
|
}
|
|
3518
3520
|
/**
|
|
@@ -3641,19 +3643,31 @@ var MarketSkillService = class extends BaseSDK {
|
|
|
3641
3643
|
*
|
|
3642
3644
|
* Returns a list of categories along with the number of skills
|
|
3643
3645
|
* in each category. Useful for building category filters.
|
|
3646
|
+
* Supports optional search filtering via 'q' parameter and locale specification.
|
|
3644
3647
|
*
|
|
3648
|
+
* @param params - Query parameters for filtering categories
|
|
3645
3649
|
* @param options - Optional request options
|
|
3646
3650
|
* @returns Promise resolving to an array of categories with counts
|
|
3647
3651
|
*
|
|
3648
3652
|
* @example
|
|
3649
3653
|
* ```typescript
|
|
3654
|
+
* // Get all categories
|
|
3650
3655
|
* const categories = await sdk.marketSkills.getCategories();
|
|
3651
3656
|
* // [{ category: 'development', count: 25 }, { category: 'productivity', count: 18 }, ...]
|
|
3657
|
+
*
|
|
3658
|
+
* // Get categories with search filter
|
|
3659
|
+
* const filtered = await sdk.marketSkills.getCategories({ q: 'code' });
|
|
3652
3660
|
* ```
|
|
3653
3661
|
*/
|
|
3654
|
-
async getCategories(options) {
|
|
3655
|
-
|
|
3656
|
-
const
|
|
3662
|
+
async getCategories(params = {}, options) {
|
|
3663
|
+
const locale = params.locale || this.defaultLocale;
|
|
3664
|
+
const queryParams = { ...params, locale };
|
|
3665
|
+
const queryString = this.buildQueryString(queryParams);
|
|
3666
|
+
log18("Getting skill categories: %O", queryParams);
|
|
3667
|
+
const result = await this.request(
|
|
3668
|
+
`/v1/skills/categories${queryString}`,
|
|
3669
|
+
options
|
|
3670
|
+
);
|
|
3657
3671
|
log18("Retrieved %d categories", result.length);
|
|
3658
3672
|
return result;
|
|
3659
3673
|
}
|
|
@@ -3694,6 +3708,95 @@ var MarketSkillService = class extends BaseSDK {
|
|
|
3694
3708
|
return false;
|
|
3695
3709
|
}
|
|
3696
3710
|
}
|
|
3711
|
+
/**
|
|
3712
|
+
* Retrieves all versions of a skill
|
|
3713
|
+
*
|
|
3714
|
+
* Returns a list of all versions for a specific skill,
|
|
3715
|
+
* including version string, creation date, and whether it's the latest version.
|
|
3716
|
+
*
|
|
3717
|
+
* @param identifier - Unique skill identifier
|
|
3718
|
+
* @param options - Optional request options
|
|
3719
|
+
* @returns Promise resolving to an array of version summaries
|
|
3720
|
+
*
|
|
3721
|
+
* @example
|
|
3722
|
+
* ```typescript
|
|
3723
|
+
* const versions = await sdk.marketSkills.getSkillVersions('github.owner.repo');
|
|
3724
|
+
* // [{ version: '1.0.0', createdAt: '...', isLatest: true }, ...]
|
|
3725
|
+
* ```
|
|
3726
|
+
*/
|
|
3727
|
+
async getSkillVersions(identifier, options) {
|
|
3728
|
+
log18("Getting skill versions: %s", identifier);
|
|
3729
|
+
const result = await this.request(
|
|
3730
|
+
`/v1/skills/${encodeURIComponent(identifier)}/versions`,
|
|
3731
|
+
options
|
|
3732
|
+
);
|
|
3733
|
+
log18("Retrieved %d versions for skill %s", result.data.length, identifier);
|
|
3734
|
+
return result.data;
|
|
3735
|
+
}
|
|
3736
|
+
/**
|
|
3737
|
+
* Retrieves detailed information about a specific skill version
|
|
3738
|
+
*
|
|
3739
|
+
* Returns complete skill information for a specific version,
|
|
3740
|
+
* including manifest, content, resources, and version history.
|
|
3741
|
+
*
|
|
3742
|
+
* @param identifier - Unique skill identifier
|
|
3743
|
+
* @param version - Version string (e.g., '1.0.0')
|
|
3744
|
+
* @param params - Query parameters for locale
|
|
3745
|
+
* @param options - Optional request options
|
|
3746
|
+
* @returns Promise resolving to the skill detail for the specified version
|
|
3747
|
+
*
|
|
3748
|
+
* @example
|
|
3749
|
+
* ```typescript
|
|
3750
|
+
* const skill = await sdk.marketSkills.getSkillVersion('github.owner.repo', '1.0.0');
|
|
3751
|
+
* ```
|
|
3752
|
+
*/
|
|
3753
|
+
async getSkillVersion(identifier, version, params = {}, options) {
|
|
3754
|
+
const locale = params.locale || this.defaultLocale;
|
|
3755
|
+
const queryParams = { locale };
|
|
3756
|
+
const queryString = this.buildQueryString(queryParams);
|
|
3757
|
+
log18("Getting skill version: %s@%s", identifier, version);
|
|
3758
|
+
const result = await this.request(
|
|
3759
|
+
`/v1/skills/${encodeURIComponent(identifier)}/versions/${encodeURIComponent(version)}${queryString}`,
|
|
3760
|
+
options
|
|
3761
|
+
);
|
|
3762
|
+
log18("Skill version detail retrieved: %s@%s", identifier, version);
|
|
3763
|
+
return result;
|
|
3764
|
+
}
|
|
3765
|
+
/**
|
|
3766
|
+
* Reports a GitHub repository for skill import
|
|
3767
|
+
*
|
|
3768
|
+
* Submits a GitHub repository URL for async skill import.
|
|
3769
|
+
* The import will be processed in the background and the skill
|
|
3770
|
+
* will be available once the import completes.
|
|
3771
|
+
*
|
|
3772
|
+
* @param params - Report parameters containing gitUrl and optional branch
|
|
3773
|
+
* @param options - Optional request options
|
|
3774
|
+
* @returns Promise resolving to the report response with status
|
|
3775
|
+
*
|
|
3776
|
+
* @example
|
|
3777
|
+
* ```typescript
|
|
3778
|
+
* // Report a skill for import
|
|
3779
|
+
* const result = await sdk.marketSkills.reportGitHubSkill({
|
|
3780
|
+
* gitUrl: 'https://github.com/owner/repo'
|
|
3781
|
+
* });
|
|
3782
|
+
*
|
|
3783
|
+
* if (result.status === 'queued') {
|
|
3784
|
+
* console.log('Import queued:', result.identifier);
|
|
3785
|
+
* } else if (result.status === 'exists') {
|
|
3786
|
+
* console.log('Skill already exists:', result.identifier);
|
|
3787
|
+
* }
|
|
3788
|
+
* ```
|
|
3789
|
+
*/
|
|
3790
|
+
async reportGitHubSkill(params, options) {
|
|
3791
|
+
log18("Reporting GitHub skill: %s", params.gitUrl);
|
|
3792
|
+
const result = await this.request("/v1/skills/report/github", {
|
|
3793
|
+
...options,
|
|
3794
|
+
body: JSON.stringify(params),
|
|
3795
|
+
method: "POST"
|
|
3796
|
+
});
|
|
3797
|
+
log18("GitHub skill reported: %s (status: %s)", result.identifier, result.status);
|
|
3798
|
+
return result;
|
|
3799
|
+
}
|
|
3697
3800
|
};
|
|
3698
3801
|
|
|
3699
3802
|
// src/market/services/UserService.ts
|