Skip to main content

Module providers_custom

Module providers_custom 

Source
Expand description

The runtime layer of the provider registry: custom harnesses registered by a manifest (harness_manifest.rs), asked after the built-ins.

Every caller of the registry takes a &'static ProviderConfig, so a custom harness is turned into one by leaking its strings once. The leak is keyed by the manifest’s content hash, so reading the same file again leaks nothing, and two caps bound what a machine can ever leak: live harnesses (MAX_LIVE) and distinct manifests seen since start (MAX_LEAKED). SPEC_BYO_HARNESS_CUSTOM_ACP_MANIFEST_2026_11_12.md §4.

Structs§

CustomLayer
The harnesses registered and every config ever built, by content hash.
LoadReport
One folder’s outcome when a directory of harnesses is read.

Enums§

RegisterError
Why a registration was refused.

Constants§

MANIFEST_FILE
The manifest’s file name inside its folder.
MAX_FOLDER_BYTES
A harness folder larger than this is refused (it is a manifest and an icon).
MAX_ICON_BYTES
An icon image larger than this is refused.
MAX_LEAKED
Distinct manifests that may be turned into a config in one process: a manifest edited over and over cannot grow the leak without bound.
MAX_LIVE
Custom harnesses registered at once on one machine.

Functions§

all_custom_providers
Every registered custom harness, by id.
get_custom_provider
A registered custom harness by id. Built-ins are asked first by the caller.
manifest_hash
SHA-256 of the manifest’s canonical JSON (a map is ordered, so equal content hashes equal).
register_custom
Register a manifest in the process-wide layer.
remove_custom
Take a custom harness out of the process-wide layer.