@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.
@@ -0,0 +1,2197 @@
1
+ import { z } from 'zod';
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
+ * Single entry in a marketplace sitemap (identifier + last modified).
64
+ */
65
+ interface SitemapItem {
66
+ /** Resource identifier (slug) */
67
+ identifier: string;
68
+ /** Last modification time (ISO 8601) */
69
+ lastModified: string;
70
+ }
71
+ /**
72
+ * Paginated sitemap response for agents, plugins, or skills.
73
+ */
74
+ interface SitemapResponse {
75
+ /** Current page number (1-based) */
76
+ currentPage: number;
77
+ /** Items on this page */
78
+ items: SitemapItem[];
79
+ /** Page size used for this response */
80
+ pageSize: number;
81
+ /** Total number of published items */
82
+ totalCount: number;
83
+ /** Total number of pages */
84
+ totalPages: number;
85
+ }
86
+
87
+ /**
88
+ * Agent event tracking types
89
+ *
90
+ * These types describe the payload used when recording user agent events such as
91
+ * adding, chatting with, or clicking an agent card.
92
+ */
93
+ type AgentEventType = 'add' | 'chat' | 'click';
94
+ /** Payload for recording an agent event */
95
+ interface AgentEventRequest {
96
+ /** Event name */
97
+ event: AgentEventType;
98
+ /** Agent identifier */
99
+ identifier: string;
100
+ /** Optional event source */
101
+ source?: string;
102
+ }
103
+
104
+ /**
105
+ * Agent resource item definition that extends the base marketplace structure.
106
+ *
107
+ * Agents represent AI personalities or specialized assistants that can be installed
108
+ * from the marketplace. They include the base properties of marketplace items along
109
+ * with any agent-specific properties.
110
+ */
111
+ interface AgentItem extends MarketItemBase {
112
+ /** Optional agent capabilities and features */
113
+ capabilities?: {
114
+ /** Whether the agent supports memory/history */
115
+ memory?: boolean;
116
+ /** Whether the agent supports additional tools */
117
+ tools?: boolean;
118
+ };
119
+ }
120
+ /**
121
+ * Query parameters for listing agents in the marketplace.
122
+ * Mirrors SkillListQuery and PluginListQuery in structure for consistency.
123
+ *
124
+ * Named AgentMarketListQuery (not AgentListQuery) to avoid collision with the
125
+ * SDK's own AgentListQuery which contains additional SDK-specific fields.
126
+ */
127
+ interface AgentMarketListQuery {
128
+ /** Filter by category */
129
+ category?: string;
130
+ /** Filter by agents with skills/plugins attached */
131
+ haveSkills?: boolean;
132
+ /** Filter by official status */
133
+ isOfficial?: 'false' | 'true';
134
+ /** Locale for localized content */
135
+ locale?: string;
136
+ /** Filter by namespace */
137
+ namespace?: string;
138
+ /** Sort direction */
139
+ order?: 'asc' | 'desc';
140
+ /** Filter by owner ID */
141
+ ownerId?: number;
142
+ /** Page number (1-based) */
143
+ page?: number;
144
+ /** Number of items per page */
145
+ pageSize?: number;
146
+ /** Search query string */
147
+ q?: string;
148
+ /** Sort field */
149
+ sort?: 'createdAt' | 'knowledgeCount' | 'mostUsage' | 'name' | 'pluginCount' | 'recommended' | 'relevance' | 'tokenUsage' | 'updatedAt';
150
+ /** Publication status filter */
151
+ status?: 'all' | 'archived' | 'deprecated' | 'published' | 'unpublished';
152
+ /** Visibility filter */
153
+ visibility?: 'all' | 'internal' | 'private' | 'public';
154
+ }
155
+
156
+ /**
157
+ * Top Plugin Interface
158
+ * Unified interface for top plugins data
159
+ */
160
+ interface TopPlugin {
161
+ avatar: string;
162
+ /** Call count (when sortBy is 'calls') */
163
+ callCount?: number;
164
+ category: string;
165
+ identifier: string;
166
+ /** Install count (when sortBy is 'installs') */
167
+ installCount?: number;
168
+ name: string;
169
+ }
170
+ /**
171
+ * Sort options for top plugins
172
+ */
173
+ type PluginSortBy = 'installs' | 'calls';
174
+ /**
175
+ * Top plugins query parameters
176
+ */
177
+ interface TopPluginsQuery {
178
+ /** Maximum number of plugins to return */
179
+ limit?: number;
180
+ /** Date range as [startDate, endDate] */
181
+ range: [string, string];
182
+ /** Sort criteria: 'installs' or 'calls' */
183
+ sortBy?: PluginSortBy;
184
+ }
185
+ /**
186
+ * Install Failure Analysis Interface
187
+ * Defines the structure for plugin install failure analysis data
188
+ */
189
+ interface InstallFailureAnalysis {
190
+ /** Number of failed installation attempts */
191
+ failureCount: number;
192
+ /** Failure rate as a decimal (e.g., 0.2736 for 27.36%) */
193
+ failureRate: number;
194
+ /** Most common error message for this plugin */
195
+ mostCommonError: string;
196
+ /** Plugin identifier */
197
+ pluginIdentifier: string;
198
+ /** Plugin display name */
199
+ pluginName: string;
200
+ /** Total number of installation attempts (successful + failed) */
201
+ totalInstallAttempts: number;
202
+ }
203
+ /**
204
+ * Install failure analysis query parameters
205
+ */
206
+ interface InstallFailureAnalysisQuery {
207
+ /** Maximum number of plugins to return */
208
+ limit?: number;
209
+ /** Date range as [startDate, endDate] */
210
+ range: [string, string];
211
+ }
212
+
213
+ /**
214
+ * Standard Credential Keys
215
+ *
216
+ * Pre-defined credential key catalog for common providers.
217
+ * Skill authors should prefer these standard keys over custom ones.
218
+ *
219
+ * Rules:
220
+ * 1. `key` represents a capability, not a final env variable name.
221
+ * 2. Same provider with different auth methods should have different keys.
222
+ * 3. Custom keys are allowed but standard keys should be preferred.
223
+ */
224
+ declare const StandardCredKeys: {
225
+ readonly ANTHROPIC: "anthropic";
226
+ readonly COHERE: "cohere";
227
+ readonly DEEPSEEK: "deepseek";
228
+ readonly GOOGLE_AI: "google-ai";
229
+ readonly GROQ: "groq";
230
+ readonly HUGGINGFACE: "huggingface";
231
+ readonly MISTRAL: "mistral";
232
+ readonly OPENAI: "openai";
233
+ readonly PERPLEXITY: "perplexity";
234
+ readonly REPLICATE: "replicate";
235
+ readonly AWS: "aws";
236
+ readonly AZURE: "azure";
237
+ readonly CLOUDFLARE: "cloudflare";
238
+ readonly FIREBASE_SA: "firebase-sa";
239
+ readonly GCP_SA: "gcp-sa";
240
+ readonly SUPABASE: "supabase";
241
+ readonly VERCEL: "vercel";
242
+ readonly BITBUCKET_PAT: "bitbucket-pat";
243
+ readonly GITHUB_OAUTH: "github-oauth";
244
+ readonly GITHUB_PAT: "github-pat";
245
+ readonly GITLAB_PAT: "gitlab-pat";
246
+ readonly DISCORD_BOT: "discord-bot";
247
+ readonly DISCORD_WEBHOOK: "discord-webhook";
248
+ readonly SENDGRID: "sendgrid";
249
+ readonly SLACK_OAUTH: "slack-oauth";
250
+ readonly SLACK_WEBHOOK: "slack-webhook";
251
+ readonly TWILIO: "twilio";
252
+ readonly AIRTABLE: "airtable";
253
+ readonly MONGODB: "mongodb";
254
+ readonly PLANETSCALE: "planetscale";
255
+ readonly REDIS: "redis";
256
+ readonly STRIPE: "stripe";
257
+ readonly JIRA_PAT: "jira-pat";
258
+ readonly LINEAR_OAUTH: "linear-oauth";
259
+ readonly NOTION_OAUTH: "notion-oauth";
260
+ readonly NOTION_PAT: "notion-pat";
261
+ };
262
+ type StandardCredKey = (typeof StandardCredKeys)[keyof typeof StandardCredKeys];
263
+
264
+ /**
265
+ * Creds Domain Types
266
+ *
267
+ * Shared types for the Credential system used by Market API and SDK.
268
+ */
269
+
270
+ /**
271
+ * Credential type taxonomy:
272
+ * - `kv-env`: Key-value pairs injected as environment variables
273
+ * - `kv-header`: Key-value pairs injected as HTTP headers (not supported in sandbox)
274
+ * - `oauth`: OAuth connection reference (reuses existing Connect system)
275
+ * - `file`: Encrypted file stored in object storage
276
+ */
277
+ type CredType = 'file' | 'kv-env' | 'kv-header' | 'oauth';
278
+ /**
279
+ * Config for `kv-env` type credentials
280
+ */
281
+ interface KVEnvCredConfig {
282
+ /**
283
+ * Optional mapping from payload keys to environment variable names.
284
+ * If not specified, payload keys are used as-is (uppercased).
285
+ * Example: { "OPENAI_API_KEY": "MY_OPENAI_KEY" }
286
+ */
287
+ envMapping?: Record<string, string>;
288
+ }
289
+ /**
290
+ * Config for `kv-header` type credentials
291
+ */
292
+ interface KVHeaderCredConfig {
293
+ /**
294
+ * Mapping from payload keys to HTTP header names.
295
+ * Example: { "API_KEY": "Authorization" }
296
+ */
297
+ headerMapping?: Record<string, string>;
298
+ }
299
+ /**
300
+ * Config for `oauth` type credentials
301
+ */
302
+ interface OAuthCredConfig {
303
+ /**
304
+ * OAuth provider ID (e.g., 'github', 'linear', 'google')
305
+ * Must match a provider registered in the Connect system.
306
+ */
307
+ providerId: string;
308
+ /**
309
+ * Required OAuth scopes for this credential.
310
+ */
311
+ scopes?: string[];
312
+ }
313
+ /**
314
+ * Config for `file` type credentials
315
+ */
316
+ interface FileCredConfig {
317
+ /**
318
+ * Allowed MIME types for the file.
319
+ * Example: ['application/json', 'application/x-pem-file']
320
+ */
321
+ allowedMimeTypes?: string[];
322
+ /**
323
+ * Environment variable name to inject the file path.
324
+ * Example: "GOOGLE_APPLICATION_CREDENTIALS"
325
+ */
326
+ filePathEnvName?: string;
327
+ /**
328
+ * Maximum file size in bytes.
329
+ */
330
+ maxSizeBytes?: number;
331
+ }
332
+ /**
333
+ * Union type for credential configs based on type
334
+ */
335
+ type CredConfig = FileCredConfig | KVEnvCredConfig | KVHeaderCredConfig | OAuthCredConfig;
336
+ /**
337
+ * Skill's declaration of required credentials.
338
+ * Stored in `skills.creds` JSONB column.
339
+ */
340
+ interface SkillCredDeclaration {
341
+ /**
342
+ * Type-specific configuration
343
+ */
344
+ config?: CredConfig;
345
+ /**
346
+ * Human-readable description of what this credential is used for
347
+ */
348
+ description?: string;
349
+ /**
350
+ * Unique key identifying this credential requirement.
351
+ * Should use StandardCredKeys when possible.
352
+ * Examples: 'github-pat', 'openai', 'gcp-sa'
353
+ */
354
+ key: string;
355
+ /**
356
+ * Display name for the credential
357
+ */
358
+ name: string;
359
+ /**
360
+ * Whether this credential is required for the skill to function
361
+ */
362
+ required: boolean;
363
+ /**
364
+ * Credential type
365
+ */
366
+ type: CredType;
367
+ }
368
+ /**
369
+ * User credential summary (masked, safe to return to frontend)
370
+ */
371
+ interface UserCredSummary {
372
+ createdAt: string;
373
+ description?: string;
374
+ /**
375
+ * For file type: original file name
376
+ */
377
+ fileName?: string;
378
+ /**
379
+ * For file type: file size in bytes
380
+ */
381
+ fileSize?: number;
382
+ id: number;
383
+ key: string;
384
+ lastUsedAt?: string;
385
+ /**
386
+ * Additional non-sensitive metadata
387
+ */
388
+ manifest?: Record<string, unknown>;
389
+ /**
390
+ * Masked preview of the credential value.
391
+ * Examples: "sk-****xxxx", "Connected to @octocat", "service-account.json"
392
+ */
393
+ maskedPreview?: string;
394
+ name: string;
395
+ /**
396
+ * For oauth type: provider avatar URL
397
+ */
398
+ oauthAvatar?: string;
399
+ /**
400
+ * For oauth type: provider ID
401
+ */
402
+ oauthProvider?: string;
403
+ /**
404
+ * For oauth type: provider username
405
+ */
406
+ oauthUsername?: string;
407
+ type: CredType;
408
+ updatedAt: string;
409
+ }
410
+ /**
411
+ * Status of a skill's credential requirement for a specific user
412
+ */
413
+ interface SkillCredStatus {
414
+ /**
415
+ * The bound credential if satisfied
416
+ */
417
+ boundCred?: UserCredSummary;
418
+ description?: string;
419
+ key: string;
420
+ name: string;
421
+ required: boolean;
422
+ /**
423
+ * Whether the user has provided this credential
424
+ */
425
+ satisfied: boolean;
426
+ type: CredType;
427
+ }
428
+ /**
429
+ * Decrypted payload structure for kv-env and kv-header types.
430
+ * Supports multiple key-value pairs in a single credential.
431
+ */
432
+ interface KVPayload {
433
+ /**
434
+ * Key-value pairs to inject.
435
+ * Example: { "OPENAI_API_KEY": "sk-xxx", "OPENAI_ORG_ID": "org-xxx" }
436
+ */
437
+ values: Record<string, string>;
438
+ }
439
+ /**
440
+ * Request payload for explicit credential injection (by key list)
441
+ */
442
+ interface InjectCredsRequest {
443
+ /**
444
+ * List of credential keys to inject.
445
+ * Each key should match a user's credential key.
446
+ */
447
+ keys: string[];
448
+ /**
449
+ * Whether this is a sandbox environment (default: true).
450
+ * When true, kv-header type credentials will be skipped.
451
+ */
452
+ sandbox?: boolean;
453
+ /**
454
+ * Topic/conversation ID for session isolation.
455
+ * Required to identify the sandbox session.
456
+ */
457
+ topicId: string;
458
+ /**
459
+ * User ID for session isolation.
460
+ * Required to identify the sandbox session.
461
+ */
462
+ userId: string;
463
+ }
464
+ /**
465
+ * File credential info in injection response
466
+ */
467
+ interface InjectedFileInfo {
468
+ /**
469
+ * File content URL (S3 URL, needs to be fetched)
470
+ */
471
+ content: string;
472
+ /**
473
+ * Environment variable name for the file path (if specified)
474
+ */
475
+ envName?: string;
476
+ /**
477
+ * Original file name
478
+ */
479
+ fileName: string;
480
+ /**
481
+ * Credential key
482
+ */
483
+ key: string;
484
+ /**
485
+ * File MIME type
486
+ */
487
+ mimeType: string;
488
+ }
489
+ /**
490
+ * Response payload for credential injection
491
+ */
492
+ interface InjectCredsResponse {
493
+ credentials: {
494
+ /**
495
+ * Environment variables to inject
496
+ */
497
+ env: Record<string, string>;
498
+ /**
499
+ * Files to write (for sandbox environments)
500
+ */
501
+ files: InjectedFileInfo[];
502
+ /**
503
+ * HTTP headers to inject (not supported in sandbox)
504
+ */
505
+ headers: Record<string, string>;
506
+ };
507
+ /**
508
+ * Keys that were requested but not found
509
+ */
510
+ notFound: string[];
511
+ /**
512
+ * Whether all requested keys were found and injected
513
+ */
514
+ success: boolean;
515
+ /**
516
+ * Credentials that cannot be injected in sandbox environment (kv-header type)
517
+ */
518
+ unsupportedInSandbox: string[];
519
+ }
520
+ /**
521
+ * Request payload for skill-based credential injection
522
+ */
523
+ interface InjectCredsForSkillRequest {
524
+ /**
525
+ * Whether this is a sandbox environment (default: true).
526
+ * When true, kv-header type credentials will be skipped.
527
+ */
528
+ sandbox?: boolean;
529
+ /**
530
+ * Skill identifier to inject credentials for
531
+ */
532
+ skillIdentifier: string;
533
+ /**
534
+ * Topic/conversation ID for session isolation.
535
+ * Required to identify the sandbox session.
536
+ */
537
+ topicId: string;
538
+ /**
539
+ * User ID for session isolation.
540
+ * Required to identify the sandbox session.
541
+ */
542
+ userId: string;
543
+ }
544
+ /**
545
+ * Response payload for skill-based credential injection
546
+ */
547
+ interface InjectCredsForSkillResponse {
548
+ credentials: {
549
+ /**
550
+ * Environment variables to inject
551
+ */
552
+ env: Record<string, string>;
553
+ /**
554
+ * Files to write (for sandbox environments)
555
+ */
556
+ files: InjectedFileInfo[];
557
+ /**
558
+ * HTTP headers to inject (not supported in sandbox)
559
+ */
560
+ headers: Record<string, string>;
561
+ };
562
+ /**
563
+ * Required credentials that are missing
564
+ */
565
+ missing: Array<{
566
+ key: string;
567
+ name: string;
568
+ type: CredType;
569
+ }>;
570
+ /**
571
+ * Whether all required credentials are satisfied
572
+ */
573
+ success: boolean;
574
+ /**
575
+ * Credentials that cannot be injected in sandbox environment (kv-header type)
576
+ */
577
+ unsupportedInSandbox: string[];
578
+ }
579
+
580
+ /**
581
+ * MCP (Model Context Protocol) Type Definitions
582
+ *
583
+ * This file contains type definitions for the MCP protocol used in cloud gateway functionality.
584
+ */
585
+ /**
586
+ * Content item in MCP tool response
587
+ */
588
+ interface McpToolContent {
589
+ /** Additional data for other types */
590
+ data?: string;
591
+ /** Error message for error type */
592
+ message?: string;
593
+ /** MIME type of the content */
594
+ mimeType?: string;
595
+ /** Text content for text/error types */
596
+ text?: string;
597
+ /** Content type */
598
+ type: 'text' | 'error' | 'image' | 'resource';
599
+ }
600
+ /**
601
+ * Cloud Gateway Request Interface
602
+ */
603
+ interface CloudGatewayRequest {
604
+ /** Tool parameters payload */
605
+ apiParams: Record<string, any>;
606
+ /** Plugin unique identifier */
607
+ identifier: string;
608
+ /** Tool name to invoke */
609
+ toolName: string;
610
+ }
611
+ /**
612
+ * Cloud Gateway Response Interface
613
+ */
614
+ interface CloudGatewayResponse {
615
+ /** Array of content items returned by the tool */
616
+ content: McpToolContent[];
617
+ /** Whether this result represents an error */
618
+ isError?: boolean;
619
+ }
620
+ /**
621
+ * Error response for cloud gateway
622
+ */
623
+ interface CloudGatewayErrorResponse {
624
+ /** Error code (optional) */
625
+ code?: string;
626
+ /** Additional error details */
627
+ details?: any;
628
+ /** Error message */
629
+ message: string;
630
+ }
631
+
632
+ /**
633
+ * Connection types for plugin communication.
634
+ * - http: The plugin communicates via HTTP protocol
635
+ * - stdio: The plugin communicates via standard input/output
636
+ */
637
+ declare const ConnectionTypeEnum: z.ZodEnum<["http", "stdio", "sse"]>;
638
+ type ConnectionType = z.infer<typeof ConnectionTypeEnum>;
639
+ /**
640
+ * Plugin connection types for overall plugin communication strategy.
641
+ * - local: Plugin only supports local communication (stdio)
642
+ * - remote: Plugin only supports remote communication (http)
643
+ * - hybrid: Plugin supports both local and remote communication
644
+ */
645
+ declare const PluginConnectionTypeEnum: z.ZodEnum<["local", "remote", "hybrid"]>;
646
+ type PluginConnectionType = z.infer<typeof PluginConnectionTypeEnum>;
647
+ /**
648
+ * Plugin installation methods.
649
+ * Different ways to install and deploy a plugin.
650
+ */
651
+ declare const InstallationMethodEnum: z.ZodEnum<["npm", "go", "python", "docker", "git", "binaryUrl", "manual", "none"]>;
652
+ type InstallationMethod = z.infer<typeof InstallationMethodEnum>;
653
+ /**
654
+ * System dependency required by a plugin.
655
+ * Defines a software dependency that must be installed on the system.
656
+ */
657
+ interface SystemDependency {
658
+ /** Command to check if the dependency is installed */
659
+ checkCommand?: string;
660
+ /** Description of what this dependency is for */
661
+ description?: string;
662
+ /** Platform-specific installation instructions */
663
+ installInstructions?: Record<string, string>;
664
+ /** Name of the dependency */
665
+ name: string;
666
+ /** Minimum required version */
667
+ requiredVersion?: string;
668
+ /** Type of dependency (e.g., 'runtime', 'library') */
669
+ type?: string;
670
+ /** Whether version parsing is required to check compatibility */
671
+ versionParsingRequired?: boolean;
672
+ }
673
+ /**
674
+ * Connection configuration for a plugin.
675
+ * Defines how the application should communicate with the plugin.
676
+ */
677
+ interface ConnectionConfig {
678
+ /** Command-line arguments for the plugin process */
679
+ args?: string[];
680
+ /** Command to execute to start the plugin */
681
+ command?: string;
682
+ /**
683
+ * JSON Schema 配置
684
+ * 插件运行时需要的 configSchema
685
+ */
686
+ configSchema?: any;
687
+ /** Type of connection (http or stdio) */
688
+ type: ConnectionType;
689
+ /** URL for HTTP-based plugins */
690
+ url?: string;
691
+ }
692
+ /**
693
+ * Details for installing a plugin.
694
+ * Provides specific information needed during the installation process.
695
+ */
696
+ interface InstallationDetails {
697
+ /** Package name for npm, pip, or other package managers */
698
+ packageName?: string;
699
+ /** Git repository URL to clone */
700
+ repositoryUrlToClone?: string;
701
+ /** Ordered list of setup steps to execute after installation */
702
+ setupSteps?: string[];
703
+ }
704
+ /**
705
+ * Deployment option for a plugin.
706
+ * A plugin can offer multiple deployment options, each with different requirements.
707
+ */
708
+ interface DeploymentOption {
709
+ /** Connection configuration for this deployment option */
710
+ connection: ConnectionConfig;
711
+ /** Human-readable description of this deployment option */
712
+ description?: string;
713
+ /** Detailed installation instructions */
714
+ installationDetails?: InstallationDetails;
715
+ /** Method used to install this plugin */
716
+ installationMethod: string;
717
+ /** Whether this is the recommended deployment option */
718
+ isRecommended?: boolean;
719
+ /** System dependencies required for this deployment option */
720
+ systemDependencies?: SystemDependency[];
721
+ }
722
+
723
+ /**
724
+ * Schema defining the capabilities a plugin can provide.
725
+ * Each capability is represented as a boolean flag.
726
+ */
727
+ declare const PluginCapabilitiesSchema: z.ZodObject<{
728
+ /** Whether the plugin provides custom prompts */
729
+ prompts: z.ZodDefault<z.ZodBoolean>;
730
+ /** Whether the plugin provides resources (assets) */
731
+ resources: z.ZodDefault<z.ZodBoolean>;
732
+ /** Whether the plugin provides tools (functions) */
733
+ tools: z.ZodDefault<z.ZodBoolean>;
734
+ }, "strip", z.ZodTypeAny, {
735
+ prompts: boolean;
736
+ resources: boolean;
737
+ tools: boolean;
738
+ }, {
739
+ prompts?: boolean | undefined;
740
+ resources?: boolean | undefined;
741
+ tools?: boolean | undefined;
742
+ }>;
743
+ /**
744
+ * Definition of a tool that a plugin can provide.
745
+ * Tools are functions that can be called by the chat application.
746
+ */
747
+ interface PluginTool {
748
+ /** Human-readable description of what the tool does */
749
+ description?: string;
750
+ /** JSON schema defining the expected input parameters */
751
+ inputSchema?: Record<string, any>;
752
+ /** Unique identifier for the tool within the plugin */
753
+ name: string;
754
+ }
755
+ /**
756
+ * Definition of a resource (asset) that a plugin can provide.
757
+ * Resources can be images, data files, or other assets needed by the plugin.
758
+ */
759
+ interface PluginResource {
760
+ /** MIME type of the resource (e.g., 'image/png', 'application/json') */
761
+ mimeType?: string;
762
+ /** Optional display name for the resource */
763
+ name?: string;
764
+ /** URI where the resource can be accessed */
765
+ uri: string;
766
+ }
767
+ /**
768
+ * Definition of an argument for a prompt template.
769
+ * Arguments allow users to customize the prompt when using it.
770
+ */
771
+ interface PromptArgument {
772
+ /** Human-readable description of the argument's purpose */
773
+ description?: string;
774
+ /** Argument identifier */
775
+ name: string;
776
+ /** Whether the argument must be provided (defaults to false if omitted) */
777
+ required?: boolean;
778
+ /** Data type of the argument (e.g., 'string', 'number') */
779
+ type?: string;
780
+ }
781
+ /**
782
+ * Definition of a prompt template that a plugin can provide.
783
+ * Prompts are pre-defined templates that can be used in conversations.
784
+ */
785
+ interface PluginPrompt {
786
+ /** List of customizable arguments for this prompt */
787
+ arguments?: PromptArgument[];
788
+ /** Human-readable description of what the prompt does */
789
+ description: string;
790
+ /** Unique identifier for the prompt within the plugin */
791
+ name: string;
792
+ }
793
+
794
+ /**
795
+ * Plugin compatibility information.
796
+ * Defines the compatibility requirements for a plugin with respect to app versions and platforms.
797
+ */
798
+ interface PluginCompatibility {
799
+ /** Maximum app version the plugin is compatible with */
800
+ maxAppVersion?: string;
801
+ /** Minimum app version required to use the plugin */
802
+ minAppVersion?: string;
803
+ /** List of supported platforms (e.g., 'web', 'desktop', 'mobile') */
804
+ platforms?: string[];
805
+ }
806
+ /**
807
+ * Simplified plugin version information.
808
+ * Contains minimal version data for plugin version lists.
809
+ */
810
+ interface PluginVersionSummary {
811
+ /** Creation timestamp (ISO 8601 format) */
812
+ createdAt: string;
813
+ /** Whether this is the latest version of the plugin */
814
+ isLatest: boolean;
815
+ /** Whether this version has been validated by the system */
816
+ isValidated: boolean;
817
+ /** Semantic version string (e.g., "1.0.0") */
818
+ version: string;
819
+ }
820
+ /**
821
+ * Base plugin item schema with Zod validation.
822
+ * Defines the structure and validation rules for plugin items in the marketplace.
823
+ */
824
+ declare const BasePluginItemSchema: z.ZodObject<{
825
+ author: z.ZodOptional<z.ZodString>;
826
+ capabilities: z.ZodObject<{
827
+ prompts: z.ZodDefault<z.ZodBoolean>;
828
+ resources: z.ZodDefault<z.ZodBoolean>;
829
+ tools: z.ZodDefault<z.ZodBoolean>;
830
+ }, "strip", z.ZodTypeAny, {
831
+ prompts: boolean;
832
+ resources: boolean;
833
+ tools: boolean;
834
+ }, {
835
+ prompts?: boolean | undefined;
836
+ resources?: boolean | undefined;
837
+ tools?: boolean | undefined;
838
+ }>;
839
+ category: z.ZodOptional<z.ZodString>;
840
+ commentCount: z.ZodDefault<z.ZodNumber>;
841
+ connectionType: z.ZodOptional<z.ZodEnum<["local", "remote", "hybrid"]>>;
842
+ createdAt: z.ZodString;
843
+ description: z.ZodString;
844
+ github: z.ZodOptional<z.ZodObject<{
845
+ language: z.ZodOptional<z.ZodString>;
846
+ license: z.ZodOptional<z.ZodString>;
847
+ stars: z.ZodOptional<z.ZodNumber>;
848
+ url: z.ZodString;
849
+ }, "strip", z.ZodTypeAny, {
850
+ url: string;
851
+ language?: string | undefined;
852
+ license?: string | undefined;
853
+ stars?: number | undefined;
854
+ }, {
855
+ url: string;
856
+ language?: string | undefined;
857
+ license?: string | undefined;
858
+ stars?: number | undefined;
859
+ }>>;
860
+ haveCloudEndpoint: z.ZodOptional<z.ZodBoolean>;
861
+ homepage: z.ZodOptional<z.ZodString>;
862
+ icon: z.ZodOptional<z.ZodString>;
863
+ identifier: z.ZodString;
864
+ installCount: z.ZodDefault<z.ZodNumber>;
865
+ isClaimed: z.ZodDefault<z.ZodBoolean>;
866
+ isFeatured: z.ZodDefault<z.ZodBoolean>;
867
+ isOfficial: z.ZodDefault<z.ZodBoolean>;
868
+ isValidated: z.ZodDefault<z.ZodBoolean>;
869
+ manifestUrl: z.ZodString;
870
+ name: z.ZodString;
871
+ promptsCount: z.ZodOptional<z.ZodNumber>;
872
+ ratingAverage: z.ZodOptional<z.ZodNumber>;
873
+ ratingCount: z.ZodDefault<z.ZodNumber>;
874
+ resourcesCount: z.ZodOptional<z.ZodNumber>;
875
+ toolsCount: z.ZodOptional<z.ZodNumber>;
876
+ updatedAt: z.ZodString;
877
+ }, "strip", z.ZodTypeAny, {
878
+ createdAt: string;
879
+ name: string;
880
+ updatedAt: string;
881
+ capabilities: {
882
+ prompts: boolean;
883
+ resources: boolean;
884
+ tools: boolean;
885
+ };
886
+ commentCount: number;
887
+ description: string;
888
+ identifier: string;
889
+ installCount: number;
890
+ isClaimed: boolean;
891
+ isFeatured: boolean;
892
+ isOfficial: boolean;
893
+ isValidated: boolean;
894
+ manifestUrl: string;
895
+ ratingCount: number;
896
+ author?: string | undefined;
897
+ category?: string | undefined;
898
+ connectionType?: "local" | "remote" | "hybrid" | undefined;
899
+ github?: {
900
+ url: string;
901
+ language?: string | undefined;
902
+ license?: string | undefined;
903
+ stars?: number | undefined;
904
+ } | undefined;
905
+ haveCloudEndpoint?: boolean | undefined;
906
+ homepage?: string | undefined;
907
+ icon?: string | undefined;
908
+ promptsCount?: number | undefined;
909
+ ratingAverage?: number | undefined;
910
+ resourcesCount?: number | undefined;
911
+ toolsCount?: number | undefined;
912
+ }, {
913
+ createdAt: string;
914
+ name: string;
915
+ updatedAt: string;
916
+ capabilities: {
917
+ prompts?: boolean | undefined;
918
+ resources?: boolean | undefined;
919
+ tools?: boolean | undefined;
920
+ };
921
+ description: string;
922
+ identifier: string;
923
+ manifestUrl: string;
924
+ author?: string | undefined;
925
+ category?: string | undefined;
926
+ commentCount?: number | undefined;
927
+ connectionType?: "local" | "remote" | "hybrid" | undefined;
928
+ github?: {
929
+ url: string;
930
+ language?: string | undefined;
931
+ license?: string | undefined;
932
+ stars?: number | undefined;
933
+ } | undefined;
934
+ haveCloudEndpoint?: boolean | undefined;
935
+ homepage?: string | undefined;
936
+ icon?: string | undefined;
937
+ installCount?: number | undefined;
938
+ isClaimed?: boolean | undefined;
939
+ isFeatured?: boolean | undefined;
940
+ isOfficial?: boolean | undefined;
941
+ isValidated?: boolean | undefined;
942
+ promptsCount?: number | undefined;
943
+ ratingAverage?: number | undefined;
944
+ ratingCount?: number | undefined;
945
+ resourcesCount?: number | undefined;
946
+ toolsCount?: number | undefined;
947
+ }>;
948
+ /**
949
+ * Plugin marketplace item definition.
950
+ * Extends the base marketplace item with plugin-specific properties.
951
+ * This interface represents a plugin as it appears in the marketplace listing.
952
+ */
953
+ interface MarketPluginItem extends MarketItemBase {
954
+ /** Capabilities provided by this plugin */
955
+ capabilities?: {
956
+ /** Whether the plugin provides custom prompts */
957
+ prompts: boolean;
958
+ /** Whether the plugin provides resources (assets) */
959
+ resources: boolean;
960
+ /** Whether the plugin provides tools (functions) */
961
+ tools: boolean;
962
+ };
963
+ /** Number of comments on this plugin */
964
+ commentCount?: number;
965
+ /** Connection type strategy for communicating with the plugin */
966
+ connectionType?: PluginConnectionType;
967
+ /** GitHub repository information */
968
+ github?: {
969
+ language?: string;
970
+ license?: string;
971
+ stars?: number;
972
+ url: string;
973
+ };
974
+ /** Whether the plugin has a cloud endpoint available for official cloud-hosted deployment */
975
+ haveCloudEndpoint?: boolean;
976
+ /** Number of times this plugin has been installed */
977
+ installCount?: number;
978
+ /** Whether this plugin has been claimed by its original author */
979
+ isClaimed?: boolean;
980
+ /** Whether this plugin is featured in the marketplace */
981
+ isFeatured?: boolean;
982
+ /** Whether this plugin is officially maintained by LobeHub */
983
+ isOfficial?: boolean;
984
+ /** Whether this plugin has been validated by the system */
985
+ isValidated?: boolean;
986
+ /** Number of prompts provided by this plugin */
987
+ promptsCount?: number;
988
+ /** Average rating (typically 1-5 scale) */
989
+ ratingAverage?: number;
990
+ /** Number of ratings received */
991
+ ratingCount?: number;
992
+ /** Number of resources provided by this plugin */
993
+ resourcesCount?: number;
994
+ summary?: string;
995
+ /** Number of tools provided by this plugin */
996
+ toolsCount?: number;
997
+ }
998
+ /** Type alias for the base plugin item validated by Zod schema */
999
+ type BasePluginItem = z.infer<typeof BasePluginItemSchema>;
1000
+ /**
1001
+ * Query parameters for listing plugins in the marketplace.
1002
+ * Mirrors SkillListQuery in structure for consistency.
1003
+ */
1004
+ interface PluginListQuery {
1005
+ /** Filter by category */
1006
+ category?: string;
1007
+ /** Filter by MCP connection type */
1008
+ connectionType?: 'http' | 'sse' | 'stdio';
1009
+ /** Filter by claimed status */
1010
+ isClaimed?: 'false' | 'true';
1011
+ /** Filter by featured status */
1012
+ isFeatured?: 'false' | 'true';
1013
+ /** Filter by official status */
1014
+ isOfficial?: 'false' | 'true';
1015
+ /** Locale for localized content */
1016
+ locale?: string;
1017
+ /** Sort direction */
1018
+ order?: 'asc' | 'desc';
1019
+ /** Filter by owner ID */
1020
+ ownerId?: number;
1021
+ /** Page number (1-based) */
1022
+ page?: number;
1023
+ /** Number of items per page */
1024
+ pageSize?: number;
1025
+ /** Search query string */
1026
+ q?: string;
1027
+ /** Sort field */
1028
+ sort?: 'commentCount' | 'createdAt' | 'githubUpdateAt' | 'installCount' | 'isFeatured' | 'isValidated' | 'ratingAverage' | 'ratingCount' | 'recommended' | 'relevance' | 'stars' | 'updatedAt';
1029
+ /** Publication status filter */
1030
+ status?: 'all' | 'archived' | 'deprecated' | 'published' | 'unpublished';
1031
+ /** Filter by tag */
1032
+ tag?: string;
1033
+ /** Visibility filter */
1034
+ visibility?: 'all' | 'internal' | 'private' | 'public';
1035
+ }
1036
+ /**
1037
+ * Plugin manifest definition.
1038
+ * This is the complete specification of a plugin, including all its capabilities,
1039
+ * metadata, and deployment options.
1040
+ */
1041
+ interface PluginItemDetail extends Omit<MarketPluginItem, 'author' | 'manifestUrl'> {
1042
+ artifacts?: {
1043
+ docker?: {
1044
+ imageName?: string;
1045
+ tag?: string;
1046
+ };
1047
+ npm?: {
1048
+ packageName?: string;
1049
+ version?: string;
1050
+ };
1051
+ pypi?: {
1052
+ packageName?: string;
1053
+ version?: string;
1054
+ };
1055
+ };
1056
+ /** Author information */
1057
+ author?: {
1058
+ /** Author or organization name */
1059
+ name: string;
1060
+ /** URL to the author's website or profile */
1061
+ url?: string;
1062
+ };
1063
+ /** Connection type strategy for communicating with the plugin */
1064
+ connectionType?: PluginConnectionType;
1065
+ /** Available deployment options */
1066
+ deploymentOptions?: DeploymentOption[];
1067
+ /**
1068
+ * GitHub
1069
+ */
1070
+ github?: {
1071
+ language?: string;
1072
+ license?: string;
1073
+ stars?: number;
1074
+ url: string;
1075
+ };
1076
+ overview: {
1077
+ readme: string;
1078
+ summary?: string;
1079
+ };
1080
+ /** List of prompt templates provided by this plugin */
1081
+ prompts?: PluginPrompt[];
1082
+ /** List of resources provided by this plugin */
1083
+ resources?: PluginResource[];
1084
+ /** List of tools provided by this plugin */
1085
+ tools?: PluginTool[];
1086
+ /** Date when the plugin was created in the marketplace (ISO 8601 format) */
1087
+ validatedAt?: string;
1088
+ /** Semantic version string (e.g., "1.0.0") */
1089
+ version: string;
1090
+ /** List of all versions of this plugin with simplified information */
1091
+ versions: PluginVersionSummary[];
1092
+ }
1093
+ /**
1094
+ * Plugin manifest definition.
1095
+ * This is the complete specification of a plugin, including all its capabilities,
1096
+ * metadata, and deployment options.
1097
+ */
1098
+ interface PluginManifest extends Omit<MarketPluginItem, 'author' | 'manifestUrl'> {
1099
+ /** Author information */
1100
+ author?: {
1101
+ /** Author or organization name */
1102
+ name: string;
1103
+ /** URL to the author's website or profile */
1104
+ url?: string;
1105
+ };
1106
+ /** Available deployment options */
1107
+ deploymentOptions?: DeploymentOption[];
1108
+ overview?: {
1109
+ readme?: string;
1110
+ summary?: string;
1111
+ };
1112
+ /** List of prompt templates provided by this plugin */
1113
+ prompts?: PluginPrompt[];
1114
+ /** List of resources provided by this plugin */
1115
+ resources?: PluginResource[];
1116
+ /** List of tools provided by this plugin */
1117
+ tools?: PluginTool[];
1118
+ /** Date when the plugin was created in the marketplace (ISO 8601 format) */
1119
+ validatedAt?: string;
1120
+ /** Semantic version string (e.g., "1.0.0") */
1121
+ version: string;
1122
+ }
1123
+
1124
+ /**
1125
+ * Schema for admin-managed plugin items with additional status and visibility fields.
1126
+ * Extends the base plugin schema with administrative properties.
1127
+ */
1128
+ declare const AdminPluginItemSchema: z.ZodObject<{
1129
+ author: z.ZodOptional<z.ZodString>;
1130
+ capabilities: z.ZodObject<{
1131
+ prompts: z.ZodDefault<z.ZodBoolean>;
1132
+ resources: z.ZodDefault<z.ZodBoolean>;
1133
+ tools: z.ZodDefault<z.ZodBoolean>;
1134
+ }, "strip", z.ZodTypeAny, {
1135
+ prompts: boolean;
1136
+ resources: boolean;
1137
+ tools: boolean;
1138
+ }, {
1139
+ prompts?: boolean | undefined;
1140
+ resources?: boolean | undefined;
1141
+ tools?: boolean | undefined;
1142
+ }>;
1143
+ category: z.ZodOptional<z.ZodString>;
1144
+ commentCount: z.ZodDefault<z.ZodNumber>;
1145
+ connectionType: z.ZodOptional<z.ZodEnum<["local", "remote", "hybrid"]>>;
1146
+ createdAt: z.ZodString;
1147
+ description: z.ZodString;
1148
+ github: z.ZodOptional<z.ZodObject<{
1149
+ language: z.ZodOptional<z.ZodString>;
1150
+ license: z.ZodOptional<z.ZodString>;
1151
+ stars: z.ZodOptional<z.ZodNumber>;
1152
+ url: z.ZodString;
1153
+ }, "strip", z.ZodTypeAny, {
1154
+ url: string;
1155
+ language?: string | undefined;
1156
+ license?: string | undefined;
1157
+ stars?: number | undefined;
1158
+ }, {
1159
+ url: string;
1160
+ language?: string | undefined;
1161
+ license?: string | undefined;
1162
+ stars?: number | undefined;
1163
+ }>>;
1164
+ haveCloudEndpoint: z.ZodOptional<z.ZodBoolean>;
1165
+ homepage: z.ZodOptional<z.ZodString>;
1166
+ icon: z.ZodOptional<z.ZodString>;
1167
+ identifier: z.ZodString;
1168
+ installCount: z.ZodDefault<z.ZodNumber>;
1169
+ isClaimed: z.ZodDefault<z.ZodBoolean>;
1170
+ isFeatured: z.ZodDefault<z.ZodBoolean>;
1171
+ isOfficial: z.ZodDefault<z.ZodBoolean>;
1172
+ isValidated: z.ZodDefault<z.ZodBoolean>;
1173
+ manifestUrl: z.ZodString;
1174
+ name: z.ZodString;
1175
+ promptsCount: z.ZodOptional<z.ZodNumber>;
1176
+ ratingAverage: z.ZodOptional<z.ZodNumber>;
1177
+ ratingCount: z.ZodDefault<z.ZodNumber>;
1178
+ resourcesCount: z.ZodOptional<z.ZodNumber>;
1179
+ toolsCount: z.ZodOptional<z.ZodNumber>;
1180
+ updatedAt: z.ZodString;
1181
+ } & {
1182
+ /** Publication status of the plugin */
1183
+ status: z.ZodEnum<["published", "unpublished", "archived", "deprecated"]>;
1184
+ /** Visibility level of the plugin */
1185
+ visibility: z.ZodEnum<["public", "private", "internal"]>;
1186
+ }, "strip", z.ZodTypeAny, {
1187
+ createdAt: string;
1188
+ name: string;
1189
+ updatedAt: string;
1190
+ status: "archived" | "deprecated" | "published" | "unpublished";
1191
+ capabilities: {
1192
+ prompts: boolean;
1193
+ resources: boolean;
1194
+ tools: boolean;
1195
+ };
1196
+ commentCount: number;
1197
+ description: string;
1198
+ identifier: string;
1199
+ installCount: number;
1200
+ isClaimed: boolean;
1201
+ isFeatured: boolean;
1202
+ isOfficial: boolean;
1203
+ isValidated: boolean;
1204
+ manifestUrl: string;
1205
+ ratingCount: number;
1206
+ visibility: "internal" | "private" | "public";
1207
+ author?: string | undefined;
1208
+ category?: string | undefined;
1209
+ connectionType?: "local" | "remote" | "hybrid" | undefined;
1210
+ github?: {
1211
+ url: string;
1212
+ language?: string | undefined;
1213
+ license?: string | undefined;
1214
+ stars?: number | undefined;
1215
+ } | undefined;
1216
+ haveCloudEndpoint?: boolean | undefined;
1217
+ homepage?: string | undefined;
1218
+ icon?: string | undefined;
1219
+ promptsCount?: number | undefined;
1220
+ ratingAverage?: number | undefined;
1221
+ resourcesCount?: number | undefined;
1222
+ toolsCount?: number | undefined;
1223
+ }, {
1224
+ createdAt: string;
1225
+ name: string;
1226
+ updatedAt: string;
1227
+ status: "archived" | "deprecated" | "published" | "unpublished";
1228
+ capabilities: {
1229
+ prompts?: boolean | undefined;
1230
+ resources?: boolean | undefined;
1231
+ tools?: boolean | undefined;
1232
+ };
1233
+ description: string;
1234
+ identifier: string;
1235
+ manifestUrl: string;
1236
+ visibility: "internal" | "private" | "public";
1237
+ author?: string | undefined;
1238
+ category?: string | undefined;
1239
+ commentCount?: number | undefined;
1240
+ connectionType?: "local" | "remote" | "hybrid" | undefined;
1241
+ github?: {
1242
+ url: string;
1243
+ language?: string | undefined;
1244
+ license?: string | undefined;
1245
+ stars?: number | undefined;
1246
+ } | undefined;
1247
+ haveCloudEndpoint?: boolean | undefined;
1248
+ homepage?: string | undefined;
1249
+ icon?: string | undefined;
1250
+ installCount?: number | undefined;
1251
+ isClaimed?: boolean | undefined;
1252
+ isFeatured?: boolean | undefined;
1253
+ isOfficial?: boolean | undefined;
1254
+ isValidated?: boolean | undefined;
1255
+ promptsCount?: number | undefined;
1256
+ ratingAverage?: number | undefined;
1257
+ ratingCount?: number | undefined;
1258
+ resourcesCount?: number | undefined;
1259
+ toolsCount?: number | undefined;
1260
+ }>;
1261
+ /**
1262
+ * Interface for admin-managed plugin items.
1263
+ * Extends the market plugin item with administrative properties.
1264
+ */
1265
+ interface AdminPluginItem extends MarketPluginItem {
1266
+ /** GitHub last update timestamp (ISO 8601 format) */
1267
+ githubUpdateAt?: string;
1268
+ /** Unique numeric identifier for the plugin in the database */
1269
+ id: number;
1270
+ /** User ID of the plugin owner */
1271
+ ownerId: number;
1272
+ /** Publication status of the plugin */
1273
+ status: 'published' | 'unpublished' | 'archived';
1274
+ /** Visibility level controlling who can access the plugin */
1275
+ visibility: 'public' | 'private' | 'internal';
1276
+ }
1277
+ /**
1278
+ * Plugin version database model.
1279
+ * Represents a specific version of a plugin in the database.
1280
+ */
1281
+ interface PluginVersion {
1282
+ /** Creation timestamp (ISO 8601 format) */
1283
+ createdAt: string;
1284
+ /** Unique numeric identifier for the version */
1285
+ id: number;
1286
+ /** Whether this is the latest version of the plugin */
1287
+ isLatest: boolean;
1288
+ /** Whether this version has been validated by the system */
1289
+ isValidated: boolean;
1290
+ /** The full manifest data for this version */
1291
+ manifest: PluginManifest;
1292
+ /** URL to the manifest file, or null if stored directly */
1293
+ manifestUrl: string | null;
1294
+ /** Additional metadata for this version */
1295
+ meta: Record<string, any> | null;
1296
+ /** ID of the parent plugin */
1297
+ pluginId: number;
1298
+ /** Number of prompts provided by this version */
1299
+ promptsCount: number;
1300
+ /** Number of resources provided by this version */
1301
+ resourcesCount: number;
1302
+ /** Number of tools provided by this version */
1303
+ toolsCount: number;
1304
+ /** Last update timestamp (ISO 8601 format) */
1305
+ updatedAt: string;
1306
+ /** Semantic version string (e.g., "1.0.0") */
1307
+ version: string;
1308
+ }
1309
+ /**
1310
+ * Detailed admin plugin item with version history.
1311
+ * Used for displaying complete plugin information in the admin interface.
1312
+ */
1313
+ interface AdminPluginItemDetail extends Omit<AdminPluginItem, 'manifestUrl'> {
1314
+ /** Full manifest data for the current version */
1315
+ manifest: PluginManifest;
1316
+ /** List of all versions of this plugin */
1317
+ versions: PluginVersion[];
1318
+ }
1319
+ /**
1320
+ * Admin deployment option with database ID.
1321
+ * Extends the basic deployment option with a database identifier.
1322
+ */
1323
+ interface AdminDeploymentOption extends DeploymentOption {
1324
+ /** Unique numeric identifier for the deployment option */
1325
+ id: number;
1326
+ }
1327
+ /**
1328
+ * Admin system dependency with database ID.
1329
+ * Extends the basic system dependency with a database identifier.
1330
+ */
1331
+ interface AdminSystemDependency extends SystemDependency {
1332
+ /** Unique numeric identifier for the system dependency */
1333
+ id: number;
1334
+ }
1335
+ /**
1336
+ * Plugin version localization data.
1337
+ * Represents localized content for a specific plugin version in a particular language.
1338
+ */
1339
+ interface PluginVersionLocalization {
1340
+ /** Creation timestamp (ISO 8601 format) */
1341
+ createdAt: string;
1342
+ /** Localized description of the plugin */
1343
+ description: string;
1344
+ /** Unique numeric identifier for the localization */
1345
+ id: number;
1346
+ /** Language/locale code (e.g., 'en-US', 'zh-CN') */
1347
+ locale: string;
1348
+ /** Localized display name of the plugin */
1349
+ name: string;
1350
+ /** ID of the parent plugin version */
1351
+ pluginVersionId: number;
1352
+ /** Localized summary of the plugin */
1353
+ summary?: string;
1354
+ /** Array of localized tags for categorization and search */
1355
+ tags?: string[];
1356
+ }
1357
+ /**
1358
+ * 不完整i18n插件项
1359
+ * 表示pluginVersionLocalizations只有1个条目的插件
1360
+ */
1361
+ interface IncompleteI18nPlugin {
1362
+ /** 插件标识符 */
1363
+ identifier: string;
1364
+ /** 本地化条目数量 */
1365
+ localizationCount: number;
1366
+ /** 插件ID */
1367
+ pluginId: number;
1368
+ /** 插件版本 */
1369
+ version: string;
1370
+ }
1371
+ /**
1372
+ * Range Data Point Interface
1373
+ * Defines the structure for daily trend data points in analysis
1374
+ */
1375
+ interface RangeDataPoint {
1376
+ /** Current period count */
1377
+ count: number;
1378
+ /** Date in YYYY-MM-DD format */
1379
+ date: string;
1380
+ /** Previous period count for comparison */
1381
+ prevCount: number;
1382
+ }
1383
+ /**
1384
+ * Range Statistics Interface
1385
+ * Defines the structure for range-based statistics
1386
+ */
1387
+ interface RangeStats {
1388
+ /** Array of daily data points */
1389
+ data: RangeDataPoint[];
1390
+ /** Display configuration */
1391
+ display: string;
1392
+ /** Total sum for previous period */
1393
+ prevSum: number;
1394
+ /** Total sum for current period */
1395
+ sum: number;
1396
+ }
1397
+ /**
1398
+ * Range query parameters for trend analysis
1399
+ */
1400
+ interface RangeQuery {
1401
+ /** Display configuration */
1402
+ display: string;
1403
+ /** Optional previous period range for comparison */
1404
+ prevRange?: [string, string];
1405
+ /** Date range as [startDate, endDate] */
1406
+ range: [string, string];
1407
+ }
1408
+
1409
+ /**
1410
+ * Plugin event tracking types
1411
+ *
1412
+ * These types describe the payload used when recording user plugin events such as
1413
+ * installs, activations, uninstalls, or clicks.
1414
+ */
1415
+ type PluginEventType = 'install' | 'activate' | 'uninstall' | 'click';
1416
+ /** Payload for recording a plugin event */
1417
+ interface PluginEventRequest {
1418
+ /** Event name */
1419
+ event: PluginEventType;
1420
+ /** Plugin identifier */
1421
+ identifier: string;
1422
+ /** Optional event source */
1423
+ source?: string;
1424
+ }
1425
+
1426
+ /**
1427
+ * Plugin Call Report Types
1428
+ *
1429
+ * This module defines the types for plugin call reporting functionality.
1430
+ * These types support users reporting their plugin method invocations to help improve
1431
+ * plugin performance monitoring and provide usage analytics.
1432
+ * These types are shared between the API server and client SDKs.
1433
+ */
1434
+ /**
1435
+ * Plugin method types
1436
+ */
1437
+ type PluginMethodType = 'tool' | 'prompt' | 'resource';
1438
+ /**
1439
+ * Custom plugin information for non-marketplace plugins
1440
+ */
1441
+ interface CustomPluginInfo {
1442
+ avatar?: string;
1443
+ /** Plugin description */
1444
+ description?: string;
1445
+ /** Plugin name/title */
1446
+ name?: string;
1447
+ }
1448
+ /**
1449
+ * Call report request data
1450
+ */
1451
+ interface CallReportRequest {
1452
+ /** Call execution duration in milliseconds */
1453
+ callDurationMs: number;
1454
+ /** Client ID (optional, for M2M authentication) */
1455
+ clientId?: string;
1456
+ /** Client IP address (real user IP) */
1457
+ clientIp?: string;
1458
+ /** Custom plugin information (required if isCustomPlugin is true) */
1459
+ customPluginInfo?: CustomPluginInfo;
1460
+ /** Error code if call failed */
1461
+ errorCode?: string;
1462
+ /** Error message if call failed */
1463
+ errorMessage?: string;
1464
+ /** Plugin identifier */
1465
+ identifier: string;
1466
+ /** Input parameters sent to the method */
1467
+ inputParams?: any;
1468
+ /** Whether this is a custom/local plugin (not from marketplace) */
1469
+ isCustomPlugin?: boolean;
1470
+ /** Additional metadata about the call */
1471
+ metadata?: Record<string, any>;
1472
+ /** Specific method name being called */
1473
+ methodName: string;
1474
+ /** Plugin method type (tool/prompt/resource) */
1475
+ methodType: PluginMethodType;
1476
+ /** Output/response from the method */
1477
+ outputResult?: any;
1478
+ /** Platform information */
1479
+ platform?: string;
1480
+ /** Request size in bytes */
1481
+ requestSizeBytes?: number;
1482
+ /** Response size in bytes */
1483
+ responseSizeBytes?: number;
1484
+ /** Session ID for correlating multiple calls */
1485
+ sessionId?: string;
1486
+ /** Whether the call was successful */
1487
+ success: boolean;
1488
+ /** Trace ID for distributed tracing */
1489
+ traceId?: string;
1490
+ /** User agent (real user agent) */
1491
+ userAgent?: string;
1492
+ /** Plugin version */
1493
+ version: string;
1494
+ }
1495
+ /**
1496
+ * Call report response data
1497
+ */
1498
+ interface CallReportResponse {
1499
+ /** Message about the processing result */
1500
+ message: string;
1501
+ /** Whether the report was successfully recorded */
1502
+ success: boolean;
1503
+ }
1504
+ /**
1505
+ * Call statistics data
1506
+ */
1507
+ interface CallStats {
1508
+ /** Average call duration in milliseconds */
1509
+ averageCallTime: number;
1510
+ /** Call statistics by method type */
1511
+ byMethodType: Record<PluginMethodType, {
1512
+ averageCallTime: number;
1513
+ failedCalls: number;
1514
+ successRate: number;
1515
+ successfulCalls: number;
1516
+ totalCalls: number;
1517
+ }>;
1518
+ /** Statistics by plugin source (marketplace vs custom) */
1519
+ byPluginSource: {
1520
+ custom: {
1521
+ averageCallTime: number;
1522
+ successRate: number;
1523
+ totalCalls: number;
1524
+ };
1525
+ marketplace: {
1526
+ averageCallTime: number;
1527
+ successRate: number;
1528
+ totalCalls: number;
1529
+ };
1530
+ };
1531
+ /** Number of failed calls */
1532
+ failedCalls: number;
1533
+ /** Success rate as percentage */
1534
+ successRate: number;
1535
+ /** Number of successful calls */
1536
+ successfulCalls: number;
1537
+ /** Most common call errors */
1538
+ topErrors: Array<{
1539
+ count: number;
1540
+ errorCode: string;
1541
+ errorMessage: string;
1542
+ }>;
1543
+ /** Most frequently called methods */
1544
+ topMethods: Array<{
1545
+ averageCallTime: number;
1546
+ count: number;
1547
+ methodName: string;
1548
+ methodType: PluginMethodType;
1549
+ successRate: number;
1550
+ }>;
1551
+ /** Total number of call attempts */
1552
+ totalCalls: number;
1553
+ }
1554
+ /**
1555
+ * Call log entry data
1556
+ */
1557
+ interface CallLogEntry {
1558
+ /** Call execution duration in milliseconds */
1559
+ callDurationMs: number;
1560
+ /** When the log was created */
1561
+ createdAt: string;
1562
+ /** Custom plugin information */
1563
+ customPluginInfo?: CustomPluginInfo | null;
1564
+ /** Error code if failed */
1565
+ errorCode?: string | null;
1566
+ /** Error message if failed */
1567
+ errorMessage?: string | null;
1568
+ /** Log entry ID */
1569
+ id: number;
1570
+ /** Plugin identifier */
1571
+ identifier: string;
1572
+ /** Whether this is a custom plugin */
1573
+ isCustomPlugin: boolean;
1574
+ /** Method name */
1575
+ methodName: string;
1576
+ /** Plugin method type */
1577
+ methodType: PluginMethodType;
1578
+ /** Platform information */
1579
+ platform?: string | null;
1580
+ /** Request size in bytes */
1581
+ requestSizeBytes?: number | null;
1582
+ /** Response size in bytes */
1583
+ responseSizeBytes?: number | null;
1584
+ /** Session ID */
1585
+ sessionId?: string | null;
1586
+ /** Whether call was successful */
1587
+ success: boolean;
1588
+ /** Trace ID */
1589
+ traceId?: string | null;
1590
+ /** Plugin version */
1591
+ version: string;
1592
+ }
1593
+
1594
+ /**
1595
+ * Plugin Install Report Types
1596
+ *
1597
+ * This module defines the types for plugin installation reporting functionality.
1598
+ * These types support users reporting their installation attempts to help improve
1599
+ * plugin validation and provide analytics. These types are shared between the API server and client SDKs.
1600
+ */
1601
+
1602
+ /**
1603
+ * Install report request data
1604
+ */
1605
+ interface InstallReportRequest {
1606
+ /** Client ID (optional, for M2M authentication) */
1607
+ clientId?: string;
1608
+ /** Client IP address (real user IP) */
1609
+ clientIp?: string;
1610
+ /** Error code if installation failed */
1611
+ errorCode?: string;
1612
+ /** Error message if installation failed */
1613
+ errorMessage?: string;
1614
+ /** Plugin identifier */
1615
+ identifier: string;
1616
+ /** Installation duration in milliseconds */
1617
+ installDurationMs?: number;
1618
+ /** Installation parameters used */
1619
+ installParams?: any;
1620
+ /** Plugin manifest information */
1621
+ manifest?: Pick<PluginManifest, 'prompts' | 'tools' | 'resources'>;
1622
+ /** Additional metadata */
1623
+ metadata?: Record<string, any>;
1624
+ /** Platform information */
1625
+ platform?: string;
1626
+ /** Whether the installation was successful */
1627
+ success: boolean;
1628
+ /** User agent (real user agent) */
1629
+ userAgent?: string;
1630
+ /** Plugin version */
1631
+ version: string;
1632
+ }
1633
+ /**
1634
+ * Install report response data
1635
+ */
1636
+ interface InstallReportResponse {
1637
+ /** Whether the manifest was used to update plugin version data */
1638
+ manifestUpdated?: boolean;
1639
+ /** Message about the processing result */
1640
+ message: string;
1641
+ /** Whether a new version was created based on the report */
1642
+ newVersionCreated?: boolean;
1643
+ /** Whether the report was successfully recorded */
1644
+ success: boolean;
1645
+ }
1646
+ /**
1647
+ * Install statistics data
1648
+ */
1649
+ interface InstallStats {
1650
+ /** Average installation time in milliseconds */
1651
+ averageInstallTime: number;
1652
+ /** Number of failed installations */
1653
+ failedInstalls: number;
1654
+ /** Success rate as percentage */
1655
+ successRate: number;
1656
+ /** Number of successful installations */
1657
+ successfulInstalls: number;
1658
+ /** Most common installation errors */
1659
+ topErrors: Array<{
1660
+ count: number;
1661
+ errorCode: string;
1662
+ errorMessage: string;
1663
+ }>;
1664
+ /** Total number of installation attempts */
1665
+ totalInstalls: number;
1666
+ }
1667
+ /**
1668
+ * Install log entry data
1669
+ */
1670
+ interface InstallLogEntry {
1671
+ /** When the log was created */
1672
+ createdAt: string;
1673
+ /** Error code if failed */
1674
+ errorCode?: string | null;
1675
+ /** Error message if failed */
1676
+ errorMessage?: string | null;
1677
+ /** Log entry ID */
1678
+ id: number;
1679
+ /** Plugin identifier */
1680
+ identifier: string;
1681
+ /** Installation duration in milliseconds */
1682
+ installDurationMs: number;
1683
+ /** Platform information */
1684
+ platform?: string | null;
1685
+ /** Whether installation was successful */
1686
+ success: boolean;
1687
+ /** Plugin version */
1688
+ version: string;
1689
+ }
1690
+
1691
+ /**
1692
+ * Skill Install Report Types
1693
+ *
1694
+ * This module defines the types for skill installation reporting functionality.
1695
+ * These types support CLI clients reporting their installation attempts.
1696
+ * Shared between the API server and client SDKs.
1697
+ */
1698
+ /**
1699
+ * Skill install report request data
1700
+ */
1701
+ interface SkillInstallReportRequest {
1702
+ /** Error code if installation failed */
1703
+ errorCode?: string;
1704
+ /** Error message if installation failed */
1705
+ errorMessage?: string;
1706
+ /** Skill identifier */
1707
+ identifier: string;
1708
+ /** Installation duration in milliseconds */
1709
+ installDurationMs: number;
1710
+ /** Additional metadata */
1711
+ metadata?: Record<string, any>;
1712
+ /** Platform information */
1713
+ platform?: string;
1714
+ /** Whether the installation was successful */
1715
+ success: boolean;
1716
+ /** Skill version (optional, omit = latest) */
1717
+ version?: string;
1718
+ }
1719
+ /**
1720
+ * Skill install report response data
1721
+ */
1722
+ interface SkillInstallReportResponse {
1723
+ /** Message about the processing result */
1724
+ message: string;
1725
+ /** Whether the report was successfully recorded */
1726
+ success: boolean;
1727
+ }
1728
+
1729
+ /**
1730
+ * Skill Type Definitions
1731
+ *
1732
+ * This module defines types for skill entities in the marketplace.
1733
+ * Skills are standalone packages that can be imported from GitHub,
1734
+ * browsed, and downloaded.
1735
+ */
1736
+ /**
1737
+ * Standard skill category enum
1738
+ * Used for AI-generated and validated skill categories
1739
+ */
1740
+ declare enum SkillCategoryEnum {
1741
+ AILLMs = "ai-llms",
1742
+ AgentToAgentProtocols = "agent-to-agent-protocols",
1743
+ AppleAppsServices = "apple-apps-services",
1744
+ BrowserAutomation = "browser-automation",
1745
+ CLIUtilities = "cli-utilities",
1746
+ CalendarScheduling = "calendar-scheduling",
1747
+ ClawdbotTools = "clawdbot-tools",
1748
+ CodingAgentsIDEs = "coding-agents-ides",
1749
+ Communication = "communication",
1750
+ DataAnalytics = "data-analytics",
1751
+ DevOpsCloud = "devops-cloud",
1752
+ Finance = "finance",
1753
+ Gaming = "gaming",
1754
+ GitGitHub = "git-github",
1755
+ HealthFitness = "health-fitness",
1756
+ IOSMacOSDevelopment = "ios-macos-development",
1757
+ ImageVideoGeneration = "image-video-generation",
1758
+ MarketingSales = "marketing-sales",
1759
+ MediaStreaming = "media-streaming",
1760
+ Moltbook = "moltbook",
1761
+ NotesPKM = "notes-pkm",
1762
+ PDFDocuments = "pdf-documents",
1763
+ PersonalDevelopment = "personal-development",
1764
+ ProductivityTasks = "productivity-tasks",
1765
+ SearchResearch = "search-research",
1766
+ SecurityPasswords = "security-passwords",
1767
+ SelfHostedAutomation = "self-hosted-automation",
1768
+ ShoppingEcommerce = "shopping-ecommerce",
1769
+ SmartHomeIoT = "smart-home-iot",
1770
+ SpeechTranscription = "speech-transcription",
1771
+ Transportation = "transportation",
1772
+ WebFrontendDevelopment = "web-frontend-development"
1773
+ }
1774
+ /**
1775
+ * Array of valid skill category values
1776
+ */
1777
+ declare const SKILL_CATEGORY_VALUES: SkillCategoryEnum[];
1778
+ /**
1779
+ * Skill author information
1780
+ */
1781
+ interface SkillAuthor {
1782
+ /** Author's display name */
1783
+ name: string;
1784
+ /** Author's URL (website, GitHub profile, etc.) */
1785
+ url?: string;
1786
+ }
1787
+ /**
1788
+ * GitHub metadata for skills
1789
+ */
1790
+ interface SkillGitHubMeta {
1791
+ /** Number of forks */
1792
+ forks?: number;
1793
+ /** Full repository name (owner/repo) */
1794
+ fullName?: string;
1795
+ /** Number of open issues */
1796
+ openIssues?: number;
1797
+ /** Number of GitHub stars */
1798
+ stars?: number;
1799
+ /** GitHub repository URL */
1800
+ url?: string;
1801
+ /** Number of watchers */
1802
+ watchers?: number;
1803
+ }
1804
+ /**
1805
+ * Skill license information
1806
+ */
1807
+ interface SkillLicense {
1808
+ /** License name (e.g., MIT, Apache-2.0) */
1809
+ name: string;
1810
+ /** URL to the license text */
1811
+ url?: string;
1812
+ }
1813
+ /**
1814
+ * Resource file metadata
1815
+ */
1816
+ interface SkillResource {
1817
+ /** SHA256 hash of the file */
1818
+ fileHash: string;
1819
+ /** File size in bytes */
1820
+ size: number;
1821
+ }
1822
+ /**
1823
+ * Skill manifest from SKILL.md frontmatter
1824
+ */
1825
+ interface SkillManifest {
1826
+ /** Author information */
1827
+ author?: SkillAuthor;
1828
+ /** Category */
1829
+ category?: string;
1830
+ /** Description */
1831
+ description: string;
1832
+ /** Icon URL or emoji */
1833
+ icon?: string;
1834
+ /** License identifier */
1835
+ license?: string;
1836
+ /** License URL */
1837
+ licenseUrl?: string;
1838
+ /** Skill name */
1839
+ name: string;
1840
+ /** GitHub repository URL */
1841
+ repository?: string;
1842
+ /** Original source URL */
1843
+ sourceUrl?: string;
1844
+ /** Short summary */
1845
+ summary?: string;
1846
+ /** Tags for categorization */
1847
+ tags?: string[];
1848
+ /** Version string */
1849
+ version?: string;
1850
+ }
1851
+ /**
1852
+ * Skill list item for marketplace listing
1853
+ */
1854
+ interface SkillListItem {
1855
+ /** Author name */
1856
+ author?: string;
1857
+ /** Category */
1858
+ category?: string;
1859
+ /** Number of comments */
1860
+ commentCount: number;
1861
+ /** Creation timestamp (ISO string) */
1862
+ createdAt: string;
1863
+ /** Brief description */
1864
+ description: string;
1865
+ /** GitHub stats */
1866
+ github?: {
1867
+ forks?: number;
1868
+ stars?: number;
1869
+ url?: string;
1870
+ watchers?: number;
1871
+ };
1872
+ /** Homepage URL */
1873
+ homepage?: string;
1874
+ /** Icon URL (GitHub org avatar) */
1875
+ icon?: string;
1876
+ /** Unique skill identifier */
1877
+ identifier: string;
1878
+ /** Install/download count */
1879
+ installCount: number;
1880
+ /** Whether the skill is featured */
1881
+ isFeatured: boolean;
1882
+ /** Whether the skill is official */
1883
+ isOfficial: boolean;
1884
+ /** Whether the skill is validated */
1885
+ isValidated: boolean;
1886
+ /** License name */
1887
+ license?: string;
1888
+ /** Logo URL */
1889
+ logo?: string;
1890
+ /** Canonical skill title from the current version; locale does not affect this field */
1891
+ name: string;
1892
+ /** Average rating */
1893
+ ratingAvg?: number;
1894
+ /** Number of ratings */
1895
+ ratingCount: number;
1896
+ /** Number of resources */
1897
+ resourcesCount?: number;
1898
+ /** Tags for discovery */
1899
+ tags?: string[];
1900
+ /** Last update timestamp (ISO string) */
1901
+ updatedAt: string;
1902
+ /** Current version string */
1903
+ version: string;
1904
+ }
1905
+ /**
1906
+ * Skill list response with pagination
1907
+ */
1908
+ interface SkillListResponse {
1909
+ /** Available categories */
1910
+ categories: string[];
1911
+ /** Current page number */
1912
+ currentPage: number;
1913
+ /** List of skills */
1914
+ items: SkillListItem[];
1915
+ /** Page size */
1916
+ pageSize: number;
1917
+ /** Total number of skills */
1918
+ totalCount: number;
1919
+ /** Total number of pages */
1920
+ totalPages: number;
1921
+ }
1922
+ /**
1923
+ * Skill version summary
1924
+ */
1925
+ interface SkillVersionSummary {
1926
+ /** Changelog for this version */
1927
+ changelog?: string;
1928
+ /** Creation timestamp (ISO string) */
1929
+ createdAt: string;
1930
+ /** Whether this is the latest version */
1931
+ isLatest: boolean;
1932
+ /** Whether this version has been validated */
1933
+ isValidated?: boolean;
1934
+ /** Version string */
1935
+ version: string;
1936
+ /** Version number */
1937
+ versionNumber: number;
1938
+ }
1939
+ /**
1940
+ * Detailed skill information
1941
+ */
1942
+ interface SkillDetail {
1943
+ /** Author information */
1944
+ author?: SkillAuthor;
1945
+ /** Category */
1946
+ category?: string;
1947
+ /** SKILL.md body content (markdown) */
1948
+ content: string;
1949
+ /** Creation timestamp (ISO string) */
1950
+ createdAt: string;
1951
+ /** Description */
1952
+ description: string;
1953
+ /** GitHub metadata */
1954
+ github?: SkillGitHubMeta;
1955
+ /** Homepage URL */
1956
+ homepage?: string;
1957
+ /** Icon URL (GitHub org avatar) */
1958
+ icon?: string;
1959
+ /** Unique skill identifier */
1960
+ identifier: string;
1961
+ /** Install/download count */
1962
+ installCount: number;
1963
+ /** Whether the skill is featured */
1964
+ isFeatured: boolean;
1965
+ /** Whether the skill is official */
1966
+ isOfficial: boolean;
1967
+ /** Whether the skill is validated */
1968
+ isValidated: boolean;
1969
+ /** License information */
1970
+ license?: SkillLicense;
1971
+ /** Logo URL */
1972
+ logo?: string;
1973
+ /** Complete manifest from SKILL.md */
1974
+ manifest: SkillManifest;
1975
+ /** Canonical skill title from the current version; locale does not affect this field */
1976
+ name: string;
1977
+ /** Overview information */
1978
+ overview: {
1979
+ summary?: string;
1980
+ };
1981
+ /** Average rating */
1982
+ ratingAverage?: number;
1983
+ /** Number of ratings */
1984
+ ratingCount: number;
1985
+ /** GitHub repository URL */
1986
+ repository?: string;
1987
+ /** Resource files: path -> metadata */
1988
+ resources: Record<string, SkillResource>;
1989
+ /** Tags */
1990
+ tags?: string[];
1991
+ /** Last update timestamp (ISO string) */
1992
+ updatedAt: string;
1993
+ /** Validation timestamp (ISO string) */
1994
+ validatedAt?: string;
1995
+ /** Current version string */
1996
+ version: string;
1997
+ /** Version number */
1998
+ versionNumber: number;
1999
+ /** All versions of this skill */
2000
+ versions: SkillVersionSummary[];
2001
+ }
2002
+ /**
2003
+ * Skill category with count
2004
+ */
2005
+ interface SkillCategory {
2006
+ /** Category name */
2007
+ category: string;
2008
+ /** Number of skills in this category */
2009
+ count: number;
2010
+ }
2011
+ /**
2012
+ * Query parameters for skill categories
2013
+ */
2014
+ interface SkillCategoryQuery {
2015
+ /** Locale for localized content */
2016
+ locale?: string;
2017
+ /** Search query to filter skills before counting categories */
2018
+ q?: string;
2019
+ }
2020
+ /**
2021
+ * Query parameters for listing skills
2022
+ */
2023
+ interface SkillListQuery {
2024
+ /** Filter by category */
2025
+ category?: string;
2026
+ /** Filter by featured flag */
2027
+ isFeatured?: 'false' | 'true';
2028
+ /** Filter by official flag */
2029
+ isOfficial?: 'false' | 'true';
2030
+ /** Locale for localized content such as description and summary; title remains canonical */
2031
+ locale?: string;
2032
+ /** Sort order */
2033
+ order?: 'asc' | 'desc';
2034
+ /** Page number (1-based) */
2035
+ page?: number;
2036
+ /** Number of items per page */
2037
+ pageSize?: number;
2038
+ /** Search query string */
2039
+ query?: string;
2040
+ /** Sort field */
2041
+ sort?: 'commentCount' | 'createdAt' | 'forks' | 'installCount' | 'name' | 'ratingAverage' | 'recommended' | 'relevance' | 'stars' | 'updatedAt' | 'watchers';
2042
+ }
2043
+ /**
2044
+ * Query parameters for skill detail
2045
+ */
2046
+ interface SkillDetailQuery {
2047
+ /** Locale for localized content such as description and summary; title remains canonical */
2048
+ locale?: string;
2049
+ /** Specific version to retrieve */
2050
+ version?: string;
2051
+ }
2052
+ /**
2053
+ * Parameters for reporting a GitHub skill
2054
+ */
2055
+ interface ReportGitHubSkillParams {
2056
+ /** Branch name (optional) */
2057
+ branch?: string;
2058
+ /** GitHub repository URL */
2059
+ gitUrl: string;
2060
+ }
2061
+ /**
2062
+ * Response from reporting a GitHub skill
2063
+ */
2064
+ interface ReportGitHubSkillResponse {
2065
+ /** Skill identifier */
2066
+ identifier: string;
2067
+ /** Status message */
2068
+ message: string;
2069
+ /** Status: 'queued' for new import, 'exists' if skill already exists */
2070
+ status: 'exists' | 'queued';
2071
+ }
2072
+ /**
2073
+ * Response for skill versions list
2074
+ */
2075
+ interface SkillVersionsResponse {
2076
+ /** List of version summaries */
2077
+ data: SkillVersionSummary[];
2078
+ }
2079
+
2080
+ type SkillCollectionItemSort = 'createdAt' | 'installCount' | 'name' | 'ratingAverage' | 'updatedAt';
2081
+ type SkillCollectionStatus = 'published' | 'unpublished';
2082
+ interface SkillCollectionListQuery {
2083
+ locale?: string;
2084
+ }
2085
+ interface SkillCollectionListItem {
2086
+ cover?: string;
2087
+ createdAt: string;
2088
+ icon: string;
2089
+ id: number;
2090
+ itemCount: number;
2091
+ position: number;
2092
+ slug: string;
2093
+ summary: string;
2094
+ title: string;
2095
+ updatedAt: string;
2096
+ }
2097
+ type SkillCollectionListResponse = SkillCollectionListItem[];
2098
+ interface SkillCollectionDetailQuery {
2099
+ locale?: string;
2100
+ page?: number;
2101
+ pageSize?: number;
2102
+ q?: string;
2103
+ sort?: SkillCollectionItemSort;
2104
+ }
2105
+ interface SkillCollectionDetail extends SkillCollectionListItem {
2106
+ currentPage: number;
2107
+ description?: string;
2108
+ items: SkillListItem[];
2109
+ pageSize: number;
2110
+ totalCount: number;
2111
+ totalPages: number;
2112
+ }
2113
+ interface AdminSkillCollectionListQuery {
2114
+ page?: number;
2115
+ pageSize?: number;
2116
+ q?: string;
2117
+ status?: SkillCollectionStatus | 'all';
2118
+ }
2119
+ interface AdminSkillCollectionListItem extends SkillCollectionListItem {
2120
+ status: SkillCollectionStatus;
2121
+ }
2122
+ interface AdminSkillCollectionListResponse {
2123
+ currentPage: number;
2124
+ items: AdminSkillCollectionListItem[];
2125
+ pageSize: number;
2126
+ totalCount: number;
2127
+ totalPages: number;
2128
+ }
2129
+ interface SkillCollectionConfiguredSkill {
2130
+ identifier: string;
2131
+ name: string;
2132
+ skillId: number;
2133
+ }
2134
+ interface AdminSkillCollectionDetail extends AdminSkillCollectionListItem {
2135
+ description?: string;
2136
+ excludedSkillIdentifiers: string[];
2137
+ manualExcludedSkills: SkillCollectionConfiguredSkill[];
2138
+ manualIncludedSkills: SkillCollectionConfiguredSkill[];
2139
+ repositories: string[];
2140
+ skillIdentifiers: string[];
2141
+ }
2142
+ interface SkillCollectionLocalization {
2143
+ collectionId: number;
2144
+ createdAt: string;
2145
+ description?: string;
2146
+ id: number;
2147
+ locale: string;
2148
+ summary: string;
2149
+ title: string;
2150
+ }
2151
+ interface UpsertSkillCollectionLocalizationRequest {
2152
+ description?: string | null;
2153
+ summary: string;
2154
+ title: string;
2155
+ }
2156
+ interface SkillCollectionLocalizationBatchResult {
2157
+ action: 'created' | 'updated';
2158
+ data: SkillCollectionLocalization;
2159
+ locale: string;
2160
+ }
2161
+ interface SkillCollectionLocalizationBatchResponse {
2162
+ message: string;
2163
+ results: SkillCollectionLocalizationBatchResult[];
2164
+ }
2165
+ interface BatchUpsertSkillCollectionLocalizationsRequest {
2166
+ localizations: Array<UpsertSkillCollectionLocalizationRequest & {
2167
+ locale: string;
2168
+ }>;
2169
+ }
2170
+ interface CreateSkillCollectionRequest {
2171
+ cover?: string | null;
2172
+ description?: string | null;
2173
+ excludedSkillIdentifiers?: string[];
2174
+ icon: string;
2175
+ position?: number;
2176
+ repositories?: string[];
2177
+ skillIdentifiers?: string[];
2178
+ slug: string;
2179
+ status?: SkillCollectionStatus;
2180
+ summary: string;
2181
+ title: string;
2182
+ }
2183
+ interface UpdateSkillCollectionRequest {
2184
+ cover?: string | null;
2185
+ description?: string | null;
2186
+ excludedSkillIdentifiers?: string[];
2187
+ icon?: string;
2188
+ position?: number;
2189
+ repositories?: string[];
2190
+ skillIdentifiers?: string[];
2191
+ slug?: string;
2192
+ status?: SkillCollectionStatus;
2193
+ summary?: string;
2194
+ title?: string;
2195
+ }
2196
+
2197
+ export { type AdminDeploymentOption, type AdminPluginItem, type AdminPluginItemDetail, AdminPluginItemSchema, type AdminSkillCollectionDetail, type AdminSkillCollectionListItem, type AdminSkillCollectionListQuery, type AdminSkillCollectionListResponse, type AdminSystemDependency, type AgentEventRequest, type AgentEventType, type AgentItem, type AgentMarketListQuery, type BasePluginItem, BasePluginItemSchema, type BatchUpsertSkillCollectionLocalizationsRequest, 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 CreateSkillCollectionRequest, type CredConfig, type CredType, type CustomPluginInfo, type DeploymentOption, type FileCredConfig, type IncompleteI18nPlugin, type InjectCredsForSkillRequest, type InjectCredsForSkillResponse, type InjectCredsRequest, type InjectCredsResponse, type InjectedFileInfo, type InstallFailureAnalysis, type InstallFailureAnalysisQuery, type InstallLogEntry, type InstallReportRequest, type InstallReportResponse, type InstallStats, type InstallationDetails, type InstallationMethod, InstallationMethodEnum, type KVEnvCredConfig, type KVHeaderCredConfig, type KVPayload, type MarketItemBase, type MarketPluginItem, type McpToolContent, type OAuthCredConfig, PluginCapabilitiesSchema, type PluginCompatibility, type PluginConnectionType, PluginConnectionTypeEnum, type PluginEventRequest, type PluginEventType, type PluginItemDetail, type PluginListQuery, 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 ReportGitHubSkillParams, type ReportGitHubSkillResponse, SKILL_CATEGORY_VALUES, type SitemapItem, type SitemapResponse, type SkillAuthor, type SkillCategory, SkillCategoryEnum, type SkillCategoryQuery, type SkillCollectionConfiguredSkill, type SkillCollectionDetail, type SkillCollectionDetailQuery, type SkillCollectionItemSort, type SkillCollectionListItem, type SkillCollectionListQuery, type SkillCollectionListResponse, type SkillCollectionLocalization, type SkillCollectionLocalizationBatchResponse, type SkillCollectionLocalizationBatchResult, type SkillCollectionStatus, type SkillCredDeclaration, type SkillCredStatus, type SkillDetail, type SkillDetailQuery, type SkillGitHubMeta, type SkillInstallReportRequest, type SkillInstallReportResponse, type SkillLicense, type SkillListItem, type SkillListQuery, type SkillListResponse, type SkillManifest, type SkillResource, type SkillVersionSummary, type SkillVersionsResponse, type StandardCredKey, StandardCredKeys, type SystemDependency, type TopPlugin, type TopPluginsQuery, type UpdateSkillCollectionRequest, type UpsertSkillCollectionLocalizationRequest, type UserCredSummary };