| description | Reference index for apcore subsystems: everyday application developer references (client, modules, governance, observability) and deep framework internals for SDK implementers. |
|---|
Complete contract and 3-language (Python, TypeScript, Rust) reference for every apcore subsystem.
!!! tip "New to apcore?" This section is a reference manual — you do not need to read it cover to cover. Start with Getting Started and the task-oriented User Guides, then come back here when you need exact API signatures, config keys, or edge-case behavior. For normative RFC 2119 rules, see the Protocol Specification.
The subsystems most application teams use directly.
Primary interfaces for defining, binding, and calling modules.
- APCore Client — The recommended unified entry point (
call,validate,stream,use,discover). - Module Interface — The module contract, behavioral annotations, lifecycle hooks,
preflight(), andpreview(). - Context Object — Per-invocation
trace_id,identity,call_chain,cancel_token, and shareddata. - Bindings (Decorator/YAML) — Function decorators and zero-code YAML bindings.
- ID Normalization — Bare-name canonicalization and module-ID validation rules.
Guardrails, caller identity, permissions, and human-in-the-loop approval.
- ACL System — Default-deny pattern rules (
caller_id → target_id), conditions, and audit logging. - Approval System — Human-in-the-loop approval gate, sync/async resume, and
ExecutionPolicy. - Identity System — Caller representation (
id,type,roles,attrs). - Call Chain Guard — Depth limits, circular-call detection, and repeat-frequency protection.
- ACL-aware Capability Discovery — Caller-scoped module summaries and schema lookup.
How calls run, stream, execute in the background, or cancel.
- Core Executor — The 11-step execution pipeline mechanics.
- Execution Pipeline — The Step protocol, preset strategies, and custom pipeline steps.
- Streaming Pipeline — Incremental output chunks and deep-merge completion.
- Async Task Management — Background execution, concurrency limits, and pluggable
TaskStore. - Cancellation Mechanism — Cooperative cancellation via cancel tokens.
Tracing, metrics, redaction, structured errors, events, and runtime introspection.
- Observability — W3C tracing, spans, sampling, exporters, and
ContextLogger. - Redaction — Automatic redaction of
x-sensitivefields and configured secret patterns. - Error & AI Guidance — Error codes and recovery fields (
retryable,user_fixable,ai_guidance). - Metrics & Usage — Call counters, latency histograms, Prometheus rendering, and usage tracking.
- Error History — Recent-error aggregation for introspection.
- Event System — Framework-wide async event bus and subscribers.
- System Modules (system.*) — Built-in health, manifest, usage, and runtime control modules.
Lower-level infrastructure for custom extensions, multi-package hosting, and SDK authors.
- Registry System — Discovery, registration, dependency ordering, and hot-reload draining.
- Schema System — JSON Schema Draft 2020-12 loading,
$refresolution, and validation. - Middleware System — Onion execution model, built-in middleware, and step middleware.
- Extension Points — Replacing discoverers, validators, ACL, and approval handlers.
- Config Bus — Unified multi-package YAML configuration and env-var binding.
- Multi-Module Discovery — Opt-in multi-class file scanning.
- Artifact References — Opaque artifact metadata and bounded host reads.
For the high-level mental model, see Core Concepts or Architecture Design.