0xray 4.0.34 → 4.0.36
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/.grok-plugin/plugin.json +1 -1
- package/.xray/codex.json +12 -4
- package/.xray/features.json +1 -1
- package/AGENTS-consumer.md +6 -6
- package/AGENTS.md +5 -5
- package/README.md +2 -2
- package/dist/AGENTS.md +5 -5
- package/dist/CHANGELOG.md +26 -0
- package/dist/README.md +2 -2
- package/dist/cli/index.js +2 -5
- package/dist/governance/governance-service.js +1 -1
- package/dist/integrations/base/README.md +1 -9
- package/dist/integrations/base/index.d.ts +0 -1
- package/dist/integrations/base/index.js +0 -2
- package/dist/integrations/governance/index.js +31 -8
- package/dist/integrations/grok/hooks/grok-hook-utils.js +1 -1
- package/dist/integrations/grok/hooks/session-start.js +12 -0
- package/dist/integrations/grok/plugin/0xray/hooks/hooks.json +6 -6
- package/dist/integrations/hooks/goggles-mcp.mjs +10 -3
- package/dist/integrations/hooks/goggles-pipeline.mjs +110 -23
- package/dist/integrations/hooks/host-truth.mjs +74 -0
- package/dist/integrations/hooks/station-hook-runtime.cjs +3 -0
- package/dist/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
- package/dist/mcps/knowledge-skills/storyteller.server.js +0 -1
- package/dist/nucleus/delegation-gate.d.ts +2 -2
- package/dist/nucleus/delegation-gate.js +13 -2
- package/dist/nucleus/work-freshness.mjs +189 -0
- package/dist/processors/implementations/agents-md-validation-processor.js +1 -1
- package/docs-site/docs/plates/boot.md +17 -2
- package/docs-site/docs/plates/governance.md +3 -2
- package/docs-site/docs/plates/index.md +3 -1
- package/docs-site/docs/plates/memory-recall.md +26 -35
- package/docs-site/docs/plates/orchestration.md +39 -35
- package/docs-site/docs/plates/processor.md +34 -36
- package/docs-site/docs/plates/reporting.md +3 -8
- package/docs-site/docs/plates/routing.md +22 -11
- package/package.json +3 -2
- package/scripts/foundry/release.mjs +48 -5
- package/scripts/mjs/run-grok-hook.mjs +50 -0
- package/scripts/mjs/test-consumer-readiness.mjs +1 -0
- package/scripts/mjs/test-mcp-functionality.mjs +14 -9
- package/scripts/node/basic-security-audit.cjs +0 -1
- package/scripts/node/bridge-mcp-wiring.cjs +66 -3
- package/scripts/node/install-bridges.cjs +3 -3
- package/scripts/node/postinstall.cjs +1 -1
- package/scripts/node/prepare-consumer.cjs +11 -7
- package/scripts/node/setup-dev.cjs +18 -26
- package/scripts/node/validate-mcp-connectivity.js +2 -1
- package/src/integrations/grok/plugin/0xray/hooks/hooks.json +6 -6
- package/src/integrations/openclaw/plugin/xray-pre-tool/package.json +1 -1
- package/src/mcps/knowledge-skills/storyteller.server.ts +0 -1
- package/xray/agents_template.md +5 -5
- package/xray/codex.json +12 -4
- package/xray/features.json +1 -1
- package/dist/agents/known-names.d.ts +0 -26
- package/dist/agents/known-names.js +0 -72
- package/dist/analytics/consent-manager.d.ts +0 -92
- package/dist/analytics/consent-manager.js +0 -257
- package/dist/benchmark/performance-benchmark.d.ts +0 -103
- package/dist/benchmark/performance-benchmark.js +0 -373
- package/dist/cli/commands/analytics-disable.d.ts +0 -9
- package/dist/cli/commands/analytics-disable.js +0 -72
- package/dist/cli/commands/analytics-enable-action.d.ts +0 -8
- package/dist/cli/commands/analytics-enable-action.js +0 -82
- package/dist/cli/commands/analytics-preview.d.ts +0 -9
- package/dist/cli/commands/analytics-preview.js +0 -106
- package/dist/cli/commands/analytics-status.d.ts +0 -9
- package/dist/cli/commands/analytics-status.js +0 -68
- package/dist/cli/commands/enforce.d.ts +0 -12
- package/dist/cli/commands/enforce.js +0 -78
- package/dist/cli/commands/govern.d.ts +0 -29
- package/dist/cli/commands/govern.js +0 -149
- package/dist/cli/commands/security-audit.d.ts +0 -23
- package/dist/cli/commands/security-audit.js +0 -219
- package/dist/cli/server.d.ts +0 -1
- package/dist/cli/server.js +0 -147
- package/dist/config/routing-mappings.d.ts +0 -26
- package/dist/config/routing-mappings.js +0 -151
- package/dist/core/bridge.mjs +0 -922
- package/dist/core/trace-context.d.ts +0 -12
- package/dist/core/trace-context.js +0 -33
- package/dist/enforcement/index.d.ts +0 -22
- package/dist/enforcement/index.js +0 -40
- package/dist/enforcement/loaders/index.d.ts +0 -36
- package/dist/enforcement/loaders/index.js +0 -39
- package/dist/enforcement/test-auto-healing.d.ts +0 -83
- package/dist/enforcement/test-auto-healing.js +0 -325
- package/dist/inference/index.d.ts +0 -10
- package/dist/inference/index.js +0 -5
- package/dist/infrastructure/iac-validator.d.ts +0 -150
- package/dist/infrastructure/iac-validator.js +0 -465
- package/dist/infrastructure/schemas/cloud-schemas.d.ts +0 -482
- package/dist/infrastructure/schemas/cloud-schemas.js +0 -488
- package/dist/integrations/base/ExampleIntegration.d.ts +0 -46
- package/dist/integrations/base/ExampleIntegration.js +0 -180
- package/dist/integrations/enforcement-gate.d.ts +0 -44
- package/dist/integrations/enforcement-gate.js +0 -348
- package/dist/mcps/connection/connection-manager.d.ts +0 -39
- package/dist/mcps/connection/connection-manager.js +0 -79
- package/dist/mcps/index.d.ts +0 -17
- package/dist/mcps/index.js +0 -65
- package/dist/mcps/orchestrator/index.d.ts +0 -6
- package/dist/mcps/orchestrator/index.js +0 -5
- package/dist/metrics/index.d.ts +0 -6
- package/dist/metrics/index.js +0 -6
- package/dist/orchestrator/self-direction-activation.d.ts +0 -108
- package/dist/orchestrator/self-direction-activation.js +0 -244
- package/dist/orchestrator/universal-registry-bridge.d.ts +0 -84
- package/dist/orchestrator/universal-registry-bridge.js +0 -246
- package/dist/performance/performance-budget-enforcer.d.ts +0 -157
- package/dist/performance/performance-budget-enforcer.js +0 -433
- package/dist/performance/performance-regression-tester.d.ts +0 -107
- package/dist/performance/performance-regression-tester.js +0 -341
- package/dist/postprocessor/analysis/CodeChangeAnalyzer.d.ts +0 -11
- package/dist/postprocessor/analysis/CodeChangeAnalyzer.js +0 -50
- package/dist/postprocessor/config/ProcessorConfigLoader.d.ts +0 -44
- package/dist/postprocessor/config/ProcessorConfigLoader.js +0 -16
- package/dist/postprocessor/integration.d.ts +0 -156
- package/dist/postprocessor/integration.js +0 -194
- package/dist/postprocessor/metamorphosis/index.d.ts +0 -2
- package/dist/postprocessor/metamorphosis/index.js +0 -1
- package/dist/postprocessor/redeploy/RetryHandler.d.ts +0 -49
- package/dist/postprocessor/redeploy/RetryHandler.js +0 -118
- package/dist/processors/implementations/session-capture-processor.d.ts +0 -14
- package/dist/processors/implementations/session-capture-processor.js +0 -37
- package/dist/public/XrayService.d.ts +0 -17
- package/dist/public/XrayService.js +0 -40
- package/dist/public/index.d.ts +0 -4
- package/dist/public/index.js +0 -2
- package/dist/security/comprehensive-security-audit.d.ts +0 -157
- package/dist/security/comprehensive-security-audit.js +0 -1004
- package/dist/security/index.d.ts +0 -13
- package/dist/security/index.js +0 -13
- package/dist/security/security-agent-coordinator.d.ts +0 -71
- package/dist/security/security-agent-coordinator.js +0 -203
- package/dist/security/security-hardening-system.d.ts +0 -238
- package/dist/security/security-hardening-system.js +0 -726
- package/dist/security/security-orchestration-layer.d.ts +0 -118
- package/dist/security/security-orchestration-layer.js +0 -495
- package/dist/testing/memory-regression-suite.d.ts +0 -105
- package/dist/testing/memory-regression-suite.js +0 -258
- package/dist/tools/assess-complexity-tool.d.ts +0 -28
- package/dist/tools/assess-complexity-tool.js +0 -44
- package/dist/tools/query-routing-tool.d.ts +0 -17
- package/dist/tools/query-routing-tool.js +0 -59
- package/dist/utils/batch-operations.d.ts +0 -25
- package/dist/utils/batch-operations.js +0 -292
- package/dist/utils/task-graph.d.ts +0 -29
- package/dist/utils/task-graph.js +0 -106
- package/dist/utils/test-template-generator.d.ts +0 -25
- package/dist/utils/test-template-generator.js +0 -178
- package/dist/utils/token-manager.d.ts +0 -48
- package/dist/utils/token-manager.js +0 -163
- package/dist/validation/agent-config-validator.d.ts +0 -110
- package/dist/validation/agent-config-validator.js +0 -280
- package/dist/validation/orchestration-flow-validator.d.ts +0 -87
- package/dist/validation/orchestration-flow-validator.js +0 -606
- package/src/mcps/connection/connection-manager.ts +0 -91
- package/src/mcps/index.ts +0 -80
- package/src/mcps/orchestrator/index.ts +0 -29
|
@@ -1,488 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Cloud Infrastructure Schemas
|
|
3
|
-
*
|
|
4
|
-
* Schema definitions for cloud provider configurations, ensuring
|
|
5
|
-
* enterprise-grade validation and compliance with Universal Development Codex v1.2.0.
|
|
6
|
-
*
|
|
7
|
-
* @since 2026-01-08
|
|
8
|
-
*/
|
|
9
|
-
import { z } from "zod";
|
|
10
|
-
// ============================================================================
|
|
11
|
-
// AWS Schemas
|
|
12
|
-
// ============================================================================
|
|
13
|
-
export const AWSCredentialsSchema = z.object({
|
|
14
|
-
accessKeyId: z.string(),
|
|
15
|
-
secretAccessKey: z.string(),
|
|
16
|
-
sessionToken: z.string().optional(),
|
|
17
|
-
region: z.string().default("us-east-1"),
|
|
18
|
-
});
|
|
19
|
-
export const AWSVPCConfigSchema = z.object({
|
|
20
|
-
vpcId: z.string().optional(),
|
|
21
|
-
subnetIds: z.array(z.string()).optional(),
|
|
22
|
-
securityGroupIds: z.array(z.string()).optional(),
|
|
23
|
-
createVpc: z.boolean().default(false),
|
|
24
|
-
cidrBlock: z.string().default("10.0.0.0/16"),
|
|
25
|
-
availabilityZones: z.array(z.string()).optional(),
|
|
26
|
-
});
|
|
27
|
-
export const AWSLoadBalancerConfigSchema = z.object({
|
|
28
|
-
name: z.string(),
|
|
29
|
-
type: z.enum(["application", "network", "gateway"]).default("application"),
|
|
30
|
-
scheme: z.enum(["internet-facing", "internal"]).default("internet-facing"),
|
|
31
|
-
securityGroups: z.array(z.string()).optional(),
|
|
32
|
-
subnets: z.array(z.string()).optional(),
|
|
33
|
-
enableDeletionProtection: z.boolean().default(true),
|
|
34
|
-
idleTimeout: z.number().min(1).max(4000).default(60),
|
|
35
|
-
// Rate limiting configuration
|
|
36
|
-
rateLimit: z
|
|
37
|
-
.object({
|
|
38
|
-
enabled: z.boolean().default(true),
|
|
39
|
-
requestsPerSecond: z.number().min(1).max(100000).default(1000),
|
|
40
|
-
burstLimit: z.number().min(1).max(100000).default(2000),
|
|
41
|
-
byIp: z.boolean().default(true),
|
|
42
|
-
byHeader: z
|
|
43
|
-
.object({
|
|
44
|
-
enabled: z.boolean().default(false),
|
|
45
|
-
headerName: z.string().optional(),
|
|
46
|
-
headerValues: z.array(z.string()).optional(),
|
|
47
|
-
})
|
|
48
|
-
.optional(),
|
|
49
|
-
customRules: z
|
|
50
|
-
.array(z.object({
|
|
51
|
-
name: z.string(),
|
|
52
|
-
priority: z.number(),
|
|
53
|
-
action: z.enum(["allow", "deny", "count"]),
|
|
54
|
-
conditions: z.array(z.object({
|
|
55
|
-
type: z.enum([
|
|
56
|
-
"httpMethod",
|
|
57
|
-
"path",
|
|
58
|
-
"header",
|
|
59
|
-
"queryString",
|
|
60
|
-
"sourceIp",
|
|
61
|
-
]),
|
|
62
|
-
values: z.array(z.string()),
|
|
63
|
-
})),
|
|
64
|
-
}))
|
|
65
|
-
.optional(),
|
|
66
|
-
})
|
|
67
|
-
.optional(),
|
|
68
|
-
});
|
|
69
|
-
export const AWSAPIGatewayConfigSchema = z.object({
|
|
70
|
-
name: z.string(),
|
|
71
|
-
description: z.string().optional(),
|
|
72
|
-
protocolType: z.enum(["HTTP", "WEBSOCKET"]).default("HTTP"),
|
|
73
|
-
corsConfiguration: z
|
|
74
|
-
.object({
|
|
75
|
-
allowCredentials: z.boolean().optional(),
|
|
76
|
-
allowHeaders: z.array(z.string()).optional(),
|
|
77
|
-
allowMethods: z.array(z.string()).optional(),
|
|
78
|
-
allowOrigins: z.array(z.string()).optional(),
|
|
79
|
-
exposeHeaders: z.array(z.string()).optional(),
|
|
80
|
-
maxAge: z.number().optional(),
|
|
81
|
-
})
|
|
82
|
-
.optional(),
|
|
83
|
-
// Rate limiting for API Gateway
|
|
84
|
-
throttling: z
|
|
85
|
-
.object({
|
|
86
|
-
burstLimit: z.number().min(1).max(10000).default(5000),
|
|
87
|
-
rateLimit: z.number().min(0.05).max(10000).default(10000),
|
|
88
|
-
})
|
|
89
|
-
.optional(),
|
|
90
|
-
// Usage plans for rate limiting
|
|
91
|
-
usagePlans: z
|
|
92
|
-
.array(z.object({
|
|
93
|
-
name: z.string(),
|
|
94
|
-
description: z.string().optional(),
|
|
95
|
-
throttle: z.object({
|
|
96
|
-
burstLimit: z.number().min(1).max(10000),
|
|
97
|
-
rateLimit: z.number().min(0.05).max(10000),
|
|
98
|
-
}),
|
|
99
|
-
quota: z
|
|
100
|
-
.object({
|
|
101
|
-
limit: z.number().min(1),
|
|
102
|
-
offset: z.number().optional(),
|
|
103
|
-
period: z.enum(["DAY", "WEEK", "MONTH"]),
|
|
104
|
-
})
|
|
105
|
-
.optional(),
|
|
106
|
-
apiStages: z
|
|
107
|
-
.array(z.object({
|
|
108
|
-
apiId: z.string(),
|
|
109
|
-
stage: z.string(),
|
|
110
|
-
throttle: z
|
|
111
|
-
.record(z.string(), z.object({
|
|
112
|
-
burstLimit: z.number(),
|
|
113
|
-
rateLimit: z.number(),
|
|
114
|
-
}))
|
|
115
|
-
.optional(),
|
|
116
|
-
}))
|
|
117
|
-
.optional(),
|
|
118
|
-
}))
|
|
119
|
-
.optional(),
|
|
120
|
-
});
|
|
121
|
-
export const AWSCloudFormationTemplateSchema = z.object({
|
|
122
|
-
AWSTemplateFormatVersion: z.string().optional(),
|
|
123
|
-
Description: z.string().optional(),
|
|
124
|
-
Metadata: z.record(z.string(), z.any()).optional(),
|
|
125
|
-
Parameters: z
|
|
126
|
-
.record(z.string(), z.object({
|
|
127
|
-
Type: z.string(),
|
|
128
|
-
Default: z.any().optional(),
|
|
129
|
-
AllowedValues: z.array(z.any()).optional(),
|
|
130
|
-
AllowedPattern: z.string().optional(),
|
|
131
|
-
ConstraintDescription: z.string().optional(),
|
|
132
|
-
Description: z.string().optional(),
|
|
133
|
-
MaxLength: z.number().optional(),
|
|
134
|
-
MinLength: z.number().optional(),
|
|
135
|
-
MaxValue: z.number().optional(),
|
|
136
|
-
MinValue: z.number().optional(),
|
|
137
|
-
NoEcho: z.boolean().optional(),
|
|
138
|
-
}))
|
|
139
|
-
.optional(),
|
|
140
|
-
Mappings: z
|
|
141
|
-
.record(z.string(), z.record(z.string(), z.record(z.string(), z.any())))
|
|
142
|
-
.optional(),
|
|
143
|
-
Conditions: z.record(z.string(), z.any()).optional(),
|
|
144
|
-
Transform: z.union([z.string(), z.array(z.string())]).optional(),
|
|
145
|
-
Resources: z.record(z.string(), z.object({
|
|
146
|
-
Type: z.string(),
|
|
147
|
-
Properties: z.record(z.string(), z.any()).optional(),
|
|
148
|
-
DependsOn: z.union([z.string(), z.array(z.string())]).optional(),
|
|
149
|
-
Metadata: z.record(z.string(), z.any()).optional(),
|
|
150
|
-
DeletionPolicy: z.enum(["Delete", "Retain", "Snapshot"]).optional(),
|
|
151
|
-
UpdateReplacePolicy: z.enum(["Delete", "Retain", "Snapshot"]).optional(),
|
|
152
|
-
Condition: z.string().optional(),
|
|
153
|
-
})),
|
|
154
|
-
Outputs: z
|
|
155
|
-
.record(z.string(), z.object({
|
|
156
|
-
Description: z.string().optional(),
|
|
157
|
-
Value: z.any(),
|
|
158
|
-
Export: z
|
|
159
|
-
.object({
|
|
160
|
-
Name: z.string(),
|
|
161
|
-
})
|
|
162
|
-
.optional(),
|
|
163
|
-
Condition: z.string().optional(),
|
|
164
|
-
}))
|
|
165
|
-
.optional(),
|
|
166
|
-
});
|
|
167
|
-
// ============================================================================
|
|
168
|
-
// Azure Schemas
|
|
169
|
-
// ============================================================================
|
|
170
|
-
export const AzureCredentialsSchema = z.object({
|
|
171
|
-
clientId: z.string(),
|
|
172
|
-
clientSecret: z.string(),
|
|
173
|
-
tenantId: z.string(),
|
|
174
|
-
subscriptionId: z.string(),
|
|
175
|
-
});
|
|
176
|
-
export const AzureLoadBalancerConfigSchema = z.object({
|
|
177
|
-
name: z.string(),
|
|
178
|
-
location: z.string(),
|
|
179
|
-
sku: z.object({
|
|
180
|
-
name: z.enum(["Basic", "Standard"]).default("Standard"),
|
|
181
|
-
tier: z.enum(["Regional", "Global"]).default("Regional"),
|
|
182
|
-
}),
|
|
183
|
-
frontendIPConfigurations: z.array(z.object({
|
|
184
|
-
name: z.string(),
|
|
185
|
-
properties: z.object({
|
|
186
|
-
privateIPAllocationMethod: z.enum(["Static", "Dynamic"]).optional(),
|
|
187
|
-
privateIPAddress: z.string().optional(),
|
|
188
|
-
subnet: z
|
|
189
|
-
.object({
|
|
190
|
-
id: z.string(),
|
|
191
|
-
})
|
|
192
|
-
.optional(),
|
|
193
|
-
publicIPAddress: z
|
|
194
|
-
.object({
|
|
195
|
-
id: z.string(),
|
|
196
|
-
})
|
|
197
|
-
.optional(),
|
|
198
|
-
}),
|
|
199
|
-
})),
|
|
200
|
-
backendAddressPools: z
|
|
201
|
-
.array(z.object({
|
|
202
|
-
name: z.string(),
|
|
203
|
-
}))
|
|
204
|
-
.optional(),
|
|
205
|
-
loadBalancingRules: z
|
|
206
|
-
.array(z.object({
|
|
207
|
-
name: z.string(),
|
|
208
|
-
properties: z.object({
|
|
209
|
-
frontendIPConfiguration: z.object({
|
|
210
|
-
id: z.string(),
|
|
211
|
-
}),
|
|
212
|
-
backendAddressPool: z.object({
|
|
213
|
-
id: z.string(),
|
|
214
|
-
}),
|
|
215
|
-
probe: z.object({
|
|
216
|
-
id: z.string(),
|
|
217
|
-
}),
|
|
218
|
-
protocol: z.enum(["Tcp", "Udp", "All"]),
|
|
219
|
-
frontendPort: z.number(),
|
|
220
|
-
backendPort: z.number(),
|
|
221
|
-
idleTimeoutInMinutes: z.number().optional(),
|
|
222
|
-
enableFloatingIP: z.boolean().optional(),
|
|
223
|
-
loadDistribution: z
|
|
224
|
-
.enum(["Default", "SourceIP", "SourceIPProtocol"])
|
|
225
|
-
.optional(),
|
|
226
|
-
}),
|
|
227
|
-
}))
|
|
228
|
-
.optional(),
|
|
229
|
-
// Rate limiting configuration
|
|
230
|
-
rateLimit: z
|
|
231
|
-
.object({
|
|
232
|
-
enabled: z.boolean().default(true),
|
|
233
|
-
rules: z
|
|
234
|
-
.array(z.object({
|
|
235
|
-
name: z.string(),
|
|
236
|
-
priority: z.number(),
|
|
237
|
-
matchConditions: z.array(z.object({
|
|
238
|
-
matchVariables: z.array(z.object({
|
|
239
|
-
variableName: z.enum([
|
|
240
|
-
"RemoteAddr",
|
|
241
|
-
"RequestMethod",
|
|
242
|
-
"QueryString",
|
|
243
|
-
"PostArgs",
|
|
244
|
-
"RequestUri",
|
|
245
|
-
"RequestHeaders",
|
|
246
|
-
]),
|
|
247
|
-
selector: z.string().optional(),
|
|
248
|
-
})),
|
|
249
|
-
operator: z.enum([
|
|
250
|
-
"Any",
|
|
251
|
-
"IPMatch",
|
|
252
|
-
"GeoMatch",
|
|
253
|
-
"Equal",
|
|
254
|
-
"Contains",
|
|
255
|
-
"LessThan",
|
|
256
|
-
"GreaterThan",
|
|
257
|
-
"LessThanOrEqual",
|
|
258
|
-
"GreaterThanOrEqual",
|
|
259
|
-
"BeginsWith",
|
|
260
|
-
"EndsWith",
|
|
261
|
-
"RegEx",
|
|
262
|
-
]),
|
|
263
|
-
matchValues: z.array(z.string()),
|
|
264
|
-
transforms: z
|
|
265
|
-
.array(z.enum([
|
|
266
|
-
"Lowercase",
|
|
267
|
-
"Trim",
|
|
268
|
-
"UrlDecode",
|
|
269
|
-
"UrlEncode",
|
|
270
|
-
"RemoveNulls",
|
|
271
|
-
"HtmlEntityDecode",
|
|
272
|
-
]))
|
|
273
|
-
.optional(),
|
|
274
|
-
})),
|
|
275
|
-
action: z.enum(["Allow", "Block", "Log", "Redirect"]),
|
|
276
|
-
}))
|
|
277
|
-
.optional(),
|
|
278
|
-
})
|
|
279
|
-
.optional(),
|
|
280
|
-
});
|
|
281
|
-
export const AzureAPIManagementConfigSchema = z.object({
|
|
282
|
-
name: z.string(),
|
|
283
|
-
location: z.string(),
|
|
284
|
-
sku: z.object({
|
|
285
|
-
name: z
|
|
286
|
-
.enum(["Developer", "Basic", "Standard", "Premium", "Consumption"])
|
|
287
|
-
.default("Developer"),
|
|
288
|
-
capacity: z.number().min(1).default(1),
|
|
289
|
-
}),
|
|
290
|
-
publisherEmail: z.string().email(),
|
|
291
|
-
publisherName: z.string(),
|
|
292
|
-
// Rate limiting and throttling
|
|
293
|
-
policies: z
|
|
294
|
-
.object({
|
|
295
|
-
inbound: z
|
|
296
|
-
.array(z.object({
|
|
297
|
-
rateLimit: z
|
|
298
|
-
.object({
|
|
299
|
-
calls: z.number(),
|
|
300
|
-
renewalPeriod: z.number(),
|
|
301
|
-
counterKey: z.string().optional(),
|
|
302
|
-
})
|
|
303
|
-
.optional(),
|
|
304
|
-
rateLimitByKey: z
|
|
305
|
-
.object({
|
|
306
|
-
calls: z.number(),
|
|
307
|
-
renewalPeriod: z.number(),
|
|
308
|
-
counterKey: z.string(),
|
|
309
|
-
incrementCondition: z.string().optional(),
|
|
310
|
-
incrementCount: z.number().optional(),
|
|
311
|
-
})
|
|
312
|
-
.optional(),
|
|
313
|
-
}))
|
|
314
|
-
.optional(),
|
|
315
|
-
outbound: z.array(z.any()).optional(),
|
|
316
|
-
backend: z.array(z.any()).optional(),
|
|
317
|
-
onError: z.array(z.any()).optional(),
|
|
318
|
-
})
|
|
319
|
-
.optional(),
|
|
320
|
-
});
|
|
321
|
-
// ============================================================================
|
|
322
|
-
// GCP Schemas
|
|
323
|
-
// ============================================================================
|
|
324
|
-
export const GCPCredentialsSchema = z.object({
|
|
325
|
-
type: z.literal("service_account"),
|
|
326
|
-
project_id: z.string(),
|
|
327
|
-
private_key_id: z.string(),
|
|
328
|
-
private_key: z.string(),
|
|
329
|
-
client_email: z.string(),
|
|
330
|
-
client_id: z.string(),
|
|
331
|
-
auth_uri: z.string(),
|
|
332
|
-
token_uri: z.string(),
|
|
333
|
-
auth_provider_x509_cert_url: z.string(),
|
|
334
|
-
client_x509_cert_url: z.string(),
|
|
335
|
-
});
|
|
336
|
-
export const GCPLoadBalancerConfigSchema = z.object({
|
|
337
|
-
name: z.string(),
|
|
338
|
-
region: z.string(),
|
|
339
|
-
backendService: z.object({
|
|
340
|
-
name: z.string(),
|
|
341
|
-
backends: z.array(z.object({
|
|
342
|
-
group: z.string(),
|
|
343
|
-
balancingMode: z.enum(["UTILIZATION", "RATE"]).default("UTILIZATION"),
|
|
344
|
-
maxUtilization: z.number().min(0).max(1).default(0.8),
|
|
345
|
-
maxRatePerInstance: z.number().optional(),
|
|
346
|
-
capacityScaler: z.number().min(0).max(1).default(1.0),
|
|
347
|
-
})),
|
|
348
|
-
healthChecks: z.array(z.string()),
|
|
349
|
-
loadBalancingScheme: z.enum(["INTERNAL", "EXTERNAL"]).default("EXTERNAL"),
|
|
350
|
-
protocol: z
|
|
351
|
-
.enum(["HTTP", "HTTPS", "HTTP2", "TCP", "UDP", "GRPC"])
|
|
352
|
-
.default("HTTP"),
|
|
353
|
-
}),
|
|
354
|
-
// Rate limiting configuration
|
|
355
|
-
rateLimit: z
|
|
356
|
-
.object({
|
|
357
|
-
enabled: z.boolean().default(true),
|
|
358
|
-
rateLimiter: z
|
|
359
|
-
.object({
|
|
360
|
-
enforceOnKey: z
|
|
361
|
-
.enum(["ALL", "IP", "HTTP_HEADER", "XFF_IP"])
|
|
362
|
-
.default("IP"),
|
|
363
|
-
enforceOnKeyName: z.string().optional(),
|
|
364
|
-
rateLimitThreshold: z.object({
|
|
365
|
-
count: z.number(),
|
|
366
|
-
intervalSec: z.number(),
|
|
367
|
-
}),
|
|
368
|
-
})
|
|
369
|
-
.optional(),
|
|
370
|
-
})
|
|
371
|
-
.optional(),
|
|
372
|
-
});
|
|
373
|
-
export const GCPAPIGatewayConfigSchema = z.object({
|
|
374
|
-
name: z.string(),
|
|
375
|
-
displayName: z.string(),
|
|
376
|
-
description: z.string().optional(),
|
|
377
|
-
apiConfig: z.object({
|
|
378
|
-
name: z.string(),
|
|
379
|
-
displayName: z.string(),
|
|
380
|
-
description: z.string().optional(),
|
|
381
|
-
openapiDocuments: z.array(z.object({
|
|
382
|
-
document: z.object({
|
|
383
|
-
path: z.string(),
|
|
384
|
-
contents: z.string(),
|
|
385
|
-
}),
|
|
386
|
-
})),
|
|
387
|
-
gatewayConfig: z
|
|
388
|
-
.object({
|
|
389
|
-
backendConfig: z
|
|
390
|
-
.object({
|
|
391
|
-
googleServiceAccount: z.string().optional(),
|
|
392
|
-
})
|
|
393
|
-
.optional(),
|
|
394
|
-
})
|
|
395
|
-
.optional(),
|
|
396
|
-
// Rate limiting
|
|
397
|
-
quota: z
|
|
398
|
-
.object({
|
|
399
|
-
limits: z
|
|
400
|
-
.array(z.object({
|
|
401
|
-
name: z.string(),
|
|
402
|
-
metric: z.string(),
|
|
403
|
-
unit: z.enum(["MINUTE", "HOUR", "DAY"]),
|
|
404
|
-
values: z.record(z.string(), z.string()),
|
|
405
|
-
}))
|
|
406
|
-
.optional(),
|
|
407
|
-
})
|
|
408
|
-
.optional(),
|
|
409
|
-
}),
|
|
410
|
-
});
|
|
411
|
-
// ============================================================================
|
|
412
|
-
// Common Infrastructure Validation
|
|
413
|
-
// ============================================================================
|
|
414
|
-
export const InfrastructureConfigSchema = z.object({
|
|
415
|
-
provider: z.enum(["aws", "azure", "gcp"]),
|
|
416
|
-
region: z.string(),
|
|
417
|
-
environment: z.enum(["dev", "staging", "prod"]).default("dev"),
|
|
418
|
-
tags: z.record(z.string(), z.string()).optional(),
|
|
419
|
-
// Security configurations
|
|
420
|
-
security: z
|
|
421
|
-
.object({
|
|
422
|
-
enableEncryption: z.boolean().default(true),
|
|
423
|
-
enableLogging: z.boolean().default(true),
|
|
424
|
-
enableMonitoring: z.boolean().default(true),
|
|
425
|
-
complianceFrameworks: z
|
|
426
|
-
.array(z.enum(["SOC2", "HIPAA", "PCI-DSS", "GDPR"]))
|
|
427
|
-
.optional(),
|
|
428
|
-
})
|
|
429
|
-
.optional(),
|
|
430
|
-
// Networking
|
|
431
|
-
networking: z
|
|
432
|
-
.object({
|
|
433
|
-
vpc: z.any().optional(), // Provider-specific VPC config
|
|
434
|
-
loadBalancers: z.array(z.any()).optional(), // Provider-specific LB config
|
|
435
|
-
apiGateways: z.array(z.any()).optional(), // Provider-specific API Gateway config
|
|
436
|
-
firewalls: z
|
|
437
|
-
.array(z.object({
|
|
438
|
-
name: z.string(),
|
|
439
|
-
direction: z.enum(["INGRESS", "EGRESS"]),
|
|
440
|
-
priority: z.number(),
|
|
441
|
-
allowed: z
|
|
442
|
-
.array(z.object({
|
|
443
|
-
ipProtocol: z.string(),
|
|
444
|
-
ports: z.array(z.string()).optional(),
|
|
445
|
-
}))
|
|
446
|
-
.optional(),
|
|
447
|
-
denied: z
|
|
448
|
-
.array(z.object({
|
|
449
|
-
ipProtocol: z.string(),
|
|
450
|
-
ports: z.array(z.string()).optional(),
|
|
451
|
-
}))
|
|
452
|
-
.optional(),
|
|
453
|
-
sourceRanges: z.array(z.string()).optional(),
|
|
454
|
-
destinationRanges: z.array(z.string()).optional(),
|
|
455
|
-
targetTags: z.array(z.string()).optional(),
|
|
456
|
-
sourceTags: z.array(z.string()).optional(),
|
|
457
|
-
}))
|
|
458
|
-
.optional(),
|
|
459
|
-
})
|
|
460
|
-
.optional(),
|
|
461
|
-
// Rate limiting (global)
|
|
462
|
-
rateLimiting: z
|
|
463
|
-
.object({
|
|
464
|
-
enabled: z.boolean().default(true),
|
|
465
|
-
globalLimits: z
|
|
466
|
-
.object({
|
|
467
|
-
requestsPerSecond: z.number().min(1).default(1000),
|
|
468
|
-
requestsPerMinute: z.number().min(1).default(60000),
|
|
469
|
-
requestsPerHour: z.number().min(1).default(3600000),
|
|
470
|
-
burstMultiplier: z.number().min(1).max(10).default(2),
|
|
471
|
-
})
|
|
472
|
-
.optional(),
|
|
473
|
-
ipBasedLimits: z
|
|
474
|
-
.object({
|
|
475
|
-
enabled: z.boolean().default(true),
|
|
476
|
-
whitelist: z.array(z.string()).optional(),
|
|
477
|
-
blacklist: z.array(z.string()).optional(),
|
|
478
|
-
})
|
|
479
|
-
.optional(),
|
|
480
|
-
endpointLimits: z
|
|
481
|
-
.record(z.string(), z.object({
|
|
482
|
-
requestsPerSecond: z.number(),
|
|
483
|
-
requestsPerMinute: z.number().optional(),
|
|
484
|
-
}))
|
|
485
|
-
.optional(),
|
|
486
|
-
})
|
|
487
|
-
.optional(),
|
|
488
|
-
});
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Example Integration - Demonstrates using the BaseIntegration class
|
|
3
|
-
*
|
|
4
|
-
* This is a simple example showing how to create a custom integration
|
|
5
|
-
* that extends the BaseIntegration class.
|
|
6
|
-
*
|
|
7
|
-
* @since 2026-03-15
|
|
8
|
-
*/
|
|
9
|
-
import { BaseIntegration, type HealthResult, type IntegrationConfig } from "./index.js";
|
|
10
|
-
/**
|
|
11
|
-
* Example custom integration
|
|
12
|
-
*
|
|
13
|
-
* Demonstrates how to extend BaseIntegration with custom logic.
|
|
14
|
-
*/
|
|
15
|
-
declare class ExampleIntegration extends BaseIntegration {
|
|
16
|
-
/** Custom property for this integration */
|
|
17
|
-
private connectionString;
|
|
18
|
-
private connected;
|
|
19
|
-
/**
|
|
20
|
-
* Create a new ExampleIntegration
|
|
21
|
-
*
|
|
22
|
-
* @param config - Optional configuration
|
|
23
|
-
*/
|
|
24
|
-
constructor(config?: Partial<IntegrationConfig>);
|
|
25
|
-
/**
|
|
26
|
-
* Set connection string
|
|
27
|
-
*/
|
|
28
|
-
setConnectionString(connStr: string): void;
|
|
29
|
-
/**
|
|
30
|
-
* Check if connected
|
|
31
|
-
*/
|
|
32
|
-
isConnected(): boolean;
|
|
33
|
-
/**
|
|
34
|
-
* Perform integration-specific initialization
|
|
35
|
-
*/
|
|
36
|
-
protected performInitialization(): Promise<void>;
|
|
37
|
-
/**
|
|
38
|
-
* Perform integration-specific shutdown
|
|
39
|
-
*/
|
|
40
|
-
protected performShutdown(): Promise<void>;
|
|
41
|
-
/**
|
|
42
|
-
* Perform integration-specific health check
|
|
43
|
-
*/
|
|
44
|
-
protected performHealthCheck(): Promise<HealthResult>;
|
|
45
|
-
}
|
|
46
|
-
export { ExampleIntegration };
|