dev.idiolect.adapter

A published record that declares how to invoke a framework wrapper and what isolation it requests. The shipped orchestrator catalogs these declarations; it does not execute adapters or enforce their isolation policies. A separate adapter host must interpret and enforce the contract.

Source: lexicons/dev/idiolect/adapter.json · Rust: idiolect_records::Adapter · TS: @idiolect-dev/schema/adapter · Fixture: idiolect_records::examples::adapter

Shape

FieldTypeRequiredNotes
frameworkstring (at most 128 characters)yesCanonical framework name (e.g. hasura, prisma, coq).
versionRangestringyesSemver range supported.
invocationProtocolobjectyesHow the adapter is invoked.
isolationobjectyesSandboxing requirements an adapter host is expected to enforce.
authordidyesDID of the adapter author.
verificationat-urinoOptional verification record demonstrating conformance.
occurredAtdatetimeyesPublication timestamp.

invocationProtocol

SubfieldTypeRequiredNotes
kindopen enumyessubprocess / http / wasm.
kindVocabvocabRefnoVocab the kind slug resolves against.
entryPointstringnoBinary name (subprocess), URL (http), or WASM module reference.
inputSchemaschemaRefnoSchema of the adapter's input.
outputSchemaschemaRefnoSchema of the adapter's output.

isolation

SubfieldTypeRequiredNotes
kindopen enumyesnone / process / container / vm / wasm-sandbox.
kindVocabvocabRefnoVocab the kind slug resolves against.
networkPolicyopen enumnonone / egress-denylist / egress-allowlist / full.
networkPolicyVocabvocabRefnoVocab the policy slug resolves against.
filesystemPolicyopen enumnoreadonly / scratch / writable-subtree / full.
filesystemPolicyVocabvocabRefnoVocab the policy slug resolves against.
resourceLimits{ maxMemoryBytes?, maxCpuSeconds?, maxWallSeconds? }noRequested ceilings for the adapter host.

Field details

Contract semantics

The publisher asserts that a framework in versionRange supports the declared invocation protocol under the requested isolation policy. Cataloging the record does not verify that assertion. Consumers may use linked verification records to evaluate specific conformance claims before passing the record to an adapter host.

invocationProtocol.kind

The transport an adapter host uses:

SlugWhat it means
subprocessFork entryPoint as a child process and exchange JSON over standard input and output.
httpSend JSON to the URL at entryPoint.
wasmInstantiate the WebAssembly module at entryPoint and call the host-defined export.

The slug is open-enum: a community publishing a vocab with an additional kind (e.g. nats-rpc, grpc-stream) extends the transport set without modifying the lexicon.

isolation.kind

The sandboxing posture requested from an adapter host:

SlugWhat it means
noneRun in the orchestrator's own process. Only safe for fully-trusted code.
processFork into a separate process; OS-level isolation.
containerRun in a container (Docker, Podman, Firecracker microVM).
vmRun in a full VM.
wasm-sandboxRun in a WASM runtime with capability-based access.

The lexicon does not define an ordering among these values or a minimum-isolation policy. A host that treats them as ordered must document that local policy.

Network and filesystem policies

Orthogonal axes layered on top of the kind:

networkPolicyWhat it means
noneNo network access.
egress-denylistNetwork access except to listed denied hosts.
egress-allowlistNetwork access only to listed allowed hosts.
fullUnrestricted.
filesystemPolicyWhat it means
readonlyThe adapter sees a read-only mount.
scratchThe adapter writes to a scratch directory cleaned up after each invocation.
writable-subtreeThe adapter writes to a designated subtree.
fullUnrestricted.

These fields declare requested capabilities; enforcement depends on the adapter host and its isolation runtime. Consumers should not infer enforcement from the existence of the record.

resourceLimits

Requested ceilings for a host that supports resource accounting:

FieldUnit
maxMemoryBytesRAM, in bytes.
maxCpuSecondsCPU time, in seconds.
maxWallSecondsWall-clock time, in seconds.

A consumer running an untrusted adapter sets all three.

verification

An optional pointer to a dev.idiolect.verification record demonstrating conformance. A consumer that wants to trust an adapter's claim about its inputSchema / outputSchema looks for a conformance-test verification (see verification).

Example

{
  "$type": "dev.idiolect.adapter",
  "framework": "hasura",
  "versionRange": "^2.30",
  "invocationProtocol": {
    "kind": "http",
    "entryPoint": "https://hasura.example/v1/graphql",
    "inputSchema":  { "uri": "at://did:plc:adapter-author/dev.panproto.schema.schema/hasura-input" },
    "outputSchema": { "uri": "at://did:plc:adapter-author/dev.panproto.schema.schema/hasura-output" }
  },
  "isolation": {
    "kind": "container",
    "networkPolicy": "egress-allowlist",
    "filesystemPolicy": "scratch",
    "resourceLimits": {
      "maxMemoryBytes": 1073741824,
      "maxCpuSeconds": 30,
      "maxWallSeconds": 60
    }
  },
  "author": "did:plc:adapter-author",
  "occurredAt": "2026-04-19T00:00:00.000Z"
}

Concept references