NAME
Langertha::Knarr::Manifest - Build Knarr's provider manifest (/.well-known/langertha.json) from its exposed model surface
VERSION
version 1.102
SYNOPSIS
# Used by Langertha::Knarr itself; see Langertha::Knarr/MANIFEST.
my $manifest = Langertha::Knarr::Manifest->new( knarr => $knarr );
if ( Langertha::Knarr::Manifest->available ) {
print $manifest->build('https://knarr.example')->to_json;
}
DESCRIPTION
Builds the Langertha::Manifest that Langertha::Knarr serves at /.well-known/langertha.json, with Langertha::Manifest::Builder from Langertha core.
Only what Knarr exposes is published, never its configuration:
one endpoint per loaded protocol that has a manifest dialect ("manifest_endpoint" in Langertha::Knarr::Protocol), under the public base URL;
one model entry per model id Knarr lists (configured aliases and
auto_discoverresults, asGET /v1/modelsshows them) on each of those endpoints;per model, the capabilities of the engine that serves it, evaluated for its upstream model by the core Builder (model-scoped, public allowlist only) and narrowed to what the endpoint's protocol actually forwards;
image_inputonly where the engine'scontent_formatreads the protocol's image parts (image_content_formatsin "manifest_endpoint" in Langertha::Knarr::Protocol: every format when Knarr translates images, see Langertha::Knarr::Image);an
api_keyauth entry when Knarr requires its "auth_token" in Langertha::Knarr.
Upstream URLs, API keys, api_key_env names, engine classes, upstream model names and passthrough targets never enter the document. Without a router (a single custom handler), model entries claim only chat.
The model part is cached and rebuilt when the listed model surface changes (for example once auto-discovery has run) or a capability probe ("probe_capabilities_f" in Langertha::Knarr::Router) has finished, so learned facts such as image_input appear without a restart; the envelope around it is built per request, because the base URL can come from the request.
knarr
Required (weak). The Langertha::Knarr whose surface is published.
available
Langertha::Knarr::Manifest->available;
True when the installed Langertha has Langertha::Manifest::Builder. Checked once per process; the manifest is a runtime-optional feature.
build
my $manifest = $knarr_manifest->build($public_base_url);
Returns a validated Langertha::Manifest for the given public base URL. Croaks when the URL is not a valid manifest URL. Call only when "available" is true.
SEE ALSO
Langertha::Manifest, Langertha::Manifest::Builder (Langertha core)
SUPPORT
Issues
Please report bugs and feature requests on GitHub at https://github.com/Getty/langertha-knarr/issues.
IRC
Join #langertha on irc.perl.org or message Getty directly.
CONTRIBUTING
Contributions are welcome! Please fork the repository and submit a pull request.
AUTHOR
Torsten Raudssus <torsten@raudssus.de> https://raudssus.de/
COPYRIGHT AND LICENSE
This software is copyright (c) 2026 by Torsten Raudssus.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.