@lobehub/market-sdk 0.40.1 → 0.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/admin/MarketAdmin.ts
2
- import debug12 from "debug";
2
+ import debug13 from "debug";
3
3
 
4
4
  // src/core/BaseSDK.ts
5
5
  import debug from "debug";
@@ -166,6 +166,9 @@ var BaseSDK = class {
166
166
  ...this.headers,
167
167
  ...options.headers
168
168
  };
169
+ if (typeof FormData !== "undefined" && options.body instanceof FormData) {
170
+ delete mergedHeaders["Content-Type"];
171
+ }
169
172
  log("Request headers: %O", mergedHeaders);
170
173
  const response = await fetch(requestUrl, {
171
174
  ...options,
@@ -342,6 +345,16 @@ var BaseSDK = class {
342
345
  import debug2 from "debug";
343
346
  var log2 = debug2("lobe-market-sdk:admin:agents");
344
347
  var AgentService = class extends BaseSDK {
348
+ /**
349
+ * Creates an Agent and its current initial version atomically.
350
+ */
351
+ async createAgent(data) {
352
+ log2("Creating Agent with initial version: %s", data.identifier);
353
+ return this.request("/admin/agents", {
354
+ body: JSON.stringify(data),
355
+ method: "POST"
356
+ });
357
+ }
345
358
  /**
346
359
  * Retrieves a list of agents with admin details
347
360
  *
@@ -416,6 +429,26 @@ var AgentService = class extends BaseSDK {
416
429
  log2("Agent updated successfully");
417
430
  return result;
418
431
  }
432
+ /**
433
+ * Updates a selected Agent version.
434
+ *
435
+ * @param id - Agent ID or identifier
436
+ * @param version - Agent or A2A implementation version string
437
+ * @param data - Mutable version fields
438
+ * @returns Promise resolving to the updated Agent version
439
+ */
440
+ async updateAgentVersion(id, version, data) {
441
+ log2("Updating agent version: %s@%s, data: %O", id, version, data);
442
+ const result = await this.request(
443
+ `/admin/agents/${encodeURIComponent(String(id))}/versions/${encodeURIComponent(version)}`,
444
+ {
445
+ body: JSON.stringify(data),
446
+ method: "PUT"
447
+ }
448
+ );
449
+ log2("Agent version updated successfully: %s@%s", id, version);
450
+ return result;
451
+ }
419
452
  /**
420
453
  * Updates agent publication status
421
454
  *
@@ -844,18 +877,17 @@ var PluginService = class extends BaseSDK {
844
877
  * This method is intended for use with scripts and bulk import operations.
845
878
  *
846
879
  * @param manifests - Array of plugin manifests to import
847
- * @param ownerId - Optional owner ID to associate with the imported plugins
880
+ * @param _ownerId - Deprecated. Imports are attributed by the server authentication context.
848
881
  * @returns Promise resolving to the import results with counts of success, skipped, failed, and a list of failed IDs
849
882
  */
850
- async importPlugins(manifests, ownerId) {
883
+ async importPlugins(manifests, _ownerId) {
851
884
  log5(`Starting batch plugin import of ${manifests.length} manifests`);
852
- if (ownerId) {
853
- log5(`Using specified owner ID for import: ${ownerId}`);
885
+ if (_ownerId !== void 0) {
886
+ log5("Ignoring caller-supplied owner ID; imports use the server authentication context");
854
887
  }
855
888
  const response = await this.request("/admin/plugins/import", {
856
889
  body: JSON.stringify({
857
- manifests,
858
- ownerId
890
+ manifests
859
891
  }),
860
892
  method: "POST"
861
893
  });
@@ -1680,9 +1712,48 @@ var SkillCollectionService = class extends BaseSDK {
1680
1712
  }
1681
1713
  };
1682
1714
 
1683
- // src/admin/services/PluginEnvService.ts
1715
+ // src/admin/services/SkillService.ts
1684
1716
  import debug10 from "debug";
1685
- var log10 = debug10("lobe-market-sdk:admin:plugin-env");
1717
+ var log10 = debug10("lobe-market-sdk:admin:skills");
1718
+ var SkillService = class extends BaseSDK {
1719
+ /**
1720
+ * Retrieve Skills with Admin API status and visibility fields.
1721
+ *
1722
+ * @param params - Query parameters for filtering and pagination
1723
+ * @returns Paginated Skill list
1724
+ */
1725
+ async getSkills(params = {}) {
1726
+ log10("Getting skills with params: %O", params);
1727
+ const queryString = this.buildQueryString(params);
1728
+ const result = await this.request(`/admin/skills${queryString}`);
1729
+ log10("Retrieved %d skills", result.items.length);
1730
+ return result;
1731
+ }
1732
+ /**
1733
+ * Import a skill from a .zip or .skill package.
1734
+ *
1735
+ * @param file - Skill package contents
1736
+ * @param options - Optional filename and identifier override
1737
+ * @returns Imported skill and version details
1738
+ */
1739
+ async importPackage(file, options = {}) {
1740
+ const filename = options.filename || (typeof File !== "undefined" && file instanceof File ? file.name : "skill.zip");
1741
+ const formData = new FormData();
1742
+ formData.set("file", file, filename);
1743
+ if (options.identifier) formData.set("identifier", options.identifier);
1744
+ log10("Importing skill package: %s", filename);
1745
+ const result = await this.request("/admin/skills/import/upload", {
1746
+ body: formData,
1747
+ method: "POST"
1748
+ });
1749
+ log10("Imported skill package %s with status %s", result.skill.identifier, result.status);
1750
+ return result;
1751
+ }
1752
+ };
1753
+
1754
+ // src/admin/services/PluginEnvService.ts
1755
+ import debug11 from "debug";
1756
+ var log11 = debug11("lobe-market-sdk:admin:plugin-env");
1686
1757
  var PluginEnvService = class extends BaseSDK {
1687
1758
  /**
1688
1759
  * Retrieves a paginated list of plugin environment variables
@@ -1691,11 +1762,11 @@ var PluginEnvService = class extends BaseSDK {
1691
1762
  * @returns Promise resolving to the env list response
1692
1763
  */
1693
1764
  async getPluginEnvs(params = {}) {
1694
- log10("Getting plugin envs with params: %O", params);
1765
+ log11("Getting plugin envs with params: %O", params);
1695
1766
  const queryString = this.buildQueryString(params);
1696
1767
  const url = `/admin/plugins/env${queryString}`;
1697
1768
  const result = await this.request(url);
1698
- log10("Retrieved %d plugin envs", result.data.length);
1769
+ log11("Retrieved %d plugin envs", result.data.length);
1699
1770
  return result;
1700
1771
  }
1701
1772
  /**
@@ -1705,9 +1776,9 @@ var PluginEnvService = class extends BaseSDK {
1705
1776
  * @returns Promise resolving to the env item
1706
1777
  */
1707
1778
  async getPluginEnv(id) {
1708
- log10("Getting plugin env: %d", id);
1779
+ log11("Getting plugin env: %d", id);
1709
1780
  const result = await this.request(`/admin/plugins/env/${id}`);
1710
- log10("Retrieved plugin env: %d", id);
1781
+ log11("Retrieved plugin env: %d", id);
1711
1782
  return result;
1712
1783
  }
1713
1784
  /**
@@ -1717,12 +1788,12 @@ var PluginEnvService = class extends BaseSDK {
1717
1788
  * @returns Promise resolving to the created env item
1718
1789
  */
1719
1790
  async createPluginEnv(data) {
1720
- log10("Creating plugin env: %O", data);
1791
+ log11("Creating plugin env: %O", data);
1721
1792
  const result = await this.request(`/admin/plugins/env`, {
1722
1793
  body: JSON.stringify(data),
1723
1794
  method: "POST"
1724
1795
  });
1725
- log10("Plugin env created successfully");
1796
+ log11("Plugin env created successfully");
1726
1797
  return result;
1727
1798
  }
1728
1799
  /**
@@ -1733,12 +1804,12 @@ var PluginEnvService = class extends BaseSDK {
1733
1804
  * @returns Promise resolving to the updated env item
1734
1805
  */
1735
1806
  async updatePluginEnv(id, data) {
1736
- log10("Updating plugin env: %d, data: %O", id, data);
1807
+ log11("Updating plugin env: %d, data: %O", id, data);
1737
1808
  const result = await this.request(`/admin/plugins/env/${id}`, {
1738
1809
  body: JSON.stringify(data),
1739
1810
  method: "PUT"
1740
1811
  });
1741
- log10("Plugin env updated successfully");
1812
+ log11("Plugin env updated successfully");
1742
1813
  return result;
1743
1814
  }
1744
1815
  /**
@@ -1748,11 +1819,11 @@ var PluginEnvService = class extends BaseSDK {
1748
1819
  * @returns Promise resolving to success response
1749
1820
  */
1750
1821
  async deletePluginEnv(id) {
1751
- log10("Deleting plugin env: %d", id);
1822
+ log11("Deleting plugin env: %d", id);
1752
1823
  const result = await this.request(`/admin/plugins/env/${id}`, {
1753
1824
  method: "DELETE"
1754
1825
  });
1755
- log10("Plugin env deleted successfully");
1826
+ log11("Plugin env deleted successfully");
1756
1827
  return result;
1757
1828
  }
1758
1829
  /**
@@ -1762,19 +1833,19 @@ var PluginEnvService = class extends BaseSDK {
1762
1833
  * @returns Promise resolving to import result
1763
1834
  */
1764
1835
  async importPluginEnvs(data) {
1765
- log10("Batch importing plugin envs: %O", data);
1836
+ log11("Batch importing plugin envs: %O", data);
1766
1837
  const result = await this.request(`/admin/plugins/env/import`, {
1767
1838
  body: JSON.stringify(data),
1768
1839
  method: "POST"
1769
1840
  });
1770
- log10("Batch import completed: %d envs imported", result.success);
1841
+ log11("Batch import completed: %d envs imported", result.success);
1771
1842
  return result;
1772
1843
  }
1773
1844
  };
1774
1845
 
1775
1846
  // src/admin/services/OrganizationService.ts
1776
- import debug11 from "debug";
1777
- var log11 = debug11("lobe-market-sdk:admin:organizations");
1847
+ import debug12 from "debug";
1848
+ var log12 = debug12("lobe-market-sdk:admin:organizations");
1778
1849
  var OrganizationService = class extends BaseSDK {
1779
1850
  /**
1780
1851
  * Retrieves a paginated list of organizations with admin details
@@ -1783,12 +1854,12 @@ var OrganizationService = class extends BaseSDK {
1783
1854
  * @returns Promise resolving to the organization list response
1784
1855
  */
1785
1856
  async getOrganizations(params = {}) {
1786
- log11("Getting organizations with params: %O", params);
1857
+ log12("Getting organizations with params: %O", params);
1787
1858
  const queryString = this.buildQueryString(params);
1788
1859
  const result = await this.request(
1789
1860
  `/admin/organizations${queryString}`
1790
1861
  );
1791
- log11("Retrieved %d organizations", result.data.length);
1862
+ log12("Retrieved %d organizations", result.data.length);
1792
1863
  return result;
1793
1864
  }
1794
1865
  /**
@@ -1798,7 +1869,7 @@ var OrganizationService = class extends BaseSDK {
1798
1869
  * @returns Promise resolving to the organization detail
1799
1870
  */
1800
1871
  async getOrganization(id) {
1801
- log11("Getting organization detail: %d", id);
1872
+ log12("Getting organization detail: %d", id);
1802
1873
  return this.request(`/admin/organizations/${id}`);
1803
1874
  }
1804
1875
  /**
@@ -1808,7 +1879,7 @@ var OrganizationService = class extends BaseSDK {
1808
1879
  * @returns Promise resolving to the member list
1809
1880
  */
1810
1881
  async getOrganizationMembers(id) {
1811
- log11("Getting organization members: %d", id);
1882
+ log12("Getting organization members: %d", id);
1812
1883
  return this.request(
1813
1884
  `/admin/organizations/${id}/members`
1814
1885
  );
@@ -1821,7 +1892,7 @@ var OrganizationService = class extends BaseSDK {
1821
1892
  * @returns Promise resolving to the updated organization
1822
1893
  */
1823
1894
  async updateOrganization(id, data) {
1824
- log11("Updating organization: %d, data: %O", id, data);
1895
+ log12("Updating organization: %d, data: %O", id, data);
1825
1896
  return this.request(`/admin/organizations/${id}`, {
1826
1897
  body: JSON.stringify(data),
1827
1898
  method: "PUT"
@@ -1834,7 +1905,7 @@ var OrganizationService = class extends BaseSDK {
1834
1905
  * @returns Promise resolving to the archived organization
1835
1906
  */
1836
1907
  async archiveOrganization(id) {
1837
- log11("Archiving organization: %d", id);
1908
+ log12("Archiving organization: %d", id);
1838
1909
  return this.request(`/admin/organizations/${id}/archive`, {
1839
1910
  method: "PATCH"
1840
1911
  });
@@ -1846,7 +1917,7 @@ var OrganizationService = class extends BaseSDK {
1846
1917
  * @returns Promise resolving to the restored organization
1847
1918
  */
1848
1919
  async unarchiveOrganization(id) {
1849
- log11("Unarchiving organization: %d", id);
1920
+ log12("Unarchiving organization: %d", id);
1850
1921
  return this.request(`/admin/organizations/${id}/unarchive`, {
1851
1922
  method: "PATCH"
1852
1923
  });
@@ -1854,7 +1925,7 @@ var OrganizationService = class extends BaseSDK {
1854
1925
  };
1855
1926
 
1856
1927
  // src/admin/MarketAdmin.ts
1857
- var log12 = debug12("lobe-market-sdk:admin");
1928
+ var log13 = debug13("lobe-market-sdk:admin");
1858
1929
  var MarketAdmin = class extends BaseSDK {
1859
1930
  /**
1860
1931
  * Creates a new MarketAdmin instance
@@ -1868,7 +1939,7 @@ var MarketAdmin = class extends BaseSDK {
1868
1939
  tokenExpiry: void 0
1869
1940
  };
1870
1941
  super({ ...options, apiKey }, void 0, sharedTokenState);
1871
- log12("MarketAdmin instance created");
1942
+ log13("MarketAdmin instance created");
1872
1943
  this.agents = new AgentService(options, this.headers, sharedTokenState);
1873
1944
  this.analysis = new AnalysisService(options, this.headers, sharedTokenState);
1874
1945
  this.dependencies = new SystemDependencyService(options, this.headers, sharedTokenState);
@@ -1879,15 +1950,16 @@ var MarketAdmin = class extends BaseSDK {
1879
1950
  this.reviews = new ReviewService(options, this.headers, sharedTokenState);
1880
1951
  this.settings = new SettingsService(options, this.headers, sharedTokenState);
1881
1952
  this.skillCollections = new SkillCollectionService(options, this.headers, sharedTokenState);
1953
+ this.skills = new SkillService(options, this.headers, sharedTokenState);
1882
1954
  }
1883
1955
  };
1884
1956
 
1885
1957
  // src/market/market-sdk.ts
1886
- import debug33 from "debug";
1958
+ import debug35 from "debug";
1887
1959
 
1888
1960
  // src/market/services/AgentProfileService.ts
1889
- import debug13 from "debug";
1890
- var log13 = debug13("lobe-market-sdk:agent-profile");
1961
+ import debug14 from "debug";
1962
+ var log14 = debug14("lobe-market-sdk:agent-profile");
1891
1963
  var AgentProfileService = class extends BaseSDK {
1892
1964
  /**
1893
1965
  * Retrieves the current agent's profile
@@ -1899,9 +1971,9 @@ var AgentProfileService = class extends BaseSDK {
1899
1971
  * @returns Promise resolving to the agent profile response
1900
1972
  */
1901
1973
  async getProfile(options) {
1902
- log13("Getting agent profile");
1974
+ log14("Getting agent profile");
1903
1975
  const result = await this.request("/v1/agent/profile", options);
1904
- log13("Agent profile retrieved: id=%d, identifier=%s", result.agent.id, result.agent.identifier);
1976
+ log14("Agent profile retrieved: id=%d, identifier=%s", result.agent.id, result.agent.identifier);
1905
1977
  return result;
1906
1978
  }
1907
1979
  /**
@@ -1915,7 +1987,7 @@ var AgentProfileService = class extends BaseSDK {
1915
1987
  * @returns Promise resolving to the updated agent profile response
1916
1988
  */
1917
1989
  async updateProfile(data, options) {
1918
- log13("Updating agent profile: %O", data);
1990
+ log14("Updating agent profile: %O", data);
1919
1991
  const result = await this.request("/v1/agent/profile", {
1920
1992
  body: JSON.stringify(data),
1921
1993
  headers: {
@@ -1924,14 +1996,14 @@ var AgentProfileService = class extends BaseSDK {
1924
1996
  method: "PATCH",
1925
1997
  ...options
1926
1998
  });
1927
- log13("Agent profile updated: id=%d, name=%s", result.agent.id, result.agent.name);
1999
+ log14("Agent profile updated: id=%d, name=%s", result.agent.id, result.agent.name);
1928
2000
  return result;
1929
2001
  }
1930
2002
  };
1931
2003
 
1932
2004
  // src/market/services/AgentService.ts
1933
- import debug14 from "debug";
1934
- var log14 = debug14("lobe-market-sdk:agents");
2005
+ import debug15 from "debug";
2006
+ var log15 = debug15("lobe-market-sdk:agents");
1935
2007
  var AgentService2 = class extends BaseSDK {
1936
2008
  /**
1937
2009
  * Retrieves a list of agents from the marketplace
@@ -1946,9 +2018,9 @@ var AgentService2 = class extends BaseSDK {
1946
2018
  const locale = params.locale || this.defaultLocale;
1947
2019
  const queryParams = { ...params, locale };
1948
2020
  const queryString = this.buildQueryString(queryParams);
1949
- log14("Getting agent list: %O", queryParams);
2021
+ log15("Getting agent list: %O", queryParams);
1950
2022
  const result = await this.request(`/v1/agents${queryString}`, options);
1951
- log14("Retrieved %d agents", result.items.length);
2023
+ log15("Retrieved %d agents", result.items.length);
1952
2024
  return result;
1953
2025
  }
1954
2026
  /**
@@ -1965,9 +2037,9 @@ var AgentService2 = class extends BaseSDK {
1965
2037
  const locale = params.locale || this.defaultLocale;
1966
2038
  const queryParams = { ...params, locale };
1967
2039
  const queryString = this.buildQueryString(queryParams);
1968
- log14("Getting own agent list: %O", queryParams);
2040
+ log15("Getting own agent list: %O", queryParams);
1969
2041
  const result = await this.request(`/v1/agents/own${queryString}`, options);
1970
- log14("Retrieved %d own agents", result.items.length);
2042
+ log15("Retrieved %d own agents", result.items.length);
1971
2043
  return result;
1972
2044
  }
1973
2045
  /**
@@ -1988,12 +2060,12 @@ var AgentService2 = class extends BaseSDK {
1988
2060
  queryParams.version = params.version.toString();
1989
2061
  }
1990
2062
  const queryString = this.buildQueryString(queryParams);
1991
- log14("Getting agent detail: %O", { id, ...params });
2063
+ log15("Getting agent detail: %O", { id, ...params });
1992
2064
  const result = await this.request(
1993
2065
  `/v1/agents/detail/${id}${queryString}`,
1994
2066
  options
1995
2067
  );
1996
- log14("Agent detail successfully retrieved: %s", id);
2068
+ log15("Agent detail successfully retrieved: %s", id);
1997
2069
  return result;
1998
2070
  }
1999
2071
  /**
@@ -2009,12 +2081,12 @@ var AgentService2 = class extends BaseSDK {
2009
2081
  * @returns Promise resolving to an array containing identifiers array and last modified time
2010
2082
  */
2011
2083
  async getPublishedIdentifiers(options) {
2012
- log14("Getting published agent identifiers");
2084
+ log15("Getting published agent identifiers");
2013
2085
  const result = await this.request(
2014
2086
  "/v1/agents/identifiers",
2015
2087
  options
2016
2088
  );
2017
- log14("Retrieved %d published agent identifiers", result.length);
2089
+ log15("Retrieved %d published agent identifiers", result.length);
2018
2090
  return result;
2019
2091
  }
2020
2092
  /**
@@ -2025,9 +2097,9 @@ var AgentService2 = class extends BaseSDK {
2025
2097
  */
2026
2098
  async getSitemap(params = {}, options) {
2027
2099
  const queryString = this.buildQueryString(params);
2028
- log14("Getting agent sitemap%s", queryString);
2100
+ log15("Getting agent sitemap%s", queryString);
2029
2101
  const result = await this.request(`/v1/agents/sitemap${queryString}`, options);
2030
- log14(
2102
+ log15(
2031
2103
  "Retrieved agent sitemap page %d/%d (%d items)",
2032
2104
  result.currentPage,
2033
2105
  result.totalPages,
@@ -2050,12 +2122,12 @@ var AgentService2 = class extends BaseSDK {
2050
2122
  const locale = params.locale || this.defaultLocale;
2051
2123
  const queryParams = { ...params, locale };
2052
2124
  const queryString = this.buildQueryString(queryParams);
2053
- log14("Getting agent categories: %O", queryParams);
2125
+ log15("Getting agent categories: %O", queryParams);
2054
2126
  const result = await this.request(
2055
2127
  `/v1/agents/categories${queryString}`,
2056
2128
  options
2057
2129
  );
2058
- log14("Retrieved %d categories", result.length);
2130
+ log15("Retrieved %d categories", result.length);
2059
2131
  return result;
2060
2132
  }
2061
2133
  /**
@@ -2069,7 +2141,7 @@ var AgentService2 = class extends BaseSDK {
2069
2141
  * @returns Promise resolving to the upload response
2070
2142
  */
2071
2143
  async uploadAgent(agentData, options) {
2072
- log14("Uploading agent: %s@%s", agentData.agentIdentifier, agentData.version.version);
2144
+ log15("Uploading agent: %s@%s", agentData.agentIdentifier, agentData.version.version);
2073
2145
  const result = await this.request("/v1/agents/upload", {
2074
2146
  body: JSON.stringify(agentData),
2075
2147
  headers: {
@@ -2078,7 +2150,7 @@ var AgentService2 = class extends BaseSDK {
2078
2150
  method: "POST",
2079
2151
  ...options
2080
2152
  });
2081
- log14("Agent uploaded successfully: %O", result);
2153
+ log15("Agent uploaded successfully: %O", result);
2082
2154
  return result;
2083
2155
  }
2084
2156
  /**
@@ -2089,7 +2161,7 @@ var AgentService2 = class extends BaseSDK {
2089
2161
  * @returns Promise resolving to the created agent response
2090
2162
  */
2091
2163
  async createAgent(agentData, options) {
2092
- log14("Creating agent: %s", agentData.identifier);
2164
+ log15("Creating agent: %s", agentData.identifier);
2093
2165
  const result = await this.request("/v1/agents/create", {
2094
2166
  body: JSON.stringify(agentData),
2095
2167
  headers: {
@@ -2098,7 +2170,7 @@ var AgentService2 = class extends BaseSDK {
2098
2170
  method: "POST",
2099
2171
  ...options
2100
2172
  });
2101
- log14("Agent created successfully: %O", result);
2173
+ log15("Agent created successfully: %O", result);
2102
2174
  return result;
2103
2175
  }
2104
2176
  /**
@@ -2109,7 +2181,7 @@ var AgentService2 = class extends BaseSDK {
2109
2181
  * @returns Promise resolving to the created version response
2110
2182
  */
2111
2183
  async createAgentVersion(versionData, options) {
2112
- log14("Creating agent version: %s", versionData.identifier);
2184
+ log15("Creating agent version: %s", versionData.identifier);
2113
2185
  const result = await this.request("/v1/agents/version/create", {
2114
2186
  body: JSON.stringify(versionData),
2115
2187
  headers: {
@@ -2118,7 +2190,7 @@ var AgentService2 = class extends BaseSDK {
2118
2190
  method: "POST",
2119
2191
  ...options
2120
2192
  });
2121
- log14("Agent version created successfully: %O", result);
2193
+ log15("Agent version created successfully: %O", result);
2122
2194
  return result;
2123
2195
  }
2124
2196
  /**
@@ -2129,7 +2201,7 @@ var AgentService2 = class extends BaseSDK {
2129
2201
  * @returns Promise resolving to the modified agent response
2130
2202
  */
2131
2203
  async modifyAgent(agentData, options) {
2132
- log14("Modifying agent: %s", agentData.identifier);
2204
+ log15("Modifying agent: %s", agentData.identifier);
2133
2205
  const result = await this.request("/v1/agents/modify", {
2134
2206
  body: JSON.stringify(agentData),
2135
2207
  headers: {
@@ -2138,7 +2210,7 @@ var AgentService2 = class extends BaseSDK {
2138
2210
  method: "POST",
2139
2211
  ...options
2140
2212
  });
2141
- log14("Agent modified successfully: %O", result);
2213
+ log15("Agent modified successfully: %O", result);
2142
2214
  return result;
2143
2215
  }
2144
2216
  /**
@@ -2149,7 +2221,7 @@ var AgentService2 = class extends BaseSDK {
2149
2221
  * @returns Promise resolving to the modified version response
2150
2222
  */
2151
2223
  async modifyAgentVersion(versionData, options) {
2152
- log14("Modifying agent version: %s@%s", versionData.identifier, versionData.version);
2224
+ log15("Modifying agent version: %s@%s", versionData.identifier, versionData.version);
2153
2225
  const result = await this.request("/v1/agents/version/modify", {
2154
2226
  body: JSON.stringify(versionData),
2155
2227
  headers: {
@@ -2158,7 +2230,7 @@ var AgentService2 = class extends BaseSDK {
2158
2230
  method: "POST",
2159
2231
  ...options
2160
2232
  });
2161
- log14("Agent version modified successfully: %O", result);
2233
+ log15("Agent version modified successfully: %O", result);
2162
2234
  return result;
2163
2235
  }
2164
2236
  /**
@@ -2169,13 +2241,13 @@ var AgentService2 = class extends BaseSDK {
2169
2241
  * @returns Promise resolving to true if agent exists, false otherwise
2170
2242
  */
2171
2243
  async checkAgentExists(identifier, options) {
2172
- log14("Checking if agent exists: %s", identifier);
2244
+ log15("Checking if agent exists: %s", identifier);
2173
2245
  try {
2174
2246
  await this.getAgentDetail(identifier, {}, options);
2175
- log14("Agent exists: %s", identifier);
2247
+ log15("Agent exists: %s", identifier);
2176
2248
  return true;
2177
2249
  } catch (e) {
2178
- log14("Agent does not exist: %s", identifier);
2250
+ log15("Agent does not exist: %s", identifier);
2179
2251
  return false;
2180
2252
  }
2181
2253
  }
@@ -2188,7 +2260,7 @@ var AgentService2 = class extends BaseSDK {
2188
2260
  * @param options - Optional request init overrides
2189
2261
  */
2190
2262
  async createEvent(eventData, options) {
2191
- log14("Recording agent event: %s for %s", eventData.event, eventData.identifier);
2263
+ log15("Recording agent event: %s for %s", eventData.event, eventData.identifier);
2192
2264
  await this.request("/v1/agents/events", {
2193
2265
  body: JSON.stringify(eventData),
2194
2266
  headers: {
@@ -2209,7 +2281,7 @@ var AgentService2 = class extends BaseSDK {
2209
2281
  * @returns Promise resolving to the updated install count response
2210
2282
  */
2211
2283
  async increaseInstallCount(identifier, options) {
2212
- log14("Increasing install count for agent: %s", identifier);
2284
+ log15("Increasing install count for agent: %s", identifier);
2213
2285
  const result = await this.request("/v1/agents/install-count", {
2214
2286
  body: JSON.stringify({ identifier }),
2215
2287
  headers: {
@@ -2218,7 +2290,7 @@ var AgentService2 = class extends BaseSDK {
2218
2290
  method: "POST",
2219
2291
  ...options
2220
2292
  });
2221
- log14("Install count increased for agent %s: %d", identifier, result.installCount);
2293
+ log15("Install count increased for agent %s: %d", identifier, result.installCount);
2222
2294
  return result;
2223
2295
  }
2224
2296
  /**
@@ -2233,9 +2305,9 @@ var AgentService2 = class extends BaseSDK {
2233
2305
  * @returns Promise resolving to the status change response
2234
2306
  */
2235
2307
  async changeStatus(identifier, status, options) {
2236
- log14("Changing agent status: %s -> %s", identifier, status);
2308
+ log15("Changing agent status: %s -> %s", identifier, status);
2237
2309
  const result = await this.modifyAgent({ identifier, status }, options);
2238
- log14("Agent status changed: %s -> %s", identifier, result.status);
2310
+ log15("Agent status changed: %s -> %s", identifier, result.status);
2239
2311
  return {
2240
2312
  identifier: result.identifier,
2241
2313
  status: result.status,
@@ -2253,7 +2325,7 @@ var AgentService2 = class extends BaseSDK {
2253
2325
  * @returns Promise resolving to the status change response
2254
2326
  */
2255
2327
  async publish(identifier, options) {
2256
- log14("Publishing agent: %s", identifier);
2328
+ log15("Publishing agent: %s", identifier);
2257
2329
  return this.changeStatus(identifier, "published", options);
2258
2330
  }
2259
2331
  /**
@@ -2268,7 +2340,7 @@ var AgentService2 = class extends BaseSDK {
2268
2340
  * @returns Promise resolving to the status change response
2269
2341
  */
2270
2342
  async unpublish(identifier, options) {
2271
- log14("Unpublishing agent: %s", identifier);
2343
+ log15("Unpublishing agent: %s", identifier);
2272
2344
  return this.changeStatus(identifier, "unpublished", options);
2273
2345
  }
2274
2346
  /**
@@ -2283,7 +2355,7 @@ var AgentService2 = class extends BaseSDK {
2283
2355
  * @returns Promise resolving to the status change response
2284
2356
  */
2285
2357
  async archive(identifier, options) {
2286
- log14("Archiving agent: %s", identifier);
2358
+ log15("Archiving agent: %s", identifier);
2287
2359
  return this.changeStatus(identifier, "archived", options);
2288
2360
  }
2289
2361
  /**
@@ -2298,7 +2370,7 @@ var AgentService2 = class extends BaseSDK {
2298
2370
  * @returns Promise resolving to the status change response
2299
2371
  */
2300
2372
  async deprecate(identifier, options) {
2301
- log14("Deprecating agent: %s", identifier);
2373
+ log15("Deprecating agent: %s", identifier);
2302
2374
  return this.changeStatus(identifier, "deprecated", options);
2303
2375
  }
2304
2376
  /**
@@ -2316,12 +2388,12 @@ var AgentService2 = class extends BaseSDK {
2316
2388
  const locale = params.locale || this.defaultLocale;
2317
2389
  const queryParams = { ...params, locale };
2318
2390
  const queryString = this.buildQueryString(queryParams);
2319
- log14("Getting agents by plugin: %s", params.pluginId);
2391
+ log15("Getting agents by plugin: %s", params.pluginId);
2320
2392
  const result = await this.request(
2321
2393
  `/v1/agents/by-plugin${queryString}`,
2322
2394
  options
2323
2395
  );
2324
- log14("Retrieved %d agents for plugin %s", result.items.length, params.pluginId);
2396
+ log15("Retrieved %d agents for plugin %s", result.items.length, params.pluginId);
2325
2397
  return result;
2326
2398
  }
2327
2399
  /**
@@ -2337,7 +2409,7 @@ var AgentService2 = class extends BaseSDK {
2337
2409
  * @returns Promise resolving to the fork response with new agent details
2338
2410
  */
2339
2411
  async forkAgent(sourceIdentifier, forkData, options) {
2340
- log14("Forking agent: %s -> %s", sourceIdentifier, forkData.identifier);
2412
+ log15("Forking agent: %s -> %s", sourceIdentifier, forkData.identifier);
2341
2413
  const result = await this.request(`/v1/agents/${sourceIdentifier}/fork`, {
2342
2414
  body: JSON.stringify(forkData),
2343
2415
  headers: {
@@ -2346,7 +2418,7 @@ var AgentService2 = class extends BaseSDK {
2346
2418
  method: "POST",
2347
2419
  ...options
2348
2420
  });
2349
- log14("Agent forked successfully: %s (id: %d)", result.agent.identifier, result.agent.id);
2421
+ log15("Agent forked successfully: %s (id: %d)", result.agent.identifier, result.agent.id);
2350
2422
  return result;
2351
2423
  }
2352
2424
  /**
@@ -2360,12 +2432,12 @@ var AgentService2 = class extends BaseSDK {
2360
2432
  * @returns Promise resolving to the forks list response
2361
2433
  */
2362
2434
  async getAgentForks(identifier, options) {
2363
- log14("Getting forks for agent: %s", identifier);
2435
+ log15("Getting forks for agent: %s", identifier);
2364
2436
  const result = await this.request(
2365
2437
  `/v1/agents/${identifier}/forks`,
2366
2438
  options
2367
2439
  );
2368
- log14("Retrieved %d forks for agent: %s", result.totalCount, identifier);
2440
+ log15("Retrieved %d forks for agent: %s", result.totalCount, identifier);
2369
2441
  return result;
2370
2442
  }
2371
2443
  /**
@@ -2378,23 +2450,23 @@ var AgentService2 = class extends BaseSDK {
2378
2450
  * @returns Promise resolving to the fork source response
2379
2451
  */
2380
2452
  async getAgentForkSource(identifier, options) {
2381
- log14("Getting fork source for agent: %s", identifier);
2453
+ log15("Getting fork source for agent: %s", identifier);
2382
2454
  const result = await this.request(
2383
2455
  `/v1/agents/${identifier}/fork-source`,
2384
2456
  options
2385
2457
  );
2386
2458
  if (result.source) {
2387
- log14("Agent %s was forked from: %s", identifier, result.source.identifier);
2459
+ log15("Agent %s was forked from: %s", identifier, result.source.identifier);
2388
2460
  } else {
2389
- log14("Agent %s is not a fork (original agent)", identifier);
2461
+ log15("Agent %s is not a fork (original agent)", identifier);
2390
2462
  }
2391
2463
  return result;
2392
2464
  }
2393
2465
  };
2394
2466
 
2395
2467
  // src/market/services/AgentGroupService.ts
2396
- import debug15 from "debug";
2397
- var log15 = debug15("lobe-market-sdk:agent-groups");
2468
+ import debug16 from "debug";
2469
+ var log16 = debug16("lobe-market-sdk:agent-groups");
2398
2470
  var AgentGroupService = class extends BaseSDK {
2399
2471
  /**
2400
2472
  * Retrieves a list of agent groups from the marketplace
@@ -2409,12 +2481,12 @@ var AgentGroupService = class extends BaseSDK {
2409
2481
  const locale = params.locale || this.defaultLocale;
2410
2482
  const queryParams = { ...params, locale };
2411
2483
  const queryString = this.buildQueryString(queryParams);
2412
- log15("Getting agent group list: %O", queryParams);
2484
+ log16("Getting agent group list: %O", queryParams);
2413
2485
  const result = await this.request(
2414
2486
  `/v1/agent-groups${queryString}`,
2415
2487
  options
2416
2488
  );
2417
- log15("Retrieved %d agent groups", result.items.length);
2489
+ log16("Retrieved %d agent groups", result.items.length);
2418
2490
  return result;
2419
2491
  }
2420
2492
  /**
@@ -2431,12 +2503,12 @@ var AgentGroupService = class extends BaseSDK {
2431
2503
  const locale = params.locale || this.defaultLocale;
2432
2504
  const queryParams = { ...params, locale };
2433
2505
  const queryString = this.buildQueryString(queryParams);
2434
- log15("Getting own agent group list: %O", queryParams);
2506
+ log16("Getting own agent group list: %O", queryParams);
2435
2507
  const result = await this.request(
2436
2508
  `/v1/agent-groups/own${queryString}`,
2437
2509
  options
2438
2510
  );
2439
- log15("Retrieved %d own agent groups", result.items.length);
2511
+ log16("Retrieved %d own agent groups", result.items.length);
2440
2512
  return result;
2441
2513
  }
2442
2514
  /**
@@ -2457,12 +2529,12 @@ var AgentGroupService = class extends BaseSDK {
2457
2529
  queryParams.version = params.version.toString();
2458
2530
  }
2459
2531
  const queryString = this.buildQueryString(queryParams);
2460
- log15("Getting agent group detail: %O", { identifier, ...params });
2532
+ log16("Getting agent group detail: %O", { identifier, ...params });
2461
2533
  const result = await this.request(
2462
2534
  `/v1/agent-groups/detail${queryString}`,
2463
2535
  options
2464
2536
  );
2465
- log15("Agent group detail successfully retrieved: %s", identifier);
2537
+ log16("Agent group detail successfully retrieved: %s", identifier);
2466
2538
  return result;
2467
2539
  }
2468
2540
  /**
@@ -2476,7 +2548,7 @@ var AgentGroupService = class extends BaseSDK {
2476
2548
  * @returns Promise resolving to the created agent group response
2477
2549
  */
2478
2550
  async createAgentGroup(groupData, options) {
2479
- log15("Creating agent group: %s", groupData.identifier);
2551
+ log16("Creating agent group: %s", groupData.identifier);
2480
2552
  const result = await this.request("/v1/agent-groups/create", {
2481
2553
  body: JSON.stringify(groupData),
2482
2554
  headers: {
@@ -2485,7 +2557,7 @@ var AgentGroupService = class extends BaseSDK {
2485
2557
  method: "POST",
2486
2558
  ...options
2487
2559
  });
2488
- log15("Agent group created successfully: %O", result);
2560
+ log16("Agent group created successfully: %O", result);
2489
2561
  return result;
2490
2562
  }
2491
2563
  /**
@@ -2499,7 +2571,7 @@ var AgentGroupService = class extends BaseSDK {
2499
2571
  * @returns Promise resolving to the created version response
2500
2572
  */
2501
2573
  async createAgentGroupVersion(versionData, options) {
2502
- log15("Creating agent group version: %s", versionData.identifier);
2574
+ log16("Creating agent group version: %s", versionData.identifier);
2503
2575
  const result = await this.request(
2504
2576
  "/v1/agent-groups/version-create",
2505
2577
  {
@@ -2511,7 +2583,7 @@ var AgentGroupService = class extends BaseSDK {
2511
2583
  ...options
2512
2584
  }
2513
2585
  );
2514
- log15("Agent group version created successfully: %O", result);
2586
+ log16("Agent group version created successfully: %O", result);
2515
2587
  return result;
2516
2588
  }
2517
2589
  /**
@@ -2525,7 +2597,7 @@ var AgentGroupService = class extends BaseSDK {
2525
2597
  * @returns Promise resolving to the modified agent group response
2526
2598
  */
2527
2599
  async modifyAgentGroup(groupData, options) {
2528
- log15("Modifying agent group: %s", groupData.identifier);
2600
+ log16("Modifying agent group: %s", groupData.identifier);
2529
2601
  const result = await this.request("/v1/agent-groups/modify", {
2530
2602
  body: JSON.stringify(groupData),
2531
2603
  headers: {
@@ -2534,7 +2606,7 @@ var AgentGroupService = class extends BaseSDK {
2534
2606
  method: "POST",
2535
2607
  ...options
2536
2608
  });
2537
- log15("Agent group modified successfully: %O", result);
2609
+ log16("Agent group modified successfully: %O", result);
2538
2610
  return result;
2539
2611
  }
2540
2612
  /**
@@ -2545,13 +2617,13 @@ var AgentGroupService = class extends BaseSDK {
2545
2617
  * @returns Promise resolving to true if agent group exists, false otherwise
2546
2618
  */
2547
2619
  async checkAgentGroupExists(identifier, options) {
2548
- log15("Checking if agent group exists: %s", identifier);
2620
+ log16("Checking if agent group exists: %s", identifier);
2549
2621
  try {
2550
2622
  await this.getAgentGroupDetail(identifier, {}, options);
2551
- log15("Agent group exists: %s", identifier);
2623
+ log16("Agent group exists: %s", identifier);
2552
2624
  return true;
2553
2625
  } catch (e) {
2554
- log15("Agent group does not exist: %s", identifier);
2626
+ log16("Agent group does not exist: %s", identifier);
2555
2627
  return false;
2556
2628
  }
2557
2629
  }
@@ -2567,9 +2639,9 @@ var AgentGroupService = class extends BaseSDK {
2567
2639
  * @returns Promise resolving to the status change response
2568
2640
  */
2569
2641
  async changeStatus(identifier, status, options) {
2570
- log15("Changing agent group status: %s -> %s", identifier, status);
2642
+ log16("Changing agent group status: %s -> %s", identifier, status);
2571
2643
  const result = await this.modifyAgentGroup({ identifier, status }, options);
2572
- log15("Agent group status changed: %s -> %s", identifier, result.status);
2644
+ log16("Agent group status changed: %s -> %s", identifier, result.status);
2573
2645
  return {
2574
2646
  identifier: result.identifier,
2575
2647
  status: result.status,
@@ -2588,7 +2660,7 @@ var AgentGroupService = class extends BaseSDK {
2588
2660
  * @returns Promise resolving to the status change response
2589
2661
  */
2590
2662
  async publish(identifier, options) {
2591
- log15("Publishing agent group: %s", identifier);
2663
+ log16("Publishing agent group: %s", identifier);
2592
2664
  return this.changeStatus(identifier, "published", options);
2593
2665
  }
2594
2666
  /**
@@ -2603,7 +2675,7 @@ var AgentGroupService = class extends BaseSDK {
2603
2675
  * @returns Promise resolving to the status change response
2604
2676
  */
2605
2677
  async unpublish(identifier, options) {
2606
- log15("Unpublishing agent group: %s", identifier);
2678
+ log16("Unpublishing agent group: %s", identifier);
2607
2679
  return this.changeStatus(identifier, "unpublished", options);
2608
2680
  }
2609
2681
  /**
@@ -2618,7 +2690,7 @@ var AgentGroupService = class extends BaseSDK {
2618
2690
  * @returns Promise resolving to the status change response
2619
2691
  */
2620
2692
  async archive(identifier, options) {
2621
- log15("Archiving agent group: %s", identifier);
2693
+ log16("Archiving agent group: %s", identifier);
2622
2694
  return this.changeStatus(identifier, "archived", options);
2623
2695
  }
2624
2696
  /**
@@ -2633,7 +2705,7 @@ var AgentGroupService = class extends BaseSDK {
2633
2705
  * @returns Promise resolving to the status change response
2634
2706
  */
2635
2707
  async deprecate(identifier, options) {
2636
- log15("Deprecating agent group: %s", identifier);
2708
+ log16("Deprecating agent group: %s", identifier);
2637
2709
  return this.changeStatus(identifier, "deprecated", options);
2638
2710
  }
2639
2711
  /**
@@ -2649,7 +2721,7 @@ var AgentGroupService = class extends BaseSDK {
2649
2721
  * @returns Promise resolving to the fork response with new group details
2650
2722
  */
2651
2723
  async forkAgentGroup(sourceIdentifier, forkData, options) {
2652
- log15("Forking agent group: %s -> %s", sourceIdentifier, forkData.identifier);
2724
+ log16("Forking agent group: %s -> %s", sourceIdentifier, forkData.identifier);
2653
2725
  const result = await this.request(
2654
2726
  `/v1/agent-groups/${sourceIdentifier}/fork`,
2655
2727
  {
@@ -2661,7 +2733,7 @@ var AgentGroupService = class extends BaseSDK {
2661
2733
  ...options
2662
2734
  }
2663
2735
  );
2664
- log15(
2736
+ log16(
2665
2737
  "Agent group forked successfully: %s (id: %d, members: %d)",
2666
2738
  result.group.identifier,
2667
2739
  result.group.id,
@@ -2680,12 +2752,12 @@ var AgentGroupService = class extends BaseSDK {
2680
2752
  * @returns Promise resolving to the forks list response
2681
2753
  */
2682
2754
  async getAgentGroupForks(identifier, options) {
2683
- log15("Getting forks for agent group: %s", identifier);
2755
+ log16("Getting forks for agent group: %s", identifier);
2684
2756
  const result = await this.request(
2685
2757
  `/v1/agent-groups/${identifier}/forks`,
2686
2758
  options
2687
2759
  );
2688
- log15("Retrieved %d forks for agent group: %s", result.totalCount, identifier);
2760
+ log16("Retrieved %d forks for agent group: %s", result.totalCount, identifier);
2689
2761
  return result;
2690
2762
  }
2691
2763
  /**
@@ -2698,24 +2770,24 @@ var AgentGroupService = class extends BaseSDK {
2698
2770
  * @returns Promise resolving to the fork source response
2699
2771
  */
2700
2772
  async getAgentGroupForkSource(identifier, options) {
2701
- log15("Getting fork source for agent group: %s", identifier);
2773
+ log16("Getting fork source for agent group: %s", identifier);
2702
2774
  const result = await this.request(
2703
2775
  `/v1/agent-groups/${identifier}/fork-source`,
2704
2776
  options
2705
2777
  );
2706
2778
  if (result.source) {
2707
- log15("Agent group %s was forked from: %s", identifier, result.source.identifier);
2779
+ log16("Agent group %s was forked from: %s", identifier, result.source.identifier);
2708
2780
  } else {
2709
- log15("Agent group %s is not a fork (original group)", identifier);
2781
+ log16("Agent group %s is not a fork (original group)", identifier);
2710
2782
  }
2711
2783
  return result;
2712
2784
  }
2713
2785
  };
2714
2786
 
2715
2787
  // src/market/services/AuthService.ts
2716
- import debug16 from "debug";
2788
+ import debug17 from "debug";
2717
2789
  import urlJoin2 from "url-join";
2718
- var log16 = debug16("lobe-market-sdk:auth");
2790
+ var log17 = debug17("lobe-market-sdk:auth");
2719
2791
  var _AuthService = class _AuthService extends BaseSDK {
2720
2792
  /** Normalize token response from snake_case to camelCase fields */
2721
2793
  static normalizeTokenResponse(data) {
@@ -2747,7 +2819,7 @@ var _AuthService = class _AuthService extends BaseSDK {
2747
2819
  if (grantType !== "authorization_code" && grantType !== "refresh_token") {
2748
2820
  throw new Error(`Unsupported grant type: ${grantType}`);
2749
2821
  }
2750
- log16("Exchanging OAuth token using grant_type=%s", grantType);
2822
+ log17("Exchanging OAuth token using grant_type=%s", grantType);
2751
2823
  const tokenUrl = urlJoin2(this.baseUrl, "lobehub-oidc/token");
2752
2824
  const params = new URLSearchParams();
2753
2825
  params.set("grant_type", grantType);
@@ -2789,16 +2861,16 @@ var _AuthService = class _AuthService extends BaseSDK {
2789
2861
  try {
2790
2862
  payload = await response.json();
2791
2863
  } catch (error) {
2792
- log16("Failed to parse token response: %O", error);
2864
+ log17("Failed to parse token response: %O", error);
2793
2865
  throw new Error(`Failed to parse token response: ${response.status} ${response.statusText}`);
2794
2866
  }
2795
2867
  if (!response.ok) {
2796
2868
  const errorDescription = (payload == null ? void 0 : payload.error_description) || (payload == null ? void 0 : payload.error) || response.statusText;
2797
2869
  const errorMsg = `Token exchange failed: ${response.status} ${errorDescription}`;
2798
- log16("Error: %s", errorMsg);
2870
+ log17("Error: %s", errorMsg);
2799
2871
  throw new Error(errorMsg);
2800
2872
  }
2801
- log16("Token exchange successful");
2873
+ log17("Token exchange successful");
2802
2874
  return _AuthService.normalizeTokenResponse(payload);
2803
2875
  }
2804
2876
  /**
@@ -2816,7 +2888,7 @@ var _AuthService = class _AuthService extends BaseSDK {
2816
2888
  if (!clientId || !token) {
2817
2889
  throw new Error("clientId and token are required for token revocation");
2818
2890
  }
2819
- log16("Revoking OAuth token (hint=%s)", tokenTypeHint != null ? tokenTypeHint : "none");
2891
+ log17("Revoking OAuth token (hint=%s)", tokenTypeHint != null ? tokenTypeHint : "none");
2820
2892
  const revocationUrl = urlJoin2(this.baseUrl, "lobehub-oidc/token/revocation");
2821
2893
  const params = new URLSearchParams();
2822
2894
  params.set("client_id", clientId);
@@ -2844,10 +2916,10 @@ var _AuthService = class _AuthService extends BaseSDK {
2844
2916
  } catch (e) {
2845
2917
  }
2846
2918
  const errorMsg = `Token revocation failed: ${response.status} ${errorDescription}`;
2847
- log16("Error: %s", errorMsg);
2919
+ log17("Error: %s", errorMsg);
2848
2920
  throw new Error(errorMsg);
2849
2921
  }
2850
- log16("Token revocation successful");
2922
+ log17("Token revocation successful");
2851
2923
  }
2852
2924
  /**
2853
2925
  * Retrieves user information from the OIDC userinfo endpoint
@@ -2859,7 +2931,7 @@ var _AuthService = class _AuthService extends BaseSDK {
2859
2931
  * @returns Promise resolving to the user information
2860
2932
  */
2861
2933
  async getUserInfo(accessToken, options) {
2862
- log16("Getting user info");
2934
+ log17("Getting user info");
2863
2935
  const userInfoUrl = urlJoin2(this.baseUrl, "lobehub-oidc/userinfo");
2864
2936
  const response = await fetch(userInfoUrl, {
2865
2937
  headers: {
@@ -2871,11 +2943,11 @@ var _AuthService = class _AuthService extends BaseSDK {
2871
2943
  });
2872
2944
  if (!response.ok) {
2873
2945
  const errorMsg = `Failed to fetch user info: ${response.status} ${response.statusText}`;
2874
- log16("Error: %s", errorMsg);
2946
+ log17("Error: %s", errorMsg);
2875
2947
  throw new Error(errorMsg);
2876
2948
  }
2877
2949
  const userInfo = await response.json();
2878
- log16("User info retrieved successfully");
2950
+ log17("User info retrieved successfully");
2879
2951
  return userInfo;
2880
2952
  }
2881
2953
  /**
@@ -2889,7 +2961,7 @@ var _AuthService = class _AuthService extends BaseSDK {
2889
2961
  * @returns Promise resolving to the client credentials
2890
2962
  */
2891
2963
  async registerClient(clientData, options) {
2892
- log16("Registering client: %s (%s)", clientData.clientName, clientData.clientType);
2964
+ log17("Registering client: %s (%s)", clientData.clientName, clientData.clientType);
2893
2965
  const result = await this.request("/v1/clients/register", {
2894
2966
  body: JSON.stringify(clientData),
2895
2967
  headers: {
@@ -2898,7 +2970,7 @@ var _AuthService = class _AuthService extends BaseSDK {
2898
2970
  method: "POST",
2899
2971
  ...options
2900
2972
  });
2901
- log16("Client registered successfully: %s", result.client_id);
2973
+ log17("Client registered successfully: %s", result.client_id);
2902
2974
  return result;
2903
2975
  }
2904
2976
  /**
@@ -2910,9 +2982,9 @@ var _AuthService = class _AuthService extends BaseSDK {
2910
2982
  * @returns Promise resolving to the access token and expiration time
2911
2983
  */
2912
2984
  async getM2MToken() {
2913
- log16("Fetching M2M token");
2985
+ log17("Fetching M2M token");
2914
2986
  const tokenInfo = await this.fetchM2MToken();
2915
- log16("M2M token fetched successfully");
2987
+ log17("M2M token fetched successfully");
2916
2988
  return tokenInfo;
2917
2989
  }
2918
2990
  /** OAuth handoff response shapes */
@@ -2938,7 +3010,7 @@ var _AuthService = class _AuthService extends BaseSDK {
2938
3010
  async getOAuthHandoff(id, options) {
2939
3011
  var _a, _b;
2940
3012
  if (!id) throw new Error("id is required");
2941
- log16("Getting OAuth handoff: %s", id);
3013
+ log17("Getting OAuth handoff: %s", id);
2942
3014
  const handoffUrl = `${urlJoin2(this.baseUrl, "lobehub-oidc/handoff")}?id=${encodeURIComponent(id)}`;
2943
3015
  const response = await fetch(handoffUrl, {
2944
3016
  headers: {
@@ -2954,19 +3026,19 @@ var _AuthService = class _AuthService extends BaseSDK {
2954
3026
  code: json.code,
2955
3027
  redirectUri: json.redirectUri
2956
3028
  });
2957
- log16("OAuth handoff success for id: %s", id);
3029
+ log17("OAuth handoff success for id: %s", id);
2958
3030
  return result;
2959
3031
  }
2960
3032
  if (response.status === 202) {
2961
- log16("OAuth handoff pending for id: %s", id);
3033
+ log17("OAuth handoff pending for id: %s", id);
2962
3034
  return { status: _AuthService.HANDOFF_PENDING_STATUS };
2963
3035
  }
2964
3036
  if (response.status === 404) {
2965
- log16("OAuth handoff consumed for id: %s", id);
3037
+ log17("OAuth handoff consumed for id: %s", id);
2966
3038
  return { status: _AuthService.HANDOFF_CONSUMED_STATUS };
2967
3039
  }
2968
3040
  if (response.status === 410) {
2969
- log16("OAuth handoff expired for id: %s", id);
3041
+ log17("OAuth handoff expired for id: %s", id);
2970
3042
  return { status: _AuthService.HANDOFF_EXPIRED_STATUS };
2971
3043
  }
2972
3044
  let errorMessage = `Failed to fetch OAuth handoff (status ${response.status} ${response.statusText})`;
@@ -2977,7 +3049,7 @@ var _AuthService = class _AuthService extends BaseSDK {
2977
3049
  }
2978
3050
  } catch (e) {
2979
3051
  }
2980
- log16("Error: %s", errorMessage);
3052
+ log17("Error: %s", errorMessage);
2981
3053
  throw new Error(errorMessage);
2982
3054
  }
2983
3055
  /**
@@ -2991,21 +3063,21 @@ var _AuthService = class _AuthService extends BaseSDK {
2991
3063
  const timeoutMs = (_b = params.timeoutMs) != null ? _b : 6e4;
2992
3064
  const startedAt = Date.now();
2993
3065
  const { signal, requestInit } = params;
2994
- log16("Start polling OAuth handoff: %s", id);
3066
+ log17("Start polling OAuth handoff: %s", id);
2995
3067
  while (true) {
2996
3068
  if (signal == null ? void 0 : signal.aborted) {
2997
3069
  const err = new Error("Polling aborted");
2998
- log16("Error: %s", err.message);
3070
+ log17("Error: %s", err.message);
2999
3071
  throw err;
3000
3072
  }
3001
3073
  if (Date.now() - startedAt > timeoutMs) {
3002
3074
  const err = new Error("Polling timeout");
3003
- log16("Error: %s", err.message);
3075
+ log17("Error: %s", err.message);
3004
3076
  throw err;
3005
3077
  }
3006
3078
  const result = await this.getOAuthHandoff(id, requestInit);
3007
3079
  if (result.status === "success" || result.status === "expired" || result.status === "consumed") {
3008
- log16("Stop polling OAuth handoff (terminal): %s -> %s", id, result.status);
3080
+ log17("Stop polling OAuth handoff (terminal): %s -> %s", id, result.status);
3009
3081
  return result;
3010
3082
  }
3011
3083
  await new Promise((resolve) => {
@@ -3026,9 +3098,9 @@ _AuthService.HANDOFF_EXPIRED_STATUS = "expired";
3026
3098
  var AuthService = _AuthService;
3027
3099
 
3028
3100
  // src/market/services/ConnectService.ts
3029
- import debug17 from "debug";
3101
+ import debug18 from "debug";
3030
3102
  import urlJoin3 from "url-join";
3031
- var log17 = debug17("lobe-market-sdk:connect");
3103
+ var log18 = debug18("lobe-market-sdk:connect");
3032
3104
  var CIMD_CLIENT_METADATA_VERSION = "v1";
3033
3105
  var CIMD_CLIENT_METADATA_VERSION_BY_PROVIDER = {
3034
3106
  posthog: "v2"
@@ -3052,9 +3124,9 @@ var ConnectService = class extends BaseSDK {
3052
3124
  */
3053
3125
  async listProviders(options) {
3054
3126
  var _a;
3055
- log17("Listing connect providers");
3127
+ log18("Listing connect providers");
3056
3128
  const result = await this.request("/connect/providers", options);
3057
- log17("Found %d connect providers", ((_a = result.providers) == null ? void 0 : _a.length) || 0);
3129
+ log18("Found %d connect providers", ((_a = result.providers) == null ? void 0 : _a.length) || 0);
3058
3130
  return result;
3059
3131
  }
3060
3132
  /**
@@ -3068,12 +3140,12 @@ var ConnectService = class extends BaseSDK {
3068
3140
  */
3069
3141
  async getProvider(provider, options) {
3070
3142
  var _a;
3071
- log17("Getting provider details: %s", provider);
3143
+ log18("Getting provider details: %s", provider);
3072
3144
  const result = await this.request(
3073
3145
  `/connect/providers/${encodeURIComponent(provider)}`,
3074
3146
  options
3075
3147
  );
3076
- log17("Retrieved provider: %s", (_a = result.provider) == null ? void 0 : _a.name);
3148
+ log18("Retrieved provider: %s", (_a = result.provider) == null ? void 0 : _a.name);
3077
3149
  return result;
3078
3150
  }
3079
3151
  /**
@@ -3092,12 +3164,12 @@ var ConnectService = class extends BaseSDK {
3092
3164
  const metadataParams = hasParams ? params : void 0;
3093
3165
  const requestOptions = hasParams ? options : params;
3094
3166
  const version = getCimdClientMetadataVersion(provider, metadataParams == null ? void 0 : metadataParams.version);
3095
- log17("Getting CIMD client metadata for provider: %s version: %s", provider, version);
3167
+ log18("Getting CIMD client metadata for provider: %s version: %s", provider, version);
3096
3168
  const result = await this.request(
3097
3169
  `/connect/${encodeURIComponent(provider)}/oauth/client-metadata/${encodeURIComponent(version)}.json`,
3098
3170
  requestOptions
3099
3171
  );
3100
- log17("Retrieved CIMD client metadata: %s", result.client_id);
3172
+ log18("Retrieved CIMD client metadata: %s", result.client_id);
3101
3173
  return result;
3102
3174
  }
3103
3175
  /**
@@ -3137,7 +3209,7 @@ var ConnectService = class extends BaseSDK {
3137
3209
  * ```
3138
3210
  */
3139
3211
  async authorize(provider, params, options) {
3140
- log17("Requesting authorization code for provider: %s", provider);
3212
+ log18("Requesting authorization code for provider: %s", provider);
3141
3213
  const result = await this.request(
3142
3214
  `/connect/${encodeURIComponent(provider)}/authorize`,
3143
3215
  {
@@ -3149,7 +3221,7 @@ var ConnectService = class extends BaseSDK {
3149
3221
  ...options
3150
3222
  }
3151
3223
  );
3152
- log17("Authorization code obtained, expires in %d seconds", result.expires_in);
3224
+ log18("Authorization code obtained, expires in %d seconds", result.expires_in);
3153
3225
  return result;
3154
3226
  }
3155
3227
  /**
@@ -3175,7 +3247,7 @@ var ConnectService = class extends BaseSDK {
3175
3247
  * ```
3176
3248
  */
3177
3249
  getAuthorizeUrl(provider, params) {
3178
- log17(
3250
+ log18(
3179
3251
  "Generating authorize URL for provider: %s (deprecated, use authorize() instead)",
3180
3252
  provider
3181
3253
  );
@@ -3189,7 +3261,7 @@ var ConnectService = class extends BaseSDK {
3189
3261
  const queryString = queryParams.toString();
3190
3262
  const path = `/connect/${encodeURIComponent(provider)}/start${queryString ? `?${queryString}` : ""}`;
3191
3263
  const url = urlJoin3(this.baseUrl, "api", path);
3192
- log17("Generated authorize URL: %s", url);
3264
+ log18("Generated authorize URL: %s", url);
3193
3265
  return url;
3194
3266
  }
3195
3267
  /**
@@ -3203,12 +3275,12 @@ var ConnectService = class extends BaseSDK {
3203
3275
  * @returns Promise resolving to the connection status
3204
3276
  */
3205
3277
  async getStatus(provider, options) {
3206
- log17("Getting connection status for provider: %s", provider);
3278
+ log18("Getting connection status for provider: %s", provider);
3207
3279
  const result = await this.request(
3208
3280
  `/connect/${encodeURIComponent(provider)}/status`,
3209
3281
  options
3210
3282
  );
3211
- log17("Provider %s connection status: connected=%s", provider, result.connected);
3283
+ log18("Provider %s connection status: connected=%s", provider, result.connected);
3212
3284
  return result;
3213
3285
  }
3214
3286
  /**
@@ -3221,9 +3293,9 @@ var ConnectService = class extends BaseSDK {
3221
3293
  */
3222
3294
  async listConnections(options) {
3223
3295
  var _a;
3224
- log17("Listing user connections");
3296
+ log18("Listing user connections");
3225
3297
  const result = await this.request("/connect/connections", options);
3226
- log17("Found %d connections", ((_a = result.connections) == null ? void 0 : _a.length) || 0);
3298
+ log18("Found %d connections", ((_a = result.connections) == null ? void 0 : _a.length) || 0);
3227
3299
  return result;
3228
3300
  }
3229
3301
  /**
@@ -3237,12 +3309,12 @@ var ConnectService = class extends BaseSDK {
3237
3309
  * @returns Promise resolving to the connection health status
3238
3310
  */
3239
3311
  async getHealth(provider, options) {
3240
- log17("Checking health for provider: %s", provider);
3312
+ log18("Checking health for provider: %s", provider);
3241
3313
  const result = await this.request(
3242
3314
  `/connect/${encodeURIComponent(provider)}/health`,
3243
3315
  options
3244
3316
  );
3245
- log17("Provider %s health: healthy=%s, status=%s", provider, result.healthy, result.tokenStatus);
3317
+ log18("Provider %s health: healthy=%s, status=%s", provider, result.healthy, result.tokenStatus);
3246
3318
  return result;
3247
3319
  }
3248
3320
  /**
@@ -3255,9 +3327,9 @@ var ConnectService = class extends BaseSDK {
3255
3327
  */
3256
3328
  async getAllHealth(options) {
3257
3329
  var _a, _b, _c;
3258
- log17("Checking health for all connections");
3330
+ log18("Checking health for all connections");
3259
3331
  const result = await this.request("/connect/health", options);
3260
- log17(
3332
+ log18(
3261
3333
  "Health check complete: total=%d, healthy=%d, unhealthy=%d",
3262
3334
  ((_a = result.summary) == null ? void 0 : _a.total) || 0,
3263
3335
  ((_b = result.summary) == null ? void 0 : _b.healthy) || 0,
@@ -3276,7 +3348,7 @@ var ConnectService = class extends BaseSDK {
3276
3348
  * @returns Promise resolving to the refresh result
3277
3349
  */
3278
3350
  async refresh(provider, options) {
3279
- log17("Refreshing token for provider: %s", provider);
3351
+ log18("Refreshing token for provider: %s", provider);
3280
3352
  const result = await this.request(
3281
3353
  `/connect/${encodeURIComponent(provider)}/refresh`,
3282
3354
  {
@@ -3284,7 +3356,7 @@ var ConnectService = class extends BaseSDK {
3284
3356
  ...options
3285
3357
  }
3286
3358
  );
3287
- log17("Token refresh for %s: refreshed=%s", provider, result.refreshed);
3359
+ log18("Token refresh for %s: refreshed=%s", provider, result.refreshed);
3288
3360
  return result;
3289
3361
  }
3290
3362
  /**
@@ -3298,7 +3370,7 @@ var ConnectService = class extends BaseSDK {
3298
3370
  * @returns Promise resolving to the revoke result
3299
3371
  */
3300
3372
  async revoke(provider, options) {
3301
- log17("Revoking connection for provider: %s", provider);
3373
+ log18("Revoking connection for provider: %s", provider);
3302
3374
  const result = await this.request(
3303
3375
  `/connect/${encodeURIComponent(provider)}`,
3304
3376
  {
@@ -3306,14 +3378,14 @@ var ConnectService = class extends BaseSDK {
3306
3378
  ...options
3307
3379
  }
3308
3380
  );
3309
- log17("Connection revoked for %s: success=%s", provider, result.success);
3381
+ log18("Connection revoked for %s: success=%s", provider, result.success);
3310
3382
  return result;
3311
3383
  }
3312
3384
  };
3313
3385
 
3314
3386
  // src/market/services/CredService.ts
3315
- import debug18 from "debug";
3316
- var log18 = debug18("lobe-market-sdk:creds");
3387
+ import debug19 from "debug";
3388
+ var log19 = debug19("lobe-market-sdk:creds");
3317
3389
  var CredService = class extends BaseSDK {
3318
3390
  // ===========================================================================
3319
3391
  // List & Get Operations
@@ -3329,9 +3401,9 @@ var CredService = class extends BaseSDK {
3329
3401
  */
3330
3402
  async list(options) {
3331
3403
  var _a;
3332
- log18("Listing user credentials");
3404
+ log19("Listing user credentials");
3333
3405
  const result = await this.request("/v1/user/creds", options);
3334
- log18("Found %d credentials", ((_a = result.data) == null ? void 0 : _a.length) || 0);
3406
+ log19("Found %d credentials", ((_a = result.data) == null ? void 0 : _a.length) || 0);
3335
3407
  return result;
3336
3408
  }
3337
3409
  /**
@@ -3346,7 +3418,7 @@ var CredService = class extends BaseSDK {
3346
3418
  * @returns Promise resolving to the credential details
3347
3419
  */
3348
3420
  async get(id, getOptions, options) {
3349
- log18("Getting credential: %d (decrypt=%s)", id, getOptions == null ? void 0 : getOptions.decrypt);
3421
+ log19("Getting credential: %d (decrypt=%s)", id, getOptions == null ? void 0 : getOptions.decrypt);
3350
3422
  const queryParams = {};
3351
3423
  if (getOptions == null ? void 0 : getOptions.decrypt) {
3352
3424
  queryParams.decrypt = "true";
@@ -3356,7 +3428,7 @@ var CredService = class extends BaseSDK {
3356
3428
  `/v1/user/creds/${id}${queryString}`,
3357
3429
  options
3358
3430
  );
3359
- log18("Retrieved credential: %s", result.key);
3431
+ log19("Retrieved credential: %s", result.key);
3360
3432
  return result;
3361
3433
  }
3362
3434
  // ===========================================================================
@@ -3375,7 +3447,7 @@ var CredService = class extends BaseSDK {
3375
3447
  * @returns Promise resolving to the created credential
3376
3448
  */
3377
3449
  async createKV(data, options) {
3378
- log18("Creating KV credential: %s (type=%s)", data.key, data.type);
3450
+ log19("Creating KV credential: %s (type=%s)", data.key, data.type);
3379
3451
  const result = await this.request("/v1/user/creds/kv", {
3380
3452
  body: JSON.stringify(data),
3381
3453
  headers: {
@@ -3384,7 +3456,7 @@ var CredService = class extends BaseSDK {
3384
3456
  method: "POST",
3385
3457
  ...options
3386
3458
  });
3387
- log18("Created KV credential: %d", result.id);
3459
+ log19("Created KV credential: %d", result.id);
3388
3460
  return result;
3389
3461
  }
3390
3462
  /**
@@ -3398,7 +3470,7 @@ var CredService = class extends BaseSDK {
3398
3470
  * @returns Promise resolving to the created credential
3399
3471
  */
3400
3472
  async createOAuth(data, options) {
3401
- log18("Creating OAuth credential: %s (connectionId=%d)", data.key, data.oauthConnectionId);
3473
+ log19("Creating OAuth credential: %s (connectionId=%d)", data.key, data.oauthConnectionId);
3402
3474
  const result = await this.request("/v1/user/creds/oauth", {
3403
3475
  body: JSON.stringify(data),
3404
3476
  headers: {
@@ -3407,7 +3479,7 @@ var CredService = class extends BaseSDK {
3407
3479
  method: "POST",
3408
3480
  ...options
3409
3481
  });
3410
- log18("Created OAuth credential: %d", result.id);
3482
+ log19("Created OAuth credential: %d", result.id);
3411
3483
  return result;
3412
3484
  }
3413
3485
  /**
@@ -3421,7 +3493,7 @@ var CredService = class extends BaseSDK {
3421
3493
  * @returns Promise resolving to the created credential
3422
3494
  */
3423
3495
  async createFile(data, options) {
3424
- log18("Creating file credential: %s (fileName=%s)", data.key, data.fileName);
3496
+ log19("Creating file credential: %s (fileName=%s)", data.key, data.fileName);
3425
3497
  const result = await this.request("/v1/user/creds/file", {
3426
3498
  body: JSON.stringify(data),
3427
3499
  headers: {
@@ -3430,7 +3502,7 @@ var CredService = class extends BaseSDK {
3430
3502
  method: "POST",
3431
3503
  ...options
3432
3504
  });
3433
- log18("Created file credential: %d", result.id);
3505
+ log19("Created file credential: %d", result.id);
3434
3506
  return result;
3435
3507
  }
3436
3508
  // ===========================================================================
@@ -3448,7 +3520,7 @@ var CredService = class extends BaseSDK {
3448
3520
  * @returns Promise resolving to the updated credential
3449
3521
  */
3450
3522
  async update(id, data, options) {
3451
- log18("Updating credential: %d", id);
3523
+ log19("Updating credential: %d", id);
3452
3524
  const result = await this.request(`/v1/user/creds/${id}`, {
3453
3525
  body: JSON.stringify(data),
3454
3526
  headers: {
@@ -3457,7 +3529,7 @@ var CredService = class extends BaseSDK {
3457
3529
  method: "PATCH",
3458
3530
  ...options
3459
3531
  });
3460
- log18("Updated credential: %d", result.id);
3532
+ log19("Updated credential: %d", result.id);
3461
3533
  return result;
3462
3534
  }
3463
3535
  // ===========================================================================
@@ -3478,7 +3550,7 @@ var CredService = class extends BaseSDK {
3478
3550
  * @returns Promise resolving to the updated credential
3479
3551
  */
3480
3552
  async share(id, data, options) {
3481
- log18("Sharing credential %d with org %s", id, data.orgId);
3553
+ log19("Sharing credential %d with org %s", id, data.orgId);
3482
3554
  const result = await this.request(`/v1/user/creds/${id}/share`, {
3483
3555
  body: JSON.stringify(data),
3484
3556
  headers: {
@@ -3487,7 +3559,7 @@ var CredService = class extends BaseSDK {
3487
3559
  method: "POST",
3488
3560
  ...options
3489
3561
  });
3490
- log18("Shared credential: %d", result.id);
3562
+ log19("Shared credential: %d", result.id);
3491
3563
  return result;
3492
3564
  }
3493
3565
  /**
@@ -3502,12 +3574,12 @@ var CredService = class extends BaseSDK {
3502
3574
  * @returns Promise resolving to the updated credential
3503
3575
  */
3504
3576
  async publish(id, options) {
3505
- log18("Publishing credential: %d", id);
3577
+ log19("Publishing credential: %d", id);
3506
3578
  const result = await this.request(`/v1/user/creds/${id}/publish`, {
3507
3579
  method: "POST",
3508
3580
  ...options
3509
3581
  });
3510
- log18("Published credential: %d", result.id);
3582
+ log19("Published credential: %d", result.id);
3511
3583
  return result;
3512
3584
  }
3513
3585
  /**
@@ -3522,12 +3594,12 @@ var CredService = class extends BaseSDK {
3522
3594
  * @returns Promise resolving to the updated credential
3523
3595
  */
3524
3596
  async unshare(id, options) {
3525
- log18("Unsharing credential: %d", id);
3597
+ log19("Unsharing credential: %d", id);
3526
3598
  const result = await this.request(`/v1/user/creds/${id}/unshare`, {
3527
3599
  method: "POST",
3528
3600
  ...options
3529
3601
  });
3530
- log18("Unshared credential: %d", result.id);
3602
+ log19("Unshared credential: %d", result.id);
3531
3603
  return result;
3532
3604
  }
3533
3605
  // ===========================================================================
@@ -3543,12 +3615,12 @@ var CredService = class extends BaseSDK {
3543
3615
  * @returns Promise resolving to the delete result
3544
3616
  */
3545
3617
  async delete(id, options) {
3546
- log18("Deleting credential by ID: %d", id);
3618
+ log19("Deleting credential by ID: %d", id);
3547
3619
  const result = await this.request(`/v1/user/creds/${id}`, {
3548
3620
  method: "DELETE",
3549
3621
  ...options
3550
3622
  });
3551
- log18("Deleted credential: %d, success=%s", id, result.success);
3623
+ log19("Deleted credential: %d, success=%s", id, result.success);
3552
3624
  return result;
3553
3625
  }
3554
3626
  /**
@@ -3562,7 +3634,7 @@ var CredService = class extends BaseSDK {
3562
3634
  * @returns Promise resolving to the delete result
3563
3635
  */
3564
3636
  async deleteByKey(key, options) {
3565
- log18("Deleting credential by key: %s", key);
3637
+ log19("Deleting credential by key: %s", key);
3566
3638
  const result = await this.request(
3567
3639
  `/v1/user/creds/key/${encodeURIComponent(key)}`,
3568
3640
  {
@@ -3570,7 +3642,7 @@ var CredService = class extends BaseSDK {
3570
3642
  ...options
3571
3643
  }
3572
3644
  );
3573
- log18("Deleted credential by key: %s, success=%s", key, result.success);
3645
+ log19("Deleted credential by key: %s, success=%s", key, result.success);
3574
3646
  return result;
3575
3647
  }
3576
3648
  // ===========================================================================
@@ -3589,12 +3661,12 @@ var CredService = class extends BaseSDK {
3589
3661
  * @returns Promise resolving to the credential status list
3590
3662
  */
3591
3663
  async getSkillCredStatus(skillIdentifier, options) {
3592
- log18("Getting skill cred status: %s", skillIdentifier);
3664
+ log19("Getting skill cred status: %s", skillIdentifier);
3593
3665
  const result = await this.request(
3594
3666
  `/v1/skills/${encodeURIComponent(skillIdentifier)}/creds/status`,
3595
3667
  options
3596
3668
  );
3597
- log18("Skill %s has %d credential requirements", skillIdentifier, result.length);
3669
+ log19("Skill %s has %d credential requirements", skillIdentifier, result.length);
3598
3670
  return result;
3599
3671
  }
3600
3672
  // ===========================================================================
@@ -3633,7 +3705,7 @@ var CredService = class extends BaseSDK {
3633
3705
  */
3634
3706
  async inject(request, options) {
3635
3707
  var _a, _b, _c, _d;
3636
- log18("Injecting credentials by keys: %O (sandbox=%s)", request.keys, request.sandbox);
3708
+ log19("Injecting credentials by keys: %O (sandbox=%s)", request.keys, request.sandbox);
3637
3709
  const result = await this.request(
3638
3710
  "/v1/plugins/run-buildin-tools/inject-creds",
3639
3711
  {
@@ -3645,7 +3717,7 @@ var CredService = class extends BaseSDK {
3645
3717
  ...options
3646
3718
  }
3647
3719
  );
3648
- log18(
3720
+ log19(
3649
3721
  "Inject result: success=%s, env=%d, files=%d, notFound=%d",
3650
3722
  result.success,
3651
3723
  Object.keys(((_a = result.credentials) == null ? void 0 : _a.env) || {}).length,
@@ -3687,7 +3759,7 @@ var CredService = class extends BaseSDK {
3687
3759
  */
3688
3760
  async injectForSkill(request, options) {
3689
3761
  var _a, _b, _c, _d;
3690
- log18(
3762
+ log19(
3691
3763
  "Injecting credentials for skill: %s (sandbox=%s)",
3692
3764
  request.skillIdentifier,
3693
3765
  request.sandbox
@@ -3703,7 +3775,7 @@ var CredService = class extends BaseSDK {
3703
3775
  ...options
3704
3776
  }
3705
3777
  );
3706
- log18(
3778
+ log19(
3707
3779
  "Inject result: success=%s, env=%d, files=%d, missing=%d",
3708
3780
  result.success,
3709
3781
  Object.keys(((_a = result.credentials) == null ? void 0 : _a.env) || {}).length,
@@ -3714,10 +3786,44 @@ var CredService = class extends BaseSDK {
3714
3786
  }
3715
3787
  };
3716
3788
 
3789
+ // src/market/services/DeploymentService.ts
3790
+ import debug20 from "debug";
3791
+ var log20 = debug20("lobe-market-sdk:deployments");
3792
+ var DeploymentService = class extends BaseSDK {
3793
+ async prepareUpload(data, options) {
3794
+ log20("Preparing deployment upload with %d files", data.files.length);
3795
+ const result = await this.request(
3796
+ "/v1/deployments/uploads/prepare",
3797
+ {
3798
+ ...options,
3799
+ body: JSON.stringify(data),
3800
+ method: "POST"
3801
+ }
3802
+ );
3803
+ return result.data;
3804
+ }
3805
+ async ingestUpload(uploadId, options) {
3806
+ log20("Ingesting deployment upload: %s", uploadId);
3807
+ const result = await this.request(
3808
+ `/v1/deployments/uploads/${encodeURIComponent(uploadId)}/ingest`,
3809
+ { ...options, method: "POST" }
3810
+ );
3811
+ return result.data;
3812
+ }
3813
+ async finalizeUpload(uploadId, options) {
3814
+ log20("Finalizing deployment upload: %s", uploadId);
3815
+ const result = await this.request(
3816
+ `/v1/deployments/uploads/${encodeURIComponent(uploadId)}/finalize`,
3817
+ { ...options, method: "POST" }
3818
+ );
3819
+ return result.data;
3820
+ }
3821
+ };
3822
+
3717
3823
  // src/market/services/DiscoveryService.ts
3718
- import debug19 from "debug";
3824
+ import debug21 from "debug";
3719
3825
  import urlJoin4 from "url-join";
3720
- var log19 = debug19("lobe-market-sdk:discovery");
3826
+ var log21 = debug21("lobe-market-sdk:discovery");
3721
3827
  var DiscoveryService = class extends BaseSDK {
3722
3828
  /**
3723
3829
  * Retrieves the service discovery document
@@ -3729,9 +3835,9 @@ var DiscoveryService = class extends BaseSDK {
3729
3835
  * @returns Promise resolving to the service discovery document
3730
3836
  */
3731
3837
  async getDiscoveryDocument() {
3732
- log19("Fetching discovery document");
3838
+ log21("Fetching discovery document");
3733
3839
  if (this.discoveryDoc) {
3734
- log19("Returning cached discovery document");
3840
+ log21("Returning cached discovery document");
3735
3841
  return this.discoveryDoc;
3736
3842
  }
3737
3843
  const res = await fetch(urlJoin4(this.baseUrl, "/.well-known/discovery"));
@@ -3739,14 +3845,14 @@ var DiscoveryService = class extends BaseSDK {
3739
3845
  throw new Error(await res.text());
3740
3846
  }
3741
3847
  this.discoveryDoc = await res.json();
3742
- log19("Discovery document successfully fetched");
3848
+ log21("Discovery document successfully fetched");
3743
3849
  return this.discoveryDoc;
3744
3850
  }
3745
3851
  };
3746
3852
 
3747
3853
  // src/market/services/FeedbackService.ts
3748
- import debug20 from "debug";
3749
- var log20 = debug20("lobe-market-sdk:feedback");
3854
+ import debug22 from "debug";
3855
+ var log22 = debug22("lobe-market-sdk:feedback");
3750
3856
  var FeedbackService = class extends BaseSDK {
3751
3857
  /**
3752
3858
  * Submits user feedback
@@ -3776,7 +3882,7 @@ var FeedbackService = class extends BaseSDK {
3776
3882
  * ```
3777
3883
  */
3778
3884
  async submitFeedback(data, options) {
3779
- log20("Submitting feedback: %s", data.title);
3885
+ log22("Submitting feedback: %s", data.title);
3780
3886
  const result = await this.request("/v1/user/feedback", {
3781
3887
  body: JSON.stringify(data),
3782
3888
  headers: {
@@ -3785,14 +3891,23 @@ var FeedbackService = class extends BaseSDK {
3785
3891
  method: "POST",
3786
3892
  ...options
3787
3893
  });
3788
- log20("Feedback submitted successfully: %s", result.issueId);
3894
+ log22("Feedback submitted successfully: %s", result.issueId);
3789
3895
  return result;
3790
3896
  }
3791
3897
  };
3792
3898
 
3793
3899
  // src/market/services/PluginsService.ts
3794
- import debug21 from "debug";
3795
- var log21 = debug21("lobe-market-sdk:plugins");
3900
+ import debug23 from "debug";
3901
+ var log23 = debug23("lobe-market-sdk:plugins");
3902
+ function encodeBase64(input) {
3903
+ if (typeof Buffer !== "undefined") {
3904
+ return Buffer.from(input, "utf8").toString("base64");
3905
+ }
3906
+ const bytes = new TextEncoder().encode(input);
3907
+ let binary = "";
3908
+ for (const byte of bytes) binary += String.fromCharCode(byte);
3909
+ return btoa(binary);
3910
+ }
3796
3911
  var PluginsService = class extends BaseSDK {
3797
3912
  /**
3798
3913
  * Retrieves a list of plugins from the marketplace
@@ -3807,9 +3922,9 @@ var PluginsService = class extends BaseSDK {
3807
3922
  const locale = params.locale || this.defaultLocale;
3808
3923
  const queryParams = { ...params, locale };
3809
3924
  const queryString = this.buildQueryString(queryParams);
3810
- log21("Getting plugin list: %O", queryParams);
3925
+ log23("Getting plugin list: %O", queryParams);
3811
3926
  const result = await this.request(`/v1/plugins${queryString}`, options);
3812
- log21("Retrieved %d plugins", result.items.length);
3927
+ log23("Retrieved %d plugins", result.items.length);
3813
3928
  return result;
3814
3929
  }
3815
3930
  /**
@@ -3827,12 +3942,12 @@ var PluginsService = class extends BaseSDK {
3827
3942
  const locale = params.locale || this.defaultLocale;
3828
3943
  const queryParams = { ...params, locale };
3829
3944
  const queryString = this.buildQueryString(queryParams);
3830
- log21("Getting plugin categories: %O", queryParams);
3945
+ log23("Getting plugin categories: %O", queryParams);
3831
3946
  const result = await this.request(
3832
3947
  `/v1/plugins/categories${queryString}`,
3833
3948
  options
3834
3949
  );
3835
- log21("Retrieved %d categories", result.length);
3950
+ log23("Retrieved %d categories", result.length);
3836
3951
  return result;
3837
3952
  }
3838
3953
  /**
@@ -3846,12 +3961,12 @@ var PluginsService = class extends BaseSDK {
3846
3961
  * @returns Promise resolving to an array containing identifiers array and last modified time
3847
3962
  */
3848
3963
  async getPublishedIdentifiers(options) {
3849
- log21("Getting published plugin identifiers");
3964
+ log23("Getting published plugin identifiers");
3850
3965
  const result = await this.request(
3851
3966
  "/v1/plugins/identifiers",
3852
3967
  options
3853
3968
  );
3854
- log21("Retrieved %d published plugin identifiers", result.length);
3969
+ log23("Retrieved %d published plugin identifiers", result.length);
3855
3970
  return result;
3856
3971
  }
3857
3972
  /**
@@ -3862,12 +3977,12 @@ var PluginsService = class extends BaseSDK {
3862
3977
  */
3863
3978
  async getSitemap(params = {}, options) {
3864
3979
  const queryString = this.buildQueryString(params);
3865
- log21("Getting plugin sitemap%s", queryString);
3980
+ log23("Getting plugin sitemap%s", queryString);
3866
3981
  const result = await this.request(
3867
3982
  `/v1/plugins/sitemap${queryString}`,
3868
3983
  options
3869
3984
  );
3870
- log21(
3985
+ log23(
3871
3986
  "Retrieved plugin sitemap page %d/%d (%d items)",
3872
3987
  result.currentPage,
3873
3988
  result.totalPages,
@@ -3892,7 +4007,7 @@ var PluginsService = class extends BaseSDK {
3892
4007
  version,
3893
4008
  identifier
3894
4009
  }, options) {
3895
- log21("Getting plugin manifest: %O", { identifier, locale, version });
4010
+ log23("Getting plugin manifest: %O", { identifier, locale, version });
3896
4011
  const localeParam = locale || this.defaultLocale;
3897
4012
  const params = { locale: localeParam };
3898
4013
  if (version) {
@@ -3903,7 +4018,7 @@ var PluginsService = class extends BaseSDK {
3903
4018
  `/v1/plugins/${identifier}/manifest${queryString}`,
3904
4019
  options
3905
4020
  );
3906
- log21("Plugin manifest successfully retrieved: %s", identifier);
4021
+ log23("Plugin manifest successfully retrieved: %s", identifier);
3907
4022
  return manifest;
3908
4023
  }
3909
4024
  /**
@@ -3920,7 +4035,7 @@ var PluginsService = class extends BaseSDK {
3920
4035
  version,
3921
4036
  identifier
3922
4037
  }, options) {
3923
- log21("Getting plugin detail: %O", { identifier, locale, version });
4038
+ log23("Getting plugin detail: %O", { identifier, locale, version });
3924
4039
  const localeParam = locale || this.defaultLocale;
3925
4040
  const params = { locale: localeParam };
3926
4041
  if (version) {
@@ -3931,7 +4046,7 @@ var PluginsService = class extends BaseSDK {
3931
4046
  `/v1/plugins/${identifier}${queryString}`,
3932
4047
  options
3933
4048
  );
3934
- log21("Plugin manifest successfully retrieved: %s", identifier);
4049
+ log23("Plugin manifest successfully retrieved: %s", identifier);
3935
4050
  return manifest;
3936
4051
  }
3937
4052
  /**
@@ -3946,7 +4061,7 @@ var PluginsService = class extends BaseSDK {
3946
4061
  *
3947
4062
  */
3948
4063
  async reportInstallation(reportData) {
3949
- log21("Reporting installation for %s@%s", reportData.identifier, reportData.version);
4064
+ log23("Reporting installation for %s@%s", reportData.identifier, reportData.version);
3950
4065
  const result = await this.request("/v1/plugins/report/installation", {
3951
4066
  body: JSON.stringify(reportData),
3952
4067
  headers: {
@@ -3954,7 +4069,7 @@ var PluginsService = class extends BaseSDK {
3954
4069
  },
3955
4070
  method: "POST"
3956
4071
  });
3957
- log21("Installation report submitted successfully: %O", result);
4072
+ log23("Installation report submitted successfully: %O", result);
3958
4073
  return result;
3959
4074
  }
3960
4075
  /**
@@ -3968,7 +4083,7 @@ var PluginsService = class extends BaseSDK {
3968
4083
  * @returns Promise resolving to the report submission response
3969
4084
  */
3970
4085
  async reportCall(reportData) {
3971
- log21(
4086
+ log23(
3972
4087
  "Reporting call for %s@%s - %s:%s",
3973
4088
  reportData.identifier,
3974
4089
  reportData.version,
@@ -3982,7 +4097,7 @@ var PluginsService = class extends BaseSDK {
3982
4097
  },
3983
4098
  method: "POST"
3984
4099
  });
3985
- log21("Call report submitted successfully: %O", result);
4100
+ log23("Call report submitted successfully: %O", result);
3986
4101
  return result;
3987
4102
  }
3988
4103
  /**
@@ -3994,7 +4109,7 @@ var PluginsService = class extends BaseSDK {
3994
4109
  * @param options - Optional request init overrides
3995
4110
  */
3996
4111
  async createEvent(eventData, options) {
3997
- log21("Recording plugin event: %s for %s", eventData.event, eventData.identifier);
4112
+ log23("Recording plugin event: %s for %s", eventData.event, eventData.identifier);
3998
4113
  await this.request("/v1/plugins/events", {
3999
4114
  body: JSON.stringify(eventData),
4000
4115
  headers: {
@@ -4024,7 +4139,7 @@ var PluginsService = class extends BaseSDK {
4024
4139
  * ```
4025
4140
  */
4026
4141
  async callCloudGateway(request, options) {
4027
- log21("Calling cloud gateway for plugin %s, tool %s", request.identifier, request.toolName);
4142
+ log23("Calling cloud gateway for plugin %s, tool %s", request.identifier, request.toolName);
4028
4143
  const result = await this.request("/v1/plugins/cloud-gateway", {
4029
4144
  body: JSON.stringify(request),
4030
4145
  headers: {
@@ -4033,7 +4148,7 @@ var PluginsService = class extends BaseSDK {
4033
4148
  method: "POST",
4034
4149
  ...options
4035
4150
  });
4036
- log21("Cloud gateway call completed: %O", {
4151
+ log23("Cloud gateway call completed: %O", {
4037
4152
  identifier: request.identifier,
4038
4153
  isError: result.isError,
4039
4154
  toolName: request.toolName
@@ -4074,7 +4189,7 @@ var PluginsService = class extends BaseSDK {
4074
4189
  * ```
4075
4190
  */
4076
4191
  async runBuildInTool(toolName, params, context, options) {
4077
- log21(
4192
+ log23(
4078
4193
  "Running built-in tool: %s for user %s, topic %s",
4079
4194
  toolName,
4080
4195
  context.userId,
@@ -4082,7 +4197,8 @@ var PluginsService = class extends BaseSDK {
4082
4197
  );
4083
4198
  const result = await this.request("/v1/plugins/run-buildin-tools", {
4084
4199
  body: JSON.stringify({
4085
- params,
4200
+ paramsB64: encodeBase64(JSON.stringify(params)),
4201
+ paramsEncoding: "base64",
4086
4202
  toolName,
4087
4203
  topicId: context.topicId,
4088
4204
  userId: context.userId
@@ -4093,7 +4209,7 @@ var PluginsService = class extends BaseSDK {
4093
4209
  method: "POST",
4094
4210
  ...options
4095
4211
  });
4096
- log21("Built-in tool execution completed: %O", {
4212
+ log23("Built-in tool execution completed: %O", {
4097
4213
  success: result.success,
4098
4214
  toolName
4099
4215
  });
@@ -4206,7 +4322,7 @@ var PluginsService = class extends BaseSDK {
4206
4322
  * @returns Promise resolving to the submitted score
4207
4323
  */
4208
4324
  async submitRating(identifier, score, options) {
4209
- log21("Submitting rating for plugin %s: %d", identifier, score);
4325
+ log23("Submitting rating for plugin %s: %d", identifier, score);
4210
4326
  const result = await this.request(
4211
4327
  `/v1/plugins/${encodeURIComponent(identifier)}/ratings`,
4212
4328
  {
@@ -4215,7 +4331,7 @@ var PluginsService = class extends BaseSDK {
4215
4331
  method: "POST"
4216
4332
  }
4217
4333
  );
4218
- log21("Rating submitted for plugin %s: %d", identifier, result.score);
4334
+ log23("Rating submitted for plugin %s: %d", identifier, result.score);
4219
4335
  return result;
4220
4336
  }
4221
4337
  /**
@@ -4226,7 +4342,7 @@ var PluginsService = class extends BaseSDK {
4226
4342
  * @returns Promise resolving to success status
4227
4343
  */
4228
4344
  async deleteRating(identifier, options) {
4229
- log21("Deleting rating for plugin %s", identifier);
4345
+ log23("Deleting rating for plugin %s", identifier);
4230
4346
  const result = await this.request(
4231
4347
  `/v1/plugins/${encodeURIComponent(identifier)}/ratings`,
4232
4348
  {
@@ -4234,7 +4350,7 @@ var PluginsService = class extends BaseSDK {
4234
4350
  method: "DELETE"
4235
4351
  }
4236
4352
  );
4237
- log21("Rating deleted for plugin %s", identifier);
4353
+ log23("Rating deleted for plugin %s", identifier);
4238
4354
  return result;
4239
4355
  }
4240
4356
  /**
@@ -4245,12 +4361,12 @@ var PluginsService = class extends BaseSDK {
4245
4361
  * @returns Promise resolving to the rating distribution
4246
4362
  */
4247
4363
  async getRatingDistribution(identifier, options) {
4248
- log21("Getting rating distribution for plugin: %s", identifier);
4364
+ log23("Getting rating distribution for plugin: %s", identifier);
4249
4365
  const result = await this.request(
4250
4366
  `/v1/plugins/${encodeURIComponent(identifier)}/ratings/distribution`,
4251
4367
  options
4252
4368
  );
4253
- log21("Rating distribution retrieved for plugin %s: %d total", identifier, result.totalCount);
4369
+ log23("Rating distribution retrieved for plugin %s: %d total", identifier, result.totalCount);
4254
4370
  return result;
4255
4371
  }
4256
4372
  // ============================================================================
@@ -4266,12 +4382,12 @@ var PluginsService = class extends BaseSDK {
4266
4382
  */
4267
4383
  async getComments(identifier, params = {}, options) {
4268
4384
  const queryString = this.buildQueryString(params);
4269
- log21("Getting comments for plugin %s: %O", identifier, params);
4385
+ log23("Getting comments for plugin %s: %O", identifier, params);
4270
4386
  const result = await this.request(
4271
4387
  `/v1/plugins/${encodeURIComponent(identifier)}/comments${queryString}`,
4272
4388
  options
4273
4389
  );
4274
- log21(
4390
+ log23(
4275
4391
  "Retrieved %d comments for plugin %s (page %d/%d)",
4276
4392
  result.items.length,
4277
4393
  identifier,
@@ -4288,15 +4404,15 @@ var PluginsService = class extends BaseSDK {
4288
4404
  * @returns Promise resolving to the latest own comment or null when none exists
4289
4405
  */
4290
4406
  async getLatestOwnComment(identifier, options) {
4291
- log21("Getting latest own comment for plugin %s", identifier);
4407
+ log23("Getting latest own comment for plugin %s", identifier);
4292
4408
  const result = await this.request(
4293
4409
  `/v1/plugins/${encodeURIComponent(identifier)}/comments/latest`,
4294
4410
  options
4295
4411
  );
4296
4412
  if (result) {
4297
- log21("Retrieved latest own comment for plugin %s: id=%d", identifier, result.id);
4413
+ log23("Retrieved latest own comment for plugin %s: id=%d", identifier, result.id);
4298
4414
  } else {
4299
- log21("No own comments found for plugin %s", identifier);
4415
+ log23("No own comments found for plugin %s", identifier);
4300
4416
  }
4301
4417
  return result;
4302
4418
  }
@@ -4309,7 +4425,7 @@ var PluginsService = class extends BaseSDK {
4309
4425
  * @returns Promise resolving to the created comment (with optional rating field)
4310
4426
  */
4311
4427
  async createComment(identifier, data, options) {
4312
- log21("Creating comment on plugin %s", identifier);
4428
+ log23("Creating comment on plugin %s", identifier);
4313
4429
  const result = await this.request(
4314
4430
  `/v1/plugins/${encodeURIComponent(identifier)}/comments`,
4315
4431
  {
@@ -4318,7 +4434,7 @@ var PluginsService = class extends BaseSDK {
4318
4434
  method: "POST"
4319
4435
  }
4320
4436
  );
4321
- log21("Comment created on plugin %s: id=%d", identifier, result.id);
4437
+ log23("Comment created on plugin %s: id=%d", identifier, result.id);
4322
4438
  return result;
4323
4439
  }
4324
4440
  /**
@@ -4330,7 +4446,7 @@ var PluginsService = class extends BaseSDK {
4330
4446
  * @returns Promise resolving to success status
4331
4447
  */
4332
4448
  async deleteComment(identifier, commentId, options) {
4333
- log21("Deleting comment %d from plugin %s", commentId, identifier);
4449
+ log23("Deleting comment %d from plugin %s", commentId, identifier);
4334
4450
  const result = await this.request(
4335
4451
  `/v1/plugins/${encodeURIComponent(identifier)}/comments/${commentId}`,
4336
4452
  {
@@ -4338,7 +4454,7 @@ var PluginsService = class extends BaseSDK {
4338
4454
  method: "DELETE"
4339
4455
  }
4340
4456
  );
4341
- log21("Comment %d deleted from plugin %s", commentId, identifier);
4457
+ log23("Comment %d deleted from plugin %s", commentId, identifier);
4342
4458
  return result;
4343
4459
  }
4344
4460
  // ============================================================================
@@ -4353,7 +4469,7 @@ var PluginsService = class extends BaseSDK {
4353
4469
  * @returns Promise resolving to the created reaction
4354
4470
  */
4355
4471
  async addReaction(commentId, type, options) {
4356
- log21("Adding %s reaction to comment %d", type, commentId);
4472
+ log23("Adding %s reaction to comment %d", type, commentId);
4357
4473
  const result = await this.request(
4358
4474
  `/v1/plugins/comments/${commentId}/reactions`,
4359
4475
  {
@@ -4362,7 +4478,7 @@ var PluginsService = class extends BaseSDK {
4362
4478
  method: "POST"
4363
4479
  }
4364
4480
  );
4365
- log21("Reaction added to comment %d: %s (id=%d)", commentId, result.type, result.id);
4481
+ log23("Reaction added to comment %d: %s (id=%d)", commentId, result.type, result.id);
4366
4482
  return result;
4367
4483
  }
4368
4484
  /**
@@ -4373,7 +4489,7 @@ var PluginsService = class extends BaseSDK {
4373
4489
  * @returns Promise resolving to success status
4374
4490
  */
4375
4491
  async removeReaction(commentId, options) {
4376
- log21("Removing reaction from comment %d", commentId);
4492
+ log23("Removing reaction from comment %d", commentId);
4377
4493
  const result = await this.request(
4378
4494
  `/v1/plugins/comments/${commentId}/reactions`,
4379
4495
  {
@@ -4381,15 +4497,15 @@ var PluginsService = class extends BaseSDK {
4381
4497
  method: "DELETE"
4382
4498
  }
4383
4499
  );
4384
- log21("Reaction removed from comment %d", commentId);
4500
+ log23("Reaction removed from comment %d", commentId);
4385
4501
  return result;
4386
4502
  }
4387
4503
  };
4388
4504
 
4389
4505
  // src/market/services/SkillService.ts
4390
- import debug22 from "debug";
4391
- var log22 = debug22("lobe-market-sdk:skill");
4392
- var SkillService = class extends BaseSDK {
4506
+ import debug24 from "debug";
4507
+ var log24 = debug24("lobe-market-sdk:skill");
4508
+ var SkillService2 = class extends BaseSDK {
4393
4509
  /**
4394
4510
  * Lists all available skill providers
4395
4511
  *
@@ -4401,9 +4517,9 @@ var SkillService = class extends BaseSDK {
4401
4517
  */
4402
4518
  async listProviders(options) {
4403
4519
  var _a;
4404
- log22("Listing skill providers");
4520
+ log24("Listing skill providers");
4405
4521
  const result = await this.request("/v1/skill/providers", options);
4406
- log22("Found %d skill providers", ((_a = result.providers) == null ? void 0 : _a.length) || 0);
4522
+ log24("Found %d skill providers", ((_a = result.providers) == null ? void 0 : _a.length) || 0);
4407
4523
  return result;
4408
4524
  }
4409
4525
  /**
@@ -4418,12 +4534,12 @@ var SkillService = class extends BaseSDK {
4418
4534
  */
4419
4535
  async listTools(provider, options) {
4420
4536
  var _a;
4421
- log22("Listing tools for provider: %s", provider);
4537
+ log24("Listing tools for provider: %s", provider);
4422
4538
  const result = await this.request(
4423
4539
  `/v1/skill/${encodeURIComponent(provider)}/tools`,
4424
4540
  options
4425
4541
  );
4426
- log22("Found %d tools for provider %s", ((_a = result.tools) == null ? void 0 : _a.length) || 0, provider);
4542
+ log24("Found %d tools for provider %s", ((_a = result.tools) == null ? void 0 : _a.length) || 0, provider);
4427
4543
  return result;
4428
4544
  }
4429
4545
  /**
@@ -4440,12 +4556,12 @@ var SkillService = class extends BaseSDK {
4440
4556
  */
4441
4557
  async listLiveTools(provider, options) {
4442
4558
  var _a;
4443
- log22("Listing live tools for provider: %s", provider);
4559
+ log24("Listing live tools for provider: %s", provider);
4444
4560
  const result = await this.request(
4445
4561
  `/v1/skill/${encodeURIComponent(provider)}/tools/live`,
4446
4562
  options
4447
4563
  );
4448
- log22("Found %d live tools for provider %s", ((_a = result.tools) == null ? void 0 : _a.length) || 0, provider);
4564
+ log24("Found %d live tools for provider %s", ((_a = result.tools) == null ? void 0 : _a.length) || 0, provider);
4449
4565
  return result;
4450
4566
  }
4451
4567
  /**
@@ -4461,12 +4577,12 @@ var SkillService = class extends BaseSDK {
4461
4577
  */
4462
4578
  async getTool(provider, toolName, options) {
4463
4579
  var _a;
4464
- log22("Getting tool %s from provider %s", toolName, provider);
4580
+ log24("Getting tool %s from provider %s", toolName, provider);
4465
4581
  const result = await this.request(
4466
4582
  `/v1/skill/${encodeURIComponent(provider)}/tool/${encodeURIComponent(toolName)}`,
4467
4583
  options
4468
4584
  );
4469
- log22("Retrieved tool: %s", (_a = result.tool) == null ? void 0 : _a.name);
4585
+ log24("Retrieved tool: %s", (_a = result.tool) == null ? void 0 : _a.name);
4470
4586
  return result;
4471
4587
  }
4472
4588
  /**
@@ -4480,12 +4596,12 @@ var SkillService = class extends BaseSDK {
4480
4596
  * @returns Promise resolving to the connection status
4481
4597
  */
4482
4598
  async getStatus(provider, options) {
4483
- log22("Getting status for provider: %s", provider);
4599
+ log24("Getting status for provider: %s", provider);
4484
4600
  const result = await this.request(
4485
4601
  `/v1/skill/${encodeURIComponent(provider)}/status`,
4486
4602
  options
4487
4603
  );
4488
- log22("Provider %s status: connected=%s", provider, result.connected);
4604
+ log24("Provider %s status: connected=%s", provider, result.connected);
4489
4605
  return result;
4490
4606
  }
4491
4607
  /**
@@ -4513,7 +4629,7 @@ var SkillService = class extends BaseSDK {
4513
4629
  * ```
4514
4630
  */
4515
4631
  async callTool(provider, params, options) {
4516
- log22("Calling tool %s on provider %s", params.tool, provider);
4632
+ log24("Calling tool %s on provider %s", params.tool, provider);
4517
4633
  const { args, tool, ...rest } = params;
4518
4634
  const result = await this.request(
4519
4635
  `/v1/skill/${encodeURIComponent(provider)}/call`,
@@ -4530,14 +4646,14 @@ var SkillService = class extends BaseSDK {
4530
4646
  ...options
4531
4647
  }
4532
4648
  );
4533
- log22("Tool %s call completed: success=%s", params.tool, result.success);
4649
+ log24("Tool %s call completed: success=%s", params.tool, result.success);
4534
4650
  return result;
4535
4651
  }
4536
4652
  };
4537
4653
 
4538
4654
  // src/market/services/MarketTaskTemplateService.ts
4539
- import debug23 from "debug";
4540
- var log23 = debug23("lobe-market-sdk:task-templates");
4655
+ import debug25 from "debug";
4656
+ var log25 = debug25("lobe-market-sdk:task-templates");
4541
4657
  var MarketTaskTemplateService = class extends BaseSDK {
4542
4658
  /**
4543
4659
  * Retrieves personalized task template recommendations.
@@ -4560,7 +4676,7 @@ var MarketTaskTemplateService = class extends BaseSDK {
4560
4676
  refreshSeed: params.refreshSeed,
4561
4677
  seedKey: params.seedKey
4562
4678
  };
4563
- log23("Getting task template recommendations: %O", body);
4679
+ log25("Getting task template recommendations: %O", body);
4564
4680
  const result = await this.request(
4565
4681
  "/v1/task-templates/recommendations",
4566
4682
  {
@@ -4569,14 +4685,14 @@ var MarketTaskTemplateService = class extends BaseSDK {
4569
4685
  method: "POST"
4570
4686
  }
4571
4687
  );
4572
- log23("Retrieved %d task template recommendations", result.items.length);
4688
+ log25("Retrieved %d task template recommendations", result.items.length);
4573
4689
  return result;
4574
4690
  }
4575
4691
  };
4576
4692
 
4577
4693
  // src/market/services/MarketSkillCollectionService.ts
4578
- import debug24 from "debug";
4579
- var log24 = debug24("lobe-market-sdk:skill-collections");
4694
+ import debug26 from "debug";
4695
+ var log26 = debug26("lobe-market-sdk:skill-collections");
4580
4696
  var MarketSkillCollectionService = class extends BaseSDK {
4581
4697
  async getSkillCollectionDetail(slug, params = {}, options) {
4582
4698
  const locale = params.locale || this.defaultLocale;
@@ -4585,12 +4701,12 @@ var MarketSkillCollectionService = class extends BaseSDK {
4585
4701
  locale
4586
4702
  };
4587
4703
  const queryString = this.buildQueryString(queryParams);
4588
- log24("Getting skill collection detail: %s %O", slug, queryParams);
4704
+ log26("Getting skill collection detail: %s %O", slug, queryParams);
4589
4705
  const result = await this.request(
4590
4706
  `/v1/skills/collections/${encodeURIComponent(slug)}${queryString}`,
4591
4707
  options
4592
4708
  );
4593
- log24("Skill collection detail retrieved: %s (%d items)", slug, result.items.length);
4709
+ log26("Skill collection detail retrieved: %s (%d items)", slug, result.items.length);
4594
4710
  return result;
4595
4711
  }
4596
4712
  async getSkillCollections(params = {}, options) {
@@ -4600,19 +4716,19 @@ var MarketSkillCollectionService = class extends BaseSDK {
4600
4716
  locale
4601
4717
  };
4602
4718
  const queryString = this.buildQueryString(queryParams);
4603
- log24("Getting skill collections: %O", queryParams);
4719
+ log26("Getting skill collections: %O", queryParams);
4604
4720
  const result = await this.request(
4605
4721
  `/v1/skills/collections${queryString}`,
4606
4722
  options
4607
4723
  );
4608
- log24("Retrieved %d skill collections", result.length);
4724
+ log26("Retrieved %d skill collections", result.length);
4609
4725
  return result;
4610
4726
  }
4611
4727
  };
4612
4728
 
4613
4729
  // src/market/services/MarketSkillService.ts
4614
- import debug25 from "debug";
4615
- var log25 = debug25("lobe-market-sdk:market-skills");
4730
+ import debug27 from "debug";
4731
+ var log27 = debug27("lobe-market-sdk:market-skills");
4616
4732
  var MarketSkillService = class extends BaseSDK {
4617
4733
  /**
4618
4734
  * Retrieves a list of skills from the marketplace
@@ -4645,9 +4761,9 @@ var MarketSkillService = class extends BaseSDK {
4645
4761
  const locale = params.locale || this.defaultLocale;
4646
4762
  const queryParams = { ...params, locale };
4647
4763
  const queryString = this.buildQueryString(queryParams);
4648
- log25("Getting skill list: %O", queryParams);
4764
+ log27("Getting skill list: %O", queryParams);
4649
4765
  const result = await this.request(`/v1/skills${queryString}`, options);
4650
- log25(
4766
+ log27(
4651
4767
  "Retrieved %d skills (page %d/%d)",
4652
4768
  result.items.length,
4653
4769
  result.currentPage,
@@ -4686,12 +4802,12 @@ var MarketSkillService = class extends BaseSDK {
4686
4802
  queryParams.version = params.version;
4687
4803
  }
4688
4804
  const queryString = this.buildQueryString(queryParams);
4689
- log25("Getting skill detail: %s %O", identifier, params);
4805
+ log27("Getting skill detail: %s %O", identifier, params);
4690
4806
  const result = await this.request(
4691
4807
  `/v1/skills/${encodeURIComponent(identifier)}${queryString}`,
4692
4808
  options
4693
4809
  );
4694
- log25("Skill detail retrieved: %s (v%s)", identifier, result.version);
4810
+ log27("Skill detail retrieved: %s (v%s)", identifier, result.version);
4695
4811
  return result;
4696
4812
  }
4697
4813
  /**
@@ -4722,7 +4838,7 @@ var MarketSkillService = class extends BaseSDK {
4722
4838
  if (version) {
4723
4839
  url += `?version=${encodeURIComponent(version)}`;
4724
4840
  }
4725
- log25("Generated download URL: %s", url);
4841
+ log27("Generated download URL: %s", url);
4726
4842
  return url;
4727
4843
  }
4728
4844
  /**
@@ -4746,7 +4862,7 @@ var MarketSkillService = class extends BaseSDK {
4746
4862
  * ```
4747
4863
  */
4748
4864
  async downloadSkill(identifier, version, options) {
4749
- log25("Downloading skill: %s (version: %s)", identifier, version || "latest");
4865
+ log27("Downloading skill: %s (version: %s)", identifier, version || "latest");
4750
4866
  const queryParams = {};
4751
4867
  if (version) {
4752
4868
  queryParams.version = version;
@@ -4762,7 +4878,7 @@ var MarketSkillService = class extends BaseSDK {
4762
4878
  });
4763
4879
  if (!response.ok) {
4764
4880
  const errorText = await response.text();
4765
- log25("Download failed: %s %s", response.status, errorText);
4881
+ log27("Download failed: %s %s", response.status, errorText);
4766
4882
  throw new Error(`Failed to download skill: ${response.statusText}`);
4767
4883
  }
4768
4884
  const contentDisposition = response.headers.get("content-disposition");
@@ -4774,7 +4890,7 @@ var MarketSkillService = class extends BaseSDK {
4774
4890
  }
4775
4891
  }
4776
4892
  const buffer = await response.arrayBuffer();
4777
- log25("Downloaded skill: %s (%d bytes)", filename, buffer.byteLength);
4893
+ log27("Downloaded skill: %s (%d bytes)", filename, buffer.byteLength);
4778
4894
  return { buffer, filename };
4779
4895
  }
4780
4896
  /**
@@ -4802,12 +4918,12 @@ var MarketSkillService = class extends BaseSDK {
4802
4918
  const locale = params.locale || this.defaultLocale;
4803
4919
  const queryParams = { ...params, locale };
4804
4920
  const queryString = this.buildQueryString(queryParams);
4805
- log25("Getting skill categories: %O", queryParams);
4921
+ log27("Getting skill categories: %O", queryParams);
4806
4922
  const result = await this.request(
4807
4923
  `/v1/skills/categories${queryString}`,
4808
4924
  options
4809
4925
  );
4810
- log25("Retrieved %d categories", result.length);
4926
+ log27("Retrieved %d categories", result.length);
4811
4927
  return result;
4812
4928
  }
4813
4929
  /**
@@ -4822,12 +4938,12 @@ var MarketSkillService = class extends BaseSDK {
4822
4938
  * @returns Promise resolving to an array of identifiers with last modified times
4823
4939
  */
4824
4940
  async getPublishedIdentifiers(options) {
4825
- log25("Getting published skill identifiers");
4941
+ log27("Getting published skill identifiers");
4826
4942
  const result = await this.request(
4827
4943
  "/v1/skills/identifiers",
4828
4944
  options
4829
4945
  );
4830
- log25("Retrieved %d published skill identifiers", result.length);
4946
+ log27("Retrieved %d published skill identifiers", result.length);
4831
4947
  return result;
4832
4948
  }
4833
4949
  /**
@@ -4838,9 +4954,9 @@ var MarketSkillService = class extends BaseSDK {
4838
4954
  */
4839
4955
  async getSitemap(params = {}, options) {
4840
4956
  const queryString = this.buildQueryString(params);
4841
- log25("Getting skill sitemap%s", queryString);
4957
+ log27("Getting skill sitemap%s", queryString);
4842
4958
  const result = await this.request(`/v1/skills/sitemap${queryString}`, options);
4843
- log25(
4959
+ log27(
4844
4960
  "Retrieved skill sitemap page %d/%d (%d items)",
4845
4961
  result.currentPage,
4846
4962
  result.totalPages,
@@ -4856,13 +4972,13 @@ var MarketSkillService = class extends BaseSDK {
4856
4972
  * @returns Promise resolving to true if skill exists, false otherwise
4857
4973
  */
4858
4974
  async checkSkillExists(identifier, options) {
4859
- log25("Checking if skill exists: %s", identifier);
4975
+ log27("Checking if skill exists: %s", identifier);
4860
4976
  try {
4861
4977
  await this.getSkillDetail(identifier, {}, options);
4862
- log25("Skill exists: %s", identifier);
4978
+ log27("Skill exists: %s", identifier);
4863
4979
  return true;
4864
4980
  } catch (e) {
4865
- log25("Skill does not exist: %s", identifier);
4981
+ log27("Skill does not exist: %s", identifier);
4866
4982
  return false;
4867
4983
  }
4868
4984
  }
@@ -4883,12 +4999,12 @@ var MarketSkillService = class extends BaseSDK {
4883
4999
  * ```
4884
5000
  */
4885
5001
  async getSkillVersions(identifier, options) {
4886
- log25("Getting skill versions: %s", identifier);
5002
+ log27("Getting skill versions: %s", identifier);
4887
5003
  const result = await this.request(
4888
5004
  `/v1/skills/${encodeURIComponent(identifier)}/versions`,
4889
5005
  options
4890
5006
  );
4891
- log25("Retrieved %d versions for skill %s", result.data.length, identifier);
5007
+ log27("Retrieved %d versions for skill %s", result.data.length, identifier);
4892
5008
  return result.data;
4893
5009
  }
4894
5010
  /**
@@ -4912,12 +5028,12 @@ var MarketSkillService = class extends BaseSDK {
4912
5028
  const locale = params.locale || this.defaultLocale;
4913
5029
  const queryParams = { locale };
4914
5030
  const queryString = this.buildQueryString(queryParams);
4915
- log25("Getting skill version: %s@%s", identifier, version);
5031
+ log27("Getting skill version: %s@%s", identifier, version);
4916
5032
  const result = await this.request(
4917
5033
  `/v1/skills/${encodeURIComponent(identifier)}/versions/${encodeURIComponent(version)}${queryString}`,
4918
5034
  options
4919
5035
  );
4920
- log25("Skill version detail retrieved: %s@%s", identifier, version);
5036
+ log27("Skill version detail retrieved: %s@%s", identifier, version);
4921
5037
  return result;
4922
5038
  }
4923
5039
  /**
@@ -4946,13 +5062,13 @@ var MarketSkillService = class extends BaseSDK {
4946
5062
  * ```
4947
5063
  */
4948
5064
  async reportGitHubSkill(params, options) {
4949
- log25("Reporting GitHub skill: %s", params.gitUrl);
5065
+ log27("Reporting GitHub skill: %s", params.gitUrl);
4950
5066
  const result = await this.request("/v1/skills/report/github", {
4951
5067
  ...options,
4952
5068
  body: JSON.stringify(params),
4953
5069
  method: "POST"
4954
5070
  });
4955
- log25("GitHub skill reported: %s (status: %s)", result.identifier, result.status);
5071
+ log27("GitHub skill reported: %s (status: %s)", result.identifier, result.status);
4956
5072
  return result;
4957
5073
  }
4958
5074
  /**
@@ -4977,7 +5093,7 @@ var MarketSkillService = class extends BaseSDK {
4977
5093
  * ```
4978
5094
  */
4979
5095
  async reportSkillInstall(params, options) {
4980
- log25("Reporting skill install: %s (success: %s)", params.identifier, params.success);
5096
+ log27("Reporting skill install: %s (success: %s)", params.identifier, params.success);
4981
5097
  const result = await this.request(
4982
5098
  "/v1/skills/report/installation",
4983
5099
  {
@@ -4986,7 +5102,7 @@ var MarketSkillService = class extends BaseSDK {
4986
5102
  method: "POST"
4987
5103
  }
4988
5104
  );
4989
- log25("Skill install reported: %s", result.message);
5105
+ log27("Skill install reported: %s", result.message);
4990
5106
  return result;
4991
5107
  }
4992
5108
  /**
@@ -4998,7 +5114,7 @@ var MarketSkillService = class extends BaseSDK {
4998
5114
  * @returns Promise resolving to the submitted score
4999
5115
  */
5000
5116
  async submitRating(identifier, score, options) {
5001
- log25("Submitting rating for skill %s: %d", identifier, score);
5117
+ log27("Submitting rating for skill %s: %d", identifier, score);
5002
5118
  const result = await this.request(
5003
5119
  `/v1/skills/${encodeURIComponent(identifier)}/ratings`,
5004
5120
  {
@@ -5007,7 +5123,7 @@ var MarketSkillService = class extends BaseSDK {
5007
5123
  method: "POST"
5008
5124
  }
5009
5125
  );
5010
- log25("Rating submitted for skill %s: %d", identifier, result.score);
5126
+ log27("Rating submitted for skill %s: %d", identifier, result.score);
5011
5127
  return result;
5012
5128
  }
5013
5129
  /**
@@ -5018,12 +5134,12 @@ var MarketSkillService = class extends BaseSDK {
5018
5134
  * @returns Promise resolving to the rating distribution
5019
5135
  */
5020
5136
  async getRatingDistribution(identifier, options) {
5021
- log25("Getting rating distribution for skill: %s", identifier);
5137
+ log27("Getting rating distribution for skill: %s", identifier);
5022
5138
  const result = await this.request(
5023
5139
  `/v1/skills/${encodeURIComponent(identifier)}/ratings/distribution`,
5024
5140
  options
5025
5141
  );
5026
- log25("Rating distribution retrieved for skill %s: %d total", identifier, result.totalCount);
5142
+ log27("Rating distribution retrieved for skill %s: %d total", identifier, result.totalCount);
5027
5143
  return result;
5028
5144
  }
5029
5145
  /**
@@ -5036,12 +5152,12 @@ var MarketSkillService = class extends BaseSDK {
5036
5152
  */
5037
5153
  async getComments(identifier, params = {}, options) {
5038
5154
  const queryString = this.buildQueryString(params);
5039
- log25("Getting comments for skill %s: %O", identifier, params);
5155
+ log27("Getting comments for skill %s: %O", identifier, params);
5040
5156
  const result = await this.request(
5041
5157
  `/v1/skills/${encodeURIComponent(identifier)}/comments${queryString}`,
5042
5158
  options
5043
5159
  );
5044
- log25(
5160
+ log27(
5045
5161
  "Retrieved %d comments for skill %s (page %d/%d)",
5046
5162
  result.items.length,
5047
5163
  identifier,
@@ -5058,15 +5174,15 @@ var MarketSkillService = class extends BaseSDK {
5058
5174
  * @returns Promise resolving to the latest own comment or null when none exists
5059
5175
  */
5060
5176
  async getLatestOwnComment(identifier, options) {
5061
- log25("Getting latest own comment for skill %s", identifier);
5177
+ log27("Getting latest own comment for skill %s", identifier);
5062
5178
  const result = await this.request(
5063
5179
  `/v1/skills/${encodeURIComponent(identifier)}/comments/latest`,
5064
5180
  options
5065
5181
  );
5066
5182
  if (result) {
5067
- log25("Retrieved latest own comment for skill %s: id=%d", identifier, result.id);
5183
+ log27("Retrieved latest own comment for skill %s: id=%d", identifier, result.id);
5068
5184
  } else {
5069
- log25("No own comments found for skill %s", identifier);
5185
+ log27("No own comments found for skill %s", identifier);
5070
5186
  }
5071
5187
  return result;
5072
5188
  }
@@ -5079,7 +5195,7 @@ var MarketSkillService = class extends BaseSDK {
5079
5195
  * @returns Promise resolving to the created comment (with optional rating field)
5080
5196
  */
5081
5197
  async createComment(identifier, data, options) {
5082
- log25("Creating comment on skill %s", identifier);
5198
+ log27("Creating comment on skill %s", identifier);
5083
5199
  const result = await this.request(
5084
5200
  `/v1/skills/${encodeURIComponent(identifier)}/comments`,
5085
5201
  {
@@ -5088,7 +5204,7 @@ var MarketSkillService = class extends BaseSDK {
5088
5204
  method: "POST"
5089
5205
  }
5090
5206
  );
5091
- log25("Comment created on skill %s: id=%d", identifier, result.id);
5207
+ log27("Comment created on skill %s: id=%d", identifier, result.id);
5092
5208
  return result;
5093
5209
  }
5094
5210
  /**
@@ -5100,7 +5216,7 @@ var MarketSkillService = class extends BaseSDK {
5100
5216
  * @returns Promise resolving to success status
5101
5217
  */
5102
5218
  async deleteComment(identifier, commentId, options) {
5103
- log25("Deleting comment %d from skill %s", commentId, identifier);
5219
+ log27("Deleting comment %d from skill %s", commentId, identifier);
5104
5220
  const result = await this.request(
5105
5221
  `/v1/skills/${encodeURIComponent(identifier)}/comments/${commentId}`,
5106
5222
  {
@@ -5108,7 +5224,7 @@ var MarketSkillService = class extends BaseSDK {
5108
5224
  method: "DELETE"
5109
5225
  }
5110
5226
  );
5111
- log25("Comment %d deleted from skill %s", commentId, identifier);
5227
+ log27("Comment %d deleted from skill %s", commentId, identifier);
5112
5228
  return result;
5113
5229
  }
5114
5230
  /**
@@ -5120,7 +5236,7 @@ var MarketSkillService = class extends BaseSDK {
5120
5236
  * @returns Promise resolving to the created reaction
5121
5237
  */
5122
5238
  async addReaction(commentId, type, options) {
5123
- log25("Adding %s reaction to comment %d", type, commentId);
5239
+ log27("Adding %s reaction to comment %d", type, commentId);
5124
5240
  const result = await this.request(
5125
5241
  `/v1/skills/comments/${commentId}/reactions`,
5126
5242
  {
@@ -5129,7 +5245,7 @@ var MarketSkillService = class extends BaseSDK {
5129
5245
  method: "POST"
5130
5246
  }
5131
5247
  );
5132
- log25("Reaction added to comment %d: %s (id=%d)", commentId, result.type, result.id);
5248
+ log27("Reaction added to comment %d: %s (id=%d)", commentId, result.type, result.id);
5133
5249
  return result;
5134
5250
  }
5135
5251
  /**
@@ -5140,7 +5256,7 @@ var MarketSkillService = class extends BaseSDK {
5140
5256
  * @returns Promise resolving to success status
5141
5257
  */
5142
5258
  async removeReaction(commentId, options) {
5143
- log25("Removing reaction from comment %d", commentId);
5259
+ log27("Removing reaction from comment %d", commentId);
5144
5260
  const result = await this.request(
5145
5261
  `/v1/skills/comments/${commentId}/reactions`,
5146
5262
  {
@@ -5148,19 +5264,19 @@ var MarketSkillService = class extends BaseSDK {
5148
5264
  method: "DELETE"
5149
5265
  }
5150
5266
  );
5151
- log25("Reaction removed from comment %d", commentId);
5267
+ log27("Reaction removed from comment %d", commentId);
5152
5268
  return result;
5153
5269
  }
5154
5270
  };
5155
5271
 
5156
5272
  // src/market/services/OrganizationCredsService.ts
5157
- import debug26 from "debug";
5273
+ import debug28 from "debug";
5158
5274
 
5159
5275
  // src/utils/orgRef.ts
5160
5276
  var orgRefToPathSegment = (ref) => typeof ref === "number" ? String(ref) : `workspace:${encodeURIComponent(ref.workspaceId)}`;
5161
5277
 
5162
5278
  // src/market/services/OrganizationCredsService.ts
5163
- var log26 = debug26("lobe-market-sdk:org-creds");
5279
+ var log28 = debug28("lobe-market-sdk:org-creds");
5164
5280
  var OrganizationCredsService = class extends BaseSDK {
5165
5281
  constructor(orgId, options = {}, sharedHeaders, sharedTokenState) {
5166
5282
  super(options, sharedHeaders, sharedTokenState);
@@ -5192,9 +5308,9 @@ var OrganizationCredsService = class extends BaseSDK {
5192
5308
  */
5193
5309
  async list(options) {
5194
5310
  var _a;
5195
- log26("Listing org %s credentials", this.orgSegment);
5311
+ log28("Listing org %s credentials", this.orgSegment);
5196
5312
  const result = await this.request(this.base(), options);
5197
- log26("Found %d credentials for org %s", ((_a = result.data) == null ? void 0 : _a.length) || 0, this.orgSegment);
5313
+ log28("Found %d credentials for org %s", ((_a = result.data) == null ? void 0 : _a.length) || 0, this.orgSegment);
5198
5314
  return result;
5199
5315
  }
5200
5316
  /**
@@ -5203,20 +5319,20 @@ var OrganizationCredsService = class extends BaseSDK {
5203
5319
  * owner via `CredService.get(id, { decrypt: true })`.
5204
5320
  */
5205
5321
  async get(id, getOptions, options) {
5206
- log26("Getting org %s credential %d (decrypt=%s)", this.orgSegment, id, getOptions == null ? void 0 : getOptions.decrypt);
5322
+ log28("Getting org %s credential %d (decrypt=%s)", this.orgSegment, id, getOptions == null ? void 0 : getOptions.decrypt);
5207
5323
  const queryString = this.buildQueryString((getOptions == null ? void 0 : getOptions.decrypt) ? { decrypt: "true" } : {});
5208
5324
  const result = await this.request(
5209
5325
  `${this.base()}/${id}${queryString}`,
5210
5326
  options
5211
5327
  );
5212
- log26("Retrieved org credential: %s", result.key);
5328
+ log28("Retrieved org credential: %s", result.key);
5213
5329
  return result;
5214
5330
  }
5215
5331
  // ===========================================================================
5216
5332
  // Create
5217
5333
  // ===========================================================================
5218
5334
  async createKV(data, options) {
5219
- log26("Creating org %s KV credential: %s (type=%s)", this.orgSegment, data.key, data.type);
5335
+ log28("Creating org %s KV credential: %s (type=%s)", this.orgSegment, data.key, data.type);
5220
5336
  return this.request(`${this.base()}/kv`, {
5221
5337
  body: JSON.stringify(data),
5222
5338
  headers: { "Content-Type": "application/json" },
@@ -5225,7 +5341,7 @@ var OrganizationCredsService = class extends BaseSDK {
5225
5341
  });
5226
5342
  }
5227
5343
  async createOAuth(data, options) {
5228
- log26("Creating org %s OAuth credential: %s", this.orgSegment, data.key);
5344
+ log28("Creating org %s OAuth credential: %s", this.orgSegment, data.key);
5229
5345
  return this.request(`${this.base()}/oauth`, {
5230
5346
  body: JSON.stringify(data),
5231
5347
  headers: { "Content-Type": "application/json" },
@@ -5234,7 +5350,7 @@ var OrganizationCredsService = class extends BaseSDK {
5234
5350
  });
5235
5351
  }
5236
5352
  async createFile(data, options) {
5237
- log26("Creating org %s file credential: %s", this.orgSegment, data.key);
5353
+ log28("Creating org %s file credential: %s", this.orgSegment, data.key);
5238
5354
  return this.request(`${this.base()}/file`, {
5239
5355
  body: JSON.stringify(data),
5240
5356
  headers: { "Content-Type": "application/json" },
@@ -5246,7 +5362,7 @@ var OrganizationCredsService = class extends BaseSDK {
5246
5362
  // Update
5247
5363
  // ===========================================================================
5248
5364
  async update(id, data, options) {
5249
- log26("Updating org %s credential %d", this.orgSegment, id);
5365
+ log28("Updating org %s credential %d", this.orgSegment, id);
5250
5366
  return this.request(`${this.base()}/${id}`, {
5251
5367
  body: JSON.stringify(data),
5252
5368
  headers: { "Content-Type": "application/json" },
@@ -5258,14 +5374,14 @@ var OrganizationCredsService = class extends BaseSDK {
5258
5374
  // Delete
5259
5375
  // ===========================================================================
5260
5376
  async delete(id, options) {
5261
- log26("Deleting org %s credential %d", this.orgSegment, id);
5377
+ log28("Deleting org %s credential %d", this.orgSegment, id);
5262
5378
  return this.request(`${this.base()}/${id}`, {
5263
5379
  method: "DELETE",
5264
5380
  ...options
5265
5381
  });
5266
5382
  }
5267
5383
  async deleteByKey(key, options) {
5268
- log26("Deleting org %s credential by key: %s", this.orgSegment, key);
5384
+ log28("Deleting org %s credential by key: %s", this.orgSegment, key);
5269
5385
  return this.request(`${this.base()}/key/${encodeURIComponent(key)}`, {
5270
5386
  method: "DELETE",
5271
5387
  ...options
@@ -5279,7 +5395,7 @@ var OrganizationCredsService = class extends BaseSDK {
5279
5395
  * the org has bound vs. is missing. Reads only; any org member may call.
5280
5396
  */
5281
5397
  async getSkillCredStatus(skillIdentifier, options) {
5282
- log26("Getting org %s skill cred status: %s", this.orgSegment, skillIdentifier);
5398
+ log28("Getting org %s skill cred status: %s", this.orgSegment, skillIdentifier);
5283
5399
  const path = `/v1/organizations/${this.orgSegment}/skills/${encodeURIComponent(skillIdentifier)}/creds/status`;
5284
5400
  const result = await this.request(
5285
5401
  path,
@@ -5290,8 +5406,8 @@ var OrganizationCredsService = class extends BaseSDK {
5290
5406
  };
5291
5407
 
5292
5408
  // src/market/services/OrganizationService.ts
5293
- import debug27 from "debug";
5294
- var log27 = debug27("lobe-market-sdk:organization");
5409
+ import debug29 from "debug";
5410
+ var log29 = debug29("lobe-market-sdk:organization");
5295
5411
  var OrganizationService2 = class extends BaseSDK {
5296
5412
  constructor(options = {}, sharedHeaders, sharedTokenState) {
5297
5413
  super(options, sharedHeaders, sharedTokenState);
@@ -5339,12 +5455,12 @@ var OrganizationService2 = class extends BaseSDK {
5339
5455
  async getOrganizationInfo(idOrNamespace, params = {}, options) {
5340
5456
  const locale = params.locale || this.defaultLocale;
5341
5457
  const queryString = this.buildQueryString({ locale });
5342
- log27("Getting organization info: %O", { idOrNamespace, ...params });
5458
+ log29("Getting organization info: %O", { idOrNamespace, ...params });
5343
5459
  const result = await this.request(
5344
5460
  `/v1/organizations/info/${idOrNamespace}${queryString}`,
5345
5461
  options
5346
5462
  );
5347
- log27("Organization info retrieved for: %s", idOrNamespace);
5463
+ log29("Organization info retrieved for: %s", idOrNamespace);
5348
5464
  return result;
5349
5465
  }
5350
5466
  /**
@@ -5354,7 +5470,7 @@ var OrganizationService2 = class extends BaseSDK {
5354
5470
  * @returns Promise resolving to the user's organizations
5355
5471
  */
5356
5472
  async listMyOrganizations(options) {
5357
- log27("Listing organizations for current user");
5473
+ log29("Listing organizations for current user");
5358
5474
  const result = await this.request(
5359
5475
  "/v1/organizations/me",
5360
5476
  options
@@ -5372,7 +5488,7 @@ var OrganizationService2 = class extends BaseSDK {
5372
5488
  * @returns The created/existing organization and whether it was newly created
5373
5489
  */
5374
5490
  async createOrganization(data, options) {
5375
- log27("Creating organization: %s", data.clerkId);
5491
+ log29("Creating organization: %s", data.clerkId);
5376
5492
  return this.request("/v1/organizations", {
5377
5493
  ...options,
5378
5494
  body: JSON.stringify(data),
@@ -5387,7 +5503,7 @@ var OrganizationService2 = class extends BaseSDK {
5387
5503
  * @returns The updated organization
5388
5504
  */
5389
5505
  async updateOrganization(orgId, data, options) {
5390
- log27("Updating organization %d: %O", orgId, data);
5506
+ log29("Updating organization %d: %O", orgId, data);
5391
5507
  const result = await this.request(
5392
5508
  `/v1/organizations/${orgRefToPathSegment(orgId)}`,
5393
5509
  {
@@ -5406,7 +5522,7 @@ var OrganizationService2 = class extends BaseSDK {
5406
5522
  * @returns The archived organization
5407
5523
  */
5408
5524
  async archiveOrganization(orgId, options) {
5409
- log27("Archiving organization %d", orgId);
5525
+ log29("Archiving organization %d", orgId);
5410
5526
  const result = await this.request(
5411
5527
  `/v1/organizations/${orgRefToPathSegment(orgId)}/archive`,
5412
5528
  { ...options, method: "POST" }
@@ -5420,7 +5536,7 @@ var OrganizationService2 = class extends BaseSDK {
5420
5536
  * @returns The reactivated organization
5421
5537
  */
5422
5538
  async unarchiveOrganization(orgId, options) {
5423
- log27("Unarchiving organization %d", orgId);
5539
+ log29("Unarchiving organization %d", orgId);
5424
5540
  const result = await this.request(
5425
5541
  `/v1/organizations/${orgRefToPathSegment(orgId)}/unarchive`,
5426
5542
  { ...options, method: "POST" }
@@ -5434,7 +5550,7 @@ var OrganizationService2 = class extends BaseSDK {
5434
5550
  * @returns Hydrated member rows
5435
5551
  */
5436
5552
  async listMembers(orgId, options) {
5437
- log27("Listing members of organization %d", orgId);
5553
+ log29("Listing members of organization %d", orgId);
5438
5554
  const result = await this.request(
5439
5555
  `/v1/organizations/${orgRefToPathSegment(orgId)}/members`,
5440
5556
  options
@@ -5451,7 +5567,7 @@ var OrganizationService2 = class extends BaseSDK {
5451
5567
  * @returns Whether the member was newly added and their effective role
5452
5568
  */
5453
5569
  async addMember(orgId, userAccountId, role, options) {
5454
- log27("Adding member %d to organization %d (role=%s)", userAccountId, orgId, role);
5570
+ log29("Adding member %d to organization %d (role=%s)", userAccountId, orgId, role);
5455
5571
  return this.request(
5456
5572
  `/v1/organizations/${orgRefToPathSegment(orgId)}/members`,
5457
5573
  {
@@ -5470,7 +5586,7 @@ var OrganizationService2 = class extends BaseSDK {
5470
5586
  * @returns Whether a membership row was removed
5471
5587
  */
5472
5588
  async removeMember(orgId, userAccountId, options) {
5473
- log27("Removing member %d from organization %d", userAccountId, orgId);
5589
+ log29("Removing member %d from organization %d", userAccountId, orgId);
5474
5590
  return this.request(
5475
5591
  `/v1/organizations/${orgRefToPathSegment(orgId)}/members/${userAccountId}`,
5476
5592
  { ...options, method: "DELETE" }
@@ -5486,7 +5602,7 @@ var OrganizationService2 = class extends BaseSDK {
5486
5602
  * @returns The effective role and whether it changed
5487
5603
  */
5488
5604
  async updateMemberRole(orgId, userAccountId, role, options) {
5489
- log27("Updating member %d role to %s in organization %d", userAccountId, role, orgId);
5605
+ log29("Updating member %d role to %s in organization %d", userAccountId, role, orgId);
5490
5606
  return this.request(
5491
5607
  `/v1/organizations/${orgRefToPathSegment(orgId)}/members/${userAccountId}`,
5492
5608
  { ...options, body: JSON.stringify({ role }), method: "PATCH" }
@@ -5504,7 +5620,7 @@ var OrganizationService2 = class extends BaseSDK {
5504
5620
  * @returns Counts of added / removed / updated members and skipped ids
5505
5621
  */
5506
5622
  async reconcileMembers(orgId, members, options) {
5507
- log27("Reconciling %d members for organization %d", members.length, orgId);
5623
+ log29("Reconciling %d members for organization %d", members.length, orgId);
5508
5624
  return this.request(
5509
5625
  `/v1/organizations/${orgRefToPathSegment(orgId)}/members`,
5510
5626
  {
@@ -5517,8 +5633,8 @@ var OrganizationService2 = class extends BaseSDK {
5517
5633
  };
5518
5634
 
5519
5635
  // src/market/services/UserService.ts
5520
- import debug28 from "debug";
5521
- var log28 = debug28("lobe-market-sdk:user");
5636
+ import debug30 from "debug";
5637
+ var log30 = debug30("lobe-market-sdk:user");
5522
5638
  var UserService = class extends BaseSDK {
5523
5639
  /**
5524
5640
  * Retrieves user information by account ID or userName
@@ -5535,12 +5651,12 @@ var UserService = class extends BaseSDK {
5535
5651
  const locale = params.locale || this.defaultLocale;
5536
5652
  const queryParams = { locale };
5537
5653
  const queryString = this.buildQueryString(queryParams);
5538
- log28("Getting user info: %O", { idOrUserName, ...params });
5654
+ log30("Getting user info: %O", { idOrUserName, ...params });
5539
5655
  const result = await this.request(
5540
5656
  `/v1/user/info/${idOrUserName}${queryString}`,
5541
5657
  options
5542
5658
  );
5543
- log28("User info successfully retrieved for: %s", idOrUserName);
5659
+ log30("User info successfully retrieved for: %s", idOrUserName);
5544
5660
  return result;
5545
5661
  }
5546
5662
  /**
@@ -5555,7 +5671,7 @@ var UserService = class extends BaseSDK {
5555
5671
  * @throws Error if userName is already taken or update fails
5556
5672
  */
5557
5673
  async updateUserInfo(data, options) {
5558
- log28("Updating user info: %O", data);
5674
+ log30("Updating user info: %O", data);
5559
5675
  const result = await this.request("/v1/user/update", {
5560
5676
  body: JSON.stringify(data),
5561
5677
  headers: {
@@ -5564,7 +5680,7 @@ var UserService = class extends BaseSDK {
5564
5680
  method: "POST",
5565
5681
  ...options
5566
5682
  });
5567
- log28("User info updated successfully");
5683
+ log30("User info updated successfully");
5568
5684
  return result;
5569
5685
  }
5570
5686
  /**
@@ -5594,7 +5710,7 @@ var UserService = class extends BaseSDK {
5594
5710
  * ```
5595
5711
  */
5596
5712
  async register(data, options) {
5597
- log28("Registering user: %O", {
5713
+ log30("Registering user: %O", {
5598
5714
  followUserId: data.followUserId,
5599
5715
  registerUserId: data.registerUserId
5600
5716
  });
@@ -5606,14 +5722,14 @@ var UserService = class extends BaseSDK {
5606
5722
  method: "POST",
5607
5723
  ...options
5608
5724
  });
5609
- log28("User registered successfully: created=%s, userId=%s", result.created, result.user.clerkId);
5725
+ log30("User registered successfully: created=%s, userId=%s", result.created, result.user.clerkId);
5610
5726
  return result;
5611
5727
  }
5612
5728
  };
5613
5729
 
5614
5730
  // src/market/services/UserFollowService.ts
5615
- import debug29 from "debug";
5616
- var log29 = debug29("lobe-market-sdk:user-follow");
5731
+ import debug31 from "debug";
5732
+ var log31 = debug31("lobe-market-sdk:user-follow");
5617
5733
  var UserFollowService = class extends BaseSDK {
5618
5734
  /**
5619
5735
  * Follow a user
@@ -5627,7 +5743,7 @@ var UserFollowService = class extends BaseSDK {
5627
5743
  * @throws Error if already following or cannot follow yourself
5628
5744
  */
5629
5745
  async follow(followingId, options) {
5630
- log29("Following user: %d", followingId);
5746
+ log31("Following user: %d", followingId);
5631
5747
  const body = { followingId };
5632
5748
  const result = await this.request("/v1/user/follows", {
5633
5749
  body: JSON.stringify(body),
@@ -5637,7 +5753,7 @@ var UserFollowService = class extends BaseSDK {
5637
5753
  method: "POST",
5638
5754
  ...options
5639
5755
  });
5640
- log29("Successfully followed user: %d", followingId);
5756
+ log31("Successfully followed user: %d", followingId);
5641
5757
  return result;
5642
5758
  }
5643
5759
  /**
@@ -5652,7 +5768,7 @@ var UserFollowService = class extends BaseSDK {
5652
5768
  * @throws Error if follow relationship not found
5653
5769
  */
5654
5770
  async unfollow(followingId, options) {
5655
- log29("Unfollowing user: %d", followingId);
5771
+ log31("Unfollowing user: %d", followingId);
5656
5772
  const body = { followingId };
5657
5773
  const result = await this.request("/v1/user/follows", {
5658
5774
  body: JSON.stringify(body),
@@ -5662,7 +5778,7 @@ var UserFollowService = class extends BaseSDK {
5662
5778
  method: "DELETE",
5663
5779
  ...options
5664
5780
  });
5665
- log29("Successfully unfollowed user: %d", followingId);
5781
+ log31("Successfully unfollowed user: %d", followingId);
5666
5782
  return result;
5667
5783
  }
5668
5784
  /**
@@ -5676,13 +5792,13 @@ var UserFollowService = class extends BaseSDK {
5676
5792
  * @returns Promise resolving to follow status (isFollowing, isMutual)
5677
5793
  */
5678
5794
  async checkFollowStatus(targetUserId, options) {
5679
- log29("Checking follow status for user: %d", targetUserId);
5795
+ log31("Checking follow status for user: %d", targetUserId);
5680
5796
  const queryString = this.buildQueryString({ targetUserId: String(targetUserId) });
5681
5797
  const result = await this.request(
5682
5798
  `/v1/user/follows/check${queryString}`,
5683
5799
  options
5684
5800
  );
5685
- log29("Follow status retrieved: %O", result);
5801
+ log31("Follow status retrieved: %O", result);
5686
5802
  return result;
5687
5803
  }
5688
5804
  /**
@@ -5697,7 +5813,7 @@ var UserFollowService = class extends BaseSDK {
5697
5813
  * @returns Promise resolving to list of following users
5698
5814
  */
5699
5815
  async getFollowing(userId, params = {}, options) {
5700
- log29("Getting following list for user: %d", userId);
5816
+ log31("Getting following list for user: %d", userId);
5701
5817
  const queryParams = {};
5702
5818
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
5703
5819
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -5706,7 +5822,7 @@ var UserFollowService = class extends BaseSDK {
5706
5822
  `/v1/user/follows/${userId}/following${queryString}`,
5707
5823
  options
5708
5824
  );
5709
- log29("Following list retrieved for user: %d", userId);
5825
+ log31("Following list retrieved for user: %d", userId);
5710
5826
  return result;
5711
5827
  }
5712
5828
  /**
@@ -5721,7 +5837,7 @@ var UserFollowService = class extends BaseSDK {
5721
5837
  * @returns Promise resolving to list of followers
5722
5838
  */
5723
5839
  async getFollowers(userId, params = {}, options) {
5724
- log29("Getting followers list for user: %d", userId);
5840
+ log31("Getting followers list for user: %d", userId);
5725
5841
  const queryParams = {};
5726
5842
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
5727
5843
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -5730,14 +5846,14 @@ var UserFollowService = class extends BaseSDK {
5730
5846
  `/v1/user/follows/${userId}/followers${queryString}`,
5731
5847
  options
5732
5848
  );
5733
- log29("Followers list retrieved for user: %d", userId);
5849
+ log31("Followers list retrieved for user: %d", userId);
5734
5850
  return result;
5735
5851
  }
5736
5852
  };
5737
5853
 
5738
5854
  // src/market/services/UserFavoriteService.ts
5739
- import debug30 from "debug";
5740
- var log30 = debug30("lobe-market-sdk:user-favorite");
5855
+ import debug32 from "debug";
5856
+ var log32 = debug32("lobe-market-sdk:user-favorite");
5741
5857
  var UserFavoriteService = class extends BaseSDK {
5742
5858
  /**
5743
5859
  * Add to favorites
@@ -5752,7 +5868,7 @@ var UserFavoriteService = class extends BaseSDK {
5752
5868
  * @throws Error if already in favorites
5753
5869
  */
5754
5870
  async addFavorite(targetType, targetId, options) {
5755
- log30("Adding favorite: %s %d", targetType, targetId);
5871
+ log32("Adding favorite: %s %d", targetType, targetId);
5756
5872
  const body = { targetId, targetType };
5757
5873
  const result = await this.request("/v1/user/favorites", {
5758
5874
  body: JSON.stringify(body),
@@ -5762,7 +5878,7 @@ var UserFavoriteService = class extends BaseSDK {
5762
5878
  method: "POST",
5763
5879
  ...options
5764
5880
  });
5765
- log30("Successfully added favorite: %s %d", targetType, targetId);
5881
+ log32("Successfully added favorite: %s %d", targetType, targetId);
5766
5882
  return result;
5767
5883
  }
5768
5884
  /**
@@ -5778,7 +5894,7 @@ var UserFavoriteService = class extends BaseSDK {
5778
5894
  * @throws Error if favorite not found
5779
5895
  */
5780
5896
  async removeFavorite(targetType, targetId, options) {
5781
- log30("Removing favorite: %s %d", targetType, targetId);
5897
+ log32("Removing favorite: %s %d", targetType, targetId);
5782
5898
  const body = { targetId, targetType };
5783
5899
  const result = await this.request("/v1/user/favorites", {
5784
5900
  body: JSON.stringify(body),
@@ -5788,7 +5904,7 @@ var UserFavoriteService = class extends BaseSDK {
5788
5904
  method: "DELETE",
5789
5905
  ...options
5790
5906
  });
5791
- log30("Successfully removed favorite: %s %d", targetType, targetId);
5907
+ log32("Successfully removed favorite: %s %d", targetType, targetId);
5792
5908
  return result;
5793
5909
  }
5794
5910
  /**
@@ -5803,7 +5919,7 @@ var UserFavoriteService = class extends BaseSDK {
5803
5919
  * @returns Promise resolving to favorite status
5804
5920
  */
5805
5921
  async checkFavorite(targetType, targetId, options) {
5806
- log30("Checking favorite status: %s %d", targetType, targetId);
5922
+ log32("Checking favorite status: %s %d", targetType, targetId);
5807
5923
  const queryString = this.buildQueryString({
5808
5924
  targetId: String(targetId),
5809
5925
  targetType
@@ -5812,7 +5928,7 @@ var UserFavoriteService = class extends BaseSDK {
5812
5928
  `/v1/user/favorites/check${queryString}`,
5813
5929
  options
5814
5930
  );
5815
- log30("Favorite status retrieved: %O", result);
5931
+ log32("Favorite status retrieved: %O", result);
5816
5932
  return result;
5817
5933
  }
5818
5934
  /**
@@ -5826,7 +5942,7 @@ var UserFavoriteService = class extends BaseSDK {
5826
5942
  * @returns Promise resolving to list of favorites
5827
5943
  */
5828
5944
  async getMyFavorites(params = {}, options) {
5829
- log30("Getting my favorites: %O", params);
5945
+ log32("Getting my favorites: %O", params);
5830
5946
  const queryParams = {};
5831
5947
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
5832
5948
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -5836,7 +5952,7 @@ var UserFavoriteService = class extends BaseSDK {
5836
5952
  `/v1/user/favorites/me${queryString}`,
5837
5953
  options
5838
5954
  );
5839
- log30("My favorites retrieved");
5955
+ log32("My favorites retrieved");
5840
5956
  return result;
5841
5957
  }
5842
5958
  /**
@@ -5851,7 +5967,7 @@ var UserFavoriteService = class extends BaseSDK {
5851
5967
  * @returns Promise resolving to list of favorites
5852
5968
  */
5853
5969
  async getUserFavorites(userId, params = {}, options) {
5854
- log30("Getting favorites for user: %d", userId);
5970
+ log32("Getting favorites for user: %d", userId);
5855
5971
  const queryParams = {};
5856
5972
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
5857
5973
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -5861,7 +5977,7 @@ var UserFavoriteService = class extends BaseSDK {
5861
5977
  `/v1/user/favorites/${userId}${queryString}`,
5862
5978
  options
5863
5979
  );
5864
- log30("Favorites retrieved for user: %d", userId);
5980
+ log32("Favorites retrieved for user: %d", userId);
5865
5981
  return result;
5866
5982
  }
5867
5983
  /**
@@ -5876,7 +5992,7 @@ var UserFavoriteService = class extends BaseSDK {
5876
5992
  * @returns Promise resolving to list of favorite agents
5877
5993
  */
5878
5994
  async getUserFavoriteAgents(userId, params = {}, options) {
5879
- log30("Getting favorite agents for user: %d", userId);
5995
+ log32("Getting favorite agents for user: %d", userId);
5880
5996
  const queryParams = {};
5881
5997
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
5882
5998
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -5885,7 +6001,7 @@ var UserFavoriteService = class extends BaseSDK {
5885
6001
  `/v1/user/favorites/${userId}/agents${queryString}`,
5886
6002
  options
5887
6003
  );
5888
- log30("Favorite agents retrieved for user: %d", userId);
6004
+ log32("Favorite agents retrieved for user: %d", userId);
5889
6005
  return result;
5890
6006
  }
5891
6007
  /**
@@ -5900,7 +6016,7 @@ var UserFavoriteService = class extends BaseSDK {
5900
6016
  * @returns Promise resolving to list of favorite plugins
5901
6017
  */
5902
6018
  async getUserFavoritePlugins(userId, params = {}, options) {
5903
- log30("Getting favorite plugins for user: %d", userId);
6019
+ log32("Getting favorite plugins for user: %d", userId);
5904
6020
  const queryParams = {};
5905
6021
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
5906
6022
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -5909,14 +6025,14 @@ var UserFavoriteService = class extends BaseSDK {
5909
6025
  `/v1/user/favorites/${userId}/plugins${queryString}`,
5910
6026
  options
5911
6027
  );
5912
- log30("Favorite plugins retrieved for user: %d", userId);
6028
+ log32("Favorite plugins retrieved for user: %d", userId);
5913
6029
  return result;
5914
6030
  }
5915
6031
  };
5916
6032
 
5917
6033
  // src/market/services/UserLikeService.ts
5918
- import debug31 from "debug";
5919
- var log31 = debug31("lobe-market-sdk:user-like");
6034
+ import debug33 from "debug";
6035
+ var log33 = debug33("lobe-market-sdk:user-like");
5920
6036
  var UserLikeService = class extends BaseSDK {
5921
6037
  /**
5922
6038
  * Like content
@@ -5931,7 +6047,7 @@ var UserLikeService = class extends BaseSDK {
5931
6047
  * @throws Error if already liked
5932
6048
  */
5933
6049
  async like(targetType, targetId, options) {
5934
- log31("Liking: %s %d", targetType, targetId);
6050
+ log33("Liking: %s %d", targetType, targetId);
5935
6051
  const body = { targetId, targetType };
5936
6052
  const result = await this.request("/v1/user/likes", {
5937
6053
  body: JSON.stringify(body),
@@ -5941,7 +6057,7 @@ var UserLikeService = class extends BaseSDK {
5941
6057
  method: "POST",
5942
6058
  ...options
5943
6059
  });
5944
- log31("Successfully liked: %s %d", targetType, targetId);
6060
+ log33("Successfully liked: %s %d", targetType, targetId);
5945
6061
  return result;
5946
6062
  }
5947
6063
  /**
@@ -5957,7 +6073,7 @@ var UserLikeService = class extends BaseSDK {
5957
6073
  * @throws Error if like not found
5958
6074
  */
5959
6075
  async unlike(targetType, targetId, options) {
5960
- log31("Unliking: %s %d", targetType, targetId);
6076
+ log33("Unliking: %s %d", targetType, targetId);
5961
6077
  const body = { targetId, targetType };
5962
6078
  const result = await this.request("/v1/user/likes", {
5963
6079
  body: JSON.stringify(body),
@@ -5967,7 +6083,7 @@ var UserLikeService = class extends BaseSDK {
5967
6083
  method: "DELETE",
5968
6084
  ...options
5969
6085
  });
5970
- log31("Successfully unliked: %s %d", targetType, targetId);
6086
+ log33("Successfully unliked: %s %d", targetType, targetId);
5971
6087
  return result;
5972
6088
  }
5973
6089
  /**
@@ -5982,7 +6098,7 @@ var UserLikeService = class extends BaseSDK {
5982
6098
  * @returns Promise resolving to toggle response with new like status
5983
6099
  */
5984
6100
  async toggleLike(targetType, targetId, options) {
5985
- log31("Toggling like: %s %d", targetType, targetId);
6101
+ log33("Toggling like: %s %d", targetType, targetId);
5986
6102
  const body = { targetId, targetType };
5987
6103
  const result = await this.request("/v1/user/likes/toggle", {
5988
6104
  body: JSON.stringify(body),
@@ -5992,7 +6108,7 @@ var UserLikeService = class extends BaseSDK {
5992
6108
  method: "POST",
5993
6109
  ...options
5994
6110
  });
5995
- log31("Like toggled, new status: %O", result);
6111
+ log33("Like toggled, new status: %O", result);
5996
6112
  return result;
5997
6113
  }
5998
6114
  /**
@@ -6007,7 +6123,7 @@ var UserLikeService = class extends BaseSDK {
6007
6123
  * @returns Promise resolving to like status
6008
6124
  */
6009
6125
  async checkLike(targetType, targetId, options) {
6010
- log31("Checking like status: %s %d", targetType, targetId);
6126
+ log33("Checking like status: %s %d", targetType, targetId);
6011
6127
  const queryString = this.buildQueryString({
6012
6128
  targetId: String(targetId),
6013
6129
  targetType
@@ -6016,7 +6132,7 @@ var UserLikeService = class extends BaseSDK {
6016
6132
  `/v1/user/likes/check${queryString}`,
6017
6133
  options
6018
6134
  );
6019
- log31("Like status retrieved: %O", result);
6135
+ log33("Like status retrieved: %O", result);
6020
6136
  return result;
6021
6137
  }
6022
6138
  /**
@@ -6030,7 +6146,7 @@ var UserLikeService = class extends BaseSDK {
6030
6146
  * @returns Promise resolving to list of likes
6031
6147
  */
6032
6148
  async getMyLikes(params = {}, options) {
6033
- log31("Getting my likes: %O", params);
6149
+ log33("Getting my likes: %O", params);
6034
6150
  const queryParams = {};
6035
6151
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
6036
6152
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -6040,7 +6156,7 @@ var UserLikeService = class extends BaseSDK {
6040
6156
  `/v1/user/likes/me${queryString}`,
6041
6157
  options
6042
6158
  );
6043
- log31("My likes retrieved");
6159
+ log33("My likes retrieved");
6044
6160
  return result;
6045
6161
  }
6046
6162
  /**
@@ -6055,7 +6171,7 @@ var UserLikeService = class extends BaseSDK {
6055
6171
  * @returns Promise resolving to list of likes
6056
6172
  */
6057
6173
  async getUserLikes(userId, params = {}, options) {
6058
- log31("Getting likes for user: %d", userId);
6174
+ log33("Getting likes for user: %d", userId);
6059
6175
  const queryParams = {};
6060
6176
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
6061
6177
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -6065,7 +6181,7 @@ var UserLikeService = class extends BaseSDK {
6065
6181
  `/v1/user/likes/${userId}${queryString}`,
6066
6182
  options
6067
6183
  );
6068
- log31("Likes retrieved for user: %d", userId);
6184
+ log33("Likes retrieved for user: %d", userId);
6069
6185
  return result;
6070
6186
  }
6071
6187
  /**
@@ -6080,7 +6196,7 @@ var UserLikeService = class extends BaseSDK {
6080
6196
  * @returns Promise resolving to list of liked agents
6081
6197
  */
6082
6198
  async getUserLikedAgents(userId, params = {}, options) {
6083
- log31("Getting liked agents for user: %d", userId);
6199
+ log33("Getting liked agents for user: %d", userId);
6084
6200
  const queryParams = {};
6085
6201
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
6086
6202
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -6089,7 +6205,7 @@ var UserLikeService = class extends BaseSDK {
6089
6205
  `/v1/user/likes/${userId}/agents${queryString}`,
6090
6206
  options
6091
6207
  );
6092
- log31("Liked agents retrieved for user: %d", userId);
6208
+ log33("Liked agents retrieved for user: %d", userId);
6093
6209
  return result;
6094
6210
  }
6095
6211
  /**
@@ -6104,7 +6220,7 @@ var UserLikeService = class extends BaseSDK {
6104
6220
  * @returns Promise resolving to list of liked plugins
6105
6221
  */
6106
6222
  async getUserLikedPlugins(userId, params = {}, options) {
6107
- log31("Getting liked plugins for user: %d", userId);
6223
+ log33("Getting liked plugins for user: %d", userId);
6108
6224
  const queryParams = {};
6109
6225
  if (params.limit !== void 0) queryParams.limit = String(params.limit);
6110
6226
  if (params.offset !== void 0) queryParams.offset = String(params.offset);
@@ -6113,14 +6229,14 @@ var UserLikeService = class extends BaseSDK {
6113
6229
  `/v1/user/likes/${userId}/plugins${queryString}`,
6114
6230
  options
6115
6231
  );
6116
- log31("Liked plugins retrieved for user: %d", userId);
6232
+ log33("Liked plugins retrieved for user: %d", userId);
6117
6233
  return result;
6118
6234
  }
6119
6235
  };
6120
6236
 
6121
6237
  // src/market/services/UserPublishService.ts
6122
- import debug32 from "debug";
6123
- var log32 = debug32("lobe-market-sdk:user-publish");
6238
+ import debug34 from "debug";
6239
+ var log34 = debug34("lobe-market-sdk:user-publish");
6124
6240
  var UserPublishService = class extends BaseSDK {
6125
6241
  /**
6126
6242
  * Lists all plugins owned by the authenticated user
@@ -6130,9 +6246,9 @@ var UserPublishService = class extends BaseSDK {
6130
6246
  */
6131
6247
  async listPlugins(options) {
6132
6248
  var _a;
6133
- log32("Listing user plugins");
6249
+ log34("Listing user plugins");
6134
6250
  const result = await this.request("/v1/user/plugins", options);
6135
- log32("Found %d user plugins", ((_a = result.data) == null ? void 0 : _a.length) || 0);
6251
+ log34("Found %d user plugins", ((_a = result.data) == null ? void 0 : _a.length) || 0);
6136
6252
  return result;
6137
6253
  }
6138
6254
  /**
@@ -6143,9 +6259,9 @@ var UserPublishService = class extends BaseSDK {
6143
6259
  */
6144
6260
  async listSkills(options) {
6145
6261
  var _a;
6146
- log32("Listing user skills");
6262
+ log34("Listing user skills");
6147
6263
  const result = await this.request("/v1/user/skills", options);
6148
- log32("Found %d user skills", ((_a = result.data) == null ? void 0 : _a.length) || 0);
6264
+ log34("Found %d user skills", ((_a = result.data) == null ? void 0 : _a.length) || 0);
6149
6265
  return result;
6150
6266
  }
6151
6267
  /**
@@ -6157,7 +6273,7 @@ var UserPublishService = class extends BaseSDK {
6157
6273
  * @returns Promise resolving to the publish result
6158
6274
  */
6159
6275
  async publishSkillVersion(identifier, zipBuffer, options) {
6160
- log32("Publishing skill version for: %s", identifier);
6276
+ log34("Publishing skill version for: %s", identifier);
6161
6277
  const formData = new FormData();
6162
6278
  const arrayBuffer = zipBuffer instanceof ArrayBuffer ? zipBuffer : zipBuffer.buffer.slice(
6163
6279
  zipBuffer.byteOffset,
@@ -6173,7 +6289,7 @@ var UserPublishService = class extends BaseSDK {
6173
6289
  ...options
6174
6290
  }
6175
6291
  );
6176
- log32("Published skill version: %s@%s", identifier, result.version);
6292
+ log34("Published skill version: %s@%s", identifier, result.version);
6177
6293
  return result;
6178
6294
  }
6179
6295
  /**
@@ -6184,11 +6300,11 @@ var UserPublishService = class extends BaseSDK {
6184
6300
  */
6185
6301
  async scanClaimableAssets(assetType) {
6186
6302
  var _a;
6187
- log32("Scanning claimable %s", assetType);
6303
+ log34("Scanning claimable %s", assetType);
6188
6304
  const result = await this.request(
6189
6305
  `/v1/user/claims/scan/${assetType}`
6190
6306
  );
6191
- log32("Found %d claimable %s", ((_a = result.data) == null ? void 0 : _a.length) || 0, assetType);
6307
+ log34("Found %d claimable %s", ((_a = result.data) == null ? void 0 : _a.length) || 0, assetType);
6192
6308
  return result;
6193
6309
  }
6194
6310
  /**
@@ -6199,13 +6315,13 @@ var UserPublishService = class extends BaseSDK {
6199
6315
  * @returns Promise resolving to the claim result
6200
6316
  */
6201
6317
  async claimAsset(assetId, assetType) {
6202
- log32("Claiming %s with id: %d", assetType, assetId);
6318
+ log34("Claiming %s with id: %d", assetType, assetId);
6203
6319
  const result = await this.request("/v1/user/claims", {
6204
6320
  body: JSON.stringify({ assetId, assetType }),
6205
6321
  headers: { "Content-Type": "application/json" },
6206
6322
  method: "POST"
6207
6323
  });
6208
- log32("Claim result for %s %d: %s", assetType, assetId, result.success);
6324
+ log34("Claim result for %s %d: %s", assetType, assetId, result.success);
6209
6325
  return result;
6210
6326
  }
6211
6327
  /**
@@ -6219,13 +6335,13 @@ var UserPublishService = class extends BaseSDK {
6219
6335
  * @returns Promise resolving to the claim result
6220
6336
  */
6221
6337
  async claimAssetByIdentifier(identifier, assetType) {
6222
- log32("Claiming %s with identifier: %s", assetType, identifier);
6338
+ log34("Claiming %s with identifier: %s", assetType, identifier);
6223
6339
  const result = await this.request("/v1/user/claims", {
6224
6340
  body: JSON.stringify({ assetType, identifier }),
6225
6341
  headers: { "Content-Type": "application/json" },
6226
6342
  method: "POST"
6227
6343
  });
6228
- log32("Claim result for %s %s: %s", assetType, identifier, result.success);
6344
+ log34("Claim result for %s %s: %s", assetType, identifier, result.success);
6229
6345
  return result;
6230
6346
  }
6231
6347
  /**
@@ -6240,14 +6356,14 @@ var UserPublishService = class extends BaseSDK {
6240
6356
  * @returns Promise resolving to the submission result
6241
6357
  */
6242
6358
  async submitRepo(params, options) {
6243
- log32("Submitting repository for import: %s (%s)", params.gitUrl, params.type);
6359
+ log34("Submitting repository for import: %s (%s)", params.gitUrl, params.type);
6244
6360
  const result = await this.request("/v1/user/claims/submit-repo", {
6245
6361
  body: JSON.stringify(params),
6246
6362
  headers: { "Content-Type": "application/json" },
6247
6363
  method: "POST",
6248
6364
  ...options
6249
6365
  });
6250
- log32("Submit result for %s: %s", params.gitUrl, result.success);
6366
+ log34("Submit result for %s: %s", params.gitUrl, result.success);
6251
6367
  return result;
6252
6368
  }
6253
6369
  /**
@@ -6258,14 +6374,14 @@ var UserPublishService = class extends BaseSDK {
6258
6374
  * @returns Promise resolving immediately with the plugin identifier and version
6259
6375
  */
6260
6376
  async publishPlugin(params, options) {
6261
- log32("Publishing plugin: %s@%s", params.identifier, params.version);
6377
+ log34("Publishing plugin: %s@%s", params.identifier, params.version);
6262
6378
  const result = await this.request("/v1/user/plugins", {
6263
6379
  body: JSON.stringify(params),
6264
6380
  headers: { "Content-Type": "application/json" },
6265
6381
  method: "POST",
6266
6382
  ...options
6267
6383
  });
6268
- log32("Published plugin: %s@%s (%s)", result.identifier, result.version, result.status);
6384
+ log34("Published plugin: %s@%s (%s)", result.identifier, result.version, result.status);
6269
6385
  return result;
6270
6386
  }
6271
6387
  /**
@@ -6276,12 +6392,12 @@ var UserPublishService = class extends BaseSDK {
6276
6392
  * @returns Promise resolving to the delete result
6277
6393
  */
6278
6394
  async deleteSkill(identifier, options) {
6279
- log32("Deleting skill: %s", identifier);
6395
+ log34("Deleting skill: %s", identifier);
6280
6396
  const result = await this.request(
6281
6397
  `/v1/user/skills/${encodeURIComponent(identifier)}`,
6282
6398
  { method: "DELETE", ...options }
6283
6399
  );
6284
- log32("Deleted skill: %s", identifier);
6400
+ log34("Deleted skill: %s", identifier);
6285
6401
  return result;
6286
6402
  }
6287
6403
  /**
@@ -6293,7 +6409,7 @@ var UserPublishService = class extends BaseSDK {
6293
6409
  * @returns Promise resolving to the updated status
6294
6410
  */
6295
6411
  async updateSkillStatus(identifier, status, options) {
6296
- log32("Updating skill status: %s \u2192 %s", identifier, status);
6412
+ log34("Updating skill status: %s \u2192 %s", identifier, status);
6297
6413
  const result = await this.request(
6298
6414
  `/v1/user/skills/${encodeURIComponent(identifier)}/status`,
6299
6415
  {
@@ -6303,7 +6419,7 @@ var UserPublishService = class extends BaseSDK {
6303
6419
  ...options
6304
6420
  }
6305
6421
  );
6306
- log32("Updated skill status: %s \u2192 %s", identifier, result.status);
6422
+ log34("Updated skill status: %s \u2192 %s", identifier, result.status);
6307
6423
  return result;
6308
6424
  }
6309
6425
  /**
@@ -6314,12 +6430,12 @@ var UserPublishService = class extends BaseSDK {
6314
6430
  * @returns Promise resolving to the delete result
6315
6431
  */
6316
6432
  async deletePlugin(identifier, options) {
6317
- log32("Deleting plugin: %s", identifier);
6433
+ log34("Deleting plugin: %s", identifier);
6318
6434
  const result = await this.request(
6319
6435
  `/v1/user/plugins/${encodeURIComponent(identifier)}`,
6320
6436
  { method: "DELETE", ...options }
6321
6437
  );
6322
- log32("Deleted plugin: %s", identifier);
6438
+ log34("Deleted plugin: %s", identifier);
6323
6439
  return result;
6324
6440
  }
6325
6441
  /**
@@ -6331,7 +6447,7 @@ var UserPublishService = class extends BaseSDK {
6331
6447
  * @returns Promise resolving to the updated status
6332
6448
  */
6333
6449
  async updatePluginStatus(identifier, status, options) {
6334
- log32("Updating plugin status: %s \u2192 %s", identifier, status);
6450
+ log34("Updating plugin status: %s \u2192 %s", identifier, status);
6335
6451
  const result = await this.request(
6336
6452
  `/v1/user/plugins/${encodeURIComponent(identifier)}/status`,
6337
6453
  {
@@ -6341,7 +6457,7 @@ var UserPublishService = class extends BaseSDK {
6341
6457
  ...options
6342
6458
  }
6343
6459
  );
6344
- log32("Updated plugin status: %s \u2192 %s", identifier, result.status);
6460
+ log34("Updated plugin status: %s \u2192 %s", identifier, result.status);
6345
6461
  return result;
6346
6462
  }
6347
6463
  /**
@@ -6353,7 +6469,7 @@ var UserPublishService = class extends BaseSDK {
6353
6469
  * @returns Promise resolving to the publish result
6354
6470
  */
6355
6471
  async publishPluginVersion(identifier, data, options) {
6356
- log32("Publishing plugin version for: %s", identifier);
6472
+ log34("Publishing plugin version for: %s", identifier);
6357
6473
  const result = await this.request(
6358
6474
  `/v1/user/plugins/${encodeURIComponent(identifier)}/versions`,
6359
6475
  {
@@ -6363,7 +6479,7 @@ var UserPublishService = class extends BaseSDK {
6363
6479
  ...options
6364
6480
  }
6365
6481
  );
6366
- log32("Published plugin version: %s@%s", identifier, result.version);
6482
+ log34("Published plugin version: %s@%s", identifier, result.version);
6367
6483
  return result;
6368
6484
  }
6369
6485
  /**
@@ -6376,13 +6492,13 @@ var UserPublishService = class extends BaseSDK {
6376
6492
  */
6377
6493
  async getPluginLocalizations(identifier, version, options) {
6378
6494
  var _a;
6379
- log32("Listing localizations for plugin: %s", identifier);
6495
+ log34("Listing localizations for plugin: %s", identifier);
6380
6496
  const query = version ? `?version=${encodeURIComponent(version)}` : "";
6381
6497
  const result = await this.request(
6382
6498
  `/v1/user/plugins/${encodeURIComponent(identifier)}/localizations${query}`,
6383
6499
  options
6384
6500
  );
6385
- log32("Found %d localizations for %s", ((_a = result.localizations) == null ? void 0 : _a.length) || 0, identifier);
6501
+ log34("Found %d localizations for %s", ((_a = result.localizations) == null ? void 0 : _a.length) || 0, identifier);
6386
6502
  return result;
6387
6503
  }
6388
6504
  /**
@@ -6399,7 +6515,7 @@ var UserPublishService = class extends BaseSDK {
6399
6515
  * @returns Promise resolving to the upsert result
6400
6516
  */
6401
6517
  async updatePluginLocalizations(identifier, localizations, version, options) {
6402
- log32("Upserting %d localization(s) for plugin: %s", localizations.length, identifier);
6518
+ log34("Upserting %d localization(s) for plugin: %s", localizations.length, identifier);
6403
6519
  const result = await this.request(
6404
6520
  `/v1/user/plugins/${encodeURIComponent(identifier)}/localizations`,
6405
6521
  {
@@ -6409,7 +6525,7 @@ var UserPublishService = class extends BaseSDK {
6409
6525
  ...options
6410
6526
  }
6411
6527
  );
6412
- log32("Upserted localizations for %s@%s", identifier, result.version);
6528
+ log34("Upserted localizations for %s@%s", identifier, result.version);
6413
6529
  return result;
6414
6530
  }
6415
6531
  /**
@@ -6423,19 +6539,19 @@ var UserPublishService = class extends BaseSDK {
6423
6539
  * @returns Promise resolving to the delete result
6424
6540
  */
6425
6541
  async deletePluginLocalization(identifier, locale, version, options) {
6426
- log32("Deleting localization %s for plugin: %s", locale, identifier);
6542
+ log34("Deleting localization %s for plugin: %s", locale, identifier);
6427
6543
  const query = version ? `?version=${encodeURIComponent(version)}` : "";
6428
6544
  const result = await this.request(
6429
6545
  `/v1/user/plugins/${encodeURIComponent(identifier)}/localizations/${encodeURIComponent(locale)}${query}`,
6430
6546
  { method: "DELETE", ...options }
6431
6547
  );
6432
- log32("Deleted localization %s for %s", locale, identifier);
6548
+ log34("Deleted localization %s for %s", locale, identifier);
6433
6549
  return result;
6434
6550
  }
6435
6551
  };
6436
6552
 
6437
6553
  // src/market/market-sdk.ts
6438
- var log33 = debug33("lobe-market-sdk");
6554
+ var log35 = debug35("lobe-market-sdk");
6439
6555
  var MarketSDK = class extends BaseSDK {
6440
6556
  /**
6441
6557
  * Creates a new MarketSDK instance
@@ -6448,13 +6564,14 @@ var MarketSDK = class extends BaseSDK {
6448
6564
  tokenExpiry: void 0
6449
6565
  };
6450
6566
  super(options, void 0, sharedTokenState);
6451
- log33("MarketSDK instance created");
6567
+ log35("MarketSDK instance created");
6452
6568
  this.agentProfile = new AgentProfileService(options, this.headers, sharedTokenState);
6453
6569
  this.agents = new AgentService2(options, this.headers, sharedTokenState);
6454
6570
  this.agentGroups = new AgentGroupService(options, this.headers, sharedTokenState);
6455
6571
  this.auth = new AuthService(options, this.headers, sharedTokenState);
6456
6572
  this.connect = new ConnectService(options, this.headers, sharedTokenState);
6457
6573
  this.creds = new CredService(options, this.headers, sharedTokenState);
6574
+ this.deployments = new DeploymentService(options, this.headers, sharedTokenState);
6458
6575
  this.plugins = new PluginsService(options, this.headers, sharedTokenState);
6459
6576
  this.organizations = new OrganizationService2(options, this.headers, sharedTokenState);
6460
6577
  this.user = new UserService(options, this.headers, sharedTokenState);
@@ -6463,7 +6580,7 @@ var MarketSDK = class extends BaseSDK {
6463
6580
  this.favorites = new UserFavoriteService(options, this.headers, sharedTokenState);
6464
6581
  this.likes = new UserLikeService(options, this.headers, sharedTokenState);
6465
6582
  this.feedback = new FeedbackService(options, this.headers, sharedTokenState);
6466
- this.skills = new SkillService(options, this.headers, sharedTokenState);
6583
+ this.skills = new SkillService2(options, this.headers, sharedTokenState);
6467
6584
  this.skillCollections = new MarketSkillCollectionService(
6468
6585
  options,
6469
6586
  this.headers,
@@ -6497,7 +6614,7 @@ var MarketSDK = class extends BaseSDK {
6497
6614
  * @deprecated Use auth.registerClient() instead
6498
6615
  */
6499
6616
  async registerClient(request) {
6500
- log33("Registering client (deprecated method, use auth.registerClient): %s", request.clientName);
6617
+ log35("Registering client (deprecated method, use auth.registerClient): %s", request.clientName);
6501
6618
  return this.auth.registerClient(request);
6502
6619
  }
6503
6620
  };