Edition Gating and Packaging
Edition Gating and Packaging
Once features declare a the-feature-header, the active edition
(editions-and-the-production-path) decides what actually loads.
Runtime gating
app/features/gating.py is the single gate the load sites consult. It is a
no-op for the full edition (short-circuits to True — zero overhead, zero
risk) and fail-open (a feature the catalog doesn't recognise is never hidden).
Chokepoints where the edition is enforced:
- Integrations —
inject_integration_tools()skips excluded modules. - Channels / Event sources — the managers'
get_enabled_plugins()/
enabled() filter on each plugin's stashed FEATURE.
- Abilities — the tool loader filters
enabled_providersthrough
gating.ability_enabled (one chokepoint gates every ability's tools, incl.
web search).
Running as an edition
Set WEBAGENT_EDITION=production (or beta, or a fork name). The app then loads
only that edition's features; full (default) loads everything. Confirm in
App Config → Features.
Cutting a code-absent artifact
python -m scripts.build_edition production ../webagent-production
This copies the repo and physically removes the drop-in plugin files the
edition excludes (integrations, channels, event sources). The registry subsystems
and abilities keep their files but are runtime-gated, and the artifact'seditions.json is pinned to the chosen edition.
Note: unmarked (unknown) plugins are excluded from non-full editions by
design — add a FEATURE header to anything you want in production.