Skip to main content
Realm: server. Every symbol on this page exists only on the server. Nothing here is available on a client, and nothing in the adapter contract runs on one.

The entry point

Vetra.Blueprints.Adapters.HOOK

The discovery hook. Add a handler to it in your own lua/autorun/server/ file, in either load order. Blueprints fires it once, after the map has loaded.
Your handler is passed the public adapter surface as its only argument. That table is the entire SDK:
Anything reachable on Vetra.Blueprints.Adapters.Internal is Blueprints’ own and may change in any release. Do not call it.

Registration

Register(def)

Registers an adapter. The public entry point. Refused outside the registration window, and the refusal names the hook. Every field of def is documented in Adapter anatomy.
The error string is developer-facing and names the adapter and the offending field.

Interrogating the registry

These answer with plain data. No caller outside Blueprints ever receives a table holding another adapter’s functions.

Has(id)

Is an adapter with this id registered here?

IsAvailable(id)

Is it registered and is its optional dependency present? Evaluated on every call rather than cached: an addon can be unloaded, and a cached “available” is a claim that goes stale silently. An adapter with no dependency is available. An adapter whose Available throws is reported unavailable, with a reason distinguishing a fault from a missing dependency.

DependencyVersion(id)

The dependency’s own version, when it reports one. Diagnostics only: it is never compared and never blocks. Returns nil if there is no dependency, no Version function, or the function did not return a string.

Describe(id)

A plain-data description of one adapter, freshly built, holding no functions.
capabilities is a sorted array of the names this adapter declared and this build honours. Third-party text (reason, dependency.version) is truncated to 240 characters. Returns nil if no such adapter is registered.

List()

Every registered adapter, described as above, sorted by id.

Compatibility

STATES

Four states, computed per adapter and recorded data version. Not five: “the adapter lacks the capability this operation needs” is a property of the operation, not of the adapter and Version pair.

Compatibility(id, recordedDataVersion)

Can this build honestly work with records that adapter produced earlier? recordedDataVersion of nil means 1.

SnapshotCompatibility(snapshot)

Compatibility of every adapter a Version is authoritative about, sorted by id:
It reads the Version’s own manifest rather than its objects: an adapter that collected nothing is still authoritatively empty, and an object list cannot express that.

Constants

Capabilities()

The capability names this build honours, sorted. Returns a fresh array every call.

ID_PATTERN

ID_MAX


The optional entity helper

Vetra.Blueprints.Entities.Identity(ent)

Resolves the stable identity of a live entity, for adapters whose domain is entity-backed.
  • A map-baked entity resolves through the engine’s own creation id and is persistent.
  • Anything spawned at runtime gets a Blueprint-assigned id and is session.
This is not part of the adapter contract. Nothing requires it, and Blueprints’ own DarkRP adapter does not touch it. It exists, it is public, and it is optional.If you use it, declare identity = { scope = "session" } on your descriptor, because that is the weakest scope it can return.The rest of Vetra.Blueprints.Entities is Blueprints’ own helper for its built-in adapters and is not a stable third-party surface.

Capability functions you implement

These are called by Blueprints, on your descriptor, with the descriptor as self. Full semantics in Adapter anatomy.
ctx is informational and its shape is not part of the stable contract. It is passed only to the six functions above that list it, and never to Collect, ApplyTransform or ReleaseMaterialized.

Result shapes

Vocabularies


The console surface

Not a Lua API. The diagnostics ship as one console command, and the command is the supported way to inspect adapters, run the contract and check compatibility.
What each mode of test touches is in Testing your adapter.
Vetra.Blueprints.AdapterDiagnostics and Vetra.Blueprints.Contract are Blueprints’ own tables behind the command. Run the command rather than calling them: they may change in any release.