AxiomCore
Reference & Appendix

Acore base schema reference

Implemented contract, behavior, domain, security, mock, and test classes exposed by acore.base.

This page maps the public configuration surface declared in acore/src/stdlib/base.acore. It complements the language manual: the manual explains syntax and evaluation, while this reference describes the contract schema consumed by AxiomCore.

Fields without a displayed default are required unless their type is nullable (?). Listing<T> and Mapping<K, V> are typed list and mapping shapes.

Root configuration

Config

FieldType / defaultPurpose
axiomString = "1.0"Source schema version
projectProjectConfig?Project identity and version
backendBackendConfig?Extractor language, entrypoint, and codec
frontendFrontendConfig?Framework and optional output directory
observabilityObservabilityConfig?Telemetry URL, sampling, and headers
variantsMapping<String, VariantConfig>Named selection profiles; includes default
policiesPolicyConfig?Default cache and retry behavior
serviceNameString?Service label
offlineConfigOfflineConfig?Local database and synchronization selection
models / enumstyped mappingsExtracted or authored data shapes
endpointsMapping<String, EndpointDef>Operation surface
domainDomainModel? = nullOptional promoted business semantics
securitySecurityConfig? = nullOptional security declarations and gates
securityEvidenceExtractedSecurityEvidence?Extractor-owned evidence, normally not authored
authMethodsMapping<String, AuthMethodDef>Reusable endpoint authentication methods

Project, backend, and frontend

ClassFields
ProjectConfigrequired id: String, version: String
BackendConfigrequired language, entrypoint; codec = "json" (json or flatbuffers)
FrontendConfigrequired framework; nullable outputDir
ObservabilityConfigenabled = false, nullable telemetryUrl, sampleRate = 1.0 constrained to 0…1, headers = {}
OfflineConfigenableLocalDb = false; required syncStrategy

Models and endpoint types

ClassImplemented members
ModelDefrequired name; fields = {}, dynamic rpcs, nullable doc
ModelFieldrequired name, typeRef; isOptional = false, nullable doc, nullable validate, extraConstraints = {}
EnumDefrequired name; values = [], nullable doc
EndpointParameterrequired name, typeRef, source; isOptional = false
RpcMethodendpoint = "", dynamic arguments and resolver

EndpointParameter.source is path, query, body, or header. HTTP methods are GET, POST, PUT, DELETE, PATCH, and WS.

Type references

TypeRef is a union of primitive, named, list, and map references.

ClassMembers
TypeRefPrimitivekind, default void; supports string, numeric, boolean, bytes, date-time, void, and JSON kinds
TypeRefNamed / ContractTypeRefkind = "named", model name in value
TypeRefListkind = "list", item type reference in value
TypeRefMapkind = "map", key/value references in the two-item value list

Promoted DomainEntity values share the named-type shape, so they can be used in endpoint type positions after domain validation.

EndpointDef

FieldType / default
idInt = 0
name, path, methodrequired
parametersListing<EndpointParameter> = []
returnTypetype reference, default void
returnIsOptionalBoolean = false
streaming, auth, mocknullable typed configuration
cache, validate, retrynullable endpoint policy overrides
requestProjection, responseProjectionnullable domain projection names
cacheIdentitynullable readable UI cache identity
invalidates, errorsstring lists, default empty
docnullable documentation

EndpointOverride exposes the six overrideable behavior fields: cache, validate, retry, streaming, auth, and mock.

Cache, retry, and streaming

ClassMembers
PolicyConfignullable cache and retry defaults
CachePolicyrequired strategy and ttlSeconds
RetryPolicymaxAttempts = 3, exponential backoff, retry codes 502/503/504, retryOnTimeout = true
FixedBackofffixed delay; defaults inherited from Backoff
LinearBackoffstep = "1s"
ExponentialBackoffmultiplier = 2.0

Cache strategies are network_only, cache_first, network_first, and stale_while_revalidate.

Stream classMembers
HttpStreamDefnullable responseType; framing = "chunk"; encoding = "json"
SseStreamDefnullable responseType
WebSocketDefdirection = "bidirectional"; nullable singular client and server messages; reconnect = "auto"
WsMessageDefrequired named-model or dynamic model
FileStreamDefnullable content type and filename; disposition = "attachment"

See Streaming and WebSockets for legal enum values and examples.

Authentication

ClassMembers
AuthMethodDefrequired type; nullable scheme, location, name, OAuth flows, and validation
AuthValidationDefrequired strategy; nullable secret reference and algorithm
EndpointAuthrequired required; condition = "and", scopes/methods empty, confidence = "high"

Authentication declarations describe the contract. Secret material and trusted server-side enforcement remain outside Acore evaluation.

Variants

VariantConfig provides nullable include, exclude, includeModels, excludeModels, and cache. Patterns select endpoint/model names during evaluation; they do not create a runtime feature flag. See Variants and filtering.

Domain schema

ClassRequired membersDefaults / optional members
DomainModelformat, empty entities, relationships, invariants, projections
DomainEntitymodel (injected by extend)key list, nullable doc; do not author model/ID manually
DomainRelationshipfrom, tocardinality, ownership, via, inverse, required, inferred, doc
DomainInvariantscopeexpression, fields, nullable rules, severity, inferred, doc
DomainProjectionentityfields, audience, doc

Domain invariants are signed, reviewable evidence. AxiomCore does not execute their expressions as application business logic.

Security schema

SecurityConfig defaults to mode = "audit" and owns named mappings for principals, permissions, resources, policies, authentication profiles, endpoint guards, data classifications, effects, services, rate limits, uploads, paths, processes, and invariants. CORS, CSRF, cache security, and observability security are optional singleton policies.

ClassKey members
SecurityPrincipalroles and documentation
Permissionrequired rate-limit, idempotency, and CSRF safeguards
ProtectedResourcerequired promoted domain entity
SecurityPolicyresource, permissions, principals/roles, auth, relationship, resource binding
EndpointGuardpublic/protected decision, bindings, effects, writable fields, CSRF exemption, idempotency
AuthenticationPolicytransport plus issuer/audience, expiry, rotation, secure/httpOnly/sameSite settings
SensitiveDatarequired target and classification; audiences and redaction
SecurityEffecteffect kind and bounded service/upload/path/process/input reference
NetworkServiceorigin, private-network and redirect policy
RateLimitrequired maximum, window, and key
CorsPolicy / CsrfPolicytransport controls
UploadPolicysize, media types, inspection, storage, filename, executable policy
PathPolicy / ProcessPolicyfilesystem root or executable and allowed input boundary
CacheSecurityPolicyauthenticated-response sharing and principal variance
ObservabilitySecurityPolicyredacted classes and payload policy

audit reports findings; strict gates error findings during supported build and release paths. Declarations do not replace trusted runtime authorization.

Mock schema

MockConfig selects responses with first_match, random, sequential, or weighted; it can carry fault injection, state, and a fallback response.

FamilyImplemented role
Conditionsheader, query, path, body, state, and expression matching
Data strategiesstatic, template, collection, echo, and store query
Faultslatency, network fault, malformed body, partial response, or configured status behavior
Stateinitial store, mutations, emitted events, and reset behavior
MockResponseconditions, status, headers, data, delay/jitter, weight, label

Use Mocking APIs for a supported lifecycle. Mock behavior is a development/test boundary, not proof of production behavior.

Test schema

ClassMembers
TestConfigsuites plus optional defaults
TestDefaultstimeout, retry count, continue-on-failure, headers
TestSuitename, base URL, timeout, headers, hooks, checks, continuation, tags
CheckDefroute or URL, request inputs, retry, expectations, captures, skip, timeout, label
LifecycleHooktiming plus a typed hook action
ResponseCaptureresponse path, binding name, extraction type

Expectations cover status, duration, schema, body values/quantifiers, headers, and grouped assertions. Run all configured suites with axiom test axiom.acore or filter them with --tag.

Source of truth and stability

This reference documents the checked-in base schema, not every Rust internal type. Profile compilers perform additional semantic checks. For exact target UI support, use axiom ui capabilities; for the current maturity boundary, use Support and availability.

On this page