Skip to main content

Crate appcore_core

Crate appcore_core 

Source
Expand description

Public contracts for the AppCore runtime foundation. This crate defines generic types and traits only.

Re-exports§

pub use audit::AuditCategory;
pub use audit::AuditEntry;
pub use audit::AuditLog;
pub use audit::AuditOutcome;
pub use audit::AuditRecord;
pub use builder::RuntimeBuilder;
pub use bus::CommandBus;
pub use clock::Clock;
pub use clock::SystemClock;
pub use command::CommandRegistry;
pub use command::RuntimeCommand;
pub use context::RuntimeContext;
pub use controller::RuntimeController;
pub use decision::DecisionEngine;
pub use decision::DecisionNode;
pub use decision::DecisionOutcome;
pub use decision::DecisionRegistry;
pub use envelope::CommandEnvelope;
pub use envelope::EventEnvelope;
pub use event::EventRegistry;
pub use event::RuntimeEvent;
pub use event_bus::EventBus;
pub use handler::CommandHandler;
pub use handler::CommandResult;
pub use idempotency::FileIdempotencyStore;
pub use idempotency::IdempotencyStore;
pub use idempotency::InMemoryIdempotencyStore;
pub use idempotency::IDEMPOTENCY_FORMAT_V1;
pub use lifecycle::RuntimeLifecycle;
pub use lifecycle::RuntimeLifecycleEvent;
pub use lifecycle::RuntimeLifecycleState;
pub use plugin::AppPlugin;
pub use redaction::redact_text;
pub use redaction::redact_text_with_limit;
pub use redaction::MAX_OPERATIONAL_TEXT_BYTES;
pub use runtime::RuntimeInstance;
pub use state::RuntimeState;
pub use state::StateMachine;
pub use state::StateRegistry;
pub use state::StateTransition;
pub use appcore_contracts as contracts;

Modules§

audit
Bounded in-memory audit log for command dispatch outcomes.
builder
Minimal runtime builder for wiring one plugin into core registries.
bus
Minimal synchronous command bus contract.
clock
Mockable clock utilities for retrieving standard timestamps.
command
Command contract and ordered, duplicate-safe command registry. Command payload transport uses CommandEnvelope. Handler contract lives in handler.rs.
context
Runtime context contract available to runtime components.
controller
Minimal runtime controller for lifecycle mutation and command dispatch delegation.
decision
Decision contracts, name catalog, and execution engine.
envelope
Transport-neutral command/event envelope contracts. These are passed to command handlers and returned in command results.
error
Foundational Runtime error exports.
event
Event contract and ordered, duplicate-safe event registry. Event payload transport uses EventEnvelope. Handler outcomes may emit events through CommandResult.
event_bus
Bounded in-memory event bus for emitted command events.
handler
Command handler contracts without execution engine concerns.
idempotency
Idempotency stores used by runtime controller command deduplication.
identity
Foundational Runtime identity exports.
ids
Foundational Runtime identifier exports.
lifecycle
Bounded/thread-safe runtime lifecycle contract built on top of StateMachine.
manifest
Runtime peer-manifest contracts.
operational
Canonical Runtime operational mode.
plugin
Application plugin contract using concrete core registries.
redaction
Conservative redaction for runtime logs, audit records, and diagnostics.
registry
Shared registry primitive for ordered, duplicate-safe name registration.
runtime
Minimal immutable runtime instance built from runtime builder contracts.
state
State contracts: registry plus a minimal deterministic state machine.
trace
Distributed trace context export.

Structs§

AppFamily
Family/group identifier for compatible applications.
AppId
Unique identifier for an application.
CapabilityDescriptor
Generic capability advertised by a distributed Core.
CapabilityName
Generic capability name exposed by a Core.
CapabilityRequirements
Generic execution requirements used by routing policy.
ClusterId
Cluster identifier inside a tenant.
CommandName
Stable command name (for example: runtime.start).
CoreCompatibilityPolicy
Compatibility policy for peer-to-peer or routed operations.
CoreId
Stable identifier for a logical Core.
CoreIdentity
Distributed identity for a running AppCore instance.
CoreKind
Generic category for a Core. Custom values are accepted when they pass identifier validation.
DistributedCoreManifest
Internal structured manifest used to assemble distributed peer state.
EventName
Stable event name (for example: RuntimeStarted).
FileOperationalJournal
Process-locked, hash-chained operational journal.
InstanceId
Unique identifier for a running Core instance.
NodeId
Unique node identifier in a runtime cluster.
PeerEndpoint
Network endpoint a peer can advertise. Secrets and bearer tokens do not belong here.
ProtocolVersion
Wire protocol version used by distributed AppCore peers.
QueryName
Stable query name (for example: runtime.status).
RuntimeContractVersion
Public runtime contract version declared by an app/plugin.
RuntimeIdentity
Runtime identity shared by nodes of the same application/runtime contract.
StateName
Stable state name (for example: Running).
SyncGroup
Sync isolation group (for example: dev, staging, production).
TenantId
Tenant isolation identifier for distributed AppCore deployments.
TraceContext
Correlation context propagated across distributed Runtime boundaries.

Enums§

CapabilityMode
Invocation mode for a generic capability.
CapabilityVisibility
Network scope in which a capability may be resolved.
CompatibilityStatus
Compatibility result for two runtime identities.
CoreCompatibilityStatus
Compatibility result for distributed Core identities.
OperationalJournalRecord
One persisted operational record.
RuntimeError
Standard runtime error categories.
RuntimeOperationalMode
Operational state relevant to routing and scheduling decisions.

Constants§

OPERATIONAL_JOURNAL_FORMAT_V1
Stable format marker for the operational journal.

Functions§

validate_distributed_identifier
Validates the stricter lowercase identifier used for distributed boundaries.
validate_identifier
Validates a generic Runtime identifier.

Type Aliases§

RuntimeResult
Result alias for runtime contract methods.