Skip to content

Commit fef29a6

Browse files
committed
feat: Implement unified configuration for Executor and Registry, enhance Executor's preflight checks and call methods, and introduce new client, system module, and event APIs.
1 parent 65ed5c5 commit fef29a6

15 files changed

+1742
-76
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
---
99

10+
## [0.7.0] - 2026-03-09
11+
12+
### Added
13+
14+
#### Documentation — New Files
15+
- **APCore Client API** (`docs/api/client-api.md`) — Full API reference for the unified `APCore` client covering 19 public methods: `call`, `call_async`, `stream`, `validate`, `module`, `register`, `discover`, `list_modules`, `describe`, `use`, `use_before`, `use_after`, `remove`, `on`, `off`, `disable`, `enable`, plus `events` property and global `apcore.*` entry points
16+
- **Event System** (`docs/features/event-system.md`) — `EventEmitter`, `ApCoreEvent`, `EventSubscriber` protocol, `WebhookSubscriber` (retry strategy), `A2ASubscriber` (auth modes), subscriber type factory registry, event types table, and YAML configuration reference
17+
- **System Modules** (`docs/features/system-modules.md`) — Complete reference for 10 built-in `system.*` modules with input/output schemas: `system.health.summary`, `system.health.module`, `system.manifest.module`, `system.manifest.full`, `system.usage.summary`, `system.usage.module`, `system.control.update_config`, `system.control.reload_module`, `system.control.toggle_feature`; plus `register_sys_modules()` setup guide and YAML configuration
18+
19+
### Changed
20+
21+
#### Documentation — Updated Files
22+
- **`docs/getting-started.md`** — Added §8 Global Entry Points (16 `apcore.*` module-level functions) and §9 System Modules quick start with health/usage/manifest examples
23+
- **`docs/api/executor-api.md`**`validate()` return type updated from `ValidationResult` to `PreflightResult` with 6-check breakdown and `requires_approval` flag; `call()`/`call_async()`/`stream()` signatures updated with `version_hint` parameter; added `ModuleDisabledError`, `ModuleTimeoutError`, `ReloadFailedError`, `FeatureNotImplementedError`, `DependencyNotFoundError` to error types; timeout section rewritten for dual-timeout model with cooperative cancellation (`CancelToken` + 5s grace period)
24+
- **`docs/api/registry-api.md`** — Added `disable()`/`enable()` module toggle, `safe_unregister()` with cooperative drain (Algorithm A21), `acquire()` context manager, `is_draining()`, `describe()` for AI/LLM tool discovery, `negotiate_version()` (Algorithm A14)
25+
- **`docs/features/observability.md`** — Added three subsystems: `ErrorHistory` (ring buffer with deduplication, `ErrorEntry` dataclass), `UsageCollector` (hourly bucketed storage, trend computation, `UsageMiddleware`), `PlatformNotifyMiddleware` (threshold-based alerting with hysteresis)
26+
- **`docs/guides/middleware.md`** — Replaced hand-written `RetryMiddleware` example with built-in `RetryMiddleware` + `RetryConfig` reference (exponential/fixed backoff, jitter, retryable-only); added §5.5–5.7 cross-references for `ErrorHistoryMiddleware`, `UsageMiddleware`, `PlatformNotifyMiddleware`
27+
- **`docs/features/schema-system.md`** — Added `SchemaStrategy` enum (`yaml_first`, `native_first`, `yaml_only`) and `ExportProfile` enum (`mcp`, `openai`, `anthropic`, `generic`)
28+
- **`docs/features/core-executor.md`** — Added dual-timeout model (global deadline + per-module), cooperative cancellation with `CancelToken`, deep merge for streaming (depth cap 32), error propagation via `propagate_error()` (Algorithm A11), `PreflightResult` validation
29+
- **`docs/README.md`** — Added `client-api.md`, `event-system.md`, `system-modules.md` to directory tree, API reference table, feature specifications table, and concept index
30+
31+
---
32+
1033
## [0.6.0] - 2026-03-07
1134

1235
### Added

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,7 @@ Development guide: see [Adapter Development Guide](./docs/guides/adapter-develop
996996

997997
| Document | Description |
998998
|------|------|
999+
| [APCore Client](./docs/api/client-api.md) | High-level client API (recommended entry point) |
9991000
| [Module Interface](./docs/api/module-interface.md) | Module interface definition |
10001001
| [Context Object](./docs/api/context-object.md) | Execution context |
10011002
| [Registry API](./docs/api/registry-api.md) | Registry API |
@@ -1013,6 +1014,8 @@ Development guide: see [Adapter Development Guide](./docs/guides/adapter-develop
10131014
| [Registry System](./docs/features/registry-system.md) | Module discovery, registration, and querying |
10141015
| [Schema System](./docs/features/schema-system.md) | Schema loading, validation, `$ref` resolution, and export |
10151016
| [Approval System](./docs/features/approval-system.md) | Runtime enforcement of `requires_approval` via pluggable ApprovalHandler |
1017+
| [Event System](./docs/features/event-system.md) | Event emission, subscription, delivery lifecycle |
1018+
| [System Modules](./docs/features/system-modules.md) | Built-in system.* modules for health, manifest, usage, control |
10161019

10171020
### Usage Guides
10181021

docs/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ docs/
1414
├── concepts.md ← Design philosophy & core concepts
1515
├── architecture.md ← Framework technical architecture
1616
├── api/ ← API reference (authoritative definitions)
17+
│ ├── client-api.md ← APCore unified client
1718
│ ├── module-interface.md ← Module base class interface
1819
│ ├── context-object.md ← Context execution context
1920
│ ├── registry-api.md ← Registry center
@@ -25,6 +26,8 @@ docs/
2526
│ ├── decorator-bindings.md ← Decorator and YAML Bindings
2627
│ ├── middleware-system.md ← Middleware System
2728
│ ├── observability.md ← Observability System
29+
│ ├── event-system.md ← Event System
30+
│ ├── system-modules.md ← System Modules (AI Introspection)
2831
│ ├── registry-system.md ← Module Registry and Discovery System
2932
│ └── schema-system.md ← Schema System
3033
├── guides/ ← Usage guides (7 articles)
@@ -58,6 +61,7 @@ Core interface definitions for the module system, including complete API documen
5861

5962
| API Document | Description |
6063
|--------------|-------------|
64+
| [APCore Client](./api/client-api.md) | Unified client API (recommended entry point) |
6165
| [Module Interface](./api/module-interface.md) | Complete definition of the Module base class |
6266
| [Context Object](./api/context-object.md) | Complete definition of the execution context |
6367
| [Registry API](./api/registry-api.md) | Module registry center API |
@@ -75,6 +79,8 @@ Implementation-ready feature specifications for SDK developers. Each document de
7579
| [Decorator & YAML Bindings](./features/decorator-bindings.md) | `@module` decorator and YAML-based declarative module creation |
7680
| [Middleware System](./features/middleware-system.md) | Composable middleware pipeline with onion execution model |
7781
| [Observability](./features/observability.md) | Distributed tracing, metrics collection, and structured logging |
82+
| [Event System](./features/event-system.md) | Global event bus, subscribers, and threshold alerting |
83+
| [System Modules](./features/system-modules.md) | Built-in `system.*` modules for AI bidirectional introspection |
7884
| [Registry System](./features/registry-system.md) | Module discovery, registration, and querying with 8-step pipeline |
7985
| [Schema System](./features/schema-system.md) | Schema loading, validation, `$ref` resolution, and LLM export |
8086

@@ -121,6 +127,7 @@ Quickly find authoritative definitions for concepts:
121127

122128
| Concept | Authoritative Definition | Quick Reference |
123129
|---------|--------------------------|-----------------|
130+
| APCore Client | [client-api.md](./api/client-api.md) | [Getting Started](./getting-started.md) |
124131
| Module | [module-interface.md](./api/module-interface.md) | [README](../README.md#module-development) |
125132
| ModuleAnnotations | [module-interface.md#annotations](./api/module-interface.md#34-annotations) | [README](../README.md#schema-system) |
126133
| Context | [context-object.md](./api/context-object.md) | [README](../README.md#context-object) |

0 commit comments

Comments
 (0)