@lobehub/market-sdk 0.25.1 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1698,6 +1698,202 @@ declare class BaseSDK {
1698
1698
  private fetchNewToken;
1699
1699
  }
1700
1700
 
1701
+ /**
1702
+ * Admin Agent Item
1703
+ * Extended agent item with admin-specific fields
1704
+ */
1705
+ interface AdminAgentItem extends AgentItem {
1706
+ /** Number of knowledge bases attached to the agent */
1707
+ knowledgeCount?: number;
1708
+ /** Owner ID of the agent */
1709
+ ownerId: number;
1710
+ /** Number of plugins attached to the agent */
1711
+ pluginCount?: number;
1712
+ /** Safety check result */
1713
+ safetyCheck?: string | null;
1714
+ /** Publication status */
1715
+ status?: string;
1716
+ /** Token usage */
1717
+ tokenUsage?: number;
1718
+ }
1719
+ /**
1720
+ * Admin Agent Item Detail
1721
+ * Extended agent detail with admin-specific fields
1722
+ */
1723
+ interface AdminAgentItemDetail extends AgentItemDetail {
1724
+ /** Safety check result */
1725
+ safetyCheck?: string | null;
1726
+ }
1727
+ /**
1728
+ * Agent list query parameters for admin
1729
+ */
1730
+ interface AdminAgentListQueryParams extends AdminListQueryParams {
1731
+ /** Filter by category */
1732
+ category?: string;
1733
+ /** Filter by official status */
1734
+ isOfficial?: 'true' | 'false';
1735
+ /** Filter by namespace */
1736
+ namespace?: string;
1737
+ /** Filter by status */
1738
+ status?: 'published' | 'unpublished' | 'archived' | 'deprecated' | 'all';
1739
+ /** Filter by visibility */
1740
+ visibility?: 'public' | 'private' | 'internal' | 'all';
1741
+ }
1742
+ /**
1743
+ * Agent update parameters
1744
+ */
1745
+ interface AgentUpdateParams {
1746
+ /** Official homepage or repository URL for the agent */
1747
+ homepage?: string | null;
1748
+ /** Unique identifier for the agent */
1749
+ identifier?: string;
1750
+ /** Whether this agent is featured */
1751
+ isFeatured?: boolean;
1752
+ /** Whether this agent is officially maintained by LobeHub */
1753
+ isOfficial?: boolean;
1754
+ /** Default name of the agent */
1755
+ name?: string;
1756
+ /** Safety check result */
1757
+ safetyCheck?: string | null;
1758
+ /** Publication status */
1759
+ status?: 'published' | 'unpublished' | 'archived' | 'deprecated';
1760
+ /** Visibility level */
1761
+ visibility?: 'public' | 'private' | 'internal';
1762
+ }
1763
+ /**
1764
+ * Agent by status response item
1765
+ */
1766
+ interface AgentByStatusItem {
1767
+ id: number;
1768
+ identifier: string;
1769
+ name: string;
1770
+ status: AgentStatus;
1771
+ updatedAt: string | null;
1772
+ }
1773
+ /**
1774
+ * Agent version by status response item
1775
+ */
1776
+ interface AgentVersionByStatusItem {
1777
+ agentId: number;
1778
+ agentName: string;
1779
+ identifier: string;
1780
+ status: AgentStatus;
1781
+ updatedAt: string | null;
1782
+ version: string;
1783
+ versionId: number;
1784
+ }
1785
+ /**
1786
+ * Agent Management Service
1787
+ *
1788
+ * Provides administrative functionality for managing agents in the marketplace.
1789
+ * This service handles CRUD operations for agents, agent status, and visibility.
1790
+ */
1791
+ declare class AgentService$1 extends BaseSDK {
1792
+ /**
1793
+ * Retrieves a list of agents with admin details
1794
+ *
1795
+ * Supports filtering, pagination, and sorting of results.
1796
+ *
1797
+ * @param params - Query parameters for filtering and pagination
1798
+ * @returns Promise resolving to the agent list response with admin details
1799
+ */
1800
+ getAgents(params?: AdminAgentListQueryParams): Promise<AdminListResponse<AdminAgentItem>>;
1801
+ /**
1802
+ * Retrieves agents filtered by status
1803
+ *
1804
+ * @param status - The status to filter by
1805
+ * @returns Promise resolving to agents matching the status
1806
+ */
1807
+ getAgentsByStatus(status: AgentStatus): Promise<{
1808
+ data: AgentByStatusItem[];
1809
+ total: number;
1810
+ }>;
1811
+ /**
1812
+ * Retrieves agent versions filtered by status
1813
+ *
1814
+ * @param status - The status to filter by
1815
+ * @returns Promise resolving to agent versions matching the status
1816
+ */
1817
+ getAgentVersionsByStatus(status: AgentStatus): Promise<{
1818
+ data: AgentVersionByStatusItem[];
1819
+ total: number;
1820
+ }>;
1821
+ /**
1822
+ * Retrieves a single agent with full admin details
1823
+ *
1824
+ * @param id - Agent ID or identifier
1825
+ * @param options - Optional query parameters
1826
+ * @returns Promise resolving to the detailed agent information
1827
+ */
1828
+ getAgent(id: number | string, options?: {
1829
+ locale?: string;
1830
+ version?: string;
1831
+ }): Promise<AdminAgentItemDetail>;
1832
+ /**
1833
+ * Updates agent information
1834
+ *
1835
+ * @param id - Agent ID or identifier
1836
+ * @param data - Agent update data containing fields to update
1837
+ * @returns Promise resolving to the updated agent
1838
+ */
1839
+ updateAgent(id: number | string, data: AgentUpdateParams): Promise<AdminAgentItem>;
1840
+ /**
1841
+ * Updates agent publication status
1842
+ *
1843
+ * @param id - Agent ID or identifier
1844
+ * @param status - New status to set
1845
+ * @returns Promise resolving to success response
1846
+ */
1847
+ updateAgentStatus(id: number | string, status: 'published' | 'unpublished' | 'archived' | 'deprecated'): Promise<{
1848
+ message: string;
1849
+ success: boolean;
1850
+ }>;
1851
+ /**
1852
+ * Updates agent visibility
1853
+ *
1854
+ * @param id - Agent ID or identifier
1855
+ * @param visibility - New visibility setting
1856
+ * @returns Promise resolving to success response
1857
+ */
1858
+ updateAgentVisibility(id: number | string, visibility: 'public' | 'private' | 'internal'): Promise<{
1859
+ message: string;
1860
+ success: boolean;
1861
+ }>;
1862
+ /**
1863
+ * Deletes an agent
1864
+ *
1865
+ * @param id - Agent ID or identifier
1866
+ * @returns Promise resolving to success response
1867
+ */
1868
+ deleteAgent(id: number | string): Promise<{
1869
+ message: string;
1870
+ success: boolean;
1871
+ }>;
1872
+ /**
1873
+ * Updates status for multiple agents in a single operation
1874
+ *
1875
+ * @param ids - Array of agent IDs to update
1876
+ * @param status - New status to set for all specified agents
1877
+ * @returns Promise resolving to success response
1878
+ */
1879
+ batchUpdateAgentStatus(ids: number[], status: 'published' | 'unpublished' | 'archived' | 'deprecated'): Promise<{
1880
+ message: string;
1881
+ success: boolean;
1882
+ updatedCount: number;
1883
+ }>;
1884
+ /**
1885
+ * Deletes multiple agents in a single operation
1886
+ *
1887
+ * @param ids - Array of agent IDs to delete
1888
+ * @returns Promise resolving to success response
1889
+ */
1890
+ batchDeleteAgents(ids: number[]): Promise<{
1891
+ deletedCount: number;
1892
+ message: string;
1893
+ success: boolean;
1894
+ }>;
1895
+ }
1896
+
1701
1897
  /**
1702
1898
  * Market Overview Statistics Interface
1703
1899
  * Defines the structure for market overview data
@@ -2562,21 +2758,29 @@ declare class PluginEnvService extends BaseSDK {
2562
2758
  * LobeHub Market Admin SDK Client
2563
2759
  *
2564
2760
  * Client for accessing administrative functionality of the LobeHub Marketplace.
2565
- * This SDK provides privileged operations for managing plugins, reviews,
2761
+ * This SDK provides privileged operations for managing agents, plugins, reviews,
2566
2762
  * system settings, and dependencies. It requires admin-level authentication.
2567
2763
  */
2568
2764
  declare class MarketAdmin extends BaseSDK {
2765
+ /**
2766
+ * Agent management service
2767
+ * Provides methods for creating, updating, and managing agents
2768
+ */
2769
+ readonly agents: AgentService$1;
2569
2770
  /**
2570
2771
  * Market analysis service
2571
2772
  * Provides methods for accessing market analytics and statistics
2572
2773
  */
2573
2774
  readonly analysis: AnalysisService;
2775
+ /**
2776
+ * Plugin environment service
2777
+ */
2778
+ readonly env: PluginEnvService;
2574
2779
  /**
2575
2780
  * Plugin management service
2576
2781
  * Provides methods for creating, updating, and managing plugins
2577
2782
  */
2578
2783
  readonly plugins: PluginService;
2579
- readonly env: PluginEnvService;
2580
2784
  /**
2581
2785
  * Review management service
2582
2786
  * Provides methods for moderating and managing user reviews