@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.
- package/README.md +14 -0
- 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 +5 -5
- 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,397 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PluginVersionMetadataSchema = exports.MultiVersionSupportSchema = exports.DependencyResolutionResultSchema = exports.DependencyConflictSchema = exports.PluginCompatibilityMatrixSchema = exports.CompatibilityMatrixEntrySchema = exports.DeprecationNoticeSchema = exports.BreakingChangeSchema = exports.CompatibilityLevelSchema = exports.VersionConstraintSchema = exports.SemanticVersionSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* # Plugin Versioning and Compatibility Protocol
|
|
7
|
+
*
|
|
8
|
+
* Defines comprehensive versioning, compatibility checking, and dependency
|
|
9
|
+
* resolution mechanisms for the plugin ecosystem.
|
|
10
|
+
*
|
|
11
|
+
* Based on semantic versioning (SemVer) with extensions for:
|
|
12
|
+
* - Compatibility matrices
|
|
13
|
+
* - Breaking change detection
|
|
14
|
+
* - Migration paths
|
|
15
|
+
* - Multi-version support
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Semantic Version Schema
|
|
19
|
+
* Standard SemVer format with optional pre-release and build metadata
|
|
20
|
+
*/
|
|
21
|
+
exports.SemanticVersionSchema = zod_1.z.object({
|
|
22
|
+
major: zod_1.z.number().int().min(0).describe('Major version (breaking changes)'),
|
|
23
|
+
minor: zod_1.z.number().int().min(0).describe('Minor version (backward compatible features)'),
|
|
24
|
+
patch: zod_1.z.number().int().min(0).describe('Patch version (backward compatible fixes)'),
|
|
25
|
+
preRelease: zod_1.z.string().optional().describe('Pre-release identifier (alpha, beta, rc.1)'),
|
|
26
|
+
build: zod_1.z.string().optional().describe('Build metadata'),
|
|
27
|
+
}).describe('Semantic version number');
|
|
28
|
+
/**
|
|
29
|
+
* Version Constraint Schema
|
|
30
|
+
* Defines version requirements using SemVer ranges
|
|
31
|
+
*/
|
|
32
|
+
exports.VersionConstraintSchema = zod_1.z.union([
|
|
33
|
+
zod_1.z.string().regex(/^[\d.]+$/).describe('Exact version: 1.2.3'),
|
|
34
|
+
zod_1.z.string().regex(/^\^[\d.]+$/).describe('Compatible with: ^1.2.3 (>=1.2.3 <2.0.0)'),
|
|
35
|
+
zod_1.z.string().regex(/^~[\d.]+$/).describe('Approximately: ~1.2.3 (>=1.2.3 <1.3.0)'),
|
|
36
|
+
zod_1.z.string().regex(/^>=[\d.]+$/).describe('Greater than or equal: >=1.2.3'),
|
|
37
|
+
zod_1.z.string().regex(/^>[\d.]+$/).describe('Greater than: >1.2.3'),
|
|
38
|
+
zod_1.z.string().regex(/^<=[\d.]+$/).describe('Less than or equal: <=1.2.3'),
|
|
39
|
+
zod_1.z.string().regex(/^<[\d.]+$/).describe('Less than: <1.2.3'),
|
|
40
|
+
zod_1.z.string().regex(/^[\d.]+ - [\d.]+$/).describe('Range: 1.2.3 - 2.3.4'),
|
|
41
|
+
zod_1.z.literal('*').describe('Any version'),
|
|
42
|
+
zod_1.z.literal('latest').describe('Latest stable version'),
|
|
43
|
+
]);
|
|
44
|
+
/**
|
|
45
|
+
* Compatibility Level
|
|
46
|
+
* Describes the level of compatibility between versions
|
|
47
|
+
*/
|
|
48
|
+
exports.CompatibilityLevelSchema = zod_1.z.enum([
|
|
49
|
+
'fully-compatible', // 100% compatible, drop-in replacement
|
|
50
|
+
'backward-compatible', // Backward compatible, new features added
|
|
51
|
+
'deprecated-compatible', // Compatible but uses deprecated features
|
|
52
|
+
'breaking-changes', // Breaking changes, migration required
|
|
53
|
+
'incompatible', // Completely incompatible
|
|
54
|
+
]).describe('Compatibility level between versions');
|
|
55
|
+
/**
|
|
56
|
+
* Breaking Change
|
|
57
|
+
* Documents a breaking change in a version
|
|
58
|
+
*/
|
|
59
|
+
exports.BreakingChangeSchema = zod_1.z.object({
|
|
60
|
+
/**
|
|
61
|
+
* Version where the change was introduced
|
|
62
|
+
*/
|
|
63
|
+
introducedIn: zod_1.z.string().describe('Version that introduced this breaking change'),
|
|
64
|
+
/**
|
|
65
|
+
* Type of breaking change
|
|
66
|
+
*/
|
|
67
|
+
type: zod_1.z.enum([
|
|
68
|
+
'api-removed', // API removed
|
|
69
|
+
'api-renamed', // API renamed
|
|
70
|
+
'api-signature-changed', // Function signature changed
|
|
71
|
+
'behavior-changed', // Behavior changed
|
|
72
|
+
'dependency-changed', // Dependency requirement changed
|
|
73
|
+
'configuration-changed', // Configuration schema changed
|
|
74
|
+
'protocol-changed', // Protocol implementation changed
|
|
75
|
+
]),
|
|
76
|
+
/**
|
|
77
|
+
* What was changed
|
|
78
|
+
*/
|
|
79
|
+
description: zod_1.z.string(),
|
|
80
|
+
/**
|
|
81
|
+
* Migration guide
|
|
82
|
+
*/
|
|
83
|
+
migrationGuide: zod_1.z.string().optional().describe('How to migrate from old to new'),
|
|
84
|
+
/**
|
|
85
|
+
* Deprecated in version
|
|
86
|
+
*/
|
|
87
|
+
deprecatedIn: zod_1.z.string().optional().describe('Version where old API was deprecated'),
|
|
88
|
+
/**
|
|
89
|
+
* Will be removed in version
|
|
90
|
+
*/
|
|
91
|
+
removedIn: zod_1.z.string().optional().describe('Version where old API will be removed'),
|
|
92
|
+
/**
|
|
93
|
+
* Automated migration available
|
|
94
|
+
*/
|
|
95
|
+
automatedMigration: zod_1.z.boolean().default(false)
|
|
96
|
+
.describe('Whether automated migration tool is available'),
|
|
97
|
+
/**
|
|
98
|
+
* Impact severity
|
|
99
|
+
*/
|
|
100
|
+
severity: zod_1.z.enum(['critical', 'major', 'minor']).describe('Impact severity'),
|
|
101
|
+
});
|
|
102
|
+
/**
|
|
103
|
+
* Deprecation Notice
|
|
104
|
+
* Information about deprecated features
|
|
105
|
+
*/
|
|
106
|
+
exports.DeprecationNoticeSchema = zod_1.z.object({
|
|
107
|
+
/**
|
|
108
|
+
* Feature or API being deprecated
|
|
109
|
+
*/
|
|
110
|
+
feature: zod_1.z.string().describe('Deprecated feature identifier'),
|
|
111
|
+
/**
|
|
112
|
+
* Version when deprecated
|
|
113
|
+
*/
|
|
114
|
+
deprecatedIn: zod_1.z.string(),
|
|
115
|
+
/**
|
|
116
|
+
* Planned removal version
|
|
117
|
+
*/
|
|
118
|
+
removeIn: zod_1.z.string().optional(),
|
|
119
|
+
/**
|
|
120
|
+
* Reason for deprecation
|
|
121
|
+
*/
|
|
122
|
+
reason: zod_1.z.string(),
|
|
123
|
+
/**
|
|
124
|
+
* Recommended alternative
|
|
125
|
+
*/
|
|
126
|
+
alternative: zod_1.z.string().optional().describe('What to use instead'),
|
|
127
|
+
/**
|
|
128
|
+
* Migration path
|
|
129
|
+
*/
|
|
130
|
+
migrationPath: zod_1.z.string().optional().describe('How to migrate to alternative'),
|
|
131
|
+
});
|
|
132
|
+
/**
|
|
133
|
+
* Compatibility Matrix Entry
|
|
134
|
+
* Maps compatibility between different plugin versions
|
|
135
|
+
*/
|
|
136
|
+
exports.CompatibilityMatrixEntrySchema = zod_1.z.object({
|
|
137
|
+
/**
|
|
138
|
+
* Source version
|
|
139
|
+
*/
|
|
140
|
+
from: zod_1.z.string().describe('Version being upgraded from'),
|
|
141
|
+
/**
|
|
142
|
+
* Target version
|
|
143
|
+
*/
|
|
144
|
+
to: zod_1.z.string().describe('Version being upgraded to'),
|
|
145
|
+
/**
|
|
146
|
+
* Compatibility level
|
|
147
|
+
*/
|
|
148
|
+
compatibility: exports.CompatibilityLevelSchema,
|
|
149
|
+
/**
|
|
150
|
+
* Breaking changes list
|
|
151
|
+
*/
|
|
152
|
+
breakingChanges: zod_1.z.array(exports.BreakingChangeSchema).optional(),
|
|
153
|
+
/**
|
|
154
|
+
* Migration required
|
|
155
|
+
*/
|
|
156
|
+
migrationRequired: zod_1.z.boolean().default(false),
|
|
157
|
+
/**
|
|
158
|
+
* Migration complexity
|
|
159
|
+
*/
|
|
160
|
+
migrationComplexity: zod_1.z.enum(['trivial', 'simple', 'moderate', 'complex', 'major']).optional(),
|
|
161
|
+
/**
|
|
162
|
+
* Estimated migration time in hours
|
|
163
|
+
*/
|
|
164
|
+
estimatedMigrationTime: zod_1.z.number().optional(),
|
|
165
|
+
/**
|
|
166
|
+
* Migration script available
|
|
167
|
+
*/
|
|
168
|
+
migrationScript: zod_1.z.string().optional().describe('Path to migration script'),
|
|
169
|
+
/**
|
|
170
|
+
* Test coverage for migration
|
|
171
|
+
*/
|
|
172
|
+
testCoverage: zod_1.z.number().min(0).max(100).optional()
|
|
173
|
+
.describe('Percentage of migration covered by tests'),
|
|
174
|
+
});
|
|
175
|
+
/**
|
|
176
|
+
* Plugin Compatibility Matrix
|
|
177
|
+
* Complete compatibility information for a plugin
|
|
178
|
+
*/
|
|
179
|
+
exports.PluginCompatibilityMatrixSchema = zod_1.z.object({
|
|
180
|
+
/**
|
|
181
|
+
* Plugin identifier
|
|
182
|
+
*/
|
|
183
|
+
pluginId: zod_1.z.string(),
|
|
184
|
+
/**
|
|
185
|
+
* Current version
|
|
186
|
+
*/
|
|
187
|
+
currentVersion: zod_1.z.string(),
|
|
188
|
+
/**
|
|
189
|
+
* Compatibility entries
|
|
190
|
+
*/
|
|
191
|
+
compatibilityMatrix: zod_1.z.array(exports.CompatibilityMatrixEntrySchema),
|
|
192
|
+
/**
|
|
193
|
+
* Supported versions
|
|
194
|
+
*/
|
|
195
|
+
supportedVersions: zod_1.z.array(zod_1.z.object({
|
|
196
|
+
version: zod_1.z.string(),
|
|
197
|
+
supported: zod_1.z.boolean(),
|
|
198
|
+
endOfLife: zod_1.z.string().datetime().optional().describe('End of support date'),
|
|
199
|
+
securitySupport: zod_1.z.boolean().default(false).describe('Still receives security updates'),
|
|
200
|
+
})),
|
|
201
|
+
/**
|
|
202
|
+
* Minimum compatible version
|
|
203
|
+
*/
|
|
204
|
+
minimumCompatibleVersion: zod_1.z.string().optional()
|
|
205
|
+
.describe('Oldest version that can be directly upgraded'),
|
|
206
|
+
});
|
|
207
|
+
/**
|
|
208
|
+
* Dependency Conflict
|
|
209
|
+
* Represents a conflict in plugin dependencies
|
|
210
|
+
*/
|
|
211
|
+
exports.DependencyConflictSchema = zod_1.z.object({
|
|
212
|
+
/**
|
|
213
|
+
* Type of conflict
|
|
214
|
+
*/
|
|
215
|
+
type: zod_1.z.enum([
|
|
216
|
+
'version-mismatch', // Different versions required
|
|
217
|
+
'missing-dependency', // Required dependency not found
|
|
218
|
+
'circular-dependency', // Circular dependency detected
|
|
219
|
+
'incompatible-versions', // Incompatible versions required by different plugins
|
|
220
|
+
'conflicting-interfaces', // Plugins implement conflicting interfaces
|
|
221
|
+
]),
|
|
222
|
+
/**
|
|
223
|
+
* Plugins involved in conflict
|
|
224
|
+
*/
|
|
225
|
+
plugins: zod_1.z.array(zod_1.z.object({
|
|
226
|
+
pluginId: zod_1.z.string(),
|
|
227
|
+
version: zod_1.z.string(),
|
|
228
|
+
requirement: zod_1.z.string().optional().describe('What this plugin requires'),
|
|
229
|
+
})),
|
|
230
|
+
/**
|
|
231
|
+
* Conflict description
|
|
232
|
+
*/
|
|
233
|
+
description: zod_1.z.string(),
|
|
234
|
+
/**
|
|
235
|
+
* Possible resolutions
|
|
236
|
+
*/
|
|
237
|
+
resolutions: zod_1.z.array(zod_1.z.object({
|
|
238
|
+
strategy: zod_1.z.enum([
|
|
239
|
+
'upgrade', // Upgrade one or more plugins
|
|
240
|
+
'downgrade', // Downgrade one or more plugins
|
|
241
|
+
'replace', // Replace with alternative plugin
|
|
242
|
+
'disable', // Disable conflicting plugin
|
|
243
|
+
'manual', // Manual intervention required
|
|
244
|
+
]),
|
|
245
|
+
description: zod_1.z.string(),
|
|
246
|
+
automaticResolution: zod_1.z.boolean().default(false),
|
|
247
|
+
riskLevel: zod_1.z.enum(['low', 'medium', 'high']),
|
|
248
|
+
})).optional(),
|
|
249
|
+
/**
|
|
250
|
+
* Severity of conflict
|
|
251
|
+
*/
|
|
252
|
+
severity: zod_1.z.enum(['critical', 'error', 'warning', 'info']),
|
|
253
|
+
});
|
|
254
|
+
/**
|
|
255
|
+
* Dependency Resolution Result
|
|
256
|
+
* Result of dependency resolution process
|
|
257
|
+
*/
|
|
258
|
+
exports.DependencyResolutionResultSchema = zod_1.z.object({
|
|
259
|
+
/**
|
|
260
|
+
* Resolution successful
|
|
261
|
+
*/
|
|
262
|
+
success: zod_1.z.boolean(),
|
|
263
|
+
/**
|
|
264
|
+
* Resolved plugin versions
|
|
265
|
+
*/
|
|
266
|
+
resolved: zod_1.z.array(zod_1.z.object({
|
|
267
|
+
pluginId: zod_1.z.string(),
|
|
268
|
+
version: zod_1.z.string(),
|
|
269
|
+
resolvedVersion: zod_1.z.string(),
|
|
270
|
+
})).optional(),
|
|
271
|
+
/**
|
|
272
|
+
* Conflicts found
|
|
273
|
+
*/
|
|
274
|
+
conflicts: zod_1.z.array(exports.DependencyConflictSchema).optional(),
|
|
275
|
+
/**
|
|
276
|
+
* Warnings
|
|
277
|
+
*/
|
|
278
|
+
warnings: zod_1.z.array(zod_1.z.string()).optional(),
|
|
279
|
+
/**
|
|
280
|
+
* Installation order (topologically sorted)
|
|
281
|
+
*/
|
|
282
|
+
installationOrder: zod_1.z.array(zod_1.z.string()).optional()
|
|
283
|
+
.describe('Plugin IDs in order they should be installed'),
|
|
284
|
+
/**
|
|
285
|
+
* Dependency graph
|
|
286
|
+
*/
|
|
287
|
+
dependencyGraph: zod_1.z.record(zod_1.z.string(), zod_1.z.array(zod_1.z.string())).optional()
|
|
288
|
+
.describe('Map of plugin ID to its dependencies'),
|
|
289
|
+
});
|
|
290
|
+
/**
|
|
291
|
+
* Multi-Version Support Configuration
|
|
292
|
+
* Allows running multiple versions of a plugin simultaneously
|
|
293
|
+
*/
|
|
294
|
+
exports.MultiVersionSupportSchema = zod_1.z.object({
|
|
295
|
+
/**
|
|
296
|
+
* Enable multi-version support
|
|
297
|
+
*/
|
|
298
|
+
enabled: zod_1.z.boolean().default(false),
|
|
299
|
+
/**
|
|
300
|
+
* Maximum concurrent versions
|
|
301
|
+
*/
|
|
302
|
+
maxConcurrentVersions: zod_1.z.number().int().min(1).default(2)
|
|
303
|
+
.describe('How many versions can run at the same time'),
|
|
304
|
+
/**
|
|
305
|
+
* Version selection strategy
|
|
306
|
+
*/
|
|
307
|
+
selectionStrategy: zod_1.z.enum([
|
|
308
|
+
'latest', // Always use latest version
|
|
309
|
+
'stable', // Use latest stable version
|
|
310
|
+
'compatible', // Use version compatible with dependencies
|
|
311
|
+
'pinned', // Use pinned version
|
|
312
|
+
'canary', // Use canary/preview version
|
|
313
|
+
'custom', // Custom selection logic
|
|
314
|
+
]).default('latest'),
|
|
315
|
+
/**
|
|
316
|
+
* Version routing rules
|
|
317
|
+
*/
|
|
318
|
+
routing: zod_1.z.array(zod_1.z.object({
|
|
319
|
+
condition: zod_1.z.string().describe('Routing condition (e.g., tenant, user, feature flag)'),
|
|
320
|
+
version: zod_1.z.string().describe('Version to use when condition matches'),
|
|
321
|
+
priority: zod_1.z.number().int().default(100).describe('Rule priority'),
|
|
322
|
+
})).optional(),
|
|
323
|
+
/**
|
|
324
|
+
* Gradual rollout configuration
|
|
325
|
+
*/
|
|
326
|
+
rollout: zod_1.z.object({
|
|
327
|
+
enabled: zod_1.z.boolean().default(false),
|
|
328
|
+
strategy: zod_1.z.enum(['percentage', 'blue-green', 'canary']),
|
|
329
|
+
percentage: zod_1.z.number().min(0).max(100).optional()
|
|
330
|
+
.describe('Percentage of traffic to new version'),
|
|
331
|
+
duration: zod_1.z.number().int().optional()
|
|
332
|
+
.describe('Rollout duration in milliseconds'),
|
|
333
|
+
}).optional(),
|
|
334
|
+
});
|
|
335
|
+
/**
|
|
336
|
+
* Plugin Version Metadata
|
|
337
|
+
* Complete version information for a plugin
|
|
338
|
+
*/
|
|
339
|
+
exports.PluginVersionMetadataSchema = zod_1.z.object({
|
|
340
|
+
/**
|
|
341
|
+
* Plugin identifier
|
|
342
|
+
*/
|
|
343
|
+
pluginId: zod_1.z.string(),
|
|
344
|
+
/**
|
|
345
|
+
* Version number
|
|
346
|
+
*/
|
|
347
|
+
version: exports.SemanticVersionSchema,
|
|
348
|
+
/**
|
|
349
|
+
* Version string (computed)
|
|
350
|
+
*/
|
|
351
|
+
versionString: zod_1.z.string().describe('Full version string (e.g., 1.2.3-beta.1+build.123)'),
|
|
352
|
+
/**
|
|
353
|
+
* Release date
|
|
354
|
+
*/
|
|
355
|
+
releaseDate: zod_1.z.string().datetime(),
|
|
356
|
+
/**
|
|
357
|
+
* Release notes
|
|
358
|
+
*/
|
|
359
|
+
releaseNotes: zod_1.z.string().optional(),
|
|
360
|
+
/**
|
|
361
|
+
* Breaking changes
|
|
362
|
+
*/
|
|
363
|
+
breakingChanges: zod_1.z.array(exports.BreakingChangeSchema).optional(),
|
|
364
|
+
/**
|
|
365
|
+
* Deprecations
|
|
366
|
+
*/
|
|
367
|
+
deprecations: zod_1.z.array(exports.DeprecationNoticeSchema).optional(),
|
|
368
|
+
/**
|
|
369
|
+
* Compatibility matrix
|
|
370
|
+
*/
|
|
371
|
+
compatibilityMatrix: zod_1.z.array(exports.CompatibilityMatrixEntrySchema).optional(),
|
|
372
|
+
/**
|
|
373
|
+
* Security vulnerabilities fixed
|
|
374
|
+
*/
|
|
375
|
+
securityFixes: zod_1.z.array(zod_1.z.object({
|
|
376
|
+
cve: zod_1.z.string().optional().describe('CVE identifier'),
|
|
377
|
+
severity: zod_1.z.enum(['critical', 'high', 'medium', 'low']),
|
|
378
|
+
description: zod_1.z.string(),
|
|
379
|
+
fixedIn: zod_1.z.string().describe('Version where vulnerability was fixed'),
|
|
380
|
+
})).optional(),
|
|
381
|
+
/**
|
|
382
|
+
* Download statistics
|
|
383
|
+
*/
|
|
384
|
+
statistics: zod_1.z.object({
|
|
385
|
+
downloads: zod_1.z.number().int().min(0).optional(),
|
|
386
|
+
installations: zod_1.z.number().int().min(0).optional(),
|
|
387
|
+
ratings: zod_1.z.number().min(0).max(5).optional(),
|
|
388
|
+
}).optional(),
|
|
389
|
+
/**
|
|
390
|
+
* Support status
|
|
391
|
+
*/
|
|
392
|
+
support: zod_1.z.object({
|
|
393
|
+
status: zod_1.z.enum(['active', 'maintenance', 'deprecated', 'eol']),
|
|
394
|
+
endOfLife: zod_1.z.string().datetime().optional(),
|
|
395
|
+
securitySupport: zod_1.z.boolean().default(true),
|
|
396
|
+
}),
|
|
397
|
+
});
|