@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,578 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AIOpsAgentConfigSchema = exports.PerformanceOptimizationSchema = exports.RootCauseAnalysisResultSchema = exports.RootCauseAnalysisRequestSchema = exports.AutoScalingPolicySchema = exports.SelfHealingConfigSchema = exports.SelfHealingActionSchema = exports.AnomalyDetectionConfigSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const plugin_lifecycle_advanced_zod_1 = require("../system/plugin-lifecycle-advanced.zod");
6
+ /**
7
+ * # Runtime AI Operations (AIOps) Protocol
8
+ *
9
+ * Defines protocols for AI-powered runtime operations including:
10
+ * - Self-healing and automatic recovery
11
+ * - Intelligent auto-scaling
12
+ * - Anomaly detection and prediction
13
+ * - Performance optimization
14
+ * - Root cause analysis
15
+ */
16
+ /**
17
+ * Anomaly Detection Configuration
18
+ * Configuration for detecting anomalies in plugin behavior
19
+ */
20
+ exports.AnomalyDetectionConfigSchema = zod_1.z.object({
21
+ /**
22
+ * Enable anomaly detection
23
+ */
24
+ enabled: zod_1.z.boolean().default(true),
25
+ /**
26
+ * Metrics to monitor
27
+ */
28
+ metrics: zod_1.z.array(zod_1.z.enum([
29
+ 'cpu-usage',
30
+ 'memory-usage',
31
+ 'response-time',
32
+ 'error-rate',
33
+ 'throughput',
34
+ 'latency',
35
+ 'connection-count',
36
+ 'queue-depth',
37
+ ])),
38
+ /**
39
+ * Detection algorithm
40
+ */
41
+ algorithm: zod_1.z.enum([
42
+ 'statistical', // Statistical thresholds
43
+ 'machine-learning', // ML-based detection
44
+ 'heuristic', // Rule-based heuristics
45
+ 'hybrid', // Combination of methods
46
+ ]).default('hybrid'),
47
+ /**
48
+ * Sensitivity level
49
+ */
50
+ sensitivity: zod_1.z.enum(['low', 'medium', 'high']).default('medium')
51
+ .describe('How aggressively to detect anomalies'),
52
+ /**
53
+ * Time window for analysis (seconds)
54
+ */
55
+ timeWindow: zod_1.z.number().int().min(60).default(300)
56
+ .describe('Historical data window for anomaly detection'),
57
+ /**
58
+ * Confidence threshold (0-100)
59
+ */
60
+ confidenceThreshold: zod_1.z.number().min(0).max(100).default(80)
61
+ .describe('Minimum confidence to flag as anomaly'),
62
+ /**
63
+ * Alert on detection
64
+ */
65
+ alertOnDetection: zod_1.z.boolean().default(true),
66
+ });
67
+ /**
68
+ * Self-Healing Action
69
+ * Defines an automated recovery action
70
+ */
71
+ exports.SelfHealingActionSchema = zod_1.z.object({
72
+ /**
73
+ * Action identifier
74
+ */
75
+ id: zod_1.z.string(),
76
+ /**
77
+ * Action type
78
+ */
79
+ type: zod_1.z.enum([
80
+ 'restart', // Restart the plugin
81
+ 'scale', // Scale resources
82
+ 'rollback', // Rollback to previous version
83
+ 'clear-cache', // Clear caches
84
+ 'adjust-config', // Adjust configuration
85
+ 'execute-script', // Run custom script
86
+ 'notify', // Notify administrators
87
+ ]),
88
+ /**
89
+ * Trigger condition
90
+ */
91
+ trigger: zod_1.z.object({
92
+ /**
93
+ * Health status that triggers this action
94
+ */
95
+ healthStatus: zod_1.z.array(plugin_lifecycle_advanced_zod_1.PluginHealthStatusSchema).optional(),
96
+ /**
97
+ * Anomaly types that trigger this action
98
+ */
99
+ anomalyTypes: zod_1.z.array(zod_1.z.string()).optional(),
100
+ /**
101
+ * Error patterns that trigger this action
102
+ */
103
+ errorPatterns: zod_1.z.array(zod_1.z.string()).optional(),
104
+ /**
105
+ * Custom condition expression
106
+ */
107
+ customCondition: zod_1.z.string().optional()
108
+ .describe('Custom trigger condition (e.g., "errorRate > 0.1")'),
109
+ }),
110
+ /**
111
+ * Action parameters
112
+ */
113
+ parameters: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
114
+ /**
115
+ * Maximum number of attempts
116
+ */
117
+ maxAttempts: zod_1.z.number().int().min(1).default(3),
118
+ /**
119
+ * Cooldown period between attempts (seconds)
120
+ */
121
+ cooldown: zod_1.z.number().int().min(0).default(60),
122
+ /**
123
+ * Timeout for action execution (seconds)
124
+ */
125
+ timeout: zod_1.z.number().int().min(1).default(300),
126
+ /**
127
+ * Require manual approval
128
+ */
129
+ requireApproval: zod_1.z.boolean().default(false),
130
+ /**
131
+ * Priority
132
+ */
133
+ priority: zod_1.z.number().int().min(1).default(5)
134
+ .describe('Action priority (lower number = higher priority)'),
135
+ });
136
+ /**
137
+ * Self-Healing Configuration
138
+ * Complete configuration for self-healing capabilities
139
+ */
140
+ exports.SelfHealingConfigSchema = zod_1.z.object({
141
+ /**
142
+ * Enable self-healing
143
+ */
144
+ enabled: zod_1.z.boolean().default(true),
145
+ /**
146
+ * Healing strategy
147
+ */
148
+ strategy: zod_1.z.enum([
149
+ 'conservative', // Only safe, proven actions
150
+ 'moderate', // Balanced approach
151
+ 'aggressive', // Try more recovery options
152
+ ]).default('moderate'),
153
+ /**
154
+ * Recovery actions
155
+ */
156
+ actions: zod_1.z.array(exports.SelfHealingActionSchema),
157
+ /**
158
+ * Anomaly detection
159
+ */
160
+ anomalyDetection: exports.AnomalyDetectionConfigSchema.optional(),
161
+ /**
162
+ * Maximum concurrent healing operations
163
+ */
164
+ maxConcurrentHealing: zod_1.z.number().int().min(1).default(1)
165
+ .describe('Maximum number of simultaneous healing attempts'),
166
+ /**
167
+ * Learning mode
168
+ */
169
+ learning: zod_1.z.object({
170
+ enabled: zod_1.z.boolean().default(true)
171
+ .describe('Learn from successful/failed healing attempts'),
172
+ feedbackLoop: zod_1.z.boolean().default(true)
173
+ .describe('Adjust strategy based on outcomes'),
174
+ }).optional(),
175
+ });
176
+ /**
177
+ * Auto-Scaling Policy
178
+ * Defines how to automatically scale plugin resources
179
+ */
180
+ exports.AutoScalingPolicySchema = zod_1.z.object({
181
+ /**
182
+ * Enable auto-scaling
183
+ */
184
+ enabled: zod_1.z.boolean().default(false),
185
+ /**
186
+ * Scaling metric
187
+ */
188
+ metric: zod_1.z.enum([
189
+ 'cpu-usage',
190
+ 'memory-usage',
191
+ 'request-rate',
192
+ 'response-time',
193
+ 'queue-depth',
194
+ 'custom',
195
+ ]),
196
+ /**
197
+ * Custom metric query (when metric is "custom")
198
+ */
199
+ customMetric: zod_1.z.string().optional(),
200
+ /**
201
+ * Target value for the metric
202
+ */
203
+ targetValue: zod_1.z.number()
204
+ .describe('Desired metric value (e.g., 70 for 70% CPU)'),
205
+ /**
206
+ * Scaling bounds
207
+ */
208
+ bounds: zod_1.z.object({
209
+ /**
210
+ * Minimum instances
211
+ */
212
+ minInstances: zod_1.z.number().int().min(1).default(1),
213
+ /**
214
+ * Maximum instances
215
+ */
216
+ maxInstances: zod_1.z.number().int().min(1).default(10),
217
+ /**
218
+ * Minimum resources per instance
219
+ */
220
+ minResources: zod_1.z.object({
221
+ cpu: zod_1.z.string().optional().describe('CPU limit (e.g., "0.5", "1")'),
222
+ memory: zod_1.z.string().optional().describe('Memory limit (e.g., "512Mi", "1Gi")'),
223
+ }).optional(),
224
+ /**
225
+ * Maximum resources per instance
226
+ */
227
+ maxResources: zod_1.z.object({
228
+ cpu: zod_1.z.string().optional(),
229
+ memory: zod_1.z.string().optional(),
230
+ }).optional(),
231
+ }),
232
+ /**
233
+ * Scale up behavior
234
+ */
235
+ scaleUp: zod_1.z.object({
236
+ /**
237
+ * Threshold to trigger scale up
238
+ */
239
+ threshold: zod_1.z.number()
240
+ .describe('Metric value that triggers scale up'),
241
+ /**
242
+ * Stabilization window (seconds)
243
+ */
244
+ stabilizationWindow: zod_1.z.number().int().min(0).default(60)
245
+ .describe('How long metric must exceed threshold'),
246
+ /**
247
+ * Cooldown period (seconds)
248
+ */
249
+ cooldown: zod_1.z.number().int().min(0).default(300)
250
+ .describe('Minimum time between scale-up operations'),
251
+ /**
252
+ * Step size
253
+ */
254
+ stepSize: zod_1.z.number().int().min(1).default(1)
255
+ .describe('Number of instances to add'),
256
+ }),
257
+ /**
258
+ * Scale down behavior
259
+ */
260
+ scaleDown: zod_1.z.object({
261
+ /**
262
+ * Threshold to trigger scale down
263
+ */
264
+ threshold: zod_1.z.number()
265
+ .describe('Metric value that triggers scale down'),
266
+ /**
267
+ * Stabilization window (seconds)
268
+ */
269
+ stabilizationWindow: zod_1.z.number().int().min(0).default(300)
270
+ .describe('How long metric must be below threshold'),
271
+ /**
272
+ * Cooldown period (seconds)
273
+ */
274
+ cooldown: zod_1.z.number().int().min(0).default(600)
275
+ .describe('Minimum time between scale-down operations'),
276
+ /**
277
+ * Step size
278
+ */
279
+ stepSize: zod_1.z.number().int().min(1).default(1)
280
+ .describe('Number of instances to remove'),
281
+ }),
282
+ /**
283
+ * Predictive scaling
284
+ */
285
+ predictive: zod_1.z.object({
286
+ enabled: zod_1.z.boolean().default(false)
287
+ .describe('Use ML to predict future load'),
288
+ lookAhead: zod_1.z.number().int().min(60).default(300)
289
+ .describe('How far ahead to predict (seconds)'),
290
+ confidence: zod_1.z.number().min(0).max(100).default(80)
291
+ .describe('Minimum confidence for prediction-based scaling'),
292
+ }).optional(),
293
+ });
294
+ /**
295
+ * Root Cause Analysis Request
296
+ * Request for AI to analyze root cause of issues
297
+ */
298
+ exports.RootCauseAnalysisRequestSchema = zod_1.z.object({
299
+ /**
300
+ * Incident identifier
301
+ */
302
+ incidentId: zod_1.z.string(),
303
+ /**
304
+ * Plugin identifier
305
+ */
306
+ pluginId: zod_1.z.string(),
307
+ /**
308
+ * Symptoms observed
309
+ */
310
+ symptoms: zod_1.z.array(zod_1.z.object({
311
+ type: zod_1.z.string().describe('Symptom type'),
312
+ description: zod_1.z.string(),
313
+ severity: zod_1.z.enum(['low', 'medium', 'high', 'critical']),
314
+ timestamp: zod_1.z.string().datetime(),
315
+ })),
316
+ /**
317
+ * Time range for analysis
318
+ */
319
+ timeRange: zod_1.z.object({
320
+ start: zod_1.z.string().datetime(),
321
+ end: zod_1.z.string().datetime(),
322
+ }),
323
+ /**
324
+ * Include log analysis
325
+ */
326
+ analyzeLogs: zod_1.z.boolean().default(true),
327
+ /**
328
+ * Include metric analysis
329
+ */
330
+ analyzeMetrics: zod_1.z.boolean().default(true),
331
+ /**
332
+ * Include dependency analysis
333
+ */
334
+ analyzeDependencies: zod_1.z.boolean().default(true),
335
+ /**
336
+ * Context information
337
+ */
338
+ context: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
339
+ });
340
+ /**
341
+ * Root Cause Analysis Result
342
+ * Result of root cause analysis
343
+ */
344
+ exports.RootCauseAnalysisResultSchema = zod_1.z.object({
345
+ /**
346
+ * Analysis identifier
347
+ */
348
+ analysisId: zod_1.z.string(),
349
+ /**
350
+ * Incident identifier
351
+ */
352
+ incidentId: zod_1.z.string(),
353
+ /**
354
+ * Identified root causes
355
+ */
356
+ rootCauses: zod_1.z.array(zod_1.z.object({
357
+ /**
358
+ * Cause identifier
359
+ */
360
+ id: zod_1.z.string(),
361
+ /**
362
+ * Description
363
+ */
364
+ description: zod_1.z.string(),
365
+ /**
366
+ * Confidence score (0-100)
367
+ */
368
+ confidence: zod_1.z.number().min(0).max(100),
369
+ /**
370
+ * Category
371
+ */
372
+ category: zod_1.z.enum([
373
+ 'code-defect',
374
+ 'configuration',
375
+ 'resource-exhaustion',
376
+ 'dependency-failure',
377
+ 'network-issue',
378
+ 'data-corruption',
379
+ 'security-breach',
380
+ 'other',
381
+ ]),
382
+ /**
383
+ * Evidence
384
+ */
385
+ evidence: zod_1.z.array(zod_1.z.object({
386
+ type: zod_1.z.enum(['log', 'metric', 'trace', 'event']),
387
+ content: zod_1.z.string(),
388
+ timestamp: zod_1.z.string().datetime().optional(),
389
+ })),
390
+ /**
391
+ * Impact assessment
392
+ */
393
+ impact: zod_1.z.enum(['low', 'medium', 'high', 'critical']),
394
+ /**
395
+ * Recommended actions
396
+ */
397
+ recommendations: zod_1.z.array(zod_1.z.string()),
398
+ })),
399
+ /**
400
+ * Contributing factors
401
+ */
402
+ contributingFactors: zod_1.z.array(zod_1.z.object({
403
+ description: zod_1.z.string(),
404
+ confidence: zod_1.z.number().min(0).max(100),
405
+ })).optional(),
406
+ /**
407
+ * Timeline of events
408
+ */
409
+ timeline: zod_1.z.array(zod_1.z.object({
410
+ timestamp: zod_1.z.string().datetime(),
411
+ event: zod_1.z.string(),
412
+ significance: zod_1.z.enum(['low', 'medium', 'high']),
413
+ })).optional(),
414
+ /**
415
+ * Remediation plan
416
+ */
417
+ remediation: zod_1.z.object({
418
+ /**
419
+ * Immediate actions
420
+ */
421
+ immediate: zod_1.z.array(zod_1.z.string()),
422
+ /**
423
+ * Short-term fixes
424
+ */
425
+ shortTerm: zod_1.z.array(zod_1.z.string()),
426
+ /**
427
+ * Long-term improvements
428
+ */
429
+ longTerm: zod_1.z.array(zod_1.z.string()),
430
+ }).optional(),
431
+ /**
432
+ * Overall confidence in analysis
433
+ */
434
+ overallConfidence: zod_1.z.number().min(0).max(100),
435
+ /**
436
+ * Analysis timestamp
437
+ */
438
+ timestamp: zod_1.z.string().datetime(),
439
+ });
440
+ /**
441
+ * Performance Optimization Suggestion
442
+ * AI-generated performance optimization suggestion
443
+ */
444
+ exports.PerformanceOptimizationSchema = zod_1.z.object({
445
+ /**
446
+ * Optimization identifier
447
+ */
448
+ id: zod_1.z.string(),
449
+ /**
450
+ * Plugin identifier
451
+ */
452
+ pluginId: zod_1.z.string(),
453
+ /**
454
+ * Optimization type
455
+ */
456
+ type: zod_1.z.enum([
457
+ 'caching',
458
+ 'query-optimization',
459
+ 'resource-allocation',
460
+ 'code-refactoring',
461
+ 'architecture-change',
462
+ 'configuration-tuning',
463
+ ]),
464
+ /**
465
+ * Description
466
+ */
467
+ description: zod_1.z.string(),
468
+ /**
469
+ * Expected impact
470
+ */
471
+ expectedImpact: zod_1.z.object({
472
+ /**
473
+ * Performance improvement percentage
474
+ */
475
+ performanceGain: zod_1.z.number().min(0).max(100)
476
+ .describe('Expected performance improvement (%)'),
477
+ /**
478
+ * Resource savings
479
+ */
480
+ resourceSavings: zod_1.z.object({
481
+ cpu: zod_1.z.number().optional().describe('CPU reduction (%)'),
482
+ memory: zod_1.z.number().optional().describe('Memory reduction (%)'),
483
+ network: zod_1.z.number().optional().describe('Network reduction (%)'),
484
+ }).optional(),
485
+ /**
486
+ * Cost reduction
487
+ */
488
+ costReduction: zod_1.z.number().optional()
489
+ .describe('Estimated cost reduction (%)'),
490
+ }),
491
+ /**
492
+ * Implementation difficulty
493
+ */
494
+ difficulty: zod_1.z.enum(['trivial', 'easy', 'moderate', 'complex', 'very-complex']),
495
+ /**
496
+ * Implementation steps
497
+ */
498
+ steps: zod_1.z.array(zod_1.z.string()),
499
+ /**
500
+ * Risks and considerations
501
+ */
502
+ risks: zod_1.z.array(zod_1.z.string()).optional(),
503
+ /**
504
+ * Confidence score
505
+ */
506
+ confidence: zod_1.z.number().min(0).max(100),
507
+ /**
508
+ * Priority
509
+ */
510
+ priority: zod_1.z.enum(['low', 'medium', 'high', 'critical']),
511
+ });
512
+ /**
513
+ * AIOps Agent Configuration
514
+ * Configuration for AI operations agent
515
+ */
516
+ exports.AIOpsAgentConfigSchema = zod_1.z.object({
517
+ /**
518
+ * Agent identifier
519
+ */
520
+ agentId: zod_1.z.string(),
521
+ /**
522
+ * Plugin identifier
523
+ */
524
+ pluginId: zod_1.z.string(),
525
+ /**
526
+ * Self-healing configuration
527
+ */
528
+ selfHealing: exports.SelfHealingConfigSchema.optional(),
529
+ /**
530
+ * Auto-scaling policies
531
+ */
532
+ autoScaling: zod_1.z.array(exports.AutoScalingPolicySchema).optional(),
533
+ /**
534
+ * Continuous monitoring
535
+ */
536
+ monitoring: zod_1.z.object({
537
+ enabled: zod_1.z.boolean().default(true),
538
+ interval: zod_1.z.number().int().min(1000).default(60000)
539
+ .describe('Monitoring interval in milliseconds'),
540
+ /**
541
+ * Metrics to collect
542
+ */
543
+ metrics: zod_1.z.array(zod_1.z.string()).optional(),
544
+ }).optional(),
545
+ /**
546
+ * Proactive optimization
547
+ */
548
+ optimization: zod_1.z.object({
549
+ enabled: zod_1.z.boolean().default(true),
550
+ /**
551
+ * Scan interval (seconds)
552
+ */
553
+ scanInterval: zod_1.z.number().int().min(3600).default(86400)
554
+ .describe('How often to scan for optimization opportunities'),
555
+ /**
556
+ * Auto-apply optimizations
557
+ */
558
+ autoApply: zod_1.z.boolean().default(false)
559
+ .describe('Automatically apply low-risk optimizations'),
560
+ }).optional(),
561
+ /**
562
+ * Incident response
563
+ */
564
+ incidentResponse: zod_1.z.object({
565
+ enabled: zod_1.z.boolean().default(true),
566
+ /**
567
+ * Auto-trigger root cause analysis
568
+ */
569
+ autoRCA: zod_1.z.boolean().default(true),
570
+ /**
571
+ * Notification channels
572
+ */
573
+ notifications: zod_1.z.array(zod_1.z.object({
574
+ channel: zod_1.z.enum(['email', 'slack', 'webhook', 'sms']),
575
+ config: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
576
+ })).optional(),
577
+ }).optional(),
578
+ });
@@ -30,9 +30,9 @@ export declare const DiscoverySchema: z.ZodObject<{
30
30
  name: z.ZodString;
31
31
  version: z.ZodString;
32
32
  environment: z.ZodEnum<{
33
+ sandbox: "sandbox";
33
34
  development: "development";
34
35
  production: "production";
35
- sandbox: "sandbox";
36
36
  }>;
37
37
  routes: z.ZodObject<{
38
38
  data: z.ZodString;
@@ -38,8 +38,8 @@ export declare const ApiEndpointSchema: z.ZodObject<{
38
38
  type: z.ZodEnum<{
39
39
  script: "script";
40
40
  flow: "flow";
41
- object_operation: "object_operation";
42
41
  proxy: "proxy";
42
+ object_operation: "object_operation";
43
43
  }>;
44
44
  target: z.ZodString;
45
45
  objectParams: z.ZodOptional<z.ZodObject<{
@@ -87,8 +87,8 @@ export declare const ApiEndpoint: z.ZodObject<{
87
87
  type: z.ZodEnum<{
88
88
  script: "script";
89
89
  flow: "flow";
90
- object_operation: "object_operation";
91
90
  proxy: "proxy";
91
+ object_operation: "object_operation";
92
92
  }>;
93
93
  target: z.ZodString;
94
94
  objectParams: z.ZodOptional<z.ZodObject<{