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