@lobehub/market-sdk 0.25.1 → 0.26.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.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/admin/MarketAdmin.ts
2
- import debug8 from "debug";
2
+ import debug9 from "debug";
3
3
 
4
4
  // src/core/BaseSDK.ts
5
5
  import debug from "debug";
@@ -241,9 +241,179 @@ var BaseSDK = class {
241
241
  }
242
242
  };
243
243
 
244
- // src/admin/services/AnalysisService.ts
244
+ // src/admin/services/AgentService.ts
245
245
  import debug2 from "debug";
246
- var log2 = debug2("lobe-market-sdk:admin:analysis");
246
+ var log2 = debug2("lobe-market-sdk:admin:agents");
247
+ var AgentService = class extends BaseSDK {
248
+ /**
249
+ * Retrieves a list of agents with admin details
250
+ *
251
+ * Supports filtering, pagination, and sorting of results.
252
+ *
253
+ * @param params - Query parameters for filtering and pagination
254
+ * @returns Promise resolving to the agent list response with admin details
255
+ */
256
+ async getAgents(params = {}) {
257
+ log2("Getting agents with params: %O", params);
258
+ const queryString = this.buildQueryString(params);
259
+ const url = `/admin/agents${queryString}`;
260
+ const result = await this.request(url);
261
+ log2("Retrieved %d agents", result.data.length);
262
+ return result;
263
+ }
264
+ /**
265
+ * Retrieves agents filtered by status
266
+ *
267
+ * @param status - The status to filter by
268
+ * @returns Promise resolving to agents matching the status
269
+ */
270
+ async getAgentsByStatus(status) {
271
+ log2("Getting agents by status: %s", status);
272
+ const result = await this.request(
273
+ `/admin/agents/by-status/${status}`
274
+ );
275
+ log2("Retrieved %d agents with status %s", result.total, status);
276
+ return result;
277
+ }
278
+ /**
279
+ * Retrieves agent versions filtered by status
280
+ *
281
+ * @param status - The status to filter by
282
+ * @returns Promise resolving to agent versions matching the status
283
+ */
284
+ async getAgentVersionsByStatus(status) {
285
+ log2("Getting agent versions by status: %s", status);
286
+ const result = await this.request(
287
+ `/admin/agents/versions/by-status/${status}`
288
+ );
289
+ log2("Retrieved %d agent versions with status %s", result.total, status);
290
+ return result;
291
+ }
292
+ /**
293
+ * Retrieves a single agent with full admin details
294
+ *
295
+ * @param id - Agent ID or identifier
296
+ * @param options - Optional query parameters
297
+ * @returns Promise resolving to the detailed agent information
298
+ */
299
+ async getAgent(id, options = {}) {
300
+ log2("Getting agent details (admin): %s", id);
301
+ const queryString = this.buildQueryString(options);
302
+ const result = await this.request(`/admin/agents/${id}${queryString}`);
303
+ log2("Retrieved agent: %s", result.identifier);
304
+ return result;
305
+ }
306
+ /**
307
+ * Updates agent information
308
+ *
309
+ * @param id - Agent ID or identifier
310
+ * @param data - Agent update data containing fields to update
311
+ * @returns Promise resolving to the updated agent
312
+ */
313
+ async updateAgent(id, data) {
314
+ log2("Updating agent: %s, data: %O", id, data);
315
+ const result = await this.request(`/admin/agents/${id}`, {
316
+ body: JSON.stringify(data),
317
+ method: "PUT"
318
+ });
319
+ log2("Agent updated successfully");
320
+ return result;
321
+ }
322
+ /**
323
+ * Updates agent publication status
324
+ *
325
+ * @param id - Agent ID or identifier
326
+ * @param status - New status to set
327
+ * @returns Promise resolving to success response
328
+ */
329
+ async updateAgentStatus(id, status) {
330
+ log2("Updating agent status: %s to %s", id, status);
331
+ const result = await this.request(
332
+ `/admin/agents/${id}/status`,
333
+ {
334
+ body: JSON.stringify({ status }),
335
+ method: "PATCH"
336
+ }
337
+ );
338
+ log2("Agent status updated successfully");
339
+ return result;
340
+ }
341
+ /**
342
+ * Updates agent visibility
343
+ *
344
+ * @param id - Agent ID or identifier
345
+ * @param visibility - New visibility setting
346
+ * @returns Promise resolving to success response
347
+ */
348
+ async updateAgentVisibility(id, visibility) {
349
+ log2("Updating agent visibility: %s to %s", id, visibility);
350
+ const result = await this.request(
351
+ `/admin/agents/${id}/visibility`,
352
+ {
353
+ body: JSON.stringify({ visibility }),
354
+ method: "PATCH"
355
+ }
356
+ );
357
+ log2("Agent visibility updated successfully");
358
+ return result;
359
+ }
360
+ /**
361
+ * Deletes an agent
362
+ *
363
+ * @param id - Agent ID or identifier
364
+ * @returns Promise resolving to success response
365
+ */
366
+ async deleteAgent(id) {
367
+ log2("Deleting agent: %s", id);
368
+ const result = await this.request(
369
+ `/admin/agents/${id}`,
370
+ { method: "DELETE" }
371
+ );
372
+ log2("Agent deleted successfully");
373
+ return result;
374
+ }
375
+ /**
376
+ * Updates status for multiple agents in a single operation
377
+ *
378
+ * @param ids - Array of agent IDs to update
379
+ * @param status - New status to set for all specified agents
380
+ * @returns Promise resolving to success response
381
+ */
382
+ async batchUpdateAgentStatus(ids, status) {
383
+ log2("Batch updating agent status: %O to %s", ids, status);
384
+ const result = await this.request(
385
+ "/admin/agents/batch/status",
386
+ {
387
+ body: JSON.stringify({ ids, status }),
388
+ method: "PATCH"
389
+ }
390
+ );
391
+ log2("Batch agent status update completed: %d updated", result.updatedCount);
392
+ return result;
393
+ }
394
+ /**
395
+ * Deletes multiple agents in a single operation
396
+ *
397
+ * @param ids - Array of agent IDs to delete
398
+ * @returns Promise resolving to success response
399
+ */
400
+ async batchDeleteAgents(ids) {
401
+ log2("Batch deleting agents: %O", ids);
402
+ const result = await this.request(
403
+ "/admin/agents/batch/delete",
404
+ {
405
+ body: JSON.stringify({ ids }),
406
+ method: "DELETE"
407
+ }
408
+ );
409
+ log2("Batch agent deletion completed: %d deleted", result.deletedCount);
410
+ return result;
411
+ }
412
+ };
413
+
414
+ // src/admin/services/AnalysisService.ts
415
+ import debug3 from "debug";
416
+ var log3 = debug3("lobe-market-sdk:admin:analysis");
247
417
  var AnalysisService = class extends BaseSDK {
248
418
  /**
249
419
  * Retrieves market overview statistics
@@ -257,14 +427,14 @@ var AnalysisService = class extends BaseSDK {
257
427
  */
258
428
  async getMarketOverview(params = {}) {
259
429
  const { period = "30d" } = params;
260
- log2("Getting market overview statistics for period: %s", period);
430
+ log3("Getting market overview statistics for period: %s", period);
261
431
  const searchParams = new URLSearchParams();
262
432
  if (period) {
263
433
  searchParams.append("period", period);
264
434
  }
265
435
  const url = `/admin/analysis/plugin/overview${searchParams.toString() ? `?${searchParams.toString()}` : ""}`;
266
436
  const result = await this.request(url);
267
- log2("Market overview statistics retrieved successfully: %s", result.data);
437
+ log3("Market overview statistics retrieved successfully: %s", result.data);
268
438
  return result.data;
269
439
  }
270
440
  /**
@@ -275,7 +445,7 @@ var AnalysisService = class extends BaseSDK {
275
445
  * @returns Promise resolving to market overview statistics for 1 day
276
446
  */
277
447
  async getDailyOverview() {
278
- log2("Getting daily market overview");
448
+ log3("Getting daily market overview");
279
449
  return this.getMarketOverview({ period: "1d" });
280
450
  }
281
451
  /**
@@ -286,7 +456,7 @@ var AnalysisService = class extends BaseSDK {
286
456
  * @returns Promise resolving to market overview statistics for 7 days
287
457
  */
288
458
  async getWeeklyOverview() {
289
- log2("Getting weekly market overview");
459
+ log3("Getting weekly market overview");
290
460
  return this.getMarketOverview({ period: "7d" });
291
461
  }
292
462
  /**
@@ -297,7 +467,7 @@ var AnalysisService = class extends BaseSDK {
297
467
  * @returns Promise resolving to market overview statistics for 30 days
298
468
  */
299
469
  async getMonthlyOverview() {
300
- log2("Getting monthly market overview");
470
+ log3("Getting monthly market overview");
301
471
  return this.getMarketOverview({ period: "30d" });
302
472
  }
303
473
  /**
@@ -308,7 +478,7 @@ var AnalysisService = class extends BaseSDK {
308
478
  * @returns Promise resolving to market overview statistics for current month
309
479
  */
310
480
  async getThisMonthOverview() {
311
- log2("Getting this month market overview");
481
+ log3("Getting this month market overview");
312
482
  return this.getMarketOverview({ period: "1mo" });
313
483
  }
314
484
  /**
@@ -319,7 +489,7 @@ var AnalysisService = class extends BaseSDK {
319
489
  * @returns Promise resolving to market overview statistics for current quarter
320
490
  */
321
491
  async getQuarterlyOverview() {
322
- log2("Getting quarterly market overview");
492
+ log3("Getting quarterly market overview");
323
493
  return this.getMarketOverview({ period: "3mo" });
324
494
  }
325
495
  /**
@@ -330,7 +500,7 @@ var AnalysisService = class extends BaseSDK {
330
500
  * @returns Promise resolving to market overview statistics for current year
331
501
  */
332
502
  async getYearlyOverview() {
333
- log2("Getting yearly market overview");
503
+ log3("Getting yearly market overview");
334
504
  return this.getMarketOverview({ period: "1y" });
335
505
  }
336
506
  /**
@@ -344,7 +514,7 @@ var AnalysisService = class extends BaseSDK {
344
514
  */
345
515
  async getInstallFailureAnalysis(params) {
346
516
  const { range, limit = 15 } = params;
347
- log2("Getting install failure analysis for range: %o, limit: %d", range, limit);
517
+ log3("Getting install failure analysis for range: %o, limit: %d", range, limit);
348
518
  const searchParams = new URLSearchParams();
349
519
  searchParams.append("range", JSON.stringify(range));
350
520
  if (limit !== 15) {
@@ -352,7 +522,7 @@ var AnalysisService = class extends BaseSDK {
352
522
  }
353
523
  const url = `/admin/analysis/plugin/install-failure?${searchParams.toString()}`;
354
524
  const result = await this.request(url);
355
- log2("Install failure analysis retrieved successfully for %d plugins", result.data.length);
525
+ log3("Install failure analysis retrieved successfully for %d plugins", result.data.length);
356
526
  return result.data;
357
527
  }
358
528
  /**
@@ -399,7 +569,7 @@ var AnalysisService = class extends BaseSDK {
399
569
  */
400
570
  async getRangeInstalls(params) {
401
571
  const { display, range, prevRange } = params;
402
- log2("Getting installation trend statistics for range: %s to %s", range[0], range[1]);
572
+ log3("Getting installation trend statistics for range: %s to %s", range[0], range[1]);
403
573
  const searchParams = new URLSearchParams();
404
574
  searchParams.append("display", display);
405
575
  searchParams.append("range", range.join(","));
@@ -408,7 +578,7 @@ var AnalysisService = class extends BaseSDK {
408
578
  }
409
579
  const url = `/admin/analysis/plugin/range-installs?${searchParams.toString()}`;
410
580
  const result = await this.request(url);
411
- log2(
581
+ log3(
412
582
  "Installation trend statistics retrieved successfully: %d data points",
413
583
  result.data.data.length
414
584
  );
@@ -425,7 +595,7 @@ var AnalysisService = class extends BaseSDK {
425
595
  */
426
596
  async getRangePlugins(params) {
427
597
  const { display, range, prevRange } = params;
428
- log2("Getting plugin growth trend statistics for range: %s to %s", range[0], range[1]);
598
+ log3("Getting plugin growth trend statistics for range: %s to %s", range[0], range[1]);
429
599
  const searchParams = new URLSearchParams();
430
600
  searchParams.append("display", display);
431
601
  searchParams.append("range", range.join(","));
@@ -434,7 +604,7 @@ var AnalysisService = class extends BaseSDK {
434
604
  }
435
605
  const url = `/admin/analysis/plugin/range-plugins?${searchParams.toString()}`;
436
606
  const result = await this.request(url);
437
- log2(
607
+ log3(
438
608
  "Plugin growth trend statistics retrieved successfully: %d data points",
439
609
  result.data.data.length
440
610
  );
@@ -452,7 +622,7 @@ var AnalysisService = class extends BaseSDK {
452
622
  */
453
623
  async getRangeDevices(params) {
454
624
  const { display, range, prevRange } = params;
455
- log2("Getting device growth trend statistics for range: %s to %s", range[0], range[1]);
625
+ log3("Getting device growth trend statistics for range: %s to %s", range[0], range[1]);
456
626
  const searchParams = new URLSearchParams();
457
627
  searchParams.append("display", display);
458
628
  searchParams.append("range", range.join(","));
@@ -461,7 +631,7 @@ var AnalysisService = class extends BaseSDK {
461
631
  }
462
632
  const url = `/admin/analysis/system/range-devices?${searchParams.toString()}`;
463
633
  const result = await this.request(url);
464
- log2(
634
+ log3(
465
635
  "Device growth trend statistics retrieved successfully: %d data points",
466
636
  result.data.data.length
467
637
  );
@@ -478,7 +648,7 @@ var AnalysisService = class extends BaseSDK {
478
648
  */
479
649
  async getRangeCalls(params) {
480
650
  const { display, range, prevRange } = params;
481
- log2("Getting plugin call trend statistics for range: %s to %s", range[0], range[1]);
651
+ log3("Getting plugin call trend statistics for range: %s to %s", range[0], range[1]);
482
652
  const searchParams = new URLSearchParams();
483
653
  searchParams.append("display", display);
484
654
  searchParams.append("range", range.join(","));
@@ -487,7 +657,7 @@ var AnalysisService = class extends BaseSDK {
487
657
  }
488
658
  const url = `/admin/analysis/plugin/range-calls?${searchParams.toString()}`;
489
659
  const result = await this.request(url);
490
- log2(
660
+ log3(
491
661
  "Plugin call trend statistics retrieved successfully: %d data points",
492
662
  result.data.data.length
493
663
  );
@@ -526,8 +696,8 @@ var AnalysisService = class extends BaseSDK {
526
696
  };
527
697
 
528
698
  // src/admin/services/PluginService.ts
529
- import debug3 from "debug";
530
- var log3 = debug3("lobe-market-sdk:admin:plugins");
699
+ import debug4 from "debug";
700
+ var log4 = debug4("lobe-market-sdk:admin:plugins");
531
701
  var PluginService = class extends BaseSDK {
532
702
  /**
533
703
  * Batch imports plugin manifests using the dedicated import endpoint
@@ -539,9 +709,9 @@ var PluginService = class extends BaseSDK {
539
709
  * @returns Promise resolving to the import results with counts of success, skipped, failed, and a list of failed IDs
540
710
  */
541
711
  async importPlugins(manifests, ownerId) {
542
- log3(`Starting batch plugin import of ${manifests.length} manifests`);
712
+ log4(`Starting batch plugin import of ${manifests.length} manifests`);
543
713
  if (ownerId) {
544
- log3(`Using specified owner ID for import: ${ownerId}`);
714
+ log4(`Using specified owner ID for import: ${ownerId}`);
545
715
  }
546
716
  const response = await this.request("/admin/plugins/import", {
547
717
  body: JSON.stringify({
@@ -550,7 +720,7 @@ var PluginService = class extends BaseSDK {
550
720
  }),
551
721
  method: "POST"
552
722
  });
553
- log3(
723
+ log4(
554
724
  `Plugin import completed: ${response.data.success} succeeded, ${response.data.skipped} skipped, ${response.data.failed} failed`
555
725
  );
556
726
  return response.data;
@@ -565,14 +735,14 @@ var PluginService = class extends BaseSDK {
565
735
  * @returns Promise resolving to the import results with counts of success and failure
566
736
  */
567
737
  async importPluginI18n(params) {
568
- log3(
738
+ log4(
569
739
  `Starting i18n import for plugin ${params.identifier} v${params.version} with ${params.localizations.length} localizations`
570
740
  );
571
741
  const response = await this.request("/admin/plugins/import/i18n", {
572
742
  body: JSON.stringify(params),
573
743
  method: "POST"
574
744
  });
575
- log3(
745
+ log4(
576
746
  `Plugin i18n import completed: ${response.data.success} succeeded, ${response.data.failed} failed, ${response.data.totalLocalizations} total`
577
747
  );
578
748
  return response.data;
@@ -586,11 +756,11 @@ var PluginService = class extends BaseSDK {
586
756
  * @returns Promise resolving to the plugin list response with admin details
587
757
  */
588
758
  async getPlugins(params = {}) {
589
- log3("Getting plugins with params: %O", params);
759
+ log4("Getting plugins with params: %O", params);
590
760
  const queryString = this.buildQueryString(params);
591
761
  const url = `/admin/plugins${queryString}`;
592
762
  const result = await this.request(url);
593
- log3("Retrieved %d plugins", result.data.length);
763
+ log4("Retrieved %d plugins", result.data.length);
594
764
  return result;
595
765
  }
596
766
  /**
@@ -603,9 +773,9 @@ var PluginService = class extends BaseSDK {
603
773
  * @returns Promise resolving to an array containing identifiers array and last modified time
604
774
  */
605
775
  async getPublishedIdentifiers() {
606
- log3("Getting published plugin identifiers (admin)");
776
+ log4("Getting published plugin identifiers (admin)");
607
777
  const result = await this.request("/v1/plugins/identifiers");
608
- log3("Retrieved %d published plugin identifiers (admin)", result.length);
778
+ log4("Retrieved %d published plugin identifiers (admin)", result.length);
609
779
  return result;
610
780
  }
611
781
  /**
@@ -615,9 +785,9 @@ var PluginService = class extends BaseSDK {
615
785
  * @returns Promise resolving to the detailed plugin information with version history
616
786
  */
617
787
  async getPlugin(id) {
618
- log3("Getting plugin details (admin): %d", id);
788
+ log4("Getting plugin details (admin): %d", id);
619
789
  const result = await this.request(`/admin/plugins/${id}`);
620
- log3("Retrieved plugin with %d versions", result.versions.length);
790
+ log4("Retrieved plugin with %d versions", result.versions.length);
621
791
  return result;
622
792
  }
623
793
  /**
@@ -627,12 +797,12 @@ var PluginService = class extends BaseSDK {
627
797
  * @returns Promise resolving to the detailed plugin information with version history
628
798
  */
629
799
  async getPluginByGithubUrl(githubUrl) {
630
- log3("Getting plugin by GitHub URL: %s", githubUrl);
800
+ log4("Getting plugin by GitHub URL: %s", githubUrl);
631
801
  const queryString = this.buildQueryString({ url: githubUrl });
632
802
  const result = await this.request(
633
803
  `/admin/plugins/by-github-url${queryString}`
634
804
  );
635
- log3("Retrieved plugin with %d versions", result.versions.length);
805
+ log4("Retrieved plugin with %d versions", result.versions.length);
636
806
  return result;
637
807
  }
638
808
  /**
@@ -643,12 +813,12 @@ var PluginService = class extends BaseSDK {
643
813
  * @returns Promise resolving to the updated plugin
644
814
  */
645
815
  async updatePlugin(id, data) {
646
- log3("Updating plugin: %d, data: %O", id, data);
816
+ log4("Updating plugin: %d, data: %O", id, data);
647
817
  const result = await this.request(`/admin/plugins/${id}`, {
648
818
  body: JSON.stringify(data),
649
819
  method: "PUT"
650
820
  });
651
- log3("Plugin updated successfully");
821
+ log4("Plugin updated successfully");
652
822
  return result;
653
823
  }
654
824
  /**
@@ -659,7 +829,7 @@ var PluginService = class extends BaseSDK {
659
829
  * @returns Promise resolving to success response
660
830
  */
661
831
  async updatePluginStatus(id, status) {
662
- log3("Updating plugin status: %d to %s", id, status);
832
+ log4("Updating plugin status: %d to %s", id, status);
663
833
  const result = await this.request(
664
834
  `/admin/plugins/${id}/status`,
665
835
  {
@@ -667,7 +837,7 @@ var PluginService = class extends BaseSDK {
667
837
  method: "PATCH"
668
838
  }
669
839
  );
670
- log3("Plugin status updated successfully");
840
+ log4("Plugin status updated successfully");
671
841
  return result;
672
842
  }
673
843
  /**
@@ -677,12 +847,12 @@ var PluginService = class extends BaseSDK {
677
847
  * @returns Promise resolving to success response
678
848
  */
679
849
  async deletePlugin(id) {
680
- log3("Deleting plugin: %d", id);
850
+ log4("Deleting plugin: %d", id);
681
851
  const result = await this.request(
682
852
  `/admin/plugins/${id}`,
683
853
  { method: "DELETE" }
684
854
  );
685
- log3("Plugin deleted successfully");
855
+ log4("Plugin deleted successfully");
686
856
  return result;
687
857
  }
688
858
  /**
@@ -692,9 +862,9 @@ var PluginService = class extends BaseSDK {
692
862
  * @returns Promise resolving to an array of plugin versions
693
863
  */
694
864
  async getPluginVersions(pluginId) {
695
- log3("Getting plugin versions: pluginId=%d", pluginId);
865
+ log4("Getting plugin versions: pluginId=%d", pluginId);
696
866
  const result = await this.request(`/admin/plugins/${pluginId}/versions`);
697
- log3("Retrieved %d versions", result.length);
867
+ log4("Retrieved %d versions", result.length);
698
868
  return result;
699
869
  }
700
870
  /**
@@ -705,11 +875,11 @@ var PluginService = class extends BaseSDK {
705
875
  * @returns Promise resolving to the plugin version details
706
876
  */
707
877
  async getPluginVersion(pluginId, versionId) {
708
- log3("Getting version details: pluginId=%d, versionId=%d", pluginId, versionId);
878
+ log4("Getting version details: pluginId=%d, versionId=%d", pluginId, versionId);
709
879
  const result = await this.request(
710
880
  `/admin/plugins/${pluginId}/versions/${versionId}`
711
881
  );
712
- log3("Version details retrieved");
882
+ log4("Version details retrieved");
713
883
  return result;
714
884
  }
715
885
  /**
@@ -720,11 +890,11 @@ var PluginService = class extends BaseSDK {
720
890
  * @returns Promise resolving to an array of plugin version localizations
721
891
  */
722
892
  async getPluginLocalizations(pluginId, versionId) {
723
- log3("Getting localizations: pluginId=%s, versionId=%d", pluginId, versionId);
893
+ log4("Getting localizations: pluginId=%s, versionId=%d", pluginId, versionId);
724
894
  const result = await this.request(
725
895
  `/admin/plugins/${pluginId}/versions/${versionId}/localizations`
726
896
  );
727
- log3("Retrieved %d localizations for plugin %s, version %d", result.length, pluginId, versionId);
897
+ log4("Retrieved %d localizations for plugin %s, version %d", result.length, pluginId, versionId);
728
898
  return result;
729
899
  }
730
900
  /**
@@ -735,12 +905,12 @@ var PluginService = class extends BaseSDK {
735
905
  * @returns Promise resolving to the created plugin version
736
906
  */
737
907
  async createPluginVersion(pluginId, data) {
738
- log3("Creating new plugin version: pluginId=%d, data: %O", pluginId, data);
908
+ log4("Creating new plugin version: pluginId=%d, data: %O", pluginId, data);
739
909
  const result = await this.request(`/admin/plugins/${pluginId}/versions`, {
740
910
  body: JSON.stringify(data),
741
911
  method: "POST"
742
912
  });
743
- log3("Plugin version created successfully: version=%s", data.version);
913
+ log4("Plugin version created successfully: version=%s", data.version);
744
914
  return result;
745
915
  }
746
916
  /**
@@ -754,7 +924,7 @@ var PluginService = class extends BaseSDK {
754
924
  */
755
925
  async createPluginVersionFromManifest(pluginId, manifest, options = {}) {
756
926
  var _a, _b, _c, _d, _e, _f, _g;
757
- log3(
927
+ log4(
758
928
  "Creating plugin version from manifest: pluginId=%d, version=%s",
759
929
  pluginId,
760
930
  manifest.version
@@ -790,7 +960,7 @@ var PluginService = class extends BaseSDK {
790
960
  * @returns Promise resolving to the updated plugin version
791
961
  */
792
962
  async updatePluginVersion(idOrIdentifier, versionId, data) {
793
- log3(
963
+ log4(
794
964
  "Updating plugin version: pluginId=%d, versionId=%d, data: %O",
795
965
  idOrIdentifier,
796
966
  versionId,
@@ -803,7 +973,7 @@ var PluginService = class extends BaseSDK {
803
973
  method: "PUT"
804
974
  }
805
975
  );
806
- log3("Plugin version updated successfully");
976
+ log4("Plugin version updated successfully");
807
977
  return result;
808
978
  }
809
979
  /**
@@ -814,12 +984,12 @@ var PluginService = class extends BaseSDK {
814
984
  * @returns Promise resolving to success response
815
985
  */
816
986
  async deletePluginVersion(pluginId, versionId) {
817
- log3("Deleting version: pluginId=%d, versionId=%d", pluginId, versionId);
987
+ log4("Deleting version: pluginId=%d, versionId=%d", pluginId, versionId);
818
988
  const result = await this.request(
819
989
  `/admin/plugins/${pluginId}/versions/${versionId}`,
820
990
  { method: "DELETE" }
821
991
  );
822
- log3("Plugin version deleted successfully");
992
+ log4("Plugin version deleted successfully");
823
993
  return result;
824
994
  }
825
995
  /**
@@ -830,12 +1000,12 @@ var PluginService = class extends BaseSDK {
830
1000
  * @returns Promise resolving to success response
831
1001
  */
832
1002
  async setPluginVersionAsLatest(pluginId, versionId) {
833
- log3("Setting version as latest: pluginId=%d, versionId=%d", pluginId, versionId);
1003
+ log4("Setting version as latest: pluginId=%d, versionId=%d", pluginId, versionId);
834
1004
  const result = await this.request(
835
1005
  `/admin/plugins/${pluginId}/versions/${versionId}/latest`,
836
1006
  { method: "POST" }
837
1007
  );
838
- log3("Version set as latest successfully");
1008
+ log4("Version set as latest successfully");
839
1009
  return result;
840
1010
  }
841
1011
  /**
@@ -846,7 +1016,7 @@ var PluginService = class extends BaseSDK {
846
1016
  * @returns Promise resolving to success response
847
1017
  */
848
1018
  async updatePluginVisibility(id, visibility) {
849
- log3("Updating plugin visibility: %d to %s", id, visibility);
1019
+ log4("Updating plugin visibility: %d to %s", id, visibility);
850
1020
  const result = await this.request(
851
1021
  `/admin/plugins/${id}/visibility`,
852
1022
  {
@@ -854,7 +1024,7 @@ var PluginService = class extends BaseSDK {
854
1024
  method: "PATCH"
855
1025
  }
856
1026
  );
857
- log3("Plugin visibility updated successfully");
1027
+ log4("Plugin visibility updated successfully");
858
1028
  return result;
859
1029
  }
860
1030
  /**
@@ -865,7 +1035,7 @@ var PluginService = class extends BaseSDK {
865
1035
  * @returns Promise resolving to success response
866
1036
  */
867
1037
  async batchUpdatePluginStatus(ids, status) {
868
- log3("Batch updating plugin status: %O to %s", ids, status);
1038
+ log4("Batch updating plugin status: %O to %s", ids, status);
869
1039
  const result = await this.request(
870
1040
  "/admin/plugins/batch/status",
871
1041
  {
@@ -873,7 +1043,7 @@ var PluginService = class extends BaseSDK {
873
1043
  method: "PATCH"
874
1044
  }
875
1045
  );
876
- log3("Batch plugin status update completed");
1046
+ log4("Batch plugin status update completed");
877
1047
  return result;
878
1048
  }
879
1049
  /**
@@ -883,7 +1053,7 @@ var PluginService = class extends BaseSDK {
883
1053
  * @returns Promise resolving to success response
884
1054
  */
885
1055
  async batchDeletePlugins(ids) {
886
- log3("Batch deleting plugins: %O", ids);
1056
+ log4("Batch deleting plugins: %O", ids);
887
1057
  const result = await this.request(
888
1058
  "/admin/plugins/batch/delete",
889
1059
  {
@@ -891,7 +1061,7 @@ var PluginService = class extends BaseSDK {
891
1061
  method: "DELETE"
892
1062
  }
893
1063
  );
894
- log3("Batch plugin deletion completed");
1064
+ log4("Batch plugin deletion completed");
895
1065
  return result;
896
1066
  }
897
1067
  /**
@@ -902,7 +1072,7 @@ var PluginService = class extends BaseSDK {
902
1072
  * @returns Promise resolving to version details with deployment options
903
1073
  */
904
1074
  async getPluginVersionDetails(pluginId, versionId) {
905
- log3(
1075
+ log4(
906
1076
  "Getting version details with deployment options: pluginId=%d, versionId=%d",
907
1077
  pluginId,
908
1078
  versionId
@@ -910,7 +1080,7 @@ var PluginService = class extends BaseSDK {
910
1080
  const result = await this.request(
911
1081
  `/admin/plugins/${pluginId}/versions/${versionId}`
912
1082
  );
913
- log3("Version details with deployment options retrieved");
1083
+ log4("Version details with deployment options retrieved");
914
1084
  return result;
915
1085
  }
916
1086
  /**
@@ -921,11 +1091,11 @@ var PluginService = class extends BaseSDK {
921
1091
  * @returns Promise resolving to an array of deployment options
922
1092
  */
923
1093
  async getDeploymentOptions(pluginId, versionId) {
924
- log3("Getting deployment options: pluginId=%d, versionId=%d", pluginId, versionId);
1094
+ log4("Getting deployment options: pluginId=%d, versionId=%d", pluginId, versionId);
925
1095
  const result = await this.request(
926
1096
  `/admin/plugins/${pluginId}/versions/${versionId}/deployment-options`
927
1097
  );
928
- log3("Retrieved %d deployment options", result.length);
1098
+ log4("Retrieved %d deployment options", result.length);
929
1099
  return result;
930
1100
  }
931
1101
  /**
@@ -937,7 +1107,7 @@ var PluginService = class extends BaseSDK {
937
1107
  * @returns Promise resolving to the created deployment option
938
1108
  */
939
1109
  async createDeploymentOption(pluginId, versionId, data) {
940
- log3("Creating deployment option: pluginId=%d, versionId=%d", pluginId, versionId);
1110
+ log4("Creating deployment option: pluginId=%d, versionId=%d", pluginId, versionId);
941
1111
  const result = await this.request(
942
1112
  `/admin/plugins/${pluginId}/versions/${versionId}/deployment-options`,
943
1113
  {
@@ -945,7 +1115,7 @@ var PluginService = class extends BaseSDK {
945
1115
  method: "POST"
946
1116
  }
947
1117
  );
948
- log3("Deployment option created successfully");
1118
+ log4("Deployment option created successfully");
949
1119
  return result;
950
1120
  }
951
1121
  /**
@@ -958,7 +1128,7 @@ var PluginService = class extends BaseSDK {
958
1128
  * @returns Promise resolving to the updated deployment option
959
1129
  */
960
1130
  async updateDeploymentOption(pluginId, versionId, optionId, data) {
961
- log3(
1131
+ log4(
962
1132
  "Updating deployment option: pluginId=%d, versionId=%d, optionId=%d",
963
1133
  pluginId,
964
1134
  versionId,
@@ -971,7 +1141,7 @@ var PluginService = class extends BaseSDK {
971
1141
  method: "PUT"
972
1142
  }
973
1143
  );
974
- log3("Deployment option updated successfully");
1144
+ log4("Deployment option updated successfully");
975
1145
  return result;
976
1146
  }
977
1147
  /**
@@ -983,7 +1153,7 @@ var PluginService = class extends BaseSDK {
983
1153
  * @returns Promise resolving to success response
984
1154
  */
985
1155
  async deleteDeploymentOption(pluginId, versionId, optionId) {
986
- log3(
1156
+ log4(
987
1157
  "Deleting deployment option: pluginId=%d, versionId=%d, optionId=%d",
988
1158
  pluginId,
989
1159
  versionId,
@@ -993,7 +1163,7 @@ var PluginService = class extends BaseSDK {
993
1163
  `/admin/plugins/${pluginId}/versions/${versionId}/deployment-options/${optionId}`,
994
1164
  { method: "DELETE" }
995
1165
  );
996
- log3("Deployment option deleted successfully");
1166
+ log4("Deployment option deleted successfully");
997
1167
  return result;
998
1168
  }
999
1169
  /**
@@ -1005,7 +1175,7 @@ var PluginService = class extends BaseSDK {
1005
1175
  * @returns Promise resolving to an array of system dependencies
1006
1176
  */
1007
1177
  async getDeploymentOptionSystemDependencies(pluginId, versionId, optionId) {
1008
- log3(
1178
+ log4(
1009
1179
  "Getting system dependencies: pluginId=%d, versionId=%d, optionId=%d",
1010
1180
  pluginId,
1011
1181
  versionId,
@@ -1014,7 +1184,7 @@ var PluginService = class extends BaseSDK {
1014
1184
  const result = await this.request(
1015
1185
  `/admin/plugins/${pluginId}/versions/${versionId}/deployment-options/${optionId}/system-dependencies`
1016
1186
  );
1017
- log3("Retrieved %d system dependencies", result.length);
1187
+ log4("Retrieved %d system dependencies", result.length);
1018
1188
  return result;
1019
1189
  }
1020
1190
  /**
@@ -1025,9 +1195,9 @@ var PluginService = class extends BaseSDK {
1025
1195
  * @returns Promise resolving to array of plugins with incomplete summary data
1026
1196
  */
1027
1197
  async getVerifiedPluginsWithoutSummary() {
1028
- log3("Getting verified plugins without summary");
1198
+ log4("Getting verified plugins without summary");
1029
1199
  const result = await this.request("/admin/plugins/verified-without-summary");
1030
- log3("Retrieved %d verified plugins without summary", result.length);
1200
+ log4("Retrieved %d verified plugins without summary", result.length);
1031
1201
  return result;
1032
1202
  }
1033
1203
  /**
@@ -1038,9 +1208,9 @@ var PluginService = class extends BaseSDK {
1038
1208
  * @returns Promise resolving to an array of plugins with incomplete i18n
1039
1209
  */
1040
1210
  async getIncompleteI18nPlugins() {
1041
- log3("Getting plugins with incomplete i18n");
1211
+ log4("Getting plugins with incomplete i18n");
1042
1212
  const result = await this.request("/admin/plugins/incomplete-i18n");
1043
- log3("Retrieved %d plugins with incomplete i18n", result.length);
1213
+ log4("Retrieved %d plugins with incomplete i18n", result.length);
1044
1214
  return result;
1045
1215
  }
1046
1216
  /**
@@ -1051,16 +1221,16 @@ var PluginService = class extends BaseSDK {
1051
1221
  * @returns Promise resolving to an array of unclaimed plugins with basic info
1052
1222
  */
1053
1223
  async getUnclaimedPlugins() {
1054
- log3("Getting unclaimed plugins");
1224
+ log4("Getting unclaimed plugins");
1055
1225
  const result = await this.request("/admin/plugins/unclaimed");
1056
- log3("Retrieved %d unclaimed plugins", result.length);
1226
+ log4("Retrieved %d unclaimed plugins", result.length);
1057
1227
  return result;
1058
1228
  }
1059
1229
  };
1060
1230
 
1061
1231
  // src/admin/services/SystemDependencyService.ts
1062
- import debug4 from "debug";
1063
- var log4 = debug4("lobe-market-sdk:admin:dependency");
1232
+ import debug5 from "debug";
1233
+ var log5 = debug5("lobe-market-sdk:admin:dependency");
1064
1234
  var SystemDependencyService = class extends BaseSDK {
1065
1235
  /**
1066
1236
  * Retrieves all system dependencies
@@ -1070,9 +1240,9 @@ var SystemDependencyService = class extends BaseSDK {
1070
1240
  * @returns Promise resolving to an array of system dependencies
1071
1241
  */
1072
1242
  async getSystemDependencies() {
1073
- log4("Getting all system dependencies");
1243
+ log5("Getting all system dependencies");
1074
1244
  const result = await this.request(`/admin/plugins/dependencies`);
1075
- log4("Retrieved %d system dependencies", result.length);
1245
+ log5("Retrieved %d system dependencies", result.length);
1076
1246
  return result;
1077
1247
  }
1078
1248
  /**
@@ -1082,9 +1252,9 @@ var SystemDependencyService = class extends BaseSDK {
1082
1252
  * @returns Promise resolving to the system dependency details
1083
1253
  */
1084
1254
  async getSystemDependency(id) {
1085
- log4("Getting system dependency details: %d", id);
1255
+ log5("Getting system dependency details: %d", id);
1086
1256
  const result = await this.request(`/admin/plugins/dependencies/${id}`);
1087
- log4("System dependency details retrieved");
1257
+ log5("System dependency details retrieved");
1088
1258
  return result;
1089
1259
  }
1090
1260
  /**
@@ -1094,12 +1264,12 @@ var SystemDependencyService = class extends BaseSDK {
1094
1264
  * @returns Promise resolving to the created system dependency
1095
1265
  */
1096
1266
  async createSystemDependency(data) {
1097
- log4("Creating system dependency: %O", data);
1267
+ log5("Creating system dependency: %O", data);
1098
1268
  const result = await this.request(`/admin/plugins/dependencies`, {
1099
1269
  body: JSON.stringify(data),
1100
1270
  method: "POST"
1101
1271
  });
1102
- log4("System dependency created successfully");
1272
+ log5("System dependency created successfully");
1103
1273
  return result;
1104
1274
  }
1105
1275
  /**
@@ -1110,12 +1280,12 @@ var SystemDependencyService = class extends BaseSDK {
1110
1280
  * @returns Promise resolving to the updated system dependency
1111
1281
  */
1112
1282
  async updateSystemDependency(id, data) {
1113
- log4("Updating system dependency: %d, data: %O", id, data);
1283
+ log5("Updating system dependency: %d, data: %O", id, data);
1114
1284
  const result = await this.request(`/admin/plugins/dependencies/${id}`, {
1115
1285
  body: JSON.stringify(data),
1116
1286
  method: "PUT"
1117
1287
  });
1118
- log4("System dependency updated successfully");
1288
+ log5("System dependency updated successfully");
1119
1289
  return result;
1120
1290
  }
1121
1291
  /**
@@ -1125,19 +1295,19 @@ var SystemDependencyService = class extends BaseSDK {
1125
1295
  * @returns Promise resolving to success response
1126
1296
  */
1127
1297
  async deleteSystemDependency(id) {
1128
- log4("Deleting system dependency: %d", id);
1298
+ log5("Deleting system dependency: %d", id);
1129
1299
  const result = await this.request(
1130
1300
  `/admin/plugins/dependencies/${id}`,
1131
1301
  { method: "DELETE" }
1132
1302
  );
1133
- log4("System dependency deleted successfully");
1303
+ log5("System dependency deleted successfully");
1134
1304
  return result;
1135
1305
  }
1136
1306
  };
1137
1307
 
1138
1308
  // src/admin/services/SettingsService.ts
1139
- import debug5 from "debug";
1140
- var log5 = debug5("lobe-market-sdk:admin:settings");
1309
+ import debug6 from "debug";
1310
+ var log6 = debug6("lobe-market-sdk:admin:settings");
1141
1311
  var SettingsService = class extends BaseSDK {
1142
1312
  /**
1143
1313
  * Retrieves all system settings
@@ -1157,9 +1327,9 @@ var SettingsService = class extends BaseSDK {
1157
1327
  * @returns Promise resolving to the setting details
1158
1328
  */
1159
1329
  async getSettingByKey(key) {
1160
- log5("Getting setting: %s", key);
1330
+ log6("Getting setting: %s", key);
1161
1331
  const result = await this.request(`/admin/settings/${key}`);
1162
- log5("Setting retrieved");
1332
+ log6("Setting retrieved");
1163
1333
  return result;
1164
1334
  }
1165
1335
  /**
@@ -1169,12 +1339,12 @@ var SettingsService = class extends BaseSDK {
1169
1339
  * @returns Promise resolving to the created setting
1170
1340
  */
1171
1341
  async createSetting(data) {
1172
- log5("Creating setting: %O", data);
1342
+ log6("Creating setting: %O", data);
1173
1343
  const result = await this.request("/admin/settings", {
1174
1344
  body: JSON.stringify(data),
1175
1345
  method: "POST"
1176
1346
  });
1177
- log5("Setting created successfully");
1347
+ log6("Setting created successfully");
1178
1348
  return result;
1179
1349
  }
1180
1350
  /**
@@ -1185,12 +1355,12 @@ var SettingsService = class extends BaseSDK {
1185
1355
  * @returns Promise resolving to the updated setting
1186
1356
  */
1187
1357
  async updateSetting(key, data) {
1188
- log5("Updating setting: %s, data: %O", key, data);
1358
+ log6("Updating setting: %s, data: %O", key, data);
1189
1359
  const result = await this.request(`/admin/settings/${key}`, {
1190
1360
  body: JSON.stringify(data),
1191
1361
  method: "PUT"
1192
1362
  });
1193
- log5("Setting updated successfully");
1363
+ log6("Setting updated successfully");
1194
1364
  return result;
1195
1365
  }
1196
1366
  /**
@@ -1200,18 +1370,18 @@ var SettingsService = class extends BaseSDK {
1200
1370
  * @returns Promise resolving to success message
1201
1371
  */
1202
1372
  async deleteSetting(key) {
1203
- log5("Deleting setting: %s", key);
1373
+ log6("Deleting setting: %s", key);
1204
1374
  const result = await this.request(`/admin/settings/${key}`, {
1205
1375
  method: "DELETE"
1206
1376
  });
1207
- log5("Setting deleted successfully");
1377
+ log6("Setting deleted successfully");
1208
1378
  return result;
1209
1379
  }
1210
1380
  };
1211
1381
 
1212
1382
  // src/admin/services/ReviewService.ts
1213
- import debug6 from "debug";
1214
- var log6 = debug6("lobe-market-sdk:admin:review");
1383
+ import debug7 from "debug";
1384
+ var log7 = debug7("lobe-market-sdk:admin:review");
1215
1385
  var ReviewService = class extends BaseSDK {
1216
1386
  /**
1217
1387
  * Retrieves a list of reviews with filtering options
@@ -1220,11 +1390,11 @@ var ReviewService = class extends BaseSDK {
1220
1390
  * @returns Promise resolving to the review list response
1221
1391
  */
1222
1392
  async getReviews(params = {}) {
1223
- log6("Getting reviews with params: %O", params);
1393
+ log7("Getting reviews with params: %O", params);
1224
1394
  const queryString = this.buildQueryString(params);
1225
1395
  const url = `/admin/reviews${queryString ? `?${queryString}` : ""}`;
1226
1396
  const result = await this.request(url);
1227
- log6("Retrieved %d reviews", result.data.length);
1397
+ log7("Retrieved %d reviews", result.data.length);
1228
1398
  return result;
1229
1399
  }
1230
1400
  /**
@@ -1234,9 +1404,9 @@ var ReviewService = class extends BaseSDK {
1234
1404
  * @returns Promise resolving to the review details
1235
1405
  */
1236
1406
  async getReviewById(id) {
1237
- log6("Getting review details: %d", id);
1407
+ log7("Getting review details: %d", id);
1238
1408
  const result = await this.request(`/admin/reviews/${id}`);
1239
- log6("Review details retrieved");
1409
+ log7("Review details retrieved");
1240
1410
  return result;
1241
1411
  }
1242
1412
  /**
@@ -1247,12 +1417,12 @@ var ReviewService = class extends BaseSDK {
1247
1417
  * @returns Promise resolving to the updated review
1248
1418
  */
1249
1419
  async updateReview(id, data) {
1250
- log6("Updating review: %d, data: %O", id, data);
1420
+ log7("Updating review: %d, data: %O", id, data);
1251
1421
  const result = await this.request(`/admin/reviews/${id}`, {
1252
1422
  body: JSON.stringify(data),
1253
1423
  method: "PUT"
1254
1424
  });
1255
- log6("Review updated successfully");
1425
+ log7("Review updated successfully");
1256
1426
  return result;
1257
1427
  }
1258
1428
  /**
@@ -1262,16 +1432,16 @@ var ReviewService = class extends BaseSDK {
1262
1432
  * @returns Promise resolving to an array of reviews for the plugin
1263
1433
  */
1264
1434
  async getPluginReviews(pluginId) {
1265
- log6("Getting plugin reviews: pluginId=%d", pluginId);
1435
+ log7("Getting plugin reviews: pluginId=%d", pluginId);
1266
1436
  const result = await this.request(`/admin/reviews/plugin/${pluginId}`);
1267
- log6("Retrieved %d reviews for plugin", result.data.length);
1437
+ log7("Retrieved %d reviews for plugin", result.data.length);
1268
1438
  return result;
1269
1439
  }
1270
1440
  };
1271
1441
 
1272
1442
  // src/admin/services/PluginEnvService.ts
1273
- import debug7 from "debug";
1274
- var log7 = debug7("lobe-market-sdk:admin:plugin-env");
1443
+ import debug8 from "debug";
1444
+ var log8 = debug8("lobe-market-sdk:admin:plugin-env");
1275
1445
  var PluginEnvService = class extends BaseSDK {
1276
1446
  /**
1277
1447
  * Retrieves a paginated list of plugin environment variables
@@ -1280,11 +1450,11 @@ var PluginEnvService = class extends BaseSDK {
1280
1450
  * @returns Promise resolving to the env list response
1281
1451
  */
1282
1452
  async getPluginEnvs(params = {}) {
1283
- log7("Getting plugin envs with params: %O", params);
1453
+ log8("Getting plugin envs with params: %O", params);
1284
1454
  const queryString = this.buildQueryString(params);
1285
1455
  const url = `/admin/plugins/env${queryString}`;
1286
1456
  const result = await this.request(url);
1287
- log7("Retrieved %d plugin envs", result.data.length);
1457
+ log8("Retrieved %d plugin envs", result.data.length);
1288
1458
  return result;
1289
1459
  }
1290
1460
  /**
@@ -1294,9 +1464,9 @@ var PluginEnvService = class extends BaseSDK {
1294
1464
  * @returns Promise resolving to the env item
1295
1465
  */
1296
1466
  async getPluginEnv(id) {
1297
- log7("Getting plugin env: %d", id);
1467
+ log8("Getting plugin env: %d", id);
1298
1468
  const result = await this.request(`/admin/plugins/env/${id}`);
1299
- log7("Retrieved plugin env: %d", id);
1469
+ log8("Retrieved plugin env: %d", id);
1300
1470
  return result;
1301
1471
  }
1302
1472
  /**
@@ -1306,12 +1476,12 @@ var PluginEnvService = class extends BaseSDK {
1306
1476
  * @returns Promise resolving to the created env item
1307
1477
  */
1308
1478
  async createPluginEnv(data) {
1309
- log7("Creating plugin env: %O", data);
1479
+ log8("Creating plugin env: %O", data);
1310
1480
  const result = await this.request(`/admin/plugins/env`, {
1311
1481
  body: JSON.stringify(data),
1312
1482
  method: "POST"
1313
1483
  });
1314
- log7("Plugin env created successfully");
1484
+ log8("Plugin env created successfully");
1315
1485
  return result;
1316
1486
  }
1317
1487
  /**
@@ -1322,12 +1492,12 @@ var PluginEnvService = class extends BaseSDK {
1322
1492
  * @returns Promise resolving to the updated env item
1323
1493
  */
1324
1494
  async updatePluginEnv(id, data) {
1325
- log7("Updating plugin env: %d, data: %O", id, data);
1495
+ log8("Updating plugin env: %d, data: %O", id, data);
1326
1496
  const result = await this.request(`/admin/plugins/env/${id}`, {
1327
1497
  body: JSON.stringify(data),
1328
1498
  method: "PUT"
1329
1499
  });
1330
- log7("Plugin env updated successfully");
1500
+ log8("Plugin env updated successfully");
1331
1501
  return result;
1332
1502
  }
1333
1503
  /**
@@ -1337,11 +1507,11 @@ var PluginEnvService = class extends BaseSDK {
1337
1507
  * @returns Promise resolving to success response
1338
1508
  */
1339
1509
  async deletePluginEnv(id) {
1340
- log7("Deleting plugin env: %d", id);
1510
+ log8("Deleting plugin env: %d", id);
1341
1511
  const result = await this.request(`/admin/plugins/env/${id}`, {
1342
1512
  method: "DELETE"
1343
1513
  });
1344
- log7("Plugin env deleted successfully");
1514
+ log8("Plugin env deleted successfully");
1345
1515
  return result;
1346
1516
  }
1347
1517
  /**
@@ -1351,18 +1521,18 @@ var PluginEnvService = class extends BaseSDK {
1351
1521
  * @returns Promise resolving to import result
1352
1522
  */
1353
1523
  async importPluginEnvs(data) {
1354
- log7("Batch importing plugin envs: %O", data);
1524
+ log8("Batch importing plugin envs: %O", data);
1355
1525
  const result = await this.request(`/admin/plugins/env/import`, {
1356
1526
  body: JSON.stringify(data),
1357
1527
  method: "POST"
1358
1528
  });
1359
- log7("Batch import completed: %d envs imported", result.success);
1529
+ log8("Batch import completed: %d envs imported", result.success);
1360
1530
  return result;
1361
1531
  }
1362
1532
  };
1363
1533
 
1364
1534
  // src/admin/MarketAdmin.ts
1365
- var log8 = debug8("lobe-market-sdk:admin");
1535
+ var log9 = debug9("lobe-market-sdk:admin");
1366
1536
  var MarketAdmin = class extends BaseSDK {
1367
1537
  /**
1368
1538
  * Creates a new MarketAdmin instance
@@ -1376,23 +1546,24 @@ var MarketAdmin = class extends BaseSDK {
1376
1546
  tokenExpiry: void 0
1377
1547
  };
1378
1548
  super({ ...options, apiKey }, void 0, sharedTokenState);
1379
- log8("MarketAdmin instance created");
1549
+ log9("MarketAdmin instance created");
1550
+ this.agents = new AgentService(options, this.headers, sharedTokenState);
1380
1551
  this.analysis = new AnalysisService(options, this.headers, sharedTokenState);
1552
+ this.dependencies = new SystemDependencyService(options, this.headers, sharedTokenState);
1553
+ this.env = new PluginEnvService(options, this.headers, sharedTokenState);
1381
1554
  this.plugins = new PluginService(options, this.headers, sharedTokenState);
1382
1555
  this.reviews = new ReviewService(options, this.headers, sharedTokenState);
1383
1556
  this.settings = new SettingsService(options, this.headers, sharedTokenState);
1384
- this.dependencies = new SystemDependencyService(options, this.headers, sharedTokenState);
1385
- this.env = new PluginEnvService(options, this.headers, sharedTokenState);
1386
1557
  }
1387
1558
  };
1388
1559
 
1389
1560
  // src/market/market-sdk.ts
1390
- import debug18 from "debug";
1561
+ import debug19 from "debug";
1391
1562
 
1392
1563
  // src/market/services/AgentService.ts
1393
- import debug9 from "debug";
1394
- var log9 = debug9("lobe-market-sdk:agents");
1395
- var AgentService = class extends BaseSDK {
1564
+ import debug10 from "debug";
1565
+ var log10 = debug10("lobe-market-sdk:agents");
1566
+ var AgentService2 = class extends BaseSDK {
1396
1567
  /**
1397
1568
  * Retrieves a list of agents from the marketplace
1398
1569
  *
@@ -1406,9 +1577,9 @@ var AgentService = class extends BaseSDK {
1406
1577
  const locale = params.locale || this.defaultLocale;
1407
1578
  const queryParams = { ...params, locale };
1408
1579
  const queryString = this.buildQueryString(queryParams);
1409
- log9("Getting agent list: %O", queryParams);
1580
+ log10("Getting agent list: %O", queryParams);
1410
1581
  const result = await this.request(`/v1/agents${queryString}`, options);
1411
- log9("Retrieved %d agents", result.items.length);
1582
+ log10("Retrieved %d agents", result.items.length);
1412
1583
  return result;
1413
1584
  }
1414
1585
  /**
@@ -1425,9 +1596,9 @@ var AgentService = class extends BaseSDK {
1425
1596
  const locale = params.locale || this.defaultLocale;
1426
1597
  const queryParams = { ...params, locale };
1427
1598
  const queryString = this.buildQueryString(queryParams);
1428
- log9("Getting own agent list: %O", queryParams);
1599
+ log10("Getting own agent list: %O", queryParams);
1429
1600
  const result = await this.request(`/v1/agents/own${queryString}`, options);
1430
- log9("Retrieved %d own agents", result.items.length);
1601
+ log10("Retrieved %d own agents", result.items.length);
1431
1602
  return result;
1432
1603
  }
1433
1604
  /**
@@ -1448,12 +1619,12 @@ var AgentService = class extends BaseSDK {
1448
1619
  queryParams.version = params.version.toString();
1449
1620
  }
1450
1621
  const queryString = this.buildQueryString(queryParams);
1451
- log9("Getting agent detail: %O", { id, ...params });
1622
+ log10("Getting agent detail: %O", { id, ...params });
1452
1623
  const result = await this.request(
1453
1624
  `/v1/agents/detail/${id}${queryString}`,
1454
1625
  options
1455
1626
  );
1456
- log9("Agent detail successfully retrieved: %s", id);
1627
+ log10("Agent detail successfully retrieved: %s", id);
1457
1628
  return result;
1458
1629
  }
1459
1630
  /**
@@ -1467,12 +1638,12 @@ var AgentService = class extends BaseSDK {
1467
1638
  * @returns Promise resolving to an array containing identifiers array and last modified time
1468
1639
  */
1469
1640
  async getPublishedIdentifiers(options) {
1470
- log9("Getting published agent identifiers");
1641
+ log10("Getting published agent identifiers");
1471
1642
  const result = await this.request(
1472
1643
  "/v1/agents/identifiers",
1473
1644
  options
1474
1645
  );
1475
- log9("Retrieved %d published agent identifiers", result.length);
1646
+ log10("Retrieved %d published agent identifiers", result.length);
1476
1647
  return result;
1477
1648
  }
1478
1649
  /**
@@ -1490,12 +1661,12 @@ var AgentService = class extends BaseSDK {
1490
1661
  const locale = params.locale || this.defaultLocale;
1491
1662
  const queryParams = { ...params, locale };
1492
1663
  const queryString = this.buildQueryString(queryParams);
1493
- log9("Getting agent categories: %O", queryParams);
1664
+ log10("Getting agent categories: %O", queryParams);
1494
1665
  const result = await this.request(
1495
1666
  `/v1/agents/categories${queryString}`,
1496
1667
  options
1497
1668
  );
1498
- log9("Retrieved %d categories", result.length);
1669
+ log10("Retrieved %d categories", result.length);
1499
1670
  return result;
1500
1671
  }
1501
1672
  /**
@@ -1509,7 +1680,7 @@ var AgentService = class extends BaseSDK {
1509
1680
  * @returns Promise resolving to the upload response
1510
1681
  */
1511
1682
  async uploadAgent(agentData, options) {
1512
- log9("Uploading agent: %s@%s", agentData.agentIdentifier, agentData.version.version);
1683
+ log10("Uploading agent: %s@%s", agentData.agentIdentifier, agentData.version.version);
1513
1684
  const result = await this.request("/v1/agents/upload", {
1514
1685
  body: JSON.stringify(agentData),
1515
1686
  headers: {
@@ -1518,7 +1689,7 @@ var AgentService = class extends BaseSDK {
1518
1689
  method: "POST",
1519
1690
  ...options
1520
1691
  });
1521
- log9("Agent uploaded successfully: %O", result);
1692
+ log10("Agent uploaded successfully: %O", result);
1522
1693
  return result;
1523
1694
  }
1524
1695
  /**
@@ -1529,7 +1700,7 @@ var AgentService = class extends BaseSDK {
1529
1700
  * @returns Promise resolving to the created agent response
1530
1701
  */
1531
1702
  async createAgent(agentData, options) {
1532
- log9("Creating agent: %s", agentData.identifier);
1703
+ log10("Creating agent: %s", agentData.identifier);
1533
1704
  const result = await this.request("/v1/agents/create", {
1534
1705
  body: JSON.stringify(agentData),
1535
1706
  headers: {
@@ -1538,7 +1709,7 @@ var AgentService = class extends BaseSDK {
1538
1709
  method: "POST",
1539
1710
  ...options
1540
1711
  });
1541
- log9("Agent created successfully: %O", result);
1712
+ log10("Agent created successfully: %O", result);
1542
1713
  return result;
1543
1714
  }
1544
1715
  /**
@@ -1549,7 +1720,7 @@ var AgentService = class extends BaseSDK {
1549
1720
  * @returns Promise resolving to the created version response
1550
1721
  */
1551
1722
  async createAgentVersion(versionData, options) {
1552
- log9("Creating agent version: %s", versionData.identifier);
1723
+ log10("Creating agent version: %s", versionData.identifier);
1553
1724
  const result = await this.request("/v1/agents/version/create", {
1554
1725
  body: JSON.stringify(versionData),
1555
1726
  headers: {
@@ -1558,7 +1729,7 @@ var AgentService = class extends BaseSDK {
1558
1729
  method: "POST",
1559
1730
  ...options
1560
1731
  });
1561
- log9("Agent version created successfully: %O", result);
1732
+ log10("Agent version created successfully: %O", result);
1562
1733
  return result;
1563
1734
  }
1564
1735
  /**
@@ -1569,7 +1740,7 @@ var AgentService = class extends BaseSDK {
1569
1740
  * @returns Promise resolving to the modified agent response
1570
1741
  */
1571
1742
  async modifyAgent(agentData, options) {
1572
- log9("Modifying agent: %s", agentData.identifier);
1743
+ log10("Modifying agent: %s", agentData.identifier);
1573
1744
  const result = await this.request("/v1/agents/modify", {
1574
1745
  body: JSON.stringify(agentData),
1575
1746
  headers: {
@@ -1578,7 +1749,7 @@ var AgentService = class extends BaseSDK {
1578
1749
  method: "POST",
1579
1750
  ...options
1580
1751
  });
1581
- log9("Agent modified successfully: %O", result);
1752
+ log10("Agent modified successfully: %O", result);
1582
1753
  return result;
1583
1754
  }
1584
1755
  /**
@@ -1589,7 +1760,7 @@ var AgentService = class extends BaseSDK {
1589
1760
  * @returns Promise resolving to the modified version response
1590
1761
  */
1591
1762
  async modifyAgentVersion(versionData, options) {
1592
- log9("Modifying agent version: %s@%s", versionData.identifier, versionData.version);
1763
+ log10("Modifying agent version: %s@%s", versionData.identifier, versionData.version);
1593
1764
  const result = await this.request("/v1/agents/version/modify", {
1594
1765
  body: JSON.stringify(versionData),
1595
1766
  headers: {
@@ -1598,7 +1769,7 @@ var AgentService = class extends BaseSDK {
1598
1769
  method: "POST",
1599
1770
  ...options
1600
1771
  });
1601
- log9("Agent version modified successfully: %O", result);
1772
+ log10("Agent version modified successfully: %O", result);
1602
1773
  return result;
1603
1774
  }
1604
1775
  /**
@@ -1609,13 +1780,13 @@ var AgentService = class extends BaseSDK {
1609
1780
  * @returns Promise resolving to true if agent exists, false otherwise
1610
1781
  */
1611
1782
  async checkAgentExists(identifier, options) {
1612
- log9("Checking if agent exists: %s", identifier);
1783
+ log10("Checking if agent exists: %s", identifier);
1613
1784
  try {
1614
1785
  await this.getAgentDetail(identifier, {}, options);
1615
- log9("Agent exists: %s", identifier);
1786
+ log10("Agent exists: %s", identifier);
1616
1787
  return true;
1617
1788
  } catch (e) {
1618
- log9("Agent does not exist: %s", identifier);
1789
+ log10("Agent does not exist: %s", identifier);
1619
1790
  return false;
1620
1791
  }
1621
1792
  }
@@ -1630,7 +1801,7 @@ var AgentService = class extends BaseSDK {
1630
1801
  * @returns Promise resolving to the updated install count response
1631
1802
  */
1632
1803
  async increaseInstallCount(identifier, options) {
1633
- log9("Increasing install count for agent: %s", identifier);
1804
+ log10("Increasing install count for agent: %s", identifier);
1634
1805
  const result = await this.request("/v1/agents/install-count", {
1635
1806
  body: JSON.stringify({ identifier }),
1636
1807
  headers: {
@@ -1639,7 +1810,7 @@ var AgentService = class extends BaseSDK {
1639
1810
  method: "POST",
1640
1811
  ...options
1641
1812
  });
1642
- log9("Install count increased for agent %s: %d", identifier, result.installCount);
1813
+ log10("Install count increased for agent %s: %d", identifier, result.installCount);
1643
1814
  return result;
1644
1815
  }
1645
1816
  /**
@@ -1654,9 +1825,9 @@ var AgentService = class extends BaseSDK {
1654
1825
  * @returns Promise resolving to the status change response
1655
1826
  */
1656
1827
  async changeStatus(identifier, status, options) {
1657
- log9("Changing agent status: %s -> %s", identifier, status);
1828
+ log10("Changing agent status: %s -> %s", identifier, status);
1658
1829
  const result = await this.modifyAgent({ identifier, status }, options);
1659
- log9("Agent status changed: %s -> %s", identifier, result.status);
1830
+ log10("Agent status changed: %s -> %s", identifier, result.status);
1660
1831
  return {
1661
1832
  identifier: result.identifier,
1662
1833
  status: result.status,
@@ -1674,7 +1845,7 @@ var AgentService = class extends BaseSDK {
1674
1845
  * @returns Promise resolving to the status change response
1675
1846
  */
1676
1847
  async publish(identifier, options) {
1677
- log9("Publishing agent: %s", identifier);
1848
+ log10("Publishing agent: %s", identifier);
1678
1849
  return this.changeStatus(identifier, "published", options);
1679
1850
  }
1680
1851
  /**
@@ -1689,7 +1860,7 @@ var AgentService = class extends BaseSDK {
1689
1860
  * @returns Promise resolving to the status change response
1690
1861
  */
1691
1862
  async unpublish(identifier, options) {
1692
- log9("Unpublishing agent: %s", identifier);
1863
+ log10("Unpublishing agent: %s", identifier);
1693
1864
  return this.changeStatus(identifier, "unpublished", options);
1694
1865
  }
1695
1866
  /**
@@ -1704,7 +1875,7 @@ var AgentService = class extends BaseSDK {
1704
1875
  * @returns Promise resolving to the status change response
1705
1876
  */
1706
1877
  async archive(identifier, options) {
1707
- log9("Archiving agent: %s", identifier);
1878
+ log10("Archiving agent: %s", identifier);
1708
1879
  return this.changeStatus(identifier, "archived", options);
1709
1880
  }
1710
1881
  /**
@@ -1719,15 +1890,15 @@ var AgentService = class extends BaseSDK {
1719
1890
  * @returns Promise resolving to the status change response
1720
1891
  */
1721
1892
  async deprecate(identifier, options) {
1722
- log9("Deprecating agent: %s", identifier);
1893
+ log10("Deprecating agent: %s", identifier);
1723
1894
  return this.changeStatus(identifier, "deprecated", options);
1724
1895
  }
1725
1896
  };
1726
1897
 
1727
1898
  // src/market/services/AuthService.ts
1728
- import debug10 from "debug";
1899
+ import debug11 from "debug";
1729
1900
  import urlJoin2 from "url-join";
1730
- var log10 = debug10("lobe-market-sdk:auth");
1901
+ var log11 = debug11("lobe-market-sdk:auth");
1731
1902
  var _AuthService = class _AuthService extends BaseSDK {
1732
1903
  /** Normalize token response from snake_case to camelCase fields */
1733
1904
  static normalizeTokenResponse(data) {
@@ -1759,7 +1930,7 @@ var _AuthService = class _AuthService extends BaseSDK {
1759
1930
  if (grantType !== "authorization_code" && grantType !== "refresh_token") {
1760
1931
  throw new Error(`Unsupported grant type: ${grantType}`);
1761
1932
  }
1762
- log10("Exchanging OAuth token using grant_type=%s", grantType);
1933
+ log11("Exchanging OAuth token using grant_type=%s", grantType);
1763
1934
  const tokenUrl = urlJoin2(this.baseUrl, "lobehub-oidc/token");
1764
1935
  const params = new URLSearchParams();
1765
1936
  params.set("grant_type", grantType);
@@ -1801,16 +1972,16 @@ var _AuthService = class _AuthService extends BaseSDK {
1801
1972
  try {
1802
1973
  payload = await response.json();
1803
1974
  } catch (error) {
1804
- log10("Failed to parse token response: %O", error);
1975
+ log11("Failed to parse token response: %O", error);
1805
1976
  throw new Error(`Failed to parse token response: ${response.status} ${response.statusText}`);
1806
1977
  }
1807
1978
  if (!response.ok) {
1808
1979
  const errorDescription = (payload == null ? void 0 : payload.error_description) || (payload == null ? void 0 : payload.error) || response.statusText;
1809
1980
  const errorMsg = `Token exchange failed: ${response.status} ${errorDescription}`;
1810
- log10("Error: %s", errorMsg);
1981
+ log11("Error: %s", errorMsg);
1811
1982
  throw new Error(errorMsg);
1812
1983
  }
1813
- log10("Token exchange successful");
1984
+ log11("Token exchange successful");
1814
1985
  return _AuthService.normalizeTokenResponse(payload);
1815
1986
  }
1816
1987
  /**
@@ -1823,7 +1994,7 @@ var _AuthService = class _AuthService extends BaseSDK {
1823
1994
  * @returns Promise resolving to the user information
1824
1995
  */
1825
1996
  async getUserInfo(accessToken, options) {
1826
- log10("Getting user info");
1997
+ log11("Getting user info");
1827
1998
  const userInfoUrl = urlJoin2(this.baseUrl, "lobehub-oidc/userinfo");
1828
1999
  const response = await fetch(userInfoUrl, {
1829
2000
  headers: {
@@ -1835,11 +2006,11 @@ var _AuthService = class _AuthService extends BaseSDK {
1835
2006
  });
1836
2007
  if (!response.ok) {
1837
2008
  const errorMsg = `Failed to fetch user info: ${response.status} ${response.statusText}`;
1838
- log10("Error: %s", errorMsg);
2009
+ log11("Error: %s", errorMsg);
1839
2010
  throw new Error(errorMsg);
1840
2011
  }
1841
2012
  const userInfo = await response.json();
1842
- log10("User info retrieved successfully");
2013
+ log11("User info retrieved successfully");
1843
2014
  return userInfo;
1844
2015
  }
1845
2016
  /**
@@ -1853,7 +2024,7 @@ var _AuthService = class _AuthService extends BaseSDK {
1853
2024
  * @returns Promise resolving to the client credentials
1854
2025
  */
1855
2026
  async registerClient(clientData, options) {
1856
- log10("Registering client: %s (%s)", clientData.clientName, clientData.clientType);
2027
+ log11("Registering client: %s (%s)", clientData.clientName, clientData.clientType);
1857
2028
  const result = await this.request("/v1/clients/register", {
1858
2029
  body: JSON.stringify(clientData),
1859
2030
  headers: {
@@ -1862,7 +2033,7 @@ var _AuthService = class _AuthService extends BaseSDK {
1862
2033
  method: "POST",
1863
2034
  ...options
1864
2035
  });
1865
- log10("Client registered successfully: %s", result.client_id);
2036
+ log11("Client registered successfully: %s", result.client_id);
1866
2037
  return result;
1867
2038
  }
1868
2039
  /**
@@ -1874,9 +2045,9 @@ var _AuthService = class _AuthService extends BaseSDK {
1874
2045
  * @returns Promise resolving to the access token and expiration time
1875
2046
  */
1876
2047
  async getM2MToken() {
1877
- log10("Fetching M2M token");
2048
+ log11("Fetching M2M token");
1878
2049
  const tokenInfo = await this.fetchM2MToken();
1879
- log10("M2M token fetched successfully");
2050
+ log11("M2M token fetched successfully");
1880
2051
  return tokenInfo;
1881
2052
  }
1882
2053
  /** OAuth handoff response shapes */
@@ -1902,7 +2073,7 @@ var _AuthService = class _AuthService extends BaseSDK {
1902
2073
  async getOAuthHandoff(id, options) {
1903
2074
  var _a, _b;
1904
2075
  if (!id) throw new Error("id is required");
1905
- log10("Getting OAuth handoff: %s", id);
2076
+ log11("Getting OAuth handoff: %s", id);
1906
2077
  const handoffUrl = `${urlJoin2(this.baseUrl, "lobehub-oidc/handoff")}?id=${encodeURIComponent(id)}`;
1907
2078
  const response = await fetch(handoffUrl, {
1908
2079
  headers: {
@@ -1918,19 +2089,19 @@ var _AuthService = class _AuthService extends BaseSDK {
1918
2089
  code: json.code,
1919
2090
  redirectUri: json.redirectUri
1920
2091
  });
1921
- log10("OAuth handoff success for id: %s", id);
2092
+ log11("OAuth handoff success for id: %s", id);
1922
2093
  return result;
1923
2094
  }
1924
2095
  if (response.status === 202) {
1925
- log10("OAuth handoff pending for id: %s", id);
2096
+ log11("OAuth handoff pending for id: %s", id);
1926
2097
  return { status: _AuthService.HANDOFF_PENDING_STATUS };
1927
2098
  }
1928
2099
  if (response.status === 404) {
1929
- log10("OAuth handoff consumed for id: %s", id);
2100
+ log11("OAuth handoff consumed for id: %s", id);
1930
2101
  return { status: _AuthService.HANDOFF_CONSUMED_STATUS };
1931
2102
  }
1932
2103
  if (response.status === 410) {
1933
- log10("OAuth handoff expired for id: %s", id);
2104
+ log11("OAuth handoff expired for id: %s", id);
1934
2105
  return { status: _AuthService.HANDOFF_EXPIRED_STATUS };
1935
2106
  }
1936
2107
  let errorMessage = `Failed to fetch OAuth handoff (status ${response.status} ${response.statusText})`;
@@ -1941,7 +2112,7 @@ var _AuthService = class _AuthService extends BaseSDK {
1941
2112
  }
1942
2113
  } catch (e) {
1943
2114
  }
1944
- log10("Error: %s", errorMessage);
2115
+ log11("Error: %s", errorMessage);
1945
2116
  throw new Error(errorMessage);
1946
2117
  }
1947
2118
  /**
@@ -1955,21 +2126,21 @@ var _AuthService = class _AuthService extends BaseSDK {
1955
2126
  const timeoutMs = (_b = params.timeoutMs) != null ? _b : 6e4;
1956
2127
  const startedAt = Date.now();
1957
2128
  const { signal, requestInit } = params;
1958
- log10("Start polling OAuth handoff: %s", id);
2129
+ log11("Start polling OAuth handoff: %s", id);
1959
2130
  while (true) {
1960
2131
  if (signal == null ? void 0 : signal.aborted) {
1961
2132
  const err = new Error("Polling aborted");
1962
- log10("Error: %s", err.message);
2133
+ log11("Error: %s", err.message);
1963
2134
  throw err;
1964
2135
  }
1965
2136
  if (Date.now() - startedAt > timeoutMs) {
1966
2137
  const err = new Error("Polling timeout");
1967
- log10("Error: %s", err.message);
2138
+ log11("Error: %s", err.message);
1968
2139
  throw err;
1969
2140
  }
1970
2141
  const result = await this.getOAuthHandoff(id, requestInit);
1971
2142
  if (result.status === "success" || result.status === "expired" || result.status === "consumed") {
1972
- log10("Stop polling OAuth handoff (terminal): %s -> %s", id, result.status);
2143
+ log11("Stop polling OAuth handoff (terminal): %s -> %s", id, result.status);
1973
2144
  return result;
1974
2145
  }
1975
2146
  await new Promise((resolve) => {
@@ -1990,9 +2161,9 @@ _AuthService.HANDOFF_EXPIRED_STATUS = "expired";
1990
2161
  var AuthService = _AuthService;
1991
2162
 
1992
2163
  // src/market/services/DiscoveryService.ts
1993
- import debug11 from "debug";
2164
+ import debug12 from "debug";
1994
2165
  import urlJoin3 from "url-join";
1995
- var log11 = debug11("lobe-market-sdk:discovery");
2166
+ var log12 = debug12("lobe-market-sdk:discovery");
1996
2167
  var DiscoveryService = class extends BaseSDK {
1997
2168
  /**
1998
2169
  * Retrieves the service discovery document
@@ -2004,9 +2175,9 @@ var DiscoveryService = class extends BaseSDK {
2004
2175
  * @returns Promise resolving to the service discovery document
2005
2176
  */
2006
2177
  async getDiscoveryDocument() {
2007
- log11("Fetching discovery document");
2178
+ log12("Fetching discovery document");
2008
2179
  if (this.discoveryDoc) {
2009
- log11("Returning cached discovery document");
2180
+ log12("Returning cached discovery document");
2010
2181
  return this.discoveryDoc;
2011
2182
  }
2012
2183
  const res = await fetch(urlJoin3(this.baseUrl, "/.well-known/discovery"));
@@ -2014,14 +2185,14 @@ var DiscoveryService = class extends BaseSDK {
2014
2185
  throw new Error(await res.text());
2015
2186
  }
2016
2187
  this.discoveryDoc = await res.json();
2017
- log11("Discovery document successfully fetched");
2188
+ log12("Discovery document successfully fetched");
2018
2189
  return this.discoveryDoc;
2019
2190
  }
2020
2191
  };
2021
2192
 
2022
2193
  // src/market/services/FeedbackService.ts
2023
- import debug12 from "debug";
2024
- var log12 = debug12("lobe-market-sdk:feedback");
2194
+ import debug13 from "debug";
2195
+ var log13 = debug13("lobe-market-sdk:feedback");
2025
2196
  var FeedbackService = class extends BaseSDK {
2026
2197
  /**
2027
2198
  * Submits user feedback
@@ -2051,7 +2222,7 @@ var FeedbackService = class extends BaseSDK {
2051
2222
  * ```
2052
2223
  */
2053
2224
  async submitFeedback(data, options) {
2054
- log12("Submitting feedback: %s", data.title);
2225
+ log13("Submitting feedback: %s", data.title);
2055
2226
  const result = await this.request("/v1/user/feedback", {
2056
2227
  body: JSON.stringify(data),
2057
2228
  headers: {
@@ -2060,14 +2231,14 @@ var FeedbackService = class extends BaseSDK {
2060
2231
  method: "POST",
2061
2232
  ...options
2062
2233
  });
2063
- log12("Feedback submitted successfully: %s", result.issueId);
2234
+ log13("Feedback submitted successfully: %s", result.issueId);
2064
2235
  return result;
2065
2236
  }
2066
2237
  };
2067
2238
 
2068
2239
  // src/market/services/PluginsService.ts
2069
- import debug13 from "debug";
2070
- var log13 = debug13("lobe-market-sdk:plugins");
2240
+ import debug14 from "debug";
2241
+ var log14 = debug14("lobe-market-sdk:plugins");
2071
2242
  var PluginsService = class extends BaseSDK {
2072
2243
  /**
2073
2244
  * Retrieves a list of plugins from the marketplace
@@ -2082,9 +2253,9 @@ var PluginsService = class extends BaseSDK {
2082
2253
  const locale = params.locale || this.defaultLocale;
2083
2254
  const queryParams = { ...params, locale };
2084
2255
  const queryString = this.buildQueryString(queryParams);
2085
- log13("Getting plugin list: %O", queryParams);
2256
+ log14("Getting plugin list: %O", queryParams);
2086
2257
  const result = await this.request(`/v1/plugins${queryString}`, options);
2087
- log13("Retrieved %d plugins", result.items.length);
2258
+ log14("Retrieved %d plugins", result.items.length);
2088
2259
  return result;
2089
2260
  }
2090
2261
  /**
@@ -2102,12 +2273,12 @@ var PluginsService = class extends BaseSDK {
2102
2273
  const locale = params.locale || this.defaultLocale;
2103
2274
  const queryParams = { ...params, locale };
2104
2275
  const queryString = this.buildQueryString(queryParams);
2105
- log13("Getting plugin categories: %O", queryParams);
2276
+ log14("Getting plugin categories: %O", queryParams);
2106
2277
  const result = await this.request(
2107
2278
  `/v1/plugins/categories${queryString}`,
2108
2279
  options
2109
2280
  );
2110
- log13("Retrieved %d categories", result.length);
2281
+ log14("Retrieved %d categories", result.length);
2111
2282
  return result;
2112
2283
  }
2113
2284
  /**
@@ -2120,12 +2291,12 @@ var PluginsService = class extends BaseSDK {
2120
2291
  * @returns Promise resolving to an array containing identifiers array and last modified time
2121
2292
  */
2122
2293
  async getPublishedIdentifiers(options) {
2123
- log13("Getting published plugin identifiers");
2294
+ log14("Getting published plugin identifiers");
2124
2295
  const result = await this.request(
2125
2296
  "/v1/plugins/identifiers",
2126
2297
  options
2127
2298
  );
2128
- log13("Retrieved %d published plugin identifiers", result.length);
2299
+ log14("Retrieved %d published plugin identifiers", result.length);
2129
2300
  return result;
2130
2301
  }
2131
2302
  /**
@@ -2145,7 +2316,7 @@ var PluginsService = class extends BaseSDK {
2145
2316
  version,
2146
2317
  identifier
2147
2318
  }, options) {
2148
- log13("Getting plugin manifest: %O", { identifier, locale, version });
2319
+ log14("Getting plugin manifest: %O", { identifier, locale, version });
2149
2320
  const localeParam = locale || this.defaultLocale;
2150
2321
  const params = { locale: localeParam };
2151
2322
  if (version) {
@@ -2156,7 +2327,7 @@ var PluginsService = class extends BaseSDK {
2156
2327
  `/v1/plugins/${identifier}/manifest${queryString}`,
2157
2328
  options
2158
2329
  );
2159
- log13("Plugin manifest successfully retrieved: %s", identifier);
2330
+ log14("Plugin manifest successfully retrieved: %s", identifier);
2160
2331
  return manifest;
2161
2332
  }
2162
2333
  /**
@@ -2173,7 +2344,7 @@ var PluginsService = class extends BaseSDK {
2173
2344
  version,
2174
2345
  identifier
2175
2346
  }, options) {
2176
- log13("Getting plugin detail: %O", { identifier, locale, version });
2347
+ log14("Getting plugin detail: %O", { identifier, locale, version });
2177
2348
  const localeParam = locale || this.defaultLocale;
2178
2349
  const params = { locale: localeParam };
2179
2350
  if (version) {
@@ -2184,7 +2355,7 @@ var PluginsService = class extends BaseSDK {
2184
2355
  `/v1/plugins/${identifier}${queryString}`,
2185
2356
  options
2186
2357
  );
2187
- log13("Plugin manifest successfully retrieved: %s", identifier);
2358
+ log14("Plugin manifest successfully retrieved: %s", identifier);
2188
2359
  return manifest;
2189
2360
  }
2190
2361
  /**
@@ -2199,7 +2370,7 @@ var PluginsService = class extends BaseSDK {
2199
2370
  *
2200
2371
  */
2201
2372
  async reportInstallation(reportData) {
2202
- log13("Reporting installation for %s@%s", reportData.identifier, reportData.version);
2373
+ log14("Reporting installation for %s@%s", reportData.identifier, reportData.version);
2203
2374
  const result = await this.request("/v1/plugins/report/installation", {
2204
2375
  body: JSON.stringify(reportData),
2205
2376
  headers: {
@@ -2207,7 +2378,7 @@ var PluginsService = class extends BaseSDK {
2207
2378
  },
2208
2379
  method: "POST"
2209
2380
  });
2210
- log13("Installation report submitted successfully: %O", result);
2381
+ log14("Installation report submitted successfully: %O", result);
2211
2382
  return result;
2212
2383
  }
2213
2384
  /**
@@ -2221,7 +2392,7 @@ var PluginsService = class extends BaseSDK {
2221
2392
  * @returns Promise resolving to the report submission response
2222
2393
  */
2223
2394
  async reportCall(reportData) {
2224
- log13(
2395
+ log14(
2225
2396
  "Reporting call for %s@%s - %s:%s",
2226
2397
  reportData.identifier,
2227
2398
  reportData.version,
@@ -2235,7 +2406,7 @@ var PluginsService = class extends BaseSDK {
2235
2406
  },
2236
2407
  method: "POST"
2237
2408
  });
2238
- log13("Call report submitted successfully: %O", result);
2409
+ log14("Call report submitted successfully: %O", result);
2239
2410
  return result;
2240
2411
  }
2241
2412
  /**
@@ -2258,7 +2429,7 @@ var PluginsService = class extends BaseSDK {
2258
2429
  * ```
2259
2430
  */
2260
2431
  async callCloudGateway(request, options) {
2261
- log13("Calling cloud gateway for plugin %s, tool %s", request.identifier, request.toolName);
2432
+ log14("Calling cloud gateway for plugin %s, tool %s", request.identifier, request.toolName);
2262
2433
  const result = await this.request("/v1/plugins/cloud-gateway", {
2263
2434
  body: JSON.stringify(request),
2264
2435
  headers: {
@@ -2267,7 +2438,7 @@ var PluginsService = class extends BaseSDK {
2267
2438
  method: "POST",
2268
2439
  ...options
2269
2440
  });
2270
- log13("Cloud gateway call completed: %O", {
2441
+ log14("Cloud gateway call completed: %O", {
2271
2442
  identifier: request.identifier,
2272
2443
  isError: result.isError,
2273
2444
  toolName: request.toolName
@@ -2308,7 +2479,7 @@ var PluginsService = class extends BaseSDK {
2308
2479
  * ```
2309
2480
  */
2310
2481
  async runBuildInTool(toolName, params, context, options) {
2311
- log13("Running built-in tool: %s for user %s, topic %s", toolName, context.userId, context.topicId);
2482
+ log14("Running built-in tool: %s for user %s, topic %s", toolName, context.userId, context.topicId);
2312
2483
  const result = await this.request("/v1/plugins/run-buildin-tools", {
2313
2484
  body: JSON.stringify({
2314
2485
  params,
@@ -2322,7 +2493,7 @@ var PluginsService = class extends BaseSDK {
2322
2493
  method: "POST",
2323
2494
  ...options
2324
2495
  });
2325
- log13("Built-in tool execution completed: %O", {
2496
+ log14("Built-in tool execution completed: %O", {
2326
2497
  success: result.success,
2327
2498
  toolName
2328
2499
  });
@@ -2426,8 +2597,8 @@ var PluginsService = class extends BaseSDK {
2426
2597
  };
2427
2598
 
2428
2599
  // src/market/services/UserService.ts
2429
- import debug14 from "debug";
2430
- var log14 = debug14("lobe-market-sdk:user");
2600
+ import debug15 from "debug";
2601
+ var log15 = debug15("lobe-market-sdk:user");
2431
2602
  var UserService = class extends BaseSDK {
2432
2603
  /**
2433
2604
  * Retrieves user information by account ID or userName
@@ -2444,12 +2615,12 @@ var UserService = class extends BaseSDK {
2444
2615
  const locale = params.locale || this.defaultLocale;
2445
2616
  const queryParams = { locale };
2446
2617
  const queryString = this.buildQueryString(queryParams);
2447
- log14("Getting user info: %O", { idOrUserName, ...params });
2618
+ log15("Getting user info: %O", { idOrUserName, ...params });
2448
2619
  const result = await this.request(
2449
2620
  `/v1/user/info/${idOrUserName}${queryString}`,
2450
2621
  options
2451
2622
  );
2452
- log14("User info successfully retrieved for: %s", idOrUserName);
2623
+ log15("User info successfully retrieved for: %s", idOrUserName);
2453
2624
  return result;
2454
2625
  }
2455
2626
  /**
@@ -2464,7 +2635,7 @@ var UserService = class extends BaseSDK {
2464
2635
  * @throws Error if userName is already taken or update fails
2465
2636
  */
2466
2637
  async updateUserInfo(data, options) {
2467
- log14("Updating user info: %O", data);
2638
+ log15("Updating user info: %O", data);
2468
2639
  const result = await this.request("/v1/user/update", {
2469
2640
  body: JSON.stringify(data),
2470
2641
  headers: {
@@ -2473,14 +2644,14 @@ var UserService = class extends BaseSDK {
2473
2644
  method: "POST",
2474
2645
  ...options
2475
2646
  });
2476
- log14("User info updated successfully");
2647
+ log15("User info updated successfully");
2477
2648
  return result;
2478
2649
  }
2479
2650
  };
2480
2651
 
2481
2652
  // src/market/services/UserFollowService.ts
2482
- import debug15 from "debug";
2483
- var log15 = debug15("lobe-market-sdk:user-follow");
2653
+ import debug16 from "debug";
2654
+ var log16 = debug16("lobe-market-sdk:user-follow");
2484
2655
  var UserFollowService = class extends BaseSDK {
2485
2656
  /**
2486
2657
  * Follow a user
@@ -2494,7 +2665,7 @@ var UserFollowService = class extends BaseSDK {
2494
2665
  * @throws Error if already following or cannot follow yourself
2495
2666
  */
2496
2667
  async follow(followingId, options) {
2497
- log15("Following user: %d", followingId);
2668
+ log16("Following user: %d", followingId);
2498
2669
  const body = { followingId };
2499
2670
  const result = await this.request("/v1/user/follows", {
2500
2671
  body: JSON.stringify(body),
@@ -2504,7 +2675,7 @@ var UserFollowService = class extends BaseSDK {
2504
2675
  method: "POST",
2505
2676
  ...options
2506
2677
  });
2507
- log15("Successfully followed user: %d", followingId);
2678
+ log16("Successfully followed user: %d", followingId);
2508
2679
  return result;
2509
2680
  }
2510
2681
  /**
@@ -2519,7 +2690,7 @@ var UserFollowService = class extends BaseSDK {
2519
2690
  * @throws Error if follow relationship not found
2520
2691
  */
2521
2692
  async unfollow(followingId, options) {
2522
- log15("Unfollowing user: %d", followingId);
2693
+ log16("Unfollowing user: %d", followingId);
2523
2694
  const body = { followingId };
2524
2695
  const result = await this.request("/v1/user/follows", {
2525
2696
  body: JSON.stringify(body),
@@ -2529,7 +2700,7 @@ var UserFollowService = class extends BaseSDK {
2529
2700
  method: "DELETE",
2530
2701
  ...options
2531
2702
  });
2532
- log15("Successfully unfollowed user: %d", followingId);
2703
+ log16("Successfully unfollowed user: %d", followingId);
2533
2704
  return result;
2534
2705
  }
2535
2706
  /**
@@ -2543,13 +2714,13 @@ var UserFollowService = class extends BaseSDK {
2543
2714
  * @returns Promise resolving to follow status (isFollowing, isMutual)
2544
2715
  */
2545
2716
  async checkFollowStatus(targetUserId, options) {
2546
- log15("Checking follow status for user: %d", targetUserId);
2717
+ log16("Checking follow status for user: %d", targetUserId);
2547
2718
  const queryString = this.buildQueryString({ targetUserId: String(targetUserId) });
2548
2719
  const result = await this.request(
2549
2720
  `/v1/user/follows/check${queryString}`,
2550
2721
  options
2551
2722
  );
2552
- log15("Follow status retrieved: %O", result);
2723
+ log16("Follow status retrieved: %O", result);
2553
2724
  return result;
2554
2725
  }
2555
2726
  /**
@@ -2564,7 +2735,7 @@ var UserFollowService = class extends BaseSDK {
2564
2735
  * @returns Promise resolving to list of following users
2565
2736
  */
2566
2737
  async getFollowing(userId, params = {}, options) {
2567
- log15("Getting following list for user: %d", userId);
2738
+ log16("Getting following list for user: %d", userId);
2568
2739
  const queryParams = {};
2569
2740
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
2570
2741
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -2573,7 +2744,7 @@ var UserFollowService = class extends BaseSDK {
2573
2744
  `/v1/user/follows/${userId}/following${queryString}`,
2574
2745
  options
2575
2746
  );
2576
- log15("Following list retrieved for user: %d", userId);
2747
+ log16("Following list retrieved for user: %d", userId);
2577
2748
  return result;
2578
2749
  }
2579
2750
  /**
@@ -2588,7 +2759,7 @@ var UserFollowService = class extends BaseSDK {
2588
2759
  * @returns Promise resolving to list of followers
2589
2760
  */
2590
2761
  async getFollowers(userId, params = {}, options) {
2591
- log15("Getting followers list for user: %d", userId);
2762
+ log16("Getting followers list for user: %d", userId);
2592
2763
  const queryParams = {};
2593
2764
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
2594
2765
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -2597,14 +2768,14 @@ var UserFollowService = class extends BaseSDK {
2597
2768
  `/v1/user/follows/${userId}/followers${queryString}`,
2598
2769
  options
2599
2770
  );
2600
- log15("Followers list retrieved for user: %d", userId);
2771
+ log16("Followers list retrieved for user: %d", userId);
2601
2772
  return result;
2602
2773
  }
2603
2774
  };
2604
2775
 
2605
2776
  // src/market/services/UserFavoriteService.ts
2606
- import debug16 from "debug";
2607
- var log16 = debug16("lobe-market-sdk:user-favorite");
2777
+ import debug17 from "debug";
2778
+ var log17 = debug17("lobe-market-sdk:user-favorite");
2608
2779
  var UserFavoriteService = class extends BaseSDK {
2609
2780
  /**
2610
2781
  * Add to favorites
@@ -2619,7 +2790,7 @@ var UserFavoriteService = class extends BaseSDK {
2619
2790
  * @throws Error if already in favorites
2620
2791
  */
2621
2792
  async addFavorite(targetType, targetId, options) {
2622
- log16("Adding favorite: %s %d", targetType, targetId);
2793
+ log17("Adding favorite: %s %d", targetType, targetId);
2623
2794
  const body = { targetId, targetType };
2624
2795
  const result = await this.request("/v1/user/favorites", {
2625
2796
  body: JSON.stringify(body),
@@ -2629,7 +2800,7 @@ var UserFavoriteService = class extends BaseSDK {
2629
2800
  method: "POST",
2630
2801
  ...options
2631
2802
  });
2632
- log16("Successfully added favorite: %s %d", targetType, targetId);
2803
+ log17("Successfully added favorite: %s %d", targetType, targetId);
2633
2804
  return result;
2634
2805
  }
2635
2806
  /**
@@ -2645,7 +2816,7 @@ var UserFavoriteService = class extends BaseSDK {
2645
2816
  * @throws Error if favorite not found
2646
2817
  */
2647
2818
  async removeFavorite(targetType, targetId, options) {
2648
- log16("Removing favorite: %s %d", targetType, targetId);
2819
+ log17("Removing favorite: %s %d", targetType, targetId);
2649
2820
  const body = { targetId, targetType };
2650
2821
  const result = await this.request("/v1/user/favorites", {
2651
2822
  body: JSON.stringify(body),
@@ -2655,7 +2826,7 @@ var UserFavoriteService = class extends BaseSDK {
2655
2826
  method: "DELETE",
2656
2827
  ...options
2657
2828
  });
2658
- log16("Successfully removed favorite: %s %d", targetType, targetId);
2829
+ log17("Successfully removed favorite: %s %d", targetType, targetId);
2659
2830
  return result;
2660
2831
  }
2661
2832
  /**
@@ -2670,7 +2841,7 @@ var UserFavoriteService = class extends BaseSDK {
2670
2841
  * @returns Promise resolving to favorite status
2671
2842
  */
2672
2843
  async checkFavorite(targetType, targetId, options) {
2673
- log16("Checking favorite status: %s %d", targetType, targetId);
2844
+ log17("Checking favorite status: %s %d", targetType, targetId);
2674
2845
  const queryString = this.buildQueryString({
2675
2846
  targetId: String(targetId),
2676
2847
  targetType
@@ -2679,7 +2850,7 @@ var UserFavoriteService = class extends BaseSDK {
2679
2850
  `/v1/user/favorites/check${queryString}`,
2680
2851
  options
2681
2852
  );
2682
- log16("Favorite status retrieved: %O", result);
2853
+ log17("Favorite status retrieved: %O", result);
2683
2854
  return result;
2684
2855
  }
2685
2856
  /**
@@ -2693,7 +2864,7 @@ var UserFavoriteService = class extends BaseSDK {
2693
2864
  * @returns Promise resolving to list of favorites
2694
2865
  */
2695
2866
  async getMyFavorites(params = {}, options) {
2696
- log16("Getting my favorites: %O", params);
2867
+ log17("Getting my favorites: %O", params);
2697
2868
  const queryParams = {};
2698
2869
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
2699
2870
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -2703,7 +2874,7 @@ var UserFavoriteService = class extends BaseSDK {
2703
2874
  `/v1/user/favorites/me${queryString}`,
2704
2875
  options
2705
2876
  );
2706
- log16("My favorites retrieved");
2877
+ log17("My favorites retrieved");
2707
2878
  return result;
2708
2879
  }
2709
2880
  /**
@@ -2718,7 +2889,7 @@ var UserFavoriteService = class extends BaseSDK {
2718
2889
  * @returns Promise resolving to list of favorites
2719
2890
  */
2720
2891
  async getUserFavorites(userId, params = {}, options) {
2721
- log16("Getting favorites for user: %d", userId);
2892
+ log17("Getting favorites for user: %d", userId);
2722
2893
  const queryParams = {};
2723
2894
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
2724
2895
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -2728,7 +2899,7 @@ var UserFavoriteService = class extends BaseSDK {
2728
2899
  `/v1/user/favorites/${userId}${queryString}`,
2729
2900
  options
2730
2901
  );
2731
- log16("Favorites retrieved for user: %d", userId);
2902
+ log17("Favorites retrieved for user: %d", userId);
2732
2903
  return result;
2733
2904
  }
2734
2905
  /**
@@ -2743,7 +2914,7 @@ var UserFavoriteService = class extends BaseSDK {
2743
2914
  * @returns Promise resolving to list of favorite agents
2744
2915
  */
2745
2916
  async getUserFavoriteAgents(userId, params = {}, options) {
2746
- log16("Getting favorite agents for user: %d", userId);
2917
+ log17("Getting favorite agents for user: %d", userId);
2747
2918
  const queryParams = {};
2748
2919
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
2749
2920
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -2752,7 +2923,7 @@ var UserFavoriteService = class extends BaseSDK {
2752
2923
  `/v1/user/favorites/${userId}/agents${queryString}`,
2753
2924
  options
2754
2925
  );
2755
- log16("Favorite agents retrieved for user: %d", userId);
2926
+ log17("Favorite agents retrieved for user: %d", userId);
2756
2927
  return result;
2757
2928
  }
2758
2929
  /**
@@ -2767,7 +2938,7 @@ var UserFavoriteService = class extends BaseSDK {
2767
2938
  * @returns Promise resolving to list of favorite plugins
2768
2939
  */
2769
2940
  async getUserFavoritePlugins(userId, params = {}, options) {
2770
- log16("Getting favorite plugins for user: %d", userId);
2941
+ log17("Getting favorite plugins for user: %d", userId);
2771
2942
  const queryParams = {};
2772
2943
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
2773
2944
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -2776,14 +2947,14 @@ var UserFavoriteService = class extends BaseSDK {
2776
2947
  `/v1/user/favorites/${userId}/plugins${queryString}`,
2777
2948
  options
2778
2949
  );
2779
- log16("Favorite plugins retrieved for user: %d", userId);
2950
+ log17("Favorite plugins retrieved for user: %d", userId);
2780
2951
  return result;
2781
2952
  }
2782
2953
  };
2783
2954
 
2784
2955
  // src/market/services/UserLikeService.ts
2785
- import debug17 from "debug";
2786
- var log17 = debug17("lobe-market-sdk:user-like");
2956
+ import debug18 from "debug";
2957
+ var log18 = debug18("lobe-market-sdk:user-like");
2787
2958
  var UserLikeService = class extends BaseSDK {
2788
2959
  /**
2789
2960
  * Like content
@@ -2798,7 +2969,7 @@ var UserLikeService = class extends BaseSDK {
2798
2969
  * @throws Error if already liked
2799
2970
  */
2800
2971
  async like(targetType, targetId, options) {
2801
- log17("Liking: %s %d", targetType, targetId);
2972
+ log18("Liking: %s %d", targetType, targetId);
2802
2973
  const body = { targetId, targetType };
2803
2974
  const result = await this.request("/v1/user/likes", {
2804
2975
  body: JSON.stringify(body),
@@ -2808,7 +2979,7 @@ var UserLikeService = class extends BaseSDK {
2808
2979
  method: "POST",
2809
2980
  ...options
2810
2981
  });
2811
- log17("Successfully liked: %s %d", targetType, targetId);
2982
+ log18("Successfully liked: %s %d", targetType, targetId);
2812
2983
  return result;
2813
2984
  }
2814
2985
  /**
@@ -2824,7 +2995,7 @@ var UserLikeService = class extends BaseSDK {
2824
2995
  * @throws Error if like not found
2825
2996
  */
2826
2997
  async unlike(targetType, targetId, options) {
2827
- log17("Unliking: %s %d", targetType, targetId);
2998
+ log18("Unliking: %s %d", targetType, targetId);
2828
2999
  const body = { targetId, targetType };
2829
3000
  const result = await this.request("/v1/user/likes", {
2830
3001
  body: JSON.stringify(body),
@@ -2834,7 +3005,7 @@ var UserLikeService = class extends BaseSDK {
2834
3005
  method: "DELETE",
2835
3006
  ...options
2836
3007
  });
2837
- log17("Successfully unliked: %s %d", targetType, targetId);
3008
+ log18("Successfully unliked: %s %d", targetType, targetId);
2838
3009
  return result;
2839
3010
  }
2840
3011
  /**
@@ -2849,7 +3020,7 @@ var UserLikeService = class extends BaseSDK {
2849
3020
  * @returns Promise resolving to toggle response with new like status
2850
3021
  */
2851
3022
  async toggleLike(targetType, targetId, options) {
2852
- log17("Toggling like: %s %d", targetType, targetId);
3023
+ log18("Toggling like: %s %d", targetType, targetId);
2853
3024
  const body = { targetId, targetType };
2854
3025
  const result = await this.request("/v1/user/likes/toggle", {
2855
3026
  body: JSON.stringify(body),
@@ -2859,7 +3030,7 @@ var UserLikeService = class extends BaseSDK {
2859
3030
  method: "POST",
2860
3031
  ...options
2861
3032
  });
2862
- log17("Like toggled, new status: %O", result);
3033
+ log18("Like toggled, new status: %O", result);
2863
3034
  return result;
2864
3035
  }
2865
3036
  /**
@@ -2874,7 +3045,7 @@ var UserLikeService = class extends BaseSDK {
2874
3045
  * @returns Promise resolving to like status
2875
3046
  */
2876
3047
  async checkLike(targetType, targetId, options) {
2877
- log17("Checking like status: %s %d", targetType, targetId);
3048
+ log18("Checking like status: %s %d", targetType, targetId);
2878
3049
  const queryString = this.buildQueryString({
2879
3050
  targetId: String(targetId),
2880
3051
  targetType
@@ -2883,7 +3054,7 @@ var UserLikeService = class extends BaseSDK {
2883
3054
  `/v1/user/likes/check${queryString}`,
2884
3055
  options
2885
3056
  );
2886
- log17("Like status retrieved: %O", result);
3057
+ log18("Like status retrieved: %O", result);
2887
3058
  return result;
2888
3059
  }
2889
3060
  /**
@@ -2897,7 +3068,7 @@ var UserLikeService = class extends BaseSDK {
2897
3068
  * @returns Promise resolving to list of likes
2898
3069
  */
2899
3070
  async getMyLikes(params = {}, options) {
2900
- log17("Getting my likes: %O", params);
3071
+ log18("Getting my likes: %O", params);
2901
3072
  const queryParams = {};
2902
3073
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
2903
3074
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -2907,7 +3078,7 @@ var UserLikeService = class extends BaseSDK {
2907
3078
  `/v1/user/likes/me${queryString}`,
2908
3079
  options
2909
3080
  );
2910
- log17("My likes retrieved");
3081
+ log18("My likes retrieved");
2911
3082
  return result;
2912
3083
  }
2913
3084
  /**
@@ -2922,7 +3093,7 @@ var UserLikeService = class extends BaseSDK {
2922
3093
  * @returns Promise resolving to list of likes
2923
3094
  */
2924
3095
  async getUserLikes(userId, params = {}, options) {
2925
- log17("Getting likes for user: %d", userId);
3096
+ log18("Getting likes for user: %d", userId);
2926
3097
  const queryParams = {};
2927
3098
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
2928
3099
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -2932,7 +3103,7 @@ var UserLikeService = class extends BaseSDK {
2932
3103
  `/v1/user/likes/${userId}${queryString}`,
2933
3104
  options
2934
3105
  );
2935
- log17("Likes retrieved for user: %d", userId);
3106
+ log18("Likes retrieved for user: %d", userId);
2936
3107
  return result;
2937
3108
  }
2938
3109
  /**
@@ -2947,7 +3118,7 @@ var UserLikeService = class extends BaseSDK {
2947
3118
  * @returns Promise resolving to list of liked agents
2948
3119
  */
2949
3120
  async getUserLikedAgents(userId, params = {}, options) {
2950
- log17("Getting liked agents for user: %d", userId);
3121
+ log18("Getting liked agents for user: %d", userId);
2951
3122
  const queryParams = {};
2952
3123
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
2953
3124
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -2956,7 +3127,7 @@ var UserLikeService = class extends BaseSDK {
2956
3127
  `/v1/user/likes/${userId}/agents${queryString}`,
2957
3128
  options
2958
3129
  );
2959
- log17("Liked agents retrieved for user: %d", userId);
3130
+ log18("Liked agents retrieved for user: %d", userId);
2960
3131
  return result;
2961
3132
  }
2962
3133
  /**
@@ -2971,7 +3142,7 @@ var UserLikeService = class extends BaseSDK {
2971
3142
  * @returns Promise resolving to list of liked plugins
2972
3143
  */
2973
3144
  async getUserLikedPlugins(userId, params = {}, options) {
2974
- log17("Getting liked plugins for user: %d", userId);
3145
+ log18("Getting liked plugins for user: %d", userId);
2975
3146
  const queryParams = {};
2976
3147
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
2977
3148
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -2980,13 +3151,13 @@ var UserLikeService = class extends BaseSDK {
2980
3151
  `/v1/user/likes/${userId}/plugins${queryString}`,
2981
3152
  options
2982
3153
  );
2983
- log17("Liked plugins retrieved for user: %d", userId);
3154
+ log18("Liked plugins retrieved for user: %d", userId);
2984
3155
  return result;
2985
3156
  }
2986
3157
  };
2987
3158
 
2988
3159
  // src/market/market-sdk.ts
2989
- var log18 = debug18("lobe-market-sdk");
3160
+ var log19 = debug19("lobe-market-sdk");
2990
3161
  var MarketSDK = class extends BaseSDK {
2991
3162
  /**
2992
3163
  * Creates a new MarketSDK instance
@@ -2999,8 +3170,8 @@ var MarketSDK = class extends BaseSDK {
2999
3170
  tokenExpiry: void 0
3000
3171
  };
3001
3172
  super(options, void 0, sharedTokenState);
3002
- log18("MarketSDK instance created");
3003
- this.agents = new AgentService(options, this.headers, sharedTokenState);
3173
+ log19("MarketSDK instance created");
3174
+ this.agents = new AgentService2(options, this.headers, sharedTokenState);
3004
3175
  this.auth = new AuthService(options, this.headers, sharedTokenState);
3005
3176
  this.plugins = new PluginsService(options, this.headers, sharedTokenState);
3006
3177
  this.user = new UserService(options, this.headers, sharedTokenState);
@@ -3034,7 +3205,7 @@ var MarketSDK = class extends BaseSDK {
3034
3205
  * @deprecated Use auth.registerClient() instead
3035
3206
  */
3036
3207
  async registerClient(request) {
3037
- log18("Registering client (deprecated method, use auth.registerClient): %s", request.clientName);
3208
+ log19("Registering client (deprecated method, use auth.registerClient): %s", request.clientName);
3038
3209
  return this.auth.registerClient(request);
3039
3210
  }
3040
3211
  };