# Interface ICliCircuitBreakerIntegration

Interface for CLI circuit breaker integration.

interface ICliCircuitBreakerIntegration {
execute(
adapter: ICliAdapter,
task: CliTask,
taskCategory?:
| "planning"
| "code_generation"
| "code_review"
| "research"
| "architecture"
| "security_review"
| "documentation"
| "testing"
| "devops"
| "exploration",
): Promise<Result<CircuitProtectedResult, CliError | CircuitError>>;
getHealthStatus(): CliCircuitHealthStatus;
getCircuitSnapshots(): Map<
"claude"
| "gemini"
| "codex"
| "opencode",
CircuitBreakerSnapshot,
>;
resetCircuit(cliName: "claude" | "gemini" | "codex" | "opencode"): void;
resetAllCircuits(): void;
addStateChangeListener(listener: CircuitStateChangeListener): void;
}

#### Implemented by

- CliCircuitBreakerIntegration

- Defined in packages/nexus-agents/src/cli-adapters/cli-circuit-breaker.ts:70

##### Index

### Methods

execute
getHealthStatus
getCircuitSnapshots
resetCircuit
resetAllCircuits
addStateChangeListener

## Methods

### execute

- execute(
  adapter: ICliAdapter,
  task: CliTask,
  taskCategory?:
  | "planning"
  | "code_generation"
  | "code_review"
  | "research"
  | "architecture"
  | "security_review"
  | "documentation"
  | "testing"
  | "devops"
  | "exploration",
  ): Promise<Result<CircuitProtectedResult, CliError | CircuitError>>

  #### Parameters

  - adapter: ICliAdapter
  - task: CliTask
  - `Optional` taskCategory:
    | "planning"
    | "code_generation"
    | "code_review"
    | "research"
    | "architecture"
    | "security_review"
    | "documentation"
    | "testing"
    | "devops"
    | "exploration"

  #### Returns Promise<Result<CircuitProtectedResult, CliError | CircuitError>>

  - Defined in packages/nexus-agents/src/cli-adapters/cli-circuit-breaker.ts:71

### getHealthStatus

- getHealthStatus(): CliCircuitHealthStatus

  #### Returns CliCircuitHealthStatus

  - Defined in packages/nexus-agents/src/cli-adapters/cli-circuit-breaker.ts:76

### getCircuitSnapshots

- getCircuitSnapshots(): Map<
  "claude"
  | "gemini"
  | "codex"
  | "opencode",
  CircuitBreakerSnapshot,
  >

  #### Returns Map<"claude" | "gemini" | "codex" | "opencode", CircuitBreakerSnapshot>

  - Defined in packages/nexus-agents/src/cli-adapters/cli-circuit-breaker.ts:77

### resetCircuit

- resetCircuit(cliName: "claude" | "gemini" | "codex" | "opencode"): void

  #### Parameters

  - cliName: "claude" | "gemini" | "codex" | "opencode"

  #### Returns void

  - Defined in packages/nexus-agents/src/cli-adapters/cli-circuit-breaker.ts:78

### resetAllCircuits

- resetAllCircuits(): void

  #### Returns void

  - Defined in packages/nexus-agents/src/cli-adapters/cli-circuit-breaker.ts:79

### addStateChangeListener

- addStateChangeListener(listener: CircuitStateChangeListener): void

  #### Parameters

  - listener: CircuitStateChangeListener

  #### Returns void

  - Defined in packages/nexus-agents/src/cli-adapters/cli-circuit-breaker.ts:80