@lobehub/market-types 1.11.4 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,5 +1,99 @@
1
1
  import { z } from 'zod';
2
2
 
3
+ /**
4
+ * Base structure for a single resource item in the marketplace.
5
+ * This interface defines the common properties shared by all marketplace items,
6
+ * including plugins, agents, and other resources.
7
+ */
8
+ interface MarketItemBase {
9
+ /** Author or organization name */
10
+ author?: string;
11
+ /** Category name used for classification */
12
+ category?: string;
13
+ /** Optional: Compatibility information for different platforms or versions */
14
+ compatibility?: Record<string, any>;
15
+ /** Resource creation date in the marketplace (ISO 8601 format) */
16
+ createdAt: string;
17
+ /** Localized short description displayed in the marketplace listing */
18
+ description: string;
19
+ /** URL to the resource's homepage or documentation */
20
+ homepage?: string;
21
+ /** Icon URL or Emoji character */
22
+ icon?: string;
23
+ /** Globally unique identifier, typically contains author/namespace and name */
24
+ identifier: string;
25
+ /** URL pointing to the detailed manifest file for this resource */
26
+ manifestUrl: string;
27
+ /** Localized display name shown in the marketplace listing */
28
+ name: string;
29
+ /** List of localized tags for filtering and categorization */
30
+ tags?: string[];
31
+ /** Resource's last update date in the marketplace (ISO 8601 format) */
32
+ updatedAt: string;
33
+ }
34
+ /**
35
+ * Category list request query parameters
36
+ *
37
+ * Query parameters for retrieving category statistics with optional filtering.
38
+ */
39
+ interface CategoryListQuery {
40
+ /** Optional locale for localized search, defaults to 'en-US' */
41
+ locale?: string;
42
+ /** Optional search query to filter plugins before counting categories */
43
+ q?: string;
44
+ }
45
+ /**
46
+ * Single category item with plugin count
47
+ *
48
+ * Represents a category and the number of plugins in that category.
49
+ */
50
+ interface CategoryItem {
51
+ /** Category name */
52
+ category: string;
53
+ /** Number of plugins in this category */
54
+ count: number;
55
+ }
56
+ /**
57
+ * Category list response type
58
+ *
59
+ * Array of categories with their respective plugin counts.
60
+ */
61
+ type CategoryListResponse = CategoryItem[];
62
+
63
+ /**
64
+ * Agent event tracking types
65
+ *
66
+ * These types describe the payload used when recording user agent events such as
67
+ * adding, chatting with, or clicking an agent card.
68
+ */
69
+ type AgentEventType = 'add' | 'chat' | 'click';
70
+ /** Payload for recording an agent event */
71
+ interface AgentEventRequest {
72
+ /** Event name */
73
+ event: AgentEventType;
74
+ /** Agent identifier */
75
+ identifier: string;
76
+ /** Optional event source */
77
+ source?: string;
78
+ }
79
+
80
+ /**
81
+ * Agent resource item definition that extends the base marketplace structure.
82
+ *
83
+ * Agents represent AI personalities or specialized assistants that can be installed
84
+ * from the marketplace. They include the base properties of marketplace items along
85
+ * with any agent-specific properties.
86
+ */
87
+ interface AgentItem extends MarketItemBase {
88
+ /** Optional agent capabilities and features */
89
+ capabilities?: {
90
+ /** Whether the agent supports memory/history */
91
+ memory?: boolean;
92
+ /** Whether the agent supports additional tools */
93
+ tools?: boolean;
94
+ };
95
+ }
96
+
3
97
  /**
4
98
  * Top Plugin Interface
5
99
  * Unified interface for top plugins data
@@ -58,71 +152,63 @@ interface InstallFailureAnalysisQuery {
58
152
  }
59
153
 
60
154
  /**
61
- * Base structure for a single resource item in the marketplace.
62
- * This interface defines the common properties shared by all marketplace items,
63
- * including plugins, agents, and other resources.
155
+ * MCP (Model Context Protocol) Type Definitions
156
+ *
157
+ * This file contains type definitions for the MCP protocol used in cloud gateway functionality.
64
158
  */
65
- interface MarketItemBase {
66
- /** Author or organization name */
67
- author?: string;
68
- /** Category name used for classification */
69
- category?: string;
70
- /** Optional: Compatibility information for different platforms or versions */
71
- compatibility?: Record<string, any>;
72
- /** Resource creation date in the marketplace (ISO 8601 format) */
73
- createdAt: string;
74
- /** Localized short description displayed in the marketplace listing */
75
- description: string;
76
- /** URL to the resource's homepage or documentation */
77
- homepage?: string;
78
- /** Icon URL or Emoji character */
79
- icon?: string;
80
- /** Globally unique identifier, typically contains author/namespace and name */
81
- identifier: string;
82
- /** URL pointing to the detailed manifest file for this resource */
83
- manifestUrl: string;
84
- /** Localized display name shown in the marketplace listing */
85
- name: string;
86
- /** List of localized tags for filtering and categorization */
87
- tags?: string[];
88
- /** Resource's last update date in the marketplace (ISO 8601 format) */
89
- updatedAt: string;
159
+ /**
160
+ * Content item in MCP tool response
161
+ */
162
+ interface McpToolContent {
163
+ /** Additional data for other types */
164
+ data?: string;
165
+ /** Error message for error type */
166
+ message?: string;
167
+ /** MIME type of the content */
168
+ mimeType?: string;
169
+ /** Text content for text/error types */
170
+ text?: string;
171
+ /** Content type */
172
+ type: 'text' | 'error' | 'image' | 'resource';
90
173
  }
91
174
  /**
92
- * Category list request query parameters
93
- *
94
- * Query parameters for retrieving category statistics with optional filtering.
175
+ * Cloud Gateway Request Interface
95
176
  */
96
- interface CategoryListQuery {
97
- /** Optional locale for localized search, defaults to 'en-US' */
98
- locale?: string;
99
- /** Optional search query to filter plugins before counting categories */
100
- q?: string;
177
+ interface CloudGatewayRequest {
178
+ /** Tool parameters payload */
179
+ apiParams: Record<string, any>;
180
+ /** Plugin unique identifier */
181
+ identifier: string;
182
+ /** Tool name to invoke */
183
+ toolName: string;
101
184
  }
102
185
  /**
103
- * Single category item with plugin count
104
- *
105
- * Represents a category and the number of plugins in that category.
186
+ * Cloud Gateway Response Interface
106
187
  */
107
- interface CategoryItem {
108
- /** Category name */
109
- category: string;
110
- /** Number of plugins in this category */
111
- count: number;
188
+ interface CloudGatewayResponse {
189
+ /** Array of content items returned by the tool */
190
+ content: McpToolContent[];
191
+ /** Whether this result represents an error */
192
+ isError?: boolean;
112
193
  }
113
194
  /**
114
- * Category list response type
115
- *
116
- * Array of categories with their respective plugin counts.
195
+ * Error response for cloud gateway
117
196
  */
118
- type CategoryListResponse = CategoryItem[];
197
+ interface CloudGatewayErrorResponse {
198
+ /** Error code (optional) */
199
+ code?: string;
200
+ /** Additional error details */
201
+ details?: any;
202
+ /** Error message */
203
+ message: string;
204
+ }
119
205
 
120
206
  /**
121
207
  * Connection types for plugin communication.
122
208
  * - http: The plugin communicates via HTTP protocol
123
209
  * - stdio: The plugin communicates via standard input/output
124
210
  */
125
- declare const ConnectionTypeEnum: z.ZodEnum<["http", "stdio"]>;
211
+ declare const ConnectionTypeEnum: z.ZodEnum<["http", "stdio", "sse"]>;
126
212
  type ConnectionType = z.infer<typeof ConnectionTypeEnum>;
127
213
  /**
128
214
  * Plugin connection types for overall plugin communication strategy.
@@ -345,6 +431,7 @@ declare const BasePluginItemSchema: z.ZodObject<{
345
431
  license?: string | undefined;
346
432
  stars?: number | undefined;
347
433
  }>>;
434
+ haveCloudEndpoint: z.ZodOptional<z.ZodBoolean>;
348
435
  homepage: z.ZodOptional<z.ZodString>;
349
436
  icon: z.ZodOptional<z.ZodString>;
350
437
  identifier: z.ZodString;
@@ -389,6 +476,7 @@ declare const BasePluginItemSchema: z.ZodObject<{
389
476
  license?: string | undefined;
390
477
  stars?: number | undefined;
391
478
  } | undefined;
479
+ haveCloudEndpoint?: boolean | undefined;
392
480
  homepage?: string | undefined;
393
481
  icon?: string | undefined;
394
482
  promptsCount?: number | undefined;
@@ -417,6 +505,7 @@ declare const BasePluginItemSchema: z.ZodObject<{
417
505
  license?: string | undefined;
418
506
  stars?: number | undefined;
419
507
  } | undefined;
508
+ haveCloudEndpoint?: boolean | undefined;
420
509
  homepage?: string | undefined;
421
510
  icon?: string | undefined;
422
511
  installCount?: number | undefined;
@@ -456,6 +545,8 @@ interface MarketPluginItem extends MarketItemBase {
456
545
  stars?: number;
457
546
  url: string;
458
547
  };
548
+ /** Whether the plugin has a cloud endpoint available for official cloud-hosted deployment */
549
+ haveCloudEndpoint?: boolean;
459
550
  /** Number of times this plugin has been installed */
460
551
  installCount?: number;
461
552
  /** Whether this plugin has been claimed by its original author */
@@ -608,6 +699,7 @@ declare const AdminPluginItemSchema: z.ZodObject<{
608
699
  license?: string | undefined;
609
700
  stars?: number | undefined;
610
701
  }>>;
702
+ haveCloudEndpoint: z.ZodOptional<z.ZodBoolean>;
611
703
  homepage: z.ZodOptional<z.ZodString>;
612
704
  icon: z.ZodOptional<z.ZodString>;
613
705
  identifier: z.ZodString;
@@ -659,6 +751,7 @@ declare const AdminPluginItemSchema: z.ZodObject<{
659
751
  license?: string | undefined;
660
752
  stars?: number | undefined;
661
753
  } | undefined;
754
+ haveCloudEndpoint?: boolean | undefined;
662
755
  homepage?: string | undefined;
663
756
  icon?: string | undefined;
664
757
  promptsCount?: number | undefined;
@@ -689,6 +782,7 @@ declare const AdminPluginItemSchema: z.ZodObject<{
689
782
  license?: string | undefined;
690
783
  stars?: number | undefined;
691
784
  } | undefined;
785
+ haveCloudEndpoint?: boolean | undefined;
692
786
  homepage?: string | undefined;
693
787
  icon?: string | undefined;
694
788
  installCount?: number | undefined;
@@ -707,6 +801,8 @@ declare const AdminPluginItemSchema: z.ZodObject<{
707
801
  * Extends the market plugin item with administrative properties.
708
802
  */
709
803
  interface AdminPluginItem extends MarketPluginItem {
804
+ /** GitHub last update timestamp (ISO 8601 format) */
805
+ githubUpdateAt?: string;
710
806
  /** Unique numeric identifier for the plugin in the database */
711
807
  id: number;
712
808
  /** User ID of the plugin owner */
@@ -848,6 +944,23 @@ interface RangeQuery {
848
944
  range: [string, string];
849
945
  }
850
946
 
947
+ /**
948
+ * Plugin event tracking types
949
+ *
950
+ * These types describe the payload used when recording user plugin events such as
951
+ * installs, activations, uninstalls, or clicks.
952
+ */
953
+ type PluginEventType = 'install' | 'activate' | 'uninstall' | 'click';
954
+ /** Payload for recording a plugin event */
955
+ interface PluginEventRequest {
956
+ /** Event name */
957
+ event: PluginEventType;
958
+ /** Plugin identifier */
959
+ identifier: string;
960
+ /** Optional event source */
961
+ source?: string;
962
+ }
963
+
851
964
  /**
852
965
  * Plugin Call Report Types
853
966
  *
@@ -1113,4 +1226,4 @@ interface InstallLogEntry {
1113
1226
  version: string;
1114
1227
  }
1115
1228
 
1116
- export { type AdminDeploymentOption, type AdminPluginItem, type AdminPluginItemDetail, AdminPluginItemSchema, type AdminSystemDependency, type BasePluginItem, BasePluginItemSchema, type CallLogEntry, type CallReportRequest, type CallReportResponse, type CallStats, type CategoryItem, type CategoryListQuery, type CategoryListResponse, type ConnectionConfig, type ConnectionType, ConnectionTypeEnum, type CustomPluginInfo, type DeploymentOption, type IncompleteI18nPlugin, type InstallFailureAnalysis, type InstallFailureAnalysisQuery, type InstallLogEntry, type InstallReportRequest, type InstallReportResponse, type InstallStats, type InstallationDetails, type InstallationMethod, InstallationMethodEnum, type MarketItemBase, type MarketPluginItem, PluginCapabilitiesSchema, type PluginCompatibility, type PluginConnectionType, PluginConnectionTypeEnum, type PluginItemDetail, type PluginManifest, type PluginMethodType, type PluginPrompt, type PluginResource, type PluginSortBy, type PluginTool, type PluginVersion, type PluginVersionLocalization, type PluginVersionSummary, type PromptArgument, type RangeDataPoint, type RangeQuery, type RangeStats, type SystemDependency, type TopPlugin, type TopPluginsQuery };
1229
+ export { type AdminDeploymentOption, type AdminPluginItem, type AdminPluginItemDetail, AdminPluginItemSchema, type AdminSystemDependency, type AgentEventRequest, type AgentEventType, type AgentItem, type BasePluginItem, BasePluginItemSchema, type CallLogEntry, type CallReportRequest, type CallReportResponse, type CallStats, type CategoryItem, type CategoryListQuery, type CategoryListResponse, type CloudGatewayErrorResponse, type CloudGatewayRequest, type CloudGatewayResponse, type ConnectionConfig, type ConnectionType, ConnectionTypeEnum, type CustomPluginInfo, type DeploymentOption, type IncompleteI18nPlugin, type InstallFailureAnalysis, type InstallFailureAnalysisQuery, type InstallLogEntry, type InstallReportRequest, type InstallReportResponse, type InstallStats, type InstallationDetails, type InstallationMethod, InstallationMethodEnum, type MarketItemBase, type MarketPluginItem, type McpToolContent, PluginCapabilitiesSchema, type PluginCompatibility, type PluginConnectionType, PluginConnectionTypeEnum, type PluginEventRequest, type PluginEventType, type PluginItemDetail, type PluginManifest, type PluginMethodType, type PluginPrompt, type PluginResource, type PluginSortBy, type PluginTool, type PluginVersion, type PluginVersionLocalization, type PluginVersionSummary, type PromptArgument, type RangeDataPoint, type RangeQuery, type RangeStats, type SystemDependency, type TopPlugin, type TopPluginsQuery };
package/dist/index.mjs CHANGED
@@ -30,6 +30,7 @@ var BasePluginItemSchema = z2.object({
30
30
  stars: z2.number().optional(),
31
31
  url: z2.string()
32
32
  }).optional(),
33
+ haveCloudEndpoint: z2.boolean().optional(),
33
34
  homepage: z2.string().optional(),
34
35
  icon: z2.string().optional(),
35
36
  identifier: z2.string(),
@@ -58,7 +59,7 @@ var AdminPluginItemSchema = BasePluginItemSchema.extend({
58
59
 
59
60
  // src/plugin/deploymentOption.ts
60
61
  import { z as z4 } from "zod";
61
- var ConnectionTypeEnum = z4.enum(["http", "stdio"]);
62
+ var ConnectionTypeEnum = z4.enum(["http", "stdio", "sse"]);
62
63
  var PluginConnectionTypeEnum = z4.enum(["local", "remote", "hybrid"]);
63
64
  var InstallationMethodEnum = z4.enum([
64
65
  "npm",
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/plugin/admin.ts","../src/plugin/plugin.ts","../src/plugin/capabilities.ts","../src/plugin/deploymentOption.ts"],"sourcesContent":["// Admin plugin item schema definitions\nimport { z } from 'zod';\n\nimport { DeploymentOption, SystemDependency } from './deploymentOption';\nimport { BasePluginItemSchema, MarketPluginItem, PluginManifest } from './plugin';\n\n/**\n * Schema for admin-managed plugin items with additional status and visibility fields.\n * Extends the base plugin schema with administrative properties.\n */\nexport const AdminPluginItemSchema = BasePluginItemSchema.extend({\n /** Publication status of the plugin */\n status: z.enum(['published', 'unpublished', 'archived', 'deprecated'] as const),\n /** Visibility level of the plugin */\n visibility: z.enum(['public', 'private', 'internal'] as const),\n});\n\n/**\n * Interface for admin-managed plugin items.\n * Extends the market plugin item with administrative properties.\n */\nexport interface AdminPluginItem extends MarketPluginItem {\n /** Unique numeric identifier for the plugin in the database */\n id: number;\n /** User ID of the plugin owner */\n ownerId: number;\n /** Publication status of the plugin */\n status: 'published' | 'unpublished' | 'archived';\n /** Visibility level controlling who can access the plugin */\n visibility: 'public' | 'private' | 'internal';\n}\n\n/**\n * Plugin version database model.\n * Represents a specific version of a plugin in the database.\n */\nexport interface PluginVersion {\n /** Creation timestamp (ISO 8601 format) */\n createdAt: string;\n /** Unique numeric identifier for the version */\n id: number;\n /** Whether this is the latest version of the plugin */\n isLatest: boolean;\n /** Whether this version has been validated by the system */\n isValidated: boolean;\n /** The full manifest data for this version */\n manifest: PluginManifest;\n /** URL to the manifest file, or null if stored directly */\n manifestUrl: string | null;\n /** Additional metadata for this version */\n meta: Record<string, any> | null;\n /** ID of the parent plugin */\n pluginId: number;\n /** Number of prompts provided by this version */\n promptsCount: number;\n /** Number of resources provided by this version */\n resourcesCount: number;\n /** Number of tools provided by this version */\n toolsCount: number;\n /** Last update timestamp (ISO 8601 format) */\n updatedAt: string;\n /** Semantic version string (e.g., \"1.0.0\") */\n version: string;\n}\n\n/**\n * Detailed admin plugin item with version history.\n * Used for displaying complete plugin information in the admin interface.\n */\nexport interface AdminPluginItemDetail extends Omit<AdminPluginItem, 'manifestUrl'> {\n /** Full manifest data for the current version */\n manifest: PluginManifest;\n /** List of all versions of this plugin */\n versions: PluginVersion[];\n}\n\n/**\n * Admin deployment option with database ID.\n * Extends the basic deployment option with a database identifier.\n */\nexport interface AdminDeploymentOption extends DeploymentOption {\n /** Unique numeric identifier for the deployment option */\n id: number;\n}\n\n/**\n * Admin system dependency with database ID.\n * Extends the basic system dependency with a database identifier.\n */\nexport interface AdminSystemDependency extends SystemDependency {\n /** Unique numeric identifier for the system dependency */\n id: number;\n}\n\n/**\n * Plugin version localization data.\n * Represents localized content for a specific plugin version in a particular language.\n */\nexport interface PluginVersionLocalization {\n /** Creation timestamp (ISO 8601 format) */\n createdAt: string;\n /** Localized description of the plugin */\n description: string;\n /** Unique numeric identifier for the localization */\n id: number;\n /** Language/locale code (e.g., 'en-US', 'zh-CN') */\n locale: string;\n /** Localized display name of the plugin */\n name: string;\n /** ID of the parent plugin version */\n pluginVersionId: number;\n /** Localized summary of the plugin */\n summary?: string;\n /** Array of localized tags for categorization and search */\n tags?: string[];\n}\n\n/**\n * 不完整i18n插件项\n * 表示pluginVersionLocalizations只有1个条目的插件\n */\nexport interface IncompleteI18nPlugin {\n /** 插件标识符 */\n identifier: string;\n /** 本地化条目数量 */\n localizationCount: number;\n /** 插件ID */\n pluginId: number;\n /** 插件版本 */\n version: string;\n}\n\n/**\n * Range Data Point Interface\n * Defines the structure for daily trend data points in analysis\n */\nexport interface RangeDataPoint {\n /** Current period count */\n count: number;\n /** Date in YYYY-MM-DD format */\n date: string;\n /** Previous period count for comparison */\n prevCount: number;\n}\n\n/**\n * Range Statistics Interface\n * Defines the structure for range-based statistics\n */\nexport interface RangeStats {\n /** Array of daily data points */\n data: RangeDataPoint[];\n /** Display configuration */\n display: string;\n /** Total sum for previous period */\n prevSum: number;\n /** Total sum for current period */\n sum: number;\n}\n\n/**\n * Range query parameters for trend analysis\n */\nexport interface RangeQuery {\n /** Display configuration */\n display: string;\n /** Optional previous period range for comparison */\n prevRange?: [string, string];\n /** Date range as [startDate, endDate] */\n range: [string, string];\n}\n","import { z } from 'zod';\n\nimport { MarketItemBase } from '../market';\nimport { PluginCapabilitiesSchema, PluginPrompt, PluginResource, PluginTool } from './capabilities';\nimport { DeploymentOption, PluginConnectionType } from './deploymentOption';\n\n/**\n * Plugin compatibility information.\n * Defines the compatibility requirements for a plugin with respect to app versions and platforms.\n */\nexport interface PluginCompatibility {\n /** Maximum app version the plugin is compatible with */\n maxAppVersion?: string;\n /** Minimum app version required to use the plugin */\n minAppVersion?: string;\n /** List of supported platforms (e.g., 'web', 'desktop', 'mobile') */\n platforms?: string[];\n}\n\n/**\n * Simplified plugin version information.\n * Contains minimal version data for plugin version lists.\n */\nexport interface PluginVersionSummary {\n /** Creation timestamp (ISO 8601 format) */\n createdAt: string;\n /** Whether this is the latest version of the plugin */\n isLatest: boolean;\n /** Whether this version has been validated by the system */\n isValidated: boolean;\n /** Semantic version string (e.g., \"1.0.0\") */\n version: string;\n}\n\n/**\n * Base plugin item schema with Zod validation.\n * Defines the structure and validation rules for plugin items in the marketplace.\n */\nexport const BasePluginItemSchema = z.object({\n author: z.string().optional(),\n capabilities: PluginCapabilitiesSchema,\n category: z.string().optional(),\n commentCount: z.number().default(0),\n connectionType: z.enum(['local', 'remote', 'hybrid']).optional(),\n createdAt: z.string(),\n description: z.string(),\n github: z\n .object({\n language: z.string().optional(),\n license: z.string().optional(),\n stars: z.number().optional(),\n url: z.string(),\n })\n .optional(),\n homepage: z.string().optional(),\n icon: z.string().optional(),\n identifier: z.string(),\n installCount: z.number().default(0),\n isClaimed: z.boolean().default(false),\n isFeatured: z.boolean().default(false),\n isOfficial: z.boolean().default(false),\n isValidated: z.boolean().default(false),\n manifestUrl: z.string(),\n name: z.string(),\n promptsCount: z.number().optional(),\n ratingAverage: z.number().optional(),\n ratingCount: z.number().default(0),\n resourcesCount: z.number().optional(),\n toolsCount: z.number().optional(),\n updatedAt: z.string(),\n});\n\n/**\n * Plugin marketplace item definition.\n * Extends the base marketplace item with plugin-specific properties.\n * This interface represents a plugin as it appears in the marketplace listing.\n */\nexport interface MarketPluginItem extends MarketItemBase {\n /** Capabilities provided by this plugin */\n capabilities?: {\n /** Whether the plugin provides custom prompts */\n prompts: boolean;\n /** Whether the plugin provides resources (assets) */\n resources: boolean;\n /** Whether the plugin provides tools (functions) */\n tools: boolean;\n };\n /** Number of comments on this plugin */\n commentCount?: number;\n /** Connection type strategy for communicating with the plugin */\n connectionType?: PluginConnectionType;\n /** GitHub repository information */\n github?: {\n language?: string;\n license?: string;\n stars?: number;\n url: string;\n };\n /** Number of times this plugin has been installed */\n installCount?: number;\n /** Whether this plugin has been claimed by its original author */\n isClaimed?: boolean;\n /** Whether this plugin is featured in the marketplace */\n isFeatured?: boolean;\n /** Whether this plugin is officially maintained by LobeHub */\n isOfficial?: boolean;\n /** Whether this plugin has been validated by the system */\n isValidated?: boolean;\n /** Number of prompts provided by this plugin */\n promptsCount?: number;\n /** Average rating (typically 1-5 scale) */\n ratingAverage?: number;\n /** Number of ratings received */\n ratingCount?: number;\n /** Number of resources provided by this plugin */\n resourcesCount?: number;\n summary?: string;\n /** Number of tools provided by this plugin */\n toolsCount?: number;\n}\n\n/** Type alias for the base plugin item validated by Zod schema */\nexport type BasePluginItem = z.infer<typeof BasePluginItemSchema>;\n\n/**\n * Plugin manifest definition.\n * This is the complete specification of a plugin, including all its capabilities,\n * metadata, and deployment options.\n */\nexport interface PluginItemDetail extends Omit<MarketPluginItem, 'author' | 'manifestUrl'> {\n // 构建产物信息\n artifacts?: {\n docker?: {\n imageName?: string;\n tag?: string;\n };\n npm?: {\n packageName?: string;\n version?: string;\n };\n pypi?: {\n packageName?: string;\n version?: string;\n };\n };\n /** Author information */\n author?: {\n /** Author or organization name */\n name: string;\n /** URL to the author's website or profile */\n url?: string;\n };\n /** Connection type strategy for communicating with the plugin */\n connectionType?: PluginConnectionType;\n /** Available deployment options */\n deploymentOptions?: DeploymentOption[];\n /**\n * GitHub\n */\n github?: {\n language?: string;\n license?: string;\n stars?: number;\n url: string;\n };\n overview: {\n readme: string;\n summary?: string;\n };\n /** List of prompt templates provided by this plugin */\n prompts?: PluginPrompt[];\n /** List of resources provided by this plugin */\n resources?: PluginResource[];\n /** List of tools provided by this plugin */\n tools?: PluginTool[];\n\n /** Date when the plugin was created in the marketplace (ISO 8601 format) */\n validatedAt?: string;\n /** Semantic version string (e.g., \"1.0.0\") */\n version: string;\n /** List of all versions of this plugin with simplified information */\n versions: PluginVersionSummary[];\n}\n\n/**\n * Plugin manifest definition.\n * This is the complete specification of a plugin, including all its capabilities,\n * metadata, and deployment options.\n */\nexport interface PluginManifest extends Omit<MarketPluginItem, 'author' | 'manifestUrl'> {\n /** Author information */\n author?: {\n /** Author or organization name */\n name: string;\n /** URL to the author's website or profile */\n url?: string;\n };\n /** Available deployment options */\n deploymentOptions?: DeploymentOption[];\n overview?: {\n readme?: string;\n summary?: string;\n };\n /** List of prompt templates provided by this plugin */\n prompts?: PluginPrompt[];\n /** List of resources provided by this plugin */\n resources?: PluginResource[];\n /** List of tools provided by this plugin */\n tools?: PluginTool[];\n /** Date when the plugin was created in the marketplace (ISO 8601 format) */\n validatedAt?: string;\n /** Semantic version string (e.g., \"1.0.0\") */\n version: string;\n}\n","// Plugin capability definitions\nimport { z } from 'zod';\n\n/**\n * Schema defining the capabilities a plugin can provide.\n * Each capability is represented as a boolean flag.\n */\nexport const PluginCapabilitiesSchema = z.object({\n /** Whether the plugin provides custom prompts */\n prompts: z.boolean().default(false),\n /** Whether the plugin provides resources (assets) */\n resources: z.boolean().default(false),\n /** Whether the plugin provides tools (functions) */\n tools: z.boolean().default(false),\n});\n\n/**\n * Definition of a tool that a plugin can provide.\n * Tools are functions that can be called by the chat application.\n */\nexport interface PluginTool {\n /** Human-readable description of what the tool does */\n description?: string;\n /** JSON schema defining the expected input parameters */\n inputSchema?: Record<string, any>;\n /** Unique identifier for the tool within the plugin */\n name: string;\n}\n\n/**\n * Definition of a resource (asset) that a plugin can provide.\n * Resources can be images, data files, or other assets needed by the plugin.\n */\nexport interface PluginResource {\n /** MIME type of the resource (e.g., 'image/png', 'application/json') */\n mimeType?: string;\n /** Optional display name for the resource */\n name?: string;\n /** URI where the resource can be accessed */\n uri: string;\n}\n\n/**\n * Definition of an argument for a prompt template.\n * Arguments allow users to customize the prompt when using it.\n */\nexport interface PromptArgument {\n /** Human-readable description of the argument's purpose */\n description?: string;\n /** Argument identifier */\n name: string;\n /** Whether the argument must be provided (defaults to false if omitted) */\n required?: boolean;\n /** Data type of the argument (e.g., 'string', 'number') */\n type?: string;\n}\n\n/**\n * Definition of a prompt template that a plugin can provide.\n * Prompts are pre-defined templates that can be used in conversations.\n */\nexport interface PluginPrompt {\n /** List of customizable arguments for this prompt */\n arguments?: PromptArgument[];\n /** Human-readable description of what the prompt does */\n description: string;\n /** Unique identifier for the prompt within the plugin */\n name: string;\n}\n","import { z } from 'zod';\n\n/**\n * Connection types for plugin communication.\n * - http: The plugin communicates via HTTP protocol\n * - stdio: The plugin communicates via standard input/output\n */\nexport const ConnectionTypeEnum = z.enum(['http', 'stdio']);\nexport type ConnectionType = z.infer<typeof ConnectionTypeEnum>;\n\n/**\n * Plugin connection types for overall plugin communication strategy.\n * - local: Plugin only supports local communication (stdio)\n * - remote: Plugin only supports remote communication (http)\n * - hybrid: Plugin supports both local and remote communication\n */\nexport const PluginConnectionTypeEnum = z.enum(['local', 'remote', 'hybrid']);\nexport type PluginConnectionType = z.infer<typeof PluginConnectionTypeEnum>;\n\n/**\n * Plugin installation methods.\n * Different ways to install and deploy a plugin.\n */\nexport const InstallationMethodEnum = z.enum([\n 'npm', // Node.js package manager\n 'go', // Go language\n 'python', // Python language\n 'docker', // Docker container\n 'git', // Git repository\n 'binaryUrl', // Direct binary download URL\n 'manual', // Manual installation with instructions\n 'none', // No installation required\n]);\nexport type InstallationMethod = z.infer<typeof InstallationMethodEnum>;\n\n/**\n * System dependency required by a plugin.\n * Defines a software dependency that must be installed on the system.\n */\nexport interface SystemDependency {\n /** Command to check if the dependency is installed */\n checkCommand?: string;\n /** Description of what this dependency is for */\n description?: string;\n /** Platform-specific installation instructions */\n installInstructions?: Record<string, string>;\n /** Name of the dependency */\n name: string;\n /** Minimum required version */\n requiredVersion?: string;\n /** Type of dependency (e.g., 'runtime', 'library') */\n type?: string;\n /** Whether version parsing is required to check compatibility */\n versionParsingRequired?: boolean;\n}\n\n/**\n * Connection configuration for a plugin.\n * Defines how the application should communicate with the plugin.\n */\nexport interface ConnectionConfig {\n /** Command-line arguments for the plugin process */\n args?: string[];\n /** Command to execute to start the plugin */\n command?: string;\n /**\n * JSON Schema 配置\n * 插件运行时需要的 configSchema\n */\n configSchema?: any;\n /** Type of connection (http or stdio) */\n type: ConnectionType;\n /** URL for HTTP-based plugins */\n url?: string;\n}\n\n/**\n * Details for installing a plugin.\n * Provides specific information needed during the installation process.\n */\nexport interface InstallationDetails {\n /** Package name for npm, pip, or other package managers */\n packageName?: string;\n /** Git repository URL to clone */\n repositoryUrlToClone?: string;\n /** Ordered list of setup steps to execute after installation */\n setupSteps?: string[];\n}\n\n/**\n * Deployment option for a plugin.\n * A plugin can offer multiple deployment options, each with different requirements.\n */\nexport interface DeploymentOption {\n /** Connection configuration for this deployment option */\n connection: ConnectionConfig;\n /** Human-readable description of this deployment option */\n description?: string;\n /** Detailed installation instructions */\n installationDetails?: InstallationDetails;\n /** Method used to install this plugin */\n installationMethod: string;\n /** Whether this is the recommended deployment option */\n isRecommended?: boolean;\n /** System dependencies required for this deployment option */\n systemDependencies?: SystemDependency[];\n}\n"],"mappings":";AACA,SAAS,KAAAA,UAAS;;;ACDlB,SAAS,KAAAC,UAAS;;;ACClB,SAAS,SAAS;AAMX,IAAM,2BAA2B,EAAE,OAAO;AAAA;AAAA,EAE/C,SAAS,EAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA;AAAA,EAElC,WAAW,EAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA;AAAA,EAEpC,OAAO,EAAE,QAAQ,EAAE,QAAQ,KAAK;AAClC,CAAC;;;ADwBM,IAAM,uBAAuBC,GAAE,OAAO;AAAA,EAC3C,QAAQA,GAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,cAAc;AAAA,EACd,UAAUA,GAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,cAAcA,GAAE,OAAO,EAAE,QAAQ,CAAC;AAAA,EAClC,gBAAgBA,GAAE,KAAK,CAAC,SAAS,UAAU,QAAQ,CAAC,EAAE,SAAS;AAAA,EAC/D,WAAWA,GAAE,OAAO;AAAA,EACpB,aAAaA,GAAE,OAAO;AAAA,EACtB,QAAQA,GACL,OAAO;AAAA,IACN,UAAUA,GAAE,OAAO,EAAE,SAAS;AAAA,IAC9B,SAASA,GAAE,OAAO,EAAE,SAAS;AAAA,IAC7B,OAAOA,GAAE,OAAO,EAAE,SAAS;AAAA,IAC3B,KAAKA,GAAE,OAAO;AAAA,EAChB,CAAC,EACA,SAAS;AAAA,EACZ,UAAUA,GAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,MAAMA,GAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,YAAYA,GAAE,OAAO;AAAA,EACrB,cAAcA,GAAE,OAAO,EAAE,QAAQ,CAAC;AAAA,EAClC,WAAWA,GAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA,EACpC,YAAYA,GAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA,EACrC,YAAYA,GAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA,EACrC,aAAaA,GAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA,EACtC,aAAaA,GAAE,OAAO;AAAA,EACtB,MAAMA,GAAE,OAAO;AAAA,EACf,cAAcA,GAAE,OAAO,EAAE,SAAS;AAAA,EAClC,eAAeA,GAAE,OAAO,EAAE,SAAS;AAAA,EACnC,aAAaA,GAAE,OAAO,EAAE,QAAQ,CAAC;AAAA,EACjC,gBAAgBA,GAAE,OAAO,EAAE,SAAS;AAAA,EACpC,YAAYA,GAAE,OAAO,EAAE,SAAS;AAAA,EAChC,WAAWA,GAAE,OAAO;AACtB,CAAC;;;AD5DM,IAAM,wBAAwB,qBAAqB,OAAO;AAAA;AAAA,EAE/D,QAAQC,GAAE,KAAK,CAAC,aAAa,eAAe,YAAY,YAAY,CAAU;AAAA;AAAA,EAE9E,YAAYA,GAAE,KAAK,CAAC,UAAU,WAAW,UAAU,CAAU;AAC/D,CAAC;;;AGfD,SAAS,KAAAC,UAAS;AAOX,IAAM,qBAAqBA,GAAE,KAAK,CAAC,QAAQ,OAAO,CAAC;AASnD,IAAM,2BAA2BA,GAAE,KAAK,CAAC,SAAS,UAAU,QAAQ,CAAC;AAOrE,IAAM,yBAAyBA,GAAE,KAAK;AAAA,EAC3C;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AACF,CAAC;","names":["z","z","z","z","z"]}
1
+ {"version":3,"sources":["../src/plugin/admin.ts","../src/plugin/plugin.ts","../src/plugin/capabilities.ts","../src/plugin/deploymentOption.ts"],"sourcesContent":["// Admin plugin item schema definitions\nimport { z } from 'zod';\n\nimport { DeploymentOption, SystemDependency } from './deploymentOption';\nimport { BasePluginItemSchema, MarketPluginItem, PluginManifest } from './plugin';\n\n/**\n * Schema for admin-managed plugin items with additional status and visibility fields.\n * Extends the base plugin schema with administrative properties.\n */\nexport const AdminPluginItemSchema = BasePluginItemSchema.extend({\n /** Publication status of the plugin */\n status: z.enum(['published', 'unpublished', 'archived', 'deprecated'] as const),\n /** Visibility level of the plugin */\n visibility: z.enum(['public', 'private', 'internal'] as const),\n});\n\n/**\n * Interface for admin-managed plugin items.\n * Extends the market plugin item with administrative properties.\n */\nexport interface AdminPluginItem extends MarketPluginItem {\n /** GitHub last update timestamp (ISO 8601 format) */\n githubUpdateAt?: string;\n /** Unique numeric identifier for the plugin in the database */\n id: number;\n /** User ID of the plugin owner */\n ownerId: number;\n /** Publication status of the plugin */\n status: 'published' | 'unpublished' | 'archived';\n /** Visibility level controlling who can access the plugin */\n visibility: 'public' | 'private' | 'internal';\n}\n\n/**\n * Plugin version database model.\n * Represents a specific version of a plugin in the database.\n */\nexport interface PluginVersion {\n /** Creation timestamp (ISO 8601 format) */\n createdAt: string;\n /** Unique numeric identifier for the version */\n id: number;\n /** Whether this is the latest version of the plugin */\n isLatest: boolean;\n /** Whether this version has been validated by the system */\n isValidated: boolean;\n /** The full manifest data for this version */\n manifest: PluginManifest;\n /** URL to the manifest file, or null if stored directly */\n manifestUrl: string | null;\n /** Additional metadata for this version */\n meta: Record<string, any> | null;\n /** ID of the parent plugin */\n pluginId: number;\n /** Number of prompts provided by this version */\n promptsCount: number;\n /** Number of resources provided by this version */\n resourcesCount: number;\n /** Number of tools provided by this version */\n toolsCount: number;\n /** Last update timestamp (ISO 8601 format) */\n updatedAt: string;\n /** Semantic version string (e.g., \"1.0.0\") */\n version: string;\n}\n\n/**\n * Detailed admin plugin item with version history.\n * Used for displaying complete plugin information in the admin interface.\n */\nexport interface AdminPluginItemDetail extends Omit<AdminPluginItem, 'manifestUrl'> {\n /** Full manifest data for the current version */\n manifest: PluginManifest;\n /** List of all versions of this plugin */\n versions: PluginVersion[];\n}\n\n/**\n * Admin deployment option with database ID.\n * Extends the basic deployment option with a database identifier.\n */\nexport interface AdminDeploymentOption extends DeploymentOption {\n /** Unique numeric identifier for the deployment option */\n id: number;\n}\n\n/**\n * Admin system dependency with database ID.\n * Extends the basic system dependency with a database identifier.\n */\nexport interface AdminSystemDependency extends SystemDependency {\n /** Unique numeric identifier for the system dependency */\n id: number;\n}\n\n/**\n * Plugin version localization data.\n * Represents localized content for a specific plugin version in a particular language.\n */\nexport interface PluginVersionLocalization {\n /** Creation timestamp (ISO 8601 format) */\n createdAt: string;\n /** Localized description of the plugin */\n description: string;\n /** Unique numeric identifier for the localization */\n id: number;\n /** Language/locale code (e.g., 'en-US', 'zh-CN') */\n locale: string;\n /** Localized display name of the plugin */\n name: string;\n /** ID of the parent plugin version */\n pluginVersionId: number;\n /** Localized summary of the plugin */\n summary?: string;\n /** Array of localized tags for categorization and search */\n tags?: string[];\n}\n\n/**\n * 不完整i18n插件项\n * 表示pluginVersionLocalizations只有1个条目的插件\n */\nexport interface IncompleteI18nPlugin {\n /** 插件标识符 */\n identifier: string;\n /** 本地化条目数量 */\n localizationCount: number;\n /** 插件ID */\n pluginId: number;\n /** 插件版本 */\n version: string;\n}\n\n/**\n * Range Data Point Interface\n * Defines the structure for daily trend data points in analysis\n */\nexport interface RangeDataPoint {\n /** Current period count */\n count: number;\n /** Date in YYYY-MM-DD format */\n date: string;\n /** Previous period count for comparison */\n prevCount: number;\n}\n\n/**\n * Range Statistics Interface\n * Defines the structure for range-based statistics\n */\nexport interface RangeStats {\n /** Array of daily data points */\n data: RangeDataPoint[];\n /** Display configuration */\n display: string;\n /** Total sum for previous period */\n prevSum: number;\n /** Total sum for current period */\n sum: number;\n}\n\n/**\n * Range query parameters for trend analysis\n */\nexport interface RangeQuery {\n /** Display configuration */\n display: string;\n /** Optional previous period range for comparison */\n prevRange?: [string, string];\n /** Date range as [startDate, endDate] */\n range: [string, string];\n}\n","import { z } from 'zod';\n\nimport { MarketItemBase } from '../market';\nimport { PluginCapabilitiesSchema, PluginPrompt, PluginResource, PluginTool } from './capabilities';\nimport { DeploymentOption, PluginConnectionType } from './deploymentOption';\n\n/**\n * Plugin compatibility information.\n * Defines the compatibility requirements for a plugin with respect to app versions and platforms.\n */\nexport interface PluginCompatibility {\n /** Maximum app version the plugin is compatible with */\n maxAppVersion?: string;\n /** Minimum app version required to use the plugin */\n minAppVersion?: string;\n /** List of supported platforms (e.g., 'web', 'desktop', 'mobile') */\n platforms?: string[];\n}\n\n/**\n * Simplified plugin version information.\n * Contains minimal version data for plugin version lists.\n */\nexport interface PluginVersionSummary {\n /** Creation timestamp (ISO 8601 format) */\n createdAt: string;\n /** Whether this is the latest version of the plugin */\n isLatest: boolean;\n /** Whether this version has been validated by the system */\n isValidated: boolean;\n /** Semantic version string (e.g., \"1.0.0\") */\n version: string;\n}\n\n/**\n * Base plugin item schema with Zod validation.\n * Defines the structure and validation rules for plugin items in the marketplace.\n */\nexport const BasePluginItemSchema = z.object({\n author: z.string().optional(),\n capabilities: PluginCapabilitiesSchema,\n category: z.string().optional(),\n commentCount: z.number().default(0),\n connectionType: z.enum(['local', 'remote', 'hybrid']).optional(),\n createdAt: z.string(),\n description: z.string(),\n github: z\n .object({\n language: z.string().optional(),\n license: z.string().optional(),\n stars: z.number().optional(),\n url: z.string(),\n })\n .optional(),\n haveCloudEndpoint: z.boolean().optional(),\n homepage: z.string().optional(),\n icon: z.string().optional(),\n identifier: z.string(),\n installCount: z.number().default(0),\n isClaimed: z.boolean().default(false),\n isFeatured: z.boolean().default(false),\n isOfficial: z.boolean().default(false),\n isValidated: z.boolean().default(false),\n manifestUrl: z.string(),\n name: z.string(),\n promptsCount: z.number().optional(),\n ratingAverage: z.number().optional(),\n ratingCount: z.number().default(0),\n resourcesCount: z.number().optional(),\n toolsCount: z.number().optional(),\n updatedAt: z.string(),\n});\n\n/**\n * Plugin marketplace item definition.\n * Extends the base marketplace item with plugin-specific properties.\n * This interface represents a plugin as it appears in the marketplace listing.\n */\nexport interface MarketPluginItem extends MarketItemBase {\n /** Capabilities provided by this plugin */\n capabilities?: {\n /** Whether the plugin provides custom prompts */\n prompts: boolean;\n /** Whether the plugin provides resources (assets) */\n resources: boolean;\n /** Whether the plugin provides tools (functions) */\n tools: boolean;\n };\n /** Number of comments on this plugin */\n commentCount?: number;\n /** Connection type strategy for communicating with the plugin */\n connectionType?: PluginConnectionType;\n /** GitHub repository information */\n github?: {\n language?: string;\n license?: string;\n stars?: number;\n url: string;\n };\n /** Whether the plugin has a cloud endpoint available for official cloud-hosted deployment */\n haveCloudEndpoint?: boolean;\n /** Number of times this plugin has been installed */\n installCount?: number;\n /** Whether this plugin has been claimed by its original author */\n isClaimed?: boolean;\n /** Whether this plugin is featured in the marketplace */\n isFeatured?: boolean;\n /** Whether this plugin is officially maintained by LobeHub */\n isOfficial?: boolean;\n /** Whether this plugin has been validated by the system */\n isValidated?: boolean;\n /** Number of prompts provided by this plugin */\n promptsCount?: number;\n /** Average rating (typically 1-5 scale) */\n ratingAverage?: number;\n /** Number of ratings received */\n ratingCount?: number;\n /** Number of resources provided by this plugin */\n resourcesCount?: number;\n summary?: string;\n /** Number of tools provided by this plugin */\n toolsCount?: number;\n}\n\n/** Type alias for the base plugin item validated by Zod schema */\nexport type BasePluginItem = z.infer<typeof BasePluginItemSchema>;\n\n/**\n * Plugin manifest definition.\n * This is the complete specification of a plugin, including all its capabilities,\n * metadata, and deployment options.\n */\nexport interface PluginItemDetail extends Omit<MarketPluginItem, 'author' | 'manifestUrl'> {\n // 构建产物信息\n artifacts?: {\n docker?: {\n imageName?: string;\n tag?: string;\n };\n npm?: {\n packageName?: string;\n version?: string;\n };\n pypi?: {\n packageName?: string;\n version?: string;\n };\n };\n /** Author information */\n author?: {\n /** Author or organization name */\n name: string;\n /** URL to the author's website or profile */\n url?: string;\n };\n /** Connection type strategy for communicating with the plugin */\n connectionType?: PluginConnectionType;\n /** Available deployment options */\n deploymentOptions?: DeploymentOption[];\n /**\n * GitHub\n */\n github?: {\n language?: string;\n license?: string;\n stars?: number;\n url: string;\n };\n overview: {\n readme: string;\n summary?: string;\n };\n /** List of prompt templates provided by this plugin */\n prompts?: PluginPrompt[];\n /** List of resources provided by this plugin */\n resources?: PluginResource[];\n /** List of tools provided by this plugin */\n tools?: PluginTool[];\n\n /** Date when the plugin was created in the marketplace (ISO 8601 format) */\n validatedAt?: string;\n /** Semantic version string (e.g., \"1.0.0\") */\n version: string;\n /** List of all versions of this plugin with simplified information */\n versions: PluginVersionSummary[];\n}\n\n/**\n * Plugin manifest definition.\n * This is the complete specification of a plugin, including all its capabilities,\n * metadata, and deployment options.\n */\nexport interface PluginManifest extends Omit<MarketPluginItem, 'author' | 'manifestUrl'> {\n /** Author information */\n author?: {\n /** Author or organization name */\n name: string;\n /** URL to the author's website or profile */\n url?: string;\n };\n /** Available deployment options */\n deploymentOptions?: DeploymentOption[];\n overview?: {\n readme?: string;\n summary?: string;\n };\n /** List of prompt templates provided by this plugin */\n prompts?: PluginPrompt[];\n /** List of resources provided by this plugin */\n resources?: PluginResource[];\n /** List of tools provided by this plugin */\n tools?: PluginTool[];\n /** Date when the plugin was created in the marketplace (ISO 8601 format) */\n validatedAt?: string;\n /** Semantic version string (e.g., \"1.0.0\") */\n version: string;\n}\n","// Plugin capability definitions\nimport { z } from 'zod';\n\n/**\n * Schema defining the capabilities a plugin can provide.\n * Each capability is represented as a boolean flag.\n */\nexport const PluginCapabilitiesSchema = z.object({\n /** Whether the plugin provides custom prompts */\n prompts: z.boolean().default(false),\n /** Whether the plugin provides resources (assets) */\n resources: z.boolean().default(false),\n /** Whether the plugin provides tools (functions) */\n tools: z.boolean().default(false),\n});\n\n/**\n * Definition of a tool that a plugin can provide.\n * Tools are functions that can be called by the chat application.\n */\nexport interface PluginTool {\n /** Human-readable description of what the tool does */\n description?: string;\n /** JSON schema defining the expected input parameters */\n inputSchema?: Record<string, any>;\n /** Unique identifier for the tool within the plugin */\n name: string;\n}\n\n/**\n * Definition of a resource (asset) that a plugin can provide.\n * Resources can be images, data files, or other assets needed by the plugin.\n */\nexport interface PluginResource {\n /** MIME type of the resource (e.g., 'image/png', 'application/json') */\n mimeType?: string;\n /** Optional display name for the resource */\n name?: string;\n /** URI where the resource can be accessed */\n uri: string;\n}\n\n/**\n * Definition of an argument for a prompt template.\n * Arguments allow users to customize the prompt when using it.\n */\nexport interface PromptArgument {\n /** Human-readable description of the argument's purpose */\n description?: string;\n /** Argument identifier */\n name: string;\n /** Whether the argument must be provided (defaults to false if omitted) */\n required?: boolean;\n /** Data type of the argument (e.g., 'string', 'number') */\n type?: string;\n}\n\n/**\n * Definition of a prompt template that a plugin can provide.\n * Prompts are pre-defined templates that can be used in conversations.\n */\nexport interface PluginPrompt {\n /** List of customizable arguments for this prompt */\n arguments?: PromptArgument[];\n /** Human-readable description of what the prompt does */\n description: string;\n /** Unique identifier for the prompt within the plugin */\n name: string;\n}\n","import { z } from 'zod';\n\n/**\n * Connection types for plugin communication.\n * - http: The plugin communicates via HTTP protocol\n * - stdio: The plugin communicates via standard input/output\n */\nexport const ConnectionTypeEnum = z.enum(['http', 'stdio', 'sse']);\nexport type ConnectionType = z.infer<typeof ConnectionTypeEnum>;\n\n/**\n * Plugin connection types for overall plugin communication strategy.\n * - local: Plugin only supports local communication (stdio)\n * - remote: Plugin only supports remote communication (http)\n * - hybrid: Plugin supports both local and remote communication\n */\nexport const PluginConnectionTypeEnum = z.enum(['local', 'remote', 'hybrid']);\nexport type PluginConnectionType = z.infer<typeof PluginConnectionTypeEnum>;\n\n/**\n * Plugin installation methods.\n * Different ways to install and deploy a plugin.\n */\nexport const InstallationMethodEnum = z.enum([\n 'npm', // Node.js package manager\n 'go', // Go language\n 'python', // Python language\n 'docker', // Docker container\n 'git', // Git repository\n 'binaryUrl', // Direct binary download URL\n 'manual', // Manual installation with instructions\n 'none', // No installation required\n]);\nexport type InstallationMethod = z.infer<typeof InstallationMethodEnum>;\n\n/**\n * System dependency required by a plugin.\n * Defines a software dependency that must be installed on the system.\n */\nexport interface SystemDependency {\n /** Command to check if the dependency is installed */\n checkCommand?: string;\n /** Description of what this dependency is for */\n description?: string;\n /** Platform-specific installation instructions */\n installInstructions?: Record<string, string>;\n /** Name of the dependency */\n name: string;\n /** Minimum required version */\n requiredVersion?: string;\n /** Type of dependency (e.g., 'runtime', 'library') */\n type?: string;\n /** Whether version parsing is required to check compatibility */\n versionParsingRequired?: boolean;\n}\n\n/**\n * Connection configuration for a plugin.\n * Defines how the application should communicate with the plugin.\n */\nexport interface ConnectionConfig {\n /** Command-line arguments for the plugin process */\n args?: string[];\n /** Command to execute to start the plugin */\n command?: string;\n /**\n * JSON Schema 配置\n * 插件运行时需要的 configSchema\n */\n configSchema?: any;\n /** Type of connection (http or stdio) */\n type: ConnectionType;\n /** URL for HTTP-based plugins */\n url?: string;\n}\n\n/**\n * Details for installing a plugin.\n * Provides specific information needed during the installation process.\n */\nexport interface InstallationDetails {\n /** Package name for npm, pip, or other package managers */\n packageName?: string;\n /** Git repository URL to clone */\n repositoryUrlToClone?: string;\n /** Ordered list of setup steps to execute after installation */\n setupSteps?: string[];\n}\n\n/**\n * Deployment option for a plugin.\n * A plugin can offer multiple deployment options, each with different requirements.\n */\nexport interface DeploymentOption {\n /** Connection configuration for this deployment option */\n connection: ConnectionConfig;\n /** Human-readable description of this deployment option */\n description?: string;\n /** Detailed installation instructions */\n installationDetails?: InstallationDetails;\n /** Method used to install this plugin */\n installationMethod: string;\n /** Whether this is the recommended deployment option */\n isRecommended?: boolean;\n /** System dependencies required for this deployment option */\n systemDependencies?: SystemDependency[];\n}\n"],"mappings":";AACA,SAAS,KAAAA,UAAS;;;ACDlB,SAAS,KAAAC,UAAS;;;ACClB,SAAS,SAAS;AAMX,IAAM,2BAA2B,EAAE,OAAO;AAAA;AAAA,EAE/C,SAAS,EAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA;AAAA,EAElC,WAAW,EAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA;AAAA,EAEpC,OAAO,EAAE,QAAQ,EAAE,QAAQ,KAAK;AAClC,CAAC;;;ADwBM,IAAM,uBAAuBC,GAAE,OAAO;AAAA,EAC3C,QAAQA,GAAE,OAAO,EAAE,SAAS;AAAA,EAC5B,cAAc;AAAA,EACd,UAAUA,GAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,cAAcA,GAAE,OAAO,EAAE,QAAQ,CAAC;AAAA,EAClC,gBAAgBA,GAAE,KAAK,CAAC,SAAS,UAAU,QAAQ,CAAC,EAAE,SAAS;AAAA,EAC/D,WAAWA,GAAE,OAAO;AAAA,EACpB,aAAaA,GAAE,OAAO;AAAA,EACtB,QAAQA,GACL,OAAO;AAAA,IACN,UAAUA,GAAE,OAAO,EAAE,SAAS;AAAA,IAC9B,SAASA,GAAE,OAAO,EAAE,SAAS;AAAA,IAC7B,OAAOA,GAAE,OAAO,EAAE,SAAS;AAAA,IAC3B,KAAKA,GAAE,OAAO;AAAA,EAChB,CAAC,EACA,SAAS;AAAA,EACZ,mBAAmBA,GAAE,QAAQ,EAAE,SAAS;AAAA,EACxC,UAAUA,GAAE,OAAO,EAAE,SAAS;AAAA,EAC9B,MAAMA,GAAE,OAAO,EAAE,SAAS;AAAA,EAC1B,YAAYA,GAAE,OAAO;AAAA,EACrB,cAAcA,GAAE,OAAO,EAAE,QAAQ,CAAC;AAAA,EAClC,WAAWA,GAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA,EACpC,YAAYA,GAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA,EACrC,YAAYA,GAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA,EACrC,aAAaA,GAAE,QAAQ,EAAE,QAAQ,KAAK;AAAA,EACtC,aAAaA,GAAE,OAAO;AAAA,EACtB,MAAMA,GAAE,OAAO;AAAA,EACf,cAAcA,GAAE,OAAO,EAAE,SAAS;AAAA,EAClC,eAAeA,GAAE,OAAO,EAAE,SAAS;AAAA,EACnC,aAAaA,GAAE,OAAO,EAAE,QAAQ,CAAC;AAAA,EACjC,gBAAgBA,GAAE,OAAO,EAAE,SAAS;AAAA,EACpC,YAAYA,GAAE,OAAO,EAAE,SAAS;AAAA,EAChC,WAAWA,GAAE,OAAO;AACtB,CAAC;;;AD7DM,IAAM,wBAAwB,qBAAqB,OAAO;AAAA;AAAA,EAE/D,QAAQC,GAAE,KAAK,CAAC,aAAa,eAAe,YAAY,YAAY,CAAU;AAAA;AAAA,EAE9E,YAAYA,GAAE,KAAK,CAAC,UAAU,WAAW,UAAU,CAAU;AAC/D,CAAC;;;AGfD,SAAS,KAAAC,UAAS;AAOX,IAAM,qBAAqBA,GAAE,KAAK,CAAC,QAAQ,SAAS,KAAK,CAAC;AAS1D,IAAM,2BAA2BA,GAAE,KAAK,CAAC,SAAS,UAAU,QAAQ,CAAC;AAOrE,IAAM,yBAAyBA,GAAE,KAAK;AAAA,EAC3C;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AAAA,EACA;AAAA;AACF,CAAC;","names":["z","z","z","z","z"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/market-types",
3
- "version": "1.11.4",
3
+ "version": "1.12.0",
4
4
  "keywords": [
5
5
  "lobehub",
6
6
  "market",
@@ -25,4 +25,4 @@
25
25
  "dependencies": {
26
26
  "zod": "^3.22.4"
27
27
  }
28
- }
28
+ }