@philcrp/market-types 1.0.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/README.md ADDED
@@ -0,0 +1,102 @@
1
+ # LobeHub Market Types
2
+
3
+ [![NPM version](https://img.shields.io/npm/v/@lobehub/market-sdk.svg?style=flat)](https://npmjs.org/package/@lobehub/market-types)
4
+ [![NPM downloads](https://img.shields.io/npm/dm/@lobehub/market-sdk.svg?style=flat)](https://npmjs.org/package/@lobehub/market-types)
5
+
6
+ This package contains TypeScript type definitions for the LobeHub Market ecosystem. It provides a comprehensive set of interfaces and type definitions that are shared between the API server and client applications.
7
+
8
+ ## Overview
9
+
10
+ The type definitions in this package are organized into the following categories:
11
+
12
+ - **Market Base Types**: Common type definitions used across all marketplace items
13
+ - **Plugin Types**: Types related to plugins, their capabilities, and deployment options
14
+ - **Agent Types**: Types related to AI agents and their features
15
+
16
+ ## Installation
17
+
18
+ ```bash
19
+ npm install @lobehub/market-types
20
+ # or
21
+ yarn add @lobehub/market-types
22
+ # or
23
+ pnpm add @lobehub/market-types
24
+ ```
25
+
26
+ ## Usage
27
+
28
+ Import the types you need in your TypeScript files:
29
+
30
+ ```typescript
31
+ import { AgentItem, MarketItemBase, PluginManifest } from '@lobehub/market-types';
32
+
33
+ // Use the types in your code
34
+ const plugin: PluginManifest = {
35
+ id: 'my-plugin',
36
+ name: 'My Plugin',
37
+ description: 'A sample plugin',
38
+ version: '1.0.0',
39
+ // ...other properties
40
+ };
41
+ ```
42
+
43
+ ## Type Categories
44
+
45
+ ### Market Base Types
46
+
47
+ The `MarketItemBase` interface defines the common properties shared by all marketplace items:
48
+
49
+ ```typescript
50
+ interface MarketItemBase {
51
+ author?: string;
52
+ category?: string;
53
+ description: string;
54
+ identifier: string;
55
+ name: string;
56
+ // ...other properties
57
+ }
58
+ ```
59
+
60
+ ### Plugin Types
61
+
62
+ Plugin-related types include:
63
+
64
+ - `PluginManifest`: Complete specification of a plugin
65
+ - `PluginTool`: Definition of a tool provided by a plugin
66
+ - `PluginPrompt`: Definition of a prompt template
67
+ - `PluginResource`: Definition of a resource provided by a plugin
68
+ - `DeploymentOption`: Deployment configuration for a plugin
69
+
70
+ ### Agent Types
71
+
72
+ Agent-related types include:
73
+
74
+ - `AgentItem`: Definition of an agent in the marketplace
75
+
76
+ ## Structure
77
+
78
+ ```
79
+ src/
80
+ ├── market.ts - Base marketplace item types
81
+ ├── agent/ - Agent-related types
82
+ │ └── index.ts - Agent type definitions
83
+ ├── plugin/ - Plugin-related types
84
+ │ ├── admin.ts - Admin-specific plugin types
85
+ │ ├── capabilities.ts - Plugin capability types
86
+ │ ├── deploymentOption.ts - Deployment option types
87
+ │ ├── plugin.ts - Core plugin types
88
+ │ └── index.ts - Plugin exports
89
+ └── index.ts - Package exports
90
+ ```
91
+
92
+ ## Development
93
+
94
+ To build the package:
95
+
96
+ ```bash
97
+ pnpm build
98
+ ```
99
+
100
+ ## License
101
+
102
+ MIT