George Véras Valentim

Reference

The whole surface, as built. Anything not listed here does not exist yet; the specification's construction notes record where the build completed or amended the sketch.

defineActa(config)

Validates and returns a configuration: slices, transitions, seats, optional effects. Validation is strict and happens at declaration time: a transition writing an undeclared slice, a seat no transition has heard of, an effect subscribing to an undeclared transition, or a manifest promising a transition that does not allow the seat are all configuration errors, thrown before the store opens.

Slices

{ schema, initial }. The schema is a documented JSON Schema subset (types, required, properties, additionalProperties, enum, minLength, items). The initial value is validated against the schema at construction. Every commit's result is validated against the target slice's schema; an invalid result is a refusal.

Transitions

{ slice, seats, input, guard?, apply }.

The store

Effects

{ name, reads, after?, seat, failureTransition?, run(ctx) }. An effect subscribes to one slice, optionally only after named transitions. It runs once per state version, under the idempotency key (effect, version), persisted beside the log in <log>.effects.json. Versions committed before a crash, or before the effect existed, are caught up at boot: at-least-once delivery, made safe by the keys. The context offers version, the triggering record, read(slice) and emit(transition, payload), which proposes as the effect's seat through the same commit path. If run throws, the failure is committed through failureTransition with payload { effect, version, error }. An unbroken cascade of effects retriggering each other is capped at 64 runs; anything past the cap is recorded as failed with the cap as its reason.

Seats

{ token?, manifest? }. When a token is declared, a proposal as that seat must present it (opts.token, or ACTA_SEAT_TOKEN for the MCP server) or the commit refuses with the reason. The manifest, { transitions: [...] }, is the seat's own declared scope, enforced on top of each transition's seat list: a seat narrowed by its manifest is refused even where the transition would otherwise allow it.

Deadlines

registerDeadline({ name, dueAt, awaiting, matchPayload?, expiryTransition, seat, payload? }) registers a deadline against the current version. A commit of the awaited transition after the registration version satisfies it forever; matchPayload narrows satisfaction to records whose payload carries the declared subset, so one front's deposit does not satisfy another front's deadline. Satisfaction is derived from the log and survives restarts; the registry persists beside the log in <log>.deadlines.json. checkDeadlines() is the server's one clock act, called by the embedder on its own cadence: each open, due, unsatisfied deadline writes its expiry transition through the commit queue, exactly once. A refused expiry stays open and is retried at the next check, in the open. deadlineStatus(name) returns open, satisfied or expired.

The log

Append-only JSONL. Each record carries seq, version, at, seat, transition, slice, payload and baseVersion. The log is the receipt for every claim the state makes.

CLI and MCP surface