Metadata-Version: 2.5
Name: biffo-plugin-host
Version: 0.1.0
Summary: The shared plugin-host runtime (ADR-0021): one Lambda mounts every user-facing plugin's API.
Project-URL: Homepage, https://github.com/keiranholloway/biffo-template
Project-URL: Repository, https://github.com/keiranholloway/biffo-template
Project-URL: Issues, https://github.com/keiranholloway/biffo-template/issues
Project-URL: Documentation, https://github.com/keiranholloway/biffo-template/blob/main/docs/ADR/0021-shared-plugin-hosting.md
Author-email: Keiran Holloway <keiran@tabsii.com>
License-Expression: MIT
License-File: LICENSE
Keywords: aws,biffo,host,lambda,plugin,serverless
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Requires-Python: >=3.13
Requires-Dist: biffo-plugin-sdk[user-serving]<2.0,>=1.4
Requires-Dist: mangum>=0.19.0
Requires-Dist: starlette>=0.37.0
Description-Content-Type: text/markdown

# biffo-plugin-host

The shared plugin-host runtime for [Biffo](https://github.com/keiranholloway/biffo-template)
(ADR-0021): one Lambda mounts every installed user-facing plugin's API behind
the Core API Gateway at `/api/v1/plugins/*`.

A user-facing plugin is pure code — an ASGI app referenced as `"<module>:<attr>"`
in its manifest's `user_ingress.app` (and optionally `admin_ingress.app`) — not
its own Lambda function or its own Mangum handler. This package is the host that
discovers those manifests, imports each plugin's app, and mounts it behind the
platform's authentication and per-plugin identity assertion.

## Install

```bash
pip install biffo-plugin-host
```

## Use

```python
from plugin_host.discover import discover_plugins, load_app

plugins = discover_plugins("services")
app = load_app("marketing.app:app")
```

This is the same discovery and mount logic the platform runs in production
(`services/_plugin-host/` in the template). It is published so a plugin repo's
own conformance checks can import and exercise the real host, rather than
re-implementing a mock of it.

## Versioning

`biffo-plugin-host` carries its own independent semver, separate from the
template's core version — see the header comment in `pyproject.toml` for the
full rationale (the same one `packages/python-sdk/pyproject.toml` records for
`biffo-plugin-sdk`).
