@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.
- package/dist/ai/index.d.mts +1 -1
- package/dist/ai/index.d.ts +1 -1
- package/dist/api/index.d.mts +2 -2
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.js +1880 -1784
- package/dist/api/index.js.map +1 -1
- package/dist/api/index.mjs +1880 -1784
- package/dist/api/index.mjs.map +1 -1
- package/dist/automation/index.d.mts +1 -1
- package/dist/automation/index.d.ts +1 -1
- package/dist/contracts/index.d.mts +3 -3
- package/dist/contracts/index.d.ts +3 -3
- package/dist/data/index.d.mts +3 -3
- package/dist/data/index.d.ts +3 -3
- package/dist/data/index.js +5 -1
- package/dist/data/index.js.map +1 -1
- package/dist/data/index.mjs +5 -1
- package/dist/data/index.mjs.map +1 -1
- package/dist/{driver.zod-YoPJRbBk.d.mts → driver.zod-BOM_Etco.d.mts} +164 -3467
- package/dist/{driver.zod-B0DitHQ2.d.ts → driver.zod-lfi00zVT.d.ts} +164 -3467
- package/dist/{field.zod-Da5S-hAo.d.mts → field.zod-B_lzVsuC.d.ts} +871 -1
- package/dist/{field.zod-Da5S-hAo.d.ts → field.zod-dhbAw0SA.d.mts} +871 -1
- package/dist/hub/index.d.mts +1 -1
- package/dist/hub/index.d.ts +1 -1
- package/dist/hub/index.js +796 -707
- package/dist/hub/index.js.map +1 -1
- package/dist/hub/index.mjs +796 -707
- package/dist/hub/index.mjs.map +1 -1
- package/dist/{index-DSLwt2M_.d.ts → index-C67cfwmW.d.ts} +6 -355
- package/dist/{index-BMqjuD4e.d.ts → index-CH5zloR3.d.ts} +2 -2
- package/dist/{index-CIBOjiZG.d.mts → index-CU4m6noq.d.mts} +2 -2
- package/dist/{index-BeFe7iF_.d.mts → index-CyognKSZ.d.ts} +268 -1565
- package/dist/{index-CFaoWA3X.d.ts → index-DE_lJ11p.d.mts} +268 -1565
- package/dist/{index-C34qbBQr.d.mts → index-DLcySG7U.d.mts} +262 -241
- package/dist/{index-C34qbBQr.d.ts → index-DLcySG7U.d.ts} +262 -241
- package/dist/{index-BYtinxqf.d.mts → index-Dp7GFJ8V.d.mts} +6 -355
- package/dist/{index-D8XFyX0x.d.mts → index-Os7lItRe.d.mts} +108 -108
- package/dist/{index-D8XFyX0x.d.ts → index-Os7lItRe.d.ts} +108 -108
- package/dist/{index-CsF8m5Wj.d.mts → index-l6WIlmOD.d.mts} +39 -39
- package/dist/{index-CsF8m5Wj.d.ts → index-l6WIlmOD.d.ts} +39 -39
- package/dist/index.d.mts +162 -162
- package/dist/index.d.ts +162 -162
- package/dist/index.js +714 -672
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +714 -672
- package/dist/index.mjs.map +1 -1
- package/dist/kernel/index.d.mts +1 -1
- package/dist/kernel/index.d.ts +1 -1
- package/dist/kernel/index.js +705 -669
- package/dist/kernel/index.js.map +1 -1
- package/dist/kernel/index.mjs +704 -669
- package/dist/kernel/index.mjs.map +1 -1
- package/json-schema/api/CompileManifestResponse.json +6 -2
- package/json-schema/api/ExportRequest.json +419 -758
- package/json-schema/api/FindDataRequest.json +9 -0
- package/json-schema/data/JoinNode.json +9 -0
- package/json-schema/data/Mapping.json +9 -0
- package/json-schema/data/Query.json +9 -0
- package/json-schema/hub/ComposerResponse.json +6 -2
- package/json-schema/kernel/Manifest.json +6 -2
- package/json-schema/kernel/Plugin.json +28 -0
- package/package.json +1 -1
- package/dist/{index-iGrpxfqq.d.mts → index-D12rNohm.d.mts} +1 -1
- package/dist/{index-iGrpxfqq.d.ts → index-D12rNohm.d.ts} +1 -1
package/dist/index.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
|
|
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
|
|
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 =
|
|
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:
|
|
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:
|
|
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
|
-
* -
|
|
10969
|
-
* -
|
|
10970
|
-
* - driver:
|
|
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
|
|
10973
|
-
* -
|
|
10974
|
-
* - adapter: Host adapter - Runtime container (Express, Hono, Fastify, Serverless)
|
|
11063
|
+
* - objectql: Core engine
|
|
11064
|
+
* - adapter: Host adapter (Express, Fastify)
|
|
10975
11065
|
*/
|
|
10976
|
-
type:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
11032
|
-
title:
|
|
11033
|
-
properties:
|
|
11034
|
-
type:
|
|
11035
|
-
default:
|
|
11036
|
-
description:
|
|
11037
|
-
required:
|
|
11038
|
-
secret:
|
|
11039
|
-
enum:
|
|
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:
|
|
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:
|
|
11053
|
-
id:
|
|
11054
|
-
globs:
|
|
11055
|
-
description:
|
|
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:
|
|
11158
|
+
events: z63.array(z63.string()).optional().describe("Events this plugin listens to"),
|
|
11062
11159
|
/**
|
|
11063
11160
|
* Register UI Menus.
|
|
11064
11161
|
*/
|
|
11065
|
-
menus:
|
|
11066
|
-
id:
|
|
11067
|
-
label:
|
|
11068
|
-
command:
|
|
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:
|
|
11074
|
-
id:
|
|
11075
|
-
label:
|
|
11076
|
-
path:
|
|
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:
|
|
11083
|
-
locale:
|
|
11084
|
-
path:
|
|
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:
|
|
11091
|
-
name:
|
|
11092
|
-
label:
|
|
11093
|
-
description:
|
|
11094
|
-
input:
|
|
11095
|
-
output:
|
|
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:
|
|
11102
|
-
id:
|
|
11103
|
-
label:
|
|
11104
|
-
description:
|
|
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:
|
|
11111
|
-
name:
|
|
11112
|
-
label:
|
|
11113
|
-
description:
|
|
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:
|
|
11120
|
-
name:
|
|
11121
|
-
description:
|
|
11122
|
-
args:
|
|
11123
|
-
returnType:
|
|
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:
|
|
11131
|
-
object:
|
|
11132
|
-
records:
|
|
11133
|
-
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:
|
|
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
|
|
11156
|
-
var MetadataFormatSchema2 =
|
|
11157
|
-
var MetadataStatsSchema2 =
|
|
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:
|
|
11258
|
+
size: z64.number().int().min(0).describe("File size in bytes"),
|
|
11162
11259
|
/**
|
|
11163
11260
|
* Last modification timestamp
|
|
11164
11261
|
*/
|
|
11165
|
-
modifiedAt:
|
|
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:
|
|
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:
|
|
11275
|
+
path: z64.string().optional().describe("File system path"),
|
|
11179
11276
|
/**
|
|
11180
11277
|
* Additional metadata provider-specific properties
|
|
11181
11278
|
*/
|
|
11182
|
-
metadata:
|
|
11279
|
+
metadata: z64.record(z64.string(), z64.any()).optional().describe("Provider-specific metadata")
|
|
11183
11280
|
});
|
|
11184
|
-
var MetadataLoadOptionsSchema2 =
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
11299
|
+
validate: z64.boolean().default(true).describe("Validate against schema"),
|
|
11203
11300
|
/**
|
|
11204
11301
|
* Whether to use cache if available
|
|
11205
11302
|
*/
|
|
11206
|
-
useCache:
|
|
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:
|
|
11308
|
+
filter: z64.string().optional().describe("Filter predicate as string"),
|
|
11212
11309
|
/**
|
|
11213
11310
|
* Maximum number of items to load
|
|
11214
11311
|
*/
|
|
11215
|
-
limit:
|
|
11312
|
+
limit: z64.number().int().min(1).optional().describe("Maximum items to load"),
|
|
11216
11313
|
/**
|
|
11217
11314
|
* Recursively search subdirectories
|
|
11218
11315
|
*/
|
|
11219
|
-
recursive:
|
|
11316
|
+
recursive: z64.boolean().default(true).describe("Search subdirectories")
|
|
11220
11317
|
});
|
|
11221
|
-
var MetadataSaveOptionsSchema2 =
|
|
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:
|
|
11326
|
+
prettify: z64.boolean().default(true).describe("Format with indentation"),
|
|
11230
11327
|
/**
|
|
11231
11328
|
* Indentation size (spaces)
|
|
11232
11329
|
*/
|
|
11233
|
-
indent:
|
|
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:
|
|
11334
|
+
sortKeys: z64.boolean().default(false).describe("Sort object keys"),
|
|
11238
11335
|
/**
|
|
11239
11336
|
* Include default values in output
|
|
11240
11337
|
*/
|
|
11241
|
-
includeDefaults:
|
|
11338
|
+
includeDefaults: z64.boolean().default(false).describe("Include default values"),
|
|
11242
11339
|
/**
|
|
11243
11340
|
* Create backup before overwriting
|
|
11244
11341
|
*/
|
|
11245
|
-
backup:
|
|
11342
|
+
backup: z64.boolean().default(false).describe("Create backup file"),
|
|
11246
11343
|
/**
|
|
11247
11344
|
* Overwrite if exists
|
|
11248
11345
|
*/
|
|
11249
|
-
overwrite:
|
|
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:
|
|
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:
|
|
11354
|
+
path: z64.string().optional().describe("Custom output path")
|
|
11258
11355
|
});
|
|
11259
|
-
var MetadataExportOptionsSchema2 =
|
|
11356
|
+
var MetadataExportOptionsSchema2 = z64.object({
|
|
11260
11357
|
/**
|
|
11261
11358
|
* Output file path
|
|
11262
11359
|
*/
|
|
11263
|
-
output:
|
|
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:
|
|
11368
|
+
filter: z64.string().optional().describe("Filter items to export"),
|
|
11272
11369
|
/**
|
|
11273
11370
|
* Include statistics in export
|
|
11274
11371
|
*/
|
|
11275
|
-
includeStats:
|
|
11372
|
+
includeStats: z64.boolean().default(false).describe("Include metadata statistics"),
|
|
11276
11373
|
/**
|
|
11277
11374
|
* Compress output
|
|
11278
11375
|
*/
|
|
11279
|
-
compress:
|
|
11376
|
+
compress: z64.boolean().default(false).describe("Compress output (gzip)"),
|
|
11280
11377
|
/**
|
|
11281
11378
|
* Pretty print output
|
|
11282
11379
|
*/
|
|
11283
|
-
prettify:
|
|
11380
|
+
prettify: z64.boolean().default(true).describe("Pretty print output")
|
|
11284
11381
|
});
|
|
11285
|
-
var MetadataImportOptionsSchema2 =
|
|
11382
|
+
var MetadataImportOptionsSchema2 = z64.object({
|
|
11286
11383
|
/**
|
|
11287
11384
|
* Conflict resolution strategy
|
|
11288
11385
|
*/
|
|
11289
|
-
conflictResolution:
|
|
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:
|
|
11390
|
+
validate: z64.boolean().default(true).describe("Validate before import"),
|
|
11294
11391
|
/**
|
|
11295
11392
|
* Dry run (don't actually save)
|
|
11296
11393
|
*/
|
|
11297
|
-
dryRun:
|
|
11394
|
+
dryRun: z64.boolean().default(false).describe("Simulate import without saving"),
|
|
11298
11395
|
/**
|
|
11299
11396
|
* Continue on errors
|
|
11300
11397
|
*/
|
|
11301
|
-
continueOnError:
|
|
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:
|
|
11403
|
+
transform: z64.string().optional().describe("Transform items before import")
|
|
11307
11404
|
});
|
|
11308
|
-
var MetadataLoadResultSchema2 =
|
|
11405
|
+
var MetadataLoadResultSchema2 = z64.object({
|
|
11309
11406
|
/**
|
|
11310
11407
|
* Loaded data
|
|
11311
11408
|
*/
|
|
11312
|
-
data:
|
|
11409
|
+
data: z64.any().nullable().describe("Loaded metadata"),
|
|
11313
11410
|
/**
|
|
11314
11411
|
* Whether data came from cache (304 Not Modified)
|
|
11315
11412
|
*/
|
|
11316
|
-
fromCache:
|
|
11413
|
+
fromCache: z64.boolean().default(false).describe("Loaded from cache"),
|
|
11317
11414
|
/**
|
|
11318
11415
|
* Not modified (conditional request matched)
|
|
11319
11416
|
*/
|
|
11320
|
-
notModified:
|
|
11417
|
+
notModified: z64.boolean().default(false).describe("Not modified since last request"),
|
|
11321
11418
|
/**
|
|
11322
11419
|
* ETag of loaded data
|
|
11323
11420
|
*/
|
|
11324
|
-
etag:
|
|
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:
|
|
11429
|
+
loadTime: z64.number().min(0).optional().describe("Load duration in ms")
|
|
11333
11430
|
});
|
|
11334
|
-
var MetadataSaveResultSchema2 =
|
|
11431
|
+
var MetadataSaveResultSchema2 = z64.object({
|
|
11335
11432
|
/**
|
|
11336
11433
|
* Whether save was successful
|
|
11337
11434
|
*/
|
|
11338
|
-
success:
|
|
11435
|
+
success: z64.boolean().describe("Save successful"),
|
|
11339
11436
|
/**
|
|
11340
11437
|
* Path where file was saved
|
|
11341
11438
|
*/
|
|
11342
|
-
path:
|
|
11439
|
+
path: z64.string().describe("Output path"),
|
|
11343
11440
|
/**
|
|
11344
11441
|
* Generated ETag
|
|
11345
11442
|
*/
|
|
11346
|
-
etag:
|
|
11443
|
+
etag: z64.string().optional().describe("Generated entity tag"),
|
|
11347
11444
|
/**
|
|
11348
11445
|
* File size in bytes
|
|
11349
11446
|
*/
|
|
11350
|
-
size:
|
|
11447
|
+
size: z64.number().int().min(0).optional().describe("File size"),
|
|
11351
11448
|
/**
|
|
11352
11449
|
* Save time in milliseconds
|
|
11353
11450
|
*/
|
|
11354
|
-
saveTime:
|
|
11451
|
+
saveTime: z64.number().min(0).optional().describe("Save duration in ms"),
|
|
11355
11452
|
/**
|
|
11356
11453
|
* Backup path (if created)
|
|
11357
11454
|
*/
|
|
11358
|
-
backupPath:
|
|
11455
|
+
backupPath: z64.string().optional().describe("Backup file path")
|
|
11359
11456
|
});
|
|
11360
|
-
var MetadataWatchEventSchema2 =
|
|
11457
|
+
var MetadataWatchEventSchema2 = z64.object({
|
|
11361
11458
|
/**
|
|
11362
11459
|
* Event type
|
|
11363
11460
|
*/
|
|
11364
|
-
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:
|
|
11465
|
+
metadataType: z64.string().describe("Type of metadata"),
|
|
11369
11466
|
/**
|
|
11370
11467
|
* Item name/identifier
|
|
11371
11468
|
*/
|
|
11372
|
-
name:
|
|
11469
|
+
name: z64.string().describe("Item identifier"),
|
|
11373
11470
|
/**
|
|
11374
11471
|
* Full file path
|
|
11375
11472
|
*/
|
|
11376
|
-
path:
|
|
11473
|
+
path: z64.string().describe("File path"),
|
|
11377
11474
|
/**
|
|
11378
11475
|
* Loaded item data (for added/changed events)
|
|
11379
11476
|
*/
|
|
11380
|
-
data:
|
|
11477
|
+
data: z64.any().optional().describe("Item data"),
|
|
11381
11478
|
/**
|
|
11382
11479
|
* Timestamp
|
|
11383
11480
|
*/
|
|
11384
|
-
timestamp:
|
|
11481
|
+
timestamp: z64.date().describe("Event timestamp")
|
|
11385
11482
|
});
|
|
11386
|
-
var MetadataCollectionInfoSchema2 =
|
|
11483
|
+
var MetadataCollectionInfoSchema2 = z64.object({
|
|
11387
11484
|
/**
|
|
11388
11485
|
* Collection type (e.g., 'object', 'view', 'app')
|
|
11389
11486
|
*/
|
|
11390
|
-
type:
|
|
11487
|
+
type: z64.string().describe("Collection type"),
|
|
11391
11488
|
/**
|
|
11392
11489
|
* Total items in collection
|
|
11393
11490
|
*/
|
|
11394
|
-
count:
|
|
11491
|
+
count: z64.number().int().min(0).describe("Number of items"),
|
|
11395
11492
|
/**
|
|
11396
11493
|
* Formats found in collection
|
|
11397
11494
|
*/
|
|
11398
|
-
formats:
|
|
11495
|
+
formats: z64.array(MetadataFormatSchema2).describe("Formats in collection"),
|
|
11399
11496
|
/**
|
|
11400
11497
|
* Total size in bytes
|
|
11401
11498
|
*/
|
|
11402
|
-
totalSize:
|
|
11499
|
+
totalSize: z64.number().int().min(0).optional().describe("Total size in bytes"),
|
|
11403
11500
|
/**
|
|
11404
11501
|
* Last modified timestamp
|
|
11405
11502
|
*/
|
|
11406
|
-
lastModified:
|
|
11503
|
+
lastModified: z64.date().optional().describe("Last modification date"),
|
|
11407
11504
|
/**
|
|
11408
11505
|
* Collection location (path or URL)
|
|
11409
11506
|
*/
|
|
11410
|
-
location:
|
|
11507
|
+
location: z64.string().optional().describe("Collection location")
|
|
11411
11508
|
});
|
|
11412
|
-
var MetadataLoaderContractSchema2 =
|
|
11509
|
+
var MetadataLoaderContractSchema2 = z64.object({
|
|
11413
11510
|
/**
|
|
11414
11511
|
* Loader name/identifier
|
|
11415
11512
|
*/
|
|
11416
|
-
name:
|
|
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:
|
|
11517
|
+
protocol: z64.string().describe("Protocol identifier"),
|
|
11421
11518
|
/**
|
|
11422
11519
|
* Detailed capabilities
|
|
11423
11520
|
*/
|
|
11424
|
-
capabilities:
|
|
11425
|
-
read:
|
|
11426
|
-
write:
|
|
11427
|
-
watch:
|
|
11428
|
-
list:
|
|
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:
|
|
11530
|
+
supportedFormats: z64.array(MetadataFormatSchema2).describe("Supported formats"),
|
|
11434
11531
|
/**
|
|
11435
11532
|
* Whether loader supports watching for changes
|
|
11436
11533
|
*/
|
|
11437
|
-
supportsWatch:
|
|
11534
|
+
supportsWatch: z64.boolean().default(false).describe("Supports file watching"),
|
|
11438
11535
|
/**
|
|
11439
11536
|
* Whether loader supports saving
|
|
11440
11537
|
*/
|
|
11441
|
-
supportsWrite:
|
|
11538
|
+
supportsWrite: z64.boolean().default(true).describe("Supports write operations"),
|
|
11442
11539
|
/**
|
|
11443
11540
|
* Whether loader supports caching
|
|
11444
11541
|
*/
|
|
11445
|
-
supportsCache:
|
|
11542
|
+
supportsCache: z64.boolean().default(true).describe("Supports caching")
|
|
11446
11543
|
});
|
|
11447
|
-
var MetadataManagerConfigSchema2 =
|
|
11544
|
+
var MetadataManagerConfigSchema2 = z64.object({
|
|
11448
11545
|
/**
|
|
11449
11546
|
* Root directory for metadata (for filesystem loaders)
|
|
11450
11547
|
*/
|
|
11451
|
-
rootDir:
|
|
11548
|
+
rootDir: z64.string().optional().describe("Root directory path"),
|
|
11452
11549
|
/**
|
|
11453
11550
|
* Enabled serialization formats
|
|
11454
11551
|
*/
|
|
11455
|
-
formats:
|
|
11552
|
+
formats: z64.array(MetadataFormatSchema2).default(["typescript", "json", "yaml"]).describe("Enabled formats"),
|
|
11456
11553
|
/**
|
|
11457
11554
|
* Cache configuration
|
|
11458
11555
|
*/
|
|
11459
|
-
cache:
|
|
11460
|
-
enabled:
|
|
11461
|
-
ttl:
|
|
11462
|
-
maxSize:
|
|
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:
|
|
11564
|
+
watch: z64.boolean().default(false).describe("Enable file watching"),
|
|
11468
11565
|
/**
|
|
11469
11566
|
* Watch options
|
|
11470
11567
|
*/
|
|
11471
|
-
watchOptions:
|
|
11472
|
-
ignored:
|
|
11473
|
-
persistent:
|
|
11474
|
-
ignoreInitial:
|
|
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:
|
|
11480
|
-
strict:
|
|
11481
|
-
throwOnError:
|
|
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:
|
|
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
|
|
11491
|
-
var PluginHealthStatusSchema =
|
|
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 =
|
|
11602
|
+
var PluginHealthCheckSchema = z65.object({
|
|
11506
11603
|
/**
|
|
11507
11604
|
* Health check interval in milliseconds
|
|
11508
11605
|
*/
|
|
11509
|
-
interval:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
11634
|
+
restartBackoff: z65.enum(["fixed", "linear", "exponential"]).default("exponential").describe("Backoff strategy for restart delays")
|
|
11538
11635
|
});
|
|
11539
|
-
var PluginHealthReportSchema =
|
|
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:
|
|
11644
|
+
timestamp: z65.string().datetime(),
|
|
11548
11645
|
/**
|
|
11549
11646
|
* Human-readable message about health status
|
|
11550
11647
|
*/
|
|
11551
|
-
message:
|
|
11648
|
+
message: z65.string().optional(),
|
|
11552
11649
|
/**
|
|
11553
11650
|
* Detailed metrics
|
|
11554
11651
|
*/
|
|
11555
|
-
metrics:
|
|
11556
|
-
uptime:
|
|
11557
|
-
memoryUsage:
|
|
11558
|
-
cpuUsage:
|
|
11559
|
-
activeConnections:
|
|
11560
|
-
errorRate:
|
|
11561
|
-
responseTime:
|
|
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:
|
|
11567
|
-
name:
|
|
11568
|
-
status:
|
|
11569
|
-
message:
|
|
11570
|
-
data:
|
|
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:
|
|
11576
|
-
pluginId:
|
|
11672
|
+
dependencies: z65.array(z65.object({
|
|
11673
|
+
pluginId: z65.string(),
|
|
11577
11674
|
status: PluginHealthStatusSchema,
|
|
11578
|
-
message:
|
|
11675
|
+
message: z65.string().optional()
|
|
11579
11676
|
})).optional()
|
|
11580
11677
|
});
|
|
11581
|
-
var DistributedStateConfigSchema =
|
|
11678
|
+
var DistributedStateConfigSchema = z65.object({
|
|
11582
11679
|
/**
|
|
11583
11680
|
* Distributed cache provider
|
|
11584
11681
|
*/
|
|
11585
|
-
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:
|
|
11686
|
+
endpoints: z65.array(z65.string()).optional().describe("Backend connection endpoints"),
|
|
11590
11687
|
/**
|
|
11591
11688
|
* Key prefix for namespacing
|
|
11592
11689
|
*/
|
|
11593
|
-
keyPrefix:
|
|
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:
|
|
11694
|
+
ttl: z65.number().int().min(0).optional().describe("State expiration time in seconds"),
|
|
11598
11695
|
/**
|
|
11599
11696
|
* Authentication configuration
|
|
11600
11697
|
*/
|
|
11601
|
-
auth:
|
|
11602
|
-
username:
|
|
11603
|
-
password:
|
|
11604
|
-
token:
|
|
11605
|
-
certificate:
|
|
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:
|
|
11611
|
-
enabled:
|
|
11612
|
-
minReplicas:
|
|
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:
|
|
11714
|
+
customConfig: z65.record(z65.string(), z65.any()).optional().describe("Provider-specific configuration")
|
|
11618
11715
|
});
|
|
11619
|
-
var HotReloadConfigSchema =
|
|
11716
|
+
var HotReloadConfigSchema = z65.object({
|
|
11620
11717
|
/**
|
|
11621
11718
|
* Enable hot reload capability
|
|
11622
11719
|
*/
|
|
11623
|
-
enabled:
|
|
11720
|
+
enabled: z65.boolean().default(false),
|
|
11624
11721
|
/**
|
|
11625
11722
|
* Watch file patterns for auto-reload
|
|
11626
11723
|
*/
|
|
11627
|
-
watchPatterns:
|
|
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:
|
|
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:
|
|
11732
|
+
preserveState: z65.boolean().default(true).describe("Keep plugin state across reloads"),
|
|
11636
11733
|
/**
|
|
11637
11734
|
* State serialization strategy
|
|
11638
11735
|
*/
|
|
11639
|
-
stateStrategy:
|
|
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:
|
|
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:
|
|
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:
|
|
11752
|
+
afterReload: z65.array(z65.string()).optional().describe("Hook names to call after reload")
|
|
11656
11753
|
});
|
|
11657
|
-
var GracefulDegradationSchema =
|
|
11754
|
+
var GracefulDegradationSchema = z65.object({
|
|
11658
11755
|
/**
|
|
11659
11756
|
* Enable graceful degradation
|
|
11660
11757
|
*/
|
|
11661
|
-
enabled:
|
|
11758
|
+
enabled: z65.boolean().default(true),
|
|
11662
11759
|
/**
|
|
11663
11760
|
* Fallback mode when dependencies fail
|
|
11664
11761
|
*/
|
|
11665
|
-
fallbackMode:
|
|
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:
|
|
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:
|
|
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:
|
|
11689
|
-
feature:
|
|
11690
|
-
enabled:
|
|
11691
|
-
reason:
|
|
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:
|
|
11697
|
-
enabled:
|
|
11698
|
-
retryInterval:
|
|
11699
|
-
maxAttempts:
|
|
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 =
|
|
11799
|
+
var PluginUpdateStrategySchema = z65.object({
|
|
11703
11800
|
/**
|
|
11704
11801
|
* Update mode
|
|
11705
11802
|
*/
|
|
11706
|
-
mode:
|
|
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:
|
|
11720
|
-
major:
|
|
11721
|
-
minor:
|
|
11722
|
-
patch:
|
|
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:
|
|
11824
|
+
schedule: z65.object({
|
|
11728
11825
|
/**
|
|
11729
11826
|
* Cron expression for update window
|
|
11730
11827
|
*/
|
|
11731
|
-
cron:
|
|
11828
|
+
cron: z65.string().optional(),
|
|
11732
11829
|
/**
|
|
11733
11830
|
* Timezone for schedule
|
|
11734
11831
|
*/
|
|
11735
|
-
timezone:
|
|
11832
|
+
timezone: z65.string().default("UTC"),
|
|
11736
11833
|
/**
|
|
11737
11834
|
* Maintenance window duration in minutes
|
|
11738
11835
|
*/
|
|
11739
|
-
maintenanceWindow:
|
|
11836
|
+
maintenanceWindow: z65.number().int().min(1).default(60)
|
|
11740
11837
|
}).optional(),
|
|
11741
11838
|
/**
|
|
11742
11839
|
* Rollback configuration
|
|
11743
11840
|
*/
|
|
11744
|
-
rollback:
|
|
11745
|
-
enabled:
|
|
11841
|
+
rollback: z65.object({
|
|
11842
|
+
enabled: z65.boolean().default(true),
|
|
11746
11843
|
/**
|
|
11747
11844
|
* Automatic rollback on failure
|
|
11748
11845
|
*/
|
|
11749
|
-
automatic:
|
|
11846
|
+
automatic: z65.boolean().default(true),
|
|
11750
11847
|
/**
|
|
11751
11848
|
* Keep N previous versions for rollback
|
|
11752
11849
|
*/
|
|
11753
|
-
keepVersions:
|
|
11850
|
+
keepVersions: z65.number().int().min(1).default(3),
|
|
11754
11851
|
/**
|
|
11755
11852
|
* Rollback timeout in milliseconds
|
|
11756
11853
|
*/
|
|
11757
|
-
timeout:
|
|
11854
|
+
timeout: z65.number().int().min(1e3).default(3e4)
|
|
11758
11855
|
}).optional(),
|
|
11759
11856
|
/**
|
|
11760
11857
|
* Pre-update validation
|
|
11761
11858
|
*/
|
|
11762
|
-
validation:
|
|
11859
|
+
validation: z65.object({
|
|
11763
11860
|
/**
|
|
11764
11861
|
* Run compatibility checks before update
|
|
11765
11862
|
*/
|
|
11766
|
-
checkCompatibility:
|
|
11863
|
+
checkCompatibility: z65.boolean().default(true),
|
|
11767
11864
|
/**
|
|
11768
11865
|
* Run tests before applying update
|
|
11769
11866
|
*/
|
|
11770
|
-
runTests:
|
|
11867
|
+
runTests: z65.boolean().default(false),
|
|
11771
11868
|
/**
|
|
11772
11869
|
* Test suite to run
|
|
11773
11870
|
*/
|
|
11774
|
-
testSuite:
|
|
11871
|
+
testSuite: z65.string().optional()
|
|
11775
11872
|
}).optional()
|
|
11776
11873
|
});
|
|
11777
|
-
var PluginStateSnapshotSchema =
|
|
11874
|
+
var PluginStateSnapshotSchema = z65.object({
|
|
11778
11875
|
/**
|
|
11779
11876
|
* Plugin identifier
|
|
11780
11877
|
*/
|
|
11781
|
-
pluginId:
|
|
11878
|
+
pluginId: z65.string(),
|
|
11782
11879
|
/**
|
|
11783
11880
|
* Version at time of snapshot
|
|
11784
11881
|
*/
|
|
11785
|
-
version:
|
|
11882
|
+
version: z65.string(),
|
|
11786
11883
|
/**
|
|
11787
11884
|
* Snapshot timestamp
|
|
11788
11885
|
*/
|
|
11789
|
-
timestamp:
|
|
11886
|
+
timestamp: z65.string().datetime(),
|
|
11790
11887
|
/**
|
|
11791
11888
|
* Serialized state data
|
|
11792
11889
|
*/
|
|
11793
|
-
state:
|
|
11890
|
+
state: z65.record(z65.string(), z65.any()),
|
|
11794
11891
|
/**
|
|
11795
11892
|
* State metadata
|
|
11796
11893
|
*/
|
|
11797
|
-
metadata:
|
|
11798
|
-
checksum:
|
|
11799
|
-
compressed:
|
|
11800
|
-
encryption:
|
|
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 =
|
|
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:
|
|
11824
|
-
maxMemory:
|
|
11825
|
-
maxCpu:
|
|
11826
|
-
maxConnections:
|
|
11827
|
-
timeout:
|
|
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:
|
|
11833
|
-
enableMetrics:
|
|
11834
|
-
enableTracing:
|
|
11835
|
-
enableProfiling:
|
|
11836
|
-
metricsInterval:
|
|
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
|
|
11842
|
-
var EventPhaseSchema =
|
|
11843
|
-
var PluginEventBaseSchema =
|
|
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:
|
|
11944
|
+
pluginName: z66.string().describe("Name of the plugin"),
|
|
11848
11945
|
/**
|
|
11849
11946
|
* Event timestamp (Unix milliseconds)
|
|
11850
11947
|
*/
|
|
11851
|
-
timestamp:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
11978
|
+
errorMessage: z66.string().optional().describe("Error message"),
|
|
11882
11979
|
/**
|
|
11883
11980
|
* Error stack trace (for debugging)
|
|
11884
11981
|
*/
|
|
11885
|
-
errorStack:
|
|
11982
|
+
errorStack: z66.string().optional().describe("Error stack trace")
|
|
11886
11983
|
});
|
|
11887
|
-
var ServiceRegisteredEventSchema =
|
|
11984
|
+
var ServiceRegisteredEventSchema = z66.object({
|
|
11888
11985
|
/**
|
|
11889
11986
|
* Service name
|
|
11890
11987
|
*/
|
|
11891
|
-
serviceName:
|
|
11988
|
+
serviceName: z66.string().describe("Name of the registered service"),
|
|
11892
11989
|
/**
|
|
11893
11990
|
* Event timestamp (Unix milliseconds)
|
|
11894
11991
|
*/
|
|
11895
|
-
timestamp:
|
|
11992
|
+
timestamp: z66.number().int().describe("Unix timestamp in milliseconds"),
|
|
11896
11993
|
/**
|
|
11897
11994
|
* Service type (optional)
|
|
11898
11995
|
*/
|
|
11899
|
-
serviceType:
|
|
11996
|
+
serviceType: z66.string().optional().describe("Type or interface name of the service")
|
|
11900
11997
|
});
|
|
11901
|
-
var ServiceUnregisteredEventSchema =
|
|
11998
|
+
var ServiceUnregisteredEventSchema = z66.object({
|
|
11902
11999
|
/**
|
|
11903
12000
|
* Service name
|
|
11904
12001
|
*/
|
|
11905
|
-
serviceName:
|
|
12002
|
+
serviceName: z66.string().describe("Name of the unregistered service"),
|
|
11906
12003
|
/**
|
|
11907
12004
|
* Event timestamp (Unix milliseconds)
|
|
11908
12005
|
*/
|
|
11909
|
-
timestamp:
|
|
12006
|
+
timestamp: z66.number().int().describe("Unix timestamp in milliseconds")
|
|
11910
12007
|
});
|
|
11911
|
-
var HookRegisteredEventSchema =
|
|
12008
|
+
var HookRegisteredEventSchema = z66.object({
|
|
11912
12009
|
/**
|
|
11913
12010
|
* Hook name
|
|
11914
12011
|
*/
|
|
11915
|
-
hookName:
|
|
12012
|
+
hookName: z66.string().describe("Name of the hook"),
|
|
11916
12013
|
/**
|
|
11917
12014
|
* Event timestamp (Unix milliseconds)
|
|
11918
12015
|
*/
|
|
11919
|
-
timestamp:
|
|
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:
|
|
12020
|
+
handlerCount: z66.number().int().min(0).describe("Number of handlers registered for this hook")
|
|
11924
12021
|
});
|
|
11925
|
-
var HookTriggeredEventSchema =
|
|
12022
|
+
var HookTriggeredEventSchema = z66.object({
|
|
11926
12023
|
/**
|
|
11927
12024
|
* Hook name
|
|
11928
12025
|
*/
|
|
11929
|
-
hookName:
|
|
12026
|
+
hookName: z66.string().describe("Name of the hook"),
|
|
11930
12027
|
/**
|
|
11931
12028
|
* Event timestamp (Unix milliseconds)
|
|
11932
12029
|
*/
|
|
11933
|
-
timestamp:
|
|
12030
|
+
timestamp: z66.number().int().describe("Unix timestamp in milliseconds"),
|
|
11934
12031
|
/**
|
|
11935
12032
|
* Arguments passed to the hook
|
|
11936
12033
|
*/
|
|
11937
|
-
args:
|
|
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:
|
|
12038
|
+
handlerCount: z66.number().int().min(0).optional().describe("Number of handlers that will handle this event")
|
|
11942
12039
|
});
|
|
11943
|
-
var KernelEventBaseSchema =
|
|
12040
|
+
var KernelEventBaseSchema = z66.object({
|
|
11944
12041
|
/**
|
|
11945
12042
|
* Event timestamp (Unix milliseconds)
|
|
11946
12043
|
*/
|
|
11947
|
-
timestamp:
|
|
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:
|
|
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:
|
|
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:
|
|
12060
|
+
reason: z66.string().optional().describe("Reason for kernel shutdown")
|
|
11964
12061
|
});
|
|
11965
|
-
var PluginLifecycleEventType =
|
|
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
|
|
11989
|
-
var PermissionScopeSchema =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
12156
|
+
var PermissionSchema = z67.object({
|
|
12060
12157
|
/**
|
|
12061
12158
|
* Permission identifier
|
|
12062
12159
|
*/
|
|
12063
|
-
id:
|
|
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:
|
|
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:
|
|
12176
|
+
filter: z67.object({
|
|
12080
12177
|
/**
|
|
12081
12178
|
* Specific resource IDs
|
|
12082
12179
|
*/
|
|
12083
|
-
resourceIds:
|
|
12180
|
+
resourceIds: z67.array(z67.string()).optional(),
|
|
12084
12181
|
/**
|
|
12085
12182
|
* Filter condition
|
|
12086
12183
|
*/
|
|
12087
|
-
condition:
|
|
12184
|
+
condition: z67.string().optional().describe("Filter expression (e.g., owner = currentUser)"),
|
|
12088
12185
|
/**
|
|
12089
12186
|
* Field-level access
|
|
12090
12187
|
*/
|
|
12091
|
-
fields:
|
|
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:
|
|
12193
|
+
description: z67.string(),
|
|
12097
12194
|
/**
|
|
12098
12195
|
* Whether this permission is required or optional
|
|
12099
12196
|
*/
|
|
12100
|
-
required:
|
|
12197
|
+
required: z67.boolean().default(true),
|
|
12101
12198
|
/**
|
|
12102
12199
|
* Justification for permission
|
|
12103
12200
|
*/
|
|
12104
|
-
justification:
|
|
12201
|
+
justification: z67.string().optional().describe("Why this permission is needed")
|
|
12105
12202
|
});
|
|
12106
|
-
var PermissionSetSchema2 =
|
|
12203
|
+
var PermissionSetSchema2 = z67.object({
|
|
12107
12204
|
/**
|
|
12108
12205
|
* All permissions required by plugin
|
|
12109
12206
|
*/
|
|
12110
|
-
permissions:
|
|
12207
|
+
permissions: z67.array(PermissionSchema),
|
|
12111
12208
|
/**
|
|
12112
12209
|
* Permission groups for easier management
|
|
12113
12210
|
*/
|
|
12114
|
-
groups:
|
|
12115
|
-
name:
|
|
12116
|
-
description:
|
|
12117
|
-
permissions:
|
|
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:
|
|
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 =
|
|
12230
|
+
var RuntimeConfigSchema = z67.object({
|
|
12134
12231
|
/**
|
|
12135
12232
|
* Runtime engine type
|
|
12136
12233
|
*/
|
|
12137
|
-
engine:
|
|
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:
|
|
12247
|
+
engineConfig: z67.object({
|
|
12151
12248
|
/**
|
|
12152
12249
|
* WASM-specific settings (when engine is "wasm")
|
|
12153
12250
|
*/
|
|
12154
|
-
wasm:
|
|
12251
|
+
wasm: z67.object({
|
|
12155
12252
|
/**
|
|
12156
12253
|
* Maximum memory pages (64KB per page)
|
|
12157
12254
|
*/
|
|
12158
|
-
maxMemoryPages:
|
|
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:
|
|
12259
|
+
instructionLimit: z67.number().int().min(1).optional().describe("Maximum instructions before timeout"),
|
|
12163
12260
|
/**
|
|
12164
12261
|
* Enable SIMD instructions
|
|
12165
12262
|
*/
|
|
12166
|
-
enableSimd:
|
|
12263
|
+
enableSimd: z67.boolean().default(false).describe("Enable WebAssembly SIMD support"),
|
|
12167
12264
|
/**
|
|
12168
12265
|
* Enable threads
|
|
12169
12266
|
*/
|
|
12170
|
-
enableThreads:
|
|
12267
|
+
enableThreads: z67.boolean().default(false).describe("Enable WebAssembly threads"),
|
|
12171
12268
|
/**
|
|
12172
12269
|
* Enable bulk memory operations
|
|
12173
12270
|
*/
|
|
12174
|
-
enableBulkMemory:
|
|
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:
|
|
12276
|
+
container: z67.object({
|
|
12180
12277
|
/**
|
|
12181
12278
|
* Container image
|
|
12182
12279
|
*/
|
|
12183
|
-
image:
|
|
12280
|
+
image: z67.string().optional().describe("Container image to use"),
|
|
12184
12281
|
/**
|
|
12185
12282
|
* Container runtime
|
|
12186
12283
|
*/
|
|
12187
|
-
runtime:
|
|
12284
|
+
runtime: z67.enum(["docker", "podman", "containerd"]).default("docker"),
|
|
12188
12285
|
/**
|
|
12189
12286
|
* Resource limits
|
|
12190
12287
|
*/
|
|
12191
|
-
resources:
|
|
12192
|
-
cpuLimit:
|
|
12193
|
-
memoryLimit:
|
|
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:
|
|
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:
|
|
12300
|
+
v8Isolate: z67.object({
|
|
12204
12301
|
/**
|
|
12205
12302
|
* Heap size limit in MB
|
|
12206
12303
|
*/
|
|
12207
|
-
heapSizeMb:
|
|
12304
|
+
heapSizeMb: z67.number().int().min(1).optional(),
|
|
12208
12305
|
/**
|
|
12209
12306
|
* Enable snapshot
|
|
12210
12307
|
*/
|
|
12211
|
-
enableSnapshot:
|
|
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:
|
|
12314
|
+
resourceLimits: z67.object({
|
|
12218
12315
|
/**
|
|
12219
12316
|
* Maximum memory in bytes
|
|
12220
12317
|
*/
|
|
12221
|
-
maxMemory:
|
|
12318
|
+
maxMemory: z67.number().int().optional().describe("Maximum memory allocation"),
|
|
12222
12319
|
/**
|
|
12223
12320
|
* Maximum CPU percentage
|
|
12224
12321
|
*/
|
|
12225
|
-
maxCpu:
|
|
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:
|
|
12326
|
+
timeout: z67.number().int().min(0).optional().describe("Maximum execution time")
|
|
12230
12327
|
}).optional()
|
|
12231
12328
|
});
|
|
12232
|
-
var SandboxConfigSchema =
|
|
12329
|
+
var SandboxConfigSchema = z67.object({
|
|
12233
12330
|
/**
|
|
12234
12331
|
* Enable sandboxing
|
|
12235
12332
|
*/
|
|
12236
|
-
enabled:
|
|
12333
|
+
enabled: z67.boolean().default(true),
|
|
12237
12334
|
/**
|
|
12238
12335
|
* Sandboxing level
|
|
12239
12336
|
*/
|
|
12240
|
-
level:
|
|
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:
|
|
12260
|
-
mode:
|
|
12261
|
-
allowedPaths:
|
|
12262
|
-
deniedPaths:
|
|
12263
|
-
maxFileSize:
|
|
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:
|
|
12269
|
-
mode:
|
|
12270
|
-
allowedHosts:
|
|
12271
|
-
deniedHosts:
|
|
12272
|
-
allowedPorts:
|
|
12273
|
-
maxConnections:
|
|
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:
|
|
12279
|
-
allowSpawn:
|
|
12280
|
-
allowedCommands:
|
|
12281
|
-
timeout:
|
|
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:
|
|
12287
|
-
maxHeap:
|
|
12288
|
-
maxStack:
|
|
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:
|
|
12294
|
-
maxCpuPercent:
|
|
12295
|
-
maxThreads:
|
|
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:
|
|
12301
|
-
mode:
|
|
12302
|
-
allowedVars:
|
|
12303
|
-
deniedVars:
|
|
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 =
|
|
12403
|
+
var SecurityVulnerabilitySchema = z67.object({
|
|
12307
12404
|
/**
|
|
12308
12405
|
* CVE identifier
|
|
12309
12406
|
*/
|
|
12310
|
-
cve:
|
|
12407
|
+
cve: z67.string().optional(),
|
|
12311
12408
|
/**
|
|
12312
12409
|
* Vulnerability identifier
|
|
12313
12410
|
*/
|
|
12314
|
-
id:
|
|
12411
|
+
id: z67.string(),
|
|
12315
12412
|
/**
|
|
12316
12413
|
* Severity level
|
|
12317
12414
|
*/
|
|
12318
|
-
severity:
|
|
12415
|
+
severity: z67.enum(["critical", "high", "medium", "low", "info"]),
|
|
12319
12416
|
/**
|
|
12320
12417
|
* Category (e.g., SAST, DAST, Dependency)
|
|
12321
12418
|
*/
|
|
12322
|
-
category:
|
|
12419
|
+
category: z67.string().optional(),
|
|
12323
12420
|
/**
|
|
12324
12421
|
* Title
|
|
12325
12422
|
*/
|
|
12326
|
-
title:
|
|
12423
|
+
title: z67.string(),
|
|
12327
12424
|
/**
|
|
12328
12425
|
* Location of the vulnerability
|
|
12329
12426
|
*/
|
|
12330
|
-
location:
|
|
12427
|
+
location: z67.string().optional(),
|
|
12331
12428
|
/**
|
|
12332
12429
|
* Remediation steps
|
|
12333
12430
|
*/
|
|
12334
|
-
remediation:
|
|
12431
|
+
remediation: z67.string().optional(),
|
|
12335
12432
|
/**
|
|
12336
12433
|
* Description
|
|
12337
12434
|
*/
|
|
12338
|
-
description:
|
|
12435
|
+
description: z67.string(),
|
|
12339
12436
|
/**
|
|
12340
12437
|
* Affected versions
|
|
12341
12438
|
*/
|
|
12342
|
-
affectedVersions:
|
|
12439
|
+
affectedVersions: z67.array(z67.string()),
|
|
12343
12440
|
/**
|
|
12344
12441
|
* Fixed in versions
|
|
12345
12442
|
*/
|
|
12346
|
-
fixedIn:
|
|
12443
|
+
fixedIn: z67.array(z67.string()).optional(),
|
|
12347
12444
|
/**
|
|
12348
12445
|
* CVSS score
|
|
12349
12446
|
*/
|
|
12350
|
-
cvssScore:
|
|
12447
|
+
cvssScore: z67.number().min(0).max(10).optional(),
|
|
12351
12448
|
/**
|
|
12352
12449
|
* Exploit availability
|
|
12353
12450
|
*/
|
|
12354
|
-
exploitAvailable:
|
|
12451
|
+
exploitAvailable: z67.boolean().default(false),
|
|
12355
12452
|
/**
|
|
12356
12453
|
* Patch available
|
|
12357
12454
|
*/
|
|
12358
|
-
patchAvailable:
|
|
12455
|
+
patchAvailable: z67.boolean().default(false),
|
|
12359
12456
|
/**
|
|
12360
12457
|
* Workaround
|
|
12361
12458
|
*/
|
|
12362
|
-
workaround:
|
|
12459
|
+
workaround: z67.string().optional(),
|
|
12363
12460
|
/**
|
|
12364
12461
|
* References
|
|
12365
12462
|
*/
|
|
12366
|
-
references:
|
|
12463
|
+
references: z67.array(z67.string()).optional(),
|
|
12367
12464
|
/**
|
|
12368
12465
|
* Discovered date
|
|
12369
12466
|
*/
|
|
12370
|
-
discoveredDate:
|
|
12467
|
+
discoveredDate: z67.string().datetime().optional(),
|
|
12371
12468
|
/**
|
|
12372
12469
|
* Published date
|
|
12373
12470
|
*/
|
|
12374
|
-
publishedDate:
|
|
12471
|
+
publishedDate: z67.string().datetime().optional()
|
|
12375
12472
|
});
|
|
12376
|
-
var SecurityScanResultSchema =
|
|
12473
|
+
var SecurityScanResultSchema = z67.object({
|
|
12377
12474
|
/**
|
|
12378
12475
|
* Scan timestamp
|
|
12379
12476
|
*/
|
|
12380
|
-
timestamp:
|
|
12477
|
+
timestamp: z67.string().datetime(),
|
|
12381
12478
|
/**
|
|
12382
12479
|
* Scanner information
|
|
12383
12480
|
*/
|
|
12384
|
-
scanner:
|
|
12385
|
-
name:
|
|
12386
|
-
version:
|
|
12481
|
+
scanner: z67.object({
|
|
12482
|
+
name: z67.string(),
|
|
12483
|
+
version: z67.string()
|
|
12387
12484
|
}),
|
|
12388
12485
|
/**
|
|
12389
12486
|
* Overall status
|
|
12390
12487
|
*/
|
|
12391
|
-
status:
|
|
12488
|
+
status: z67.enum(["passed", "failed", "warning"]),
|
|
12392
12489
|
/**
|
|
12393
12490
|
* Vulnerabilities found
|
|
12394
12491
|
*/
|
|
12395
|
-
vulnerabilities:
|
|
12492
|
+
vulnerabilities: z67.array(SecurityVulnerabilitySchema).optional(),
|
|
12396
12493
|
/**
|
|
12397
12494
|
* Code quality issues
|
|
12398
12495
|
*/
|
|
12399
|
-
codeIssues:
|
|
12400
|
-
severity:
|
|
12401
|
-
type:
|
|
12402
|
-
file:
|
|
12403
|
-
line:
|
|
12404
|
-
message:
|
|
12405
|
-
suggestion:
|
|
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:
|
|
12411
|
-
package:
|
|
12412
|
-
version:
|
|
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:
|
|
12419
|
-
status:
|
|
12420
|
-
issues:
|
|
12421
|
-
package:
|
|
12422
|
-
license:
|
|
12423
|
-
reason:
|
|
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:
|
|
12430
|
-
totalVulnerabilities:
|
|
12431
|
-
criticalCount:
|
|
12432
|
-
highCount:
|
|
12433
|
-
mediumCount:
|
|
12434
|
-
lowCount:
|
|
12435
|
-
infoCount:
|
|
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 =
|
|
12535
|
+
var SecurityPolicySchema = z67.object({
|
|
12439
12536
|
/**
|
|
12440
12537
|
* Content Security Policy
|
|
12441
12538
|
*/
|
|
12442
|
-
csp:
|
|
12443
|
-
directives:
|
|
12444
|
-
reportOnly:
|
|
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:
|
|
12450
|
-
allowedOrigins:
|
|
12451
|
-
allowedMethods:
|
|
12452
|
-
allowedHeaders:
|
|
12453
|
-
allowCredentials:
|
|
12454
|
-
maxAge:
|
|
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:
|
|
12460
|
-
enabled:
|
|
12461
|
-
maxRequests:
|
|
12462
|
-
windowMs:
|
|
12463
|
-
strategy:
|
|
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:
|
|
12469
|
-
required:
|
|
12470
|
-
methods:
|
|
12471
|
-
tokenExpiration:
|
|
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:
|
|
12477
|
-
dataAtRest:
|
|
12478
|
-
dataInTransit:
|
|
12479
|
-
algorithm:
|
|
12480
|
-
minKeyLength:
|
|
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:
|
|
12486
|
-
enabled:
|
|
12487
|
-
events:
|
|
12488
|
-
retention:
|
|
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 =
|
|
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 =
|
|
12600
|
+
var PluginSecurityManifestSchema = z67.object({
|
|
12504
12601
|
/**
|
|
12505
12602
|
* Plugin identifier
|
|
12506
12603
|
*/
|
|
12507
|
-
pluginId:
|
|
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:
|
|
12624
|
+
scanResults: z67.array(SecurityScanResultSchema).optional(),
|
|
12528
12625
|
/**
|
|
12529
12626
|
* Known vulnerabilities
|
|
12530
12627
|
*/
|
|
12531
|
-
vulnerabilities:
|
|
12628
|
+
vulnerabilities: z67.array(SecurityVulnerabilitySchema).optional(),
|
|
12532
12629
|
/**
|
|
12533
12630
|
* Code signing
|
|
12534
12631
|
*/
|
|
12535
|
-
codeSigning:
|
|
12536
|
-
signed:
|
|
12537
|
-
signature:
|
|
12538
|
-
certificate:
|
|
12539
|
-
algorithm:
|
|
12540
|
-
timestamp:
|
|
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:
|
|
12546
|
-
name:
|
|
12547
|
-
issuer:
|
|
12548
|
-
issuedDate:
|
|
12549
|
-
expiryDate:
|
|
12550
|
-
certificateUrl:
|
|
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:
|
|
12556
|
-
email:
|
|
12557
|
-
url:
|
|
12558
|
-
pgpKey:
|
|
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:
|
|
12564
|
-
policyUrl:
|
|
12565
|
-
responseTime:
|
|
12566
|
-
bugBounty:
|
|
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
|
|
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 =
|
|
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:
|
|
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:
|
|
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 =
|
|
12600
|
-
name:
|
|
12601
|
-
files:
|
|
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:
|
|
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 =
|
|
12611
|
-
root:
|
|
12612
|
-
files:
|
|
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:
|
|
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
|
|
12632
|
-
var ValidationErrorSchema =
|
|
12728
|
+
import { z as z69 } from "zod";
|
|
12729
|
+
var ValidationErrorSchema = z69.object({
|
|
12633
12730
|
/**
|
|
12634
12731
|
* Field that failed validation
|
|
12635
12732
|
*/
|
|
12636
|
-
field:
|
|
12733
|
+
field: z69.string().describe("Field name that failed validation"),
|
|
12637
12734
|
/**
|
|
12638
12735
|
* Human-readable error message
|
|
12639
12736
|
*/
|
|
12640
|
-
message:
|
|
12737
|
+
message: z69.string().describe("Human-readable error message"),
|
|
12641
12738
|
/**
|
|
12642
12739
|
* Machine-readable error code (optional)
|
|
12643
12740
|
*/
|
|
12644
|
-
code:
|
|
12741
|
+
code: z69.string().optional().describe("Machine-readable error code")
|
|
12645
12742
|
});
|
|
12646
|
-
var ValidationWarningSchema =
|
|
12743
|
+
var ValidationWarningSchema = z69.object({
|
|
12647
12744
|
/**
|
|
12648
12745
|
* Field with warning
|
|
12649
12746
|
*/
|
|
12650
|
-
field:
|
|
12747
|
+
field: z69.string().describe("Field name with warning"),
|
|
12651
12748
|
/**
|
|
12652
12749
|
* Human-readable warning message
|
|
12653
12750
|
*/
|
|
12654
|
-
message:
|
|
12751
|
+
message: z69.string().describe("Human-readable warning message"),
|
|
12655
12752
|
/**
|
|
12656
12753
|
* Machine-readable warning code (optional)
|
|
12657
12754
|
*/
|
|
12658
|
-
code:
|
|
12755
|
+
code: z69.string().optional().describe("Machine-readable warning code")
|
|
12659
12756
|
});
|
|
12660
|
-
var ValidationResultSchema =
|
|
12757
|
+
var ValidationResultSchema = z69.object({
|
|
12661
12758
|
/**
|
|
12662
12759
|
* Whether validation passed
|
|
12663
12760
|
*/
|
|
12664
|
-
valid:
|
|
12761
|
+
valid: z69.boolean().describe("Whether the plugin passed validation"),
|
|
12665
12762
|
/**
|
|
12666
12763
|
* Validation errors (if any)
|
|
12667
12764
|
*/
|
|
12668
|
-
errors:
|
|
12765
|
+
errors: z69.array(ValidationErrorSchema).optional().describe("Validation errors"),
|
|
12669
12766
|
/**
|
|
12670
12767
|
* Validation warnings (non-fatal issues)
|
|
12671
12768
|
*/
|
|
12672
|
-
warnings:
|
|
12769
|
+
warnings: z69.array(ValidationWarningSchema).optional().describe("Validation warnings")
|
|
12673
12770
|
});
|
|
12674
|
-
var PluginMetadataSchema =
|
|
12771
|
+
var PluginMetadataSchema = z69.object({
|
|
12675
12772
|
/**
|
|
12676
12773
|
* Unique plugin identifier (snake_case)
|
|
12677
12774
|
*/
|
|
12678
|
-
name:
|
|
12775
|
+
name: z69.string().min(1).describe("Unique plugin identifier"),
|
|
12679
12776
|
/**
|
|
12680
12777
|
* Plugin version (semver)
|
|
12681
12778
|
*/
|
|
12682
|
-
version:
|
|
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:
|
|
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:
|
|
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
|
|
12698
|
-
var SemanticVersionSchema =
|
|
12699
|
-
major:
|
|
12700
|
-
minor:
|
|
12701
|
-
patch:
|
|
12702
|
-
preRelease:
|
|
12703
|
-
build:
|
|
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 =
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
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 =
|
|
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 =
|
|
12826
|
+
var BreakingChangeSchema = z70.object({
|
|
12730
12827
|
/**
|
|
12731
12828
|
* Version where the change was introduced
|
|
12732
12829
|
*/
|
|
12733
|
-
introducedIn:
|
|
12830
|
+
introducedIn: z70.string().describe("Version that introduced this breaking change"),
|
|
12734
12831
|
/**
|
|
12735
12832
|
* Type of breaking change
|
|
12736
12833
|
*/
|
|
12737
|
-
type:
|
|
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:
|
|
12853
|
+
description: z70.string(),
|
|
12757
12854
|
/**
|
|
12758
12855
|
* Migration guide
|
|
12759
12856
|
*/
|
|
12760
|
-
migrationGuide:
|
|
12857
|
+
migrationGuide: z70.string().optional().describe("How to migrate from old to new"),
|
|
12761
12858
|
/**
|
|
12762
12859
|
* Deprecated in version
|
|
12763
12860
|
*/
|
|
12764
|
-
deprecatedIn:
|
|
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:
|
|
12865
|
+
removedIn: z70.string().optional().describe("Version where old API will be removed"),
|
|
12769
12866
|
/**
|
|
12770
12867
|
* Automated migration available
|
|
12771
12868
|
*/
|
|
12772
|
-
automatedMigration:
|
|
12869
|
+
automatedMigration: z70.boolean().default(false).describe("Whether automated migration tool is available"),
|
|
12773
12870
|
/**
|
|
12774
12871
|
* Impact severity
|
|
12775
12872
|
*/
|
|
12776
|
-
severity:
|
|
12873
|
+
severity: z70.enum(["critical", "major", "minor"]).describe("Impact severity")
|
|
12777
12874
|
});
|
|
12778
|
-
var DeprecationNoticeSchema =
|
|
12875
|
+
var DeprecationNoticeSchema = z70.object({
|
|
12779
12876
|
/**
|
|
12780
12877
|
* Feature or API being deprecated
|
|
12781
12878
|
*/
|
|
12782
|
-
feature:
|
|
12879
|
+
feature: z70.string().describe("Deprecated feature identifier"),
|
|
12783
12880
|
/**
|
|
12784
12881
|
* Version when deprecated
|
|
12785
12882
|
*/
|
|
12786
|
-
deprecatedIn:
|
|
12883
|
+
deprecatedIn: z70.string(),
|
|
12787
12884
|
/**
|
|
12788
12885
|
* Planned removal version
|
|
12789
12886
|
*/
|
|
12790
|
-
removeIn:
|
|
12887
|
+
removeIn: z70.string().optional(),
|
|
12791
12888
|
/**
|
|
12792
12889
|
* Reason for deprecation
|
|
12793
12890
|
*/
|
|
12794
|
-
reason:
|
|
12891
|
+
reason: z70.string(),
|
|
12795
12892
|
/**
|
|
12796
12893
|
* Recommended alternative
|
|
12797
12894
|
*/
|
|
12798
|
-
alternative:
|
|
12895
|
+
alternative: z70.string().optional().describe("What to use instead"),
|
|
12799
12896
|
/**
|
|
12800
12897
|
* Migration path
|
|
12801
12898
|
*/
|
|
12802
|
-
migrationPath:
|
|
12899
|
+
migrationPath: z70.string().optional().describe("How to migrate to alternative")
|
|
12803
12900
|
});
|
|
12804
|
-
var CompatibilityMatrixEntrySchema =
|
|
12901
|
+
var CompatibilityMatrixEntrySchema = z70.object({
|
|
12805
12902
|
/**
|
|
12806
12903
|
* Source version
|
|
12807
12904
|
*/
|
|
12808
|
-
from:
|
|
12905
|
+
from: z70.string().describe("Version being upgraded from"),
|
|
12809
12906
|
/**
|
|
12810
12907
|
* Target version
|
|
12811
12908
|
*/
|
|
12812
|
-
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:
|
|
12917
|
+
breakingChanges: z70.array(BreakingChangeSchema).optional(),
|
|
12821
12918
|
/**
|
|
12822
12919
|
* Migration required
|
|
12823
12920
|
*/
|
|
12824
|
-
migrationRequired:
|
|
12921
|
+
migrationRequired: z70.boolean().default(false),
|
|
12825
12922
|
/**
|
|
12826
12923
|
* Migration complexity
|
|
12827
12924
|
*/
|
|
12828
|
-
migrationComplexity:
|
|
12925
|
+
migrationComplexity: z70.enum(["trivial", "simple", "moderate", "complex", "major"]).optional(),
|
|
12829
12926
|
/**
|
|
12830
12927
|
* Estimated migration time in hours
|
|
12831
12928
|
*/
|
|
12832
|
-
estimatedMigrationTime:
|
|
12929
|
+
estimatedMigrationTime: z70.number().optional(),
|
|
12833
12930
|
/**
|
|
12834
12931
|
* Migration script available
|
|
12835
12932
|
*/
|
|
12836
|
-
migrationScript:
|
|
12933
|
+
migrationScript: z70.string().optional().describe("Path to migration script"),
|
|
12837
12934
|
/**
|
|
12838
12935
|
* Test coverage for migration
|
|
12839
12936
|
*/
|
|
12840
|
-
testCoverage:
|
|
12937
|
+
testCoverage: z70.number().min(0).max(100).optional().describe("Percentage of migration covered by tests")
|
|
12841
12938
|
});
|
|
12842
|
-
var PluginCompatibilityMatrixSchema =
|
|
12939
|
+
var PluginCompatibilityMatrixSchema = z70.object({
|
|
12843
12940
|
/**
|
|
12844
12941
|
* Plugin identifier
|
|
12845
12942
|
*/
|
|
12846
|
-
pluginId:
|
|
12943
|
+
pluginId: z70.string(),
|
|
12847
12944
|
/**
|
|
12848
12945
|
* Current version
|
|
12849
12946
|
*/
|
|
12850
|
-
currentVersion:
|
|
12947
|
+
currentVersion: z70.string(),
|
|
12851
12948
|
/**
|
|
12852
12949
|
* Compatibility entries
|
|
12853
12950
|
*/
|
|
12854
|
-
compatibilityMatrix:
|
|
12951
|
+
compatibilityMatrix: z70.array(CompatibilityMatrixEntrySchema),
|
|
12855
12952
|
/**
|
|
12856
12953
|
* Supported versions
|
|
12857
12954
|
*/
|
|
12858
|
-
supportedVersions:
|
|
12859
|
-
version:
|
|
12860
|
-
supported:
|
|
12861
|
-
endOfLife:
|
|
12862
|
-
securitySupport:
|
|
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:
|
|
12964
|
+
minimumCompatibleVersion: z70.string().optional().describe("Oldest version that can be directly upgraded")
|
|
12868
12965
|
});
|
|
12869
|
-
var DependencyConflictSchema =
|
|
12966
|
+
var DependencyConflictSchema = z70.object({
|
|
12870
12967
|
/**
|
|
12871
12968
|
* Type of conflict
|
|
12872
12969
|
*/
|
|
12873
|
-
type:
|
|
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:
|
|
12889
|
-
pluginId:
|
|
12890
|
-
version:
|
|
12891
|
-
requirement:
|
|
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:
|
|
12993
|
+
description: z70.string(),
|
|
12897
12994
|
/**
|
|
12898
12995
|
* Possible resolutions
|
|
12899
12996
|
*/
|
|
12900
|
-
resolutions:
|
|
12901
|
-
strategy:
|
|
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:
|
|
12914
|
-
automaticResolution:
|
|
12915
|
-
riskLevel:
|
|
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:
|
|
13017
|
+
severity: z70.enum(["critical", "error", "warning", "info"])
|
|
12921
13018
|
});
|
|
12922
|
-
var DependencyResolutionResultSchema =
|
|
13019
|
+
var DependencyResolutionResultSchema = z70.object({
|
|
12923
13020
|
/**
|
|
12924
13021
|
* Resolution successful
|
|
12925
13022
|
*/
|
|
12926
|
-
success:
|
|
13023
|
+
success: z70.boolean(),
|
|
12927
13024
|
/**
|
|
12928
13025
|
* Resolved plugin versions
|
|
12929
13026
|
*/
|
|
12930
|
-
resolved:
|
|
12931
|
-
pluginId:
|
|
12932
|
-
version:
|
|
12933
|
-
resolvedVersion:
|
|
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:
|
|
13035
|
+
conflicts: z70.array(DependencyConflictSchema).optional(),
|
|
12939
13036
|
/**
|
|
12940
13037
|
* Warnings
|
|
12941
13038
|
*/
|
|
12942
|
-
warnings:
|
|
13039
|
+
warnings: z70.array(z70.string()).optional(),
|
|
12943
13040
|
/**
|
|
12944
13041
|
* Installation order (topologically sorted)
|
|
12945
13042
|
*/
|
|
12946
|
-
installationOrder:
|
|
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:
|
|
13047
|
+
dependencyGraph: z70.record(z70.string(), z70.array(z70.string())).optional().describe("Map of plugin ID to its dependencies")
|
|
12951
13048
|
});
|
|
12952
|
-
var MultiVersionSupportSchema =
|
|
13049
|
+
var MultiVersionSupportSchema = z70.object({
|
|
12953
13050
|
/**
|
|
12954
13051
|
* Enable multi-version support
|
|
12955
13052
|
*/
|
|
12956
|
-
enabled:
|
|
13053
|
+
enabled: z70.boolean().default(false),
|
|
12957
13054
|
/**
|
|
12958
13055
|
* Maximum concurrent versions
|
|
12959
13056
|
*/
|
|
12960
|
-
maxConcurrentVersions:
|
|
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:
|
|
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:
|
|
12982
|
-
condition:
|
|
12983
|
-
version:
|
|
12984
|
-
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:
|
|
12990
|
-
enabled:
|
|
12991
|
-
strategy:
|
|
12992
|
-
percentage:
|
|
12993
|
-
duration:
|
|
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 =
|
|
13093
|
+
var PluginVersionMetadataSchema = z70.object({
|
|
12997
13094
|
/**
|
|
12998
13095
|
* Plugin identifier
|
|
12999
13096
|
*/
|
|
13000
|
-
pluginId:
|
|
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:
|
|
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:
|
|
13109
|
+
releaseDate: z70.string().datetime(),
|
|
13013
13110
|
/**
|
|
13014
13111
|
* Release notes
|
|
13015
13112
|
*/
|
|
13016
|
-
releaseNotes:
|
|
13113
|
+
releaseNotes: z70.string().optional(),
|
|
13017
13114
|
/**
|
|
13018
13115
|
* Breaking changes
|
|
13019
13116
|
*/
|
|
13020
|
-
breakingChanges:
|
|
13117
|
+
breakingChanges: z70.array(BreakingChangeSchema).optional(),
|
|
13021
13118
|
/**
|
|
13022
13119
|
* Deprecations
|
|
13023
13120
|
*/
|
|
13024
|
-
deprecations:
|
|
13121
|
+
deprecations: z70.array(DeprecationNoticeSchema).optional(),
|
|
13025
13122
|
/**
|
|
13026
13123
|
* Compatibility matrix
|
|
13027
13124
|
*/
|
|
13028
|
-
compatibilityMatrix:
|
|
13125
|
+
compatibilityMatrix: z70.array(CompatibilityMatrixEntrySchema).optional(),
|
|
13029
13126
|
/**
|
|
13030
13127
|
* Security vulnerabilities fixed
|
|
13031
13128
|
*/
|
|
13032
|
-
securityFixes:
|
|
13033
|
-
cve:
|
|
13034
|
-
severity:
|
|
13035
|
-
description:
|
|
13036
|
-
fixedIn:
|
|
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:
|
|
13042
|
-
downloads:
|
|
13043
|
-
installations:
|
|
13044
|
-
ratings:
|
|
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:
|
|
13050
|
-
status:
|
|
13051
|
-
endOfLife:
|
|
13052
|
-
securitySupport:
|
|
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 =
|
|
20525
|
-
|
|
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
|
});
|