openclaw-aegis 1.8.0 → 1.10.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 +56 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/index.d.ts +201 -0
- package/dist/index.js +56 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -178,6 +178,18 @@ var aegisConfigSchema = import_zod.z.object({
|
|
|
178
178
|
trendWindowMs: import_zod.z.number().int().min(6e4).default(72e5),
|
|
179
179
|
warningHorizonMs: import_zod.z.number().int().min(6e4).default(36e5),
|
|
180
180
|
alertCooldownMs: import_zod.z.number().int().min(6e4).default(18e5)
|
|
181
|
+
}).default({}),
|
|
182
|
+
runbooks: import_zod.z.object({
|
|
183
|
+
enabled: import_zod.z.boolean().default(false),
|
|
184
|
+
basePath: import_zod.z.string().default("~/.openclaw/aegis/runbooks")
|
|
185
|
+
}).default({}),
|
|
186
|
+
noiseReduction: import_zod.z.object({
|
|
187
|
+
enabled: import_zod.z.boolean().default(true),
|
|
188
|
+
groupingWindowMs: import_zod.z.number().int().min(1e4).default(3e5),
|
|
189
|
+
dedupThreshold: import_zod.z.number().int().min(1).default(3),
|
|
190
|
+
escalationDelayMs: import_zod.z.number().int().min(6e4).default(9e5),
|
|
191
|
+
maxBufferSize: import_zod.z.number().int().min(5).default(20),
|
|
192
|
+
digestIntervalMs: import_zod.z.number().int().min(3e4).default(3e5)
|
|
181
193
|
}).default({})
|
|
182
194
|
}).default({}),
|
|
183
195
|
api: import_zod.z.object({
|
|
@@ -2606,6 +2618,10 @@ var AegisApiServer = class {
|
|
|
2606
2618
|
this.route("GET", "/predictions", this.handlePredictions.bind(this));
|
|
2607
2619
|
this.route("GET", "/rca", this.handleRca.bind(this));
|
|
2608
2620
|
this.route("GET", "/rca/:incidentId", this.handleRcaByIncident.bind(this));
|
|
2621
|
+
this.route("GET", "/runbooks", this.handleRunbooks.bind(this));
|
|
2622
|
+
this.route("GET", "/runbooks/results", this.handleRunbookResults.bind(this));
|
|
2623
|
+
this.route("GET", "/alerts/noise", this.handleNoiseStats.bind(this));
|
|
2624
|
+
this.route("GET", "/alerts/groups", this.handleAlertGroups.bind(this));
|
|
2609
2625
|
}
|
|
2610
2626
|
route(method, path7, handler) {
|
|
2611
2627
|
const paramNames = [];
|
|
@@ -3121,6 +3137,46 @@ var AegisApiServer = class {
|
|
|
3121
3137
|
}
|
|
3122
3138
|
};
|
|
3123
3139
|
}
|
|
3140
|
+
handleNoiseStats() {
|
|
3141
|
+
if (!this.deps.noiseReducer) {
|
|
3142
|
+
return { status: 501, body: { error: "Noise reduction not available" } };
|
|
3143
|
+
}
|
|
3144
|
+
return { status: 200, body: this.deps.noiseReducer.getStats() };
|
|
3145
|
+
}
|
|
3146
|
+
handleAlertGroups() {
|
|
3147
|
+
if (!this.deps.noiseReducer) {
|
|
3148
|
+
return { status: 501, body: { error: "Noise reduction not available" } };
|
|
3149
|
+
}
|
|
3150
|
+
const groups = this.deps.noiseReducer.getActiveGroups();
|
|
3151
|
+
return { status: 200, body: { groups, count: groups.length } };
|
|
3152
|
+
}
|
|
3153
|
+
handleRunbooks() {
|
|
3154
|
+
if (!this.deps.runbookEngine) {
|
|
3155
|
+
return { status: 501, body: { error: "Runbook engine not available (enable with intelligence.runbooks.enabled = true)" } };
|
|
3156
|
+
}
|
|
3157
|
+
const runbooks = this.deps.runbookEngine.getRunbooks();
|
|
3158
|
+
return {
|
|
3159
|
+
status: 200,
|
|
3160
|
+
body: {
|
|
3161
|
+
runbooks: runbooks.map((r) => ({
|
|
3162
|
+
name: r.name,
|
|
3163
|
+
description: r.description ?? null,
|
|
3164
|
+
trigger: r.trigger,
|
|
3165
|
+
stepCount: r.steps.length,
|
|
3166
|
+
enabled: r.enabled !== false,
|
|
3167
|
+
escalateIfFails: r.escalate_if_fails ?? false
|
|
3168
|
+
})),
|
|
3169
|
+
count: runbooks.length
|
|
3170
|
+
}
|
|
3171
|
+
};
|
|
3172
|
+
}
|
|
3173
|
+
handleRunbookResults() {
|
|
3174
|
+
if (!this.deps.runbookEngine) {
|
|
3175
|
+
return { status: 501, body: { error: "Runbook engine not available" } };
|
|
3176
|
+
}
|
|
3177
|
+
const results = this.deps.runbookEngine.getLastResults();
|
|
3178
|
+
return { status: 200, body: { results, count: results.length } };
|
|
3179
|
+
}
|
|
3124
3180
|
handlePredictions() {
|
|
3125
3181
|
if (!this.deps.predictiveAlerter) {
|
|
3126
3182
|
return { status: 501, body: { error: "Predictive alerts not available" } };
|