@lobehub/market-types 1.3.0 → 1.4.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
@@ -39,6 +39,14 @@ interface MarketItemBase {
39
39
  */
40
40
  declare const ConnectionTypeEnum: z.ZodEnum<["http", "stdio"]>;
41
41
  type ConnectionType = z.infer<typeof ConnectionTypeEnum>;
42
+ /**
43
+ * Plugin connection types for overall plugin communication strategy.
44
+ * - local: Plugin only supports local communication (stdio)
45
+ * - remote: Plugin only supports remote communication (http)
46
+ * - hybrid: Plugin supports both local and remote communication
47
+ */
48
+ declare const PluginConnectionTypeEnum: z.ZodEnum<["local", "remote", "hybrid"]>;
49
+ type PluginConnectionType = z.infer<typeof PluginConnectionTypeEnum>;
42
50
  /**
43
51
  * Plugin installation methods.
44
52
  * Different ways to install and deploy a plugin.
@@ -198,6 +206,20 @@ interface PluginCompatibility {
198
206
  /** List of supported platforms (e.g., 'web', 'desktop', 'mobile') */
199
207
  platforms?: string[];
200
208
  }
209
+ /**
210
+ * Simplified plugin version information.
211
+ * Contains minimal version data for plugin version lists.
212
+ */
213
+ interface PluginVersionSummary {
214
+ /** Creation timestamp (ISO 8601 format) */
215
+ createdAt: string;
216
+ /** Whether this is the latest version of the plugin */
217
+ isLatest: boolean;
218
+ /** Whether this version has been validated by the system */
219
+ isValidated: boolean;
220
+ /** Semantic version string (e.g., "1.0.0") */
221
+ version: string;
222
+ }
201
223
  /**
202
224
  * Base plugin item schema with Zod validation.
203
225
  * Defines the structure and validation rules for plugin items in the marketplace.
@@ -352,6 +374,8 @@ interface PluginItemDetail extends Omit<MarketPluginItem, 'author' | 'manifestUr
352
374
  /** URL to the author's website or profile */
353
375
  url?: string;
354
376
  };
377
+ /** Connection type strategy for communicating with the plugin */
378
+ connectionType?: PluginConnectionType;
355
379
  /** Available deployment options */
356
380
  deploymentOptions?: DeploymentOption[];
357
381
  /**
@@ -377,7 +401,8 @@ interface PluginItemDetail extends Omit<MarketPluginItem, 'author' | 'manifestUr
377
401
  validatedAt?: string;
378
402
  /** Semantic version string (e.g., "1.0.0") */
379
403
  version: string;
380
- versions: any[];
404
+ /** List of all versions of this plugin with simplified information */
405
+ versions: PluginVersionSummary[];
381
406
  }
382
407
  /**
383
408
  * Plugin manifest definition.
@@ -404,7 +429,6 @@ interface PluginManifest extends Omit<MarketPluginItem, 'author' | 'manifestUrl'
404
429
  validatedAt?: string;
405
430
  /** Semantic version string (e.g., "1.0.0") */
406
431
  version: string;
407
- versions: string[];
408
432
  }
409
433
 
410
434
  /**
@@ -580,4 +604,4 @@ interface AdminSystemDependency extends SystemDependency {
580
604
  id: number;
581
605
  }
582
606
 
583
- export { type AdminDeploymentOption, type AdminPluginItem, type AdminPluginItemDetail, AdminPluginItemSchema, type AdminSystemDependency, type BasePluginItem, BasePluginItemSchema, type ConnectionConfig, type ConnectionType, ConnectionTypeEnum, type DeploymentOption, type InstallationDetails, type InstallationMethod, InstallationMethodEnum, type MarketItemBase, type MarketPluginItem, PluginCapabilitiesSchema, type PluginCompatibility, type PluginItemDetail, type PluginManifest, type PluginPrompt, type PluginResource, type PluginTool, type PluginVersion, type PromptArgument, type SystemDependency };
607
+ export { type AdminDeploymentOption, type AdminPluginItem, type AdminPluginItemDetail, AdminPluginItemSchema, type AdminSystemDependency, type BasePluginItem, BasePluginItemSchema, type ConnectionConfig, type ConnectionType, ConnectionTypeEnum, type DeploymentOption, type InstallationDetails, type InstallationMethod, InstallationMethodEnum, type MarketItemBase, type MarketPluginItem, PluginCapabilitiesSchema, type PluginCompatibility, type PluginConnectionType, PluginConnectionTypeEnum, type PluginItemDetail, type PluginManifest, type PluginPrompt, type PluginResource, type PluginTool, type PluginVersion, type PluginVersionSummary, type PromptArgument, type SystemDependency };
package/dist/index.mjs CHANGED
@@ -51,6 +51,7 @@ var AdminPluginItemSchema = BasePluginItemSchema.extend({
51
51
  // src/plugin/deploymentOption.ts
52
52
  import { z as z4 } from "zod";
53
53
  var ConnectionTypeEnum = z4.enum(["http", "stdio"]);
54
+ var PluginConnectionTypeEnum = z4.enum(["local", "remote", "hybrid"]);
54
55
  var InstallationMethodEnum = z4.enum([
55
56
  "npm",
56
57
  // Node.js package manager
@@ -74,6 +75,7 @@ export {
74
75
  BasePluginItemSchema,
75
76
  ConnectionTypeEnum,
76
77
  InstallationMethodEnum,
77
- PluginCapabilitiesSchema
78
+ PluginCapabilitiesSchema,
79
+ PluginConnectionTypeEnum
78
80
  };
79
81
  //# sourceMappingURL=index.mjs.map
@@ -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","import { z } from 'zod';\n\nimport { MarketItemBase } from '../market';\nimport { PluginCapabilitiesSchema, PluginPrompt, PluginResource, PluginTool } from './capabilities';\nimport { DeploymentOption } 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 * 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 createdAt: z.string(),\n description: z.string(),\n homepage: z.string().optional(),\n icon: z.string().optional(),\n identifier: z.string(),\n installCount: z.number().default(0),\n isFeatured: 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 tags: z.array(z.string()).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 /** Number of times this plugin has been installed */\n installCount?: number;\n /** Whether this plugin is featured in the marketplace */\n isFeatured?: 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 /** 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 /** 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 versions: any[];\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 /** 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 versions: 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 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;;;ADSM,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,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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 /** 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","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 createdAt: z.string(),\n description: z.string(),\n homepage: z.string().optional(),\n icon: z.string().optional(),\n identifier: z.string(),\n installCount: z.number().default(0),\n isFeatured: 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 tags: z.array(z.string()).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 /** Number of times this plugin has been installed */\n installCount?: number;\n /** Whether this plugin is featured in the marketplace */\n isFeatured?: 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 /** 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 /** 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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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.3.0",
3
+ "version": "1.4.0",
4
4
  "keywords": [
5
5
  "lobehub",
6
6
  "market",