# Interface IPolicyFirewall

Interface for the policy firewall.

interface IPolicyFirewall {
evaluate(ctx: FirewallPolicyContext): FirewallPolicyDecision;
addRule(rule: FirewallPolicyRule): void;
removeRule(name: string): boolean;
getRules(): readonly FirewallPolicyRule[];
setMode(mode: PolicyMode): void;
getMode(): PolicyMode;
}

#### Implemented by

- PolicyFirewall

- Defined in packages/nexus-agents/src/mcp/middleware/policy-types.ts:76

##### Index

### Methods

evaluate
addRule
removeRule
getRules
setMode
getMode

## Methods

### evaluate

- evaluate(ctx: FirewallPolicyContext): FirewallPolicyDecision

  #### Parameters

  - ctx: FirewallPolicyContext

  #### Returns FirewallPolicyDecision

  - Defined in packages/nexus-agents/src/mcp/middleware/policy-types.ts:77

### addRule

- addRule(rule: FirewallPolicyRule): void

  #### Parameters

  - rule: FirewallPolicyRule

  #### Returns void

  - Defined in packages/nexus-agents/src/mcp/middleware/policy-types.ts:78

### removeRule

- removeRule(name: string): boolean

  #### Parameters

  - name: string

  #### Returns boolean

  - Defined in packages/nexus-agents/src/mcp/middleware/policy-types.ts:79

### getRules

- getRules(): readonly FirewallPolicyRule[]

  #### Returns readonly FirewallPolicyRule[]

  - Defined in packages/nexus-agents/src/mcp/middleware/policy-types.ts:80

### setMode

- setMode(mode: PolicyMode): void

  #### Parameters

  - mode: PolicyMode

  #### Returns void

  - Defined in packages/nexus-agents/src/mcp/middleware/policy-types.ts:81

### getMode

- getMode(): PolicyMode

  #### Returns PolicyMode

  - Defined in packages/nexus-agents/src/mcp/middleware/policy-types.ts:82