@objectstack/spec 0.9.0 → 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.
- package/README.md +72 -4
- package/dist/ai/cost.zod.d.ts +1 -1
- package/dist/ai/devops-agent.zod.d.ts +6 -6
- package/dist/ai/index.d.ts +4 -0
- package/dist/ai/index.d.ts.map +1 -1
- package/dist/ai/index.js +4 -0
- package/dist/ai/plugin-development.zod.d.ts +415 -0
- package/dist/ai/plugin-development.zod.d.ts.map +1 -0
- package/dist/ai/plugin-development.zod.js +576 -0
- package/dist/ai/runtime-ops.zod.d.ts +480 -0
- package/dist/ai/runtime-ops.zod.d.ts.map +1 -0
- package/dist/ai/runtime-ops.zod.js +578 -0
- package/dist/api/discovery.zod.d.ts +1 -1
- package/dist/api/endpoint.zod.d.ts +2 -2
- package/dist/api/hub.zod.d.ts +74 -74
- package/dist/api/realtime.zod.d.ts +2 -2
- package/dist/api/websocket.zod.d.ts +6 -6
- package/dist/automation/trigger-registry.zod.d.ts +6 -6
- package/dist/contracts/service-registry.d.ts +1 -1
- package/dist/hub/hub-federation.zod.d.ts +4 -4
- package/dist/hub/index.d.ts +1 -0
- package/dist/hub/index.d.ts.map +1 -1
- package/dist/hub/index.js +1 -0
- package/dist/hub/license.zod.d.ts +1 -1
- package/dist/hub/marketplace-enhanced.zod.d.ts +1028 -0
- package/dist/hub/marketplace-enhanced.zod.d.ts.map +1 -0
- package/dist/hub/marketplace-enhanced.zod.js +728 -0
- package/dist/hub/plugin-registry.zod.d.ts +3 -3
- package/dist/hub/plugin-security.zod.d.ts +4 -4
- package/dist/hub/space.zod.d.ts +2 -2
- package/dist/integration/connector/database.zod.d.ts +1 -1
- package/dist/integration/connector/file-storage.zod.d.ts +1 -1
- package/dist/integration/connector/github.zod.d.ts +1 -1
- package/dist/integration/connector/message-queue.zod.d.ts +1 -1
- package/dist/integration/connector/saas.zod.d.ts +3 -3
- package/dist/integration/connector/vercel.zod.d.ts +4 -4
- package/dist/integration/connector.zod.d.ts +2 -2
- package/dist/stack.zod.d.ts +4768 -2542
- package/dist/stack.zod.d.ts.map +1 -1
- package/dist/stack.zod.js +20 -2
- package/dist/system/index.d.ts +3 -0
- package/dist/system/index.d.ts.map +1 -1
- package/dist/system/index.js +3 -0
- package/dist/system/logging.zod.d.ts +5 -0
- package/dist/system/logging.zod.d.ts.map +1 -1
- package/dist/system/logging.zod.js +2 -1
- package/dist/system/notification.zod.d.ts +1 -1
- package/dist/system/plugin-lifecycle-advanced.zod.d.ts +357 -0
- package/dist/system/plugin-lifecycle-advanced.zod.d.ts.map +1 -0
- package/dist/system/plugin-lifecycle-advanced.zod.js +411 -0
- package/dist/system/plugin-security-advanced.zod.d.ts +904 -0
- package/dist/system/plugin-security-advanced.zod.d.ts.map +1 -0
- package/dist/system/plugin-security-advanced.zod.js +606 -0
- package/dist/system/plugin-versioning.zod.d.ts +438 -0
- package/dist/system/plugin-versioning.zod.d.ts.map +1 -0
- package/dist/system/plugin-versioning.zod.js +397 -0
- package/json-schema/ai/AICodeReviewResult.json +7 -0
- package/json-schema/ai/AIOpsAgentConfig.json +7 -0
- package/json-schema/ai/AnomalyDetectionConfig.json +7 -0
- package/json-schema/ai/AutoScalingPolicy.json +7 -0
- package/json-schema/ai/CodeGenerationRequest.json +7 -0
- package/json-schema/ai/GeneratedCode.json +7 -0
- package/json-schema/ai/PerformanceOptimization.json +7 -0
- package/json-schema/ai/PluginCompositionRequest.json +7 -0
- package/json-schema/ai/PluginCompositionResult.json +7 -0
- package/json-schema/ai/PluginRecommendation.json +7 -0
- package/json-schema/ai/PluginRecommendationRequest.json +7 -0
- package/json-schema/ai/PluginScaffoldingTemplate.json +7 -0
- package/json-schema/ai/RootCauseAnalysisRequest.json +7 -0
- package/json-schema/ai/RootCauseAnalysisResult.json +7 -0
- package/json-schema/ai/SelfHealingAction.json +7 -0
- package/json-schema/ai/SelfHealingConfig.json +7 -0
- package/json-schema/hub/MarketplaceQualityMetrics.json +7 -0
- package/json-schema/hub/PluginCategory.json +7 -0
- package/json-schema/hub/PluginCertification.json +7 -0
- package/json-schema/hub/PluginInstallationRequest.json +7 -0
- package/json-schema/hub/PluginInstallationStatus.json +7 -0
- package/json-schema/hub/PluginLicense.json +7 -0
- package/json-schema/hub/PluginMarketplaceListing.json +7 -0
- package/json-schema/hub/PluginRating.json +7 -0
- package/json-schema/hub/PluginRevenueSharing.json +7 -0
- package/json-schema/hub/PluginSearchQuery.json +7 -0
- package/json-schema/hub/PluginTag.json +7 -0
- package/json-schema/hub/RegistryConfig.json +7 -0
- package/json-schema/hub/RegistrySyncPolicy.json +7 -0
- package/json-schema/hub/RegistryUpstream.json +7 -0
- package/json-schema/system/AdvancedPluginLifecycleConfig.json +7 -0
- package/json-schema/system/BreakingChange.json +7 -0
- package/json-schema/system/CompatibilityLevel.json +7 -0
- package/json-schema/system/CompatibilityMatrixEntry.json +7 -0
- package/json-schema/system/DependencyConflict.json +7 -0
- package/json-schema/system/DependencyResolutionResult.json +7 -0
- package/json-schema/system/DeprecationNotice.json +7 -0
- package/json-schema/system/DistributedStateConfig.json +7 -0
- package/json-schema/system/GracefulDegradation.json +7 -0
- package/json-schema/system/HotReloadConfig.json +7 -0
- package/json-schema/system/MultiVersionSupport.json +7 -0
- package/json-schema/system/Permission.json +7 -0
- package/json-schema/system/PermissionAction.json +7 -0
- package/json-schema/system/PermissionScope.json +7 -0
- package/json-schema/system/PermissionSet.json +7 -0
- package/json-schema/system/PluginCompatibilityMatrix.json +7 -0
- package/json-schema/system/PluginHealthCheck.json +7 -0
- package/json-schema/system/PluginHealthReport.json +7 -0
- package/json-schema/system/PluginHealthStatus.json +7 -0
- package/json-schema/system/PluginSecurityManifest.json +7 -0
- package/json-schema/system/PluginStateSnapshot.json +7 -0
- package/json-schema/system/PluginTrustLevel.json +7 -0
- package/json-schema/system/PluginUpdateStrategy.json +7 -0
- package/json-schema/system/PluginVersionMetadata.json +7 -0
- package/json-schema/system/ResourceType.json +7 -0
- package/json-schema/system/RuntimeConfig.json +7 -0
- package/json-schema/system/SandboxConfig.json +7 -0
- package/json-schema/system/SecurityPolicy.json +7 -0
- package/json-schema/system/SecurityScanResult.json +7 -0
- package/json-schema/system/SecurityVulnerability.json +7 -0
- package/json-schema/system/SemanticVersion.json +7 -0
- package/json-schema/system/VersionConstraint.json +7 -0
- package/package.json +1 -1
|
@@ -0,0 +1,411 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdvancedPluginLifecycleConfigSchema = exports.PluginStateSnapshotSchema = exports.PluginUpdateStrategySchema = exports.GracefulDegradationSchema = exports.HotReloadConfigSchema = exports.DistributedStateConfigSchema = exports.PluginHealthReportSchema = exports.PluginHealthCheckSchema = exports.PluginHealthStatusSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* # Advanced Plugin Lifecycle Protocol
|
|
7
|
+
*
|
|
8
|
+
* Defines advanced lifecycle management capabilities including:
|
|
9
|
+
* - Hot reload and live updates
|
|
10
|
+
* - Graceful degradation and fallback mechanisms
|
|
11
|
+
* - Health monitoring and auto-recovery
|
|
12
|
+
* - State preservation during updates
|
|
13
|
+
*
|
|
14
|
+
* This protocol extends the basic plugin lifecycle with enterprise-grade
|
|
15
|
+
* features for production environments.
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Plugin Health Status
|
|
19
|
+
* Represents the current operational state of a plugin
|
|
20
|
+
*/
|
|
21
|
+
exports.PluginHealthStatusSchema = zod_1.z.enum([
|
|
22
|
+
'healthy', // Plugin is operating normally
|
|
23
|
+
'degraded', // Plugin is operational but with reduced functionality
|
|
24
|
+
'unhealthy', // Plugin has critical issues but still running
|
|
25
|
+
'failed', // Plugin has failed and is not operational
|
|
26
|
+
'recovering', // Plugin is in recovery process
|
|
27
|
+
'unknown', // Health status cannot be determined
|
|
28
|
+
]).describe('Current health status of the plugin');
|
|
29
|
+
/**
|
|
30
|
+
* Plugin Health Check Configuration
|
|
31
|
+
* Defines how to check plugin health
|
|
32
|
+
*/
|
|
33
|
+
exports.PluginHealthCheckSchema = zod_1.z.object({
|
|
34
|
+
/**
|
|
35
|
+
* Health check interval in milliseconds
|
|
36
|
+
*/
|
|
37
|
+
interval: zod_1.z.number().int().min(1000).default(30000)
|
|
38
|
+
.describe('How often to perform health checks (default: 30s)'),
|
|
39
|
+
/**
|
|
40
|
+
* Timeout for health check in milliseconds
|
|
41
|
+
*/
|
|
42
|
+
timeout: zod_1.z.number().int().min(100).default(5000)
|
|
43
|
+
.describe('Maximum time to wait for health check response'),
|
|
44
|
+
/**
|
|
45
|
+
* Number of consecutive failures before marking as unhealthy
|
|
46
|
+
*/
|
|
47
|
+
failureThreshold: zod_1.z.number().int().min(1).default(3)
|
|
48
|
+
.describe('Consecutive failures needed to mark unhealthy'),
|
|
49
|
+
/**
|
|
50
|
+
* Number of consecutive successes to recover from unhealthy state
|
|
51
|
+
*/
|
|
52
|
+
successThreshold: zod_1.z.number().int().min(1).default(1)
|
|
53
|
+
.describe('Consecutive successes needed to mark healthy'),
|
|
54
|
+
/**
|
|
55
|
+
* Custom health check function name or endpoint
|
|
56
|
+
*/
|
|
57
|
+
checkMethod: zod_1.z.string().optional()
|
|
58
|
+
.describe('Method name to call for health check'),
|
|
59
|
+
/**
|
|
60
|
+
* Enable automatic restart on failure
|
|
61
|
+
*/
|
|
62
|
+
autoRestart: zod_1.z.boolean().default(false)
|
|
63
|
+
.describe('Automatically restart plugin on health check failure'),
|
|
64
|
+
/**
|
|
65
|
+
* Maximum number of restart attempts
|
|
66
|
+
*/
|
|
67
|
+
maxRestartAttempts: zod_1.z.number().int().min(0).default(3)
|
|
68
|
+
.describe('Maximum restart attempts before giving up'),
|
|
69
|
+
/**
|
|
70
|
+
* Backoff strategy for restarts
|
|
71
|
+
*/
|
|
72
|
+
restartBackoff: zod_1.z.enum(['fixed', 'linear', 'exponential']).default('exponential')
|
|
73
|
+
.describe('Backoff strategy for restart delays'),
|
|
74
|
+
});
|
|
75
|
+
/**
|
|
76
|
+
* Plugin Health Report
|
|
77
|
+
* Detailed health information from a plugin
|
|
78
|
+
*/
|
|
79
|
+
exports.PluginHealthReportSchema = zod_1.z.object({
|
|
80
|
+
/**
|
|
81
|
+
* Overall health status
|
|
82
|
+
*/
|
|
83
|
+
status: exports.PluginHealthStatusSchema,
|
|
84
|
+
/**
|
|
85
|
+
* Timestamp of the health check
|
|
86
|
+
*/
|
|
87
|
+
timestamp: zod_1.z.string().datetime(),
|
|
88
|
+
/**
|
|
89
|
+
* Human-readable message about health status
|
|
90
|
+
*/
|
|
91
|
+
message: zod_1.z.string().optional(),
|
|
92
|
+
/**
|
|
93
|
+
* Detailed metrics
|
|
94
|
+
*/
|
|
95
|
+
metrics: zod_1.z.object({
|
|
96
|
+
uptime: zod_1.z.number().describe('Plugin uptime in milliseconds'),
|
|
97
|
+
memoryUsage: zod_1.z.number().optional().describe('Memory usage in bytes'),
|
|
98
|
+
cpuUsage: zod_1.z.number().optional().describe('CPU usage percentage'),
|
|
99
|
+
activeConnections: zod_1.z.number().optional().describe('Number of active connections'),
|
|
100
|
+
errorRate: zod_1.z.number().optional().describe('Error rate (errors per minute)'),
|
|
101
|
+
responseTime: zod_1.z.number().optional().describe('Average response time in ms'),
|
|
102
|
+
}).partial().optional(),
|
|
103
|
+
/**
|
|
104
|
+
* List of checks performed
|
|
105
|
+
*/
|
|
106
|
+
checks: zod_1.z.array(zod_1.z.object({
|
|
107
|
+
name: zod_1.z.string().describe('Check name'),
|
|
108
|
+
status: zod_1.z.enum(['passed', 'failed', 'warning']),
|
|
109
|
+
message: zod_1.z.string().optional(),
|
|
110
|
+
data: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
111
|
+
})).optional(),
|
|
112
|
+
/**
|
|
113
|
+
* Dependencies health
|
|
114
|
+
*/
|
|
115
|
+
dependencies: zod_1.z.array(zod_1.z.object({
|
|
116
|
+
pluginId: zod_1.z.string(),
|
|
117
|
+
status: exports.PluginHealthStatusSchema,
|
|
118
|
+
message: zod_1.z.string().optional(),
|
|
119
|
+
})).optional(),
|
|
120
|
+
});
|
|
121
|
+
/**
|
|
122
|
+
* Distributed State Configuration
|
|
123
|
+
* Configuration for distributed state management in cluster environments
|
|
124
|
+
*/
|
|
125
|
+
exports.DistributedStateConfigSchema = zod_1.z.object({
|
|
126
|
+
/**
|
|
127
|
+
* Distributed cache provider
|
|
128
|
+
*/
|
|
129
|
+
provider: zod_1.z.enum(['redis', 'etcd', 'custom'])
|
|
130
|
+
.describe('Distributed state backend provider'),
|
|
131
|
+
/**
|
|
132
|
+
* Connection URL or endpoints
|
|
133
|
+
*/
|
|
134
|
+
endpoints: zod_1.z.array(zod_1.z.string()).optional()
|
|
135
|
+
.describe('Backend connection endpoints'),
|
|
136
|
+
/**
|
|
137
|
+
* Key prefix for namespacing
|
|
138
|
+
*/
|
|
139
|
+
keyPrefix: zod_1.z.string().optional()
|
|
140
|
+
.describe('Prefix for all keys (e.g., "plugin:my-plugin:")'),
|
|
141
|
+
/**
|
|
142
|
+
* Time to live in seconds
|
|
143
|
+
*/
|
|
144
|
+
ttl: zod_1.z.number().int().min(0).optional()
|
|
145
|
+
.describe('State expiration time in seconds'),
|
|
146
|
+
/**
|
|
147
|
+
* Authentication configuration
|
|
148
|
+
*/
|
|
149
|
+
auth: zod_1.z.object({
|
|
150
|
+
username: zod_1.z.string().optional(),
|
|
151
|
+
password: zod_1.z.string().optional(),
|
|
152
|
+
token: zod_1.z.string().optional(),
|
|
153
|
+
certificate: zod_1.z.string().optional(),
|
|
154
|
+
}).optional(),
|
|
155
|
+
/**
|
|
156
|
+
* Replication settings
|
|
157
|
+
*/
|
|
158
|
+
replication: zod_1.z.object({
|
|
159
|
+
enabled: zod_1.z.boolean().default(true),
|
|
160
|
+
minReplicas: zod_1.z.number().int().min(1).default(1),
|
|
161
|
+
}).optional(),
|
|
162
|
+
/**
|
|
163
|
+
* Custom provider configuration
|
|
164
|
+
*/
|
|
165
|
+
customConfig: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional()
|
|
166
|
+
.describe('Provider-specific configuration'),
|
|
167
|
+
});
|
|
168
|
+
/**
|
|
169
|
+
* Hot Reload Configuration
|
|
170
|
+
* Controls how plugins handle live updates
|
|
171
|
+
*/
|
|
172
|
+
exports.HotReloadConfigSchema = zod_1.z.object({
|
|
173
|
+
/**
|
|
174
|
+
* Enable hot reload capability
|
|
175
|
+
*/
|
|
176
|
+
enabled: zod_1.z.boolean().default(false),
|
|
177
|
+
/**
|
|
178
|
+
* Watch file patterns for auto-reload
|
|
179
|
+
*/
|
|
180
|
+
watchPatterns: zod_1.z.array(zod_1.z.string()).optional()
|
|
181
|
+
.describe('Glob patterns to watch for changes'),
|
|
182
|
+
/**
|
|
183
|
+
* Debounce delay before reloading (milliseconds)
|
|
184
|
+
*/
|
|
185
|
+
debounceDelay: zod_1.z.number().int().min(0).default(1000)
|
|
186
|
+
.describe('Wait time after change detection before reload'),
|
|
187
|
+
/**
|
|
188
|
+
* Preserve plugin state during reload
|
|
189
|
+
*/
|
|
190
|
+
preserveState: zod_1.z.boolean().default(true)
|
|
191
|
+
.describe('Keep plugin state across reloads'),
|
|
192
|
+
/**
|
|
193
|
+
* State serialization strategy
|
|
194
|
+
*/
|
|
195
|
+
stateStrategy: zod_1.z.enum(['memory', 'disk', 'distributed', 'none']).default('memory')
|
|
196
|
+
.describe('How to preserve state during reload'),
|
|
197
|
+
/**
|
|
198
|
+
* Distributed state configuration (required when stateStrategy is "distributed")
|
|
199
|
+
*/
|
|
200
|
+
distributedConfig: exports.DistributedStateConfigSchema.optional()
|
|
201
|
+
.describe('Configuration for distributed state management'),
|
|
202
|
+
/**
|
|
203
|
+
* Graceful shutdown timeout
|
|
204
|
+
*/
|
|
205
|
+
shutdownTimeout: zod_1.z.number().int().min(0).default(30000)
|
|
206
|
+
.describe('Maximum time to wait for graceful shutdown'),
|
|
207
|
+
/**
|
|
208
|
+
* Pre-reload hooks
|
|
209
|
+
*/
|
|
210
|
+
beforeReload: zod_1.z.array(zod_1.z.string()).optional()
|
|
211
|
+
.describe('Hook names to call before reload'),
|
|
212
|
+
/**
|
|
213
|
+
* Post-reload hooks
|
|
214
|
+
*/
|
|
215
|
+
afterReload: zod_1.z.array(zod_1.z.string()).optional()
|
|
216
|
+
.describe('Hook names to call after reload'),
|
|
217
|
+
});
|
|
218
|
+
/**
|
|
219
|
+
* Graceful Degradation Configuration
|
|
220
|
+
* Defines how plugin degrades when dependencies fail
|
|
221
|
+
*/
|
|
222
|
+
exports.GracefulDegradationSchema = zod_1.z.object({
|
|
223
|
+
/**
|
|
224
|
+
* Enable graceful degradation
|
|
225
|
+
*/
|
|
226
|
+
enabled: zod_1.z.boolean().default(true),
|
|
227
|
+
/**
|
|
228
|
+
* Fallback mode when dependencies fail
|
|
229
|
+
*/
|
|
230
|
+
fallbackMode: zod_1.z.enum([
|
|
231
|
+
'minimal', // Provide minimal functionality
|
|
232
|
+
'cached', // Use cached data
|
|
233
|
+
'readonly', // Allow read-only operations
|
|
234
|
+
'offline', // Offline mode with local data
|
|
235
|
+
'disabled', // Disable plugin functionality
|
|
236
|
+
]).default('minimal'),
|
|
237
|
+
/**
|
|
238
|
+
* Critical dependencies that must be available
|
|
239
|
+
*/
|
|
240
|
+
criticalDependencies: zod_1.z.array(zod_1.z.string()).optional()
|
|
241
|
+
.describe('Plugin IDs that are required for operation'),
|
|
242
|
+
/**
|
|
243
|
+
* Optional dependencies that can fail
|
|
244
|
+
*/
|
|
245
|
+
optionalDependencies: zod_1.z.array(zod_1.z.string()).optional()
|
|
246
|
+
.describe('Plugin IDs that are nice to have but not required'),
|
|
247
|
+
/**
|
|
248
|
+
* Feature flags for degraded mode
|
|
249
|
+
*/
|
|
250
|
+
degradedFeatures: zod_1.z.array(zod_1.z.object({
|
|
251
|
+
feature: zod_1.z.string().describe('Feature name'),
|
|
252
|
+
enabled: zod_1.z.boolean().describe('Whether feature is available in degraded mode'),
|
|
253
|
+
reason: zod_1.z.string().optional(),
|
|
254
|
+
})).optional(),
|
|
255
|
+
/**
|
|
256
|
+
* Automatic recovery attempts
|
|
257
|
+
*/
|
|
258
|
+
autoRecovery: zod_1.z.object({
|
|
259
|
+
enabled: zod_1.z.boolean().default(true),
|
|
260
|
+
retryInterval: zod_1.z.number().int().min(1000).default(60000)
|
|
261
|
+
.describe('Interval between recovery attempts (ms)'),
|
|
262
|
+
maxAttempts: zod_1.z.number().int().min(0).default(5)
|
|
263
|
+
.describe('Maximum recovery attempts before giving up'),
|
|
264
|
+
}).optional(),
|
|
265
|
+
});
|
|
266
|
+
/**
|
|
267
|
+
* Plugin Update Strategy
|
|
268
|
+
* Defines how plugin handles version updates
|
|
269
|
+
*/
|
|
270
|
+
exports.PluginUpdateStrategySchema = zod_1.z.object({
|
|
271
|
+
/**
|
|
272
|
+
* Update mode
|
|
273
|
+
*/
|
|
274
|
+
mode: zod_1.z.enum([
|
|
275
|
+
'manual', // Manual updates only
|
|
276
|
+
'automatic', // Automatic updates
|
|
277
|
+
'scheduled', // Scheduled update windows
|
|
278
|
+
'rolling', // Rolling updates with zero downtime
|
|
279
|
+
]).default('manual'),
|
|
280
|
+
/**
|
|
281
|
+
* Version constraints for automatic updates
|
|
282
|
+
*/
|
|
283
|
+
autoUpdateConstraints: zod_1.z.object({
|
|
284
|
+
major: zod_1.z.boolean().default(false).describe('Allow major version updates'),
|
|
285
|
+
minor: zod_1.z.boolean().default(true).describe('Allow minor version updates'),
|
|
286
|
+
patch: zod_1.z.boolean().default(true).describe('Allow patch version updates'),
|
|
287
|
+
}).optional(),
|
|
288
|
+
/**
|
|
289
|
+
* Update schedule (for scheduled mode)
|
|
290
|
+
*/
|
|
291
|
+
schedule: zod_1.z.object({
|
|
292
|
+
/**
|
|
293
|
+
* Cron expression for update window
|
|
294
|
+
*/
|
|
295
|
+
cron: zod_1.z.string().optional(),
|
|
296
|
+
/**
|
|
297
|
+
* Timezone for schedule
|
|
298
|
+
*/
|
|
299
|
+
timezone: zod_1.z.string().default('UTC'),
|
|
300
|
+
/**
|
|
301
|
+
* Maintenance window duration in minutes
|
|
302
|
+
*/
|
|
303
|
+
maintenanceWindow: zod_1.z.number().int().min(1).default(60),
|
|
304
|
+
}).optional(),
|
|
305
|
+
/**
|
|
306
|
+
* Rollback configuration
|
|
307
|
+
*/
|
|
308
|
+
rollback: zod_1.z.object({
|
|
309
|
+
enabled: zod_1.z.boolean().default(true),
|
|
310
|
+
/**
|
|
311
|
+
* Automatic rollback on failure
|
|
312
|
+
*/
|
|
313
|
+
automatic: zod_1.z.boolean().default(true),
|
|
314
|
+
/**
|
|
315
|
+
* Keep N previous versions for rollback
|
|
316
|
+
*/
|
|
317
|
+
keepVersions: zod_1.z.number().int().min(1).default(3),
|
|
318
|
+
/**
|
|
319
|
+
* Rollback timeout in milliseconds
|
|
320
|
+
*/
|
|
321
|
+
timeout: zod_1.z.number().int().min(1000).default(30000),
|
|
322
|
+
}).optional(),
|
|
323
|
+
/**
|
|
324
|
+
* Pre-update validation
|
|
325
|
+
*/
|
|
326
|
+
validation: zod_1.z.object({
|
|
327
|
+
/**
|
|
328
|
+
* Run compatibility checks before update
|
|
329
|
+
*/
|
|
330
|
+
checkCompatibility: zod_1.z.boolean().default(true),
|
|
331
|
+
/**
|
|
332
|
+
* Run tests before applying update
|
|
333
|
+
*/
|
|
334
|
+
runTests: zod_1.z.boolean().default(false),
|
|
335
|
+
/**
|
|
336
|
+
* Test suite to run
|
|
337
|
+
*/
|
|
338
|
+
testSuite: zod_1.z.string().optional(),
|
|
339
|
+
}).optional(),
|
|
340
|
+
});
|
|
341
|
+
/**
|
|
342
|
+
* Plugin State Snapshot
|
|
343
|
+
* Captures plugin state for preservation during updates/reloads
|
|
344
|
+
*/
|
|
345
|
+
exports.PluginStateSnapshotSchema = zod_1.z.object({
|
|
346
|
+
/**
|
|
347
|
+
* Plugin identifier
|
|
348
|
+
*/
|
|
349
|
+
pluginId: zod_1.z.string(),
|
|
350
|
+
/**
|
|
351
|
+
* Version at time of snapshot
|
|
352
|
+
*/
|
|
353
|
+
version: zod_1.z.string(),
|
|
354
|
+
/**
|
|
355
|
+
* Snapshot timestamp
|
|
356
|
+
*/
|
|
357
|
+
timestamp: zod_1.z.string().datetime(),
|
|
358
|
+
/**
|
|
359
|
+
* Serialized state data
|
|
360
|
+
*/
|
|
361
|
+
state: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
|
|
362
|
+
/**
|
|
363
|
+
* State metadata
|
|
364
|
+
*/
|
|
365
|
+
metadata: zod_1.z.object({
|
|
366
|
+
checksum: zod_1.z.string().optional().describe('State checksum for verification'),
|
|
367
|
+
compressed: zod_1.z.boolean().default(false),
|
|
368
|
+
encryption: zod_1.z.string().optional().describe('Encryption algorithm if encrypted'),
|
|
369
|
+
}).optional(),
|
|
370
|
+
});
|
|
371
|
+
/**
|
|
372
|
+
* Advanced Plugin Lifecycle Configuration
|
|
373
|
+
* Complete configuration for advanced lifecycle management
|
|
374
|
+
*/
|
|
375
|
+
exports.AdvancedPluginLifecycleConfigSchema = zod_1.z.object({
|
|
376
|
+
/**
|
|
377
|
+
* Health monitoring configuration
|
|
378
|
+
*/
|
|
379
|
+
health: exports.PluginHealthCheckSchema.optional(),
|
|
380
|
+
/**
|
|
381
|
+
* Hot reload configuration
|
|
382
|
+
*/
|
|
383
|
+
hotReload: exports.HotReloadConfigSchema.optional(),
|
|
384
|
+
/**
|
|
385
|
+
* Graceful degradation configuration
|
|
386
|
+
*/
|
|
387
|
+
degradation: exports.GracefulDegradationSchema.optional(),
|
|
388
|
+
/**
|
|
389
|
+
* Update strategy
|
|
390
|
+
*/
|
|
391
|
+
updates: exports.PluginUpdateStrategySchema.optional(),
|
|
392
|
+
/**
|
|
393
|
+
* Resource limits
|
|
394
|
+
*/
|
|
395
|
+
resources: zod_1.z.object({
|
|
396
|
+
maxMemory: zod_1.z.number().int().optional().describe('Maximum memory in bytes'),
|
|
397
|
+
maxCpu: zod_1.z.number().min(0).max(100).optional().describe('Maximum CPU percentage'),
|
|
398
|
+
maxConnections: zod_1.z.number().int().optional().describe('Maximum concurrent connections'),
|
|
399
|
+
timeout: zod_1.z.number().int().optional().describe('Operation timeout in milliseconds'),
|
|
400
|
+
}).optional(),
|
|
401
|
+
/**
|
|
402
|
+
* Monitoring and observability
|
|
403
|
+
*/
|
|
404
|
+
observability: zod_1.z.object({
|
|
405
|
+
enableMetrics: zod_1.z.boolean().default(true),
|
|
406
|
+
enableTracing: zod_1.z.boolean().default(true),
|
|
407
|
+
enableProfiling: zod_1.z.boolean().default(false),
|
|
408
|
+
metricsInterval: zod_1.z.number().int().min(1000).default(60000)
|
|
409
|
+
.describe('Metrics collection interval in ms'),
|
|
410
|
+
}).optional(),
|
|
411
|
+
});
|