openclaw-aegis 1.5.3 → 1.6.0
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/cli/index.js +30 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +127 -0
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -162,6 +162,17 @@ var aegisConfigSchema = import_zod.z.object({
|
|
|
162
162
|
maxTraces: import_zod.z.number().int().min(10).default(100)
|
|
163
163
|
}).default({})
|
|
164
164
|
}).default({}),
|
|
165
|
+
intelligence: import_zod.z.object({
|
|
166
|
+
anomaly: import_zod.z.object({
|
|
167
|
+
enabled: import_zod.z.boolean().default(true),
|
|
168
|
+
minBaseline: import_zod.z.number().int().min(10).default(60),
|
|
169
|
+
baselineWindowMs: import_zod.z.number().int().min(6e4).default(36e5),
|
|
170
|
+
scoreDeviationThreshold: import_zod.z.number().min(1).default(2.5),
|
|
171
|
+
latencyDeviationThreshold: import_zod.z.number().min(1).default(3),
|
|
172
|
+
confirmationCount: import_zod.z.number().int().min(1).default(3),
|
|
173
|
+
alertCooldownMs: import_zod.z.number().int().min(6e4).default(9e5)
|
|
174
|
+
}).default({})
|
|
175
|
+
}).default({}),
|
|
165
176
|
api: import_zod.z.object({
|
|
166
177
|
enabled: import_zod.z.boolean().default(false),
|
|
167
178
|
port: import_zod.z.number().int().min(1).max(65535).default(3001),
|
|
@@ -2583,6 +2594,8 @@ var AegisApiServer = class {
|
|
|
2583
2594
|
this.route("GET", "/sla/:period", this.handleSlaPeriod.bind(this));
|
|
2584
2595
|
this.route("GET", "/traces", this.handleTraces.bind(this));
|
|
2585
2596
|
this.route("GET", "/traces/:traceId", this.handleTraceById.bind(this));
|
|
2597
|
+
this.route("GET", "/anomalies", this.handleAnomalies.bind(this));
|
|
2598
|
+
this.route("GET", "/anomalies/baselines", this.handleBaselines.bind(this));
|
|
2586
2599
|
}
|
|
2587
2600
|
route(method, path7, handler) {
|
|
2588
2601
|
const paramNames = [];
|
|
@@ -3039,6 +3052,23 @@ var AegisApiServer = class {
|
|
|
3039
3052
|
}
|
|
3040
3053
|
};
|
|
3041
3054
|
}
|
|
3055
|
+
// --- Intelligence (Phase 5) ---
|
|
3056
|
+
handleAnomalies() {
|
|
3057
|
+
if (!this.deps.anomalyDetector) {
|
|
3058
|
+
return { status: 501, body: { error: "Anomaly detection not available" } };
|
|
3059
|
+
}
|
|
3060
|
+
const anomalies = this.deps.anomalyDetector.getAnomalies();
|
|
3061
|
+
return {
|
|
3062
|
+
status: 200,
|
|
3063
|
+
body: { anomalies, count: anomalies.length }
|
|
3064
|
+
};
|
|
3065
|
+
}
|
|
3066
|
+
handleBaselines() {
|
|
3067
|
+
if (!this.deps.anomalyDetector) {
|
|
3068
|
+
return { status: 501, body: { error: "Anomaly detection not available" } };
|
|
3069
|
+
}
|
|
3070
|
+
return { status: 200, body: this.deps.anomalyDetector.getBaselines() };
|
|
3071
|
+
}
|
|
3042
3072
|
// --- Server lifecycle ---
|
|
3043
3073
|
recordAlertResult(result) {
|
|
3044
3074
|
this.alertHistory.push({
|