A WebAssembly function registered on AT Protocol
Record Key
any
Any valid record key
Properties
allowedHosts
array
of
string
Optional
For host-v1: list of AT URIs the function may read from
code
blob
Required
Compiled WebAssembly binary
description
string
Optional
Optional description of what the function does
maxLength: 2048 bytesentrypoint
string
Required
WASM export name to call (always 'run')
inputEncoding
string
Required
Input encoding (always application/json)
inputSchema
unknown
Optional
Optional JSON Schema for input validation
maxDurationMs
integer
Optional
Execution timeout in milliseconds
minimum: 1maximum: 5000Default:
100maxMemoryMb
integer
Optional
Memory limit in megabytes
minimum: 1maximum: 256Default:
32mode
string
Required
Execution mode
Known values:
pure-v1, host-v1, component-v1name
string
Required
Human-readable function name
maxLength: 128 bytesoutputEncoding
string
Required
Output encoding (always application/json)
outputSchema
unknown
Optional
Optional JSON Schema for output description
public
boolean
Optional
Whether this function is publicly invocable
Default:
trueversion
string
Required
Semver string
maxLength: 32 bytesView raw schema
{
"key": "any",
"type": "record",
"record": {
"type": "object",
"required": [
"name",
"version",
"mode",
"code",
"entrypoint",
"inputEncoding",
"outputEncoding"
],
"properties": {
"code": {
"type": "blob",
"accept": [
"application/wasm"
],
"description": "Compiled WebAssembly binary"
},
"mode": {
"type": "string",
"description": "Execution mode",
"knownValues": [
"pure-v1",
"host-v1",
"component-v1"
]
},
"name": {
"type": "string",
"maxLength": 128,
"description": "Human-readable function name"
},
"public": {
"type": "boolean",
"default": true,
"description": "Whether this function is publicly invocable"
},
"version": {
"type": "string",
"maxLength": 32,
"description": "Semver string"
},
"entrypoint": {
"type": "string",
"const": "run",
"description": "WASM export name to call (always 'run')"
},
"description": {
"type": "string",
"maxLength": 2048,
"description": "Optional description of what the function does"
},
"inputSchema": {
"type": "unknown",
"description": "Optional JSON Schema for input validation"
},
"maxMemoryMb": {
"type": "integer",
"default": 32,
"maximum": 256,
"minimum": 1,
"description": "Memory limit in megabytes"
},
"allowedHosts": {
"type": "array",
"items": {
"type": "string"
},
"description": "For host-v1: list of AT URIs the function may read from"
},
"outputSchema": {
"type": "unknown",
"description": "Optional JSON Schema for output description"
},
"inputEncoding": {
"type": "string",
"const": "application/json",
"description": "Input encoding (always application/json)"
},
"maxDurationMs": {
"type": "integer",
"default": 100,
"maximum": 5000,
"minimum": 1,
"description": "Execution timeout in milliseconds"
},
"outputEncoding": {
"type": "string",
"const": "application/json",
"description": "Output encoding (always application/json)"
}
}
},
"description": "A WebAssembly function registered on AT Protocol"
}