abi
type Abridgement = typeof ABRIDGEMENTS[number];
Union of ABRIDGEMENTS wire names.
type AiTask = typeof AI_TASKS[number];
Union of AI_TASKS wire names.
type AiTextRole = typeof AI_TEXT_ROLES[number];
Union of AI_TEXT_ROLES wire names.
type CatalogField = typeof CATALOG_FIELDS[number];
Union of CATALOG_FIELDS wire names.
type CatalogSort = typeof CATALOG_SORTS[number];
Union of CATALOG_SORTS wire names.
type ChapterKind = typeof CHAPTER_KINDS[number];
Union of CHAPTER_KINDS wire names.
type CliArgKind = typeof CLI_ARG_KINDS[number];
Union of CLI_ARG_KINDS wire names.
type CreditLevel = typeof CREDIT_LEVELS[number];
Union of CREDIT_LEVELS wire names.
type CreditRole = typeof CREDIT_ROLES[number];
Union of CREDIT_ROLES wire names.
type DbResultSelection = typeof DB_RESULT_SELECTIONS[number];
Union of DB_RESULT_SELECTIONS wire names.
type DbStatementKind = typeof DB_STATEMENT_KINDS[number];
Union of DB_STATEMENT_KINDS wire names.
type DbType = typeof DB_TYPES[number];
Union of DB_TYPES wire names.
type Entrypoint = typeof ENTRYPOINTS[number];
Union of ENTRYPOINTS wire names.
type Explicitness = typeof EXPLICITNESSS[number];
Union of EXPLICITNESSS wire names.
type ExpressionKind = typeof EXPRESSION_KINDS[number];
Union of EXPRESSION_KINDS wire names.
type FetchedFileRole = typeof FETCHED_FILE_ROLES[number];
Union of FETCHED_FILE_ROLES wire names.
type IdentifierScheme = typeof IDENTIFIER_SCHEMES[number];
Union of IDENTIFIER_SCHEMES wire names.
type IntegerArithKind = typeof INTEGER_ARITH_KINDS[number];
Union of INTEGER_ARITH_KINDS wire names.
type IsolationReq = typeof ISOLATION_REQS[number];
Union of ISOLATION_REQS wire names.
type MediaKind = typeof MEDIA_KINDS[number];
Union of MEDIA_KINDS wire names.
type MetadataField = typeof METADATA_FIELDS[number];
Union of METADATA_FIELDS wire names.
type NotificationAlertAction = typeof NOTIFICATION_ALERT_ACTIONS[number];
Union of NOTIFICATION_ALERT_ACTIONS wire names.
type NotificationAudience = typeof NOTIFICATION_AUDIENCES[number];
Union of NOTIFICATION_AUDIENCES wire names.
type NotificationSeverity = typeof NOTIFICATION_SEVERITYS[number];
Union of NOTIFICATION_SEVERITYS wire names.
type NotifyDestinationKind = typeof NOTIFY_DESTINATION_KINDS[number];
Union of NOTIFY_DESTINATION_KINDS wire names.
type ObjectChangeKind = typeof OBJECT_CHANGE_KINDS[number];
Union of OBJECT_CHANGE_KINDS wire names.
type OfferedAacProfile = typeof OFFERED_AAC_PROFILES[number];
Union of OFFERED_AAC_PROFILES wire names.
type OfferedCodec = typeof OFFERED_CODECS[number];
Union of OFFERED_CODECS wire names.
type PluginErrorCode = typeof PLUGIN_ERROR_CODES[number];
Union of PLUGIN_ERROR_CODES wire names.
type PortalAuthMode = typeof PORTAL_AUTH_MODES[number];
Union of PORTAL_AUTH_MODES wire names.
type PriceLookup = typeof PRICE_LOOKUPS[number];
Union of PRICE_LOOKUPS wire names.
type ResolvedSqlType = typeof RESOLVED_SQL_TYPES[number];
Union of RESOLVED_SQL_TYPES wire names.
type SettingGrantState = typeof SETTING_GRANT_STATES[number];
Union of SETTING_GRANT_STATES wire names.
type SettingNetworkKind = typeof SETTING_NETWORK_KINDS[number];
Union of SETTING_NETWORK_KINDS wire names.
type WorkKind = typeof WORK_KINDS[number];
Union of WORK_KINDS wire names.
const ABRIDGEMENTS: readonly ["unknown", "unabridged", "abridged"];
Whether an edition is abridged.
Ordinal-ordered Abridgement wire names (index = Cap'n Proto ordinal).
const AI_TASKS: readonly ["textEmbeddings"];
What a model does. A model has exactly one task, and the task fixes the
shape of AiRunParams.input and of the reply.
Ordinal-ordered AiTask wire names (index = Cap'n Proto ordinal).
const AI_TEXT_ROLES: readonly ["document", "query"];
What a text is to an embedding model. Some models embed a search query differently from the documents it is matched against.
Ordinal-ordered AiTextRole wire names (index = Cap'n Proto ordinal).
const CATALOG_FIELDS: readonly ["any", "author", "narrator", "series", "genre"];
Catalog search facet restricting which field the query matches.
Ordinal-ordered CatalogField wire names (index = Cap'n Proto ordinal).
const CATALOG_SORTS: readonly ["relevance", "popularity", "rating", "title", "author"];
Catalog search ordering.
Ordinal-ordered CatalogSort wire names (index = Cap'n Proto ordinal).
const CHAPTER_KINDS: readonly ["unknown", "chapters", "tracks"];
What a storefront's chapter markers mark (PlainFetch.chapterKind).
Ordinal-ordered ChapterKind wire names (index = Cap'n Proto ordinal).
const CLI_ARG_KINDS: readonly ["string", "bool", "int", "path"];
Value kind for a CliArgSpec.
Ordinal-ordered CliArgKind wire names (index = Cap'n Proto ordinal).
const CREDIT_LEVELS: readonly ["roleDefault", "work", "expression", "edition"];
Which level a credit attaches to. Ordinal 0 is the role's usual level, so a guest sets this only when a credit departs from it.
Ordinal-ordered CreditLevel wire names (index = Cap'n Proto ordinal).
const CREDIT_ROLES: readonly ["author", "narrator", "translator", "editor", "illustrator", "publisher", "host", "cast", "adaptor"];
A contributor's responsibility for a work, expression or edition.
Ordinal-ordered CreditRole wire names (index = Cap'n Proto ordinal).
const DB_RESULT_SELECTIONS: readonly ["discard", "affectedRows", "rows"];
Which part of a statement's outcome the caller wants back.
Ordinal-ordered DbResultSelection wire names (index = Cap'n Proto ordinal).
const DB_STATEMENT_KINDS: readonly ["execute", "select", "returning"];
How the host classifies a statement for result handling.
Ordinal-ordered DbStatementKind wire names (index = Cap'n Proto ordinal).
const DB_TYPES: readonly ["unspecified", "bool", "int64", "float64", "text", "bytes"];
Universal database cell/parameter domain. Engine-native arrays, enums, unsigned integers, and JSON text sentinels are not baseline ABI values.
Ordinal-ordered DbType wire names (index = Cap'n Proto ordinal).
const ENTRYPOINTS: readonly ["storefront", "storage", "databaseAdapter", "remoteLibrary", "cli", "oidc", "metadata", "covers", "metadataFiles", "notifier", "ingress", "ai"];
Named entrypoint a plugin exports (Cloudflare Workers named-entrypoint
analogue). Each value is a capability the host calls over RPC; triggers on
the default entrypoint (event, job) are declared separately.
Ordinal-ordered Entrypoint wire names (index = Cap'n Proto ordinal).
const EXPLICITNESSS: readonly ["unknown", "clean", "explicit"];
Whether an edition is marked as explicit (adult) content. A patron scope
can hide explicit editions; unknown and clean editions stay visible.
Ordinal-ordered Explicitness wire names (index = Cap'n Proto ordinal).
const EXPRESSION_KINDS: readonly ["unspecified", "text", "narration", "dramatisation", "graphic", "originalAudio"];
How a work is realised (FRBR expression): the kind of content you get,
independent of the carrier. A translation is not a kind: the expression's
language and its translator credits say it. unspecified is refused.
Ordinal-ordered ExpressionKind wire names (index = Cap'n Proto ordinal).
const FEATURE_SCALAR_LIMITS: "rpc.scalarLimits";
Guest honors scalar / stream-window / list-page caps (rpc.scalarLimits).
const FEATURE_STORAGE_CHANGES: "storage.changes";
Guest implements Destination.changes (storage.changes).
const FEATURE_STORAGE_CONDITIONAL_WRITE: "storage.conditionalWrite";
Guest enforces WriteOptions.ifMatch / ifNoneMatch (storage.conditionalWrite).
const FEATURE_STORAGE_COPY: "storage.copy";
Guest implements server-side Destination.copy (storage.copy).
const FEATURE_STORAGE_DELETE_MANY: "storage.deleteMany";
Guest implements Destination.deleteMany (storage.deleteMany).
const FEATURE_STORAGE_HEAD_MANY: "storage.headMany";
Guest implements Destination.headMany (storage.headMany).
const FEATURE_STORAGE_MOVE: "storage.move";
Guest implements Destination.move (storage.move).
const FEATURE_STORAGE_MOVE_MANY: "storage.moveMany";
Guest implements Destination.moveMany (storage.moveMany).
const FEATURE_STORAGE_TRANSLATE_KEYS: "storage.translateKeys";
Guest implements Destination.translateKeys (storage.translateKeys).
const FEATURE_STREAMS: "rpc.streams";
Media moves through transferred ByteRange / ByteSource streams (rpc.streams).
const FETCHED_FILE_ROLES: readonly ["unspecified", "part", "whole", "cover"];
What one fetched file is to the edition it belongs to.
Ordinal-ordered FetchedFileRole wire names (index = Cap'n Proto ordinal).
const IDENTIFIER_SCHEMES: readonly ["isbn", "asin", "openLibraryEdition", "openLibraryWork"];
Scheme of an external identifier. The scheme fixes whether the id names a work or an edition, and whether it is strong (unique) or weak (shared).
Ordinal-ordered IdentifierScheme wire names (index = Cap'n Proto ordinal).
const INTEGER_ARITH_KINDS: readonly ["add", "sub", "mul", "abs"];
INTEGER + - * abs site lowered to overflow -> NULL.
Ordinal-ordered IntegerArithKind wire names (index = Cap'n Proto ordinal).
const ISOLATION_REQS: readonly ["atomicBatch", "nestedSavepoint", "consistentSnapshot"];
Host → adapter execute. GuestDatabase stays ExecuteRequest-only.
Ordinal-ordered IsolationReq wire names (index = Cap'n Proto ordinal).
const MAX_AI_EMBED_DIMENSIONS: 4096;
Most numbers in one embedding vector.
const MAX_AI_EMBED_TEXT_BYTES: 16384;
Longest text in an AiTextEmbeddingsInput, in UTF-8 bytes.
const MAX_AI_EMBED_TEXTS: 64;
Most texts in one AiTextEmbeddingsInput.
const MAX_AI_LANGUAGES: 64;
Most language tags on one AiModel.
const MAX_AI_MODEL_NAME_BYTES: 192;
Longest AiModel.name, in UTF-8 bytes (@<plugin id>/<model id>).
const MAX_AI_MODELS: 64;
Most models one AiModels.models reply lists.
const MAX_BATCH_KEYS: 256;
Maximum keys or key pairs in one Destination.moveMany, deleteMany or
headMany call, and maximum outcomes in one reply.
const MAX_CHANGES_CURSOR_BYTES: 4096;
Maximum bytes of a Destination.changes cursor.
const MAX_CHANGES_PAGE: 256;
Maximum changes in one Destination.changes page.
const MAX_CHECKPOINT_BYTES: 65536;
Maximum job / event checkpoint payload size (bytes).
const MAX_CONFIG_PAYLOAD_BYTES: 65536;
Maximum granted config payload size (bytes).
const MAX_COVER_BYTES: 10485760;
Largest image body CoverFetcher.fetchCovers may return for one URL.
const MAX_COVER_HEADER_BYTES: 1024;
Longest cache header value, in bytes, CoverFetcher.fetchCovers carries in
either direction (a condition the host sends, a header the server sent).
The host ignores a longer header the fetcher returns.
const MAX_COVER_URLS: 32;
Most URLs in one CoverFetcher.fetchCovers call.
const MAX_CRON_BYTES: 128;
Maximum [triggers] crons source length (bytes), as in ScheduledController.cron.
const MAX_EVENT_CURSOR_BYTES: 512;
Maximum bytes of an EventReadRequest.after / EventReadPage.cursor.
const MAX_EVENT_PAYLOAD_BYTES: 65536;
Maximum decoded size of a domain-event scalar payload (not a stream).
const MAX_IDENTIFIER_BYTES: 64;
Maximum plugin / account identifier length (bytes).
const MAX_INGRESS_ORIGIN_BYTES: 253;
Longest IngressStarted.origin, in bytes.
const MAX_KV_KEY_BYTES: 512;
Longest KvNamespace key in UTF-8 bytes.
const MAX_KV_METADATA_BYTES: 1024;
Largest KvNamespace metadata JSON text in bytes.
const MAX_KV_VALUE_BYTES: 1048576;
Largest KvNamespace value in bytes; a [[kv_namespaces]] row may lower
its own cap but never raise it past this.
const MAX_LIST_PAGE: 256;
Maximum objects in one Destination.list page.
const MAX_METADATA_AUDIO_FILES: 4096;
Most entries in MetadataFileRenderParams.audioFiles.
const MAX_METADATA_FILE_BYTES: 262144;
Largest metadata file MetadataFiles.parse reads and MetadataFiles.render
returns. The host skips a larger sidecar before any plugin sees it.
const MAX_METADATA_FILE_CHAPTERS: 2000;
Most chapters in a MetadataFileRecord.
const MAX_METADATA_FILE_DESCRIPTION_BYTES: 65536;
Longest description a MetadataFileRecord carries, in UTF-8 bytes.
const MAX_METADATA_FILE_LIST_ENTRIES: 256;
Most entries in each list of a MetadataFileRecord other than chapters
(credits, genres, tags, identifiers, series).
const MAX_METADATA_FILE_TEXT_BYTES: 1024;
Longest other text value in a MetadataFileRecord (a title, a name, a
genre, a chapter title), in UTF-8 bytes.
const MAX_NETWORK_GRANT_ENTRIES: 256;
Most entries in each list of a NetworkGrant (fetch hosts, TCP
destinations, network settings).
const MAX_NOTIFICATION_FIELD_BYTES: 1024;
Longest NotificationField.value, link, group key or alert key, in UTF-8
bytes.
const MAX_NOTIFICATION_FIELDS: 25;
Most NotificationFields on one message or raise.
const MAX_NOTIFICATION_HTML_BYTES: 65536;
Longest NotificationMessage.html, in UTF-8 bytes.
const MAX_NOTIFICATION_TEXT_BYTES: 16384;
Longest NotificationMessage.text or markdown, in UTF-8 bytes.
const MAX_NOTIFICATION_TITLE_BYTES: 256;
Longest NotificationMessage.title and NotificationField name, in UTF-8
bytes.
const MAX_NOTIFIER_ADDRESS_BYTES: 4096;
Longest destination address document (addressJson), in UTF-8 bytes.
const MAX_ORIGIN_HEADER_BYTES: 65536;
Largest total UTF-8 bytes of header names and values on one Origin.fetch
request, and separately on its response.
const MAX_ORIGIN_HEADERS: 128;
Most header fields on one Origin.fetch request, and separately on its
response.
const MAX_ORIGIN_TARGET_BYTES: 8192;
Longest OriginRequest.target (path and query), in bytes.
const MAX_PLUGIN_MIGRATION_OPS: 256;
Maximum already-separated operations in one plugin-owned migration.
const MAX_PLUGIN_MIGRATION_REGISTRATION_BYTES: 262144;
Maximum aggregate UTF-8 bytes of plugin migration ids plus SQL in one databaseMigrations registration.
const MAX_PLUGIN_MIGRATION_TOTAL_OPS: 2048;
Maximum already-separated operations across one databaseMigrations registration.
const MAX_REFRESHED_CREDENTIAL_BYTES: 65536;
Maximum bytes of refreshed credentials a storefront hands back
(ScanPage.refreshedCredentials, PlainFetch.refreshedCredentials,
QualityOffersResult.refreshedCredentials).
const MAX_SCALAR_BYTES: 262144;
Maximum decoded size of an ordinary RPC scalar value (not a stream window).
const MAX_SCAN_CURSOR_BYTES: 4096;
Maximum bytes of a scan cursor or sync token.
const MAX_SCAN_PAGE_BOOKS: 500;
Maximum titles, and separately removed product ids, in one ScanPage.
const MAX_SOCKET_ATTACHMENT_BYTES: 2048;
Largest per-socket attachment the host keeps for a sleeping guest.
const MAX_SOCKET_AUTO_RESPONSE_BYTES: 256;
Largest heartbeat request or response frame, in bytes.
const MAX_SOCKET_AUTO_RESPONSES: 4;
Most heartbeat pairs one Sockets.connect may declare.
const MAX_SOCKET_FRAME_BYTES: 262144;
Largest WebSocket message, text or binary, that Sockets.send accepts or
SocketHandler.message delivers.
const MAX_SOCKET_HEADERS: 16;
Most request headers, and separately subprotocols, on one Sockets.connect.
const MAX_SOCKET_URL_BYTES: 2048;
Longest SocketConnectRequest.url, in bytes.
const MAX_SOCKETS_PER_INSTANCE: 8;
Most host-brokered sockets one plugin instance may hold open at once.
const MAX_STREAM_WINDOW_BYTES: 1048576;
Maximum bytes returned by one ByteSource.pull (flow-control window).
const MAX_WEBHOOK_BODY_BYTES: 1048576;
Largest stored webhook request body, in bytes (1 MiB); a [[webhooks]]
row may lower its own cap but never raise it past this.
const MAX_WEBHOOK_HEADER_VALUE_BYTES: 8192;
Longest kept request header value, in bytes.
const MAX_WEBHOOK_HEADERS: 16;
Most request headers a [[webhooks]] row keeps; a delivery also carries
content-type, so it holds at most one more.
const MAX_WEBHOOK_LEASE_ID_BYTES: 128;
Longest WebhookDelivery.leaseId, in bytes.
const MAX_WEBHOOK_NAME_BYTES: 32;
Longest [[webhooks]] name, in bytes.
const MAX_WEBHOOK_PULL_BATCH: 100;
Most deliveries one Webhooks.pull returns.
const MAX_WEBHOOK_VISIBILITY_MS: 43200000;
Longest Webhooks.pull visibility timeout, in milliseconds (12 hours).
const MEDIA_KINDS: readonly ["unspecified", "audio", "ebook", "print"];
Carrier of an edition (FRBR manifestation): what form you receive.
Whether the host acquires an edition depends on the storefront's
MediaSupport.fetches and what the host supports, not on this value
alone. unspecified is refused.
Ordinal-ordered MediaKind wire names (index = Cap'n Proto ordinal).
const METADATA_FIELDS: readonly ["title", "subtitle", "description", "publisher", "publishedAt", "language", "genres", "tags", "abridgement", "expressionKind", "identifiers", "credits", "series", "chapters", "duration", "explicitness"];
A field of a MetadataFileRecord. Dialects declare in the manifest which
fields their format carries; a parsed record lists the ones its file
states, and a render request lists the ones to write.
Ordinal-ordered MetadataField wire names (index = Cap'n Proto ordinal).
const NOTIFICATION_ALERT_ACTIONS: readonly ["none", "trigger", "resolve"];
Lifecycle step of an alert, for services such as PagerDuty that open and close incidents.
Ordinal-ordered NotificationAlertAction wire names (index = Cap'n Proto ordinal).
const NOTIFICATION_AUDIENCES: readonly ["operational", "patron", "account"];
Who a notification type is for. The account audience is reserved to the host; a plugin may declare only operational and patron types.
Ordinal-ordered NotificationAudience wire names (index = Cap'n Proto ordinal).
const NOTIFICATION_SEVERITYS: readonly ["info", "warning", "critical"];
How urgent a notification is. Routing rules carry a minimum severity.
Ordinal-ordered NotificationSeverity wire names (index = Cap'n Proto ordinal).
const NOTIFY_DESTINATION_KINDS: readonly ["channel", "personal"];
Kind of destination a Notifier sends to.
Ordinal-ordered NotifyDestinationKind wire names (index = Cap'n Proto ordinal).
const OBJECT_CHANGE_KINDS: readonly ["changed", "upserted", "removed"];
What happened to an object in a change feed. Unknown codes are kept and
treated as changed.
Ordinal-ordered ObjectChangeKind wire names (index = Cap'n Proto ordinal).
const OFFERED_AAC_PROFILES: readonly ["unknown", "lc", "he", "heV2", "xhe"];
AAC profile of an offered AAC stream (QualityOffer.aacProfile).
Ordinal-ordered OfferedAacProfile wire names (index = Cap'n Proto ordinal).
const OFFERED_CODECS: readonly ["unknown", "aac", "alac", "flac", "mp3", "opus", "vorbis", "eac3", "ac4"];
Audio codec of a stream a store offers (QualityOffer.codec). Spelled as
the host's probed codecs are, so an offer compares with a held file.
Ordinal-ordered OfferedCodec wire names (index = Cap'n Proto ordinal).
const PLUGIN_ERROR_CODES: readonly ["invalid_params", "unauthorized", "forbidden", "not_found", "unavailable", "unsupported", "internal", "payload_too_large", "deadline_exceeded", "invalid_cursor", "cancelled", "conflict", "limit_exceeded", "rate_limited", "network_not_granted"];
Stable PluginError.code strings. Unknown future codes are forwarded
as-is; SDKs surface them as a local unknown while keeping the raw wire
code.
Wire strings of PluginErrorCode in ordinal order (snake_case Text codes).
const PORTAL_AUTH_MODES: readonly ["unspecified", "password", "oauth"];
Portal Accounts connect mode for storefronts.
Ordinal-ordered PortalAuthMode wire names (index = Cap'n Proto ordinal).
const PRICE_LOOKUPS: readonly ["unspecified", "product", "isbn", "asin", "title"];
How a purchase-hint query names the title to price.
Ordinal-ordered PriceLookup wire names (index = Cap'n Proto ordinal).
const PRODUCT_API_VERSION: 3;
Product ABI version (plugin.toml api_version / describe().apiVersion).
const RESOLVED_SQL_TYPES: readonly ["integer", "real", "text", "blob", "boolean", "null"];
Resolved BookclerkSQL column type after type checking.
Ordinal-ordered ResolvedSqlType wire names (index = Cap'n Proto ordinal).
const SETTING_GRANT_STATES: readonly ["approved", "pending", "unset", "invalid"];
Where a network setting's destination stands.
Ordinal-ordered SettingGrantState wire names (index = Cap'n Proto ordinal).
const SETTING_NETWORK_KINDS: readonly ["fetch", "tcp"];
How a setting's destination is reached.
Ordinal-ordered SettingNetworkKind wire names (index = Cap'n Proto ordinal).
const WORK_KINDS: readonly ["unspecified", "book", "podcast"];
What family of creative work a record describes (FRBR work). Every record
names one: unspecified is refused by the host, so a guest that forgets
the field fails instead of silently describing a book. Whether a podcast
work is a show or an episode is structural, not a kind: an episode names
its show through parentProductId, a show names no parent.
Ordinal-ordered WorkKind wire names (index = Cap'n Proto ordinal).
Generated from packages/plugin-sdk at main · View as Markdown