@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/hub/index.js
CHANGED
|
@@ -80,10 +80,10 @@ __export(hub_exports, {
|
|
|
80
80
|
module.exports = __toCommonJS(hub_exports);
|
|
81
81
|
|
|
82
82
|
// src/hub/composer.zod.ts
|
|
83
|
-
var
|
|
83
|
+
var import_zod5 = require("zod");
|
|
84
84
|
|
|
85
85
|
// src/kernel/manifest.zod.ts
|
|
86
|
-
var
|
|
86
|
+
var import_zod4 = require("zod");
|
|
87
87
|
|
|
88
88
|
// src/kernel/plugin-capability.zod.ts
|
|
89
89
|
var import_zod = require("zod");
|
|
@@ -898,8 +898,87 @@ var PluginLoadingStateSchema = import_zod2.z.object({
|
|
|
898
898
|
retryCount: import_zod2.z.number().int().min(0).default(0)
|
|
899
899
|
}).describe("Plugin loading state");
|
|
900
900
|
|
|
901
|
+
// src/kernel/plugin.zod.ts
|
|
902
|
+
var import_zod3 = require("zod");
|
|
903
|
+
var PluginContextSchema = import_zod3.z.object({
|
|
904
|
+
ql: import_zod3.z.object({
|
|
905
|
+
object: import_zod3.z.function().returns(import_zod3.z.any()),
|
|
906
|
+
// Return any to allow method chaining
|
|
907
|
+
query: import_zod3.z.function().returns(import_zod3.z.any())
|
|
908
|
+
}).passthrough().describe("ObjectQL Engine Interface"),
|
|
909
|
+
os: import_zod3.z.object({
|
|
910
|
+
getCurrentUser: import_zod3.z.function().returns(import_zod3.z.any()),
|
|
911
|
+
getConfig: import_zod3.z.function().returns(import_zod3.z.any())
|
|
912
|
+
}).passthrough().describe("ObjectStack Kernel Interface"),
|
|
913
|
+
logger: import_zod3.z.object({
|
|
914
|
+
debug: import_zod3.z.function().returns(import_zod3.z.void()),
|
|
915
|
+
info: import_zod3.z.function().returns(import_zod3.z.void()),
|
|
916
|
+
warn: import_zod3.z.function().returns(import_zod3.z.void()),
|
|
917
|
+
error: import_zod3.z.function().returns(import_zod3.z.void())
|
|
918
|
+
}).passthrough().describe("Logger Interface"),
|
|
919
|
+
storage: import_zod3.z.object({
|
|
920
|
+
get: import_zod3.z.function().returns(import_zod3.z.any()),
|
|
921
|
+
set: import_zod3.z.function().returns(import_zod3.z.promise(import_zod3.z.void())),
|
|
922
|
+
delete: import_zod3.z.function().returns(import_zod3.z.promise(import_zod3.z.void()))
|
|
923
|
+
}).passthrough().describe("Storage Interface"),
|
|
924
|
+
i18n: import_zod3.z.object({
|
|
925
|
+
t: import_zod3.z.function().returns(import_zod3.z.string()),
|
|
926
|
+
getLocale: import_zod3.z.function().returns(import_zod3.z.string())
|
|
927
|
+
}).passthrough().describe("Internationalization Interface"),
|
|
928
|
+
metadata: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.any()),
|
|
929
|
+
events: import_zod3.z.record(import_zod3.z.string(), import_zod3.z.any()),
|
|
930
|
+
app: import_zod3.z.object({
|
|
931
|
+
router: import_zod3.z.object({
|
|
932
|
+
get: import_zod3.z.function().returns(import_zod3.z.any()),
|
|
933
|
+
post: import_zod3.z.function().returns(import_zod3.z.any()),
|
|
934
|
+
use: import_zod3.z.function().returns(import_zod3.z.any())
|
|
935
|
+
}).passthrough()
|
|
936
|
+
}).passthrough().describe("App Framework Interface"),
|
|
937
|
+
drivers: import_zod3.z.object({
|
|
938
|
+
register: import_zod3.z.function().returns(import_zod3.z.void())
|
|
939
|
+
}).passthrough().describe("Driver Registry")
|
|
940
|
+
});
|
|
941
|
+
var PluginLifecycleSchema = import_zod3.z.object({
|
|
942
|
+
onInstall: import_zod3.z.function().args(PluginContextSchema).returns(import_zod3.z.promise(import_zod3.z.void())).optional(),
|
|
943
|
+
onEnable: import_zod3.z.function().args(PluginContextSchema).returns(import_zod3.z.promise(import_zod3.z.void())).optional(),
|
|
944
|
+
onDisable: import_zod3.z.function().args(PluginContextSchema).returns(import_zod3.z.promise(import_zod3.z.void())).optional(),
|
|
945
|
+
onUninstall: import_zod3.z.function().args(PluginContextSchema).returns(import_zod3.z.promise(import_zod3.z.void())).optional(),
|
|
946
|
+
onUpgrade: import_zod3.z.function().args(PluginContextSchema, import_zod3.z.string(), import_zod3.z.string()).returns(import_zod3.z.promise(import_zod3.z.void())).optional()
|
|
947
|
+
});
|
|
948
|
+
var CORE_PLUGIN_TYPES = [
|
|
949
|
+
"ui",
|
|
950
|
+
// Frontend: Serves static assets/SPA (e.g. Console, Studio)
|
|
951
|
+
"driver",
|
|
952
|
+
// Connectivity: Database or Storage adapters (e.g. SQL, S3)
|
|
953
|
+
"server",
|
|
954
|
+
// Protocol: HTTP/RPC Servers (e.g. Hono, GraphQL)
|
|
955
|
+
"app",
|
|
956
|
+
// Business: Vertical Solution Bundle (Metadata + Logic)
|
|
957
|
+
"theme",
|
|
958
|
+
// Appearance: UI Overrides & CSS Variables
|
|
959
|
+
"agent",
|
|
960
|
+
// AI: Autonomous Agent & Tool Definitions
|
|
961
|
+
"objectql"
|
|
962
|
+
// Core: ObjectQL Engine Data Provider
|
|
963
|
+
];
|
|
964
|
+
var PluginSchema = PluginLifecycleSchema.extend({
|
|
965
|
+
id: import_zod3.z.string().min(1).optional().describe("Unique Plugin ID (e.g. com.example.crm)"),
|
|
966
|
+
type: import_zod3.z.enum([
|
|
967
|
+
"standard",
|
|
968
|
+
// Default: General purpose backend logic (Service, Hook, etc.)
|
|
969
|
+
...CORE_PLUGIN_TYPES
|
|
970
|
+
]).default("standard").optional().describe("Plugin Type categorization for runtime behavior"),
|
|
971
|
+
staticPath: import_zod3.z.string().optional().describe('Absolute path to static assets (Required for type="ui-plugin")'),
|
|
972
|
+
slug: import_zod3.z.string().regex(/^[a-z0-9-_]+$/).optional().describe('URL path segment (Required for type="ui-plugin")'),
|
|
973
|
+
default: import_zod3.z.boolean().optional().describe('Serve at root path (Only one "ui-plugin" can be default)'),
|
|
974
|
+
version: import_zod3.z.string().regex(/^\d+\.\d+\.\d+$/).optional().describe("Semantic Version"),
|
|
975
|
+
description: import_zod3.z.string().optional(),
|
|
976
|
+
author: import_zod3.z.string().optional(),
|
|
977
|
+
homepage: import_zod3.z.string().url().optional()
|
|
978
|
+
});
|
|
979
|
+
|
|
901
980
|
// src/kernel/manifest.zod.ts
|
|
902
|
-
var ManifestSchema =
|
|
981
|
+
var ManifestSchema = import_zod4.z.object({
|
|
903
982
|
/**
|
|
904
983
|
* Unique package identifier using reverse domain notation.
|
|
905
984
|
* Must be unique across the entire ecosystem.
|
|
@@ -907,65 +986,75 @@ var ManifestSchema = import_zod3.z.object({
|
|
|
907
986
|
* @example "com.steedos.crm"
|
|
908
987
|
* @example "org.apache.superset"
|
|
909
988
|
*/
|
|
910
|
-
id:
|
|
989
|
+
id: import_zod4.z.string().describe("Unique package identifier (reverse domain style)"),
|
|
911
990
|
/**
|
|
912
991
|
* Package version following semantic versioning (major.minor.patch).
|
|
913
992
|
*
|
|
914
993
|
* @example "1.0.0"
|
|
915
994
|
* @example "2.1.0-beta.1"
|
|
916
995
|
*/
|
|
917
|
-
version:
|
|
996
|
+
version: import_zod4.z.string().regex(/^\d+\.\d+\.\d+$/).describe("Package version (semantic versioning)"),
|
|
918
997
|
/**
|
|
919
998
|
* Type of the package in the ObjectStack ecosystem.
|
|
920
|
-
* -
|
|
921
|
-
* -
|
|
922
|
-
* - driver:
|
|
999
|
+
* - plugin: General-purpose functionality extension (Runtime: standard)
|
|
1000
|
+
* - app: Business application package
|
|
1001
|
+
* - driver: Connectivity adapter
|
|
1002
|
+
* - server: Protocol gateway (Hono, GraphQL)
|
|
1003
|
+
* - ui: Frontend package (Static/SPA)
|
|
1004
|
+
* - theme: UI Theme
|
|
1005
|
+
* - agent: AI Agent
|
|
923
1006
|
* - module: Reusable code library/shared module
|
|
924
|
-
* - objectql: Core engine
|
|
925
|
-
* -
|
|
926
|
-
* - adapter: Host adapter - Runtime container (Express, Hono, Fastify, Serverless)
|
|
1007
|
+
* - objectql: Core engine
|
|
1008
|
+
* - adapter: Host adapter (Express, Fastify)
|
|
927
1009
|
*/
|
|
928
|
-
type:
|
|
1010
|
+
type: import_zod4.z.enum([
|
|
1011
|
+
"plugin",
|
|
1012
|
+
...CORE_PLUGIN_TYPES,
|
|
1013
|
+
"module",
|
|
1014
|
+
"gateway",
|
|
1015
|
+
// Deprecated: use 'server'
|
|
1016
|
+
"adapter"
|
|
1017
|
+
]).describe("Type of package"),
|
|
929
1018
|
/**
|
|
930
1019
|
* Human-readable name of the package.
|
|
931
1020
|
* Displayed in the UI for users.
|
|
932
1021
|
*
|
|
933
1022
|
* @example "Project Management"
|
|
934
1023
|
*/
|
|
935
|
-
name:
|
|
1024
|
+
name: import_zod4.z.string().describe("Human-readable package name"),
|
|
936
1025
|
/**
|
|
937
1026
|
* Brief description of the package functionality.
|
|
938
1027
|
* Displayed in the marketplace and plugin manager.
|
|
939
1028
|
*/
|
|
940
|
-
description:
|
|
1029
|
+
description: import_zod4.z.string().optional().describe("Package description"),
|
|
941
1030
|
/**
|
|
942
1031
|
* Array of permission strings that the package requires.
|
|
943
1032
|
* These form the "Scope" requested by the package at installation.
|
|
944
1033
|
*
|
|
945
1034
|
* @example ["system.user.read", "system.data.write"]
|
|
946
1035
|
*/
|
|
947
|
-
permissions:
|
|
1036
|
+
permissions: import_zod4.z.array(import_zod4.z.string()).optional().describe("Array of required permission strings"),
|
|
948
1037
|
/**
|
|
949
1038
|
* Glob patterns specifying ObjectQL schemas files.
|
|
950
1039
|
* Matches `*.object.yml` or `*.object.ts` files to load business objects.
|
|
951
1040
|
*
|
|
952
1041
|
* @example ["./src/objects/*.object.yml"]
|
|
953
1042
|
*/
|
|
954
|
-
objects:
|
|
1043
|
+
objects: import_zod4.z.array(import_zod4.z.string()).optional().describe("Glob patterns for ObjectQL schemas files"),
|
|
955
1044
|
/**
|
|
956
1045
|
* Defines system level DataSources.
|
|
957
1046
|
* Matches `*.datasource.yml` files.
|
|
958
1047
|
*
|
|
959
1048
|
* @example ["./src/datasources/*.datasource.mongo.yml"]
|
|
960
1049
|
*/
|
|
961
|
-
datasources:
|
|
1050
|
+
datasources: import_zod4.z.array(import_zod4.z.string()).optional().describe("Glob patterns for Datasource definitions"),
|
|
962
1051
|
/**
|
|
963
1052
|
* Package Dependencies.
|
|
964
1053
|
* Map of package IDs to version requirements.
|
|
965
1054
|
*
|
|
966
1055
|
* @example { "@steedos/plugin-auth": "^2.0.0" }
|
|
967
1056
|
*/
|
|
968
|
-
dependencies:
|
|
1057
|
+
dependencies: import_zod4.z.record(import_zod4.z.string(), import_zod4.z.string()).optional().describe("Package dependencies"),
|
|
969
1058
|
/**
|
|
970
1059
|
* Plugin Configuration Schema.
|
|
971
1060
|
* Defines the settings this plugin exposes to the user via UI/ENV.
|
|
@@ -980,109 +1069,109 @@ var ManifestSchema = import_zod3.z.object({
|
|
|
980
1069
|
* }
|
|
981
1070
|
* }
|
|
982
1071
|
*/
|
|
983
|
-
configuration:
|
|
984
|
-
title:
|
|
985
|
-
properties:
|
|
986
|
-
type:
|
|
987
|
-
default:
|
|
988
|
-
description:
|
|
989
|
-
required:
|
|
990
|
-
secret:
|
|
991
|
-
enum:
|
|
1072
|
+
configuration: import_zod4.z.object({
|
|
1073
|
+
title: import_zod4.z.string().optional(),
|
|
1074
|
+
properties: import_zod4.z.record(import_zod4.z.string(), import_zod4.z.object({
|
|
1075
|
+
type: import_zod4.z.enum(["string", "number", "boolean", "array", "object"]).describe("Data type of the setting"),
|
|
1076
|
+
default: import_zod4.z.any().optional().describe("Default value"),
|
|
1077
|
+
description: import_zod4.z.string().optional().describe("Tooltip description"),
|
|
1078
|
+
required: import_zod4.z.boolean().optional().describe("Is this setting required?"),
|
|
1079
|
+
secret: import_zod4.z.boolean().optional().describe("If true, value is encrypted/masked (e.g. API Keys)"),
|
|
1080
|
+
enum: import_zod4.z.array(import_zod4.z.string()).optional().describe("Allowed values for select inputs")
|
|
992
1081
|
})).describe("Map of configuration keys to their definitions")
|
|
993
1082
|
}).optional().describe("Plugin configuration settings"),
|
|
994
1083
|
/**
|
|
995
1084
|
* Contribution Points (VS Code Style).
|
|
996
1085
|
* formalized way to extend the platform capabilities.
|
|
997
1086
|
*/
|
|
998
|
-
contributes:
|
|
1087
|
+
contributes: import_zod4.z.object({
|
|
999
1088
|
/**
|
|
1000
1089
|
* Register new Metadata Kinds (CRDs).
|
|
1001
1090
|
* Enables the system to parse and validate new file types.
|
|
1002
1091
|
* Example: Registering a BI plugin to handle *.report.ts
|
|
1003
1092
|
*/
|
|
1004
|
-
kinds:
|
|
1005
|
-
id:
|
|
1006
|
-
globs:
|
|
1007
|
-
description:
|
|
1093
|
+
kinds: import_zod4.z.array(import_zod4.z.object({
|
|
1094
|
+
id: import_zod4.z.string().describe('The generic identifier of the kind (e.g., "sys.bi.report")'),
|
|
1095
|
+
globs: import_zod4.z.array(import_zod4.z.string()).describe('File patterns to watch (e.g., ["**/*.report.ts"])'),
|
|
1096
|
+
description: import_zod4.z.string().optional().describe("Description of what this kind represents")
|
|
1008
1097
|
})).optional().describe("New Metadata Types to recognize"),
|
|
1009
1098
|
/**
|
|
1010
1099
|
* Register System Hooks.
|
|
1011
1100
|
* Declares that this plugin listens to specific system events.
|
|
1012
1101
|
*/
|
|
1013
|
-
events:
|
|
1102
|
+
events: import_zod4.z.array(import_zod4.z.string()).optional().describe("Events this plugin listens to"),
|
|
1014
1103
|
/**
|
|
1015
1104
|
* Register UI Menus.
|
|
1016
1105
|
*/
|
|
1017
|
-
menus:
|
|
1018
|
-
id:
|
|
1019
|
-
label:
|
|
1020
|
-
command:
|
|
1106
|
+
menus: import_zod4.z.record(import_zod4.z.string(), import_zod4.z.array(import_zod4.z.object({
|
|
1107
|
+
id: import_zod4.z.string(),
|
|
1108
|
+
label: import_zod4.z.string(),
|
|
1109
|
+
command: import_zod4.z.string().optional()
|
|
1021
1110
|
}))).optional().describe("UI Menu contributions"),
|
|
1022
1111
|
/**
|
|
1023
1112
|
* Register Custom Themes.
|
|
1024
1113
|
*/
|
|
1025
|
-
themes:
|
|
1026
|
-
id:
|
|
1027
|
-
label:
|
|
1028
|
-
path:
|
|
1114
|
+
themes: import_zod4.z.array(import_zod4.z.object({
|
|
1115
|
+
id: import_zod4.z.string(),
|
|
1116
|
+
label: import_zod4.z.string(),
|
|
1117
|
+
path: import_zod4.z.string()
|
|
1029
1118
|
})).optional().describe("Theme contributions"),
|
|
1030
1119
|
/**
|
|
1031
1120
|
* Register Translations.
|
|
1032
1121
|
* Path to translation files (e.g. "locales/en.json").
|
|
1033
1122
|
*/
|
|
1034
|
-
translations:
|
|
1035
|
-
locale:
|
|
1036
|
-
path:
|
|
1123
|
+
translations: import_zod4.z.array(import_zod4.z.object({
|
|
1124
|
+
locale: import_zod4.z.string(),
|
|
1125
|
+
path: import_zod4.z.string()
|
|
1037
1126
|
})).optional().describe("Translation resources"),
|
|
1038
1127
|
/**
|
|
1039
1128
|
* Register Server Actions.
|
|
1040
1129
|
* Invocable functions exposed to Flows or API.
|
|
1041
1130
|
*/
|
|
1042
|
-
actions:
|
|
1043
|
-
name:
|
|
1044
|
-
label:
|
|
1045
|
-
description:
|
|
1046
|
-
input:
|
|
1047
|
-
output:
|
|
1131
|
+
actions: import_zod4.z.array(import_zod4.z.object({
|
|
1132
|
+
name: import_zod4.z.string().describe("Unique action name"),
|
|
1133
|
+
label: import_zod4.z.string().optional(),
|
|
1134
|
+
description: import_zod4.z.string().optional(),
|
|
1135
|
+
input: import_zod4.z.any().optional().describe("Input validation schema"),
|
|
1136
|
+
output: import_zod4.z.any().optional().describe("Output schema")
|
|
1048
1137
|
})).optional().describe("Exposed server actions"),
|
|
1049
1138
|
/**
|
|
1050
1139
|
* Register Storage Drivers.
|
|
1051
1140
|
* Enables connecting to new types of datasources.
|
|
1052
1141
|
*/
|
|
1053
|
-
drivers:
|
|
1054
|
-
id:
|
|
1055
|
-
label:
|
|
1056
|
-
description:
|
|
1142
|
+
drivers: import_zod4.z.array(import_zod4.z.object({
|
|
1143
|
+
id: import_zod4.z.string().describe('Driver unique identifier (e.g. "postgres", "mongo")'),
|
|
1144
|
+
label: import_zod4.z.string().describe("Human readable name"),
|
|
1145
|
+
description: import_zod4.z.string().optional()
|
|
1057
1146
|
})).optional().describe("Driver contributions"),
|
|
1058
1147
|
/**
|
|
1059
1148
|
* Register Custom Field Types.
|
|
1060
1149
|
* Extends the data model with new widget types.
|
|
1061
1150
|
*/
|
|
1062
|
-
fieldTypes:
|
|
1063
|
-
name:
|
|
1064
|
-
label:
|
|
1065
|
-
description:
|
|
1151
|
+
fieldTypes: import_zod4.z.array(import_zod4.z.object({
|
|
1152
|
+
name: import_zod4.z.string().describe('Unique field type name (e.g. "vector")'),
|
|
1153
|
+
label: import_zod4.z.string().describe("Display label"),
|
|
1154
|
+
description: import_zod4.z.string().optional()
|
|
1066
1155
|
})).optional().describe("Field Type contributions"),
|
|
1067
1156
|
/**
|
|
1068
1157
|
* Register Custom Query Operators/Functions.
|
|
1069
1158
|
* Extends ObjectQL with new functions (e.g. distance()).
|
|
1070
1159
|
*/
|
|
1071
|
-
functions:
|
|
1072
|
-
name:
|
|
1073
|
-
description:
|
|
1074
|
-
args:
|
|
1075
|
-
returnType:
|
|
1160
|
+
functions: import_zod4.z.array(import_zod4.z.object({
|
|
1161
|
+
name: import_zod4.z.string().describe('Function name (e.g. "distance")'),
|
|
1162
|
+
description: import_zod4.z.string().optional(),
|
|
1163
|
+
args: import_zod4.z.array(import_zod4.z.string()).optional().describe("Argument types"),
|
|
1164
|
+
returnType: import_zod4.z.string().optional()
|
|
1076
1165
|
})).optional().describe("Query Function contributions")
|
|
1077
1166
|
}).optional().describe("Platform contributions"),
|
|
1078
1167
|
/**
|
|
1079
1168
|
* Initial data seeding configuration.
|
|
1080
1169
|
* Defines default records to be inserted when the package is installed.
|
|
1081
1170
|
*/
|
|
1082
|
-
data:
|
|
1083
|
-
object:
|
|
1084
|
-
records:
|
|
1085
|
-
mode:
|
|
1171
|
+
data: import_zod4.z.array(import_zod4.z.object({
|
|
1172
|
+
object: import_zod4.z.string().describe("Target Object Name"),
|
|
1173
|
+
records: import_zod4.z.array(import_zod4.z.record(import_zod4.z.string(), import_zod4.z.any())).describe("List of records to insert"),
|
|
1174
|
+
mode: import_zod4.z.enum(["upsert", "insert", "ignore"]).default("upsert").describe("Seeding mode")
|
|
1086
1175
|
})).optional().describe("Initial seed data"),
|
|
1087
1176
|
/**
|
|
1088
1177
|
* Plugin Capability Manifest.
|
|
@@ -1094,7 +1183,7 @@ var ManifestSchema = import_zod3.z.object({
|
|
|
1094
1183
|
* Extension points contributed by this package.
|
|
1095
1184
|
* Allows packages to extend UI components, add functionality, etc.
|
|
1096
1185
|
*/
|
|
1097
|
-
extensions:
|
|
1186
|
+
extensions: import_zod4.z.record(import_zod4.z.string(), import_zod4.z.any()).optional().describe("Extension points and contributions"),
|
|
1098
1187
|
/**
|
|
1099
1188
|
* Plugin Loading Configuration.
|
|
1100
1189
|
* Configures how the plugin is loaded, initialized, and managed at runtime.
|
|
@@ -1104,61 +1193,61 @@ var ManifestSchema = import_zod3.z.object({
|
|
|
1104
1193
|
});
|
|
1105
1194
|
|
|
1106
1195
|
// src/hub/composer.zod.ts
|
|
1107
|
-
var DependencyRequirementSchema =
|
|
1108
|
-
id:
|
|
1109
|
-
version:
|
|
1196
|
+
var DependencyRequirementSchema = import_zod5.z.object({
|
|
1197
|
+
id: import_zod5.z.string().describe('Plugin ID (e.g. "com.example.crm")'),
|
|
1198
|
+
version: import_zod5.z.string().default("latest").describe('SemVer range or "latest"'),
|
|
1110
1199
|
/**
|
|
1111
1200
|
* Configuration Overrides
|
|
1112
1201
|
* Tenant-specific settings that override plugin defaults.
|
|
1113
1202
|
* Example: { "currency": "USD", "apiKey": "..." }
|
|
1114
1203
|
*/
|
|
1115
|
-
configuration:
|
|
1204
|
+
configuration: import_zod5.z.record(import_zod5.z.string(), import_zod5.z.any()).optional().describe("Configuration overrides"),
|
|
1116
1205
|
/**
|
|
1117
1206
|
* Feature Flags
|
|
1118
1207
|
* Enable/Disable specific features within the plugin.
|
|
1119
1208
|
*/
|
|
1120
|
-
features:
|
|
1209
|
+
features: import_zod5.z.record(import_zod5.z.string(), import_zod5.z.boolean()).optional().describe("Feature toggles")
|
|
1121
1210
|
});
|
|
1122
|
-
var BillOfMaterialsSchema =
|
|
1123
|
-
tenantId:
|
|
1211
|
+
var BillOfMaterialsSchema = import_zod5.z.object({
|
|
1212
|
+
tenantId: import_zod5.z.string().describe("Target Tenant ID"),
|
|
1124
1213
|
/**
|
|
1125
1214
|
* List of installed plugins/apps.
|
|
1126
1215
|
* implementation order matters (later plugins override earlier ones by default).
|
|
1127
1216
|
*/
|
|
1128
|
-
dependencies:
|
|
1217
|
+
dependencies: import_zod5.z.array(DependencyRequirementSchema).describe("Installed packages"),
|
|
1129
1218
|
/**
|
|
1130
1219
|
* Environment Variables injection.
|
|
1131
1220
|
* Maps abstract keys to secure vault references or concrete values.
|
|
1132
1221
|
*/
|
|
1133
|
-
environment:
|
|
1222
|
+
environment: import_zod5.z.record(import_zod5.z.string(), import_zod5.z.string()).optional(),
|
|
1134
1223
|
/**
|
|
1135
1224
|
* Global Resolution Strategy
|
|
1136
1225
|
* How to handle conflicts when multiple plugins define the same resource.
|
|
1137
1226
|
*/
|
|
1138
|
-
resolutionStrategy:
|
|
1227
|
+
resolutionStrategy: import_zod5.z.enum(["strict", "override", "merge"]).default("override").describe("Conflict resolution strategy (strict=fail, override=last-wins, merge=deep-merge)")
|
|
1139
1228
|
});
|
|
1140
|
-
var ConflictReportSchema =
|
|
1141
|
-
resourceType:
|
|
1142
|
-
resourceId:
|
|
1143
|
-
sources:
|
|
1144
|
-
resolution:
|
|
1145
|
-
severity:
|
|
1229
|
+
var ConflictReportSchema = import_zod5.z.object({
|
|
1230
|
+
resourceType: import_zod5.z.enum(["object", "field", "api", "ui"]).describe("Type of colliding resource"),
|
|
1231
|
+
resourceId: import_zod5.z.string().describe("ID of the resource"),
|
|
1232
|
+
sources: import_zod5.z.array(import_zod5.z.string()).describe("List of plugin IDs defining this resource"),
|
|
1233
|
+
resolution: import_zod5.z.string().describe('How it was resolved (e.g. "com.example.erp won")'),
|
|
1234
|
+
severity: import_zod5.z.enum(["info", "warning", "error"]).describe("Severity of the conflict")
|
|
1146
1235
|
});
|
|
1147
|
-
var ComposerRequestSchema =
|
|
1236
|
+
var ComposerRequestSchema = import_zod5.z.object({
|
|
1148
1237
|
bom: BillOfMaterialsSchema,
|
|
1149
1238
|
/**
|
|
1150
1239
|
* Target Runtime Version
|
|
1151
1240
|
* Ensure generated manifest is compatible with the specific runtime version.
|
|
1152
1241
|
*/
|
|
1153
|
-
runtimeVersion:
|
|
1242
|
+
runtimeVersion: import_zod5.z.string().optional(),
|
|
1154
1243
|
/**
|
|
1155
1244
|
* Dry Run
|
|
1156
1245
|
* If true, generates report but does not persist the manifest.
|
|
1157
1246
|
*/
|
|
1158
|
-
dryRun:
|
|
1247
|
+
dryRun: import_zod5.z.boolean().default(false)
|
|
1159
1248
|
});
|
|
1160
|
-
var ComposerResponseSchema =
|
|
1161
|
-
success:
|
|
1249
|
+
var ComposerResponseSchema = import_zod5.z.object({
|
|
1250
|
+
success: import_zod5.z.boolean(),
|
|
1162
1251
|
/**
|
|
1163
1252
|
* The Holy Grail: The Executable System Manifest.
|
|
1164
1253
|
* This is what the Runtime loads to boot.
|
|
@@ -1168,150 +1257,150 @@ var ComposerResponseSchema = import_zod4.z.object({
|
|
|
1168
1257
|
* Manifest URL
|
|
1169
1258
|
* Presigned URL to download the manifest if stored externally (e.g. Vercel KV/S3).
|
|
1170
1259
|
*/
|
|
1171
|
-
manifestUrl:
|
|
1260
|
+
manifestUrl: import_zod5.z.string().url().optional().describe("Presigned download URL"),
|
|
1172
1261
|
/**
|
|
1173
1262
|
* Compilation Metadata
|
|
1174
1263
|
*/
|
|
1175
|
-
buildId:
|
|
1176
|
-
timestamp:
|
|
1177
|
-
duration:
|
|
1264
|
+
buildId: import_zod5.z.string(),
|
|
1265
|
+
timestamp: import_zod5.z.string().datetime(),
|
|
1266
|
+
duration: import_zod5.z.number().describe("Compilation time in ms"),
|
|
1178
1267
|
/**
|
|
1179
1268
|
* Analysis
|
|
1180
1269
|
*/
|
|
1181
|
-
conflicts:
|
|
1182
|
-
errors:
|
|
1270
|
+
conflicts: import_zod5.z.array(ConflictReportSchema).optional(),
|
|
1271
|
+
errors: import_zod5.z.array(import_zod5.z.string()).optional()
|
|
1183
1272
|
});
|
|
1184
1273
|
|
|
1185
1274
|
// src/hub/marketplace.zod.ts
|
|
1186
|
-
var
|
|
1275
|
+
var import_zod7 = require("zod");
|
|
1187
1276
|
|
|
1188
1277
|
// src/hub/plugin-registry.zod.ts
|
|
1189
|
-
var
|
|
1190
|
-
var PluginVendorSchema =
|
|
1278
|
+
var import_zod6 = require("zod");
|
|
1279
|
+
var PluginVendorSchema = import_zod6.z.object({
|
|
1191
1280
|
/**
|
|
1192
1281
|
* Vendor identifier (reverse domain notation)
|
|
1193
1282
|
* Example: "com.acme", "org.apache", "com.objectstack"
|
|
1194
1283
|
*/
|
|
1195
|
-
id:
|
|
1284
|
+
id: import_zod6.z.string().regex(/^[a-z][a-z0-9]*(\.[a-z][a-z0-9]*)+$/).describe("Vendor identifier (reverse domain)"),
|
|
1196
1285
|
/**
|
|
1197
1286
|
* Vendor display name
|
|
1198
1287
|
*/
|
|
1199
|
-
name:
|
|
1288
|
+
name: import_zod6.z.string(),
|
|
1200
1289
|
/**
|
|
1201
1290
|
* Vendor website
|
|
1202
1291
|
*/
|
|
1203
|
-
website:
|
|
1292
|
+
website: import_zod6.z.string().url().optional(),
|
|
1204
1293
|
/**
|
|
1205
1294
|
* Contact email
|
|
1206
1295
|
*/
|
|
1207
|
-
email:
|
|
1296
|
+
email: import_zod6.z.string().email().optional(),
|
|
1208
1297
|
/**
|
|
1209
1298
|
* Verification status
|
|
1210
1299
|
*/
|
|
1211
|
-
verified:
|
|
1300
|
+
verified: import_zod6.z.boolean().default(false).describe("Whether vendor is verified by ObjectStack"),
|
|
1212
1301
|
/**
|
|
1213
1302
|
* Trust level
|
|
1214
1303
|
*/
|
|
1215
|
-
trustLevel:
|
|
1304
|
+
trustLevel: import_zod6.z.enum(["official", "verified", "community", "unverified"]).default("unverified")
|
|
1216
1305
|
});
|
|
1217
|
-
var PluginQualityMetricsSchema =
|
|
1306
|
+
var PluginQualityMetricsSchema = import_zod6.z.object({
|
|
1218
1307
|
/**
|
|
1219
1308
|
* Test coverage percentage
|
|
1220
1309
|
*/
|
|
1221
|
-
testCoverage:
|
|
1310
|
+
testCoverage: import_zod6.z.number().min(0).max(100).optional(),
|
|
1222
1311
|
/**
|
|
1223
1312
|
* Documentation score (0-100)
|
|
1224
1313
|
*/
|
|
1225
|
-
documentationScore:
|
|
1314
|
+
documentationScore: import_zod6.z.number().min(0).max(100).optional(),
|
|
1226
1315
|
/**
|
|
1227
1316
|
* Code quality score (0-100)
|
|
1228
1317
|
*/
|
|
1229
|
-
codeQuality:
|
|
1318
|
+
codeQuality: import_zod6.z.number().min(0).max(100).optional(),
|
|
1230
1319
|
/**
|
|
1231
1320
|
* Security scan status
|
|
1232
1321
|
*/
|
|
1233
|
-
securityScan:
|
|
1234
|
-
lastScanDate:
|
|
1235
|
-
vulnerabilities:
|
|
1236
|
-
critical:
|
|
1237
|
-
high:
|
|
1238
|
-
medium:
|
|
1239
|
-
low:
|
|
1322
|
+
securityScan: import_zod6.z.object({
|
|
1323
|
+
lastScanDate: import_zod6.z.string().datetime().optional(),
|
|
1324
|
+
vulnerabilities: import_zod6.z.object({
|
|
1325
|
+
critical: import_zod6.z.number().int().min(0).default(0),
|
|
1326
|
+
high: import_zod6.z.number().int().min(0).default(0),
|
|
1327
|
+
medium: import_zod6.z.number().int().min(0).default(0),
|
|
1328
|
+
low: import_zod6.z.number().int().min(0).default(0)
|
|
1240
1329
|
}).optional(),
|
|
1241
|
-
passed:
|
|
1330
|
+
passed: import_zod6.z.boolean().default(false)
|
|
1242
1331
|
}).optional(),
|
|
1243
1332
|
/**
|
|
1244
1333
|
* Conformance test results
|
|
1245
1334
|
*/
|
|
1246
|
-
conformanceTests:
|
|
1247
|
-
protocolId:
|
|
1248
|
-
passed:
|
|
1249
|
-
totalTests:
|
|
1250
|
-
passedTests:
|
|
1251
|
-
lastRunDate:
|
|
1335
|
+
conformanceTests: import_zod6.z.array(import_zod6.z.object({
|
|
1336
|
+
protocolId: import_zod6.z.string().describe("Protocol being tested"),
|
|
1337
|
+
passed: import_zod6.z.boolean(),
|
|
1338
|
+
totalTests: import_zod6.z.number().int().min(0),
|
|
1339
|
+
passedTests: import_zod6.z.number().int().min(0),
|
|
1340
|
+
lastRunDate: import_zod6.z.string().datetime().optional()
|
|
1252
1341
|
})).optional()
|
|
1253
1342
|
});
|
|
1254
|
-
var PluginStatisticsSchema =
|
|
1343
|
+
var PluginStatisticsSchema = import_zod6.z.object({
|
|
1255
1344
|
/**
|
|
1256
1345
|
* Total downloads
|
|
1257
1346
|
*/
|
|
1258
|
-
downloads:
|
|
1347
|
+
downloads: import_zod6.z.number().int().min(0).default(0),
|
|
1259
1348
|
/**
|
|
1260
1349
|
* Downloads in the last 30 days
|
|
1261
1350
|
*/
|
|
1262
|
-
downloadsLastMonth:
|
|
1351
|
+
downloadsLastMonth: import_zod6.z.number().int().min(0).default(0),
|
|
1263
1352
|
/**
|
|
1264
1353
|
* Number of active installations
|
|
1265
1354
|
*/
|
|
1266
|
-
activeInstallations:
|
|
1355
|
+
activeInstallations: import_zod6.z.number().int().min(0).default(0),
|
|
1267
1356
|
/**
|
|
1268
1357
|
* User ratings
|
|
1269
1358
|
*/
|
|
1270
|
-
ratings:
|
|
1271
|
-
average:
|
|
1272
|
-
count:
|
|
1273
|
-
distribution:
|
|
1274
|
-
"5":
|
|
1275
|
-
"4":
|
|
1276
|
-
"3":
|
|
1277
|
-
"2":
|
|
1278
|
-
"1":
|
|
1359
|
+
ratings: import_zod6.z.object({
|
|
1360
|
+
average: import_zod6.z.number().min(0).max(5).default(0),
|
|
1361
|
+
count: import_zod6.z.number().int().min(0).default(0),
|
|
1362
|
+
distribution: import_zod6.z.object({
|
|
1363
|
+
"5": import_zod6.z.number().int().min(0).default(0),
|
|
1364
|
+
"4": import_zod6.z.number().int().min(0).default(0),
|
|
1365
|
+
"3": import_zod6.z.number().int().min(0).default(0),
|
|
1366
|
+
"2": import_zod6.z.number().int().min(0).default(0),
|
|
1367
|
+
"1": import_zod6.z.number().int().min(0).default(0)
|
|
1279
1368
|
}).optional()
|
|
1280
1369
|
}).optional(),
|
|
1281
1370
|
/**
|
|
1282
1371
|
* GitHub stars (if open source)
|
|
1283
1372
|
*/
|
|
1284
|
-
stars:
|
|
1373
|
+
stars: import_zod6.z.number().int().min(0).optional(),
|
|
1285
1374
|
/**
|
|
1286
1375
|
* Number of dependent plugins
|
|
1287
1376
|
*/
|
|
1288
|
-
dependents:
|
|
1377
|
+
dependents: import_zod6.z.number().int().min(0).default(0)
|
|
1289
1378
|
});
|
|
1290
|
-
var PluginRegistryEntrySchema =
|
|
1379
|
+
var PluginRegistryEntrySchema = import_zod6.z.object({
|
|
1291
1380
|
/**
|
|
1292
1381
|
* Plugin identifier (must match manifest.id)
|
|
1293
1382
|
*/
|
|
1294
|
-
id:
|
|
1383
|
+
id: import_zod6.z.string().regex(/^([a-z][a-z0-9]*\.)+[a-z][a-z0-9-]+$/).describe("Plugin identifier (reverse domain notation)"),
|
|
1295
1384
|
/**
|
|
1296
1385
|
* Current version
|
|
1297
1386
|
*/
|
|
1298
|
-
version:
|
|
1387
|
+
version: import_zod6.z.string().regex(/^\d+\.\d+\.\d+$/),
|
|
1299
1388
|
/**
|
|
1300
1389
|
* Plugin display name
|
|
1301
1390
|
*/
|
|
1302
|
-
name:
|
|
1391
|
+
name: import_zod6.z.string(),
|
|
1303
1392
|
/**
|
|
1304
1393
|
* Short description
|
|
1305
1394
|
*/
|
|
1306
|
-
description:
|
|
1395
|
+
description: import_zod6.z.string().optional(),
|
|
1307
1396
|
/**
|
|
1308
1397
|
* Detailed documentation/README
|
|
1309
1398
|
*/
|
|
1310
|
-
readme:
|
|
1399
|
+
readme: import_zod6.z.string().optional(),
|
|
1311
1400
|
/**
|
|
1312
1401
|
* Plugin type/category
|
|
1313
1402
|
*/
|
|
1314
|
-
category:
|
|
1403
|
+
category: import_zod6.z.enum([
|
|
1315
1404
|
"data",
|
|
1316
1405
|
// Data management, storage, databases
|
|
1317
1406
|
"integration",
|
|
@@ -1338,7 +1427,7 @@ var PluginRegistryEntrySchema = import_zod5.z.object({
|
|
|
1338
1427
|
/**
|
|
1339
1428
|
* Tags for categorization
|
|
1340
1429
|
*/
|
|
1341
|
-
tags:
|
|
1430
|
+
tags: import_zod6.z.array(import_zod6.z.string()).optional(),
|
|
1342
1431
|
/**
|
|
1343
1432
|
* Vendor information
|
|
1344
1433
|
*/
|
|
@@ -1350,42 +1439,42 @@ var PluginRegistryEntrySchema = import_zod5.z.object({
|
|
|
1350
1439
|
/**
|
|
1351
1440
|
* Compatibility information
|
|
1352
1441
|
*/
|
|
1353
|
-
compatibility:
|
|
1442
|
+
compatibility: import_zod6.z.object({
|
|
1354
1443
|
/**
|
|
1355
1444
|
* Minimum ObjectStack version required
|
|
1356
1445
|
*/
|
|
1357
|
-
minObjectStackVersion:
|
|
1446
|
+
minObjectStackVersion: import_zod6.z.string().optional(),
|
|
1358
1447
|
/**
|
|
1359
1448
|
* Maximum ObjectStack version supported
|
|
1360
1449
|
*/
|
|
1361
|
-
maxObjectStackVersion:
|
|
1450
|
+
maxObjectStackVersion: import_zod6.z.string().optional(),
|
|
1362
1451
|
/**
|
|
1363
1452
|
* Node.js version requirement
|
|
1364
1453
|
*/
|
|
1365
|
-
nodeVersion:
|
|
1454
|
+
nodeVersion: import_zod6.z.string().optional(),
|
|
1366
1455
|
/**
|
|
1367
1456
|
* Supported platforms
|
|
1368
1457
|
*/
|
|
1369
|
-
platforms:
|
|
1458
|
+
platforms: import_zod6.z.array(import_zod6.z.enum(["linux", "darwin", "win32", "browser"])).optional()
|
|
1370
1459
|
}).optional(),
|
|
1371
1460
|
/**
|
|
1372
1461
|
* Links and resources
|
|
1373
1462
|
*/
|
|
1374
|
-
links:
|
|
1375
|
-
homepage:
|
|
1376
|
-
repository:
|
|
1377
|
-
documentation:
|
|
1378
|
-
bugs:
|
|
1379
|
-
changelog:
|
|
1463
|
+
links: import_zod6.z.object({
|
|
1464
|
+
homepage: import_zod6.z.string().url().optional(),
|
|
1465
|
+
repository: import_zod6.z.string().url().optional(),
|
|
1466
|
+
documentation: import_zod6.z.string().url().optional(),
|
|
1467
|
+
bugs: import_zod6.z.string().url().optional(),
|
|
1468
|
+
changelog: import_zod6.z.string().url().optional()
|
|
1380
1469
|
}).optional(),
|
|
1381
1470
|
/**
|
|
1382
1471
|
* Media assets
|
|
1383
1472
|
*/
|
|
1384
|
-
media:
|
|
1385
|
-
icon:
|
|
1386
|
-
logo:
|
|
1387
|
-
screenshots:
|
|
1388
|
-
video:
|
|
1473
|
+
media: import_zod6.z.object({
|
|
1474
|
+
icon: import_zod6.z.string().url().optional(),
|
|
1475
|
+
logo: import_zod6.z.string().url().optional(),
|
|
1476
|
+
screenshots: import_zod6.z.array(import_zod6.z.string().url()).optional(),
|
|
1477
|
+
video: import_zod6.z.string().url().optional()
|
|
1389
1478
|
}).optional(),
|
|
1390
1479
|
/**
|
|
1391
1480
|
* Quality metrics
|
|
@@ -1398,70 +1487,70 @@ var PluginRegistryEntrySchema = import_zod5.z.object({
|
|
|
1398
1487
|
/**
|
|
1399
1488
|
* License information
|
|
1400
1489
|
*/
|
|
1401
|
-
license:
|
|
1490
|
+
license: import_zod6.z.string().optional().describe("SPDX license identifier"),
|
|
1402
1491
|
/**
|
|
1403
1492
|
* Pricing (if commercial)
|
|
1404
1493
|
*/
|
|
1405
|
-
pricing:
|
|
1406
|
-
model:
|
|
1407
|
-
price:
|
|
1408
|
-
currency:
|
|
1409
|
-
billingPeriod:
|
|
1494
|
+
pricing: import_zod6.z.object({
|
|
1495
|
+
model: import_zod6.z.enum(["free", "freemium", "paid", "enterprise"]),
|
|
1496
|
+
price: import_zod6.z.number().min(0).optional(),
|
|
1497
|
+
currency: import_zod6.z.string().default("USD").optional(),
|
|
1498
|
+
billingPeriod: import_zod6.z.enum(["one-time", "monthly", "yearly"]).optional()
|
|
1410
1499
|
}).optional(),
|
|
1411
1500
|
/**
|
|
1412
1501
|
* Publication dates
|
|
1413
1502
|
*/
|
|
1414
|
-
publishedAt:
|
|
1415
|
-
updatedAt:
|
|
1503
|
+
publishedAt: import_zod6.z.string().datetime().optional(),
|
|
1504
|
+
updatedAt: import_zod6.z.string().datetime().optional(),
|
|
1416
1505
|
/**
|
|
1417
1506
|
* Deprecation status
|
|
1418
1507
|
*/
|
|
1419
|
-
deprecated:
|
|
1420
|
-
deprecationMessage:
|
|
1421
|
-
replacedBy:
|
|
1508
|
+
deprecated: import_zod6.z.boolean().default(false),
|
|
1509
|
+
deprecationMessage: import_zod6.z.string().optional(),
|
|
1510
|
+
replacedBy: import_zod6.z.string().optional().describe("Plugin ID that replaces this one"),
|
|
1422
1511
|
/**
|
|
1423
1512
|
* Feature flags
|
|
1424
1513
|
*/
|
|
1425
|
-
flags:
|
|
1426
|
-
experimental:
|
|
1427
|
-
beta:
|
|
1428
|
-
featured:
|
|
1429
|
-
verified:
|
|
1514
|
+
flags: import_zod6.z.object({
|
|
1515
|
+
experimental: import_zod6.z.boolean().default(false),
|
|
1516
|
+
beta: import_zod6.z.boolean().default(false),
|
|
1517
|
+
featured: import_zod6.z.boolean().default(false),
|
|
1518
|
+
verified: import_zod6.z.boolean().default(false)
|
|
1430
1519
|
}).optional()
|
|
1431
1520
|
});
|
|
1432
|
-
var PluginSearchFiltersSchema =
|
|
1521
|
+
var PluginSearchFiltersSchema = import_zod6.z.object({
|
|
1433
1522
|
/**
|
|
1434
1523
|
* Search query
|
|
1435
1524
|
*/
|
|
1436
|
-
query:
|
|
1525
|
+
query: import_zod6.z.string().optional(),
|
|
1437
1526
|
/**
|
|
1438
1527
|
* Filter by category
|
|
1439
1528
|
*/
|
|
1440
|
-
category:
|
|
1529
|
+
category: import_zod6.z.array(import_zod6.z.string()).optional(),
|
|
1441
1530
|
/**
|
|
1442
1531
|
* Filter by tags
|
|
1443
1532
|
*/
|
|
1444
|
-
tags:
|
|
1533
|
+
tags: import_zod6.z.array(import_zod6.z.string()).optional(),
|
|
1445
1534
|
/**
|
|
1446
1535
|
* Filter by vendor trust level
|
|
1447
1536
|
*/
|
|
1448
|
-
trustLevel:
|
|
1537
|
+
trustLevel: import_zod6.z.array(import_zod6.z.enum(["official", "verified", "community", "unverified"])).optional(),
|
|
1449
1538
|
/**
|
|
1450
1539
|
* Filter by protocols implemented
|
|
1451
1540
|
*/
|
|
1452
|
-
implementsProtocols:
|
|
1541
|
+
implementsProtocols: import_zod6.z.array(import_zod6.z.string()).optional(),
|
|
1453
1542
|
/**
|
|
1454
1543
|
* Filter by pricing model
|
|
1455
1544
|
*/
|
|
1456
|
-
pricingModel:
|
|
1545
|
+
pricingModel: import_zod6.z.array(import_zod6.z.enum(["free", "freemium", "paid", "enterprise"])).optional(),
|
|
1457
1546
|
/**
|
|
1458
1547
|
* Minimum rating
|
|
1459
1548
|
*/
|
|
1460
|
-
minRating:
|
|
1549
|
+
minRating: import_zod6.z.number().min(0).max(5).optional(),
|
|
1461
1550
|
/**
|
|
1462
1551
|
* Sort options
|
|
1463
1552
|
*/
|
|
1464
|
-
sortBy:
|
|
1553
|
+
sortBy: import_zod6.z.enum([
|
|
1465
1554
|
"relevance",
|
|
1466
1555
|
"downloads",
|
|
1467
1556
|
"rating",
|
|
@@ -1471,97 +1560,97 @@ var PluginSearchFiltersSchema = import_zod5.z.object({
|
|
|
1471
1560
|
/**
|
|
1472
1561
|
* Sort order
|
|
1473
1562
|
*/
|
|
1474
|
-
sortOrder:
|
|
1563
|
+
sortOrder: import_zod6.z.enum(["asc", "desc"]).default("desc").optional(),
|
|
1475
1564
|
/**
|
|
1476
1565
|
* Pagination
|
|
1477
1566
|
*/
|
|
1478
|
-
page:
|
|
1479
|
-
limit:
|
|
1567
|
+
page: import_zod6.z.number().int().min(1).default(1).optional(),
|
|
1568
|
+
limit: import_zod6.z.number().int().min(1).max(100).default(20).optional()
|
|
1480
1569
|
});
|
|
1481
|
-
var PluginInstallConfigSchema =
|
|
1570
|
+
var PluginInstallConfigSchema = import_zod6.z.object({
|
|
1482
1571
|
/**
|
|
1483
1572
|
* Plugin identifier to install
|
|
1484
1573
|
*/
|
|
1485
|
-
pluginId:
|
|
1574
|
+
pluginId: import_zod6.z.string(),
|
|
1486
1575
|
/**
|
|
1487
1576
|
* Version to install (supports semver ranges)
|
|
1488
1577
|
*/
|
|
1489
|
-
version:
|
|
1578
|
+
version: import_zod6.z.string().optional().describe("Defaults to latest"),
|
|
1490
1579
|
/**
|
|
1491
1580
|
* Plugin-specific configuration values
|
|
1492
1581
|
*/
|
|
1493
|
-
config:
|
|
1582
|
+
config: import_zod6.z.record(import_zod6.z.string(), import_zod6.z.any()).optional(),
|
|
1494
1583
|
/**
|
|
1495
1584
|
* Whether to auto-update
|
|
1496
1585
|
*/
|
|
1497
|
-
autoUpdate:
|
|
1586
|
+
autoUpdate: import_zod6.z.boolean().default(false).optional(),
|
|
1498
1587
|
/**
|
|
1499
1588
|
* Installation options
|
|
1500
1589
|
*/
|
|
1501
|
-
options:
|
|
1590
|
+
options: import_zod6.z.object({
|
|
1502
1591
|
/**
|
|
1503
1592
|
* Skip dependency installation
|
|
1504
1593
|
*/
|
|
1505
|
-
skipDependencies:
|
|
1594
|
+
skipDependencies: import_zod6.z.boolean().default(false).optional(),
|
|
1506
1595
|
/**
|
|
1507
1596
|
* Force reinstall
|
|
1508
1597
|
*/
|
|
1509
|
-
force:
|
|
1598
|
+
force: import_zod6.z.boolean().default(false).optional(),
|
|
1510
1599
|
/**
|
|
1511
1600
|
* Installation target
|
|
1512
1601
|
*/
|
|
1513
|
-
target:
|
|
1602
|
+
target: import_zod6.z.enum(["system", "space", "user"]).default("space").optional()
|
|
1514
1603
|
}).optional()
|
|
1515
1604
|
});
|
|
1516
1605
|
|
|
1517
1606
|
// src/hub/marketplace.zod.ts
|
|
1518
1607
|
var PluginAuthorSchema = PluginVendorSchema;
|
|
1519
|
-
var PluginPricingSchema =
|
|
1520
|
-
type:
|
|
1521
|
-
currency:
|
|
1522
|
-
amount:
|
|
1523
|
-
interval:
|
|
1524
|
-
trialDays:
|
|
1608
|
+
var PluginPricingSchema = import_zod7.z.object({
|
|
1609
|
+
type: import_zod7.z.enum(["free", "one_time", "recurring"]),
|
|
1610
|
+
currency: import_zod7.z.string().default("USD"),
|
|
1611
|
+
amount: import_zod7.z.number().min(0),
|
|
1612
|
+
interval: import_zod7.z.enum(["month", "year"]).optional().describe("Required if type is recurring"),
|
|
1613
|
+
trialDays: import_zod7.z.number().int().optional()
|
|
1525
1614
|
});
|
|
1526
|
-
var PluginVersionSchema =
|
|
1527
|
-
version:
|
|
1528
|
-
publishedAt:
|
|
1529
|
-
downloadUrl:
|
|
1530
|
-
checksum:
|
|
1531
|
-
engine:
|
|
1532
|
-
node:
|
|
1533
|
-
objectstack:
|
|
1615
|
+
var PluginVersionSchema = import_zod7.z.object({
|
|
1616
|
+
version: import_zod7.z.string().describe("SemVer string (e.g. 1.0.0)"),
|
|
1617
|
+
publishedAt: import_zod7.z.string().datetime().describe("Publication date"),
|
|
1618
|
+
downloadUrl: import_zod7.z.string().url().describe("Archive download URL"),
|
|
1619
|
+
checksum: import_zod7.z.string().optional().describe("Integrity checksum (shasum)"),
|
|
1620
|
+
engine: import_zod7.z.object({
|
|
1621
|
+
node: import_zod7.z.string().optional(),
|
|
1622
|
+
objectstack: import_zod7.z.string().describe("Required ObjectStack kernel version range")
|
|
1534
1623
|
}).optional().describe("Engine compatibility"),
|
|
1535
|
-
dependencies:
|
|
1536
|
-
changeLog:
|
|
1624
|
+
dependencies: import_zod7.z.record(import_zod7.z.string(), import_zod7.z.string()).optional().describe("Runtime plugin dependencies"),
|
|
1625
|
+
changeLog: import_zod7.z.string().optional().describe("Release notes")
|
|
1537
1626
|
});
|
|
1538
|
-
var MarketplacePluginSchema =
|
|
1627
|
+
var MarketplacePluginSchema = import_zod7.z.object({
|
|
1539
1628
|
/**
|
|
1540
1629
|
* Package Identifier
|
|
1541
1630
|
* Usually the NPM package name (e.g. "@steedos/plugin-crm")
|
|
1542
1631
|
*/
|
|
1543
|
-
id:
|
|
1632
|
+
id: import_zod7.z.string(),
|
|
1544
1633
|
/**
|
|
1545
1634
|
* Version History
|
|
1546
1635
|
* Registry of all available versions
|
|
1547
1636
|
*/
|
|
1548
|
-
versions:
|
|
1637
|
+
versions: import_zod7.z.record(import_zod7.z.string(), PluginVersionSchema).optional().describe("Map of versions (1.0.0) -> Details"),
|
|
1549
1638
|
/**
|
|
1550
1639
|
* Display Name
|
|
1551
1640
|
*/
|
|
1552
|
-
label:
|
|
1641
|
+
label: import_zod7.z.string(),
|
|
1553
1642
|
/**
|
|
1554
1643
|
* Short Description
|
|
1555
1644
|
*/
|
|
1556
|
-
description:
|
|
1645
|
+
description: import_zod7.z.string().optional(),
|
|
1557
1646
|
/**
|
|
1558
1647
|
* Detailed README / Documentation content
|
|
1559
1648
|
*/
|
|
1560
|
-
readme:
|
|
1649
|
+
readme: import_zod7.z.string().optional(),
|
|
1561
1650
|
/**
|
|
1562
1651
|
* Latest Version
|
|
1563
1652
|
*/
|
|
1564
|
-
version:
|
|
1653
|
+
version: import_zod7.z.string(),
|
|
1565
1654
|
/**
|
|
1566
1655
|
* Vendor / Publisher
|
|
1567
1656
|
*/
|
|
@@ -1569,8 +1658,8 @@ var MarketplacePluginSchema = import_zod6.z.object({
|
|
|
1569
1658
|
/**
|
|
1570
1659
|
* Categorization
|
|
1571
1660
|
*/
|
|
1572
|
-
tags:
|
|
1573
|
-
category:
|
|
1661
|
+
tags: import_zod7.z.array(import_zod7.z.string()).optional(),
|
|
1662
|
+
category: import_zod7.z.enum([
|
|
1574
1663
|
"app",
|
|
1575
1664
|
"integration",
|
|
1576
1665
|
"theme",
|
|
@@ -1585,29 +1674,29 @@ var MarketplacePluginSchema = import_zod6.z.object({
|
|
|
1585
1674
|
/**
|
|
1586
1675
|
* Assets
|
|
1587
1676
|
*/
|
|
1588
|
-
icon:
|
|
1589
|
-
screenshots:
|
|
1677
|
+
icon: import_zod7.z.string().url().optional(),
|
|
1678
|
+
screenshots: import_zod7.z.array(import_zod7.z.string().url()).optional(),
|
|
1590
1679
|
/**
|
|
1591
1680
|
* Links
|
|
1592
1681
|
*/
|
|
1593
|
-
homepage:
|
|
1594
|
-
repository:
|
|
1595
|
-
bugs:
|
|
1682
|
+
homepage: import_zod7.z.string().url().optional(),
|
|
1683
|
+
repository: import_zod7.z.string().url().optional(),
|
|
1684
|
+
bugs: import_zod7.z.string().url().optional(),
|
|
1596
1685
|
/**
|
|
1597
1686
|
* Statistics
|
|
1598
1687
|
*/
|
|
1599
|
-
downloads:
|
|
1600
|
-
rating:
|
|
1688
|
+
downloads: import_zod7.z.number().int().optional(),
|
|
1689
|
+
rating: import_zod7.z.number().min(0).max(5).optional(),
|
|
1601
1690
|
/**
|
|
1602
1691
|
* Commercial Information
|
|
1603
1692
|
*/
|
|
1604
1693
|
pricing: PluginPricingSchema.optional(),
|
|
1605
|
-
verified:
|
|
1694
|
+
verified: import_zod7.z.boolean().default(false).describe("Is verified maintaned by ObjectStack")
|
|
1606
1695
|
});
|
|
1607
1696
|
|
|
1608
1697
|
// src/hub/registry-config.zod.ts
|
|
1609
|
-
var
|
|
1610
|
-
var RegistrySyncPolicySchema =
|
|
1698
|
+
var import_zod8 = require("zod");
|
|
1699
|
+
var RegistrySyncPolicySchema = import_zod8.z.enum([
|
|
1611
1700
|
"manual",
|
|
1612
1701
|
// Manual synchronization only
|
|
1613
1702
|
"auto",
|
|
@@ -1615,11 +1704,11 @@ var RegistrySyncPolicySchema = import_zod7.z.enum([
|
|
|
1615
1704
|
"proxy"
|
|
1616
1705
|
// Proxy requests to upstream without caching
|
|
1617
1706
|
]).describe("Registry synchronization strategy");
|
|
1618
|
-
var RegistryUpstreamSchema =
|
|
1707
|
+
var RegistryUpstreamSchema = import_zod8.z.object({
|
|
1619
1708
|
/**
|
|
1620
1709
|
* Upstream registry URL
|
|
1621
1710
|
*/
|
|
1622
|
-
url:
|
|
1711
|
+
url: import_zod8.z.string().url().describe("Upstream registry endpoint"),
|
|
1623
1712
|
/**
|
|
1624
1713
|
* Synchronization policy
|
|
1625
1714
|
*/
|
|
@@ -1627,43 +1716,43 @@ var RegistryUpstreamSchema = import_zod7.z.object({
|
|
|
1627
1716
|
/**
|
|
1628
1717
|
* Sync interval in seconds (for auto sync)
|
|
1629
1718
|
*/
|
|
1630
|
-
syncInterval:
|
|
1719
|
+
syncInterval: import_zod8.z.number().int().min(60).optional().describe("Auto-sync interval in seconds"),
|
|
1631
1720
|
/**
|
|
1632
1721
|
* Authentication credentials
|
|
1633
1722
|
*/
|
|
1634
|
-
auth:
|
|
1635
|
-
type:
|
|
1636
|
-
username:
|
|
1637
|
-
password:
|
|
1638
|
-
token:
|
|
1639
|
-
apiKey:
|
|
1723
|
+
auth: import_zod8.z.object({
|
|
1724
|
+
type: import_zod8.z.enum(["none", "basic", "bearer", "api-key", "oauth2"]).default("none"),
|
|
1725
|
+
username: import_zod8.z.string().optional(),
|
|
1726
|
+
password: import_zod8.z.string().optional(),
|
|
1727
|
+
token: import_zod8.z.string().optional(),
|
|
1728
|
+
apiKey: import_zod8.z.string().optional()
|
|
1640
1729
|
}).optional(),
|
|
1641
1730
|
/**
|
|
1642
1731
|
* TLS/SSL configuration
|
|
1643
1732
|
*/
|
|
1644
|
-
tls:
|
|
1645
|
-
enabled:
|
|
1646
|
-
verifyCertificate:
|
|
1647
|
-
certificate:
|
|
1648
|
-
privateKey:
|
|
1733
|
+
tls: import_zod8.z.object({
|
|
1734
|
+
enabled: import_zod8.z.boolean().default(true),
|
|
1735
|
+
verifyCertificate: import_zod8.z.boolean().default(true),
|
|
1736
|
+
certificate: import_zod8.z.string().optional(),
|
|
1737
|
+
privateKey: import_zod8.z.string().optional()
|
|
1649
1738
|
}).optional(),
|
|
1650
1739
|
/**
|
|
1651
1740
|
* Timeout settings
|
|
1652
1741
|
*/
|
|
1653
|
-
timeout:
|
|
1742
|
+
timeout: import_zod8.z.number().int().min(1e3).default(3e4).describe("Request timeout in milliseconds"),
|
|
1654
1743
|
/**
|
|
1655
1744
|
* Retry configuration
|
|
1656
1745
|
*/
|
|
1657
|
-
retry:
|
|
1658
|
-
maxAttempts:
|
|
1659
|
-
backoff:
|
|
1746
|
+
retry: import_zod8.z.object({
|
|
1747
|
+
maxAttempts: import_zod8.z.number().int().min(0).default(3),
|
|
1748
|
+
backoff: import_zod8.z.enum(["fixed", "linear", "exponential"]).default("exponential")
|
|
1660
1749
|
}).optional()
|
|
1661
1750
|
});
|
|
1662
|
-
var RegistryConfigSchema =
|
|
1751
|
+
var RegistryConfigSchema = import_zod8.z.object({
|
|
1663
1752
|
/**
|
|
1664
1753
|
* Registry type
|
|
1665
1754
|
*/
|
|
1666
|
-
type:
|
|
1755
|
+
type: import_zod8.z.enum([
|
|
1667
1756
|
"public",
|
|
1668
1757
|
// Public marketplace (e.g., plugins.objectstack.com)
|
|
1669
1758
|
"private",
|
|
@@ -1674,76 +1763,76 @@ var RegistryConfigSchema = import_zod7.z.object({
|
|
|
1674
1763
|
/**
|
|
1675
1764
|
* Upstream registries (for hybrid/private registries)
|
|
1676
1765
|
*/
|
|
1677
|
-
upstream:
|
|
1766
|
+
upstream: import_zod8.z.array(RegistryUpstreamSchema).optional().describe("Upstream registries to sync from or proxy to"),
|
|
1678
1767
|
/**
|
|
1679
1768
|
* Scopes managed by this registry
|
|
1680
1769
|
*/
|
|
1681
|
-
scope:
|
|
1770
|
+
scope: import_zod8.z.array(import_zod8.z.string()).optional().describe("npm-style scopes managed by this registry (e.g., @my-corp, @enterprise)"),
|
|
1682
1771
|
/**
|
|
1683
1772
|
* Default scope for new plugins
|
|
1684
1773
|
*/
|
|
1685
|
-
defaultScope:
|
|
1774
|
+
defaultScope: import_zod8.z.string().optional().describe("Default scope prefix for new plugins"),
|
|
1686
1775
|
/**
|
|
1687
1776
|
* Registry storage configuration
|
|
1688
1777
|
*/
|
|
1689
|
-
storage:
|
|
1778
|
+
storage: import_zod8.z.object({
|
|
1690
1779
|
/**
|
|
1691
1780
|
* Storage backend type
|
|
1692
1781
|
*/
|
|
1693
|
-
backend:
|
|
1782
|
+
backend: import_zod8.z.enum(["local", "s3", "gcs", "azure-blob", "oss"]).default("local"),
|
|
1694
1783
|
/**
|
|
1695
1784
|
* Storage path or bucket name
|
|
1696
1785
|
*/
|
|
1697
|
-
path:
|
|
1786
|
+
path: import_zod8.z.string().optional(),
|
|
1698
1787
|
/**
|
|
1699
1788
|
* Credentials
|
|
1700
1789
|
*/
|
|
1701
|
-
credentials:
|
|
1790
|
+
credentials: import_zod8.z.record(import_zod8.z.string(), import_zod8.z.any()).optional()
|
|
1702
1791
|
}).optional(),
|
|
1703
1792
|
/**
|
|
1704
1793
|
* Registry visibility
|
|
1705
1794
|
*/
|
|
1706
|
-
visibility:
|
|
1795
|
+
visibility: import_zod8.z.enum(["public", "private", "internal"]).default("private").describe("Who can access this registry"),
|
|
1707
1796
|
/**
|
|
1708
1797
|
* Access control
|
|
1709
1798
|
*/
|
|
1710
|
-
accessControl:
|
|
1799
|
+
accessControl: import_zod8.z.object({
|
|
1711
1800
|
/**
|
|
1712
1801
|
* Require authentication for read
|
|
1713
1802
|
*/
|
|
1714
|
-
requireAuthForRead:
|
|
1803
|
+
requireAuthForRead: import_zod8.z.boolean().default(false),
|
|
1715
1804
|
/**
|
|
1716
1805
|
* Require authentication for write
|
|
1717
1806
|
*/
|
|
1718
|
-
requireAuthForWrite:
|
|
1807
|
+
requireAuthForWrite: import_zod8.z.boolean().default(true),
|
|
1719
1808
|
/**
|
|
1720
1809
|
* Allowed users/teams
|
|
1721
1810
|
*/
|
|
1722
|
-
allowedPrincipals:
|
|
1811
|
+
allowedPrincipals: import_zod8.z.array(import_zod8.z.string()).optional()
|
|
1723
1812
|
}).optional(),
|
|
1724
1813
|
/**
|
|
1725
1814
|
* Caching configuration
|
|
1726
1815
|
*/
|
|
1727
|
-
cache:
|
|
1728
|
-
enabled:
|
|
1729
|
-
ttl:
|
|
1730
|
-
maxSize:
|
|
1816
|
+
cache: import_zod8.z.object({
|
|
1817
|
+
enabled: import_zod8.z.boolean().default(true),
|
|
1818
|
+
ttl: import_zod8.z.number().int().min(0).default(3600).describe("Cache TTL in seconds"),
|
|
1819
|
+
maxSize: import_zod8.z.number().int().optional().describe("Maximum cache size in bytes")
|
|
1731
1820
|
}).optional(),
|
|
1732
1821
|
/**
|
|
1733
1822
|
* Mirroring configuration (for high availability)
|
|
1734
1823
|
*/
|
|
1735
|
-
mirrors:
|
|
1736
|
-
url:
|
|
1737
|
-
priority:
|
|
1824
|
+
mirrors: import_zod8.z.array(import_zod8.z.object({
|
|
1825
|
+
url: import_zod8.z.string().url(),
|
|
1826
|
+
priority: import_zod8.z.number().int().min(1).default(1)
|
|
1738
1827
|
})).optional().describe("Mirror registries for redundancy")
|
|
1739
1828
|
});
|
|
1740
1829
|
|
|
1741
1830
|
// src/hub/space.zod.ts
|
|
1742
|
-
var
|
|
1831
|
+
var import_zod10 = require("zod");
|
|
1743
1832
|
|
|
1744
1833
|
// src/hub/tenant.zod.ts
|
|
1745
|
-
var
|
|
1746
|
-
var TenantIsolationLevel =
|
|
1834
|
+
var import_zod9 = require("zod");
|
|
1835
|
+
var TenantIsolationLevel = import_zod9.z.enum([
|
|
1747
1836
|
"shared_schema",
|
|
1748
1837
|
// Shared DB, shared schema, row-level isolation (most economical)
|
|
1749
1838
|
"isolated_schema",
|
|
@@ -1751,29 +1840,29 @@ var TenantIsolationLevel = import_zod8.z.enum([
|
|
|
1751
1840
|
"isolated_db"
|
|
1752
1841
|
// Separate database per tenant (maximum isolation)
|
|
1753
1842
|
]);
|
|
1754
|
-
var TenantQuotaSchema =
|
|
1843
|
+
var TenantQuotaSchema = import_zod9.z.object({
|
|
1755
1844
|
/**
|
|
1756
1845
|
* Maximum number of users allowed for this tenant
|
|
1757
1846
|
*/
|
|
1758
|
-
maxUsers:
|
|
1847
|
+
maxUsers: import_zod9.z.number().int().positive().optional().describe("Maximum number of users"),
|
|
1759
1848
|
/**
|
|
1760
1849
|
* Maximum storage space in bytes
|
|
1761
1850
|
*/
|
|
1762
|
-
maxStorage:
|
|
1851
|
+
maxStorage: import_zod9.z.number().int().positive().optional().describe("Maximum storage in bytes"),
|
|
1763
1852
|
/**
|
|
1764
1853
|
* API rate limit (requests per minute)
|
|
1765
1854
|
*/
|
|
1766
|
-
apiRateLimit:
|
|
1855
|
+
apiRateLimit: import_zod9.z.number().int().positive().optional().describe("API requests per minute")
|
|
1767
1856
|
});
|
|
1768
|
-
var TenantSchema =
|
|
1857
|
+
var TenantSchema = import_zod9.z.object({
|
|
1769
1858
|
/**
|
|
1770
1859
|
* Unique tenant identifier
|
|
1771
1860
|
*/
|
|
1772
|
-
id:
|
|
1861
|
+
id: import_zod9.z.string().describe("Unique tenant identifier"),
|
|
1773
1862
|
/**
|
|
1774
1863
|
* Tenant display name
|
|
1775
1864
|
*/
|
|
1776
|
-
name:
|
|
1865
|
+
name: import_zod9.z.string().describe("Tenant display name"),
|
|
1777
1866
|
/**
|
|
1778
1867
|
* Data isolation level
|
|
1779
1868
|
*/
|
|
@@ -1781,26 +1870,26 @@ var TenantSchema = import_zod8.z.object({
|
|
|
1781
1870
|
/**
|
|
1782
1871
|
* Custom configuration values
|
|
1783
1872
|
*/
|
|
1784
|
-
customizations:
|
|
1873
|
+
customizations: import_zod9.z.record(import_zod9.z.string(), import_zod9.z.any()).optional().describe("Custom configuration values"),
|
|
1785
1874
|
/**
|
|
1786
1875
|
* Resource quotas
|
|
1787
1876
|
*/
|
|
1788
1877
|
quotas: TenantQuotaSchema.optional()
|
|
1789
1878
|
});
|
|
1790
|
-
var RowLevelIsolationStrategySchema =
|
|
1791
|
-
strategy:
|
|
1879
|
+
var RowLevelIsolationStrategySchema = import_zod9.z.object({
|
|
1880
|
+
strategy: import_zod9.z.literal("shared_schema").describe("Row-level isolation strategy"),
|
|
1792
1881
|
/**
|
|
1793
1882
|
* Database configuration for row-level isolation
|
|
1794
1883
|
*/
|
|
1795
|
-
database:
|
|
1884
|
+
database: import_zod9.z.object({
|
|
1796
1885
|
/**
|
|
1797
1886
|
* Whether to enable Row-Level Security (RLS)
|
|
1798
1887
|
*/
|
|
1799
|
-
enableRLS:
|
|
1888
|
+
enableRLS: import_zod9.z.boolean().default(true).describe("Enable PostgreSQL Row-Level Security"),
|
|
1800
1889
|
/**
|
|
1801
1890
|
* Tenant context setting method
|
|
1802
1891
|
*/
|
|
1803
|
-
contextMethod:
|
|
1892
|
+
contextMethod: import_zod9.z.enum([
|
|
1804
1893
|
"session_variable",
|
|
1805
1894
|
// SET app.current_tenant = 'tenant_123'
|
|
1806
1895
|
"search_path",
|
|
@@ -1811,63 +1900,63 @@ var RowLevelIsolationStrategySchema = import_zod8.z.object({
|
|
|
1811
1900
|
/**
|
|
1812
1901
|
* Session variable name for tenant context
|
|
1813
1902
|
*/
|
|
1814
|
-
contextVariable:
|
|
1903
|
+
contextVariable: import_zod9.z.string().default("app.current_tenant").describe("Session variable name"),
|
|
1815
1904
|
/**
|
|
1816
1905
|
* Whether to validate tenant_id at application level
|
|
1817
1906
|
*/
|
|
1818
|
-
applicationValidation:
|
|
1907
|
+
applicationValidation: import_zod9.z.boolean().default(true).describe("Application-level tenant validation")
|
|
1819
1908
|
}).optional().describe("Database configuration"),
|
|
1820
1909
|
/**
|
|
1821
1910
|
* Performance optimization settings
|
|
1822
1911
|
*/
|
|
1823
|
-
performance:
|
|
1912
|
+
performance: import_zod9.z.object({
|
|
1824
1913
|
/**
|
|
1825
1914
|
* Whether to use partial indexes for tenant_id
|
|
1826
1915
|
*/
|
|
1827
|
-
usePartialIndexes:
|
|
1916
|
+
usePartialIndexes: import_zod9.z.boolean().default(true).describe("Use partial indexes per tenant"),
|
|
1828
1917
|
/**
|
|
1829
1918
|
* Whether to use table partitioning
|
|
1830
1919
|
*/
|
|
1831
|
-
usePartitioning:
|
|
1920
|
+
usePartitioning: import_zod9.z.boolean().default(false).describe("Use table partitioning by tenant_id"),
|
|
1832
1921
|
/**
|
|
1833
1922
|
* Connection pool size per tenant
|
|
1834
1923
|
*/
|
|
1835
|
-
poolSizePerTenant:
|
|
1924
|
+
poolSizePerTenant: import_zod9.z.number().int().positive().optional().describe("Connection pool size per tenant")
|
|
1836
1925
|
}).optional().describe("Performance settings")
|
|
1837
1926
|
});
|
|
1838
|
-
var SchemaLevelIsolationStrategySchema =
|
|
1839
|
-
strategy:
|
|
1927
|
+
var SchemaLevelIsolationStrategySchema = import_zod9.z.object({
|
|
1928
|
+
strategy: import_zod9.z.literal("isolated_schema").describe("Schema-level isolation strategy"),
|
|
1840
1929
|
/**
|
|
1841
1930
|
* Schema configuration
|
|
1842
1931
|
*/
|
|
1843
|
-
schema:
|
|
1932
|
+
schema: import_zod9.z.object({
|
|
1844
1933
|
/**
|
|
1845
1934
|
* Schema naming pattern
|
|
1846
1935
|
* Use {tenant_id} as placeholder (must contain only alphanumeric and underscores)
|
|
1847
1936
|
* The tenant_id will be sanitized before substitution to prevent SQL injection
|
|
1848
1937
|
*/
|
|
1849
|
-
namingPattern:
|
|
1938
|
+
namingPattern: import_zod9.z.string().default("tenant_{tenant_id}").describe("Schema naming pattern"),
|
|
1850
1939
|
/**
|
|
1851
1940
|
* Whether to include public schema in search_path
|
|
1852
1941
|
*/
|
|
1853
|
-
includePublicSchema:
|
|
1942
|
+
includePublicSchema: import_zod9.z.boolean().default(true).describe("Include public schema"),
|
|
1854
1943
|
/**
|
|
1855
1944
|
* Default schema for shared resources
|
|
1856
1945
|
*/
|
|
1857
|
-
sharedSchema:
|
|
1946
|
+
sharedSchema: import_zod9.z.string().default("public").describe("Schema for shared resources"),
|
|
1858
1947
|
/**
|
|
1859
1948
|
* Whether to automatically create schema on tenant creation
|
|
1860
1949
|
*/
|
|
1861
|
-
autoCreateSchema:
|
|
1950
|
+
autoCreateSchema: import_zod9.z.boolean().default(true).describe("Auto-create schema")
|
|
1862
1951
|
}).optional().describe("Schema configuration"),
|
|
1863
1952
|
/**
|
|
1864
1953
|
* Migration configuration
|
|
1865
1954
|
*/
|
|
1866
|
-
migrations:
|
|
1955
|
+
migrations: import_zod9.z.object({
|
|
1867
1956
|
/**
|
|
1868
1957
|
* Migration strategy
|
|
1869
1958
|
*/
|
|
1870
|
-
strategy:
|
|
1959
|
+
strategy: import_zod9.z.enum([
|
|
1871
1960
|
"parallel",
|
|
1872
1961
|
// Run migrations on all schemas in parallel
|
|
1873
1962
|
"sequential",
|
|
@@ -1878,42 +1967,42 @@ var SchemaLevelIsolationStrategySchema = import_zod8.z.object({
|
|
|
1878
1967
|
/**
|
|
1879
1968
|
* Maximum concurrent migrations
|
|
1880
1969
|
*/
|
|
1881
|
-
maxConcurrent:
|
|
1970
|
+
maxConcurrent: import_zod9.z.number().int().positive().default(10).describe("Max concurrent migrations"),
|
|
1882
1971
|
/**
|
|
1883
1972
|
* Whether to rollback on first failure
|
|
1884
1973
|
*/
|
|
1885
|
-
rollbackOnError:
|
|
1974
|
+
rollbackOnError: import_zod9.z.boolean().default(true).describe("Rollback on error")
|
|
1886
1975
|
}).optional().describe("Migration configuration"),
|
|
1887
1976
|
/**
|
|
1888
1977
|
* Performance optimization settings
|
|
1889
1978
|
*/
|
|
1890
|
-
performance:
|
|
1979
|
+
performance: import_zod9.z.object({
|
|
1891
1980
|
/**
|
|
1892
1981
|
* Whether to use connection pooling per schema
|
|
1893
1982
|
*/
|
|
1894
|
-
poolPerSchema:
|
|
1983
|
+
poolPerSchema: import_zod9.z.boolean().default(false).describe("Separate pool per schema"),
|
|
1895
1984
|
/**
|
|
1896
1985
|
* Schema cache TTL in seconds
|
|
1897
1986
|
*/
|
|
1898
|
-
schemaCacheTTL:
|
|
1987
|
+
schemaCacheTTL: import_zod9.z.number().int().positive().default(3600).describe("Schema cache TTL")
|
|
1899
1988
|
}).optional().describe("Performance settings")
|
|
1900
1989
|
});
|
|
1901
|
-
var DatabaseLevelIsolationStrategySchema =
|
|
1902
|
-
strategy:
|
|
1990
|
+
var DatabaseLevelIsolationStrategySchema = import_zod9.z.object({
|
|
1991
|
+
strategy: import_zod9.z.literal("isolated_db").describe("Database-level isolation strategy"),
|
|
1903
1992
|
/**
|
|
1904
1993
|
* Database configuration
|
|
1905
1994
|
*/
|
|
1906
|
-
database:
|
|
1995
|
+
database: import_zod9.z.object({
|
|
1907
1996
|
/**
|
|
1908
1997
|
* Database naming pattern
|
|
1909
1998
|
* Use {tenant_id} as placeholder (must contain only alphanumeric and underscores)
|
|
1910
1999
|
* The tenant_id will be sanitized before substitution to prevent SQL injection
|
|
1911
2000
|
*/
|
|
1912
|
-
namingPattern:
|
|
2001
|
+
namingPattern: import_zod9.z.string().default("tenant_{tenant_id}").describe("Database naming pattern"),
|
|
1913
2002
|
/**
|
|
1914
2003
|
* Database server/cluster assignment strategy
|
|
1915
2004
|
*/
|
|
1916
|
-
serverStrategy:
|
|
2005
|
+
serverStrategy: import_zod9.z.enum([
|
|
1917
2006
|
"shared",
|
|
1918
2007
|
// All tenant databases on same server
|
|
1919
2008
|
"sharded",
|
|
@@ -1924,41 +2013,41 @@ var DatabaseLevelIsolationStrategySchema = import_zod8.z.object({
|
|
|
1924
2013
|
/**
|
|
1925
2014
|
* Whether to use separate credentials per tenant
|
|
1926
2015
|
*/
|
|
1927
|
-
separateCredentials:
|
|
2016
|
+
separateCredentials: import_zod9.z.boolean().default(true).describe("Separate credentials per tenant"),
|
|
1928
2017
|
/**
|
|
1929
2018
|
* Whether to automatically create database on tenant creation
|
|
1930
2019
|
*/
|
|
1931
|
-
autoCreateDatabase:
|
|
2020
|
+
autoCreateDatabase: import_zod9.z.boolean().default(true).describe("Auto-create database")
|
|
1932
2021
|
}).optional().describe("Database configuration"),
|
|
1933
2022
|
/**
|
|
1934
2023
|
* Connection pooling configuration
|
|
1935
2024
|
*/
|
|
1936
|
-
connectionPool:
|
|
2025
|
+
connectionPool: import_zod9.z.object({
|
|
1937
2026
|
/**
|
|
1938
2027
|
* Pool size per tenant database
|
|
1939
2028
|
*/
|
|
1940
|
-
poolSize:
|
|
2029
|
+
poolSize: import_zod9.z.number().int().positive().default(10).describe("Connection pool size"),
|
|
1941
2030
|
/**
|
|
1942
2031
|
* Maximum number of tenant pools to keep active
|
|
1943
2032
|
*/
|
|
1944
|
-
maxActivePools:
|
|
2033
|
+
maxActivePools: import_zod9.z.number().int().positive().default(100).describe("Max active pools"),
|
|
1945
2034
|
/**
|
|
1946
2035
|
* Idle pool timeout in seconds
|
|
1947
2036
|
*/
|
|
1948
|
-
idleTimeout:
|
|
2037
|
+
idleTimeout: import_zod9.z.number().int().positive().default(300).describe("Idle pool timeout"),
|
|
1949
2038
|
/**
|
|
1950
2039
|
* Whether to use connection pooler (PgBouncer, etc.)
|
|
1951
2040
|
*/
|
|
1952
|
-
usePooler:
|
|
2041
|
+
usePooler: import_zod9.z.boolean().default(true).describe("Use connection pooler")
|
|
1953
2042
|
}).optional().describe("Connection pool configuration"),
|
|
1954
2043
|
/**
|
|
1955
2044
|
* Backup and restore configuration
|
|
1956
2045
|
*/
|
|
1957
|
-
backup:
|
|
2046
|
+
backup: import_zod9.z.object({
|
|
1958
2047
|
/**
|
|
1959
2048
|
* Backup strategy per tenant
|
|
1960
2049
|
*/
|
|
1961
|
-
strategy:
|
|
2050
|
+
strategy: import_zod9.z.enum([
|
|
1962
2051
|
"individual",
|
|
1963
2052
|
// Separate backup per tenant
|
|
1964
2053
|
"consolidated",
|
|
@@ -1969,82 +2058,82 @@ var DatabaseLevelIsolationStrategySchema = import_zod8.z.object({
|
|
|
1969
2058
|
/**
|
|
1970
2059
|
* Backup frequency in hours
|
|
1971
2060
|
*/
|
|
1972
|
-
frequencyHours:
|
|
2061
|
+
frequencyHours: import_zod9.z.number().int().positive().default(24).describe("Backup frequency"),
|
|
1973
2062
|
/**
|
|
1974
2063
|
* Retention period in days
|
|
1975
2064
|
*/
|
|
1976
|
-
retentionDays:
|
|
2065
|
+
retentionDays: import_zod9.z.number().int().positive().default(30).describe("Backup retention days")
|
|
1977
2066
|
}).optional().describe("Backup configuration"),
|
|
1978
2067
|
/**
|
|
1979
2068
|
* Encryption configuration
|
|
1980
2069
|
*/
|
|
1981
|
-
encryption:
|
|
2070
|
+
encryption: import_zod9.z.object({
|
|
1982
2071
|
/**
|
|
1983
2072
|
* Whether to use per-tenant encryption keys
|
|
1984
2073
|
*/
|
|
1985
|
-
perTenantKeys:
|
|
2074
|
+
perTenantKeys: import_zod9.z.boolean().default(false).describe("Per-tenant encryption keys"),
|
|
1986
2075
|
/**
|
|
1987
2076
|
* Encryption algorithm
|
|
1988
2077
|
*/
|
|
1989
|
-
algorithm:
|
|
2078
|
+
algorithm: import_zod9.z.string().default("AES-256-GCM").describe("Encryption algorithm"),
|
|
1990
2079
|
/**
|
|
1991
2080
|
* Key management service
|
|
1992
2081
|
*/
|
|
1993
|
-
keyManagement:
|
|
2082
|
+
keyManagement: import_zod9.z.enum(["aws_kms", "azure_key_vault", "gcp_kms", "hashicorp_vault", "custom"]).optional().describe("Key management service")
|
|
1994
2083
|
}).optional().describe("Encryption configuration")
|
|
1995
2084
|
});
|
|
1996
|
-
var TenantIsolationConfigSchema =
|
|
2085
|
+
var TenantIsolationConfigSchema = import_zod9.z.discriminatedUnion("strategy", [
|
|
1997
2086
|
RowLevelIsolationStrategySchema,
|
|
1998
2087
|
SchemaLevelIsolationStrategySchema,
|
|
1999
2088
|
DatabaseLevelIsolationStrategySchema
|
|
2000
2089
|
]);
|
|
2001
|
-
var TenantSecurityPolicySchema =
|
|
2090
|
+
var TenantSecurityPolicySchema = import_zod9.z.object({
|
|
2002
2091
|
/**
|
|
2003
2092
|
* Encryption requirements
|
|
2004
2093
|
*/
|
|
2005
|
-
encryption:
|
|
2094
|
+
encryption: import_zod9.z.object({
|
|
2006
2095
|
/**
|
|
2007
2096
|
* Require encryption at rest
|
|
2008
2097
|
*/
|
|
2009
|
-
atRest:
|
|
2098
|
+
atRest: import_zod9.z.boolean().default(true).describe("Require encryption at rest"),
|
|
2010
2099
|
/**
|
|
2011
2100
|
* Require encryption in transit
|
|
2012
2101
|
*/
|
|
2013
|
-
inTransit:
|
|
2102
|
+
inTransit: import_zod9.z.boolean().default(true).describe("Require encryption in transit"),
|
|
2014
2103
|
/**
|
|
2015
2104
|
* Require field-level encryption for sensitive data
|
|
2016
2105
|
*/
|
|
2017
|
-
fieldLevel:
|
|
2106
|
+
fieldLevel: import_zod9.z.boolean().default(false).describe("Require field-level encryption")
|
|
2018
2107
|
}).optional().describe("Encryption requirements"),
|
|
2019
2108
|
/**
|
|
2020
2109
|
* Access control requirements
|
|
2021
2110
|
*/
|
|
2022
|
-
accessControl:
|
|
2111
|
+
accessControl: import_zod9.z.object({
|
|
2023
2112
|
/**
|
|
2024
2113
|
* Require multi-factor authentication
|
|
2025
2114
|
*/
|
|
2026
|
-
requireMFA:
|
|
2115
|
+
requireMFA: import_zod9.z.boolean().default(false).describe("Require MFA"),
|
|
2027
2116
|
/**
|
|
2028
2117
|
* Require SSO/SAML authentication
|
|
2029
2118
|
*/
|
|
2030
|
-
requireSSO:
|
|
2119
|
+
requireSSO: import_zod9.z.boolean().default(false).describe("Require SSO"),
|
|
2031
2120
|
/**
|
|
2032
2121
|
* IP whitelist
|
|
2033
2122
|
*/
|
|
2034
|
-
ipWhitelist:
|
|
2123
|
+
ipWhitelist: import_zod9.z.array(import_zod9.z.string()).optional().describe("Allowed IP addresses"),
|
|
2035
2124
|
/**
|
|
2036
2125
|
* Session timeout in seconds
|
|
2037
2126
|
*/
|
|
2038
|
-
sessionTimeout:
|
|
2127
|
+
sessionTimeout: import_zod9.z.number().int().positive().default(3600).describe("Session timeout")
|
|
2039
2128
|
}).optional().describe("Access control requirements"),
|
|
2040
2129
|
/**
|
|
2041
2130
|
* Audit and compliance requirements
|
|
2042
2131
|
*/
|
|
2043
|
-
compliance:
|
|
2132
|
+
compliance: import_zod9.z.object({
|
|
2044
2133
|
/**
|
|
2045
2134
|
* Compliance standards to enforce
|
|
2046
2135
|
*/
|
|
2047
|
-
standards:
|
|
2136
|
+
standards: import_zod9.z.array(import_zod9.z.enum([
|
|
2048
2137
|
"sox",
|
|
2049
2138
|
"hipaa",
|
|
2050
2139
|
"gdpr",
|
|
@@ -2055,77 +2144,77 @@ var TenantSecurityPolicySchema = import_zod8.z.object({
|
|
|
2055
2144
|
/**
|
|
2056
2145
|
* Require audit logging for all operations
|
|
2057
2146
|
*/
|
|
2058
|
-
requireAuditLog:
|
|
2147
|
+
requireAuditLog: import_zod9.z.boolean().default(true).describe("Require audit logging"),
|
|
2059
2148
|
/**
|
|
2060
2149
|
* Audit log retention period in days
|
|
2061
2150
|
*/
|
|
2062
|
-
auditRetentionDays:
|
|
2151
|
+
auditRetentionDays: import_zod9.z.number().int().positive().default(365).describe("Audit retention days"),
|
|
2063
2152
|
/**
|
|
2064
2153
|
* Data residency requirements
|
|
2065
2154
|
*/
|
|
2066
|
-
dataResidency:
|
|
2155
|
+
dataResidency: import_zod9.z.object({
|
|
2067
2156
|
/**
|
|
2068
2157
|
* Required geographic region
|
|
2069
2158
|
*/
|
|
2070
|
-
region:
|
|
2159
|
+
region: import_zod9.z.string().optional().describe("Required region (e.g., US, EU, APAC)"),
|
|
2071
2160
|
/**
|
|
2072
2161
|
* Prohibited regions
|
|
2073
2162
|
*/
|
|
2074
|
-
excludeRegions:
|
|
2163
|
+
excludeRegions: import_zod9.z.array(import_zod9.z.string()).optional().describe("Prohibited regions")
|
|
2075
2164
|
}).optional().describe("Data residency requirements")
|
|
2076
2165
|
}).optional().describe("Compliance requirements")
|
|
2077
2166
|
});
|
|
2078
2167
|
|
|
2079
2168
|
// src/hub/space.zod.ts
|
|
2080
|
-
var SubscriptionStatus =
|
|
2169
|
+
var SubscriptionStatus = import_zod10.z.enum([
|
|
2081
2170
|
"active",
|
|
2082
2171
|
"past_due",
|
|
2083
2172
|
"canceled",
|
|
2084
2173
|
"trialing",
|
|
2085
2174
|
"incomplete"
|
|
2086
2175
|
]);
|
|
2087
|
-
var SpaceSubscriptionSchema =
|
|
2088
|
-
planId:
|
|
2176
|
+
var SpaceSubscriptionSchema = import_zod10.z.object({
|
|
2177
|
+
planId: import_zod10.z.string().describe("Reference to Plan Code"),
|
|
2089
2178
|
status: SubscriptionStatus,
|
|
2090
|
-
currentPeriodEnd:
|
|
2091
|
-
stripeCustomerId:
|
|
2092
|
-
stripeSubscriptionId:
|
|
2179
|
+
currentPeriodEnd: import_zod10.z.string().datetime().optional(),
|
|
2180
|
+
stripeCustomerId: import_zod10.z.string().optional(),
|
|
2181
|
+
stripeSubscriptionId: import_zod10.z.string().optional(),
|
|
2093
2182
|
/**
|
|
2094
2183
|
* Purchased Add-ons from Marketplace
|
|
2095
2184
|
*/
|
|
2096
|
-
addons:
|
|
2097
|
-
pluginId:
|
|
2098
|
-
quantity:
|
|
2185
|
+
addons: import_zod10.z.array(import_zod10.z.object({
|
|
2186
|
+
pluginId: import_zod10.z.string().describe("Marketplace Plugin ID (NPM package name)"),
|
|
2187
|
+
quantity: import_zod10.z.number().default(1),
|
|
2099
2188
|
status: SubscriptionStatus.default("active")
|
|
2100
2189
|
})).optional(),
|
|
2101
2190
|
/**
|
|
2102
2191
|
* Quota Usage Snapshot
|
|
2103
2192
|
* Cached usage metrics for quick display/validation.
|
|
2104
2193
|
*/
|
|
2105
|
-
usage:
|
|
2194
|
+
usage: import_zod10.z.record(import_zod10.z.string(), import_zod10.z.number()).optional()
|
|
2106
2195
|
});
|
|
2107
|
-
var DeploymentTargetSchema =
|
|
2108
|
-
provider:
|
|
2109
|
-
region:
|
|
2110
|
-
url:
|
|
2111
|
-
env:
|
|
2196
|
+
var DeploymentTargetSchema = import_zod10.z.object({
|
|
2197
|
+
provider: import_zod10.z.enum(["vercel", "docker", "kubernetes"]),
|
|
2198
|
+
region: import_zod10.z.string().optional(),
|
|
2199
|
+
url: import_zod10.z.string().url().optional().describe("Public Access URL"),
|
|
2200
|
+
env: import_zod10.z.record(import_zod10.z.string(), import_zod10.z.string()).optional().describe("Runtime Environment Variables")
|
|
2112
2201
|
});
|
|
2113
|
-
var HubSpaceSchema =
|
|
2114
|
-
id:
|
|
2202
|
+
var HubSpaceSchema = import_zod10.z.object({
|
|
2203
|
+
id: import_zod10.z.string().uuid(),
|
|
2115
2204
|
/**
|
|
2116
2205
|
* Display Name
|
|
2117
2206
|
*/
|
|
2118
|
-
name:
|
|
2119
|
-
slug:
|
|
2207
|
+
name: import_zod10.z.string(),
|
|
2208
|
+
slug: import_zod10.z.string().describe("URL friendly identifier"),
|
|
2120
2209
|
/**
|
|
2121
2210
|
* Owner (User or Org ID in Hub)
|
|
2122
2211
|
*/
|
|
2123
|
-
ownerId:
|
|
2212
|
+
ownerId: import_zod10.z.string(),
|
|
2124
2213
|
/**
|
|
2125
2214
|
* The Runtime Instance Definition
|
|
2126
2215
|
* Defines the technical execution environment.
|
|
2127
2216
|
*/
|
|
2128
|
-
runtime:
|
|
2217
|
+
runtime: import_zod10.z.object({
|
|
2129
2218
|
isolation: TenantIsolationLevel.describe("Data isolation strategy"),
|
|
2130
2219
|
quotas: TenantQuotaSchema.optional().describe("Resource quotas")
|
|
2131
2220
|
}).optional().describe("Runtime instance configuration"),
|
|
@@ -2137,11 +2226,11 @@ var HubSpaceSchema = import_zod9.z.object({
|
|
|
2137
2226
|
/**
|
|
2138
2227
|
* The Current Actual State (Last Successful Build)
|
|
2139
2228
|
*/
|
|
2140
|
-
lastBuild:
|
|
2141
|
-
id:
|
|
2142
|
-
timestamp:
|
|
2143
|
-
manifestUrl:
|
|
2144
|
-
status:
|
|
2229
|
+
lastBuild: import_zod10.z.object({
|
|
2230
|
+
id: import_zod10.z.string(),
|
|
2231
|
+
timestamp: import_zod10.z.string().datetime(),
|
|
2232
|
+
manifestUrl: import_zod10.z.string().url().optional(),
|
|
2233
|
+
status: import_zod10.z.enum(["pending", "success", "failed"])
|
|
2145
2234
|
}).optional(),
|
|
2146
2235
|
/**
|
|
2147
2236
|
* Commercial / Billing Info
|
|
@@ -2151,13 +2240,13 @@ var HubSpaceSchema = import_zod9.z.object({
|
|
|
2151
2240
|
* Infrastructure Settings
|
|
2152
2241
|
*/
|
|
2153
2242
|
deployment: DeploymentTargetSchema.optional(),
|
|
2154
|
-
createdAt:
|
|
2155
|
-
updatedAt:
|
|
2243
|
+
createdAt: import_zod10.z.string(),
|
|
2244
|
+
updatedAt: import_zod10.z.string()
|
|
2156
2245
|
});
|
|
2157
2246
|
|
|
2158
2247
|
// src/hub/license.zod.ts
|
|
2159
|
-
var
|
|
2160
|
-
var MetricType =
|
|
2248
|
+
var import_zod11 = require("zod");
|
|
2249
|
+
var MetricType = import_zod11.z.enum([
|
|
2161
2250
|
"boolean",
|
|
2162
2251
|
// Feature Flag (Enabled/Disabled)
|
|
2163
2252
|
"counter",
|
|
@@ -2165,115 +2254,115 @@ var MetricType = import_zod10.z.enum([
|
|
|
2165
2254
|
"gauge"
|
|
2166
2255
|
// Current Level (e.g. Storage Used, Users Active) - Point in time
|
|
2167
2256
|
]);
|
|
2168
|
-
var FeatureSchema =
|
|
2169
|
-
code:
|
|
2170
|
-
label:
|
|
2171
|
-
description:
|
|
2257
|
+
var FeatureSchema = import_zod11.z.object({
|
|
2258
|
+
code: import_zod11.z.string().regex(/^[a-z_][a-z0-9_.]*$/).describe("Feature code (e.g. core.api_access)"),
|
|
2259
|
+
label: import_zod11.z.string(),
|
|
2260
|
+
description: import_zod11.z.string().optional(),
|
|
2172
2261
|
type: MetricType.default("boolean"),
|
|
2173
2262
|
/** For counters/gauges */
|
|
2174
|
-
unit:
|
|
2263
|
+
unit: import_zod11.z.enum(["count", "bytes", "seconds", "percent"]).optional(),
|
|
2175
2264
|
/** Dependencies (e.g. 'audit_log' requires 'enterprise_tier') */
|
|
2176
|
-
requires:
|
|
2265
|
+
requires: import_zod11.z.array(import_zod11.z.string()).optional()
|
|
2177
2266
|
});
|
|
2178
|
-
var PlanSchema =
|
|
2179
|
-
code:
|
|
2180
|
-
label:
|
|
2181
|
-
active:
|
|
2267
|
+
var PlanSchema = import_zod11.z.object({
|
|
2268
|
+
code: import_zod11.z.string().describe("Plan code (e.g. pro_v1)"),
|
|
2269
|
+
label: import_zod11.z.string(),
|
|
2270
|
+
active: import_zod11.z.boolean().default(true),
|
|
2182
2271
|
/** Feature Entitlements */
|
|
2183
|
-
features:
|
|
2272
|
+
features: import_zod11.z.array(import_zod11.z.string()).describe("List of enabled boolean features"),
|
|
2184
2273
|
/** Limit Quotas */
|
|
2185
|
-
limits:
|
|
2274
|
+
limits: import_zod11.z.record(import_zod11.z.string(), import_zod11.z.number()).describe("Map of metric codes to limit values (e.g. { storage_gb: 10 })"),
|
|
2186
2275
|
/** Pricing (Optional Metadata) */
|
|
2187
|
-
currency:
|
|
2188
|
-
priceMonthly:
|
|
2189
|
-
priceYearly:
|
|
2276
|
+
currency: import_zod11.z.string().default("USD").optional(),
|
|
2277
|
+
priceMonthly: import_zod11.z.number().optional(),
|
|
2278
|
+
priceYearly: import_zod11.z.number().optional()
|
|
2190
2279
|
});
|
|
2191
|
-
var LicenseSchema =
|
|
2280
|
+
var LicenseSchema = import_zod11.z.object({
|
|
2192
2281
|
/** Identity */
|
|
2193
|
-
spaceId:
|
|
2194
|
-
planCode:
|
|
2282
|
+
spaceId: import_zod11.z.string().describe("Target Space ID"),
|
|
2283
|
+
planCode: import_zod11.z.string(),
|
|
2195
2284
|
/** Validity */
|
|
2196
|
-
issuedAt:
|
|
2197
|
-
expiresAt:
|
|
2285
|
+
issuedAt: import_zod11.z.string().datetime(),
|
|
2286
|
+
expiresAt: import_zod11.z.string().datetime().optional(),
|
|
2198
2287
|
// Null = Perpetual
|
|
2199
2288
|
/** Status */
|
|
2200
|
-
status:
|
|
2289
|
+
status: import_zod11.z.enum(["active", "expired", "suspended", "trial"]),
|
|
2201
2290
|
/** Overrides (Specific to this space, exceeding the plan) */
|
|
2202
|
-
customFeatures:
|
|
2203
|
-
customLimits:
|
|
2291
|
+
customFeatures: import_zod11.z.array(import_zod11.z.string()).optional(),
|
|
2292
|
+
customLimits: import_zod11.z.record(import_zod11.z.string(), import_zod11.z.number()).optional(),
|
|
2204
2293
|
/** Authorized Add-ons */
|
|
2205
|
-
plugins:
|
|
2294
|
+
plugins: import_zod11.z.array(import_zod11.z.string()).optional().describe("List of enabled plugin package IDs"),
|
|
2206
2295
|
/** Signature */
|
|
2207
|
-
signature:
|
|
2296
|
+
signature: import_zod11.z.string().optional().describe("Cryptographic signature of the license")
|
|
2208
2297
|
});
|
|
2209
2298
|
|
|
2210
2299
|
// src/hub/hub-federation.zod.ts
|
|
2211
|
-
var
|
|
2212
|
-
var RegionSchema =
|
|
2300
|
+
var import_zod12 = require("zod");
|
|
2301
|
+
var RegionSchema = import_zod12.z.object({
|
|
2213
2302
|
/**
|
|
2214
2303
|
* Region identifier (e.g., us-east-1, eu-west-1, ap-southeast-1)
|
|
2215
2304
|
*/
|
|
2216
|
-
id:
|
|
2305
|
+
id: import_zod12.z.string().regex(/^[a-z]{2}-[a-z]+-\d+$/).describe("Region identifier"),
|
|
2217
2306
|
/**
|
|
2218
2307
|
* Display name
|
|
2219
2308
|
*/
|
|
2220
|
-
name:
|
|
2309
|
+
name: import_zod12.z.string().describe("Human-readable region name"),
|
|
2221
2310
|
/**
|
|
2222
2311
|
* Geographic location
|
|
2223
2312
|
*/
|
|
2224
|
-
location:
|
|
2225
|
-
continent:
|
|
2226
|
-
country:
|
|
2227
|
-
city:
|
|
2228
|
-
latitude:
|
|
2229
|
-
longitude:
|
|
2313
|
+
location: import_zod12.z.object({
|
|
2314
|
+
continent: import_zod12.z.enum(["NA", "SA", "EU", "AF", "AS", "OC", "AN"]),
|
|
2315
|
+
country: import_zod12.z.string().regex(/^[A-Z]{2}$/).describe("ISO 3166-1 alpha-2 country code"),
|
|
2316
|
+
city: import_zod12.z.string().optional(),
|
|
2317
|
+
latitude: import_zod12.z.number().min(-90).max(90).optional(),
|
|
2318
|
+
longitude: import_zod12.z.number().min(-180).max(180).optional()
|
|
2230
2319
|
}),
|
|
2231
2320
|
/**
|
|
2232
2321
|
* Cloud provider and region mapping
|
|
2233
2322
|
*/
|
|
2234
|
-
provider:
|
|
2235
|
-
name:
|
|
2236
|
-
region:
|
|
2323
|
+
provider: import_zod12.z.object({
|
|
2324
|
+
name: import_zod12.z.enum(["aws", "azure", "gcp", "cloudflare", "vercel", "self-hosted"]),
|
|
2325
|
+
region: import_zod12.z.string().describe("Provider-specific region identifier")
|
|
2237
2326
|
}).optional(),
|
|
2238
2327
|
/**
|
|
2239
2328
|
* Region capabilities
|
|
2240
2329
|
*/
|
|
2241
|
-
capabilities:
|
|
2242
|
-
databases:
|
|
2243
|
-
storage:
|
|
2244
|
-
compute:
|
|
2245
|
-
cdn:
|
|
2330
|
+
capabilities: import_zod12.z.object({
|
|
2331
|
+
databases: import_zod12.z.array(import_zod12.z.enum(["postgres", "mysql", "mongodb", "redis"])).default([]),
|
|
2332
|
+
storage: import_zod12.z.array(import_zod12.z.enum(["s3", "azure-blob", "gcs"])).default([]),
|
|
2333
|
+
compute: import_zod12.z.array(import_zod12.z.enum(["containers", "serverless", "vm"])).default([]),
|
|
2334
|
+
cdn: import_zod12.z.boolean().default(false)
|
|
2246
2335
|
}).optional(),
|
|
2247
2336
|
/**
|
|
2248
2337
|
* Compliance and certifications
|
|
2249
2338
|
*/
|
|
2250
|
-
compliance:
|
|
2339
|
+
compliance: import_zod12.z.array(import_zod12.z.enum(["gdpr", "hipaa", "soc2", "iso27001", "pci-dss"])).default([]),
|
|
2251
2340
|
/**
|
|
2252
2341
|
* Region status
|
|
2253
2342
|
*/
|
|
2254
|
-
status:
|
|
2343
|
+
status: import_zod12.z.enum(["active", "read-only", "maintenance", "deprecated"]).default("active"),
|
|
2255
2344
|
/**
|
|
2256
2345
|
* Resource limits for this region
|
|
2257
2346
|
*/
|
|
2258
|
-
limits:
|
|
2259
|
-
maxSpaces:
|
|
2260
|
-
maxTenants:
|
|
2261
|
-
maxStorage:
|
|
2347
|
+
limits: import_zod12.z.object({
|
|
2348
|
+
maxSpaces: import_zod12.z.number().int().positive().optional(),
|
|
2349
|
+
maxTenants: import_zod12.z.number().int().positive().optional(),
|
|
2350
|
+
maxStorage: import_zod12.z.number().int().positive().optional().describe("Bytes")
|
|
2262
2351
|
}).optional()
|
|
2263
2352
|
});
|
|
2264
|
-
var HubInstanceSchema =
|
|
2353
|
+
var HubInstanceSchema = import_zod12.z.object({
|
|
2265
2354
|
/**
|
|
2266
2355
|
* Instance identifier
|
|
2267
2356
|
*/
|
|
2268
|
-
id:
|
|
2357
|
+
id: import_zod12.z.string().uuid(),
|
|
2269
2358
|
/**
|
|
2270
2359
|
* Region where this hub is deployed
|
|
2271
2360
|
*/
|
|
2272
|
-
regionId:
|
|
2361
|
+
regionId: import_zod12.z.string(),
|
|
2273
2362
|
/**
|
|
2274
2363
|
* Hub role in federation
|
|
2275
2364
|
*/
|
|
2276
|
-
role:
|
|
2365
|
+
role: import_zod12.z.enum([
|
|
2277
2366
|
"primary",
|
|
2278
2367
|
// Primary/master hub
|
|
2279
2368
|
"secondary",
|
|
@@ -2284,71 +2373,71 @@ var HubInstanceSchema = import_zod11.z.object({
|
|
|
2284
2373
|
/**
|
|
2285
2374
|
* Endpoint URLs
|
|
2286
2375
|
*/
|
|
2287
|
-
endpoints:
|
|
2288
|
-
api:
|
|
2289
|
-
admin:
|
|
2290
|
-
grpc:
|
|
2376
|
+
endpoints: import_zod12.z.object({
|
|
2377
|
+
api: import_zod12.z.string().url().describe("Public API endpoint"),
|
|
2378
|
+
admin: import_zod12.z.string().url().optional().describe("Admin console"),
|
|
2379
|
+
grpc: import_zod12.z.string().optional().describe("gRPC endpoint for inter-hub communication")
|
|
2291
2380
|
}),
|
|
2292
2381
|
/**
|
|
2293
2382
|
* Replication configuration
|
|
2294
2383
|
*/
|
|
2295
|
-
replication:
|
|
2384
|
+
replication: import_zod12.z.object({
|
|
2296
2385
|
/**
|
|
2297
2386
|
* Source hub for replication (if this is a secondary)
|
|
2298
2387
|
*/
|
|
2299
|
-
primaryHubId:
|
|
2388
|
+
primaryHubId: import_zod12.z.string().uuid().optional(),
|
|
2300
2389
|
/**
|
|
2301
2390
|
* Replication lag tolerance in seconds
|
|
2302
2391
|
*/
|
|
2303
|
-
lagTolerance:
|
|
2392
|
+
lagTolerance: import_zod12.z.number().int().positive().default(5),
|
|
2304
2393
|
/**
|
|
2305
2394
|
* Replication mode
|
|
2306
2395
|
*/
|
|
2307
|
-
mode:
|
|
2396
|
+
mode: import_zod12.z.enum(["sync", "async", "semi-sync"]).default("async")
|
|
2308
2397
|
}).optional(),
|
|
2309
2398
|
/**
|
|
2310
2399
|
* Health status
|
|
2311
2400
|
*/
|
|
2312
|
-
health:
|
|
2313
|
-
status:
|
|
2314
|
-
lastCheck:
|
|
2315
|
-
uptime:
|
|
2401
|
+
health: import_zod12.z.object({
|
|
2402
|
+
status: import_zod12.z.enum(["healthy", "degraded", "unhealthy"]),
|
|
2403
|
+
lastCheck: import_zod12.z.string().datetime(),
|
|
2404
|
+
uptime: import_zod12.z.number().describe("Seconds")
|
|
2316
2405
|
}).optional(),
|
|
2317
2406
|
/**
|
|
2318
2407
|
* Version
|
|
2319
2408
|
*/
|
|
2320
|
-
version:
|
|
2409
|
+
version: import_zod12.z.string(),
|
|
2321
2410
|
/**
|
|
2322
2411
|
* Metadata
|
|
2323
2412
|
*/
|
|
2324
|
-
createdAt:
|
|
2325
|
-
updatedAt:
|
|
2413
|
+
createdAt: import_zod12.z.string().datetime(),
|
|
2414
|
+
updatedAt: import_zod12.z.string().datetime()
|
|
2326
2415
|
});
|
|
2327
|
-
var FederationTopologySchema =
|
|
2416
|
+
var FederationTopologySchema = import_zod12.z.object({
|
|
2328
2417
|
/**
|
|
2329
2418
|
* Federation identifier
|
|
2330
2419
|
*/
|
|
2331
|
-
id:
|
|
2420
|
+
id: import_zod12.z.string().uuid(),
|
|
2332
2421
|
/**
|
|
2333
2422
|
* Federation name
|
|
2334
2423
|
*/
|
|
2335
|
-
name:
|
|
2424
|
+
name: import_zod12.z.string(),
|
|
2336
2425
|
/**
|
|
2337
2426
|
* Regions in this federation
|
|
2338
2427
|
*/
|
|
2339
|
-
regions:
|
|
2428
|
+
regions: import_zod12.z.array(RegionSchema),
|
|
2340
2429
|
/**
|
|
2341
2430
|
* Hub instances
|
|
2342
2431
|
*/
|
|
2343
|
-
hubs:
|
|
2432
|
+
hubs: import_zod12.z.array(HubInstanceSchema),
|
|
2344
2433
|
/**
|
|
2345
2434
|
* Routing strategy
|
|
2346
2435
|
*/
|
|
2347
|
-
routing:
|
|
2436
|
+
routing: import_zod12.z.object({
|
|
2348
2437
|
/**
|
|
2349
2438
|
* How to route tenant requests
|
|
2350
2439
|
*/
|
|
2351
|
-
strategy:
|
|
2440
|
+
strategy: import_zod12.z.enum([
|
|
2352
2441
|
"geo-proximity",
|
|
2353
2442
|
// Route to nearest region
|
|
2354
2443
|
"data-residency",
|
|
@@ -2361,117 +2450,117 @@ var FederationTopologySchema = import_zod11.z.object({
|
|
|
2361
2450
|
/**
|
|
2362
2451
|
* Failover behavior
|
|
2363
2452
|
*/
|
|
2364
|
-
failover:
|
|
2365
|
-
enabled:
|
|
2366
|
-
maxRetries:
|
|
2367
|
-
timeout:
|
|
2453
|
+
failover: import_zod12.z.object({
|
|
2454
|
+
enabled: import_zod12.z.boolean().default(true),
|
|
2455
|
+
maxRetries: import_zod12.z.number().int().min(0).default(3),
|
|
2456
|
+
timeout: import_zod12.z.number().int().positive().default(5e3).describe("Milliseconds")
|
|
2368
2457
|
})
|
|
2369
2458
|
}),
|
|
2370
2459
|
/**
|
|
2371
2460
|
* Data synchronization settings
|
|
2372
2461
|
*/
|
|
2373
|
-
synchronization:
|
|
2462
|
+
synchronization: import_zod12.z.object({
|
|
2374
2463
|
/**
|
|
2375
2464
|
* What data to sync across regions
|
|
2376
2465
|
*/
|
|
2377
|
-
scope:
|
|
2466
|
+
scope: import_zod12.z.object({
|
|
2378
2467
|
/**
|
|
2379
2468
|
* Sync plugin registry
|
|
2380
2469
|
*/
|
|
2381
|
-
plugins:
|
|
2470
|
+
plugins: import_zod12.z.boolean().default(true),
|
|
2382
2471
|
/**
|
|
2383
2472
|
* Sync tenant metadata (not data)
|
|
2384
2473
|
*/
|
|
2385
|
-
tenants:
|
|
2474
|
+
tenants: import_zod12.z.boolean().default(true),
|
|
2386
2475
|
/**
|
|
2387
2476
|
* Sync spaces metadata
|
|
2388
2477
|
*/
|
|
2389
|
-
spaces:
|
|
2478
|
+
spaces: import_zod12.z.boolean().default(false),
|
|
2390
2479
|
/**
|
|
2391
2480
|
* Sync licenses
|
|
2392
2481
|
*/
|
|
2393
|
-
licenses:
|
|
2482
|
+
licenses: import_zod12.z.boolean().default(true)
|
|
2394
2483
|
}),
|
|
2395
2484
|
/**
|
|
2396
2485
|
* Sync frequency
|
|
2397
2486
|
*/
|
|
2398
|
-
frequency:
|
|
2487
|
+
frequency: import_zod12.z.enum(["realtime", "hourly", "daily"]).default("realtime"),
|
|
2399
2488
|
/**
|
|
2400
2489
|
* Conflict resolution
|
|
2401
2490
|
*/
|
|
2402
|
-
conflictResolution:
|
|
2491
|
+
conflictResolution: import_zod12.z.enum(["last-write-wins", "primary-wins", "manual"]).default("last-write-wins")
|
|
2403
2492
|
})
|
|
2404
2493
|
});
|
|
2405
|
-
var TenantPlacementPolicySchema =
|
|
2494
|
+
var TenantPlacementPolicySchema = import_zod12.z.object({
|
|
2406
2495
|
/**
|
|
2407
2496
|
* Tenant identifier
|
|
2408
2497
|
*/
|
|
2409
|
-
tenantId:
|
|
2498
|
+
tenantId: import_zod12.z.string(),
|
|
2410
2499
|
/**
|
|
2411
2500
|
* Primary region (where tenant data lives)
|
|
2412
2501
|
*/
|
|
2413
|
-
primaryRegion:
|
|
2502
|
+
primaryRegion: import_zod12.z.string(),
|
|
2414
2503
|
/**
|
|
2415
2504
|
* Replica regions (for disaster recovery)
|
|
2416
2505
|
*/
|
|
2417
|
-
replicaRegions:
|
|
2506
|
+
replicaRegions: import_zod12.z.array(import_zod12.z.string()).default([]),
|
|
2418
2507
|
/**
|
|
2419
2508
|
* Data residency constraints
|
|
2420
2509
|
*/
|
|
2421
|
-
dataResidency:
|
|
2510
|
+
dataResidency: import_zod12.z.object({
|
|
2422
2511
|
/**
|
|
2423
2512
|
* Allowed regions for data storage
|
|
2424
2513
|
*/
|
|
2425
|
-
allowedRegions:
|
|
2514
|
+
allowedRegions: import_zod12.z.array(import_zod12.z.string()).optional(),
|
|
2426
2515
|
/**
|
|
2427
2516
|
* Prohibited regions
|
|
2428
2517
|
*/
|
|
2429
|
-
prohibitedRegions:
|
|
2518
|
+
prohibitedRegions: import_zod12.z.array(import_zod12.z.string()).default([]),
|
|
2430
2519
|
/**
|
|
2431
2520
|
* Continent restriction
|
|
2432
2521
|
*/
|
|
2433
|
-
continent:
|
|
2522
|
+
continent: import_zod12.z.enum(["NA", "SA", "EU", "AF", "AS", "OC", "AN"]).optional()
|
|
2434
2523
|
}).optional(),
|
|
2435
2524
|
/**
|
|
2436
2525
|
* Failover policy
|
|
2437
2526
|
*/
|
|
2438
|
-
failover:
|
|
2527
|
+
failover: import_zod12.z.object({
|
|
2439
2528
|
/**
|
|
2440
2529
|
* Enable automatic failover
|
|
2441
2530
|
*/
|
|
2442
|
-
enabled:
|
|
2531
|
+
enabled: import_zod12.z.boolean().default(true),
|
|
2443
2532
|
/**
|
|
2444
2533
|
* Preferred failover order (region IDs)
|
|
2445
2534
|
*/
|
|
2446
|
-
preferredOrder:
|
|
2535
|
+
preferredOrder: import_zod12.z.array(import_zod12.z.string()).default([]),
|
|
2447
2536
|
/**
|
|
2448
2537
|
* Maximum acceptable latency for failover target (ms)
|
|
2449
2538
|
*/
|
|
2450
|
-
maxLatency:
|
|
2539
|
+
maxLatency: import_zod12.z.number().int().positive().default(100)
|
|
2451
2540
|
}).optional(),
|
|
2452
2541
|
/**
|
|
2453
2542
|
* Latency requirements
|
|
2454
2543
|
*/
|
|
2455
|
-
latency:
|
|
2544
|
+
latency: import_zod12.z.object({
|
|
2456
2545
|
/**
|
|
2457
2546
|
* Maximum acceptable latency for primary region (ms)
|
|
2458
2547
|
*/
|
|
2459
|
-
maxPrimaryLatency:
|
|
2548
|
+
maxPrimaryLatency: import_zod12.z.number().int().positive().default(50),
|
|
2460
2549
|
/**
|
|
2461
2550
|
* Maximum acceptable latency for replicas (ms)
|
|
2462
2551
|
*/
|
|
2463
|
-
maxReplicaLatency:
|
|
2552
|
+
maxReplicaLatency: import_zod12.z.number().int().positive().default(200)
|
|
2464
2553
|
}).optional()
|
|
2465
2554
|
});
|
|
2466
|
-
var ReplicationJobSchema =
|
|
2555
|
+
var ReplicationJobSchema = import_zod12.z.object({
|
|
2467
2556
|
/**
|
|
2468
2557
|
* Job identifier
|
|
2469
2558
|
*/
|
|
2470
|
-
id:
|
|
2559
|
+
id: import_zod12.z.string().uuid(),
|
|
2471
2560
|
/**
|
|
2472
2561
|
* Job type
|
|
2473
2562
|
*/
|
|
2474
|
-
type:
|
|
2563
|
+
type: import_zod12.z.enum([
|
|
2475
2564
|
"initial-sync",
|
|
2476
2565
|
// First-time full sync
|
|
2477
2566
|
"incremental",
|
|
@@ -2482,84 +2571,84 @@ var ReplicationJobSchema = import_zod11.z.object({
|
|
|
2482
2571
|
/**
|
|
2483
2572
|
* Source hub
|
|
2484
2573
|
*/
|
|
2485
|
-
sourceHubId:
|
|
2574
|
+
sourceHubId: import_zod12.z.string().uuid(),
|
|
2486
2575
|
/**
|
|
2487
2576
|
* Target hub(s)
|
|
2488
2577
|
*/
|
|
2489
|
-
targetHubIds:
|
|
2578
|
+
targetHubIds: import_zod12.z.array(import_zod12.z.string().uuid()),
|
|
2490
2579
|
/**
|
|
2491
2580
|
* Resource scope
|
|
2492
2581
|
*/
|
|
2493
|
-
scope:
|
|
2582
|
+
scope: import_zod12.z.object({
|
|
2494
2583
|
/**
|
|
2495
2584
|
* Resource type
|
|
2496
2585
|
*/
|
|
2497
|
-
resourceType:
|
|
2586
|
+
resourceType: import_zod12.z.enum(["plugin", "tenant", "space", "license", "all"]),
|
|
2498
2587
|
/**
|
|
2499
2588
|
* Specific resource IDs (empty = all)
|
|
2500
2589
|
*/
|
|
2501
|
-
resourceIds:
|
|
2590
|
+
resourceIds: import_zod12.z.array(import_zod12.z.string()).default([])
|
|
2502
2591
|
}),
|
|
2503
2592
|
/**
|
|
2504
2593
|
* Job status
|
|
2505
2594
|
*/
|
|
2506
|
-
status:
|
|
2595
|
+
status: import_zod12.z.enum(["pending", "running", "completed", "failed", "cancelled"]),
|
|
2507
2596
|
/**
|
|
2508
2597
|
* Progress
|
|
2509
2598
|
*/
|
|
2510
|
-
progress:
|
|
2511
|
-
total:
|
|
2512
|
-
completed:
|
|
2513
|
-
failed:
|
|
2599
|
+
progress: import_zod12.z.object({
|
|
2600
|
+
total: import_zod12.z.number().int().min(0),
|
|
2601
|
+
completed: import_zod12.z.number().int().min(0),
|
|
2602
|
+
failed: import_zod12.z.number().int().min(0)
|
|
2514
2603
|
}).optional(),
|
|
2515
2604
|
/**
|
|
2516
2605
|
* Timestamps
|
|
2517
2606
|
*/
|
|
2518
|
-
createdAt:
|
|
2519
|
-
startedAt:
|
|
2520
|
-
completedAt:
|
|
2607
|
+
createdAt: import_zod12.z.string().datetime(),
|
|
2608
|
+
startedAt: import_zod12.z.string().datetime().optional(),
|
|
2609
|
+
completedAt: import_zod12.z.string().datetime().optional(),
|
|
2521
2610
|
/**
|
|
2522
2611
|
* Errors
|
|
2523
2612
|
*/
|
|
2524
|
-
errors:
|
|
2525
|
-
timestamp:
|
|
2526
|
-
resourceId:
|
|
2527
|
-
error:
|
|
2613
|
+
errors: import_zod12.z.array(import_zod12.z.object({
|
|
2614
|
+
timestamp: import_zod12.z.string().datetime(),
|
|
2615
|
+
resourceId: import_zod12.z.string(),
|
|
2616
|
+
error: import_zod12.z.string()
|
|
2528
2617
|
})).default([])
|
|
2529
2618
|
});
|
|
2530
|
-
var GlobalRegistryEntrySchema =
|
|
2619
|
+
var GlobalRegistryEntrySchema = import_zod12.z.object({
|
|
2531
2620
|
/**
|
|
2532
2621
|
* Resource identifier
|
|
2533
2622
|
*/
|
|
2534
|
-
resourceId:
|
|
2623
|
+
resourceId: import_zod12.z.string(),
|
|
2535
2624
|
/**
|
|
2536
2625
|
* Resource type
|
|
2537
2626
|
*/
|
|
2538
|
-
resourceType:
|
|
2627
|
+
resourceType: import_zod12.z.enum(["plugin", "tenant", "space", "license"]),
|
|
2539
2628
|
/**
|
|
2540
2629
|
* Regions where this resource exists
|
|
2541
2630
|
*/
|
|
2542
|
-
locations:
|
|
2543
|
-
regionId:
|
|
2544
|
-
hubId:
|
|
2545
|
-
isPrimary:
|
|
2546
|
-
lastSyncedAt:
|
|
2547
|
-
version:
|
|
2631
|
+
locations: import_zod12.z.array(import_zod12.z.object({
|
|
2632
|
+
regionId: import_zod12.z.string(),
|
|
2633
|
+
hubId: import_zod12.z.string().uuid(),
|
|
2634
|
+
isPrimary: import_zod12.z.boolean().default(false),
|
|
2635
|
+
lastSyncedAt: import_zod12.z.string().datetime().optional(),
|
|
2636
|
+
version: import_zod12.z.string().optional()
|
|
2548
2637
|
})),
|
|
2549
2638
|
/**
|
|
2550
2639
|
* Global version vector clock (for conflict detection)
|
|
2551
2640
|
*/
|
|
2552
|
-
versionVector:
|
|
2641
|
+
versionVector: import_zod12.z.record(import_zod12.z.string(), import_zod12.z.number().int()).optional()
|
|
2553
2642
|
});
|
|
2554
|
-
var EdgeLocationSchema =
|
|
2643
|
+
var EdgeLocationSchema = import_zod12.z.object({
|
|
2555
2644
|
/**
|
|
2556
2645
|
* Location identifier
|
|
2557
2646
|
*/
|
|
2558
|
-
id:
|
|
2647
|
+
id: import_zod12.z.string(),
|
|
2559
2648
|
/**
|
|
2560
2649
|
* Parent region
|
|
2561
2650
|
*/
|
|
2562
|
-
regionId:
|
|
2651
|
+
regionId: import_zod12.z.string(),
|
|
2563
2652
|
/**
|
|
2564
2653
|
* Location details
|
|
2565
2654
|
*/
|
|
@@ -2567,24 +2656,24 @@ var EdgeLocationSchema = import_zod11.z.object({
|
|
|
2567
2656
|
/**
|
|
2568
2657
|
* Caching configuration
|
|
2569
2658
|
*/
|
|
2570
|
-
cache:
|
|
2659
|
+
cache: import_zod12.z.object({
|
|
2571
2660
|
/**
|
|
2572
2661
|
* What to cache at edge
|
|
2573
2662
|
*/
|
|
2574
|
-
resources:
|
|
2663
|
+
resources: import_zod12.z.array(import_zod12.z.enum(["plugins", "static-assets", "api-responses"])).default([]),
|
|
2575
2664
|
/**
|
|
2576
2665
|
* TTL in seconds
|
|
2577
2666
|
*/
|
|
2578
|
-
ttl:
|
|
2667
|
+
ttl: import_zod12.z.number().int().positive().default(3600),
|
|
2579
2668
|
/**
|
|
2580
2669
|
* Cache size limit (bytes)
|
|
2581
2670
|
*/
|
|
2582
|
-
maxSize:
|
|
2671
|
+
maxSize: import_zod12.z.number().int().positive().optional()
|
|
2583
2672
|
}),
|
|
2584
2673
|
/**
|
|
2585
2674
|
* Status
|
|
2586
2675
|
*/
|
|
2587
|
-
status:
|
|
2676
|
+
status: import_zod12.z.enum(["active", "inactive"]).default("active")
|
|
2588
2677
|
});
|
|
2589
2678
|
var HubFederationProtocol = {
|
|
2590
2679
|
Region: RegionSchema,
|
|
@@ -2597,31 +2686,31 @@ var HubFederationProtocol = {
|
|
|
2597
2686
|
};
|
|
2598
2687
|
|
|
2599
2688
|
// src/hub/plugin-security.zod.ts
|
|
2600
|
-
var
|
|
2601
|
-
var VulnerabilitySeverity =
|
|
2689
|
+
var import_zod13 = require("zod");
|
|
2690
|
+
var VulnerabilitySeverity = import_zod13.z.enum([
|
|
2602
2691
|
"critical",
|
|
2603
2692
|
"high",
|
|
2604
2693
|
"medium",
|
|
2605
2694
|
"low",
|
|
2606
2695
|
"info"
|
|
2607
2696
|
]);
|
|
2608
|
-
var SecurityVulnerabilitySchema =
|
|
2697
|
+
var SecurityVulnerabilitySchema = import_zod13.z.object({
|
|
2609
2698
|
/**
|
|
2610
2699
|
* CVE identifier (if applicable)
|
|
2611
2700
|
*/
|
|
2612
|
-
cve:
|
|
2701
|
+
cve: import_zod13.z.string().regex(/^CVE-\d{4}-\d+$/).optional().describe("CVE identifier"),
|
|
2613
2702
|
/**
|
|
2614
2703
|
* Vulnerability identifier (GHSA, SNYK, etc.)
|
|
2615
2704
|
*/
|
|
2616
|
-
id:
|
|
2705
|
+
id: import_zod13.z.string().describe("Vulnerability ID"),
|
|
2617
2706
|
/**
|
|
2618
2707
|
* Title
|
|
2619
2708
|
*/
|
|
2620
|
-
title:
|
|
2709
|
+
title: import_zod13.z.string(),
|
|
2621
2710
|
/**
|
|
2622
2711
|
* Description
|
|
2623
2712
|
*/
|
|
2624
|
-
description:
|
|
2713
|
+
description: import_zod13.z.string(),
|
|
2625
2714
|
/**
|
|
2626
2715
|
* Severity
|
|
2627
2716
|
*/
|
|
@@ -2629,149 +2718,149 @@ var SecurityVulnerabilitySchema = import_zod12.z.object({
|
|
|
2629
2718
|
/**
|
|
2630
2719
|
* CVSS score (0-10)
|
|
2631
2720
|
*/
|
|
2632
|
-
cvss:
|
|
2721
|
+
cvss: import_zod13.z.number().min(0).max(10).optional(),
|
|
2633
2722
|
/**
|
|
2634
2723
|
* Affected package
|
|
2635
2724
|
*/
|
|
2636
|
-
package:
|
|
2637
|
-
name:
|
|
2638
|
-
version:
|
|
2639
|
-
ecosystem:
|
|
2725
|
+
package: import_zod13.z.object({
|
|
2726
|
+
name: import_zod13.z.string(),
|
|
2727
|
+
version: import_zod13.z.string(),
|
|
2728
|
+
ecosystem: import_zod13.z.string().optional()
|
|
2640
2729
|
}),
|
|
2641
2730
|
/**
|
|
2642
2731
|
* Vulnerable version range
|
|
2643
2732
|
*/
|
|
2644
|
-
vulnerableVersions:
|
|
2733
|
+
vulnerableVersions: import_zod13.z.string().describe("Semver range of vulnerable versions"),
|
|
2645
2734
|
/**
|
|
2646
2735
|
* Patched versions
|
|
2647
2736
|
*/
|
|
2648
|
-
patchedVersions:
|
|
2737
|
+
patchedVersions: import_zod13.z.string().optional().describe("Semver range of patched versions"),
|
|
2649
2738
|
/**
|
|
2650
2739
|
* References
|
|
2651
2740
|
*/
|
|
2652
|
-
references:
|
|
2653
|
-
type:
|
|
2654
|
-
url:
|
|
2741
|
+
references: import_zod13.z.array(import_zod13.z.object({
|
|
2742
|
+
type: import_zod13.z.enum(["advisory", "article", "report", "web"]),
|
|
2743
|
+
url: import_zod13.z.string().url()
|
|
2655
2744
|
})).default([]),
|
|
2656
2745
|
/**
|
|
2657
2746
|
* CWE (Common Weakness Enumeration)
|
|
2658
2747
|
*/
|
|
2659
|
-
cwe:
|
|
2748
|
+
cwe: import_zod13.z.array(import_zod13.z.string()).default([]),
|
|
2660
2749
|
/**
|
|
2661
2750
|
* Published date
|
|
2662
2751
|
*/
|
|
2663
|
-
publishedAt:
|
|
2752
|
+
publishedAt: import_zod13.z.string().datetime().optional(),
|
|
2664
2753
|
/**
|
|
2665
2754
|
* Mitigation advice
|
|
2666
2755
|
*/
|
|
2667
|
-
mitigation:
|
|
2756
|
+
mitigation: import_zod13.z.string().optional()
|
|
2668
2757
|
});
|
|
2669
|
-
var SecurityScanResultSchema =
|
|
2758
|
+
var SecurityScanResultSchema = import_zod13.z.object({
|
|
2670
2759
|
/**
|
|
2671
2760
|
* Scan identifier
|
|
2672
2761
|
*/
|
|
2673
|
-
scanId:
|
|
2762
|
+
scanId: import_zod13.z.string().uuid(),
|
|
2674
2763
|
/**
|
|
2675
2764
|
* Plugin being scanned
|
|
2676
2765
|
*/
|
|
2677
|
-
plugin:
|
|
2678
|
-
id:
|
|
2679
|
-
version:
|
|
2766
|
+
plugin: import_zod13.z.object({
|
|
2767
|
+
id: import_zod13.z.string(),
|
|
2768
|
+
version: import_zod13.z.string()
|
|
2680
2769
|
}),
|
|
2681
2770
|
/**
|
|
2682
2771
|
* Scan timestamp
|
|
2683
2772
|
*/
|
|
2684
|
-
scannedAt:
|
|
2773
|
+
scannedAt: import_zod13.z.string().datetime(),
|
|
2685
2774
|
/**
|
|
2686
2775
|
* Scanner information
|
|
2687
2776
|
*/
|
|
2688
|
-
scanner:
|
|
2689
|
-
name:
|
|
2690
|
-
version:
|
|
2777
|
+
scanner: import_zod13.z.object({
|
|
2778
|
+
name: import_zod13.z.string().describe("Scanner name (e.g., snyk, osv, trivy)"),
|
|
2779
|
+
version: import_zod13.z.string()
|
|
2691
2780
|
}),
|
|
2692
2781
|
/**
|
|
2693
2782
|
* Scan status
|
|
2694
2783
|
*/
|
|
2695
|
-
status:
|
|
2784
|
+
status: import_zod13.z.enum(["passed", "failed", "warning"]),
|
|
2696
2785
|
/**
|
|
2697
2786
|
* Vulnerabilities found
|
|
2698
2787
|
*/
|
|
2699
|
-
vulnerabilities:
|
|
2788
|
+
vulnerabilities: import_zod13.z.array(SecurityVulnerabilitySchema),
|
|
2700
2789
|
/**
|
|
2701
2790
|
* Vulnerability summary
|
|
2702
2791
|
*/
|
|
2703
|
-
summary:
|
|
2704
|
-
critical:
|
|
2705
|
-
high:
|
|
2706
|
-
medium:
|
|
2707
|
-
low:
|
|
2708
|
-
info:
|
|
2709
|
-
total:
|
|
2792
|
+
summary: import_zod13.z.object({
|
|
2793
|
+
critical: import_zod13.z.number().int().min(0).default(0),
|
|
2794
|
+
high: import_zod13.z.number().int().min(0).default(0),
|
|
2795
|
+
medium: import_zod13.z.number().int().min(0).default(0),
|
|
2796
|
+
low: import_zod13.z.number().int().min(0).default(0),
|
|
2797
|
+
info: import_zod13.z.number().int().min(0).default(0),
|
|
2798
|
+
total: import_zod13.z.number().int().min(0).default(0)
|
|
2710
2799
|
}),
|
|
2711
2800
|
/**
|
|
2712
2801
|
* License compliance issues
|
|
2713
2802
|
*/
|
|
2714
|
-
licenseIssues:
|
|
2715
|
-
package:
|
|
2716
|
-
license:
|
|
2717
|
-
reason:
|
|
2718
|
-
severity:
|
|
2803
|
+
licenseIssues: import_zod13.z.array(import_zod13.z.object({
|
|
2804
|
+
package: import_zod13.z.string(),
|
|
2805
|
+
license: import_zod13.z.string(),
|
|
2806
|
+
reason: import_zod13.z.string(),
|
|
2807
|
+
severity: import_zod13.z.enum(["error", "warning", "info"])
|
|
2719
2808
|
})).default([]),
|
|
2720
2809
|
/**
|
|
2721
2810
|
* Code quality issues
|
|
2722
2811
|
*/
|
|
2723
|
-
codeQuality:
|
|
2724
|
-
score:
|
|
2725
|
-
issues:
|
|
2726
|
-
type:
|
|
2727
|
-
severity:
|
|
2728
|
-
message:
|
|
2729
|
-
file:
|
|
2730
|
-
line:
|
|
2812
|
+
codeQuality: import_zod13.z.object({
|
|
2813
|
+
score: import_zod13.z.number().min(0).max(100).optional(),
|
|
2814
|
+
issues: import_zod13.z.array(import_zod13.z.object({
|
|
2815
|
+
type: import_zod13.z.enum(["security", "quality", "style"]),
|
|
2816
|
+
severity: import_zod13.z.enum(["error", "warning", "info"]),
|
|
2817
|
+
message: import_zod13.z.string(),
|
|
2818
|
+
file: import_zod13.z.string().optional(),
|
|
2819
|
+
line: import_zod13.z.number().int().optional()
|
|
2731
2820
|
})).default([])
|
|
2732
2821
|
}).optional(),
|
|
2733
2822
|
/**
|
|
2734
2823
|
* Next scan scheduled
|
|
2735
2824
|
*/
|
|
2736
|
-
nextScanAt:
|
|
2825
|
+
nextScanAt: import_zod13.z.string().datetime().optional()
|
|
2737
2826
|
});
|
|
2738
|
-
var SecurityPolicySchema =
|
|
2827
|
+
var SecurityPolicySchema = import_zod13.z.object({
|
|
2739
2828
|
/**
|
|
2740
2829
|
* Policy identifier
|
|
2741
2830
|
*/
|
|
2742
|
-
id:
|
|
2831
|
+
id: import_zod13.z.string(),
|
|
2743
2832
|
/**
|
|
2744
2833
|
* Policy name
|
|
2745
2834
|
*/
|
|
2746
|
-
name:
|
|
2835
|
+
name: import_zod13.z.string(),
|
|
2747
2836
|
/**
|
|
2748
2837
|
* Automatic scanning
|
|
2749
2838
|
*/
|
|
2750
|
-
autoScan:
|
|
2751
|
-
enabled:
|
|
2752
|
-
frequency:
|
|
2839
|
+
autoScan: import_zod13.z.object({
|
|
2840
|
+
enabled: import_zod13.z.boolean().default(true),
|
|
2841
|
+
frequency: import_zod13.z.enum(["on-publish", "daily", "weekly", "monthly"]).default("daily")
|
|
2753
2842
|
}),
|
|
2754
2843
|
/**
|
|
2755
2844
|
* Vulnerability thresholds
|
|
2756
2845
|
*/
|
|
2757
|
-
thresholds:
|
|
2846
|
+
thresholds: import_zod13.z.object({
|
|
2758
2847
|
/**
|
|
2759
2848
|
* Block plugin if critical vulnerabilities exceed this
|
|
2760
2849
|
*/
|
|
2761
|
-
maxCritical:
|
|
2850
|
+
maxCritical: import_zod13.z.number().int().min(0).default(0),
|
|
2762
2851
|
/**
|
|
2763
2852
|
* Block plugin if high vulnerabilities exceed this
|
|
2764
2853
|
*/
|
|
2765
|
-
maxHigh:
|
|
2854
|
+
maxHigh: import_zod13.z.number().int().min(0).default(0),
|
|
2766
2855
|
/**
|
|
2767
2856
|
* Warn if medium vulnerabilities exceed this
|
|
2768
2857
|
*/
|
|
2769
|
-
maxMedium:
|
|
2858
|
+
maxMedium: import_zod13.z.number().int().min(0).default(5)
|
|
2770
2859
|
}),
|
|
2771
2860
|
/**
|
|
2772
2861
|
* Allowed licenses
|
|
2773
2862
|
*/
|
|
2774
|
-
allowedLicenses:
|
|
2863
|
+
allowedLicenses: import_zod13.z.array(import_zod13.z.string()).default([
|
|
2775
2864
|
"MIT",
|
|
2776
2865
|
"Apache-2.0",
|
|
2777
2866
|
"BSD-3-Clause",
|
|
@@ -2781,152 +2870,152 @@ var SecurityPolicySchema = import_zod12.z.object({
|
|
|
2781
2870
|
/**
|
|
2782
2871
|
* Prohibited licenses
|
|
2783
2872
|
*/
|
|
2784
|
-
prohibitedLicenses:
|
|
2873
|
+
prohibitedLicenses: import_zod13.z.array(import_zod13.z.string()).default([
|
|
2785
2874
|
"GPL-3.0",
|
|
2786
2875
|
"AGPL-3.0"
|
|
2787
2876
|
]),
|
|
2788
2877
|
/**
|
|
2789
2878
|
* Code signing requirements
|
|
2790
2879
|
*/
|
|
2791
|
-
codeSigning:
|
|
2792
|
-
required:
|
|
2793
|
-
allowedSigners:
|
|
2880
|
+
codeSigning: import_zod13.z.object({
|
|
2881
|
+
required: import_zod13.z.boolean().default(false),
|
|
2882
|
+
allowedSigners: import_zod13.z.array(import_zod13.z.string()).default([])
|
|
2794
2883
|
}).optional(),
|
|
2795
2884
|
/**
|
|
2796
2885
|
* Sandbox restrictions
|
|
2797
2886
|
*/
|
|
2798
|
-
sandbox:
|
|
2887
|
+
sandbox: import_zod13.z.object({
|
|
2799
2888
|
/**
|
|
2800
2889
|
* Restrict network access
|
|
2801
2890
|
*/
|
|
2802
|
-
networkAccess:
|
|
2891
|
+
networkAccess: import_zod13.z.enum(["none", "localhost", "allowlist", "all"]).default("all"),
|
|
2803
2892
|
/**
|
|
2804
2893
|
* Allowed network destinations (if allowlist)
|
|
2805
2894
|
*/
|
|
2806
|
-
allowedDestinations:
|
|
2895
|
+
allowedDestinations: import_zod13.z.array(import_zod13.z.string()).default([]),
|
|
2807
2896
|
/**
|
|
2808
2897
|
* File system access
|
|
2809
2898
|
*/
|
|
2810
|
-
filesystemAccess:
|
|
2899
|
+
filesystemAccess: import_zod13.z.enum(["none", "read-only", "temp-only", "full"]).default("full"),
|
|
2811
2900
|
/**
|
|
2812
2901
|
* Maximum memory (MB)
|
|
2813
2902
|
*/
|
|
2814
|
-
maxMemoryMB:
|
|
2903
|
+
maxMemoryMB: import_zod13.z.number().int().positive().optional(),
|
|
2815
2904
|
/**
|
|
2816
2905
|
* Maximum CPU time (seconds)
|
|
2817
2906
|
*/
|
|
2818
|
-
maxCPUSeconds:
|
|
2907
|
+
maxCPUSeconds: import_zod13.z.number().int().positive().optional()
|
|
2819
2908
|
}).optional()
|
|
2820
2909
|
});
|
|
2821
|
-
var PackageDependencySchema =
|
|
2910
|
+
var PackageDependencySchema = import_zod13.z.object({
|
|
2822
2911
|
/**
|
|
2823
2912
|
* Package name/ID
|
|
2824
2913
|
*/
|
|
2825
|
-
name:
|
|
2914
|
+
name: import_zod13.z.string(),
|
|
2826
2915
|
/**
|
|
2827
2916
|
* Version constraint (semver range)
|
|
2828
2917
|
*/
|
|
2829
|
-
versionConstraint:
|
|
2918
|
+
versionConstraint: import_zod13.z.string().describe("Semver range (e.g., `^1.0.0`, `>=2.0.0 <3.0.0`)"),
|
|
2830
2919
|
/**
|
|
2831
2920
|
* Dependency type
|
|
2832
2921
|
*/
|
|
2833
|
-
type:
|
|
2922
|
+
type: import_zod13.z.enum(["required", "optional", "peer", "dev"]).default("required"),
|
|
2834
2923
|
/**
|
|
2835
2924
|
* Resolved version (filled during resolution)
|
|
2836
2925
|
*/
|
|
2837
|
-
resolvedVersion:
|
|
2926
|
+
resolvedVersion: import_zod13.z.string().optional()
|
|
2838
2927
|
});
|
|
2839
|
-
var DependencyGraphNodeSchema =
|
|
2928
|
+
var DependencyGraphNodeSchema = import_zod13.z.object({
|
|
2840
2929
|
/**
|
|
2841
2930
|
* Package identifier
|
|
2842
2931
|
*/
|
|
2843
|
-
id:
|
|
2932
|
+
id: import_zod13.z.string(),
|
|
2844
2933
|
/**
|
|
2845
2934
|
* Package version
|
|
2846
2935
|
*/
|
|
2847
|
-
version:
|
|
2936
|
+
version: import_zod13.z.string(),
|
|
2848
2937
|
/**
|
|
2849
2938
|
* Dependencies of this package
|
|
2850
2939
|
*/
|
|
2851
|
-
dependencies:
|
|
2940
|
+
dependencies: import_zod13.z.array(PackageDependencySchema).default([]),
|
|
2852
2941
|
/**
|
|
2853
2942
|
* Depth in dependency tree
|
|
2854
2943
|
*/
|
|
2855
|
-
depth:
|
|
2944
|
+
depth: import_zod13.z.number().int().min(0),
|
|
2856
2945
|
/**
|
|
2857
2946
|
* Whether this is a direct dependency
|
|
2858
2947
|
*/
|
|
2859
|
-
isDirect:
|
|
2948
|
+
isDirect: import_zod13.z.boolean(),
|
|
2860
2949
|
/**
|
|
2861
2950
|
* Package metadata
|
|
2862
2951
|
*/
|
|
2863
|
-
metadata:
|
|
2864
|
-
name:
|
|
2865
|
-
description:
|
|
2866
|
-
license:
|
|
2867
|
-
homepage:
|
|
2952
|
+
metadata: import_zod13.z.object({
|
|
2953
|
+
name: import_zod13.z.string(),
|
|
2954
|
+
description: import_zod13.z.string().optional(),
|
|
2955
|
+
license: import_zod13.z.string().optional(),
|
|
2956
|
+
homepage: import_zod13.z.string().url().optional()
|
|
2868
2957
|
}).optional()
|
|
2869
2958
|
});
|
|
2870
|
-
var DependencyGraphSchema =
|
|
2959
|
+
var DependencyGraphSchema = import_zod13.z.object({
|
|
2871
2960
|
/**
|
|
2872
2961
|
* Root package
|
|
2873
2962
|
*/
|
|
2874
|
-
root:
|
|
2875
|
-
id:
|
|
2876
|
-
version:
|
|
2963
|
+
root: import_zod13.z.object({
|
|
2964
|
+
id: import_zod13.z.string(),
|
|
2965
|
+
version: import_zod13.z.string()
|
|
2877
2966
|
}),
|
|
2878
2967
|
/**
|
|
2879
2968
|
* All nodes in the graph
|
|
2880
2969
|
*/
|
|
2881
|
-
nodes:
|
|
2970
|
+
nodes: import_zod13.z.array(DependencyGraphNodeSchema),
|
|
2882
2971
|
/**
|
|
2883
2972
|
* Edges (dependency relationships)
|
|
2884
2973
|
*/
|
|
2885
|
-
edges:
|
|
2886
|
-
from:
|
|
2887
|
-
to:
|
|
2888
|
-
constraint:
|
|
2974
|
+
edges: import_zod13.z.array(import_zod13.z.object({
|
|
2975
|
+
from: import_zod13.z.string().describe("Package ID"),
|
|
2976
|
+
to: import_zod13.z.string().describe("Package ID"),
|
|
2977
|
+
constraint: import_zod13.z.string().describe("Version constraint")
|
|
2889
2978
|
})),
|
|
2890
2979
|
/**
|
|
2891
2980
|
* Resolution statistics
|
|
2892
2981
|
*/
|
|
2893
|
-
stats:
|
|
2894
|
-
totalDependencies:
|
|
2895
|
-
directDependencies:
|
|
2896
|
-
maxDepth:
|
|
2982
|
+
stats: import_zod13.z.object({
|
|
2983
|
+
totalDependencies: import_zod13.z.number().int().min(0),
|
|
2984
|
+
directDependencies: import_zod13.z.number().int().min(0),
|
|
2985
|
+
maxDepth: import_zod13.z.number().int().min(0)
|
|
2897
2986
|
})
|
|
2898
2987
|
});
|
|
2899
|
-
var DependencyConflictSchema =
|
|
2988
|
+
var DependencyConflictSchema = import_zod13.z.object({
|
|
2900
2989
|
/**
|
|
2901
2990
|
* Package with conflict
|
|
2902
2991
|
*/
|
|
2903
|
-
package:
|
|
2992
|
+
package: import_zod13.z.string(),
|
|
2904
2993
|
/**
|
|
2905
2994
|
* Conflicting versions
|
|
2906
2995
|
*/
|
|
2907
|
-
conflicts:
|
|
2908
|
-
version:
|
|
2909
|
-
requestedBy:
|
|
2910
|
-
constraint:
|
|
2996
|
+
conflicts: import_zod13.z.array(import_zod13.z.object({
|
|
2997
|
+
version: import_zod13.z.string(),
|
|
2998
|
+
requestedBy: import_zod13.z.array(import_zod13.z.string()).describe("Packages that require this version"),
|
|
2999
|
+
constraint: import_zod13.z.string()
|
|
2911
3000
|
})),
|
|
2912
3001
|
/**
|
|
2913
3002
|
* Suggested resolution
|
|
2914
3003
|
*/
|
|
2915
|
-
resolution:
|
|
2916
|
-
strategy:
|
|
2917
|
-
version:
|
|
2918
|
-
reason:
|
|
3004
|
+
resolution: import_zod13.z.object({
|
|
3005
|
+
strategy: import_zod13.z.enum(["pick-highest", "pick-lowest", "manual"]),
|
|
3006
|
+
version: import_zod13.z.string().optional(),
|
|
3007
|
+
reason: import_zod13.z.string().optional()
|
|
2919
3008
|
}).optional(),
|
|
2920
3009
|
/**
|
|
2921
3010
|
* Severity
|
|
2922
3011
|
*/
|
|
2923
|
-
severity:
|
|
3012
|
+
severity: import_zod13.z.enum(["error", "warning", "info"])
|
|
2924
3013
|
});
|
|
2925
|
-
var DependencyResolutionResultSchema =
|
|
3014
|
+
var DependencyResolutionResultSchema = import_zod13.z.object({
|
|
2926
3015
|
/**
|
|
2927
3016
|
* Resolution status
|
|
2928
3017
|
*/
|
|
2929
|
-
status:
|
|
3018
|
+
status: import_zod13.z.enum(["success", "conflict", "error"]),
|
|
2930
3019
|
/**
|
|
2931
3020
|
* Resolved dependency graph
|
|
2932
3021
|
*/
|
|
@@ -2934,207 +3023,207 @@ var DependencyResolutionResultSchema = import_zod12.z.object({
|
|
|
2934
3023
|
/**
|
|
2935
3024
|
* Conflicts detected
|
|
2936
3025
|
*/
|
|
2937
|
-
conflicts:
|
|
3026
|
+
conflicts: import_zod13.z.array(DependencyConflictSchema).default([]),
|
|
2938
3027
|
/**
|
|
2939
3028
|
* Errors encountered
|
|
2940
3029
|
*/
|
|
2941
|
-
errors:
|
|
2942
|
-
package:
|
|
2943
|
-
error:
|
|
3030
|
+
errors: import_zod13.z.array(import_zod13.z.object({
|
|
3031
|
+
package: import_zod13.z.string(),
|
|
3032
|
+
error: import_zod13.z.string()
|
|
2944
3033
|
})).default([]),
|
|
2945
3034
|
/**
|
|
2946
3035
|
* Installation order (topological sort)
|
|
2947
3036
|
*/
|
|
2948
|
-
installOrder:
|
|
3037
|
+
installOrder: import_zod13.z.array(import_zod13.z.string()).default([]),
|
|
2949
3038
|
/**
|
|
2950
3039
|
* Resolution time (ms)
|
|
2951
3040
|
*/
|
|
2952
|
-
resolvedIn:
|
|
3041
|
+
resolvedIn: import_zod13.z.number().int().min(0).optional()
|
|
2953
3042
|
});
|
|
2954
|
-
var SBOMEntrySchema =
|
|
3043
|
+
var SBOMEntrySchema = import_zod13.z.object({
|
|
2955
3044
|
/**
|
|
2956
3045
|
* Component name
|
|
2957
3046
|
*/
|
|
2958
|
-
name:
|
|
3047
|
+
name: import_zod13.z.string(),
|
|
2959
3048
|
/**
|
|
2960
3049
|
* Component version
|
|
2961
3050
|
*/
|
|
2962
|
-
version:
|
|
3051
|
+
version: import_zod13.z.string(),
|
|
2963
3052
|
/**
|
|
2964
3053
|
* Package URL (purl)
|
|
2965
3054
|
*/
|
|
2966
|
-
purl:
|
|
3055
|
+
purl: import_zod13.z.string().optional().describe("Package URL identifier"),
|
|
2967
3056
|
/**
|
|
2968
3057
|
* License
|
|
2969
3058
|
*/
|
|
2970
|
-
license:
|
|
3059
|
+
license: import_zod13.z.string().optional(),
|
|
2971
3060
|
/**
|
|
2972
3061
|
* Hashes
|
|
2973
3062
|
*/
|
|
2974
|
-
hashes:
|
|
2975
|
-
sha256:
|
|
2976
|
-
sha512:
|
|
3063
|
+
hashes: import_zod13.z.object({
|
|
3064
|
+
sha256: import_zod13.z.string().optional(),
|
|
3065
|
+
sha512: import_zod13.z.string().optional()
|
|
2977
3066
|
}).optional(),
|
|
2978
3067
|
/**
|
|
2979
3068
|
* Supplier
|
|
2980
3069
|
*/
|
|
2981
|
-
supplier:
|
|
2982
|
-
name:
|
|
2983
|
-
url:
|
|
3070
|
+
supplier: import_zod13.z.object({
|
|
3071
|
+
name: import_zod13.z.string(),
|
|
3072
|
+
url: import_zod13.z.string().url().optional()
|
|
2984
3073
|
}).optional(),
|
|
2985
3074
|
/**
|
|
2986
3075
|
* External references
|
|
2987
3076
|
*/
|
|
2988
|
-
externalRefs:
|
|
2989
|
-
type:
|
|
2990
|
-
url:
|
|
3077
|
+
externalRefs: import_zod13.z.array(import_zod13.z.object({
|
|
3078
|
+
type: import_zod13.z.enum(["website", "repository", "documentation", "issue-tracker"]),
|
|
3079
|
+
url: import_zod13.z.string().url()
|
|
2991
3080
|
})).default([])
|
|
2992
3081
|
});
|
|
2993
|
-
var SBOMSchema =
|
|
3082
|
+
var SBOMSchema = import_zod13.z.object({
|
|
2994
3083
|
/**
|
|
2995
3084
|
* SBOM format
|
|
2996
3085
|
*/
|
|
2997
|
-
format:
|
|
3086
|
+
format: import_zod13.z.enum(["spdx", "cyclonedx"]).default("cyclonedx"),
|
|
2998
3087
|
/**
|
|
2999
3088
|
* SBOM version
|
|
3000
3089
|
*/
|
|
3001
|
-
version:
|
|
3090
|
+
version: import_zod13.z.string(),
|
|
3002
3091
|
/**
|
|
3003
3092
|
* Plugin metadata
|
|
3004
3093
|
*/
|
|
3005
|
-
plugin:
|
|
3006
|
-
id:
|
|
3007
|
-
version:
|
|
3008
|
-
name:
|
|
3094
|
+
plugin: import_zod13.z.object({
|
|
3095
|
+
id: import_zod13.z.string(),
|
|
3096
|
+
version: import_zod13.z.string(),
|
|
3097
|
+
name: import_zod13.z.string()
|
|
3009
3098
|
}),
|
|
3010
3099
|
/**
|
|
3011
3100
|
* Components (dependencies)
|
|
3012
3101
|
*/
|
|
3013
|
-
components:
|
|
3102
|
+
components: import_zod13.z.array(SBOMEntrySchema),
|
|
3014
3103
|
/**
|
|
3015
3104
|
* Generation timestamp
|
|
3016
3105
|
*/
|
|
3017
|
-
generatedAt:
|
|
3106
|
+
generatedAt: import_zod13.z.string().datetime(),
|
|
3018
3107
|
/**
|
|
3019
3108
|
* Generator tool
|
|
3020
3109
|
*/
|
|
3021
|
-
generator:
|
|
3022
|
-
name:
|
|
3023
|
-
version:
|
|
3110
|
+
generator: import_zod13.z.object({
|
|
3111
|
+
name: import_zod13.z.string(),
|
|
3112
|
+
version: import_zod13.z.string()
|
|
3024
3113
|
}).optional()
|
|
3025
3114
|
});
|
|
3026
|
-
var PluginProvenanceSchema =
|
|
3115
|
+
var PluginProvenanceSchema = import_zod13.z.object({
|
|
3027
3116
|
/**
|
|
3028
3117
|
* Plugin identifier
|
|
3029
3118
|
*/
|
|
3030
|
-
pluginId:
|
|
3119
|
+
pluginId: import_zod13.z.string(),
|
|
3031
3120
|
/**
|
|
3032
3121
|
* Plugin version
|
|
3033
3122
|
*/
|
|
3034
|
-
version:
|
|
3123
|
+
version: import_zod13.z.string(),
|
|
3035
3124
|
/**
|
|
3036
3125
|
* Build information
|
|
3037
3126
|
*/
|
|
3038
|
-
build:
|
|
3127
|
+
build: import_zod13.z.object({
|
|
3039
3128
|
/**
|
|
3040
3129
|
* Build timestamp
|
|
3041
3130
|
*/
|
|
3042
|
-
timestamp:
|
|
3131
|
+
timestamp: import_zod13.z.string().datetime(),
|
|
3043
3132
|
/**
|
|
3044
3133
|
* Build environment
|
|
3045
3134
|
*/
|
|
3046
|
-
environment:
|
|
3047
|
-
os:
|
|
3048
|
-
arch:
|
|
3049
|
-
nodeVersion:
|
|
3135
|
+
environment: import_zod13.z.object({
|
|
3136
|
+
os: import_zod13.z.string(),
|
|
3137
|
+
arch: import_zod13.z.string(),
|
|
3138
|
+
nodeVersion: import_zod13.z.string()
|
|
3050
3139
|
}).optional(),
|
|
3051
3140
|
/**
|
|
3052
3141
|
* Source repository
|
|
3053
3142
|
*/
|
|
3054
|
-
source:
|
|
3055
|
-
repository:
|
|
3056
|
-
commit:
|
|
3057
|
-
branch:
|
|
3058
|
-
tag:
|
|
3143
|
+
source: import_zod13.z.object({
|
|
3144
|
+
repository: import_zod13.z.string().url(),
|
|
3145
|
+
commit: import_zod13.z.string().regex(/^[a-f0-9]{40}$/),
|
|
3146
|
+
branch: import_zod13.z.string().optional(),
|
|
3147
|
+
tag: import_zod13.z.string().optional()
|
|
3059
3148
|
}).optional(),
|
|
3060
3149
|
/**
|
|
3061
3150
|
* Builder identity
|
|
3062
3151
|
*/
|
|
3063
|
-
builder:
|
|
3064
|
-
name:
|
|
3065
|
-
email:
|
|
3152
|
+
builder: import_zod13.z.object({
|
|
3153
|
+
name: import_zod13.z.string(),
|
|
3154
|
+
email: import_zod13.z.string().email().optional()
|
|
3066
3155
|
}).optional()
|
|
3067
3156
|
}),
|
|
3068
3157
|
/**
|
|
3069
3158
|
* Artifact hashes
|
|
3070
3159
|
*/
|
|
3071
|
-
artifacts:
|
|
3072
|
-
filename:
|
|
3073
|
-
sha256:
|
|
3074
|
-
size:
|
|
3160
|
+
artifacts: import_zod13.z.array(import_zod13.z.object({
|
|
3161
|
+
filename: import_zod13.z.string(),
|
|
3162
|
+
sha256: import_zod13.z.string(),
|
|
3163
|
+
size: import_zod13.z.number().int().positive()
|
|
3075
3164
|
})),
|
|
3076
3165
|
/**
|
|
3077
3166
|
* Signatures
|
|
3078
3167
|
*/
|
|
3079
|
-
signatures:
|
|
3080
|
-
algorithm:
|
|
3081
|
-
publicKey:
|
|
3082
|
-
signature:
|
|
3083
|
-
signedBy:
|
|
3084
|
-
timestamp:
|
|
3168
|
+
signatures: import_zod13.z.array(import_zod13.z.object({
|
|
3169
|
+
algorithm: import_zod13.z.enum(["rsa", "ecdsa", "ed25519"]),
|
|
3170
|
+
publicKey: import_zod13.z.string(),
|
|
3171
|
+
signature: import_zod13.z.string(),
|
|
3172
|
+
signedBy: import_zod13.z.string(),
|
|
3173
|
+
timestamp: import_zod13.z.string().datetime()
|
|
3085
3174
|
})).default([]),
|
|
3086
3175
|
/**
|
|
3087
3176
|
* Attestations
|
|
3088
3177
|
*/
|
|
3089
|
-
attestations:
|
|
3090
|
-
type:
|
|
3091
|
-
status:
|
|
3092
|
-
url:
|
|
3093
|
-
timestamp:
|
|
3178
|
+
attestations: import_zod13.z.array(import_zod13.z.object({
|
|
3179
|
+
type: import_zod13.z.enum(["code-review", "security-scan", "test-results", "ci-build"]),
|
|
3180
|
+
status: import_zod13.z.enum(["passed", "failed"]),
|
|
3181
|
+
url: import_zod13.z.string().url().optional(),
|
|
3182
|
+
timestamp: import_zod13.z.string().datetime()
|
|
3094
3183
|
})).default([])
|
|
3095
3184
|
});
|
|
3096
|
-
var PluginTrustScoreSchema =
|
|
3185
|
+
var PluginTrustScoreSchema = import_zod13.z.object({
|
|
3097
3186
|
/**
|
|
3098
3187
|
* Plugin identifier
|
|
3099
3188
|
*/
|
|
3100
|
-
pluginId:
|
|
3189
|
+
pluginId: import_zod13.z.string(),
|
|
3101
3190
|
/**
|
|
3102
3191
|
* Overall trust score (0-100)
|
|
3103
3192
|
*/
|
|
3104
|
-
score:
|
|
3193
|
+
score: import_zod13.z.number().min(0).max(100),
|
|
3105
3194
|
/**
|
|
3106
3195
|
* Score components
|
|
3107
3196
|
*/
|
|
3108
|
-
components:
|
|
3197
|
+
components: import_zod13.z.object({
|
|
3109
3198
|
/**
|
|
3110
3199
|
* Vendor reputation (0-100)
|
|
3111
3200
|
*/
|
|
3112
|
-
vendorReputation:
|
|
3201
|
+
vendorReputation: import_zod13.z.number().min(0).max(100),
|
|
3113
3202
|
/**
|
|
3114
3203
|
* Security scan results (0-100)
|
|
3115
3204
|
*/
|
|
3116
|
-
securityScore:
|
|
3205
|
+
securityScore: import_zod13.z.number().min(0).max(100),
|
|
3117
3206
|
/**
|
|
3118
3207
|
* Code quality (0-100)
|
|
3119
3208
|
*/
|
|
3120
|
-
codeQuality:
|
|
3209
|
+
codeQuality: import_zod13.z.number().min(0).max(100),
|
|
3121
3210
|
/**
|
|
3122
3211
|
* Community engagement (0-100)
|
|
3123
3212
|
*/
|
|
3124
|
-
communityScore:
|
|
3213
|
+
communityScore: import_zod13.z.number().min(0).max(100),
|
|
3125
3214
|
/**
|
|
3126
3215
|
* Update frequency (0-100)
|
|
3127
3216
|
*/
|
|
3128
|
-
maintenanceScore:
|
|
3217
|
+
maintenanceScore: import_zod13.z.number().min(0).max(100)
|
|
3129
3218
|
}),
|
|
3130
3219
|
/**
|
|
3131
3220
|
* Trust level
|
|
3132
3221
|
*/
|
|
3133
|
-
level:
|
|
3222
|
+
level: import_zod13.z.enum(["verified", "trusted", "neutral", "untrusted", "blocked"]),
|
|
3134
3223
|
/**
|
|
3135
3224
|
* Verification badges
|
|
3136
3225
|
*/
|
|
3137
|
-
badges:
|
|
3226
|
+
badges: import_zod13.z.array(import_zod13.z.enum([
|
|
3138
3227
|
"official",
|
|
3139
3228
|
// Official ObjectStack plugin
|
|
3140
3229
|
"verified-vendor",
|
|
@@ -3151,7 +3240,7 @@ var PluginTrustScoreSchema = import_zod12.z.object({
|
|
|
3151
3240
|
/**
|
|
3152
3241
|
* Last updated
|
|
3153
3242
|
*/
|
|
3154
|
-
updatedAt:
|
|
3243
|
+
updatedAt: import_zod13.z.string().datetime()
|
|
3155
3244
|
});
|
|
3156
3245
|
var PluginSecurityProtocol = {
|
|
3157
3246
|
VulnerabilitySeverity,
|