Skip to content

Release 0.11.0

Latest

Choose a tag to compare

@tercel tercel released this 09 Mar 07:09

Added

  • Full lifecycle integration tests (tests/integration/test_full_lifecycle.py) — 8 tests covering the complete 11-step pipeline with all gates (ACL + Approval + Middleware + Schema validation) enabled simultaneously, nested module calls, shared context.data, error propagation, and ACL conditions.

System Modules — AI Bidirectional Introspection

Built-in system.* modules that allow AI agents to query, monitor

  • system.health.summary — Aggregate health status across all registered modules (healthy/degraded/unhealthy classification based on error rate thresholds).
  • system.health.module — Per-module health detail including recent errors from ErrorHistory.
  • system.manifest.module — Single module introspection (schema, annotations, tags, source path).
  • system.manifest.full — Full registry manifest with filtering by tags/prefix.
  • system.usage.summary — Usage statistics across all modules (call counts, error rates, avg latency).
  • system.usage.module — Per-module usage detail with hourly trend data.
  • system.control.update_config — Runtime config hot-patching with constraint validation.
  • system.control.reload_module — Hot-reload a module from disk without restart.
  • system.control.toggle_feature — Enable/disable modules at runtime with reason tracking.
  • register_sys_modules() — Auto-registration wiring for all system modules.

Observability

  • ErrorHistory — Ring buffer tracking recent errors with deduplication and per-module querying.
  • ErrorHistoryMiddleware — Middleware that records ModuleError details into ErrorHistory.
  • UsageCollector — Per-module call counting, latency histograms, and hourly bucketed trend data.
  • PlatformNotifyMiddleware — Threshold-based sensor that emits events on error rate spikes.

Event System

  • EventEmitter — Global event bus with async subscriber dispatch and thread-pool execution.
  • EventSubscriber protocol — Interface for event consumers.
  • ApCoreEvent — Frozen dataclass for typed events (module lifecycle, errors, config changes).
  • WebhookSubscriber — HTTP POST event delivery with retry.
  • A2ASubscriber — Agent-to-Agent protocol event bridge.

APCore Unified Client

  • APCore.on() / APCore.off() — Event subscription management via the unified client.
  • APCore.disable() / APCore.enable() — Module toggle control via the unified client.
  • APCore.discover() / APCore.list_modules() — Discovery and listing via the unified client.

Public API Exports

  • ModuleDisabledError — Error class for MODULE_DISABLED code, raised when a disabled module is called.
  • ReloadFailedError — Error class for RELOAD_FAILED code (retryable).
  • SchemaStrategy — Enum for schema resolution strategy (yaml_first, native_first, yaml_only).
  • ExportProfile — Enum for schema export profiles (mcp, openai, anthropic, generic).

Registry

  • Module toggle — APCore client now supports disable()/enable() for module toggling via system.control.toggle_feature, with ModuleDisabledError enforcement and event emission.
  • Version negotiationnegotiate_version() for SDK/module version compatibility checking.

Changed

  • WebhookSubscriber / A2ASubscriber now require optional dependency aiohttp. Install with pip install apcore[events]. Core SDK no longer fails to import when aiohttp is not installed.

Fixed

  • aiohttp hard import in events/subscribers.py broke core SDK import when aiohttp was not installed. Changed to try/except ImportError guard with clear error message at runtime.
  • A2ASubscriber.on_event ImportError for missing aiohttp was silently swallowed by the broad except Exception block. Moved guard before the try block to surface the error correctly.
  • README Access Control example now includes required Executor and Registry imports.
  • pyproject.toml repository/issues/changelog URLs now point to apcore-python (was incorrectly pointing to apcore).
  • CHANGELOG [0.7.1] compare link added (was missing from link references).