This release adds 3 notable features for engineering teams evaluating rollout.
✓ No known CVEs patched in this version
Topics
+14 more
Affected surfaces
Summary
AI summaryUpdates failure, recoveryTimeoutMs, and default across a mixed release.
Changes in this release
| Type | Severity | Summary | CVE |
|---|---|---|---|
| Feature | Medium |
Added Circuit Breaker on AdapterRegistry with three-state machine. Added Circuit Breaker on AdapterRegistry with three-state machine. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Feature | Medium |
Configuration options for failureThreshold, recoveryTimeoutMs, successThreshold, and onStateChange callback added. Configuration options for failureThreshold, recoveryTimeoutMs, successThreshold, and onStateChange callback added. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Feature | Medium |
Fallback chain mechanism activated when circuit is OPEN, trying adapters sequentially before error. Fallback chain mechanism activated when circuit is OPEN, trying adapters sequentially before error. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Feature | Medium |
Public API methods: getCircuitState, resetCircuit, setCircuitBreakerConfig exposed. Public API methods: getCircuitState, resetCircuit, setCircuitBreakerConfig exposed. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Feature | Medium |
New event types circuit:open, circuit:half-open, circuit:close added to AdapterEventType. New event types circuit:open, circuit:half-open, circuit:close added to AdapterEventType. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: high |
— |
| Feature | Medium |
Defined state transitions: CLOSED → OPEN, OPEN → HALF_OPEN after timeout, HALF_OPEN → OPEN on failure or → CLOSED on success. Defined state transitions: CLOSED → OPEN, OPEN → HALF_OPEN after timeout, HALF_OPEN → OPEN on failure or → CLOSED on success. Source: granite4.1:30b@2026-05-20-audit Confidence: high |
— |
| Feature | Medium |
Implemented state transitions: CLOSED → OPEN, OPEN → HALF_OPEN, HALF_OPEN → OPEN. Implemented state transitions: CLOSED → OPEN, OPEN → HALF_OPEN, HALF_OPEN → OPEN. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: low |
— |
| Performance | Medium |
No new runtime dependencies introduced, maintaining BYOC principle. No new runtime dependencies introduced, maintaining BYOC principle. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: low |
— |
| Bugfix | Medium |
13 additional tests added for phase 11 functionality. 13 additional tests added for phase 11 functionality. Source: granite4.1:8b-q6_K@2026-05-19 Confidence: low |
— |
| Bugfix | Low |
Added 13 new tests in test-phase11.ts to cover the circuit breaker functionality. Added 13 new tests in test-phase11.ts to cover the circuit breaker functionality. Source: granite4.1:30b@2026-05-20-audit Confidence: high |
— |
Full changelog
Network-AI v5.6.1 — Circuit Breaker on AdapterRegistry
All 3,136 tests pass. Zero TypeScript errors.
Features
Circuit Breaker on AdapterRegistry (lib/circuit-breaker.ts)
A new standalone CircuitBreaker class with a three-state machine wired into every adapter in AdapterRegistry.
State machine
CLOSED ──(failureThreshold failures)──► OPEN
▲ │
│ (successThreshold successes) (recoveryTimeoutMs)
│ ▼
└────────────────────────── HALF_OPEN ──┤
│ (failure)
└──► OPEN
| State | Behavior |
|---|---|
| CLOSED | Normal execution — failures increment counter |
| OPEN | CircuitOpenError thrown immediately — no call made to adapter |
| HALF_OPEN | One probe call allowed — success closes, failure re-opens |
Configuration
const registry = new AdapterRegistry({
circuitBreaker: {
failureThreshold: 3, // trips after 3 consecutive failures (default)
recoveryTimeoutMs: 30_000, // waits 30 s before probing (default)
successThreshold: 1, // 1 success in HALF_OPEN closes circuit (default)
onStateChange: (from, to, adapterName) => console.log(`${adapterName}: ${from} → ${to}`),
},
fallbackChain: ['backup-agent', 'emergency-agent'],
});
Fallback chain
When the circuit is OPEN, the registry automatically tries each adapter in fallbackChain in order before returning a CIRCUIT_OPEN error code. This enables zero-downtime failover without changing any call site.
Public API
registry.getCircuitState('my-agent'); // 'CLOSED' | 'OPEN' | 'HALF_OPEN'
registry.resetCircuit('my-agent'); // force back to CLOSED
registry.setCircuitBreakerConfig({ failureThreshold: 5 });
New event types
circuit:open, circuit:half-open, circuit:close added to AdapterEventType.
Zero new runtime dependencies — BYOC principle maintained throughout.
13 new tests added to test-phase11.ts.
Weekly OSS security release digest.
The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.
No spam, unsubscribe anytime.
Share this release
About Jovancoding/Network-AI
Multi-agent orchestration MCP server with race-condition-safe shared blackboard. 20+ MCP tools: blackboard read/write, agent spawn/stop, FSM transitions, budget tracking, token management, and audit log query. `npx network-ai-server --port 3001`.
Related context
Beta — feedback welcome: [email protected]