@objectstack/spec 0.9.1 → 0.9.2

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.
Files changed (117) hide show
  1. package/README.md +14 -0
  2. package/dist/ai/cost.zod.d.ts +1 -1
  3. package/dist/ai/devops-agent.zod.d.ts +6 -6
  4. package/dist/ai/index.d.ts +4 -0
  5. package/dist/ai/index.d.ts.map +1 -1
  6. package/dist/ai/index.js +4 -0
  7. package/dist/ai/plugin-development.zod.d.ts +415 -0
  8. package/dist/ai/plugin-development.zod.d.ts.map +1 -0
  9. package/dist/ai/plugin-development.zod.js +576 -0
  10. package/dist/ai/runtime-ops.zod.d.ts +480 -0
  11. package/dist/ai/runtime-ops.zod.d.ts.map +1 -0
  12. package/dist/ai/runtime-ops.zod.js +578 -0
  13. package/dist/api/discovery.zod.d.ts +1 -1
  14. package/dist/api/endpoint.zod.d.ts +2 -2
  15. package/dist/api/hub.zod.d.ts +74 -74
  16. package/dist/api/realtime.zod.d.ts +2 -2
  17. package/dist/api/websocket.zod.d.ts +6 -6
  18. package/dist/automation/trigger-registry.zod.d.ts +6 -6
  19. package/dist/contracts/service-registry.d.ts +1 -1
  20. package/dist/hub/hub-federation.zod.d.ts +4 -4
  21. package/dist/hub/index.d.ts +1 -0
  22. package/dist/hub/index.d.ts.map +1 -1
  23. package/dist/hub/index.js +1 -0
  24. package/dist/hub/license.zod.d.ts +1 -1
  25. package/dist/hub/marketplace-enhanced.zod.d.ts +1028 -0
  26. package/dist/hub/marketplace-enhanced.zod.d.ts.map +1 -0
  27. package/dist/hub/marketplace-enhanced.zod.js +728 -0
  28. package/dist/hub/plugin-registry.zod.d.ts +3 -3
  29. package/dist/hub/plugin-security.zod.d.ts +4 -4
  30. package/dist/hub/space.zod.d.ts +2 -2
  31. package/dist/integration/connector/database.zod.d.ts +1 -1
  32. package/dist/integration/connector/file-storage.zod.d.ts +1 -1
  33. package/dist/integration/connector/github.zod.d.ts +1 -1
  34. package/dist/integration/connector/message-queue.zod.d.ts +1 -1
  35. package/dist/integration/connector/saas.zod.d.ts +3 -3
  36. package/dist/integration/connector/vercel.zod.d.ts +4 -4
  37. package/dist/integration/connector.zod.d.ts +2 -2
  38. package/dist/stack.zod.d.ts +5 -5
  39. package/dist/system/index.d.ts +3 -0
  40. package/dist/system/index.d.ts.map +1 -1
  41. package/dist/system/index.js +3 -0
  42. package/dist/system/logging.zod.d.ts +5 -0
  43. package/dist/system/logging.zod.d.ts.map +1 -1
  44. package/dist/system/logging.zod.js +2 -1
  45. package/dist/system/notification.zod.d.ts +1 -1
  46. package/dist/system/plugin-lifecycle-advanced.zod.d.ts +357 -0
  47. package/dist/system/plugin-lifecycle-advanced.zod.d.ts.map +1 -0
  48. package/dist/system/plugin-lifecycle-advanced.zod.js +411 -0
  49. package/dist/system/plugin-security-advanced.zod.d.ts +904 -0
  50. package/dist/system/plugin-security-advanced.zod.d.ts.map +1 -0
  51. package/dist/system/plugin-security-advanced.zod.js +606 -0
  52. package/dist/system/plugin-versioning.zod.d.ts +438 -0
  53. package/dist/system/plugin-versioning.zod.d.ts.map +1 -0
  54. package/dist/system/plugin-versioning.zod.js +397 -0
  55. package/json-schema/ai/AICodeReviewResult.json +7 -0
  56. package/json-schema/ai/AIOpsAgentConfig.json +7 -0
  57. package/json-schema/ai/AnomalyDetectionConfig.json +7 -0
  58. package/json-schema/ai/AutoScalingPolicy.json +7 -0
  59. package/json-schema/ai/CodeGenerationRequest.json +7 -0
  60. package/json-schema/ai/GeneratedCode.json +7 -0
  61. package/json-schema/ai/PerformanceOptimization.json +7 -0
  62. package/json-schema/ai/PluginCompositionRequest.json +7 -0
  63. package/json-schema/ai/PluginCompositionResult.json +7 -0
  64. package/json-schema/ai/PluginRecommendation.json +7 -0
  65. package/json-schema/ai/PluginRecommendationRequest.json +7 -0
  66. package/json-schema/ai/PluginScaffoldingTemplate.json +7 -0
  67. package/json-schema/ai/RootCauseAnalysisRequest.json +7 -0
  68. package/json-schema/ai/RootCauseAnalysisResult.json +7 -0
  69. package/json-schema/ai/SelfHealingAction.json +7 -0
  70. package/json-schema/ai/SelfHealingConfig.json +7 -0
  71. package/json-schema/hub/MarketplaceQualityMetrics.json +7 -0
  72. package/json-schema/hub/PluginCategory.json +7 -0
  73. package/json-schema/hub/PluginCertification.json +7 -0
  74. package/json-schema/hub/PluginInstallationRequest.json +7 -0
  75. package/json-schema/hub/PluginInstallationStatus.json +7 -0
  76. package/json-schema/hub/PluginLicense.json +7 -0
  77. package/json-schema/hub/PluginMarketplaceListing.json +7 -0
  78. package/json-schema/hub/PluginRating.json +7 -0
  79. package/json-schema/hub/PluginRevenueSharing.json +7 -0
  80. package/json-schema/hub/PluginSearchQuery.json +7 -0
  81. package/json-schema/hub/PluginTag.json +7 -0
  82. package/json-schema/hub/RegistryConfig.json +7 -0
  83. package/json-schema/hub/RegistrySyncPolicy.json +7 -0
  84. package/json-schema/hub/RegistryUpstream.json +7 -0
  85. package/json-schema/system/AdvancedPluginLifecycleConfig.json +7 -0
  86. package/json-schema/system/BreakingChange.json +7 -0
  87. package/json-schema/system/CompatibilityLevel.json +7 -0
  88. package/json-schema/system/CompatibilityMatrixEntry.json +7 -0
  89. package/json-schema/system/DependencyConflict.json +7 -0
  90. package/json-schema/system/DependencyResolutionResult.json +7 -0
  91. package/json-schema/system/DeprecationNotice.json +7 -0
  92. package/json-schema/system/DistributedStateConfig.json +7 -0
  93. package/json-schema/system/GracefulDegradation.json +7 -0
  94. package/json-schema/system/HotReloadConfig.json +7 -0
  95. package/json-schema/system/MultiVersionSupport.json +7 -0
  96. package/json-schema/system/Permission.json +7 -0
  97. package/json-schema/system/PermissionAction.json +7 -0
  98. package/json-schema/system/PermissionScope.json +7 -0
  99. package/json-schema/system/PermissionSet.json +7 -0
  100. package/json-schema/system/PluginCompatibilityMatrix.json +7 -0
  101. package/json-schema/system/PluginHealthCheck.json +7 -0
  102. package/json-schema/system/PluginHealthReport.json +7 -0
  103. package/json-schema/system/PluginHealthStatus.json +7 -0
  104. package/json-schema/system/PluginSecurityManifest.json +7 -0
  105. package/json-schema/system/PluginStateSnapshot.json +7 -0
  106. package/json-schema/system/PluginTrustLevel.json +7 -0
  107. package/json-schema/system/PluginUpdateStrategy.json +7 -0
  108. package/json-schema/system/PluginVersionMetadata.json +7 -0
  109. package/json-schema/system/ResourceType.json +7 -0
  110. package/json-schema/system/RuntimeConfig.json +7 -0
  111. package/json-schema/system/SandboxConfig.json +7 -0
  112. package/json-schema/system/SecurityPolicy.json +7 -0
  113. package/json-schema/system/SecurityScanResult.json +7 -0
  114. package/json-schema/system/SecurityVulnerability.json +7 -0
  115. package/json-schema/system/SemanticVersion.json +7 -0
  116. package/json-schema/system/VersionConstraint.json +7 -0
  117. package/package.json +1 -1
@@ -0,0 +1,576 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PluginRecommendationSchema = exports.PluginRecommendationRequestSchema = exports.PluginCompositionResultSchema = exports.PluginCompositionRequestSchema = exports.AICodeReviewResultSchema = exports.PluginScaffoldingTemplateSchema = exports.GeneratedCodeSchema = exports.CodeGenerationRequestSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * # AI-Driven Plugin Development Protocol
7
+ *
8
+ * Defines protocols for AI-powered plugin development including:
9
+ * - Natural language to code generation
10
+ * - Intelligent code scaffolding
11
+ * - Automated testing and validation
12
+ * - AI-powered code review and optimization
13
+ * - Plugin composition and recommendation
14
+ */
15
+ /**
16
+ * Code Generation Request
17
+ * Request for AI to generate plugin code
18
+ */
19
+ exports.CodeGenerationRequestSchema = zod_1.z.object({
20
+ /**
21
+ * Natural language description of desired functionality
22
+ */
23
+ description: zod_1.z.string().describe('What the plugin should do'),
24
+ /**
25
+ * Plugin type to generate
26
+ */
27
+ pluginType: zod_1.z.enum([
28
+ 'driver', // Data driver plugin
29
+ 'app', // Application plugin
30
+ 'widget', // UI widget
31
+ 'integration', // External integration
32
+ 'automation', // Automation/workflow
33
+ 'analytics', // Analytics plugin
34
+ 'ai-agent', // AI agent plugin
35
+ 'custom', // Custom plugin type
36
+ ]),
37
+ /**
38
+ * Output format for generated code
39
+ */
40
+ outputFormat: zod_1.z.enum([
41
+ 'source-code', // Generate TypeScript/JavaScript source code
42
+ 'low-code-schema', // Generate ObjectStack JSON/YAML schema definitions
43
+ 'dsl', // Generate domain-specific language definitions
44
+ ]).default('source-code')
45
+ .describe('Format of the generated output'),
46
+ /**
47
+ * Target programming language (for source-code format)
48
+ */
49
+ language: zod_1.z.enum(['typescript', 'javascript', 'python']).default('typescript'),
50
+ /**
51
+ * Framework preferences
52
+ */
53
+ framework: zod_1.z.object({
54
+ runtime: zod_1.z.enum(['node', 'browser', 'edge', 'universal']).optional(),
55
+ uiFramework: zod_1.z.enum(['react', 'vue', 'svelte', 'none']).optional(),
56
+ testing: zod_1.z.enum(['vitest', 'jest', 'mocha', 'none']).optional(),
57
+ }).optional(),
58
+ /**
59
+ * Required capabilities
60
+ */
61
+ capabilities: zod_1.z.array(zod_1.z.string()).optional().describe('Protocol IDs to implement'),
62
+ /**
63
+ * Dependencies
64
+ */
65
+ dependencies: zod_1.z.array(zod_1.z.string()).optional().describe('Required plugin IDs'),
66
+ /**
67
+ * Example usage (helps AI understand intent)
68
+ */
69
+ examples: zod_1.z.array(zod_1.z.object({
70
+ input: zod_1.z.string(),
71
+ expectedOutput: zod_1.z.string(),
72
+ description: zod_1.z.string().optional(),
73
+ })).optional(),
74
+ /**
75
+ * Code style preferences (for source-code format)
76
+ */
77
+ style: zod_1.z.object({
78
+ indentation: zod_1.z.enum(['tab', '2spaces', '4spaces']).default('2spaces'),
79
+ quotes: zod_1.z.enum(['single', 'double']).default('single'),
80
+ semicolons: zod_1.z.boolean().default(true),
81
+ trailingComma: zod_1.z.boolean().default(true),
82
+ }).optional(),
83
+ /**
84
+ * Low-code schema preferences (for low-code-schema format)
85
+ */
86
+ schemaOptions: zod_1.z.object({
87
+ /**
88
+ * Schema format
89
+ */
90
+ format: zod_1.z.enum(['json', 'yaml', 'typescript']).default('typescript')
91
+ .describe('Output schema format'),
92
+ /**
93
+ * Include example data
94
+ */
95
+ includeExamples: zod_1.z.boolean().default(true),
96
+ /**
97
+ * Validation strictness
98
+ */
99
+ strictValidation: zod_1.z.boolean().default(true),
100
+ /**
101
+ * Generate UI definitions
102
+ */
103
+ generateUI: zod_1.z.boolean().default(true)
104
+ .describe('Generate view, dashboard, and page definitions'),
105
+ /**
106
+ * Generate data models
107
+ */
108
+ generateDataModels: zod_1.z.boolean().default(true)
109
+ .describe('Generate object and field definitions'),
110
+ }).optional(),
111
+ /**
112
+ * Additional context
113
+ */
114
+ context: zod_1.z.object({
115
+ /**
116
+ * Existing code to extend
117
+ */
118
+ existingCode: zod_1.z.string().optional(),
119
+ /**
120
+ * Related documentation URLs
121
+ */
122
+ documentationUrls: zod_1.z.array(zod_1.z.string()).optional(),
123
+ /**
124
+ * Similar plugins for reference
125
+ */
126
+ referencePlugins: zod_1.z.array(zod_1.z.string()).optional(),
127
+ }).optional(),
128
+ /**
129
+ * Generation options
130
+ */
131
+ options: zod_1.z.object({
132
+ /**
133
+ * Include tests
134
+ */
135
+ generateTests: zod_1.z.boolean().default(true),
136
+ /**
137
+ * Include documentation
138
+ */
139
+ generateDocs: zod_1.z.boolean().default(true),
140
+ /**
141
+ * Include examples
142
+ */
143
+ generateExamples: zod_1.z.boolean().default(true),
144
+ /**
145
+ * Code coverage target
146
+ */
147
+ targetCoverage: zod_1.z.number().min(0).max(100).default(80),
148
+ /**
149
+ * Optimization level
150
+ */
151
+ optimizationLevel: zod_1.z.enum(['none', 'basic', 'aggressive']).default('basic'),
152
+ }).optional(),
153
+ });
154
+ /**
155
+ * Generated Code
156
+ * Result of code generation
157
+ */
158
+ exports.GeneratedCodeSchema = zod_1.z.object({
159
+ /**
160
+ * Output format used
161
+ */
162
+ outputFormat: zod_1.z.enum(['source-code', 'low-code-schema', 'dsl']),
163
+ /**
164
+ * Main plugin code (for source-code format)
165
+ */
166
+ code: zod_1.z.string().optional(),
167
+ /**
168
+ * Language used (for source-code format)
169
+ */
170
+ language: zod_1.z.string().optional(),
171
+ /**
172
+ * Low-code schema definitions (for low-code-schema format)
173
+ */
174
+ schemas: zod_1.z.array(zod_1.z.object({
175
+ type: zod_1.z.enum(['object', 'view', 'dashboard', 'app', 'workflow', 'api', 'page']),
176
+ path: zod_1.z.string().describe('File path for the schema'),
177
+ content: zod_1.z.string().describe('Schema content (JSON/YAML/TypeScript)'),
178
+ description: zod_1.z.string().optional(),
179
+ })).optional()
180
+ .describe('Generated low-code schema files'),
181
+ /**
182
+ * File structure
183
+ */
184
+ files: zod_1.z.array(zod_1.z.object({
185
+ path: zod_1.z.string(),
186
+ content: zod_1.z.string(),
187
+ description: zod_1.z.string().optional(),
188
+ })),
189
+ /**
190
+ * Generated tests
191
+ */
192
+ tests: zod_1.z.array(zod_1.z.object({
193
+ path: zod_1.z.string(),
194
+ content: zod_1.z.string(),
195
+ coverage: zod_1.z.number().min(0).max(100).optional(),
196
+ })).optional(),
197
+ /**
198
+ * Documentation
199
+ */
200
+ documentation: zod_1.z.object({
201
+ readme: zod_1.z.string().optional(),
202
+ api: zod_1.z.string().optional(),
203
+ usage: zod_1.z.string().optional(),
204
+ }).optional(),
205
+ /**
206
+ * Package metadata
207
+ */
208
+ package: zod_1.z.object({
209
+ name: zod_1.z.string(),
210
+ version: zod_1.z.string(),
211
+ dependencies: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
212
+ devDependencies: zod_1.z.record(zod_1.z.string(), zod_1.z.string()).optional(),
213
+ }).optional(),
214
+ /**
215
+ * Quality metrics
216
+ */
217
+ quality: zod_1.z.object({
218
+ complexity: zod_1.z.number().optional().describe('Cyclomatic complexity'),
219
+ maintainability: zod_1.z.number().min(0).max(100).optional(),
220
+ testCoverage: zod_1.z.number().min(0).max(100).optional(),
221
+ lintScore: zod_1.z.number().min(0).max(100).optional(),
222
+ }).optional(),
223
+ /**
224
+ * AI confidence score
225
+ */
226
+ confidence: zod_1.z.number().min(0).max(100).describe('AI confidence in generated code'),
227
+ /**
228
+ * Suggestions for improvement
229
+ */
230
+ suggestions: zod_1.z.array(zod_1.z.string()).optional(),
231
+ /**
232
+ * Warnings or caveats
233
+ */
234
+ warnings: zod_1.z.array(zod_1.z.string()).optional(),
235
+ });
236
+ /**
237
+ * Plugin Scaffolding Template
238
+ * Template for plugin structure
239
+ */
240
+ exports.PluginScaffoldingTemplateSchema = zod_1.z.object({
241
+ /**
242
+ * Template identifier
243
+ */
244
+ id: zod_1.z.string(),
245
+ /**
246
+ * Template name
247
+ */
248
+ name: zod_1.z.string(),
249
+ /**
250
+ * Description
251
+ */
252
+ description: zod_1.z.string(),
253
+ /**
254
+ * Plugin type
255
+ */
256
+ pluginType: zod_1.z.string(),
257
+ /**
258
+ * File structure
259
+ */
260
+ structure: zod_1.z.array(zod_1.z.object({
261
+ type: zod_1.z.enum(['file', 'directory']),
262
+ path: zod_1.z.string(),
263
+ template: zod_1.z.string().optional().describe('Template content with variables'),
264
+ optional: zod_1.z.boolean().default(false),
265
+ })),
266
+ /**
267
+ * Variables to be filled
268
+ */
269
+ variables: zod_1.z.array(zod_1.z.object({
270
+ name: zod_1.z.string(),
271
+ description: zod_1.z.string(),
272
+ type: zod_1.z.enum(['string', 'number', 'boolean', 'array', 'object']),
273
+ required: zod_1.z.boolean().default(true),
274
+ default: zod_1.z.any().optional(),
275
+ validation: zod_1.z.string().optional().describe('Validation regex or rule'),
276
+ })),
277
+ /**
278
+ * Post-scaffold scripts
279
+ */
280
+ scripts: zod_1.z.array(zod_1.z.object({
281
+ name: zod_1.z.string(),
282
+ command: zod_1.z.string(),
283
+ description: zod_1.z.string().optional(),
284
+ optional: zod_1.z.boolean().default(false),
285
+ })).optional(),
286
+ });
287
+ /**
288
+ * AI Code Review Result
289
+ * Result of AI-powered code review
290
+ */
291
+ exports.AICodeReviewResultSchema = zod_1.z.object({
292
+ /**
293
+ * Overall assessment
294
+ */
295
+ assessment: zod_1.z.enum(['excellent', 'good', 'acceptable', 'needs-improvement', 'poor']),
296
+ /**
297
+ * Overall score (0-100)
298
+ */
299
+ score: zod_1.z.number().min(0).max(100),
300
+ /**
301
+ * Issues found
302
+ */
303
+ issues: zod_1.z.array(zod_1.z.object({
304
+ severity: zod_1.z.enum(['critical', 'error', 'warning', 'info', 'style']),
305
+ category: zod_1.z.enum([
306
+ 'bug',
307
+ 'security',
308
+ 'performance',
309
+ 'maintainability',
310
+ 'style',
311
+ 'documentation',
312
+ 'testing',
313
+ 'type-safety',
314
+ 'best-practice',
315
+ ]),
316
+ file: zod_1.z.string(),
317
+ line: zod_1.z.number().int().optional(),
318
+ column: zod_1.z.number().int().optional(),
319
+ message: zod_1.z.string(),
320
+ suggestion: zod_1.z.string().optional(),
321
+ autoFixable: zod_1.z.boolean().default(false),
322
+ autoFix: zod_1.z.string().optional().describe('Automated fix code'),
323
+ })),
324
+ /**
325
+ * Positive highlights
326
+ */
327
+ highlights: zod_1.z.array(zod_1.z.object({
328
+ category: zod_1.z.string(),
329
+ description: zod_1.z.string(),
330
+ file: zod_1.z.string().optional(),
331
+ })).optional(),
332
+ /**
333
+ * Quality metrics
334
+ */
335
+ metrics: zod_1.z.object({
336
+ complexity: zod_1.z.number().optional(),
337
+ maintainability: zod_1.z.number().min(0).max(100).optional(),
338
+ testCoverage: zod_1.z.number().min(0).max(100).optional(),
339
+ duplicateCode: zod_1.z.number().min(0).max(100).optional(),
340
+ technicalDebt: zod_1.z.string().optional().describe('Estimated technical debt'),
341
+ }).optional(),
342
+ /**
343
+ * Recommendations
344
+ */
345
+ recommendations: zod_1.z.array(zod_1.z.object({
346
+ priority: zod_1.z.enum(['high', 'medium', 'low']),
347
+ title: zod_1.z.string(),
348
+ description: zod_1.z.string(),
349
+ effort: zod_1.z.enum(['trivial', 'small', 'medium', 'large']).optional(),
350
+ })),
351
+ /**
352
+ * Security analysis
353
+ */
354
+ security: zod_1.z.object({
355
+ vulnerabilities: zod_1.z.array(zod_1.z.object({
356
+ severity: zod_1.z.enum(['critical', 'high', 'medium', 'low']),
357
+ type: zod_1.z.string(),
358
+ description: zod_1.z.string(),
359
+ remediation: zod_1.z.string().optional(),
360
+ })).optional(),
361
+ score: zod_1.z.number().min(0).max(100).optional(),
362
+ }).optional(),
363
+ });
364
+ /**
365
+ * Plugin Composition Request
366
+ * Request for AI to compose multiple plugins together
367
+ */
368
+ exports.PluginCompositionRequestSchema = zod_1.z.object({
369
+ /**
370
+ * Desired outcome
371
+ */
372
+ goal: zod_1.z.string().describe('What should the composed plugins achieve'),
373
+ /**
374
+ * Available plugins
375
+ */
376
+ availablePlugins: zod_1.z.array(zod_1.z.object({
377
+ pluginId: zod_1.z.string(),
378
+ version: zod_1.z.string(),
379
+ capabilities: zod_1.z.array(zod_1.z.string()).optional(),
380
+ description: zod_1.z.string().optional(),
381
+ })),
382
+ /**
383
+ * Constraints
384
+ */
385
+ constraints: zod_1.z.object({
386
+ /**
387
+ * Maximum plugins to use
388
+ */
389
+ maxPlugins: zod_1.z.number().int().min(1).optional(),
390
+ /**
391
+ * Required plugins
392
+ */
393
+ requiredPlugins: zod_1.z.array(zod_1.z.string()).optional(),
394
+ /**
395
+ * Excluded plugins
396
+ */
397
+ excludedPlugins: zod_1.z.array(zod_1.z.string()).optional(),
398
+ /**
399
+ * Performance requirements
400
+ */
401
+ performance: zod_1.z.object({
402
+ maxLatency: zod_1.z.number().optional().describe('Maximum latency in ms'),
403
+ maxMemory: zod_1.z.number().optional().describe('Maximum memory in bytes'),
404
+ }).optional(),
405
+ }).optional(),
406
+ /**
407
+ * Optimization criteria
408
+ */
409
+ optimize: zod_1.z.enum([
410
+ 'performance',
411
+ 'reliability',
412
+ 'simplicity',
413
+ 'cost',
414
+ 'security',
415
+ ]).optional(),
416
+ });
417
+ /**
418
+ * Plugin Composition Result
419
+ * AI-generated plugin composition
420
+ */
421
+ exports.PluginCompositionResultSchema = zod_1.z.object({
422
+ /**
423
+ * Selected plugins
424
+ */
425
+ plugins: zod_1.z.array(zod_1.z.object({
426
+ pluginId: zod_1.z.string(),
427
+ version: zod_1.z.string(),
428
+ role: zod_1.z.string().describe('Role in the composition'),
429
+ configuration: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
430
+ })),
431
+ /**
432
+ * Integration code
433
+ */
434
+ integration: zod_1.z.object({
435
+ /**
436
+ * Glue code to connect plugins
437
+ */
438
+ code: zod_1.z.string(),
439
+ /**
440
+ * Configuration
441
+ */
442
+ config: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
443
+ /**
444
+ * Initialization order
445
+ */
446
+ initOrder: zod_1.z.array(zod_1.z.string()),
447
+ }),
448
+ /**
449
+ * Data flow diagram
450
+ */
451
+ dataFlow: zod_1.z.array(zod_1.z.object({
452
+ from: zod_1.z.string(),
453
+ to: zod_1.z.string(),
454
+ data: zod_1.z.string().describe('Data type or description'),
455
+ })),
456
+ /**
457
+ * Expected performance
458
+ */
459
+ performance: zod_1.z.object({
460
+ estimatedLatency: zod_1.z.number().optional().describe('Estimated latency in ms'),
461
+ estimatedMemory: zod_1.z.number().optional().describe('Estimated memory in bytes'),
462
+ }).optional(),
463
+ /**
464
+ * Confidence score
465
+ */
466
+ confidence: zod_1.z.number().min(0).max(100),
467
+ /**
468
+ * Alternative compositions
469
+ */
470
+ alternatives: zod_1.z.array(zod_1.z.object({
471
+ description: zod_1.z.string(),
472
+ plugins: zod_1.z.array(zod_1.z.string()),
473
+ tradeoffs: zod_1.z.string(),
474
+ })).optional(),
475
+ /**
476
+ * Warnings and considerations
477
+ */
478
+ warnings: zod_1.z.array(zod_1.z.string()).optional(),
479
+ });
480
+ /**
481
+ * Plugin Recommendation Request
482
+ * Request for plugin recommendations
483
+ */
484
+ exports.PluginRecommendationRequestSchema = zod_1.z.object({
485
+ /**
486
+ * User context
487
+ */
488
+ context: zod_1.z.object({
489
+ /**
490
+ * Current plugins installed
491
+ */
492
+ installedPlugins: zod_1.z.array(zod_1.z.string()).optional(),
493
+ /**
494
+ * User's industry
495
+ */
496
+ industry: zod_1.z.string().optional(),
497
+ /**
498
+ * Use cases
499
+ */
500
+ useCases: zod_1.z.array(zod_1.z.string()).optional(),
501
+ /**
502
+ * Team size
503
+ */
504
+ teamSize: zod_1.z.number().int().optional(),
505
+ /**
506
+ * Budget constraints
507
+ */
508
+ budget: zod_1.z.enum(['free', 'low', 'medium', 'high', 'unlimited']).optional(),
509
+ }),
510
+ /**
511
+ * Recommendation criteria
512
+ */
513
+ criteria: zod_1.z.object({
514
+ /**
515
+ * Prioritize by
516
+ */
517
+ prioritize: zod_1.z.enum([
518
+ 'popularity',
519
+ 'rating',
520
+ 'compatibility',
521
+ 'features',
522
+ 'cost',
523
+ 'support',
524
+ ]).optional(),
525
+ /**
526
+ * Only certified plugins
527
+ */
528
+ certifiedOnly: zod_1.z.boolean().default(false),
529
+ /**
530
+ * Minimum rating
531
+ */
532
+ minRating: zod_1.z.number().min(0).max(5).optional(),
533
+ /**
534
+ * Maximum results
535
+ */
536
+ maxResults: zod_1.z.number().int().min(1).max(50).default(10),
537
+ }).optional(),
538
+ });
539
+ /**
540
+ * Plugin Recommendation
541
+ * AI-generated plugin recommendation
542
+ */
543
+ exports.PluginRecommendationSchema = zod_1.z.object({
544
+ /**
545
+ * Recommended plugins
546
+ */
547
+ recommendations: zod_1.z.array(zod_1.z.object({
548
+ pluginId: zod_1.z.string(),
549
+ name: zod_1.z.string(),
550
+ description: zod_1.z.string(),
551
+ score: zod_1.z.number().min(0).max(100).describe('Relevance score'),
552
+ reasons: zod_1.z.array(zod_1.z.string()).describe('Why this plugin is recommended'),
553
+ benefits: zod_1.z.array(zod_1.z.string()),
554
+ considerations: zod_1.z.array(zod_1.z.string()).optional(),
555
+ alternatives: zod_1.z.array(zod_1.z.string()).optional(),
556
+ estimatedValue: zod_1.z.string().optional().describe('Expected value/ROI'),
557
+ })),
558
+ /**
559
+ * Recommended combinations
560
+ */
561
+ combinations: zod_1.z.array(zod_1.z.object({
562
+ plugins: zod_1.z.array(zod_1.z.string()),
563
+ description: zod_1.z.string(),
564
+ synergies: zod_1.z.array(zod_1.z.string()).describe('How these plugins work well together'),
565
+ totalScore: zod_1.z.number().min(0).max(100),
566
+ })).optional(),
567
+ /**
568
+ * Learning path
569
+ */
570
+ learningPath: zod_1.z.array(zod_1.z.object({
571
+ step: zod_1.z.number().int(),
572
+ plugin: zod_1.z.string(),
573
+ reason: zod_1.z.string(),
574
+ resources: zod_1.z.array(zod_1.z.string()).optional(),
575
+ })).optional(),
576
+ });