@lobehub/market-sdk 0.32.1 → 0.33.0

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
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { AgentItem, UserCredSummary, MarketItemBase, PluginConnectionType, InstallFailureAnalysisQuery, InstallFailureAnalysis, RangeQuery, RangeStats, TopPluginsQuery, TopPlugin, PluginManifest, AdminPluginItem, AdminPluginItemDetail, PluginVersion, PluginVersionLocalization, AdminDeploymentOption, InstallationDetails, SystemDependency, IncompleteI18nPlugin, CreateSkillCollectionRequest, AdminSkillCollectionDetail, AdminSkillCollectionListQuery, AdminSkillCollectionListResponse, BatchUpsertSkillCollectionLocalizationsRequest, SkillCollectionLocalizationBatchResponse, SkillCollectionLocalization, UpdateSkillCollectionRequest, UpsertSkillCollectionLocalizationRequest, AgentEventRequest, SkillCredStatus, InjectCredsRequest, InjectCredsResponse, InjectCredsForSkillRequest, InjectCredsForSkillResponse, CategoryListQuery, CategoryItem, PluginItemDetail, InstallReportRequest, InstallReportResponse, CallReportRequest, CallReportResponse, PluginEventRequest, CloudGatewayRequest, CloudGatewayResponse } from '@lobehub/market-types';
2
+ import { AgentItem, UserCredSummary, MarketItemBase, PluginConnectionType, InstallFailureAnalysisQuery, InstallFailureAnalysis, RangeQuery, RangeStats, TopPluginsQuery, TopPlugin, PluginManifest, AdminPluginItem, AdminPluginItemDetail, PluginVersion, PluginVersionLocalization, AdminDeploymentOption, InstallationDetails, SystemDependency, IncompleteI18nPlugin, CreateSkillCollectionRequest, AdminSkillCollectionDetail, AdminSkillCollectionListQuery, AdminSkillCollectionListResponse, BatchUpsertSkillCollectionLocalizationsRequest, SkillCollectionLocalizationBatchResponse, SkillCollectionLocalization, UpdateSkillCollectionRequest, UpsertSkillCollectionLocalizationRequest, SitemapResponse, AgentEventRequest, SkillCredStatus, InjectCredsRequest, InjectCredsResponse, InjectCredsForSkillRequest, InjectCredsForSkillResponse, CategoryListQuery, CategoryItem, PluginItemDetail, InstallReportRequest, InstallReportResponse, CallReportRequest, CallReportResponse, PluginEventRequest, CloudGatewayRequest, CloudGatewayResponse } from '@lobehub/market-types';
3
3
  export * from '@lobehub/market-types';
4
4
  export { CategoryItem, CategoryListQuery, CategoryListResponse, CredType, InjectCredsForSkillRequest, InjectCredsForSkillResponse, InjectCredsRequest, InjectCredsResponse, InjectedFileInfo, SkillCredStatus, UserCredSummary } from '@lobehub/market-types';
5
5
  import { JSONSchema7 } from 'json-schema';
@@ -2540,6 +2540,13 @@ interface SkillCallParams {
2540
2540
  * Name of the tool to call
2541
2541
  */
2542
2542
  tool: string;
2543
+ /**
2544
+ * Topic ID for CLI session isolation (required for CLI-based providers like github)
2545
+ *
2546
+ * Used to isolate CLI environments between different conversations/sessions.
2547
+ * Each unique topicId gets its own sandbox environment.
2548
+ */
2549
+ topicId?: string;
2543
2550
  }
2544
2551
  /**
2545
2552
  * Summary information about a skill provider
@@ -5210,6 +5217,7 @@ declare class AgentService extends BaseSDK {
5210
5217
  * full agent metadata. This is useful for clients that need to know which
5211
5218
  * agents are available without fetching complete agent information.
5212
5219
  *
5220
+ * @deprecated Use {@link AgentService.getSitemap} instead.
5213
5221
  * @param options - Optional request options
5214
5222
  * @returns Promise resolving to an array containing identifiers array and last modified time
5215
5223
  */
@@ -5217,6 +5225,16 @@ declare class AgentService extends BaseSDK {
5217
5225
  id: string;
5218
5226
  lastModified: string;
5219
5227
  }[]>;
5228
+ /**
5229
+ * Retrieves a paginated list of published agent identifiers for sitemaps
5230
+ *
5231
+ * @param params - Pagination (`page` defaults to 1, `pageSize` defaults to 200, max 500 server-side)
5232
+ * @param options - Optional request options
5233
+ */
5234
+ getSitemap(params?: {
5235
+ page?: number;
5236
+ pageSize?: number;
5237
+ }, options?: globalThis.RequestInit): Promise<SitemapResponse>;
5220
5238
  /**
5221
5239
  * Retrieves agent categories and their counts
5222
5240
  *
@@ -5737,6 +5755,15 @@ declare class AuthService extends BaseSDK {
5737
5755
  * const result = await sdk.skills.callTool('linear', {
5738
5756
  * tool: 'create_issue',
5739
5757
  * args: { title: 'New issue', team: 'Engineering' }
5758
+ * ...
5759
+ * }});
5760
+ * ```
5761
+ * @example
5762
+ * ```typescript
5763
+ * const result = await sdk.skills.callTool('github', {
5764
+ * tool: 'create_issue',
5765
+ * args: { title: 'New issue', team: 'Engineering' }
5766
+ * ...
5740
5767
  * });
5741
5768
  * ```
5742
5769
  */
@@ -6164,12 +6191,23 @@ declare class PluginsService extends BaseSDK {
6164
6191
  * full plugin metadata. This is useful for clients that need to know which
6165
6192
  * plugins are available without fetching complete plugin information.
6166
6193
  *
6194
+ * @deprecated Use {@link PluginsService.getSitemap} instead.
6167
6195
  * @returns Promise resolving to an array containing identifiers array and last modified time
6168
6196
  */
6169
6197
  getPublishedIdentifiers(options?: globalThis.RequestInit): Promise<{
6170
6198
  identifier: string;
6171
6199
  lastModified: string;
6172
6200
  }[]>;
6201
+ /**
6202
+ * Retrieves a paginated list of published plugin (MCP) identifiers for sitemaps
6203
+ *
6204
+ * @param params - Pagination (`page` defaults to 1, `pageSize` defaults to 200, max 500 server-side)
6205
+ * @param options - Optional request options
6206
+ */
6207
+ getSitemap(params?: {
6208
+ page?: number;
6209
+ pageSize?: number;
6210
+ }, options?: globalThis.RequestInit): Promise<SitemapResponse>;
6173
6211
  /**
6174
6212
  * Retrieves the manifest for a specific plugin
6175
6213
  *
@@ -6720,6 +6758,7 @@ declare class MarketSkillService extends BaseSDK {
6720
6758
  * without full metadata. Useful for sitemap generation or
6721
6759
  * knowing which skills are available.
6722
6760
  *
6761
+ * @deprecated Use {@link MarketSkillService.getSitemap} instead.
6723
6762
  * @param options - Optional request options
6724
6763
  * @returns Promise resolving to an array of identifiers with last modified times
6725
6764
  */
@@ -6727,6 +6766,16 @@ declare class MarketSkillService extends BaseSDK {
6727
6766
  identifier: string;
6728
6767
  lastModified: string;
6729
6768
  }[]>;
6769
+ /**
6770
+ * Retrieves a paginated list of published skill identifiers for sitemaps
6771
+ *
6772
+ * @param params - Pagination (`page` defaults to 1, `pageSize` defaults to 200, max 500 server-side)
6773
+ * @param options - Optional request options
6774
+ */
6775
+ getSitemap(params?: {
6776
+ page?: number;
6777
+ pageSize?: number;
6778
+ }, options?: globalThis.RequestInit): Promise<SitemapResponse>;
6730
6779
  /**
6731
6780
  * Checks if a skill exists in the marketplace
6732
6781
  *
package/dist/index.mjs CHANGED
@@ -1854,6 +1854,7 @@ var AgentService2 = class extends BaseSDK {
1854
1854
  * full agent metadata. This is useful for clients that need to know which
1855
1855
  * agents are available without fetching complete agent information.
1856
1856
  *
1857
+ * @deprecated Use {@link AgentService.getSitemap} instead.
1857
1858
  * @param options - Optional request options
1858
1859
  * @returns Promise resolving to an array containing identifiers array and last modified time
1859
1860
  */
@@ -1866,6 +1867,24 @@ var AgentService2 = class extends BaseSDK {
1866
1867
  log12("Retrieved %d published agent identifiers", result.length);
1867
1868
  return result;
1868
1869
  }
1870
+ /**
1871
+ * Retrieves a paginated list of published agent identifiers for sitemaps
1872
+ *
1873
+ * @param params - Pagination (`page` defaults to 1, `pageSize` defaults to 200, max 500 server-side)
1874
+ * @param options - Optional request options
1875
+ */
1876
+ async getSitemap(params = {}, options) {
1877
+ const queryString = this.buildQueryString(params);
1878
+ log12("Getting agent sitemap%s", queryString);
1879
+ const result = await this.request(`/v1/agents/sitemap${queryString}`, options);
1880
+ log12(
1881
+ "Retrieved agent sitemap page %d/%d (%d items)",
1882
+ result.currentPage,
1883
+ result.totalPages,
1884
+ result.items.length
1885
+ );
1886
+ return result;
1887
+ }
1869
1888
  /**
1870
1889
  * Retrieves agent categories and their counts
1871
1890
  *
@@ -3520,6 +3539,7 @@ var PluginsService = class extends BaseSDK {
3520
3539
  * full plugin metadata. This is useful for clients that need to know which
3521
3540
  * plugins are available without fetching complete plugin information.
3522
3541
  *
3542
+ * @deprecated Use {@link PluginsService.getSitemap} instead.
3523
3543
  * @returns Promise resolving to an array containing identifiers array and last modified time
3524
3544
  */
3525
3545
  async getPublishedIdentifiers(options) {
@@ -3531,6 +3551,27 @@ var PluginsService = class extends BaseSDK {
3531
3551
  log19("Retrieved %d published plugin identifiers", result.length);
3532
3552
  return result;
3533
3553
  }
3554
+ /**
3555
+ * Retrieves a paginated list of published plugin (MCP) identifiers for sitemaps
3556
+ *
3557
+ * @param params - Pagination (`page` defaults to 1, `pageSize` defaults to 200, max 500 server-side)
3558
+ * @param options - Optional request options
3559
+ */
3560
+ async getSitemap(params = {}, options) {
3561
+ const queryString = this.buildQueryString(params);
3562
+ log19("Getting plugin sitemap%s", queryString);
3563
+ const result = await this.request(
3564
+ `/v1/plugins/sitemap${queryString}`,
3565
+ options
3566
+ );
3567
+ log19(
3568
+ "Retrieved plugin sitemap page %d/%d (%d items)",
3569
+ result.currentPage,
3570
+ result.totalPages,
3571
+ result.items.length
3572
+ );
3573
+ return result;
3574
+ }
3534
3575
  /**
3535
3576
  * Retrieves the manifest for a specific plugin
3536
3577
  *
@@ -4148,12 +4189,14 @@ var SkillService = class extends BaseSDK {
4148
4189
  */
4149
4190
  async callTool(provider, params, options) {
4150
4191
  log20("Calling tool %s on provider %s", params.tool, provider);
4192
+ const { args, tool, ...rest } = params;
4151
4193
  const result = await this.request(
4152
4194
  `/v1/skill/${encodeURIComponent(provider)}/call`,
4153
4195
  {
4154
4196
  body: JSON.stringify({
4155
- args: params.args || {},
4156
- tool: params.tool
4197
+ args: args || {},
4198
+ tool,
4199
+ ...rest
4157
4200
  }),
4158
4201
  headers: {
4159
4202
  "Content-Type": "application/json"
@@ -4410,6 +4453,7 @@ var MarketSkillService = class extends BaseSDK {
4410
4453
  * without full metadata. Useful for sitemap generation or
4411
4454
  * knowing which skills are available.
4412
4455
  *
4456
+ * @deprecated Use {@link MarketSkillService.getSitemap} instead.
4413
4457
  * @param options - Optional request options
4414
4458
  * @returns Promise resolving to an array of identifiers with last modified times
4415
4459
  */
@@ -4422,6 +4466,24 @@ var MarketSkillService = class extends BaseSDK {
4422
4466
  log22("Retrieved %d published skill identifiers", result.length);
4423
4467
  return result;
4424
4468
  }
4469
+ /**
4470
+ * Retrieves a paginated list of published skill identifiers for sitemaps
4471
+ *
4472
+ * @param params - Pagination (`page` defaults to 1, `pageSize` defaults to 200, max 500 server-side)
4473
+ * @param options - Optional request options
4474
+ */
4475
+ async getSitemap(params = {}, options) {
4476
+ const queryString = this.buildQueryString(params);
4477
+ log22("Getting skill sitemap%s", queryString);
4478
+ const result = await this.request(`/v1/skills/sitemap${queryString}`, options);
4479
+ log22(
4480
+ "Retrieved skill sitemap page %d/%d (%d items)",
4481
+ result.currentPage,
4482
+ result.totalPages,
4483
+ result.items.length
4484
+ );
4485
+ return result;
4486
+ }
4425
4487
  /**
4426
4488
  * Checks if a skill exists in the marketplace
4427
4489
  *