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, sharedcontext.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 fromErrorHistory.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 recordsModuleErrordetails intoErrorHistory.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.EventSubscriberprotocol — 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 forMODULE_DISABLEDcode, raised when a disabled module is called.ReloadFailedError— Error class forRELOAD_FAILEDcode (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 viasystem.control.toggle_feature, withModuleDisabledErrorenforcement and event emission. - Version negotiation —
negotiate_version()for SDK/module version compatibility checking.
Changed
WebhookSubscriber/A2ASubscribernow require optional dependencyaiohttp. Install withpip install apcore[events]. Core SDK no longer fails to import whenaiohttpis not installed.
Fixed
aiohttphard import inevents/subscribers.pybroke core SDK import whenaiohttpwas not installed. Changed totry/except ImportErrorguard with clear error message at runtime.A2ASubscriber.on_eventImportErrorfor missingaiohttpwas silently swallowed by the broadexcept Exceptionblock. Moved guard before thetryblock to surface the error correctly.- README Access Control example now includes required
ExecutorandRegistryimports. pyproject.tomlrepository/issues/changelog URLs now point toapcore-python(was incorrectly pointing toapcore).- CHANGELOG
[0.7.1]compare link added (was missing from link references).