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