@objectstack/spec 1.0.6 → 1.0.7
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/dist/ai/index.d.mts +1 -1
- package/dist/ai/index.d.ts +1 -1
- package/dist/api/index.d.mts +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.js +1869 -1780
- package/dist/api/index.js.map +1 -1
- package/dist/api/index.mjs +1869 -1780
- package/dist/api/index.mjs.map +1 -1
- package/dist/automation/index.d.mts +1 -1
- package/dist/automation/index.d.ts +1 -1
- package/dist/hub/index.d.mts +1 -1
- package/dist/hub/index.d.ts +1 -1
- package/dist/hub/index.js +796 -707
- package/dist/hub/index.js.map +1 -1
- package/dist/hub/index.mjs +796 -707
- package/dist/hub/index.mjs.map +1 -1
- package/dist/{index-CQ2ZwxNr.d.ts → index-CyognKSZ.d.ts} +146 -146
- package/dist/{index-BqQd0BcZ.d.mts → index-DE_lJ11p.d.mts} +146 -146
- package/dist/{index-C34qbBQr.d.mts → index-DLcySG7U.d.mts} +262 -241
- package/dist/{index-C34qbBQr.d.ts → index-DLcySG7U.d.ts} +262 -241
- package/dist/{index-D8XFyX0x.d.mts → index-Os7lItRe.d.mts} +108 -108
- package/dist/{index-D8XFyX0x.d.ts → index-Os7lItRe.d.ts} +108 -108
- package/dist/{index-CsF8m5Wj.d.mts → index-l6WIlmOD.d.mts} +39 -39
- package/dist/{index-CsF8m5Wj.d.ts → index-l6WIlmOD.d.ts} +39 -39
- package/dist/index.d.mts +158 -158
- package/dist/index.d.ts +158 -158
- package/dist/index.js +703 -668
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +703 -668
- package/dist/index.mjs.map +1 -1
- package/dist/kernel/index.d.mts +1 -1
- package/dist/kernel/index.d.ts +1 -1
- package/dist/kernel/index.js +705 -669
- package/dist/kernel/index.js.map +1 -1
- package/dist/kernel/index.mjs +704 -669
- package/dist/kernel/index.mjs.map +1 -1
- package/json-schema/api/CompileManifestResponse.json +6 -2
- package/json-schema/hub/ComposerResponse.json +6 -2
- package/json-schema/kernel/Manifest.json +6 -2
- package/json-schema/kernel/Plugin.json +28 -0
- package/package.json +1 -1
- package/dist/{index-iGrpxfqq.d.mts → index-D12rNohm.d.mts} +1 -1
- package/dist/{index-iGrpxfqq.d.ts → index-D12rNohm.d.ts} +1 -1
package/dist/index.js
CHANGED
|
@@ -9548,6 +9548,7 @@ var kernel_exports = {};
|
|
|
9548
9548
|
__export(kernel_exports, {
|
|
9549
9549
|
AdvancedPluginLifecycleConfigSchema: () => AdvancedPluginLifecycleConfigSchema,
|
|
9550
9550
|
BreakingChangeSchema: () => BreakingChangeSchema,
|
|
9551
|
+
CORE_PLUGIN_TYPES: () => CORE_PLUGIN_TYPES,
|
|
9551
9552
|
CapabilityConformanceLevelSchema: () => CapabilityConformanceLevelSchema,
|
|
9552
9553
|
CompatibilityLevelSchema: () => CompatibilityLevelSchema,
|
|
9553
9554
|
CompatibilityMatrixEntrySchema: () => CompatibilityMatrixEntrySchema,
|
|
@@ -10176,7 +10177,7 @@ var FeatureFlag = Object.assign(FeatureFlagSchema, {
|
|
|
10176
10177
|
});
|
|
10177
10178
|
|
|
10178
10179
|
// src/kernel/manifest.zod.ts
|
|
10179
|
-
var
|
|
10180
|
+
var import_zod63 = require("zod");
|
|
10180
10181
|
|
|
10181
10182
|
// src/kernel/plugin-capability.zod.ts
|
|
10182
10183
|
var import_zod60 = require("zod");
|
|
@@ -10991,8 +10992,90 @@ var PluginLoadingStateSchema = import_zod61.z.object({
|
|
|
10991
10992
|
retryCount: import_zod61.z.number().int().min(0).default(0)
|
|
10992
10993
|
}).describe("Plugin loading state");
|
|
10993
10994
|
|
|
10995
|
+
// src/kernel/plugin.zod.ts
|
|
10996
|
+
var import_zod62 = require("zod");
|
|
10997
|
+
var PluginContextSchema = import_zod62.z.object({
|
|
10998
|
+
ql: import_zod62.z.object({
|
|
10999
|
+
object: import_zod62.z.function().returns(import_zod62.z.any()),
|
|
11000
|
+
// Return any to allow method chaining
|
|
11001
|
+
query: import_zod62.z.function().returns(import_zod62.z.any())
|
|
11002
|
+
}).passthrough().describe("ObjectQL Engine Interface"),
|
|
11003
|
+
os: import_zod62.z.object({
|
|
11004
|
+
getCurrentUser: import_zod62.z.function().returns(import_zod62.z.any()),
|
|
11005
|
+
getConfig: import_zod62.z.function().returns(import_zod62.z.any())
|
|
11006
|
+
}).passthrough().describe("ObjectStack Kernel Interface"),
|
|
11007
|
+
logger: import_zod62.z.object({
|
|
11008
|
+
debug: import_zod62.z.function().returns(import_zod62.z.void()),
|
|
11009
|
+
info: import_zod62.z.function().returns(import_zod62.z.void()),
|
|
11010
|
+
warn: import_zod62.z.function().returns(import_zod62.z.void()),
|
|
11011
|
+
error: import_zod62.z.function().returns(import_zod62.z.void())
|
|
11012
|
+
}).passthrough().describe("Logger Interface"),
|
|
11013
|
+
storage: import_zod62.z.object({
|
|
11014
|
+
get: import_zod62.z.function().returns(import_zod62.z.any()),
|
|
11015
|
+
set: import_zod62.z.function().returns(import_zod62.z.promise(import_zod62.z.void())),
|
|
11016
|
+
delete: import_zod62.z.function().returns(import_zod62.z.promise(import_zod62.z.void()))
|
|
11017
|
+
}).passthrough().describe("Storage Interface"),
|
|
11018
|
+
i18n: import_zod62.z.object({
|
|
11019
|
+
t: import_zod62.z.function().returns(import_zod62.z.string()),
|
|
11020
|
+
getLocale: import_zod62.z.function().returns(import_zod62.z.string())
|
|
11021
|
+
}).passthrough().describe("Internationalization Interface"),
|
|
11022
|
+
metadata: import_zod62.z.record(import_zod62.z.string(), import_zod62.z.any()),
|
|
11023
|
+
events: import_zod62.z.record(import_zod62.z.string(), import_zod62.z.any()),
|
|
11024
|
+
app: import_zod62.z.object({
|
|
11025
|
+
router: import_zod62.z.object({
|
|
11026
|
+
get: import_zod62.z.function().returns(import_zod62.z.any()),
|
|
11027
|
+
post: import_zod62.z.function().returns(import_zod62.z.any()),
|
|
11028
|
+
use: import_zod62.z.function().returns(import_zod62.z.any())
|
|
11029
|
+
}).passthrough()
|
|
11030
|
+
}).passthrough().describe("App Framework Interface"),
|
|
11031
|
+
drivers: import_zod62.z.object({
|
|
11032
|
+
register: import_zod62.z.function().returns(import_zod62.z.void())
|
|
11033
|
+
}).passthrough().describe("Driver Registry")
|
|
11034
|
+
});
|
|
11035
|
+
var PluginLifecycleSchema = import_zod62.z.object({
|
|
11036
|
+
onInstall: import_zod62.z.function().args(PluginContextSchema).returns(import_zod62.z.promise(import_zod62.z.void())).optional(),
|
|
11037
|
+
onEnable: import_zod62.z.function().args(PluginContextSchema).returns(import_zod62.z.promise(import_zod62.z.void())).optional(),
|
|
11038
|
+
onDisable: import_zod62.z.function().args(PluginContextSchema).returns(import_zod62.z.promise(import_zod62.z.void())).optional(),
|
|
11039
|
+
onUninstall: import_zod62.z.function().args(PluginContextSchema).returns(import_zod62.z.promise(import_zod62.z.void())).optional(),
|
|
11040
|
+
onUpgrade: import_zod62.z.function().args(PluginContextSchema, import_zod62.z.string(), import_zod62.z.string()).returns(import_zod62.z.promise(import_zod62.z.void())).optional()
|
|
11041
|
+
});
|
|
11042
|
+
var CORE_PLUGIN_TYPES = [
|
|
11043
|
+
"ui",
|
|
11044
|
+
// Frontend: Serves static assets/SPA (e.g. Console, Studio)
|
|
11045
|
+
"driver",
|
|
11046
|
+
// Connectivity: Database or Storage adapters (e.g. SQL, S3)
|
|
11047
|
+
"server",
|
|
11048
|
+
// Protocol: HTTP/RPC Servers (e.g. Hono, GraphQL)
|
|
11049
|
+
"app",
|
|
11050
|
+
// Business: Vertical Solution Bundle (Metadata + Logic)
|
|
11051
|
+
"theme",
|
|
11052
|
+
// Appearance: UI Overrides & CSS Variables
|
|
11053
|
+
"agent",
|
|
11054
|
+
// AI: Autonomous Agent & Tool Definitions
|
|
11055
|
+
"objectql"
|
|
11056
|
+
// Core: ObjectQL Engine Data Provider
|
|
11057
|
+
];
|
|
11058
|
+
var PluginSchema = PluginLifecycleSchema.extend({
|
|
11059
|
+
id: import_zod62.z.string().min(1).optional().describe("Unique Plugin ID (e.g. com.example.crm)"),
|
|
11060
|
+
type: import_zod62.z.enum([
|
|
11061
|
+
"standard",
|
|
11062
|
+
// Default: General purpose backend logic (Service, Hook, etc.)
|
|
11063
|
+
...CORE_PLUGIN_TYPES
|
|
11064
|
+
]).default("standard").optional().describe("Plugin Type categorization for runtime behavior"),
|
|
11065
|
+
staticPath: import_zod62.z.string().optional().describe('Absolute path to static assets (Required for type="ui-plugin")'),
|
|
11066
|
+
slug: import_zod62.z.string().regex(/^[a-z0-9-_]+$/).optional().describe('URL path segment (Required for type="ui-plugin")'),
|
|
11067
|
+
default: import_zod62.z.boolean().optional().describe('Serve at root path (Only one "ui-plugin" can be default)'),
|
|
11068
|
+
version: import_zod62.z.string().regex(/^\d+\.\d+\.\d+$/).optional().describe("Semantic Version"),
|
|
11069
|
+
description: import_zod62.z.string().optional(),
|
|
11070
|
+
author: import_zod62.z.string().optional(),
|
|
11071
|
+
homepage: import_zod62.z.string().url().optional()
|
|
11072
|
+
});
|
|
11073
|
+
function definePlugin(config) {
|
|
11074
|
+
return config;
|
|
11075
|
+
}
|
|
11076
|
+
|
|
10994
11077
|
// src/kernel/manifest.zod.ts
|
|
10995
|
-
var ManifestSchema =
|
|
11078
|
+
var ManifestSchema = import_zod63.z.object({
|
|
10996
11079
|
/**
|
|
10997
11080
|
* Unique package identifier using reverse domain notation.
|
|
10998
11081
|
* Must be unique across the entire ecosystem.
|
|
@@ -11000,65 +11083,75 @@ var ManifestSchema = import_zod62.z.object({
|
|
|
11000
11083
|
* @example "com.steedos.crm"
|
|
11001
11084
|
* @example "org.apache.superset"
|
|
11002
11085
|
*/
|
|
11003
|
-
id:
|
|
11086
|
+
id: import_zod63.z.string().describe("Unique package identifier (reverse domain style)"),
|
|
11004
11087
|
/**
|
|
11005
11088
|
* Package version following semantic versioning (major.minor.patch).
|
|
11006
11089
|
*
|
|
11007
11090
|
* @example "1.0.0"
|
|
11008
11091
|
* @example "2.1.0-beta.1"
|
|
11009
11092
|
*/
|
|
11010
|
-
version:
|
|
11093
|
+
version: import_zod63.z.string().regex(/^\d+\.\d+\.\d+$/).describe("Package version (semantic versioning)"),
|
|
11011
11094
|
/**
|
|
11012
11095
|
* Type of the package in the ObjectStack ecosystem.
|
|
11013
|
-
* -
|
|
11014
|
-
* -
|
|
11015
|
-
* - driver:
|
|
11096
|
+
* - plugin: General-purpose functionality extension (Runtime: standard)
|
|
11097
|
+
* - app: Business application package
|
|
11098
|
+
* - driver: Connectivity adapter
|
|
11099
|
+
* - server: Protocol gateway (Hono, GraphQL)
|
|
11100
|
+
* - ui: Frontend package (Static/SPA)
|
|
11101
|
+
* - theme: UI Theme
|
|
11102
|
+
* - agent: AI Agent
|
|
11016
11103
|
* - module: Reusable code library/shared module
|
|
11017
|
-
* - objectql: Core engine
|
|
11018
|
-
* -
|
|
11019
|
-
* - adapter: Host adapter - Runtime container (Express, Hono, Fastify, Serverless)
|
|
11104
|
+
* - objectql: Core engine
|
|
11105
|
+
* - adapter: Host adapter (Express, Fastify)
|
|
11020
11106
|
*/
|
|
11021
|
-
type:
|
|
11107
|
+
type: import_zod63.z.enum([
|
|
11108
|
+
"plugin",
|
|
11109
|
+
...CORE_PLUGIN_TYPES,
|
|
11110
|
+
"module",
|
|
11111
|
+
"gateway",
|
|
11112
|
+
// Deprecated: use 'server'
|
|
11113
|
+
"adapter"
|
|
11114
|
+
]).describe("Type of package"),
|
|
11022
11115
|
/**
|
|
11023
11116
|
* Human-readable name of the package.
|
|
11024
11117
|
* Displayed in the UI for users.
|
|
11025
11118
|
*
|
|
11026
11119
|
* @example "Project Management"
|
|
11027
11120
|
*/
|
|
11028
|
-
name:
|
|
11121
|
+
name: import_zod63.z.string().describe("Human-readable package name"),
|
|
11029
11122
|
/**
|
|
11030
11123
|
* Brief description of the package functionality.
|
|
11031
11124
|
* Displayed in the marketplace and plugin manager.
|
|
11032
11125
|
*/
|
|
11033
|
-
description:
|
|
11126
|
+
description: import_zod63.z.string().optional().describe("Package description"),
|
|
11034
11127
|
/**
|
|
11035
11128
|
* Array of permission strings that the package requires.
|
|
11036
11129
|
* These form the "Scope" requested by the package at installation.
|
|
11037
11130
|
*
|
|
11038
11131
|
* @example ["system.user.read", "system.data.write"]
|
|
11039
11132
|
*/
|
|
11040
|
-
permissions:
|
|
11133
|
+
permissions: import_zod63.z.array(import_zod63.z.string()).optional().describe("Array of required permission strings"),
|
|
11041
11134
|
/**
|
|
11042
11135
|
* Glob patterns specifying ObjectQL schemas files.
|
|
11043
11136
|
* Matches `*.object.yml` or `*.object.ts` files to load business objects.
|
|
11044
11137
|
*
|
|
11045
11138
|
* @example ["./src/objects/*.object.yml"]
|
|
11046
11139
|
*/
|
|
11047
|
-
objects:
|
|
11140
|
+
objects: import_zod63.z.array(import_zod63.z.string()).optional().describe("Glob patterns for ObjectQL schemas files"),
|
|
11048
11141
|
/**
|
|
11049
11142
|
* Defines system level DataSources.
|
|
11050
11143
|
* Matches `*.datasource.yml` files.
|
|
11051
11144
|
*
|
|
11052
11145
|
* @example ["./src/datasources/*.datasource.mongo.yml"]
|
|
11053
11146
|
*/
|
|
11054
|
-
datasources:
|
|
11147
|
+
datasources: import_zod63.z.array(import_zod63.z.string()).optional().describe("Glob patterns for Datasource definitions"),
|
|
11055
11148
|
/**
|
|
11056
11149
|
* Package Dependencies.
|
|
11057
11150
|
* Map of package IDs to version requirements.
|
|
11058
11151
|
*
|
|
11059
11152
|
* @example { "@steedos/plugin-auth": "^2.0.0" }
|
|
11060
11153
|
*/
|
|
11061
|
-
dependencies:
|
|
11154
|
+
dependencies: import_zod63.z.record(import_zod63.z.string(), import_zod63.z.string()).optional().describe("Package dependencies"),
|
|
11062
11155
|
/**
|
|
11063
11156
|
* Plugin Configuration Schema.
|
|
11064
11157
|
* Defines the settings this plugin exposes to the user via UI/ENV.
|
|
@@ -11073,109 +11166,109 @@ var ManifestSchema = import_zod62.z.object({
|
|
|
11073
11166
|
* }
|
|
11074
11167
|
* }
|
|
11075
11168
|
*/
|
|
11076
|
-
configuration:
|
|
11077
|
-
title:
|
|
11078
|
-
properties:
|
|
11079
|
-
type:
|
|
11080
|
-
default:
|
|
11081
|
-
description:
|
|
11082
|
-
required:
|
|
11083
|
-
secret:
|
|
11084
|
-
enum:
|
|
11169
|
+
configuration: import_zod63.z.object({
|
|
11170
|
+
title: import_zod63.z.string().optional(),
|
|
11171
|
+
properties: import_zod63.z.record(import_zod63.z.string(), import_zod63.z.object({
|
|
11172
|
+
type: import_zod63.z.enum(["string", "number", "boolean", "array", "object"]).describe("Data type of the setting"),
|
|
11173
|
+
default: import_zod63.z.any().optional().describe("Default value"),
|
|
11174
|
+
description: import_zod63.z.string().optional().describe("Tooltip description"),
|
|
11175
|
+
required: import_zod63.z.boolean().optional().describe("Is this setting required?"),
|
|
11176
|
+
secret: import_zod63.z.boolean().optional().describe("If true, value is encrypted/masked (e.g. API Keys)"),
|
|
11177
|
+
enum: import_zod63.z.array(import_zod63.z.string()).optional().describe("Allowed values for select inputs")
|
|
11085
11178
|
})).describe("Map of configuration keys to their definitions")
|
|
11086
11179
|
}).optional().describe("Plugin configuration settings"),
|
|
11087
11180
|
/**
|
|
11088
11181
|
* Contribution Points (VS Code Style).
|
|
11089
11182
|
* formalized way to extend the platform capabilities.
|
|
11090
11183
|
*/
|
|
11091
|
-
contributes:
|
|
11184
|
+
contributes: import_zod63.z.object({
|
|
11092
11185
|
/**
|
|
11093
11186
|
* Register new Metadata Kinds (CRDs).
|
|
11094
11187
|
* Enables the system to parse and validate new file types.
|
|
11095
11188
|
* Example: Registering a BI plugin to handle *.report.ts
|
|
11096
11189
|
*/
|
|
11097
|
-
kinds:
|
|
11098
|
-
id:
|
|
11099
|
-
globs:
|
|
11100
|
-
description:
|
|
11190
|
+
kinds: import_zod63.z.array(import_zod63.z.object({
|
|
11191
|
+
id: import_zod63.z.string().describe('The generic identifier of the kind (e.g., "sys.bi.report")'),
|
|
11192
|
+
globs: import_zod63.z.array(import_zod63.z.string()).describe('File patterns to watch (e.g., ["**/*.report.ts"])'),
|
|
11193
|
+
description: import_zod63.z.string().optional().describe("Description of what this kind represents")
|
|
11101
11194
|
})).optional().describe("New Metadata Types to recognize"),
|
|
11102
11195
|
/**
|
|
11103
11196
|
* Register System Hooks.
|
|
11104
11197
|
* Declares that this plugin listens to specific system events.
|
|
11105
11198
|
*/
|
|
11106
|
-
events:
|
|
11199
|
+
events: import_zod63.z.array(import_zod63.z.string()).optional().describe("Events this plugin listens to"),
|
|
11107
11200
|
/**
|
|
11108
11201
|
* Register UI Menus.
|
|
11109
11202
|
*/
|
|
11110
|
-
menus:
|
|
11111
|
-
id:
|
|
11112
|
-
label:
|
|
11113
|
-
command:
|
|
11203
|
+
menus: import_zod63.z.record(import_zod63.z.string(), import_zod63.z.array(import_zod63.z.object({
|
|
11204
|
+
id: import_zod63.z.string(),
|
|
11205
|
+
label: import_zod63.z.string(),
|
|
11206
|
+
command: import_zod63.z.string().optional()
|
|
11114
11207
|
}))).optional().describe("UI Menu contributions"),
|
|
11115
11208
|
/**
|
|
11116
11209
|
* Register Custom Themes.
|
|
11117
11210
|
*/
|
|
11118
|
-
themes:
|
|
11119
|
-
id:
|
|
11120
|
-
label:
|
|
11121
|
-
path:
|
|
11211
|
+
themes: import_zod63.z.array(import_zod63.z.object({
|
|
11212
|
+
id: import_zod63.z.string(),
|
|
11213
|
+
label: import_zod63.z.string(),
|
|
11214
|
+
path: import_zod63.z.string()
|
|
11122
11215
|
})).optional().describe("Theme contributions"),
|
|
11123
11216
|
/**
|
|
11124
11217
|
* Register Translations.
|
|
11125
11218
|
* Path to translation files (e.g. "locales/en.json").
|
|
11126
11219
|
*/
|
|
11127
|
-
translations:
|
|
11128
|
-
locale:
|
|
11129
|
-
path:
|
|
11220
|
+
translations: import_zod63.z.array(import_zod63.z.object({
|
|
11221
|
+
locale: import_zod63.z.string(),
|
|
11222
|
+
path: import_zod63.z.string()
|
|
11130
11223
|
})).optional().describe("Translation resources"),
|
|
11131
11224
|
/**
|
|
11132
11225
|
* Register Server Actions.
|
|
11133
11226
|
* Invocable functions exposed to Flows or API.
|
|
11134
11227
|
*/
|
|
11135
|
-
actions:
|
|
11136
|
-
name:
|
|
11137
|
-
label:
|
|
11138
|
-
description:
|
|
11139
|
-
input:
|
|
11140
|
-
output:
|
|
11228
|
+
actions: import_zod63.z.array(import_zod63.z.object({
|
|
11229
|
+
name: import_zod63.z.string().describe("Unique action name"),
|
|
11230
|
+
label: import_zod63.z.string().optional(),
|
|
11231
|
+
description: import_zod63.z.string().optional(),
|
|
11232
|
+
input: import_zod63.z.any().optional().describe("Input validation schema"),
|
|
11233
|
+
output: import_zod63.z.any().optional().describe("Output schema")
|
|
11141
11234
|
})).optional().describe("Exposed server actions"),
|
|
11142
11235
|
/**
|
|
11143
11236
|
* Register Storage Drivers.
|
|
11144
11237
|
* Enables connecting to new types of datasources.
|
|
11145
11238
|
*/
|
|
11146
|
-
drivers:
|
|
11147
|
-
id:
|
|
11148
|
-
label:
|
|
11149
|
-
description:
|
|
11239
|
+
drivers: import_zod63.z.array(import_zod63.z.object({
|
|
11240
|
+
id: import_zod63.z.string().describe('Driver unique identifier (e.g. "postgres", "mongo")'),
|
|
11241
|
+
label: import_zod63.z.string().describe("Human readable name"),
|
|
11242
|
+
description: import_zod63.z.string().optional()
|
|
11150
11243
|
})).optional().describe("Driver contributions"),
|
|
11151
11244
|
/**
|
|
11152
11245
|
* Register Custom Field Types.
|
|
11153
11246
|
* Extends the data model with new widget types.
|
|
11154
11247
|
*/
|
|
11155
|
-
fieldTypes:
|
|
11156
|
-
name:
|
|
11157
|
-
label:
|
|
11158
|
-
description:
|
|
11248
|
+
fieldTypes: import_zod63.z.array(import_zod63.z.object({
|
|
11249
|
+
name: import_zod63.z.string().describe('Unique field type name (e.g. "vector")'),
|
|
11250
|
+
label: import_zod63.z.string().describe("Display label"),
|
|
11251
|
+
description: import_zod63.z.string().optional()
|
|
11159
11252
|
})).optional().describe("Field Type contributions"),
|
|
11160
11253
|
/**
|
|
11161
11254
|
* Register Custom Query Operators/Functions.
|
|
11162
11255
|
* Extends ObjectQL with new functions (e.g. distance()).
|
|
11163
11256
|
*/
|
|
11164
|
-
functions:
|
|
11165
|
-
name:
|
|
11166
|
-
description:
|
|
11167
|
-
args:
|
|
11168
|
-
returnType:
|
|
11257
|
+
functions: import_zod63.z.array(import_zod63.z.object({
|
|
11258
|
+
name: import_zod63.z.string().describe('Function name (e.g. "distance")'),
|
|
11259
|
+
description: import_zod63.z.string().optional(),
|
|
11260
|
+
args: import_zod63.z.array(import_zod63.z.string()).optional().describe("Argument types"),
|
|
11261
|
+
returnType: import_zod63.z.string().optional()
|
|
11169
11262
|
})).optional().describe("Query Function contributions")
|
|
11170
11263
|
}).optional().describe("Platform contributions"),
|
|
11171
11264
|
/**
|
|
11172
11265
|
* Initial data seeding configuration.
|
|
11173
11266
|
* Defines default records to be inserted when the package is installed.
|
|
11174
11267
|
*/
|
|
11175
|
-
data:
|
|
11176
|
-
object:
|
|
11177
|
-
records:
|
|
11178
|
-
mode:
|
|
11268
|
+
data: import_zod63.z.array(import_zod63.z.object({
|
|
11269
|
+
object: import_zod63.z.string().describe("Target Object Name"),
|
|
11270
|
+
records: import_zod63.z.array(import_zod63.z.record(import_zod63.z.string(), import_zod63.z.any())).describe("List of records to insert"),
|
|
11271
|
+
mode: import_zod63.z.enum(["upsert", "insert", "ignore"]).default("upsert").describe("Seeding mode")
|
|
11179
11272
|
})).optional().describe("Initial seed data"),
|
|
11180
11273
|
/**
|
|
11181
11274
|
* Plugin Capability Manifest.
|
|
@@ -11187,7 +11280,7 @@ var ManifestSchema = import_zod62.z.object({
|
|
|
11187
11280
|
* Extension points contributed by this package.
|
|
11188
11281
|
* Allows packages to extend UI components, add functionality, etc.
|
|
11189
11282
|
*/
|
|
11190
|
-
extensions:
|
|
11283
|
+
extensions: import_zod63.z.record(import_zod63.z.string(), import_zod63.z.any()).optional().describe("Extension points and contributions"),
|
|
11191
11284
|
/**
|
|
11192
11285
|
* Plugin Loading Configuration.
|
|
11193
11286
|
* Configures how the plugin is loaded, initialized, and managed at runtime.
|
|
@@ -11197,22 +11290,22 @@ var ManifestSchema = import_zod62.z.object({
|
|
|
11197
11290
|
});
|
|
11198
11291
|
|
|
11199
11292
|
// src/kernel/metadata-loader.zod.ts
|
|
11200
|
-
var
|
|
11201
|
-
var MetadataFormatSchema2 =
|
|
11202
|
-
var MetadataStatsSchema2 =
|
|
11293
|
+
var import_zod64 = require("zod");
|
|
11294
|
+
var MetadataFormatSchema2 = import_zod64.z.enum(["json", "yaml", "typescript", "javascript"]);
|
|
11295
|
+
var MetadataStatsSchema2 = import_zod64.z.object({
|
|
11203
11296
|
/**
|
|
11204
11297
|
* Size of the metadata file in bytes
|
|
11205
11298
|
*/
|
|
11206
|
-
size:
|
|
11299
|
+
size: import_zod64.z.number().int().min(0).describe("File size in bytes"),
|
|
11207
11300
|
/**
|
|
11208
11301
|
* Last modification timestamp
|
|
11209
11302
|
*/
|
|
11210
|
-
modifiedAt:
|
|
11303
|
+
modifiedAt: import_zod64.z.date().describe("Last modified date"),
|
|
11211
11304
|
/**
|
|
11212
11305
|
* ETag for cache validation
|
|
11213
11306
|
* Used for conditional requests (If-None-Match header)
|
|
11214
11307
|
*/
|
|
11215
|
-
etag:
|
|
11308
|
+
etag: import_zod64.z.string().describe("Entity tag for cache validation"),
|
|
11216
11309
|
/**
|
|
11217
11310
|
* Serialization format
|
|
11218
11311
|
*/
|
|
@@ -11220,50 +11313,50 @@ var MetadataStatsSchema2 = import_zod63.z.object({
|
|
|
11220
11313
|
/**
|
|
11221
11314
|
* Full file path (if applicable)
|
|
11222
11315
|
*/
|
|
11223
|
-
path:
|
|
11316
|
+
path: import_zod64.z.string().optional().describe("File system path"),
|
|
11224
11317
|
/**
|
|
11225
11318
|
* Additional metadata provider-specific properties
|
|
11226
11319
|
*/
|
|
11227
|
-
metadata:
|
|
11320
|
+
metadata: import_zod64.z.record(import_zod64.z.string(), import_zod64.z.any()).optional().describe("Provider-specific metadata")
|
|
11228
11321
|
});
|
|
11229
|
-
var MetadataLoadOptionsSchema2 =
|
|
11322
|
+
var MetadataLoadOptionsSchema2 = import_zod64.z.object({
|
|
11230
11323
|
/**
|
|
11231
11324
|
* Glob patterns to match files
|
|
11232
11325
|
* Example: ["**\/*.object.ts", "**\/*.object.json"]
|
|
11233
11326
|
*/
|
|
11234
|
-
patterns:
|
|
11327
|
+
patterns: import_zod64.z.array(import_zod64.z.string()).optional().describe("File glob patterns"),
|
|
11235
11328
|
/**
|
|
11236
11329
|
* If-None-Match header for conditional loading
|
|
11237
11330
|
* Only load if ETag doesn't match
|
|
11238
11331
|
*/
|
|
11239
|
-
ifNoneMatch:
|
|
11332
|
+
ifNoneMatch: import_zod64.z.string().optional().describe("ETag for conditional request"),
|
|
11240
11333
|
/**
|
|
11241
11334
|
* If-Modified-Since header for conditional loading
|
|
11242
11335
|
*/
|
|
11243
|
-
ifModifiedSince:
|
|
11336
|
+
ifModifiedSince: import_zod64.z.date().optional().describe("Only load if modified after this date"),
|
|
11244
11337
|
/**
|
|
11245
11338
|
* Whether to validate against Zod schema
|
|
11246
11339
|
*/
|
|
11247
|
-
validate:
|
|
11340
|
+
validate: import_zod64.z.boolean().default(true).describe("Validate against schema"),
|
|
11248
11341
|
/**
|
|
11249
11342
|
* Whether to use cache if available
|
|
11250
11343
|
*/
|
|
11251
|
-
useCache:
|
|
11344
|
+
useCache: import_zod64.z.boolean().default(true).describe("Enable caching"),
|
|
11252
11345
|
/**
|
|
11253
11346
|
* Filter function (serialized as string)
|
|
11254
11347
|
* Example: "(item) => item.name.startsWith('sys_')"
|
|
11255
11348
|
*/
|
|
11256
|
-
filter:
|
|
11349
|
+
filter: import_zod64.z.string().optional().describe("Filter predicate as string"),
|
|
11257
11350
|
/**
|
|
11258
11351
|
* Maximum number of items to load
|
|
11259
11352
|
*/
|
|
11260
|
-
limit:
|
|
11353
|
+
limit: import_zod64.z.number().int().min(1).optional().describe("Maximum items to load"),
|
|
11261
11354
|
/**
|
|
11262
11355
|
* Recursively search subdirectories
|
|
11263
11356
|
*/
|
|
11264
|
-
recursive:
|
|
11357
|
+
recursive: import_zod64.z.boolean().default(true).describe("Search subdirectories")
|
|
11265
11358
|
});
|
|
11266
|
-
var MetadataSaveOptionsSchema2 =
|
|
11359
|
+
var MetadataSaveOptionsSchema2 = import_zod64.z.object({
|
|
11267
11360
|
/**
|
|
11268
11361
|
* Serialization format
|
|
11269
11362
|
*/
|
|
@@ -11271,41 +11364,41 @@ var MetadataSaveOptionsSchema2 = import_zod63.z.object({
|
|
|
11271
11364
|
/**
|
|
11272
11365
|
* Prettify output (formatted with indentation)
|
|
11273
11366
|
*/
|
|
11274
|
-
prettify:
|
|
11367
|
+
prettify: import_zod64.z.boolean().default(true).describe("Format with indentation"),
|
|
11275
11368
|
/**
|
|
11276
11369
|
* Indentation size (spaces)
|
|
11277
11370
|
*/
|
|
11278
|
-
indent:
|
|
11371
|
+
indent: import_zod64.z.number().int().min(0).max(8).default(2).describe("Indentation spaces"),
|
|
11279
11372
|
/**
|
|
11280
11373
|
* Sort object keys alphabetically
|
|
11281
11374
|
*/
|
|
11282
|
-
sortKeys:
|
|
11375
|
+
sortKeys: import_zod64.z.boolean().default(false).describe("Sort object keys"),
|
|
11283
11376
|
/**
|
|
11284
11377
|
* Include default values in output
|
|
11285
11378
|
*/
|
|
11286
|
-
includeDefaults:
|
|
11379
|
+
includeDefaults: import_zod64.z.boolean().default(false).describe("Include default values"),
|
|
11287
11380
|
/**
|
|
11288
11381
|
* Create backup before overwriting
|
|
11289
11382
|
*/
|
|
11290
|
-
backup:
|
|
11383
|
+
backup: import_zod64.z.boolean().default(false).describe("Create backup file"),
|
|
11291
11384
|
/**
|
|
11292
11385
|
* Overwrite if exists
|
|
11293
11386
|
*/
|
|
11294
|
-
overwrite:
|
|
11387
|
+
overwrite: import_zod64.z.boolean().default(true).describe("Overwrite existing file"),
|
|
11295
11388
|
/**
|
|
11296
11389
|
* Atomic write (write to temp file, then rename)
|
|
11297
11390
|
*/
|
|
11298
|
-
atomic:
|
|
11391
|
+
atomic: import_zod64.z.boolean().default(true).describe("Use atomic write operation"),
|
|
11299
11392
|
/**
|
|
11300
11393
|
* Custom file path (overrides default location)
|
|
11301
11394
|
*/
|
|
11302
|
-
path:
|
|
11395
|
+
path: import_zod64.z.string().optional().describe("Custom output path")
|
|
11303
11396
|
});
|
|
11304
|
-
var MetadataExportOptionsSchema2 =
|
|
11397
|
+
var MetadataExportOptionsSchema2 = import_zod64.z.object({
|
|
11305
11398
|
/**
|
|
11306
11399
|
* Output file path
|
|
11307
11400
|
*/
|
|
11308
|
-
output:
|
|
11401
|
+
output: import_zod64.z.string().describe("Output file path"),
|
|
11309
11402
|
/**
|
|
11310
11403
|
* Export format
|
|
11311
11404
|
*/
|
|
@@ -11313,60 +11406,60 @@ var MetadataExportOptionsSchema2 = import_zod63.z.object({
|
|
|
11313
11406
|
/**
|
|
11314
11407
|
* Filter predicate as string
|
|
11315
11408
|
*/
|
|
11316
|
-
filter:
|
|
11409
|
+
filter: import_zod64.z.string().optional().describe("Filter items to export"),
|
|
11317
11410
|
/**
|
|
11318
11411
|
* Include statistics in export
|
|
11319
11412
|
*/
|
|
11320
|
-
includeStats:
|
|
11413
|
+
includeStats: import_zod64.z.boolean().default(false).describe("Include metadata statistics"),
|
|
11321
11414
|
/**
|
|
11322
11415
|
* Compress output
|
|
11323
11416
|
*/
|
|
11324
|
-
compress:
|
|
11417
|
+
compress: import_zod64.z.boolean().default(false).describe("Compress output (gzip)"),
|
|
11325
11418
|
/**
|
|
11326
11419
|
* Pretty print output
|
|
11327
11420
|
*/
|
|
11328
|
-
prettify:
|
|
11421
|
+
prettify: import_zod64.z.boolean().default(true).describe("Pretty print output")
|
|
11329
11422
|
});
|
|
11330
|
-
var MetadataImportOptionsSchema2 =
|
|
11423
|
+
var MetadataImportOptionsSchema2 = import_zod64.z.object({
|
|
11331
11424
|
/**
|
|
11332
11425
|
* Conflict resolution strategy
|
|
11333
11426
|
*/
|
|
11334
|
-
conflictResolution:
|
|
11427
|
+
conflictResolution: import_zod64.z.enum(["skip", "overwrite", "merge", "fail"]).default("merge").describe("How to handle existing items"),
|
|
11335
11428
|
/**
|
|
11336
11429
|
* Validate items against schema
|
|
11337
11430
|
*/
|
|
11338
|
-
validate:
|
|
11431
|
+
validate: import_zod64.z.boolean().default(true).describe("Validate before import"),
|
|
11339
11432
|
/**
|
|
11340
11433
|
* Dry run (don't actually save)
|
|
11341
11434
|
*/
|
|
11342
|
-
dryRun:
|
|
11435
|
+
dryRun: import_zod64.z.boolean().default(false).describe("Simulate import without saving"),
|
|
11343
11436
|
/**
|
|
11344
11437
|
* Continue on errors
|
|
11345
11438
|
*/
|
|
11346
|
-
continueOnError:
|
|
11439
|
+
continueOnError: import_zod64.z.boolean().default(false).describe("Continue if validation fails"),
|
|
11347
11440
|
/**
|
|
11348
11441
|
* Transform function (as string)
|
|
11349
11442
|
* Example: "(item) => ({ ...item, imported: true })"
|
|
11350
11443
|
*/
|
|
11351
|
-
transform:
|
|
11444
|
+
transform: import_zod64.z.string().optional().describe("Transform items before import")
|
|
11352
11445
|
});
|
|
11353
|
-
var MetadataLoadResultSchema2 =
|
|
11446
|
+
var MetadataLoadResultSchema2 = import_zod64.z.object({
|
|
11354
11447
|
/**
|
|
11355
11448
|
* Loaded data
|
|
11356
11449
|
*/
|
|
11357
|
-
data:
|
|
11450
|
+
data: import_zod64.z.any().nullable().describe("Loaded metadata"),
|
|
11358
11451
|
/**
|
|
11359
11452
|
* Whether data came from cache (304 Not Modified)
|
|
11360
11453
|
*/
|
|
11361
|
-
fromCache:
|
|
11454
|
+
fromCache: import_zod64.z.boolean().default(false).describe("Loaded from cache"),
|
|
11362
11455
|
/**
|
|
11363
11456
|
* Not modified (conditional request matched)
|
|
11364
11457
|
*/
|
|
11365
|
-
notModified:
|
|
11458
|
+
notModified: import_zod64.z.boolean().default(false).describe("Not modified since last request"),
|
|
11366
11459
|
/**
|
|
11367
11460
|
* ETag of loaded data
|
|
11368
11461
|
*/
|
|
11369
|
-
etag:
|
|
11462
|
+
etag: import_zod64.z.string().optional().describe("Entity tag"),
|
|
11370
11463
|
/**
|
|
11371
11464
|
* Statistics about loaded data
|
|
11372
11465
|
*/
|
|
@@ -11374,166 +11467,166 @@ var MetadataLoadResultSchema2 = import_zod63.z.object({
|
|
|
11374
11467
|
/**
|
|
11375
11468
|
* Load time in milliseconds
|
|
11376
11469
|
*/
|
|
11377
|
-
loadTime:
|
|
11470
|
+
loadTime: import_zod64.z.number().min(0).optional().describe("Load duration in ms")
|
|
11378
11471
|
});
|
|
11379
|
-
var MetadataSaveResultSchema2 =
|
|
11472
|
+
var MetadataSaveResultSchema2 = import_zod64.z.object({
|
|
11380
11473
|
/**
|
|
11381
11474
|
* Whether save was successful
|
|
11382
11475
|
*/
|
|
11383
|
-
success:
|
|
11476
|
+
success: import_zod64.z.boolean().describe("Save successful"),
|
|
11384
11477
|
/**
|
|
11385
11478
|
* Path where file was saved
|
|
11386
11479
|
*/
|
|
11387
|
-
path:
|
|
11480
|
+
path: import_zod64.z.string().describe("Output path"),
|
|
11388
11481
|
/**
|
|
11389
11482
|
* Generated ETag
|
|
11390
11483
|
*/
|
|
11391
|
-
etag:
|
|
11484
|
+
etag: import_zod64.z.string().optional().describe("Generated entity tag"),
|
|
11392
11485
|
/**
|
|
11393
11486
|
* File size in bytes
|
|
11394
11487
|
*/
|
|
11395
|
-
size:
|
|
11488
|
+
size: import_zod64.z.number().int().min(0).optional().describe("File size"),
|
|
11396
11489
|
/**
|
|
11397
11490
|
* Save time in milliseconds
|
|
11398
11491
|
*/
|
|
11399
|
-
saveTime:
|
|
11492
|
+
saveTime: import_zod64.z.number().min(0).optional().describe("Save duration in ms"),
|
|
11400
11493
|
/**
|
|
11401
11494
|
* Backup path (if created)
|
|
11402
11495
|
*/
|
|
11403
|
-
backupPath:
|
|
11496
|
+
backupPath: import_zod64.z.string().optional().describe("Backup file path")
|
|
11404
11497
|
});
|
|
11405
|
-
var MetadataWatchEventSchema2 =
|
|
11498
|
+
var MetadataWatchEventSchema2 = import_zod64.z.object({
|
|
11406
11499
|
/**
|
|
11407
11500
|
* Event type
|
|
11408
11501
|
*/
|
|
11409
|
-
type:
|
|
11502
|
+
type: import_zod64.z.enum(["added", "changed", "deleted"]).describe("Event type"),
|
|
11410
11503
|
/**
|
|
11411
11504
|
* Metadata type (e.g., 'object', 'view', 'app')
|
|
11412
11505
|
*/
|
|
11413
|
-
metadataType:
|
|
11506
|
+
metadataType: import_zod64.z.string().describe("Type of metadata"),
|
|
11414
11507
|
/**
|
|
11415
11508
|
* Item name/identifier
|
|
11416
11509
|
*/
|
|
11417
|
-
name:
|
|
11510
|
+
name: import_zod64.z.string().describe("Item identifier"),
|
|
11418
11511
|
/**
|
|
11419
11512
|
* Full file path
|
|
11420
11513
|
*/
|
|
11421
|
-
path:
|
|
11514
|
+
path: import_zod64.z.string().describe("File path"),
|
|
11422
11515
|
/**
|
|
11423
11516
|
* Loaded item data (for added/changed events)
|
|
11424
11517
|
*/
|
|
11425
|
-
data:
|
|
11518
|
+
data: import_zod64.z.any().optional().describe("Item data"),
|
|
11426
11519
|
/**
|
|
11427
11520
|
* Timestamp
|
|
11428
11521
|
*/
|
|
11429
|
-
timestamp:
|
|
11522
|
+
timestamp: import_zod64.z.date().describe("Event timestamp")
|
|
11430
11523
|
});
|
|
11431
|
-
var MetadataCollectionInfoSchema2 =
|
|
11524
|
+
var MetadataCollectionInfoSchema2 = import_zod64.z.object({
|
|
11432
11525
|
/**
|
|
11433
11526
|
* Collection type (e.g., 'object', 'view', 'app')
|
|
11434
11527
|
*/
|
|
11435
|
-
type:
|
|
11528
|
+
type: import_zod64.z.string().describe("Collection type"),
|
|
11436
11529
|
/**
|
|
11437
11530
|
* Total items in collection
|
|
11438
11531
|
*/
|
|
11439
|
-
count:
|
|
11532
|
+
count: import_zod64.z.number().int().min(0).describe("Number of items"),
|
|
11440
11533
|
/**
|
|
11441
11534
|
* Formats found in collection
|
|
11442
11535
|
*/
|
|
11443
|
-
formats:
|
|
11536
|
+
formats: import_zod64.z.array(MetadataFormatSchema2).describe("Formats in collection"),
|
|
11444
11537
|
/**
|
|
11445
11538
|
* Total size in bytes
|
|
11446
11539
|
*/
|
|
11447
|
-
totalSize:
|
|
11540
|
+
totalSize: import_zod64.z.number().int().min(0).optional().describe("Total size in bytes"),
|
|
11448
11541
|
/**
|
|
11449
11542
|
* Last modified timestamp
|
|
11450
11543
|
*/
|
|
11451
|
-
lastModified:
|
|
11544
|
+
lastModified: import_zod64.z.date().optional().describe("Last modification date"),
|
|
11452
11545
|
/**
|
|
11453
11546
|
* Collection location (path or URL)
|
|
11454
11547
|
*/
|
|
11455
|
-
location:
|
|
11548
|
+
location: import_zod64.z.string().optional().describe("Collection location")
|
|
11456
11549
|
});
|
|
11457
|
-
var MetadataLoaderContractSchema2 =
|
|
11550
|
+
var MetadataLoaderContractSchema2 = import_zod64.z.object({
|
|
11458
11551
|
/**
|
|
11459
11552
|
* Loader name/identifier
|
|
11460
11553
|
*/
|
|
11461
|
-
name:
|
|
11554
|
+
name: import_zod64.z.string().describe("Loader identifier"),
|
|
11462
11555
|
/**
|
|
11463
11556
|
* Protocol handled by this loader (e.g. 'file', 'http', 's3')
|
|
11464
11557
|
*/
|
|
11465
|
-
protocol:
|
|
11558
|
+
protocol: import_zod64.z.string().describe("Protocol identifier"),
|
|
11466
11559
|
/**
|
|
11467
11560
|
* Detailed capabilities
|
|
11468
11561
|
*/
|
|
11469
|
-
capabilities:
|
|
11470
|
-
read:
|
|
11471
|
-
write:
|
|
11472
|
-
watch:
|
|
11473
|
-
list:
|
|
11562
|
+
capabilities: import_zod64.z.object({
|
|
11563
|
+
read: import_zod64.z.boolean().default(true),
|
|
11564
|
+
write: import_zod64.z.boolean().default(false),
|
|
11565
|
+
watch: import_zod64.z.boolean().default(false),
|
|
11566
|
+
list: import_zod64.z.boolean().default(true)
|
|
11474
11567
|
}).describe("Loader capabilities"),
|
|
11475
11568
|
/**
|
|
11476
11569
|
* Supported formats
|
|
11477
11570
|
*/
|
|
11478
|
-
supportedFormats:
|
|
11571
|
+
supportedFormats: import_zod64.z.array(MetadataFormatSchema2).describe("Supported formats"),
|
|
11479
11572
|
/**
|
|
11480
11573
|
* Whether loader supports watching for changes
|
|
11481
11574
|
*/
|
|
11482
|
-
supportsWatch:
|
|
11575
|
+
supportsWatch: import_zod64.z.boolean().default(false).describe("Supports file watching"),
|
|
11483
11576
|
/**
|
|
11484
11577
|
* Whether loader supports saving
|
|
11485
11578
|
*/
|
|
11486
|
-
supportsWrite:
|
|
11579
|
+
supportsWrite: import_zod64.z.boolean().default(true).describe("Supports write operations"),
|
|
11487
11580
|
/**
|
|
11488
11581
|
* Whether loader supports caching
|
|
11489
11582
|
*/
|
|
11490
|
-
supportsCache:
|
|
11583
|
+
supportsCache: import_zod64.z.boolean().default(true).describe("Supports caching")
|
|
11491
11584
|
});
|
|
11492
|
-
var MetadataManagerConfigSchema2 =
|
|
11585
|
+
var MetadataManagerConfigSchema2 = import_zod64.z.object({
|
|
11493
11586
|
/**
|
|
11494
11587
|
* Root directory for metadata (for filesystem loaders)
|
|
11495
11588
|
*/
|
|
11496
|
-
rootDir:
|
|
11589
|
+
rootDir: import_zod64.z.string().optional().describe("Root directory path"),
|
|
11497
11590
|
/**
|
|
11498
11591
|
* Enabled serialization formats
|
|
11499
11592
|
*/
|
|
11500
|
-
formats:
|
|
11593
|
+
formats: import_zod64.z.array(MetadataFormatSchema2).default(["typescript", "json", "yaml"]).describe("Enabled formats"),
|
|
11501
11594
|
/**
|
|
11502
11595
|
* Cache configuration
|
|
11503
11596
|
*/
|
|
11504
|
-
cache:
|
|
11505
|
-
enabled:
|
|
11506
|
-
ttl:
|
|
11507
|
-
maxSize:
|
|
11597
|
+
cache: import_zod64.z.object({
|
|
11598
|
+
enabled: import_zod64.z.boolean().default(true).describe("Enable caching"),
|
|
11599
|
+
ttl: import_zod64.z.number().int().min(0).default(3600).describe("Cache TTL in seconds"),
|
|
11600
|
+
maxSize: import_zod64.z.number().int().min(0).optional().describe("Max cache size in bytes")
|
|
11508
11601
|
}).optional().describe("Cache settings"),
|
|
11509
11602
|
/**
|
|
11510
11603
|
* Watch for file changes
|
|
11511
11604
|
*/
|
|
11512
|
-
watch:
|
|
11605
|
+
watch: import_zod64.z.boolean().default(false).describe("Enable file watching"),
|
|
11513
11606
|
/**
|
|
11514
11607
|
* Watch options
|
|
11515
11608
|
*/
|
|
11516
|
-
watchOptions:
|
|
11517
|
-
ignored:
|
|
11518
|
-
persistent:
|
|
11519
|
-
ignoreInitial:
|
|
11609
|
+
watchOptions: import_zod64.z.object({
|
|
11610
|
+
ignored: import_zod64.z.array(import_zod64.z.string()).optional().describe("Patterns to ignore"),
|
|
11611
|
+
persistent: import_zod64.z.boolean().default(true).describe("Keep process running"),
|
|
11612
|
+
ignoreInitial: import_zod64.z.boolean().default(true).describe("Ignore initial add events")
|
|
11520
11613
|
}).optional().describe("File watcher options"),
|
|
11521
11614
|
/**
|
|
11522
11615
|
* Validation settings
|
|
11523
11616
|
*/
|
|
11524
|
-
validation:
|
|
11525
|
-
strict:
|
|
11526
|
-
throwOnError:
|
|
11617
|
+
validation: import_zod64.z.object({
|
|
11618
|
+
strict: import_zod64.z.boolean().default(true).describe("Strict validation"),
|
|
11619
|
+
throwOnError: import_zod64.z.boolean().default(true).describe("Throw on validation error")
|
|
11527
11620
|
}).optional().describe("Validation settings"),
|
|
11528
11621
|
/**
|
|
11529
11622
|
* Loader-specific options
|
|
11530
11623
|
*/
|
|
11531
|
-
loaderOptions:
|
|
11624
|
+
loaderOptions: import_zod64.z.record(import_zod64.z.string(), import_zod64.z.any()).optional().describe("Loader-specific configuration")
|
|
11532
11625
|
});
|
|
11533
11626
|
|
|
11534
11627
|
// src/kernel/plugin-lifecycle-advanced.zod.ts
|
|
11535
|
-
var
|
|
11536
|
-
var PluginHealthStatusSchema =
|
|
11628
|
+
var import_zod65 = require("zod");
|
|
11629
|
+
var PluginHealthStatusSchema = import_zod65.z.enum([
|
|
11537
11630
|
"healthy",
|
|
11538
11631
|
// Plugin is operating normally
|
|
11539
11632
|
"degraded",
|
|
@@ -11547,41 +11640,41 @@ var PluginHealthStatusSchema = import_zod64.z.enum([
|
|
|
11547
11640
|
"unknown"
|
|
11548
11641
|
// Health status cannot be determined
|
|
11549
11642
|
]).describe("Current health status of the plugin");
|
|
11550
|
-
var PluginHealthCheckSchema =
|
|
11643
|
+
var PluginHealthCheckSchema = import_zod65.z.object({
|
|
11551
11644
|
/**
|
|
11552
11645
|
* Health check interval in milliseconds
|
|
11553
11646
|
*/
|
|
11554
|
-
interval:
|
|
11647
|
+
interval: import_zod65.z.number().int().min(1e3).default(3e4).describe("How often to perform health checks (default: 30s)"),
|
|
11555
11648
|
/**
|
|
11556
11649
|
* Timeout for health check in milliseconds
|
|
11557
11650
|
*/
|
|
11558
|
-
timeout:
|
|
11651
|
+
timeout: import_zod65.z.number().int().min(100).default(5e3).describe("Maximum time to wait for health check response"),
|
|
11559
11652
|
/**
|
|
11560
11653
|
* Number of consecutive failures before marking as unhealthy
|
|
11561
11654
|
*/
|
|
11562
|
-
failureThreshold:
|
|
11655
|
+
failureThreshold: import_zod65.z.number().int().min(1).default(3).describe("Consecutive failures needed to mark unhealthy"),
|
|
11563
11656
|
/**
|
|
11564
11657
|
* Number of consecutive successes to recover from unhealthy state
|
|
11565
11658
|
*/
|
|
11566
|
-
successThreshold:
|
|
11659
|
+
successThreshold: import_zod65.z.number().int().min(1).default(1).describe("Consecutive successes needed to mark healthy"),
|
|
11567
11660
|
/**
|
|
11568
11661
|
* Custom health check function name or endpoint
|
|
11569
11662
|
*/
|
|
11570
|
-
checkMethod:
|
|
11663
|
+
checkMethod: import_zod65.z.string().optional().describe("Method name to call for health check"),
|
|
11571
11664
|
/**
|
|
11572
11665
|
* Enable automatic restart on failure
|
|
11573
11666
|
*/
|
|
11574
|
-
autoRestart:
|
|
11667
|
+
autoRestart: import_zod65.z.boolean().default(false).describe("Automatically restart plugin on health check failure"),
|
|
11575
11668
|
/**
|
|
11576
11669
|
* Maximum number of restart attempts
|
|
11577
11670
|
*/
|
|
11578
|
-
maxRestartAttempts:
|
|
11671
|
+
maxRestartAttempts: import_zod65.z.number().int().min(0).default(3).describe("Maximum restart attempts before giving up"),
|
|
11579
11672
|
/**
|
|
11580
11673
|
* Backoff strategy for restarts
|
|
11581
11674
|
*/
|
|
11582
|
-
restartBackoff:
|
|
11675
|
+
restartBackoff: import_zod65.z.enum(["fixed", "linear", "exponential"]).default("exponential").describe("Backoff strategy for restart delays")
|
|
11583
11676
|
});
|
|
11584
|
-
var PluginHealthReportSchema =
|
|
11677
|
+
var PluginHealthReportSchema = import_zod65.z.object({
|
|
11585
11678
|
/**
|
|
11586
11679
|
* Overall health status
|
|
11587
11680
|
*/
|
|
@@ -11589,99 +11682,99 @@ var PluginHealthReportSchema = import_zod64.z.object({
|
|
|
11589
11682
|
/**
|
|
11590
11683
|
* Timestamp of the health check
|
|
11591
11684
|
*/
|
|
11592
|
-
timestamp:
|
|
11685
|
+
timestamp: import_zod65.z.string().datetime(),
|
|
11593
11686
|
/**
|
|
11594
11687
|
* Human-readable message about health status
|
|
11595
11688
|
*/
|
|
11596
|
-
message:
|
|
11689
|
+
message: import_zod65.z.string().optional(),
|
|
11597
11690
|
/**
|
|
11598
11691
|
* Detailed metrics
|
|
11599
11692
|
*/
|
|
11600
|
-
metrics:
|
|
11601
|
-
uptime:
|
|
11602
|
-
memoryUsage:
|
|
11603
|
-
cpuUsage:
|
|
11604
|
-
activeConnections:
|
|
11605
|
-
errorRate:
|
|
11606
|
-
responseTime:
|
|
11693
|
+
metrics: import_zod65.z.object({
|
|
11694
|
+
uptime: import_zod65.z.number().describe("Plugin uptime in milliseconds"),
|
|
11695
|
+
memoryUsage: import_zod65.z.number().optional().describe("Memory usage in bytes"),
|
|
11696
|
+
cpuUsage: import_zod65.z.number().optional().describe("CPU usage percentage"),
|
|
11697
|
+
activeConnections: import_zod65.z.number().optional().describe("Number of active connections"),
|
|
11698
|
+
errorRate: import_zod65.z.number().optional().describe("Error rate (errors per minute)"),
|
|
11699
|
+
responseTime: import_zod65.z.number().optional().describe("Average response time in ms")
|
|
11607
11700
|
}).partial().optional(),
|
|
11608
11701
|
/**
|
|
11609
11702
|
* List of checks performed
|
|
11610
11703
|
*/
|
|
11611
|
-
checks:
|
|
11612
|
-
name:
|
|
11613
|
-
status:
|
|
11614
|
-
message:
|
|
11615
|
-
data:
|
|
11704
|
+
checks: import_zod65.z.array(import_zod65.z.object({
|
|
11705
|
+
name: import_zod65.z.string().describe("Check name"),
|
|
11706
|
+
status: import_zod65.z.enum(["passed", "failed", "warning"]),
|
|
11707
|
+
message: import_zod65.z.string().optional(),
|
|
11708
|
+
data: import_zod65.z.record(import_zod65.z.string(), import_zod65.z.any()).optional()
|
|
11616
11709
|
})).optional(),
|
|
11617
11710
|
/**
|
|
11618
11711
|
* Dependencies health
|
|
11619
11712
|
*/
|
|
11620
|
-
dependencies:
|
|
11621
|
-
pluginId:
|
|
11713
|
+
dependencies: import_zod65.z.array(import_zod65.z.object({
|
|
11714
|
+
pluginId: import_zod65.z.string(),
|
|
11622
11715
|
status: PluginHealthStatusSchema,
|
|
11623
|
-
message:
|
|
11716
|
+
message: import_zod65.z.string().optional()
|
|
11624
11717
|
})).optional()
|
|
11625
11718
|
});
|
|
11626
|
-
var DistributedStateConfigSchema =
|
|
11719
|
+
var DistributedStateConfigSchema = import_zod65.z.object({
|
|
11627
11720
|
/**
|
|
11628
11721
|
* Distributed cache provider
|
|
11629
11722
|
*/
|
|
11630
|
-
provider:
|
|
11723
|
+
provider: import_zod65.z.enum(["redis", "etcd", "custom"]).describe("Distributed state backend provider"),
|
|
11631
11724
|
/**
|
|
11632
11725
|
* Connection URL or endpoints
|
|
11633
11726
|
*/
|
|
11634
|
-
endpoints:
|
|
11727
|
+
endpoints: import_zod65.z.array(import_zod65.z.string()).optional().describe("Backend connection endpoints"),
|
|
11635
11728
|
/**
|
|
11636
11729
|
* Key prefix for namespacing
|
|
11637
11730
|
*/
|
|
11638
|
-
keyPrefix:
|
|
11731
|
+
keyPrefix: import_zod65.z.string().optional().describe('Prefix for all keys (e.g., "plugin:my-plugin:")'),
|
|
11639
11732
|
/**
|
|
11640
11733
|
* Time to live in seconds
|
|
11641
11734
|
*/
|
|
11642
|
-
ttl:
|
|
11735
|
+
ttl: import_zod65.z.number().int().min(0).optional().describe("State expiration time in seconds"),
|
|
11643
11736
|
/**
|
|
11644
11737
|
* Authentication configuration
|
|
11645
11738
|
*/
|
|
11646
|
-
auth:
|
|
11647
|
-
username:
|
|
11648
|
-
password:
|
|
11649
|
-
token:
|
|
11650
|
-
certificate:
|
|
11739
|
+
auth: import_zod65.z.object({
|
|
11740
|
+
username: import_zod65.z.string().optional(),
|
|
11741
|
+
password: import_zod65.z.string().optional(),
|
|
11742
|
+
token: import_zod65.z.string().optional(),
|
|
11743
|
+
certificate: import_zod65.z.string().optional()
|
|
11651
11744
|
}).optional(),
|
|
11652
11745
|
/**
|
|
11653
11746
|
* Replication settings
|
|
11654
11747
|
*/
|
|
11655
|
-
replication:
|
|
11656
|
-
enabled:
|
|
11657
|
-
minReplicas:
|
|
11748
|
+
replication: import_zod65.z.object({
|
|
11749
|
+
enabled: import_zod65.z.boolean().default(true),
|
|
11750
|
+
minReplicas: import_zod65.z.number().int().min(1).default(1)
|
|
11658
11751
|
}).optional(),
|
|
11659
11752
|
/**
|
|
11660
11753
|
* Custom provider configuration
|
|
11661
11754
|
*/
|
|
11662
|
-
customConfig:
|
|
11755
|
+
customConfig: import_zod65.z.record(import_zod65.z.string(), import_zod65.z.any()).optional().describe("Provider-specific configuration")
|
|
11663
11756
|
});
|
|
11664
|
-
var HotReloadConfigSchema =
|
|
11757
|
+
var HotReloadConfigSchema = import_zod65.z.object({
|
|
11665
11758
|
/**
|
|
11666
11759
|
* Enable hot reload capability
|
|
11667
11760
|
*/
|
|
11668
|
-
enabled:
|
|
11761
|
+
enabled: import_zod65.z.boolean().default(false),
|
|
11669
11762
|
/**
|
|
11670
11763
|
* Watch file patterns for auto-reload
|
|
11671
11764
|
*/
|
|
11672
|
-
watchPatterns:
|
|
11765
|
+
watchPatterns: import_zod65.z.array(import_zod65.z.string()).optional().describe("Glob patterns to watch for changes"),
|
|
11673
11766
|
/**
|
|
11674
11767
|
* Debounce delay before reloading (milliseconds)
|
|
11675
11768
|
*/
|
|
11676
|
-
debounceDelay:
|
|
11769
|
+
debounceDelay: import_zod65.z.number().int().min(0).default(1e3).describe("Wait time after change detection before reload"),
|
|
11677
11770
|
/**
|
|
11678
11771
|
* Preserve plugin state during reload
|
|
11679
11772
|
*/
|
|
11680
|
-
preserveState:
|
|
11773
|
+
preserveState: import_zod65.z.boolean().default(true).describe("Keep plugin state across reloads"),
|
|
11681
11774
|
/**
|
|
11682
11775
|
* State serialization strategy
|
|
11683
11776
|
*/
|
|
11684
|
-
stateStrategy:
|
|
11777
|
+
stateStrategy: import_zod65.z.enum(["memory", "disk", "distributed", "none"]).default("memory").describe("How to preserve state during reload"),
|
|
11685
11778
|
/**
|
|
11686
11779
|
* Distributed state configuration (required when stateStrategy is "distributed")
|
|
11687
11780
|
*/
|
|
@@ -11689,25 +11782,25 @@ var HotReloadConfigSchema = import_zod64.z.object({
|
|
|
11689
11782
|
/**
|
|
11690
11783
|
* Graceful shutdown timeout
|
|
11691
11784
|
*/
|
|
11692
|
-
shutdownTimeout:
|
|
11785
|
+
shutdownTimeout: import_zod65.z.number().int().min(0).default(3e4).describe("Maximum time to wait for graceful shutdown"),
|
|
11693
11786
|
/**
|
|
11694
11787
|
* Pre-reload hooks
|
|
11695
11788
|
*/
|
|
11696
|
-
beforeReload:
|
|
11789
|
+
beforeReload: import_zod65.z.array(import_zod65.z.string()).optional().describe("Hook names to call before reload"),
|
|
11697
11790
|
/**
|
|
11698
11791
|
* Post-reload hooks
|
|
11699
11792
|
*/
|
|
11700
|
-
afterReload:
|
|
11793
|
+
afterReload: import_zod65.z.array(import_zod65.z.string()).optional().describe("Hook names to call after reload")
|
|
11701
11794
|
});
|
|
11702
|
-
var GracefulDegradationSchema =
|
|
11795
|
+
var GracefulDegradationSchema = import_zod65.z.object({
|
|
11703
11796
|
/**
|
|
11704
11797
|
* Enable graceful degradation
|
|
11705
11798
|
*/
|
|
11706
|
-
enabled:
|
|
11799
|
+
enabled: import_zod65.z.boolean().default(true),
|
|
11707
11800
|
/**
|
|
11708
11801
|
* Fallback mode when dependencies fail
|
|
11709
11802
|
*/
|
|
11710
|
-
fallbackMode:
|
|
11803
|
+
fallbackMode: import_zod65.z.enum([
|
|
11711
11804
|
"minimal",
|
|
11712
11805
|
// Provide minimal functionality
|
|
11713
11806
|
"cached",
|
|
@@ -11722,33 +11815,33 @@ var GracefulDegradationSchema = import_zod64.z.object({
|
|
|
11722
11815
|
/**
|
|
11723
11816
|
* Critical dependencies that must be available
|
|
11724
11817
|
*/
|
|
11725
|
-
criticalDependencies:
|
|
11818
|
+
criticalDependencies: import_zod65.z.array(import_zod65.z.string()).optional().describe("Plugin IDs that are required for operation"),
|
|
11726
11819
|
/**
|
|
11727
11820
|
* Optional dependencies that can fail
|
|
11728
11821
|
*/
|
|
11729
|
-
optionalDependencies:
|
|
11822
|
+
optionalDependencies: import_zod65.z.array(import_zod65.z.string()).optional().describe("Plugin IDs that are nice to have but not required"),
|
|
11730
11823
|
/**
|
|
11731
11824
|
* Feature flags for degraded mode
|
|
11732
11825
|
*/
|
|
11733
|
-
degradedFeatures:
|
|
11734
|
-
feature:
|
|
11735
|
-
enabled:
|
|
11736
|
-
reason:
|
|
11826
|
+
degradedFeatures: import_zod65.z.array(import_zod65.z.object({
|
|
11827
|
+
feature: import_zod65.z.string().describe("Feature name"),
|
|
11828
|
+
enabled: import_zod65.z.boolean().describe("Whether feature is available in degraded mode"),
|
|
11829
|
+
reason: import_zod65.z.string().optional()
|
|
11737
11830
|
})).optional(),
|
|
11738
11831
|
/**
|
|
11739
11832
|
* Automatic recovery attempts
|
|
11740
11833
|
*/
|
|
11741
|
-
autoRecovery:
|
|
11742
|
-
enabled:
|
|
11743
|
-
retryInterval:
|
|
11744
|
-
maxAttempts:
|
|
11834
|
+
autoRecovery: import_zod65.z.object({
|
|
11835
|
+
enabled: import_zod65.z.boolean().default(true),
|
|
11836
|
+
retryInterval: import_zod65.z.number().int().min(1e3).default(6e4).describe("Interval between recovery attempts (ms)"),
|
|
11837
|
+
maxAttempts: import_zod65.z.number().int().min(0).default(5).describe("Maximum recovery attempts before giving up")
|
|
11745
11838
|
}).optional()
|
|
11746
11839
|
});
|
|
11747
|
-
var PluginUpdateStrategySchema =
|
|
11840
|
+
var PluginUpdateStrategySchema = import_zod65.z.object({
|
|
11748
11841
|
/**
|
|
11749
11842
|
* Update mode
|
|
11750
11843
|
*/
|
|
11751
|
-
mode:
|
|
11844
|
+
mode: import_zod65.z.enum([
|
|
11752
11845
|
"manual",
|
|
11753
11846
|
// Manual updates only
|
|
11754
11847
|
"automatic",
|
|
@@ -11761,91 +11854,91 @@ var PluginUpdateStrategySchema = import_zod64.z.object({
|
|
|
11761
11854
|
/**
|
|
11762
11855
|
* Version constraints for automatic updates
|
|
11763
11856
|
*/
|
|
11764
|
-
autoUpdateConstraints:
|
|
11765
|
-
major:
|
|
11766
|
-
minor:
|
|
11767
|
-
patch:
|
|
11857
|
+
autoUpdateConstraints: import_zod65.z.object({
|
|
11858
|
+
major: import_zod65.z.boolean().default(false).describe("Allow major version updates"),
|
|
11859
|
+
minor: import_zod65.z.boolean().default(true).describe("Allow minor version updates"),
|
|
11860
|
+
patch: import_zod65.z.boolean().default(true).describe("Allow patch version updates")
|
|
11768
11861
|
}).optional(),
|
|
11769
11862
|
/**
|
|
11770
11863
|
* Update schedule (for scheduled mode)
|
|
11771
11864
|
*/
|
|
11772
|
-
schedule:
|
|
11865
|
+
schedule: import_zod65.z.object({
|
|
11773
11866
|
/**
|
|
11774
11867
|
* Cron expression for update window
|
|
11775
11868
|
*/
|
|
11776
|
-
cron:
|
|
11869
|
+
cron: import_zod65.z.string().optional(),
|
|
11777
11870
|
/**
|
|
11778
11871
|
* Timezone for schedule
|
|
11779
11872
|
*/
|
|
11780
|
-
timezone:
|
|
11873
|
+
timezone: import_zod65.z.string().default("UTC"),
|
|
11781
11874
|
/**
|
|
11782
11875
|
* Maintenance window duration in minutes
|
|
11783
11876
|
*/
|
|
11784
|
-
maintenanceWindow:
|
|
11877
|
+
maintenanceWindow: import_zod65.z.number().int().min(1).default(60)
|
|
11785
11878
|
}).optional(),
|
|
11786
11879
|
/**
|
|
11787
11880
|
* Rollback configuration
|
|
11788
11881
|
*/
|
|
11789
|
-
rollback:
|
|
11790
|
-
enabled:
|
|
11882
|
+
rollback: import_zod65.z.object({
|
|
11883
|
+
enabled: import_zod65.z.boolean().default(true),
|
|
11791
11884
|
/**
|
|
11792
11885
|
* Automatic rollback on failure
|
|
11793
11886
|
*/
|
|
11794
|
-
automatic:
|
|
11887
|
+
automatic: import_zod65.z.boolean().default(true),
|
|
11795
11888
|
/**
|
|
11796
11889
|
* Keep N previous versions for rollback
|
|
11797
11890
|
*/
|
|
11798
|
-
keepVersions:
|
|
11891
|
+
keepVersions: import_zod65.z.number().int().min(1).default(3),
|
|
11799
11892
|
/**
|
|
11800
11893
|
* Rollback timeout in milliseconds
|
|
11801
11894
|
*/
|
|
11802
|
-
timeout:
|
|
11895
|
+
timeout: import_zod65.z.number().int().min(1e3).default(3e4)
|
|
11803
11896
|
}).optional(),
|
|
11804
11897
|
/**
|
|
11805
11898
|
* Pre-update validation
|
|
11806
11899
|
*/
|
|
11807
|
-
validation:
|
|
11900
|
+
validation: import_zod65.z.object({
|
|
11808
11901
|
/**
|
|
11809
11902
|
* Run compatibility checks before update
|
|
11810
11903
|
*/
|
|
11811
|
-
checkCompatibility:
|
|
11904
|
+
checkCompatibility: import_zod65.z.boolean().default(true),
|
|
11812
11905
|
/**
|
|
11813
11906
|
* Run tests before applying update
|
|
11814
11907
|
*/
|
|
11815
|
-
runTests:
|
|
11908
|
+
runTests: import_zod65.z.boolean().default(false),
|
|
11816
11909
|
/**
|
|
11817
11910
|
* Test suite to run
|
|
11818
11911
|
*/
|
|
11819
|
-
testSuite:
|
|
11912
|
+
testSuite: import_zod65.z.string().optional()
|
|
11820
11913
|
}).optional()
|
|
11821
11914
|
});
|
|
11822
|
-
var PluginStateSnapshotSchema =
|
|
11915
|
+
var PluginStateSnapshotSchema = import_zod65.z.object({
|
|
11823
11916
|
/**
|
|
11824
11917
|
* Plugin identifier
|
|
11825
11918
|
*/
|
|
11826
|
-
pluginId:
|
|
11919
|
+
pluginId: import_zod65.z.string(),
|
|
11827
11920
|
/**
|
|
11828
11921
|
* Version at time of snapshot
|
|
11829
11922
|
*/
|
|
11830
|
-
version:
|
|
11923
|
+
version: import_zod65.z.string(),
|
|
11831
11924
|
/**
|
|
11832
11925
|
* Snapshot timestamp
|
|
11833
11926
|
*/
|
|
11834
|
-
timestamp:
|
|
11927
|
+
timestamp: import_zod65.z.string().datetime(),
|
|
11835
11928
|
/**
|
|
11836
11929
|
* Serialized state data
|
|
11837
11930
|
*/
|
|
11838
|
-
state:
|
|
11931
|
+
state: import_zod65.z.record(import_zod65.z.string(), import_zod65.z.any()),
|
|
11839
11932
|
/**
|
|
11840
11933
|
* State metadata
|
|
11841
11934
|
*/
|
|
11842
|
-
metadata:
|
|
11843
|
-
checksum:
|
|
11844
|
-
compressed:
|
|
11845
|
-
encryption:
|
|
11935
|
+
metadata: import_zod65.z.object({
|
|
11936
|
+
checksum: import_zod65.z.string().optional().describe("State checksum for verification"),
|
|
11937
|
+
compressed: import_zod65.z.boolean().default(false),
|
|
11938
|
+
encryption: import_zod65.z.string().optional().describe("Encryption algorithm if encrypted")
|
|
11846
11939
|
}).optional()
|
|
11847
11940
|
});
|
|
11848
|
-
var AdvancedPluginLifecycleConfigSchema =
|
|
11941
|
+
var AdvancedPluginLifecycleConfigSchema = import_zod65.z.object({
|
|
11849
11942
|
/**
|
|
11850
11943
|
* Health monitoring configuration
|
|
11851
11944
|
*/
|
|
@@ -11865,47 +11958,47 @@ var AdvancedPluginLifecycleConfigSchema = import_zod64.z.object({
|
|
|
11865
11958
|
/**
|
|
11866
11959
|
* Resource limits
|
|
11867
11960
|
*/
|
|
11868
|
-
resources:
|
|
11869
|
-
maxMemory:
|
|
11870
|
-
maxCpu:
|
|
11871
|
-
maxConnections:
|
|
11872
|
-
timeout:
|
|
11961
|
+
resources: import_zod65.z.object({
|
|
11962
|
+
maxMemory: import_zod65.z.number().int().optional().describe("Maximum memory in bytes"),
|
|
11963
|
+
maxCpu: import_zod65.z.number().min(0).max(100).optional().describe("Maximum CPU percentage"),
|
|
11964
|
+
maxConnections: import_zod65.z.number().int().optional().describe("Maximum concurrent connections"),
|
|
11965
|
+
timeout: import_zod65.z.number().int().optional().describe("Operation timeout in milliseconds")
|
|
11873
11966
|
}).optional(),
|
|
11874
11967
|
/**
|
|
11875
11968
|
* Monitoring and observability
|
|
11876
11969
|
*/
|
|
11877
|
-
observability:
|
|
11878
|
-
enableMetrics:
|
|
11879
|
-
enableTracing:
|
|
11880
|
-
enableProfiling:
|
|
11881
|
-
metricsInterval:
|
|
11970
|
+
observability: import_zod65.z.object({
|
|
11971
|
+
enableMetrics: import_zod65.z.boolean().default(true),
|
|
11972
|
+
enableTracing: import_zod65.z.boolean().default(true),
|
|
11973
|
+
enableProfiling: import_zod65.z.boolean().default(false),
|
|
11974
|
+
metricsInterval: import_zod65.z.number().int().min(1e3).default(6e4).describe("Metrics collection interval in ms")
|
|
11882
11975
|
}).optional()
|
|
11883
11976
|
});
|
|
11884
11977
|
|
|
11885
11978
|
// src/kernel/plugin-lifecycle-events.zod.ts
|
|
11886
|
-
var
|
|
11887
|
-
var EventPhaseSchema =
|
|
11888
|
-
var PluginEventBaseSchema =
|
|
11979
|
+
var import_zod66 = require("zod");
|
|
11980
|
+
var EventPhaseSchema = import_zod66.z.enum(["init", "start", "destroy"]).describe("Plugin lifecycle phase");
|
|
11981
|
+
var PluginEventBaseSchema = import_zod66.z.object({
|
|
11889
11982
|
/**
|
|
11890
11983
|
* Plugin name
|
|
11891
11984
|
*/
|
|
11892
|
-
pluginName:
|
|
11985
|
+
pluginName: import_zod66.z.string().describe("Name of the plugin"),
|
|
11893
11986
|
/**
|
|
11894
11987
|
* Event timestamp (Unix milliseconds)
|
|
11895
11988
|
*/
|
|
11896
|
-
timestamp:
|
|
11989
|
+
timestamp: import_zod66.z.number().int().describe("Unix timestamp in milliseconds when event occurred")
|
|
11897
11990
|
});
|
|
11898
11991
|
var PluginRegisteredEventSchema = PluginEventBaseSchema.extend({
|
|
11899
11992
|
/**
|
|
11900
11993
|
* Plugin version (optional)
|
|
11901
11994
|
*/
|
|
11902
|
-
version:
|
|
11995
|
+
version: import_zod66.z.string().optional().describe("Plugin version")
|
|
11903
11996
|
});
|
|
11904
11997
|
var PluginLifecyclePhaseEventSchema = PluginEventBaseSchema.extend({
|
|
11905
11998
|
/**
|
|
11906
11999
|
* Duration of the phase (milliseconds)
|
|
11907
12000
|
*/
|
|
11908
|
-
duration:
|
|
12001
|
+
duration: import_zod66.z.number().min(0).optional().describe("Duration of the lifecycle phase in milliseconds"),
|
|
11909
12002
|
/**
|
|
11910
12003
|
* Lifecycle phase
|
|
11911
12004
|
*/
|
|
@@ -11915,7 +12008,7 @@ var PluginErrorEventSchema = PluginEventBaseSchema.extend({
|
|
|
11915
12008
|
/**
|
|
11916
12009
|
* Error object
|
|
11917
12010
|
*/
|
|
11918
|
-
error:
|
|
12011
|
+
error: import_zod66.z.instanceof(Error).describe("Error object"),
|
|
11919
12012
|
/**
|
|
11920
12013
|
* Lifecycle phase where error occurred
|
|
11921
12014
|
*/
|
|
@@ -11923,91 +12016,91 @@ var PluginErrorEventSchema = PluginEventBaseSchema.extend({
|
|
|
11923
12016
|
/**
|
|
11924
12017
|
* Error message (for serialization)
|
|
11925
12018
|
*/
|
|
11926
|
-
errorMessage:
|
|
12019
|
+
errorMessage: import_zod66.z.string().optional().describe("Error message"),
|
|
11927
12020
|
/**
|
|
11928
12021
|
* Error stack trace (for debugging)
|
|
11929
12022
|
*/
|
|
11930
|
-
errorStack:
|
|
12023
|
+
errorStack: import_zod66.z.string().optional().describe("Error stack trace")
|
|
11931
12024
|
});
|
|
11932
|
-
var ServiceRegisteredEventSchema =
|
|
12025
|
+
var ServiceRegisteredEventSchema = import_zod66.z.object({
|
|
11933
12026
|
/**
|
|
11934
12027
|
* Service name
|
|
11935
12028
|
*/
|
|
11936
|
-
serviceName:
|
|
12029
|
+
serviceName: import_zod66.z.string().describe("Name of the registered service"),
|
|
11937
12030
|
/**
|
|
11938
12031
|
* Event timestamp (Unix milliseconds)
|
|
11939
12032
|
*/
|
|
11940
|
-
timestamp:
|
|
12033
|
+
timestamp: import_zod66.z.number().int().describe("Unix timestamp in milliseconds"),
|
|
11941
12034
|
/**
|
|
11942
12035
|
* Service type (optional)
|
|
11943
12036
|
*/
|
|
11944
|
-
serviceType:
|
|
12037
|
+
serviceType: import_zod66.z.string().optional().describe("Type or interface name of the service")
|
|
11945
12038
|
});
|
|
11946
|
-
var ServiceUnregisteredEventSchema =
|
|
12039
|
+
var ServiceUnregisteredEventSchema = import_zod66.z.object({
|
|
11947
12040
|
/**
|
|
11948
12041
|
* Service name
|
|
11949
12042
|
*/
|
|
11950
|
-
serviceName:
|
|
12043
|
+
serviceName: import_zod66.z.string().describe("Name of the unregistered service"),
|
|
11951
12044
|
/**
|
|
11952
12045
|
* Event timestamp (Unix milliseconds)
|
|
11953
12046
|
*/
|
|
11954
|
-
timestamp:
|
|
12047
|
+
timestamp: import_zod66.z.number().int().describe("Unix timestamp in milliseconds")
|
|
11955
12048
|
});
|
|
11956
|
-
var HookRegisteredEventSchema =
|
|
12049
|
+
var HookRegisteredEventSchema = import_zod66.z.object({
|
|
11957
12050
|
/**
|
|
11958
12051
|
* Hook name
|
|
11959
12052
|
*/
|
|
11960
|
-
hookName:
|
|
12053
|
+
hookName: import_zod66.z.string().describe("Name of the hook"),
|
|
11961
12054
|
/**
|
|
11962
12055
|
* Event timestamp (Unix milliseconds)
|
|
11963
12056
|
*/
|
|
11964
|
-
timestamp:
|
|
12057
|
+
timestamp: import_zod66.z.number().int().describe("Unix timestamp in milliseconds"),
|
|
11965
12058
|
/**
|
|
11966
12059
|
* Number of handlers registered for this hook
|
|
11967
12060
|
*/
|
|
11968
|
-
handlerCount:
|
|
12061
|
+
handlerCount: import_zod66.z.number().int().min(0).describe("Number of handlers registered for this hook")
|
|
11969
12062
|
});
|
|
11970
|
-
var HookTriggeredEventSchema =
|
|
12063
|
+
var HookTriggeredEventSchema = import_zod66.z.object({
|
|
11971
12064
|
/**
|
|
11972
12065
|
* Hook name
|
|
11973
12066
|
*/
|
|
11974
|
-
hookName:
|
|
12067
|
+
hookName: import_zod66.z.string().describe("Name of the hook"),
|
|
11975
12068
|
/**
|
|
11976
12069
|
* Event timestamp (Unix milliseconds)
|
|
11977
12070
|
*/
|
|
11978
|
-
timestamp:
|
|
12071
|
+
timestamp: import_zod66.z.number().int().describe("Unix timestamp in milliseconds"),
|
|
11979
12072
|
/**
|
|
11980
12073
|
* Arguments passed to the hook
|
|
11981
12074
|
*/
|
|
11982
|
-
args:
|
|
12075
|
+
args: import_zod66.z.array(import_zod66.z.any()).describe("Arguments passed to the hook handlers"),
|
|
11983
12076
|
/**
|
|
11984
12077
|
* Number of handlers that will handle this event
|
|
11985
12078
|
*/
|
|
11986
|
-
handlerCount:
|
|
12079
|
+
handlerCount: import_zod66.z.number().int().min(0).optional().describe("Number of handlers that will handle this event")
|
|
11987
12080
|
});
|
|
11988
|
-
var KernelEventBaseSchema =
|
|
12081
|
+
var KernelEventBaseSchema = import_zod66.z.object({
|
|
11989
12082
|
/**
|
|
11990
12083
|
* Event timestamp (Unix milliseconds)
|
|
11991
12084
|
*/
|
|
11992
|
-
timestamp:
|
|
12085
|
+
timestamp: import_zod66.z.number().int().describe("Unix timestamp in milliseconds")
|
|
11993
12086
|
});
|
|
11994
12087
|
var KernelReadyEventSchema = KernelEventBaseSchema.extend({
|
|
11995
12088
|
/**
|
|
11996
12089
|
* Total initialization duration (milliseconds)
|
|
11997
12090
|
*/
|
|
11998
|
-
duration:
|
|
12091
|
+
duration: import_zod66.z.number().min(0).optional().describe("Total initialization duration in milliseconds"),
|
|
11999
12092
|
/**
|
|
12000
12093
|
* Number of plugins initialized
|
|
12001
12094
|
*/
|
|
12002
|
-
pluginCount:
|
|
12095
|
+
pluginCount: import_zod66.z.number().int().min(0).optional().describe("Number of plugins initialized")
|
|
12003
12096
|
});
|
|
12004
12097
|
var KernelShutdownEventSchema = KernelEventBaseSchema.extend({
|
|
12005
12098
|
/**
|
|
12006
12099
|
* Shutdown reason (optional)
|
|
12007
12100
|
*/
|
|
12008
|
-
reason:
|
|
12101
|
+
reason: import_zod66.z.string().optional().describe("Reason for kernel shutdown")
|
|
12009
12102
|
});
|
|
12010
|
-
var PluginLifecycleEventType =
|
|
12103
|
+
var PluginLifecycleEventType = import_zod66.z.enum([
|
|
12011
12104
|
"kernel:ready",
|
|
12012
12105
|
"kernel:shutdown",
|
|
12013
12106
|
"kernel:before-init",
|
|
@@ -12030,8 +12123,8 @@ var PluginLifecycleEventType = import_zod65.z.enum([
|
|
|
12030
12123
|
]).describe("Plugin lifecycle event type");
|
|
12031
12124
|
|
|
12032
12125
|
// src/kernel/plugin-security-advanced.zod.ts
|
|
12033
|
-
var
|
|
12034
|
-
var PermissionScopeSchema =
|
|
12126
|
+
var import_zod67 = require("zod");
|
|
12127
|
+
var PermissionScopeSchema = import_zod67.z.enum([
|
|
12035
12128
|
"global",
|
|
12036
12129
|
// Applies to entire system
|
|
12037
12130
|
"tenant",
|
|
@@ -12043,7 +12136,7 @@ var PermissionScopeSchema = import_zod66.z.enum([
|
|
|
12043
12136
|
"plugin"
|
|
12044
12137
|
// Applies within plugin boundaries
|
|
12045
12138
|
]).describe("Scope of permission application");
|
|
12046
|
-
var PermissionActionSchema =
|
|
12139
|
+
var PermissionActionSchema = import_zod67.z.enum([
|
|
12047
12140
|
"create",
|
|
12048
12141
|
// Create new resources
|
|
12049
12142
|
"read",
|
|
@@ -12067,7 +12160,7 @@ var PermissionActionSchema = import_zod66.z.enum([
|
|
|
12067
12160
|
"admin"
|
|
12068
12161
|
// Administrative access
|
|
12069
12162
|
]).describe("Type of action being permitted");
|
|
12070
|
-
var ResourceTypeSchema =
|
|
12163
|
+
var ResourceTypeSchema = import_zod67.z.enum([
|
|
12071
12164
|
"data.object",
|
|
12072
12165
|
// ObjectQL objects
|
|
12073
12166
|
"data.record",
|
|
@@ -12101,11 +12194,11 @@ var ResourceTypeSchema = import_zod66.z.enum([
|
|
|
12101
12194
|
"process.env"
|
|
12102
12195
|
// Environment variables
|
|
12103
12196
|
]).describe("Type of resource being accessed");
|
|
12104
|
-
var PermissionSchema =
|
|
12197
|
+
var PermissionSchema = import_zod67.z.object({
|
|
12105
12198
|
/**
|
|
12106
12199
|
* Permission identifier
|
|
12107
12200
|
*/
|
|
12108
|
-
id:
|
|
12201
|
+
id: import_zod67.z.string().describe("Unique permission identifier"),
|
|
12109
12202
|
/**
|
|
12110
12203
|
* Resource type
|
|
12111
12204
|
*/
|
|
@@ -12113,7 +12206,7 @@ var PermissionSchema = import_zod66.z.object({
|
|
|
12113
12206
|
/**
|
|
12114
12207
|
* Allowed actions
|
|
12115
12208
|
*/
|
|
12116
|
-
actions:
|
|
12209
|
+
actions: import_zod67.z.array(PermissionActionSchema),
|
|
12117
12210
|
/**
|
|
12118
12211
|
* Permission scope
|
|
12119
12212
|
*/
|
|
@@ -12121,50 +12214,50 @@ var PermissionSchema = import_zod66.z.object({
|
|
|
12121
12214
|
/**
|
|
12122
12215
|
* Resource filter
|
|
12123
12216
|
*/
|
|
12124
|
-
filter:
|
|
12217
|
+
filter: import_zod67.z.object({
|
|
12125
12218
|
/**
|
|
12126
12219
|
* Specific resource IDs
|
|
12127
12220
|
*/
|
|
12128
|
-
resourceIds:
|
|
12221
|
+
resourceIds: import_zod67.z.array(import_zod67.z.string()).optional(),
|
|
12129
12222
|
/**
|
|
12130
12223
|
* Filter condition
|
|
12131
12224
|
*/
|
|
12132
|
-
condition:
|
|
12225
|
+
condition: import_zod67.z.string().optional().describe("Filter expression (e.g., owner = currentUser)"),
|
|
12133
12226
|
/**
|
|
12134
12227
|
* Field-level access
|
|
12135
12228
|
*/
|
|
12136
|
-
fields:
|
|
12229
|
+
fields: import_zod67.z.array(import_zod67.z.string()).optional().describe("Allowed fields for data resources")
|
|
12137
12230
|
}).optional(),
|
|
12138
12231
|
/**
|
|
12139
12232
|
* Human-readable description
|
|
12140
12233
|
*/
|
|
12141
|
-
description:
|
|
12234
|
+
description: import_zod67.z.string(),
|
|
12142
12235
|
/**
|
|
12143
12236
|
* Whether this permission is required or optional
|
|
12144
12237
|
*/
|
|
12145
|
-
required:
|
|
12238
|
+
required: import_zod67.z.boolean().default(true),
|
|
12146
12239
|
/**
|
|
12147
12240
|
* Justification for permission
|
|
12148
12241
|
*/
|
|
12149
|
-
justification:
|
|
12242
|
+
justification: import_zod67.z.string().optional().describe("Why this permission is needed")
|
|
12150
12243
|
});
|
|
12151
|
-
var PermissionSetSchema2 =
|
|
12244
|
+
var PermissionSetSchema2 = import_zod67.z.object({
|
|
12152
12245
|
/**
|
|
12153
12246
|
* All permissions required by plugin
|
|
12154
12247
|
*/
|
|
12155
|
-
permissions:
|
|
12248
|
+
permissions: import_zod67.z.array(PermissionSchema),
|
|
12156
12249
|
/**
|
|
12157
12250
|
* Permission groups for easier management
|
|
12158
12251
|
*/
|
|
12159
|
-
groups:
|
|
12160
|
-
name:
|
|
12161
|
-
description:
|
|
12162
|
-
permissions:
|
|
12252
|
+
groups: import_zod67.z.array(import_zod67.z.object({
|
|
12253
|
+
name: import_zod67.z.string().describe("Group name"),
|
|
12254
|
+
description: import_zod67.z.string(),
|
|
12255
|
+
permissions: import_zod67.z.array(import_zod67.z.string()).describe("Permission IDs in this group")
|
|
12163
12256
|
})).optional(),
|
|
12164
12257
|
/**
|
|
12165
12258
|
* Default grant strategy
|
|
12166
12259
|
*/
|
|
12167
|
-
defaultGrant:
|
|
12260
|
+
defaultGrant: import_zod67.z.enum([
|
|
12168
12261
|
"prompt",
|
|
12169
12262
|
// Always prompt user
|
|
12170
12263
|
"allow",
|
|
@@ -12175,11 +12268,11 @@ var PermissionSetSchema2 = import_zod66.z.object({
|
|
|
12175
12268
|
// Inherit from parent
|
|
12176
12269
|
]).default("prompt")
|
|
12177
12270
|
});
|
|
12178
|
-
var RuntimeConfigSchema =
|
|
12271
|
+
var RuntimeConfigSchema = import_zod67.z.object({
|
|
12179
12272
|
/**
|
|
12180
12273
|
* Runtime engine type
|
|
12181
12274
|
*/
|
|
12182
|
-
engine:
|
|
12275
|
+
engine: import_zod67.z.enum([
|
|
12183
12276
|
"v8-isolate",
|
|
12184
12277
|
// V8 isolate-based isolation (lightweight, fast)
|
|
12185
12278
|
"wasm",
|
|
@@ -12192,97 +12285,97 @@ var RuntimeConfigSchema = import_zod66.z.object({
|
|
|
12192
12285
|
/**
|
|
12193
12286
|
* Engine-specific configuration
|
|
12194
12287
|
*/
|
|
12195
|
-
engineConfig:
|
|
12288
|
+
engineConfig: import_zod67.z.object({
|
|
12196
12289
|
/**
|
|
12197
12290
|
* WASM-specific settings (when engine is "wasm")
|
|
12198
12291
|
*/
|
|
12199
|
-
wasm:
|
|
12292
|
+
wasm: import_zod67.z.object({
|
|
12200
12293
|
/**
|
|
12201
12294
|
* Maximum memory pages (64KB per page)
|
|
12202
12295
|
*/
|
|
12203
|
-
maxMemoryPages:
|
|
12296
|
+
maxMemoryPages: import_zod67.z.number().int().min(1).max(65536).optional().describe("Maximum WASM memory pages (64KB each)"),
|
|
12204
12297
|
/**
|
|
12205
12298
|
* Instruction execution limit
|
|
12206
12299
|
*/
|
|
12207
|
-
instructionLimit:
|
|
12300
|
+
instructionLimit: import_zod67.z.number().int().min(1).optional().describe("Maximum instructions before timeout"),
|
|
12208
12301
|
/**
|
|
12209
12302
|
* Enable SIMD instructions
|
|
12210
12303
|
*/
|
|
12211
|
-
enableSimd:
|
|
12304
|
+
enableSimd: import_zod67.z.boolean().default(false).describe("Enable WebAssembly SIMD support"),
|
|
12212
12305
|
/**
|
|
12213
12306
|
* Enable threads
|
|
12214
12307
|
*/
|
|
12215
|
-
enableThreads:
|
|
12308
|
+
enableThreads: import_zod67.z.boolean().default(false).describe("Enable WebAssembly threads"),
|
|
12216
12309
|
/**
|
|
12217
12310
|
* Enable bulk memory operations
|
|
12218
12311
|
*/
|
|
12219
|
-
enableBulkMemory:
|
|
12312
|
+
enableBulkMemory: import_zod67.z.boolean().default(true).describe("Enable bulk memory operations")
|
|
12220
12313
|
}).optional(),
|
|
12221
12314
|
/**
|
|
12222
12315
|
* Container-specific settings (when engine is "container")
|
|
12223
12316
|
*/
|
|
12224
|
-
container:
|
|
12317
|
+
container: import_zod67.z.object({
|
|
12225
12318
|
/**
|
|
12226
12319
|
* Container image
|
|
12227
12320
|
*/
|
|
12228
|
-
image:
|
|
12321
|
+
image: import_zod67.z.string().optional().describe("Container image to use"),
|
|
12229
12322
|
/**
|
|
12230
12323
|
* Container runtime
|
|
12231
12324
|
*/
|
|
12232
|
-
runtime:
|
|
12325
|
+
runtime: import_zod67.z.enum(["docker", "podman", "containerd"]).default("docker"),
|
|
12233
12326
|
/**
|
|
12234
12327
|
* Resource limits
|
|
12235
12328
|
*/
|
|
12236
|
-
resources:
|
|
12237
|
-
cpuLimit:
|
|
12238
|
-
memoryLimit:
|
|
12329
|
+
resources: import_zod67.z.object({
|
|
12330
|
+
cpuLimit: import_zod67.z.string().optional().describe('CPU limit (e.g., "0.5", "2")'),
|
|
12331
|
+
memoryLimit: import_zod67.z.string().optional().describe('Memory limit (e.g., "512m", "1g")')
|
|
12239
12332
|
}).optional(),
|
|
12240
12333
|
/**
|
|
12241
12334
|
* Network mode
|
|
12242
12335
|
*/
|
|
12243
|
-
networkMode:
|
|
12336
|
+
networkMode: import_zod67.z.enum(["none", "bridge", "host"]).default("bridge")
|
|
12244
12337
|
}).optional(),
|
|
12245
12338
|
/**
|
|
12246
12339
|
* V8 Isolate-specific settings (when engine is "v8-isolate")
|
|
12247
12340
|
*/
|
|
12248
|
-
v8Isolate:
|
|
12341
|
+
v8Isolate: import_zod67.z.object({
|
|
12249
12342
|
/**
|
|
12250
12343
|
* Heap size limit in MB
|
|
12251
12344
|
*/
|
|
12252
|
-
heapSizeMb:
|
|
12345
|
+
heapSizeMb: import_zod67.z.number().int().min(1).optional(),
|
|
12253
12346
|
/**
|
|
12254
12347
|
* Enable snapshot
|
|
12255
12348
|
*/
|
|
12256
|
-
enableSnapshot:
|
|
12349
|
+
enableSnapshot: import_zod67.z.boolean().default(true)
|
|
12257
12350
|
}).optional()
|
|
12258
12351
|
}).optional(),
|
|
12259
12352
|
/**
|
|
12260
12353
|
* General resource limits (applies to all engines)
|
|
12261
12354
|
*/
|
|
12262
|
-
resourceLimits:
|
|
12355
|
+
resourceLimits: import_zod67.z.object({
|
|
12263
12356
|
/**
|
|
12264
12357
|
* Maximum memory in bytes
|
|
12265
12358
|
*/
|
|
12266
|
-
maxMemory:
|
|
12359
|
+
maxMemory: import_zod67.z.number().int().optional().describe("Maximum memory allocation"),
|
|
12267
12360
|
/**
|
|
12268
12361
|
* Maximum CPU percentage
|
|
12269
12362
|
*/
|
|
12270
|
-
maxCpu:
|
|
12363
|
+
maxCpu: import_zod67.z.number().min(0).max(100).optional().describe("Maximum CPU usage percentage"),
|
|
12271
12364
|
/**
|
|
12272
12365
|
* Execution timeout in milliseconds
|
|
12273
12366
|
*/
|
|
12274
|
-
timeout:
|
|
12367
|
+
timeout: import_zod67.z.number().int().min(0).optional().describe("Maximum execution time")
|
|
12275
12368
|
}).optional()
|
|
12276
12369
|
});
|
|
12277
|
-
var SandboxConfigSchema =
|
|
12370
|
+
var SandboxConfigSchema = import_zod67.z.object({
|
|
12278
12371
|
/**
|
|
12279
12372
|
* Enable sandboxing
|
|
12280
12373
|
*/
|
|
12281
|
-
enabled:
|
|
12374
|
+
enabled: import_zod67.z.boolean().default(true),
|
|
12282
12375
|
/**
|
|
12283
12376
|
* Sandboxing level
|
|
12284
12377
|
*/
|
|
12285
|
-
level:
|
|
12378
|
+
level: import_zod67.z.enum([
|
|
12286
12379
|
"none",
|
|
12287
12380
|
// No sandboxing
|
|
12288
12381
|
"minimal",
|
|
@@ -12301,239 +12394,239 @@ var SandboxConfigSchema = import_zod66.z.object({
|
|
|
12301
12394
|
/**
|
|
12302
12395
|
* File system access
|
|
12303
12396
|
*/
|
|
12304
|
-
filesystem:
|
|
12305
|
-
mode:
|
|
12306
|
-
allowedPaths:
|
|
12307
|
-
deniedPaths:
|
|
12308
|
-
maxFileSize:
|
|
12397
|
+
filesystem: import_zod67.z.object({
|
|
12398
|
+
mode: import_zod67.z.enum(["none", "readonly", "restricted", "full"]).default("restricted"),
|
|
12399
|
+
allowedPaths: import_zod67.z.array(import_zod67.z.string()).optional().describe("Whitelisted paths"),
|
|
12400
|
+
deniedPaths: import_zod67.z.array(import_zod67.z.string()).optional().describe("Blacklisted paths"),
|
|
12401
|
+
maxFileSize: import_zod67.z.number().int().optional().describe("Maximum file size in bytes")
|
|
12309
12402
|
}).optional(),
|
|
12310
12403
|
/**
|
|
12311
12404
|
* Network access
|
|
12312
12405
|
*/
|
|
12313
|
-
network:
|
|
12314
|
-
mode:
|
|
12315
|
-
allowedHosts:
|
|
12316
|
-
deniedHosts:
|
|
12317
|
-
allowedPorts:
|
|
12318
|
-
maxConnections:
|
|
12406
|
+
network: import_zod67.z.object({
|
|
12407
|
+
mode: import_zod67.z.enum(["none", "local", "restricted", "full"]).default("restricted"),
|
|
12408
|
+
allowedHosts: import_zod67.z.array(import_zod67.z.string()).optional().describe("Whitelisted hosts"),
|
|
12409
|
+
deniedHosts: import_zod67.z.array(import_zod67.z.string()).optional().describe("Blacklisted hosts"),
|
|
12410
|
+
allowedPorts: import_zod67.z.array(import_zod67.z.number()).optional().describe("Allowed port numbers"),
|
|
12411
|
+
maxConnections: import_zod67.z.number().int().optional()
|
|
12319
12412
|
}).optional(),
|
|
12320
12413
|
/**
|
|
12321
12414
|
* Process execution
|
|
12322
12415
|
*/
|
|
12323
|
-
process:
|
|
12324
|
-
allowSpawn:
|
|
12325
|
-
allowedCommands:
|
|
12326
|
-
timeout:
|
|
12416
|
+
process: import_zod67.z.object({
|
|
12417
|
+
allowSpawn: import_zod67.z.boolean().default(false).describe("Allow spawning child processes"),
|
|
12418
|
+
allowedCommands: import_zod67.z.array(import_zod67.z.string()).optional().describe("Whitelisted commands"),
|
|
12419
|
+
timeout: import_zod67.z.number().int().optional().describe("Process timeout in ms")
|
|
12327
12420
|
}).optional(),
|
|
12328
12421
|
/**
|
|
12329
12422
|
* Memory limits
|
|
12330
12423
|
*/
|
|
12331
|
-
memory:
|
|
12332
|
-
maxHeap:
|
|
12333
|
-
maxStack:
|
|
12424
|
+
memory: import_zod67.z.object({
|
|
12425
|
+
maxHeap: import_zod67.z.number().int().optional().describe("Maximum heap size in bytes"),
|
|
12426
|
+
maxStack: import_zod67.z.number().int().optional().describe("Maximum stack size in bytes")
|
|
12334
12427
|
}).optional(),
|
|
12335
12428
|
/**
|
|
12336
12429
|
* CPU limits
|
|
12337
12430
|
*/
|
|
12338
|
-
cpu:
|
|
12339
|
-
maxCpuPercent:
|
|
12340
|
-
maxThreads:
|
|
12431
|
+
cpu: import_zod67.z.object({
|
|
12432
|
+
maxCpuPercent: import_zod67.z.number().min(0).max(100).optional(),
|
|
12433
|
+
maxThreads: import_zod67.z.number().int().optional()
|
|
12341
12434
|
}).optional(),
|
|
12342
12435
|
/**
|
|
12343
12436
|
* Environment variables
|
|
12344
12437
|
*/
|
|
12345
|
-
environment:
|
|
12346
|
-
mode:
|
|
12347
|
-
allowedVars:
|
|
12348
|
-
deniedVars:
|
|
12438
|
+
environment: import_zod67.z.object({
|
|
12439
|
+
mode: import_zod67.z.enum(["none", "readonly", "restricted", "full"]).default("readonly"),
|
|
12440
|
+
allowedVars: import_zod67.z.array(import_zod67.z.string()).optional(),
|
|
12441
|
+
deniedVars: import_zod67.z.array(import_zod67.z.string()).optional()
|
|
12349
12442
|
}).optional()
|
|
12350
12443
|
});
|
|
12351
|
-
var SecurityVulnerabilitySchema =
|
|
12444
|
+
var SecurityVulnerabilitySchema = import_zod67.z.object({
|
|
12352
12445
|
/**
|
|
12353
12446
|
* CVE identifier
|
|
12354
12447
|
*/
|
|
12355
|
-
cve:
|
|
12448
|
+
cve: import_zod67.z.string().optional(),
|
|
12356
12449
|
/**
|
|
12357
12450
|
* Vulnerability identifier
|
|
12358
12451
|
*/
|
|
12359
|
-
id:
|
|
12452
|
+
id: import_zod67.z.string(),
|
|
12360
12453
|
/**
|
|
12361
12454
|
* Severity level
|
|
12362
12455
|
*/
|
|
12363
|
-
severity:
|
|
12456
|
+
severity: import_zod67.z.enum(["critical", "high", "medium", "low", "info"]),
|
|
12364
12457
|
/**
|
|
12365
12458
|
* Category (e.g., SAST, DAST, Dependency)
|
|
12366
12459
|
*/
|
|
12367
|
-
category:
|
|
12460
|
+
category: import_zod67.z.string().optional(),
|
|
12368
12461
|
/**
|
|
12369
12462
|
* Title
|
|
12370
12463
|
*/
|
|
12371
|
-
title:
|
|
12464
|
+
title: import_zod67.z.string(),
|
|
12372
12465
|
/**
|
|
12373
12466
|
* Location of the vulnerability
|
|
12374
12467
|
*/
|
|
12375
|
-
location:
|
|
12468
|
+
location: import_zod67.z.string().optional(),
|
|
12376
12469
|
/**
|
|
12377
12470
|
* Remediation steps
|
|
12378
12471
|
*/
|
|
12379
|
-
remediation:
|
|
12472
|
+
remediation: import_zod67.z.string().optional(),
|
|
12380
12473
|
/**
|
|
12381
12474
|
* Description
|
|
12382
12475
|
*/
|
|
12383
|
-
description:
|
|
12476
|
+
description: import_zod67.z.string(),
|
|
12384
12477
|
/**
|
|
12385
12478
|
* Affected versions
|
|
12386
12479
|
*/
|
|
12387
|
-
affectedVersions:
|
|
12480
|
+
affectedVersions: import_zod67.z.array(import_zod67.z.string()),
|
|
12388
12481
|
/**
|
|
12389
12482
|
* Fixed in versions
|
|
12390
12483
|
*/
|
|
12391
|
-
fixedIn:
|
|
12484
|
+
fixedIn: import_zod67.z.array(import_zod67.z.string()).optional(),
|
|
12392
12485
|
/**
|
|
12393
12486
|
* CVSS score
|
|
12394
12487
|
*/
|
|
12395
|
-
cvssScore:
|
|
12488
|
+
cvssScore: import_zod67.z.number().min(0).max(10).optional(),
|
|
12396
12489
|
/**
|
|
12397
12490
|
* Exploit availability
|
|
12398
12491
|
*/
|
|
12399
|
-
exploitAvailable:
|
|
12492
|
+
exploitAvailable: import_zod67.z.boolean().default(false),
|
|
12400
12493
|
/**
|
|
12401
12494
|
* Patch available
|
|
12402
12495
|
*/
|
|
12403
|
-
patchAvailable:
|
|
12496
|
+
patchAvailable: import_zod67.z.boolean().default(false),
|
|
12404
12497
|
/**
|
|
12405
12498
|
* Workaround
|
|
12406
12499
|
*/
|
|
12407
|
-
workaround:
|
|
12500
|
+
workaround: import_zod67.z.string().optional(),
|
|
12408
12501
|
/**
|
|
12409
12502
|
* References
|
|
12410
12503
|
*/
|
|
12411
|
-
references:
|
|
12504
|
+
references: import_zod67.z.array(import_zod67.z.string()).optional(),
|
|
12412
12505
|
/**
|
|
12413
12506
|
* Discovered date
|
|
12414
12507
|
*/
|
|
12415
|
-
discoveredDate:
|
|
12508
|
+
discoveredDate: import_zod67.z.string().datetime().optional(),
|
|
12416
12509
|
/**
|
|
12417
12510
|
* Published date
|
|
12418
12511
|
*/
|
|
12419
|
-
publishedDate:
|
|
12512
|
+
publishedDate: import_zod67.z.string().datetime().optional()
|
|
12420
12513
|
});
|
|
12421
|
-
var SecurityScanResultSchema =
|
|
12514
|
+
var SecurityScanResultSchema = import_zod67.z.object({
|
|
12422
12515
|
/**
|
|
12423
12516
|
* Scan timestamp
|
|
12424
12517
|
*/
|
|
12425
|
-
timestamp:
|
|
12518
|
+
timestamp: import_zod67.z.string().datetime(),
|
|
12426
12519
|
/**
|
|
12427
12520
|
* Scanner information
|
|
12428
12521
|
*/
|
|
12429
|
-
scanner:
|
|
12430
|
-
name:
|
|
12431
|
-
version:
|
|
12522
|
+
scanner: import_zod67.z.object({
|
|
12523
|
+
name: import_zod67.z.string(),
|
|
12524
|
+
version: import_zod67.z.string()
|
|
12432
12525
|
}),
|
|
12433
12526
|
/**
|
|
12434
12527
|
* Overall status
|
|
12435
12528
|
*/
|
|
12436
|
-
status:
|
|
12529
|
+
status: import_zod67.z.enum(["passed", "failed", "warning"]),
|
|
12437
12530
|
/**
|
|
12438
12531
|
* Vulnerabilities found
|
|
12439
12532
|
*/
|
|
12440
|
-
vulnerabilities:
|
|
12533
|
+
vulnerabilities: import_zod67.z.array(SecurityVulnerabilitySchema).optional(),
|
|
12441
12534
|
/**
|
|
12442
12535
|
* Code quality issues
|
|
12443
12536
|
*/
|
|
12444
|
-
codeIssues:
|
|
12445
|
-
severity:
|
|
12446
|
-
type:
|
|
12447
|
-
file:
|
|
12448
|
-
line:
|
|
12449
|
-
message:
|
|
12450
|
-
suggestion:
|
|
12537
|
+
codeIssues: import_zod67.z.array(import_zod67.z.object({
|
|
12538
|
+
severity: import_zod67.z.enum(["error", "warning", "info"]),
|
|
12539
|
+
type: import_zod67.z.string().describe("Issue type (e.g., sql-injection, xss)"),
|
|
12540
|
+
file: import_zod67.z.string(),
|
|
12541
|
+
line: import_zod67.z.number().int().optional(),
|
|
12542
|
+
message: import_zod67.z.string(),
|
|
12543
|
+
suggestion: import_zod67.z.string().optional()
|
|
12451
12544
|
})).optional(),
|
|
12452
12545
|
/**
|
|
12453
12546
|
* Dependency vulnerabilities
|
|
12454
12547
|
*/
|
|
12455
|
-
dependencyVulnerabilities:
|
|
12456
|
-
package:
|
|
12457
|
-
version:
|
|
12548
|
+
dependencyVulnerabilities: import_zod67.z.array(import_zod67.z.object({
|
|
12549
|
+
package: import_zod67.z.string(),
|
|
12550
|
+
version: import_zod67.z.string(),
|
|
12458
12551
|
vulnerability: SecurityVulnerabilitySchema
|
|
12459
12552
|
})).optional(),
|
|
12460
12553
|
/**
|
|
12461
12554
|
* License compliance
|
|
12462
12555
|
*/
|
|
12463
|
-
licenseCompliance:
|
|
12464
|
-
status:
|
|
12465
|
-
issues:
|
|
12466
|
-
package:
|
|
12467
|
-
license:
|
|
12468
|
-
reason:
|
|
12556
|
+
licenseCompliance: import_zod67.z.object({
|
|
12557
|
+
status: import_zod67.z.enum(["compliant", "non-compliant", "unknown"]),
|
|
12558
|
+
issues: import_zod67.z.array(import_zod67.z.object({
|
|
12559
|
+
package: import_zod67.z.string(),
|
|
12560
|
+
license: import_zod67.z.string(),
|
|
12561
|
+
reason: import_zod67.z.string()
|
|
12469
12562
|
})).optional()
|
|
12470
12563
|
}).optional(),
|
|
12471
12564
|
/**
|
|
12472
12565
|
* Summary statistics
|
|
12473
12566
|
*/
|
|
12474
|
-
summary:
|
|
12475
|
-
totalVulnerabilities:
|
|
12476
|
-
criticalCount:
|
|
12477
|
-
highCount:
|
|
12478
|
-
mediumCount:
|
|
12479
|
-
lowCount:
|
|
12480
|
-
infoCount:
|
|
12567
|
+
summary: import_zod67.z.object({
|
|
12568
|
+
totalVulnerabilities: import_zod67.z.number().int(),
|
|
12569
|
+
criticalCount: import_zod67.z.number().int(),
|
|
12570
|
+
highCount: import_zod67.z.number().int(),
|
|
12571
|
+
mediumCount: import_zod67.z.number().int(),
|
|
12572
|
+
lowCount: import_zod67.z.number().int(),
|
|
12573
|
+
infoCount: import_zod67.z.number().int()
|
|
12481
12574
|
})
|
|
12482
12575
|
});
|
|
12483
|
-
var SecurityPolicySchema =
|
|
12576
|
+
var SecurityPolicySchema = import_zod67.z.object({
|
|
12484
12577
|
/**
|
|
12485
12578
|
* Content Security Policy
|
|
12486
12579
|
*/
|
|
12487
|
-
csp:
|
|
12488
|
-
directives:
|
|
12489
|
-
reportOnly:
|
|
12580
|
+
csp: import_zod67.z.object({
|
|
12581
|
+
directives: import_zod67.z.record(import_zod67.z.string(), import_zod67.z.array(import_zod67.z.string())).optional(),
|
|
12582
|
+
reportOnly: import_zod67.z.boolean().default(false)
|
|
12490
12583
|
}).optional(),
|
|
12491
12584
|
/**
|
|
12492
12585
|
* CORS policy
|
|
12493
12586
|
*/
|
|
12494
|
-
cors:
|
|
12495
|
-
allowedOrigins:
|
|
12496
|
-
allowedMethods:
|
|
12497
|
-
allowedHeaders:
|
|
12498
|
-
allowCredentials:
|
|
12499
|
-
maxAge:
|
|
12587
|
+
cors: import_zod67.z.object({
|
|
12588
|
+
allowedOrigins: import_zod67.z.array(import_zod67.z.string()),
|
|
12589
|
+
allowedMethods: import_zod67.z.array(import_zod67.z.string()),
|
|
12590
|
+
allowedHeaders: import_zod67.z.array(import_zod67.z.string()),
|
|
12591
|
+
allowCredentials: import_zod67.z.boolean().default(false),
|
|
12592
|
+
maxAge: import_zod67.z.number().int().optional()
|
|
12500
12593
|
}).optional(),
|
|
12501
12594
|
/**
|
|
12502
12595
|
* Rate limiting
|
|
12503
12596
|
*/
|
|
12504
|
-
rateLimit:
|
|
12505
|
-
enabled:
|
|
12506
|
-
maxRequests:
|
|
12507
|
-
windowMs:
|
|
12508
|
-
strategy:
|
|
12597
|
+
rateLimit: import_zod67.z.object({
|
|
12598
|
+
enabled: import_zod67.z.boolean().default(true),
|
|
12599
|
+
maxRequests: import_zod67.z.number().int(),
|
|
12600
|
+
windowMs: import_zod67.z.number().int().describe("Time window in milliseconds"),
|
|
12601
|
+
strategy: import_zod67.z.enum(["fixed", "sliding", "token-bucket"]).default("sliding")
|
|
12509
12602
|
}).optional(),
|
|
12510
12603
|
/**
|
|
12511
12604
|
* Authentication requirements
|
|
12512
12605
|
*/
|
|
12513
|
-
authentication:
|
|
12514
|
-
required:
|
|
12515
|
-
methods:
|
|
12516
|
-
tokenExpiration:
|
|
12606
|
+
authentication: import_zod67.z.object({
|
|
12607
|
+
required: import_zod67.z.boolean().default(true),
|
|
12608
|
+
methods: import_zod67.z.array(import_zod67.z.enum(["jwt", "oauth2", "api-key", "session", "certificate"])),
|
|
12609
|
+
tokenExpiration: import_zod67.z.number().int().optional().describe("Token expiration in seconds")
|
|
12517
12610
|
}).optional(),
|
|
12518
12611
|
/**
|
|
12519
12612
|
* Encryption requirements
|
|
12520
12613
|
*/
|
|
12521
|
-
encryption:
|
|
12522
|
-
dataAtRest:
|
|
12523
|
-
dataInTransit:
|
|
12524
|
-
algorithm:
|
|
12525
|
-
minKeyLength:
|
|
12614
|
+
encryption: import_zod67.z.object({
|
|
12615
|
+
dataAtRest: import_zod67.z.boolean().default(false).describe("Encrypt data at rest"),
|
|
12616
|
+
dataInTransit: import_zod67.z.boolean().default(true).describe("Enforce HTTPS/TLS"),
|
|
12617
|
+
algorithm: import_zod67.z.string().optional().describe("Encryption algorithm"),
|
|
12618
|
+
minKeyLength: import_zod67.z.number().int().optional().describe("Minimum key length in bits")
|
|
12526
12619
|
}).optional(),
|
|
12527
12620
|
/**
|
|
12528
12621
|
* Audit logging
|
|
12529
12622
|
*/
|
|
12530
|
-
auditLog:
|
|
12531
|
-
enabled:
|
|
12532
|
-
events:
|
|
12533
|
-
retention:
|
|
12623
|
+
auditLog: import_zod67.z.object({
|
|
12624
|
+
enabled: import_zod67.z.boolean().default(true),
|
|
12625
|
+
events: import_zod67.z.array(import_zod67.z.string()).optional().describe("Events to log"),
|
|
12626
|
+
retention: import_zod67.z.number().int().optional().describe("Log retention in days")
|
|
12534
12627
|
}).optional()
|
|
12535
12628
|
});
|
|
12536
|
-
var PluginTrustLevelSchema =
|
|
12629
|
+
var PluginTrustLevelSchema = import_zod67.z.enum([
|
|
12537
12630
|
"verified",
|
|
12538
12631
|
// Official/verified plugin
|
|
12539
12632
|
"trusted",
|
|
@@ -12545,11 +12638,11 @@ var PluginTrustLevelSchema = import_zod66.z.enum([
|
|
|
12545
12638
|
"blocked"
|
|
12546
12639
|
// Blocked/malicious
|
|
12547
12640
|
]).describe("Trust level of the plugin");
|
|
12548
|
-
var PluginSecurityManifestSchema =
|
|
12641
|
+
var PluginSecurityManifestSchema = import_zod67.z.object({
|
|
12549
12642
|
/**
|
|
12550
12643
|
* Plugin identifier
|
|
12551
12644
|
*/
|
|
12552
|
-
pluginId:
|
|
12645
|
+
pluginId: import_zod67.z.string(),
|
|
12553
12646
|
/**
|
|
12554
12647
|
* Trust level
|
|
12555
12648
|
*/
|
|
@@ -12569,54 +12662,54 @@ var PluginSecurityManifestSchema = import_zod66.z.object({
|
|
|
12569
12662
|
/**
|
|
12570
12663
|
* Security scan results
|
|
12571
12664
|
*/
|
|
12572
|
-
scanResults:
|
|
12665
|
+
scanResults: import_zod67.z.array(SecurityScanResultSchema).optional(),
|
|
12573
12666
|
/**
|
|
12574
12667
|
* Known vulnerabilities
|
|
12575
12668
|
*/
|
|
12576
|
-
vulnerabilities:
|
|
12669
|
+
vulnerabilities: import_zod67.z.array(SecurityVulnerabilitySchema).optional(),
|
|
12577
12670
|
/**
|
|
12578
12671
|
* Code signing
|
|
12579
12672
|
*/
|
|
12580
|
-
codeSigning:
|
|
12581
|
-
signed:
|
|
12582
|
-
signature:
|
|
12583
|
-
certificate:
|
|
12584
|
-
algorithm:
|
|
12585
|
-
timestamp:
|
|
12673
|
+
codeSigning: import_zod67.z.object({
|
|
12674
|
+
signed: import_zod67.z.boolean(),
|
|
12675
|
+
signature: import_zod67.z.string().optional(),
|
|
12676
|
+
certificate: import_zod67.z.string().optional(),
|
|
12677
|
+
algorithm: import_zod67.z.string().optional(),
|
|
12678
|
+
timestamp: import_zod67.z.string().datetime().optional()
|
|
12586
12679
|
}).optional(),
|
|
12587
12680
|
/**
|
|
12588
12681
|
* Security certifications
|
|
12589
12682
|
*/
|
|
12590
|
-
certifications:
|
|
12591
|
-
name:
|
|
12592
|
-
issuer:
|
|
12593
|
-
issuedDate:
|
|
12594
|
-
expiryDate:
|
|
12595
|
-
certificateUrl:
|
|
12683
|
+
certifications: import_zod67.z.array(import_zod67.z.object({
|
|
12684
|
+
name: import_zod67.z.string().describe("Certification name (e.g., SOC 2, ISO 27001)"),
|
|
12685
|
+
issuer: import_zod67.z.string(),
|
|
12686
|
+
issuedDate: import_zod67.z.string().datetime(),
|
|
12687
|
+
expiryDate: import_zod67.z.string().datetime().optional(),
|
|
12688
|
+
certificateUrl: import_zod67.z.string().url().optional()
|
|
12596
12689
|
})).optional(),
|
|
12597
12690
|
/**
|
|
12598
12691
|
* Security contact
|
|
12599
12692
|
*/
|
|
12600
|
-
securityContact:
|
|
12601
|
-
email:
|
|
12602
|
-
url:
|
|
12603
|
-
pgpKey:
|
|
12693
|
+
securityContact: import_zod67.z.object({
|
|
12694
|
+
email: import_zod67.z.string().email().optional(),
|
|
12695
|
+
url: import_zod67.z.string().url().optional(),
|
|
12696
|
+
pgpKey: import_zod67.z.string().optional()
|
|
12604
12697
|
}).optional(),
|
|
12605
12698
|
/**
|
|
12606
12699
|
* Vulnerability disclosure policy
|
|
12607
12700
|
*/
|
|
12608
|
-
vulnerabilityDisclosure:
|
|
12609
|
-
policyUrl:
|
|
12610
|
-
responseTime:
|
|
12611
|
-
bugBounty:
|
|
12701
|
+
vulnerabilityDisclosure: import_zod67.z.object({
|
|
12702
|
+
policyUrl: import_zod67.z.string().url().optional(),
|
|
12703
|
+
responseTime: import_zod67.z.number().int().optional().describe("Expected response time in hours"),
|
|
12704
|
+
bugBounty: import_zod67.z.boolean().default(false)
|
|
12612
12705
|
}).optional()
|
|
12613
12706
|
});
|
|
12614
12707
|
|
|
12615
12708
|
// src/kernel/plugin-structure.zod.ts
|
|
12616
|
-
var
|
|
12709
|
+
var import_zod68 = require("zod");
|
|
12617
12710
|
var SNAKE_CASE_REGEX = /^[a-z][a-z0-9_]*$/;
|
|
12618
12711
|
var OPS_FILE_SUFFIX_REGEX = /\.(object|field|trigger|function|view|page|dashboard|flow|app|router|service)\.ts$/;
|
|
12619
|
-
var OpsFilePathSchema =
|
|
12712
|
+
var OpsFilePathSchema = import_zod68.z.string().superRefine((path, ctx) => {
|
|
12620
12713
|
if (!path.startsWith("src/")) {
|
|
12621
12714
|
return;
|
|
12622
12715
|
}
|
|
@@ -12625,7 +12718,7 @@ var OpsFilePathSchema = import_zod67.z.string().superRefine((path, ctx) => {
|
|
|
12625
12718
|
const domainDir = parts[1];
|
|
12626
12719
|
if (!SNAKE_CASE_REGEX.test(domainDir)) {
|
|
12627
12720
|
ctx.addIssue({
|
|
12628
|
-
code:
|
|
12721
|
+
code: import_zod68.z.ZodIssueCode.custom,
|
|
12629
12722
|
message: `Domain directory '${domainDir}' must be lowercase snake_case`
|
|
12630
12723
|
});
|
|
12631
12724
|
}
|
|
@@ -12634,31 +12727,31 @@ var OpsFilePathSchema = import_zod67.z.string().superRefine((path, ctx) => {
|
|
|
12634
12727
|
if (filename === "index.ts" || filename === "main.ts") return;
|
|
12635
12728
|
if (!SNAKE_CASE_REGEX.test(filename.split(".")[0])) {
|
|
12636
12729
|
ctx.addIssue({
|
|
12637
|
-
code:
|
|
12730
|
+
code: import_zod68.z.ZodIssueCode.custom,
|
|
12638
12731
|
message: `Filename '${filename}' base name must be lowercase snake_case`
|
|
12639
12732
|
});
|
|
12640
12733
|
}
|
|
12641
12734
|
if (!OPS_FILE_SUFFIX_REGEX.test(filename)) {
|
|
12642
12735
|
}
|
|
12643
12736
|
});
|
|
12644
|
-
var OpsDomainModuleSchema =
|
|
12645
|
-
name:
|
|
12646
|
-
files:
|
|
12737
|
+
var OpsDomainModuleSchema = import_zod68.z.object({
|
|
12738
|
+
name: import_zod68.z.string().regex(SNAKE_CASE_REGEX),
|
|
12739
|
+
files: import_zod68.z.array(import_zod68.z.string())
|
|
12647
12740
|
}).superRefine((module2, ctx) => {
|
|
12648
12741
|
if (!module2.files.includes("index.ts")) {
|
|
12649
12742
|
ctx.addIssue({
|
|
12650
|
-
code:
|
|
12743
|
+
code: import_zod68.z.ZodIssueCode.custom,
|
|
12651
12744
|
message: `Module '${module2.name}' is missing an 'index.ts' entry point.`
|
|
12652
12745
|
});
|
|
12653
12746
|
}
|
|
12654
12747
|
});
|
|
12655
|
-
var OpsPluginStructureSchema =
|
|
12656
|
-
root:
|
|
12657
|
-
files:
|
|
12748
|
+
var OpsPluginStructureSchema = import_zod68.z.object({
|
|
12749
|
+
root: import_zod68.z.string(),
|
|
12750
|
+
files: import_zod68.z.array(import_zod68.z.string()).describe("List of all file paths relative to root")
|
|
12658
12751
|
}).superRefine((project, ctx) => {
|
|
12659
12752
|
if (!project.files.includes("objectstack.config.ts")) {
|
|
12660
12753
|
ctx.addIssue({
|
|
12661
|
-
code:
|
|
12754
|
+
code: import_zod68.z.ZodIssueCode.custom,
|
|
12662
12755
|
message: "Missing 'objectstack.config.ts' configuration file."
|
|
12663
12756
|
});
|
|
12664
12757
|
}
|
|
@@ -12673,93 +12766,93 @@ var OpsPluginStructureSchema = import_zod67.z.object({
|
|
|
12673
12766
|
});
|
|
12674
12767
|
|
|
12675
12768
|
// src/kernel/plugin-validator.zod.ts
|
|
12676
|
-
var
|
|
12677
|
-
var ValidationErrorSchema =
|
|
12769
|
+
var import_zod69 = require("zod");
|
|
12770
|
+
var ValidationErrorSchema = import_zod69.z.object({
|
|
12678
12771
|
/**
|
|
12679
12772
|
* Field that failed validation
|
|
12680
12773
|
*/
|
|
12681
|
-
field:
|
|
12774
|
+
field: import_zod69.z.string().describe("Field name that failed validation"),
|
|
12682
12775
|
/**
|
|
12683
12776
|
* Human-readable error message
|
|
12684
12777
|
*/
|
|
12685
|
-
message:
|
|
12778
|
+
message: import_zod69.z.string().describe("Human-readable error message"),
|
|
12686
12779
|
/**
|
|
12687
12780
|
* Machine-readable error code (optional)
|
|
12688
12781
|
*/
|
|
12689
|
-
code:
|
|
12782
|
+
code: import_zod69.z.string().optional().describe("Machine-readable error code")
|
|
12690
12783
|
});
|
|
12691
|
-
var ValidationWarningSchema =
|
|
12784
|
+
var ValidationWarningSchema = import_zod69.z.object({
|
|
12692
12785
|
/**
|
|
12693
12786
|
* Field with warning
|
|
12694
12787
|
*/
|
|
12695
|
-
field:
|
|
12788
|
+
field: import_zod69.z.string().describe("Field name with warning"),
|
|
12696
12789
|
/**
|
|
12697
12790
|
* Human-readable warning message
|
|
12698
12791
|
*/
|
|
12699
|
-
message:
|
|
12792
|
+
message: import_zod69.z.string().describe("Human-readable warning message"),
|
|
12700
12793
|
/**
|
|
12701
12794
|
* Machine-readable warning code (optional)
|
|
12702
12795
|
*/
|
|
12703
|
-
code:
|
|
12796
|
+
code: import_zod69.z.string().optional().describe("Machine-readable warning code")
|
|
12704
12797
|
});
|
|
12705
|
-
var ValidationResultSchema =
|
|
12798
|
+
var ValidationResultSchema = import_zod69.z.object({
|
|
12706
12799
|
/**
|
|
12707
12800
|
* Whether validation passed
|
|
12708
12801
|
*/
|
|
12709
|
-
valid:
|
|
12802
|
+
valid: import_zod69.z.boolean().describe("Whether the plugin passed validation"),
|
|
12710
12803
|
/**
|
|
12711
12804
|
* Validation errors (if any)
|
|
12712
12805
|
*/
|
|
12713
|
-
errors:
|
|
12806
|
+
errors: import_zod69.z.array(ValidationErrorSchema).optional().describe("Validation errors"),
|
|
12714
12807
|
/**
|
|
12715
12808
|
* Validation warnings (non-fatal issues)
|
|
12716
12809
|
*/
|
|
12717
|
-
warnings:
|
|
12810
|
+
warnings: import_zod69.z.array(ValidationWarningSchema).optional().describe("Validation warnings")
|
|
12718
12811
|
});
|
|
12719
|
-
var PluginMetadataSchema =
|
|
12812
|
+
var PluginMetadataSchema = import_zod69.z.object({
|
|
12720
12813
|
/**
|
|
12721
12814
|
* Unique plugin identifier (snake_case)
|
|
12722
12815
|
*/
|
|
12723
|
-
name:
|
|
12816
|
+
name: import_zod69.z.string().min(1).describe("Unique plugin identifier"),
|
|
12724
12817
|
/**
|
|
12725
12818
|
* Plugin version (semver)
|
|
12726
12819
|
*/
|
|
12727
|
-
version:
|
|
12820
|
+
version: import_zod69.z.string().regex(/^\d+\.\d+\.\d+$/).optional().describe("Semantic version (e.g., 1.0.0)"),
|
|
12728
12821
|
/**
|
|
12729
12822
|
* Plugin dependencies (array of plugin names)
|
|
12730
12823
|
*/
|
|
12731
|
-
dependencies:
|
|
12824
|
+
dependencies: import_zod69.z.array(import_zod69.z.string()).optional().describe("Array of plugin names this plugin depends on"),
|
|
12732
12825
|
/**
|
|
12733
12826
|
* Plugin signature for cryptographic verification (optional)
|
|
12734
12827
|
*/
|
|
12735
|
-
signature:
|
|
12828
|
+
signature: import_zod69.z.string().optional().describe("Cryptographic signature for plugin verification")
|
|
12736
12829
|
/**
|
|
12737
12830
|
* Additional plugin metadata
|
|
12738
12831
|
*/
|
|
12739
12832
|
}).passthrough().describe("Plugin metadata for validation");
|
|
12740
12833
|
|
|
12741
12834
|
// src/kernel/plugin-versioning.zod.ts
|
|
12742
|
-
var
|
|
12743
|
-
var SemanticVersionSchema =
|
|
12744
|
-
major:
|
|
12745
|
-
minor:
|
|
12746
|
-
patch:
|
|
12747
|
-
preRelease:
|
|
12748
|
-
build:
|
|
12835
|
+
var import_zod70 = require("zod");
|
|
12836
|
+
var SemanticVersionSchema = import_zod70.z.object({
|
|
12837
|
+
major: import_zod70.z.number().int().min(0).describe("Major version (breaking changes)"),
|
|
12838
|
+
minor: import_zod70.z.number().int().min(0).describe("Minor version (backward compatible features)"),
|
|
12839
|
+
patch: import_zod70.z.number().int().min(0).describe("Patch version (backward compatible fixes)"),
|
|
12840
|
+
preRelease: import_zod70.z.string().optional().describe("Pre-release identifier (alpha, beta, rc.1)"),
|
|
12841
|
+
build: import_zod70.z.string().optional().describe("Build metadata")
|
|
12749
12842
|
}).describe("Semantic version number");
|
|
12750
|
-
var VersionConstraintSchema =
|
|
12751
|
-
|
|
12752
|
-
|
|
12753
|
-
|
|
12754
|
-
|
|
12755
|
-
|
|
12756
|
-
|
|
12757
|
-
|
|
12758
|
-
|
|
12759
|
-
|
|
12760
|
-
|
|
12843
|
+
var VersionConstraintSchema = import_zod70.z.union([
|
|
12844
|
+
import_zod70.z.string().regex(/^[\d.]+$/).describe("Exact version: `1.2.3`"),
|
|
12845
|
+
import_zod70.z.string().regex(/^\^[\d.]+$/).describe("Compatible with: `^1.2.3` (`>=1.2.3 <2.0.0`)"),
|
|
12846
|
+
import_zod70.z.string().regex(/^~[\d.]+$/).describe("Approximately: `~1.2.3` (`>=1.2.3 <1.3.0`)"),
|
|
12847
|
+
import_zod70.z.string().regex(/^>=[\d.]+$/).describe("Greater than or equal: `>=1.2.3`"),
|
|
12848
|
+
import_zod70.z.string().regex(/^>[\d.]+$/).describe("Greater than: `>1.2.3`"),
|
|
12849
|
+
import_zod70.z.string().regex(/^<=[\d.]+$/).describe("Less than or equal: `<=1.2.3`"),
|
|
12850
|
+
import_zod70.z.string().regex(/^<[\d.]+$/).describe("Less than: `<1.2.3`"),
|
|
12851
|
+
import_zod70.z.string().regex(/^[\d.]+ - [\d.]+$/).describe("Range: `1.2.3 - 2.3.4`"),
|
|
12852
|
+
import_zod70.z.literal("*").describe("Any version"),
|
|
12853
|
+
import_zod70.z.literal("latest").describe("Latest stable version")
|
|
12761
12854
|
]);
|
|
12762
|
-
var CompatibilityLevelSchema =
|
|
12855
|
+
var CompatibilityLevelSchema = import_zod70.z.enum([
|
|
12763
12856
|
"fully-compatible",
|
|
12764
12857
|
// 100% compatible, drop-in replacement
|
|
12765
12858
|
"backward-compatible",
|
|
@@ -12771,15 +12864,15 @@ var CompatibilityLevelSchema = import_zod69.z.enum([
|
|
|
12771
12864
|
"incompatible"
|
|
12772
12865
|
// Completely incompatible
|
|
12773
12866
|
]).describe("Compatibility level between versions");
|
|
12774
|
-
var BreakingChangeSchema =
|
|
12867
|
+
var BreakingChangeSchema = import_zod70.z.object({
|
|
12775
12868
|
/**
|
|
12776
12869
|
* Version where the change was introduced
|
|
12777
12870
|
*/
|
|
12778
|
-
introducedIn:
|
|
12871
|
+
introducedIn: import_zod70.z.string().describe("Version that introduced this breaking change"),
|
|
12779
12872
|
/**
|
|
12780
12873
|
* Type of breaking change
|
|
12781
12874
|
*/
|
|
12782
|
-
type:
|
|
12875
|
+
type: import_zod70.z.enum([
|
|
12783
12876
|
"api-removed",
|
|
12784
12877
|
// API removed
|
|
12785
12878
|
"api-renamed",
|
|
@@ -12798,63 +12891,63 @@ var BreakingChangeSchema = import_zod69.z.object({
|
|
|
12798
12891
|
/**
|
|
12799
12892
|
* What was changed
|
|
12800
12893
|
*/
|
|
12801
|
-
description:
|
|
12894
|
+
description: import_zod70.z.string(),
|
|
12802
12895
|
/**
|
|
12803
12896
|
* Migration guide
|
|
12804
12897
|
*/
|
|
12805
|
-
migrationGuide:
|
|
12898
|
+
migrationGuide: import_zod70.z.string().optional().describe("How to migrate from old to new"),
|
|
12806
12899
|
/**
|
|
12807
12900
|
* Deprecated in version
|
|
12808
12901
|
*/
|
|
12809
|
-
deprecatedIn:
|
|
12902
|
+
deprecatedIn: import_zod70.z.string().optional().describe("Version where old API was deprecated"),
|
|
12810
12903
|
/**
|
|
12811
12904
|
* Will be removed in version
|
|
12812
12905
|
*/
|
|
12813
|
-
removedIn:
|
|
12906
|
+
removedIn: import_zod70.z.string().optional().describe("Version where old API will be removed"),
|
|
12814
12907
|
/**
|
|
12815
12908
|
* Automated migration available
|
|
12816
12909
|
*/
|
|
12817
|
-
automatedMigration:
|
|
12910
|
+
automatedMigration: import_zod70.z.boolean().default(false).describe("Whether automated migration tool is available"),
|
|
12818
12911
|
/**
|
|
12819
12912
|
* Impact severity
|
|
12820
12913
|
*/
|
|
12821
|
-
severity:
|
|
12914
|
+
severity: import_zod70.z.enum(["critical", "major", "minor"]).describe("Impact severity")
|
|
12822
12915
|
});
|
|
12823
|
-
var DeprecationNoticeSchema =
|
|
12916
|
+
var DeprecationNoticeSchema = import_zod70.z.object({
|
|
12824
12917
|
/**
|
|
12825
12918
|
* Feature or API being deprecated
|
|
12826
12919
|
*/
|
|
12827
|
-
feature:
|
|
12920
|
+
feature: import_zod70.z.string().describe("Deprecated feature identifier"),
|
|
12828
12921
|
/**
|
|
12829
12922
|
* Version when deprecated
|
|
12830
12923
|
*/
|
|
12831
|
-
deprecatedIn:
|
|
12924
|
+
deprecatedIn: import_zod70.z.string(),
|
|
12832
12925
|
/**
|
|
12833
12926
|
* Planned removal version
|
|
12834
12927
|
*/
|
|
12835
|
-
removeIn:
|
|
12928
|
+
removeIn: import_zod70.z.string().optional(),
|
|
12836
12929
|
/**
|
|
12837
12930
|
* Reason for deprecation
|
|
12838
12931
|
*/
|
|
12839
|
-
reason:
|
|
12932
|
+
reason: import_zod70.z.string(),
|
|
12840
12933
|
/**
|
|
12841
12934
|
* Recommended alternative
|
|
12842
12935
|
*/
|
|
12843
|
-
alternative:
|
|
12936
|
+
alternative: import_zod70.z.string().optional().describe("What to use instead"),
|
|
12844
12937
|
/**
|
|
12845
12938
|
* Migration path
|
|
12846
12939
|
*/
|
|
12847
|
-
migrationPath:
|
|
12940
|
+
migrationPath: import_zod70.z.string().optional().describe("How to migrate to alternative")
|
|
12848
12941
|
});
|
|
12849
|
-
var CompatibilityMatrixEntrySchema =
|
|
12942
|
+
var CompatibilityMatrixEntrySchema = import_zod70.z.object({
|
|
12850
12943
|
/**
|
|
12851
12944
|
* Source version
|
|
12852
12945
|
*/
|
|
12853
|
-
from:
|
|
12946
|
+
from: import_zod70.z.string().describe("Version being upgraded from"),
|
|
12854
12947
|
/**
|
|
12855
12948
|
* Target version
|
|
12856
12949
|
*/
|
|
12857
|
-
to:
|
|
12950
|
+
to: import_zod70.z.string().describe("Version being upgraded to"),
|
|
12858
12951
|
/**
|
|
12859
12952
|
* Compatibility level
|
|
12860
12953
|
*/
|
|
@@ -12862,60 +12955,60 @@ var CompatibilityMatrixEntrySchema = import_zod69.z.object({
|
|
|
12862
12955
|
/**
|
|
12863
12956
|
* Breaking changes list
|
|
12864
12957
|
*/
|
|
12865
|
-
breakingChanges:
|
|
12958
|
+
breakingChanges: import_zod70.z.array(BreakingChangeSchema).optional(),
|
|
12866
12959
|
/**
|
|
12867
12960
|
* Migration required
|
|
12868
12961
|
*/
|
|
12869
|
-
migrationRequired:
|
|
12962
|
+
migrationRequired: import_zod70.z.boolean().default(false),
|
|
12870
12963
|
/**
|
|
12871
12964
|
* Migration complexity
|
|
12872
12965
|
*/
|
|
12873
|
-
migrationComplexity:
|
|
12966
|
+
migrationComplexity: import_zod70.z.enum(["trivial", "simple", "moderate", "complex", "major"]).optional(),
|
|
12874
12967
|
/**
|
|
12875
12968
|
* Estimated migration time in hours
|
|
12876
12969
|
*/
|
|
12877
|
-
estimatedMigrationTime:
|
|
12970
|
+
estimatedMigrationTime: import_zod70.z.number().optional(),
|
|
12878
12971
|
/**
|
|
12879
12972
|
* Migration script available
|
|
12880
12973
|
*/
|
|
12881
|
-
migrationScript:
|
|
12974
|
+
migrationScript: import_zod70.z.string().optional().describe("Path to migration script"),
|
|
12882
12975
|
/**
|
|
12883
12976
|
* Test coverage for migration
|
|
12884
12977
|
*/
|
|
12885
|
-
testCoverage:
|
|
12978
|
+
testCoverage: import_zod70.z.number().min(0).max(100).optional().describe("Percentage of migration covered by tests")
|
|
12886
12979
|
});
|
|
12887
|
-
var PluginCompatibilityMatrixSchema =
|
|
12980
|
+
var PluginCompatibilityMatrixSchema = import_zod70.z.object({
|
|
12888
12981
|
/**
|
|
12889
12982
|
* Plugin identifier
|
|
12890
12983
|
*/
|
|
12891
|
-
pluginId:
|
|
12984
|
+
pluginId: import_zod70.z.string(),
|
|
12892
12985
|
/**
|
|
12893
12986
|
* Current version
|
|
12894
12987
|
*/
|
|
12895
|
-
currentVersion:
|
|
12988
|
+
currentVersion: import_zod70.z.string(),
|
|
12896
12989
|
/**
|
|
12897
12990
|
* Compatibility entries
|
|
12898
12991
|
*/
|
|
12899
|
-
compatibilityMatrix:
|
|
12992
|
+
compatibilityMatrix: import_zod70.z.array(CompatibilityMatrixEntrySchema),
|
|
12900
12993
|
/**
|
|
12901
12994
|
* Supported versions
|
|
12902
12995
|
*/
|
|
12903
|
-
supportedVersions:
|
|
12904
|
-
version:
|
|
12905
|
-
supported:
|
|
12906
|
-
endOfLife:
|
|
12907
|
-
securitySupport:
|
|
12996
|
+
supportedVersions: import_zod70.z.array(import_zod70.z.object({
|
|
12997
|
+
version: import_zod70.z.string(),
|
|
12998
|
+
supported: import_zod70.z.boolean(),
|
|
12999
|
+
endOfLife: import_zod70.z.string().datetime().optional().describe("End of support date"),
|
|
13000
|
+
securitySupport: import_zod70.z.boolean().default(false).describe("Still receives security updates")
|
|
12908
13001
|
})),
|
|
12909
13002
|
/**
|
|
12910
13003
|
* Minimum compatible version
|
|
12911
13004
|
*/
|
|
12912
|
-
minimumCompatibleVersion:
|
|
13005
|
+
minimumCompatibleVersion: import_zod70.z.string().optional().describe("Oldest version that can be directly upgraded")
|
|
12913
13006
|
});
|
|
12914
|
-
var DependencyConflictSchema =
|
|
13007
|
+
var DependencyConflictSchema = import_zod70.z.object({
|
|
12915
13008
|
/**
|
|
12916
13009
|
* Type of conflict
|
|
12917
13010
|
*/
|
|
12918
|
-
type:
|
|
13011
|
+
type: import_zod70.z.enum([
|
|
12919
13012
|
"version-mismatch",
|
|
12920
13013
|
// Different versions required
|
|
12921
13014
|
"missing-dependency",
|
|
@@ -12930,20 +13023,20 @@ var DependencyConflictSchema = import_zod69.z.object({
|
|
|
12930
13023
|
/**
|
|
12931
13024
|
* Plugins involved in conflict
|
|
12932
13025
|
*/
|
|
12933
|
-
plugins:
|
|
12934
|
-
pluginId:
|
|
12935
|
-
version:
|
|
12936
|
-
requirement:
|
|
13026
|
+
plugins: import_zod70.z.array(import_zod70.z.object({
|
|
13027
|
+
pluginId: import_zod70.z.string(),
|
|
13028
|
+
version: import_zod70.z.string(),
|
|
13029
|
+
requirement: import_zod70.z.string().optional().describe("What this plugin requires")
|
|
12937
13030
|
})),
|
|
12938
13031
|
/**
|
|
12939
13032
|
* Conflict description
|
|
12940
13033
|
*/
|
|
12941
|
-
description:
|
|
13034
|
+
description: import_zod70.z.string(),
|
|
12942
13035
|
/**
|
|
12943
13036
|
* Possible resolutions
|
|
12944
13037
|
*/
|
|
12945
|
-
resolutions:
|
|
12946
|
-
strategy:
|
|
13038
|
+
resolutions: import_zod70.z.array(import_zod70.z.object({
|
|
13039
|
+
strategy: import_zod70.z.enum([
|
|
12947
13040
|
"upgrade",
|
|
12948
13041
|
// Upgrade one or more plugins
|
|
12949
13042
|
"downgrade",
|
|
@@ -12955,58 +13048,58 @@ var DependencyConflictSchema = import_zod69.z.object({
|
|
|
12955
13048
|
"manual"
|
|
12956
13049
|
// Manual intervention required
|
|
12957
13050
|
]),
|
|
12958
|
-
description:
|
|
12959
|
-
automaticResolution:
|
|
12960
|
-
riskLevel:
|
|
13051
|
+
description: import_zod70.z.string(),
|
|
13052
|
+
automaticResolution: import_zod70.z.boolean().default(false),
|
|
13053
|
+
riskLevel: import_zod70.z.enum(["low", "medium", "high"])
|
|
12961
13054
|
})).optional(),
|
|
12962
13055
|
/**
|
|
12963
13056
|
* Severity of conflict
|
|
12964
13057
|
*/
|
|
12965
|
-
severity:
|
|
13058
|
+
severity: import_zod70.z.enum(["critical", "error", "warning", "info"])
|
|
12966
13059
|
});
|
|
12967
|
-
var DependencyResolutionResultSchema =
|
|
13060
|
+
var DependencyResolutionResultSchema = import_zod70.z.object({
|
|
12968
13061
|
/**
|
|
12969
13062
|
* Resolution successful
|
|
12970
13063
|
*/
|
|
12971
|
-
success:
|
|
13064
|
+
success: import_zod70.z.boolean(),
|
|
12972
13065
|
/**
|
|
12973
13066
|
* Resolved plugin versions
|
|
12974
13067
|
*/
|
|
12975
|
-
resolved:
|
|
12976
|
-
pluginId:
|
|
12977
|
-
version:
|
|
12978
|
-
resolvedVersion:
|
|
13068
|
+
resolved: import_zod70.z.array(import_zod70.z.object({
|
|
13069
|
+
pluginId: import_zod70.z.string(),
|
|
13070
|
+
version: import_zod70.z.string(),
|
|
13071
|
+
resolvedVersion: import_zod70.z.string()
|
|
12979
13072
|
})).optional(),
|
|
12980
13073
|
/**
|
|
12981
13074
|
* Conflicts found
|
|
12982
13075
|
*/
|
|
12983
|
-
conflicts:
|
|
13076
|
+
conflicts: import_zod70.z.array(DependencyConflictSchema).optional(),
|
|
12984
13077
|
/**
|
|
12985
13078
|
* Warnings
|
|
12986
13079
|
*/
|
|
12987
|
-
warnings:
|
|
13080
|
+
warnings: import_zod70.z.array(import_zod70.z.string()).optional(),
|
|
12988
13081
|
/**
|
|
12989
13082
|
* Installation order (topologically sorted)
|
|
12990
13083
|
*/
|
|
12991
|
-
installationOrder:
|
|
13084
|
+
installationOrder: import_zod70.z.array(import_zod70.z.string()).optional().describe("Plugin IDs in order they should be installed"),
|
|
12992
13085
|
/**
|
|
12993
13086
|
* Dependency graph
|
|
12994
13087
|
*/
|
|
12995
|
-
dependencyGraph:
|
|
13088
|
+
dependencyGraph: import_zod70.z.record(import_zod70.z.string(), import_zod70.z.array(import_zod70.z.string())).optional().describe("Map of plugin ID to its dependencies")
|
|
12996
13089
|
});
|
|
12997
|
-
var MultiVersionSupportSchema =
|
|
13090
|
+
var MultiVersionSupportSchema = import_zod70.z.object({
|
|
12998
13091
|
/**
|
|
12999
13092
|
* Enable multi-version support
|
|
13000
13093
|
*/
|
|
13001
|
-
enabled:
|
|
13094
|
+
enabled: import_zod70.z.boolean().default(false),
|
|
13002
13095
|
/**
|
|
13003
13096
|
* Maximum concurrent versions
|
|
13004
13097
|
*/
|
|
13005
|
-
maxConcurrentVersions:
|
|
13098
|
+
maxConcurrentVersions: import_zod70.z.number().int().min(1).default(2).describe("How many versions can run at the same time"),
|
|
13006
13099
|
/**
|
|
13007
13100
|
* Version selection strategy
|
|
13008
13101
|
*/
|
|
13009
|
-
selectionStrategy:
|
|
13102
|
+
selectionStrategy: import_zod70.z.enum([
|
|
13010
13103
|
"latest",
|
|
13011
13104
|
// Always use latest version
|
|
13012
13105
|
"stable",
|
|
@@ -13023,26 +13116,26 @@ var MultiVersionSupportSchema = import_zod69.z.object({
|
|
|
13023
13116
|
/**
|
|
13024
13117
|
* Version routing rules
|
|
13025
13118
|
*/
|
|
13026
|
-
routing:
|
|
13027
|
-
condition:
|
|
13028
|
-
version:
|
|
13029
|
-
priority:
|
|
13119
|
+
routing: import_zod70.z.array(import_zod70.z.object({
|
|
13120
|
+
condition: import_zod70.z.string().describe("Routing condition (e.g., tenant, user, feature flag)"),
|
|
13121
|
+
version: import_zod70.z.string().describe("Version to use when condition matches"),
|
|
13122
|
+
priority: import_zod70.z.number().int().default(100).describe("Rule priority")
|
|
13030
13123
|
})).optional(),
|
|
13031
13124
|
/**
|
|
13032
13125
|
* Gradual rollout configuration
|
|
13033
13126
|
*/
|
|
13034
|
-
rollout:
|
|
13035
|
-
enabled:
|
|
13036
|
-
strategy:
|
|
13037
|
-
percentage:
|
|
13038
|
-
duration:
|
|
13127
|
+
rollout: import_zod70.z.object({
|
|
13128
|
+
enabled: import_zod70.z.boolean().default(false),
|
|
13129
|
+
strategy: import_zod70.z.enum(["percentage", "blue-green", "canary"]),
|
|
13130
|
+
percentage: import_zod70.z.number().min(0).max(100).optional().describe("Percentage of traffic to new version"),
|
|
13131
|
+
duration: import_zod70.z.number().int().optional().describe("Rollout duration in milliseconds")
|
|
13039
13132
|
}).optional()
|
|
13040
13133
|
});
|
|
13041
|
-
var PluginVersionMetadataSchema =
|
|
13134
|
+
var PluginVersionMetadataSchema = import_zod70.z.object({
|
|
13042
13135
|
/**
|
|
13043
13136
|
* Plugin identifier
|
|
13044
13137
|
*/
|
|
13045
|
-
pluginId:
|
|
13138
|
+
pluginId: import_zod70.z.string(),
|
|
13046
13139
|
/**
|
|
13047
13140
|
* Version number
|
|
13048
13141
|
*/
|
|
@@ -13050,112 +13143,54 @@ var PluginVersionMetadataSchema = import_zod69.z.object({
|
|
|
13050
13143
|
/**
|
|
13051
13144
|
* Version string (computed)
|
|
13052
13145
|
*/
|
|
13053
|
-
versionString:
|
|
13146
|
+
versionString: import_zod70.z.string().describe("Full version string (e.g., 1.2.3-beta.1+build.123)"),
|
|
13054
13147
|
/**
|
|
13055
13148
|
* Release date
|
|
13056
13149
|
*/
|
|
13057
|
-
releaseDate:
|
|
13150
|
+
releaseDate: import_zod70.z.string().datetime(),
|
|
13058
13151
|
/**
|
|
13059
13152
|
* Release notes
|
|
13060
13153
|
*/
|
|
13061
|
-
releaseNotes:
|
|
13154
|
+
releaseNotes: import_zod70.z.string().optional(),
|
|
13062
13155
|
/**
|
|
13063
13156
|
* Breaking changes
|
|
13064
13157
|
*/
|
|
13065
|
-
breakingChanges:
|
|
13158
|
+
breakingChanges: import_zod70.z.array(BreakingChangeSchema).optional(),
|
|
13066
13159
|
/**
|
|
13067
13160
|
* Deprecations
|
|
13068
13161
|
*/
|
|
13069
|
-
deprecations:
|
|
13162
|
+
deprecations: import_zod70.z.array(DeprecationNoticeSchema).optional(),
|
|
13070
13163
|
/**
|
|
13071
13164
|
* Compatibility matrix
|
|
13072
13165
|
*/
|
|
13073
|
-
compatibilityMatrix:
|
|
13166
|
+
compatibilityMatrix: import_zod70.z.array(CompatibilityMatrixEntrySchema).optional(),
|
|
13074
13167
|
/**
|
|
13075
13168
|
* Security vulnerabilities fixed
|
|
13076
13169
|
*/
|
|
13077
|
-
securityFixes:
|
|
13078
|
-
cve:
|
|
13079
|
-
severity:
|
|
13080
|
-
description:
|
|
13081
|
-
fixedIn:
|
|
13170
|
+
securityFixes: import_zod70.z.array(import_zod70.z.object({
|
|
13171
|
+
cve: import_zod70.z.string().optional().describe("CVE identifier"),
|
|
13172
|
+
severity: import_zod70.z.enum(["critical", "high", "medium", "low"]),
|
|
13173
|
+
description: import_zod70.z.string(),
|
|
13174
|
+
fixedIn: import_zod70.z.string().describe("Version where vulnerability was fixed")
|
|
13082
13175
|
})).optional(),
|
|
13083
13176
|
/**
|
|
13084
13177
|
* Download statistics
|
|
13085
13178
|
*/
|
|
13086
|
-
statistics:
|
|
13087
|
-
downloads:
|
|
13088
|
-
installations:
|
|
13089
|
-
ratings:
|
|
13179
|
+
statistics: import_zod70.z.object({
|
|
13180
|
+
downloads: import_zod70.z.number().int().min(0).optional(),
|
|
13181
|
+
installations: import_zod70.z.number().int().min(0).optional(),
|
|
13182
|
+
ratings: import_zod70.z.number().min(0).max(5).optional()
|
|
13090
13183
|
}).optional(),
|
|
13091
13184
|
/**
|
|
13092
13185
|
* Support status
|
|
13093
13186
|
*/
|
|
13094
|
-
support:
|
|
13095
|
-
status:
|
|
13096
|
-
endOfLife:
|
|
13097
|
-
securitySupport:
|
|
13187
|
+
support: import_zod70.z.object({
|
|
13188
|
+
status: import_zod70.z.enum(["active", "maintenance", "deprecated", "eol"]),
|
|
13189
|
+
endOfLife: import_zod70.z.string().datetime().optional(),
|
|
13190
|
+
securitySupport: import_zod70.z.boolean().default(true)
|
|
13098
13191
|
})
|
|
13099
13192
|
});
|
|
13100
13193
|
|
|
13101
|
-
// src/kernel/plugin.zod.ts
|
|
13102
|
-
var import_zod70 = require("zod");
|
|
13103
|
-
var PluginContextSchema = import_zod70.z.object({
|
|
13104
|
-
ql: import_zod70.z.object({
|
|
13105
|
-
object: import_zod70.z.function().returns(import_zod70.z.any()),
|
|
13106
|
-
// Return any to allow method chaining
|
|
13107
|
-
query: import_zod70.z.function().returns(import_zod70.z.any())
|
|
13108
|
-
}).passthrough().describe("ObjectQL Engine Interface"),
|
|
13109
|
-
os: import_zod70.z.object({
|
|
13110
|
-
getCurrentUser: import_zod70.z.function().returns(import_zod70.z.any()),
|
|
13111
|
-
getConfig: import_zod70.z.function().returns(import_zod70.z.any())
|
|
13112
|
-
}).passthrough().describe("ObjectStack Kernel Interface"),
|
|
13113
|
-
logger: import_zod70.z.object({
|
|
13114
|
-
debug: import_zod70.z.function().returns(import_zod70.z.void()),
|
|
13115
|
-
info: import_zod70.z.function().returns(import_zod70.z.void()),
|
|
13116
|
-
warn: import_zod70.z.function().returns(import_zod70.z.void()),
|
|
13117
|
-
error: import_zod70.z.function().returns(import_zod70.z.void())
|
|
13118
|
-
}).passthrough().describe("Logger Interface"),
|
|
13119
|
-
storage: import_zod70.z.object({
|
|
13120
|
-
get: import_zod70.z.function().returns(import_zod70.z.any()),
|
|
13121
|
-
set: import_zod70.z.function().returns(import_zod70.z.promise(import_zod70.z.void())),
|
|
13122
|
-
delete: import_zod70.z.function().returns(import_zod70.z.promise(import_zod70.z.void()))
|
|
13123
|
-
}).passthrough().describe("Storage Interface"),
|
|
13124
|
-
i18n: import_zod70.z.object({
|
|
13125
|
-
t: import_zod70.z.function().returns(import_zod70.z.string()),
|
|
13126
|
-
getLocale: import_zod70.z.function().returns(import_zod70.z.string())
|
|
13127
|
-
}).passthrough().describe("Internationalization Interface"),
|
|
13128
|
-
metadata: import_zod70.z.record(import_zod70.z.string(), import_zod70.z.any()),
|
|
13129
|
-
events: import_zod70.z.record(import_zod70.z.string(), import_zod70.z.any()),
|
|
13130
|
-
app: import_zod70.z.object({
|
|
13131
|
-
router: import_zod70.z.object({
|
|
13132
|
-
get: import_zod70.z.function().returns(import_zod70.z.any()),
|
|
13133
|
-
post: import_zod70.z.function().returns(import_zod70.z.any()),
|
|
13134
|
-
use: import_zod70.z.function().returns(import_zod70.z.any())
|
|
13135
|
-
}).passthrough()
|
|
13136
|
-
}).passthrough().describe("App Framework Interface"),
|
|
13137
|
-
drivers: import_zod70.z.object({
|
|
13138
|
-
register: import_zod70.z.function().returns(import_zod70.z.void())
|
|
13139
|
-
}).passthrough().describe("Driver Registry")
|
|
13140
|
-
});
|
|
13141
|
-
var PluginLifecycleSchema = import_zod70.z.object({
|
|
13142
|
-
onInstall: import_zod70.z.function().args(PluginContextSchema).returns(import_zod70.z.promise(import_zod70.z.void())).optional(),
|
|
13143
|
-
onEnable: import_zod70.z.function().args(PluginContextSchema).returns(import_zod70.z.promise(import_zod70.z.void())).optional(),
|
|
13144
|
-
onDisable: import_zod70.z.function().args(PluginContextSchema).returns(import_zod70.z.promise(import_zod70.z.void())).optional(),
|
|
13145
|
-
onUninstall: import_zod70.z.function().args(PluginContextSchema).returns(import_zod70.z.promise(import_zod70.z.void())).optional(),
|
|
13146
|
-
onUpgrade: import_zod70.z.function().args(PluginContextSchema, import_zod70.z.string(), import_zod70.z.string()).returns(import_zod70.z.promise(import_zod70.z.void())).optional()
|
|
13147
|
-
});
|
|
13148
|
-
var PluginSchema = PluginLifecycleSchema.extend({
|
|
13149
|
-
id: import_zod70.z.string().min(1).optional().describe("Unique Plugin ID (e.g. com.example.crm)"),
|
|
13150
|
-
version: import_zod70.z.string().regex(/^\d+\.\d+\.\d+$/).optional().describe("Semantic Version"),
|
|
13151
|
-
description: import_zod70.z.string().optional(),
|
|
13152
|
-
author: import_zod70.z.string().optional(),
|
|
13153
|
-
homepage: import_zod70.z.string().url().optional()
|
|
13154
|
-
});
|
|
13155
|
-
function definePlugin(config) {
|
|
13156
|
-
return config;
|
|
13157
|
-
}
|
|
13158
|
-
|
|
13159
13194
|
// src/kernel/service-registry.zod.ts
|
|
13160
13195
|
var import_zod71 = require("zod");
|
|
13161
13196
|
var ServiceScopeType = import_zod71.z.enum([
|