Glossary
Commands and queries
Section titled “Commands and queries”- Command — a class or record annotated
@Commandexpressing an imperative intent; its publichandlemethod produces a response, appends events, or both. See Create and validate commands. - Handle — the public instance method KSP requires on a
@Command. May be synchronous,suspend, or return a JavaCompletionStage. - Provide — the optional method that runs after validation and authorization, before
handle, to fetch or compute datahandleneeds. See Prepare handler values. - Command key (
@CommandKey) — the property that identifies the command’s subject; required for a command to return a plain Chronicle event. See Return an event. - Read model — a class or record annotated
@ReadModelwhose static or companion methods are queries. See Expose one-shot and observable queries. - Query — a static (Java) or
@JvmStaticcompanion (Kotlin) method on a@ReadModel. One-shot queries return a value; observable queries returnFlow<T>orFlow.Publisher<T>. - Observable query — a query whose return type is
Flow<T>/Flow<List<T>>orFlow.Publisher<T>/Publisher<List<T>>(or, with the optionalarc-rxjava3artifact, an RxJava 3 type). Arc hosts it as an HTTP snapshot, direct SSE, direct WebSocket, or a multiplexed hub. See Declare observable queries. @FromServices— marks a query parameter as a dependency resolved from Spring, distinguishing it from an unannotated caller argument.
Generated artifacts
Section titled “Generated artifacts”- KSP — Kotlin Symbol Processing, the compiler
plugin that reads
@Command/@ReadModeldeclarations and generates handlers, performers, and the artifact manifest at compile time. Arc’s processor isio.cratis:arc-ksp. See Configuration reference for the application-facing surface. - Artifact manifest — the language-neutral JSON document (
META-INF/cratis/arc/*.json) KSP emits per module, consumed by the TypeScript proxy generator. See Configuration reference. - Proxy — the generated TypeScript client for a command, query, model, interface, or enum,
carrying a
// @generated by Cratisheader. See Generate TypeScript proxies. ARCKSPdiagnostic — a stable compile-time error or warning code KSP reports, for exampleARCKSP0101(unsupported command declaration). Cataloged in KSP diagnostics.- Concept (
ConceptAs<T>) — a Kotlin class or Java record implementingio.cratis.fundamentals.concepts.ConceptAs<T>fromio.cratis:fundamentalsthat wraps a single scalar value.io.cratis.arc.concepts.ConceptAsis a deprecated compatibility interface. Serializes as its underlying value, not as a wrapper object, across commands, queries, models, validation, TypeScript, OpenAPI, and Chronicle command keys.
Validation
Section titled “Validation”ConceptValidator<TConcept>— a reusable, server-only rule applied everywhere a specific concept type appears in a command or query graph. See Add validation.ModelValidator<T>— a server-only rule for one exact runtime model class, applied to command roots, nested models, and supplied query arguments. See Reuse model validation.FluentModelValidator<T>— a bounded, literal-rule validator whose rules are also emitted into the generated TypeScript client, so the same constraint runs in the browser and on the server. See Share fluent validation.@IgnoreValidation— cuts one member’s validation edge before access while leaving serialization and binding unchanged. See Ignore a validation member edge.
Identity, tenancy, and transport
Section titled “Identity, tenancy, and transport”AuthenticationHandler— an ordered Kotlin or Java (AsyncAuthenticationHandler) bean that inspects a request and returns an authenticated, failed, or anonymous result. See Register an authentication handler.TenantIdResolver— resolves the current request’s tenant from a header, query parameter, claim, subdomain, or fixed/development value. See Configuration reference.CommandResult/QueryResult— the JSON envelopes every command and query response uses. See the HTTP contract reference.- Correlation ID — the
X-Correlation-IDvalue the Spring Boot starter establishes once per request, for every route in the host, Arc-owned or not. See Correlation.
Chronicle (optional integration)
Section titled “Chronicle (optional integration)”- Chronicle — Cratis’s event-sourcing database and runtime,
consumed here through Chronicle.Kotlin. Optional:
io.cratis:archas no dependency on it. See Integrate commands and read models with Chronicle. - Event — an immutable Chronicle
@EventTypefact returned from a command’shandleand appended to an event stream. - Reactor — a Chronicle artifact that observes events;
ChronicleCommandSideEffectHandlerlets one hand registered Arc command values to the real command pipeline as a side effect. See Execute reactor command side effects. EventsWithConcurrencyScopes— a typed command response that attaches exact per-event-source Chronicle concurrency scopes to a batch of routed events. See Attach exact concurrency scopes.
Where to go next
Section titled “Where to go next”- Feature parity reference — the evidence-backed status of every one of these terms in the current JVM implementation.
- Annotation reference — the exact contract of every annotation named above.