feat(waf): complete composable rule orchestration

Add the React Flow rule editor, ordered graph APIs and runtime DAG execution.\n\nPublish rules only on OpenResty reload and reconcile checksum-driven IP group snapshots in bounded shared memory.
This commit is contained in:
ryan
2026-07-13 14:16:55 +08:00
parent d36409fbf9
commit a1a997bcda
72 changed files with 5897 additions and 3080 deletions
+1
View File
@@ -76,6 +76,7 @@ export type {
WAFRuleGraph,
WAFRuleNode,
WAFSaveRuleGraphPayload,
WAFUpdateRuleMetaPayload,
WAFRuleGroup,
WAFRuleGroupPayload,
WAFSiteRuleGroups,
+5
View File
@@ -773,6 +773,11 @@ export interface WAFSaveRuleGraphPayload {
graph: WAFRuleGraph;
}
export interface WAFUpdateRuleMetaPayload {
name: string;
enabled: boolean;
}
export interface WAFRuleGroupPayload {
name: string;
enabled: boolean;
@@ -9,6 +9,7 @@ import type {
WAFRule,
WAFSaveRuleGraphPayload,
WAFSiteRuleGroups,
WAFUpdateRuleMetaPayload,
} from './types';
export class WafService extends OpenFlareBaseService {
@@ -33,12 +34,15 @@ export class WafService extends OpenFlareBaseService {
return this.post<WAFRule>(`/rule-groups/${id}/graph`, payload);
}
static async deleteRuleGroup(id: number): Promise<void> {
return this.post<void>(`/rule-groups/${id}/delete`);
static async updateRuleMeta(
id: number,
payload: WAFUpdateRuleMetaPayload,
): Promise<WAFRule> {
return this.post<WAFRule>(`/rule-groups/${id}/meta`, payload);
}
static async updateRuleGroupSites(id: number, ids: number[]): Promise<WAFRule> {
return this.post<WAFRule>(`/rule-groups/${id}/sites`, { ids });
static async deleteRuleGroup(id: number): Promise<void> {
return this.post<void>(`/rule-groups/${id}/delete`);
}
static async listSiteRuleGroups(routeId: number): Promise<WAFSiteRuleGroups> {