feat(pro): add pro CLI/daemon extension surface

The core CLI scans decnet/pro/cli/ and calls each module's register(app),
registered before the master-only gate so pro commands are mode-filtered like
the rest. Lets the Professional tier add commands and standalone daemon entry
points (decnet pro-<cmd> serve, supervised by a systemd unit). No-op in the
Community build (no decnet.pro). Test asserts the shipped pro group registers
when mounted; skips otherwise.
This commit is contained in:
2026-06-17 15:21:06 -04:00
parent dd1b754f65
commit 62f5fb652e
2 changed files with 33 additions and 0 deletions

View File

@@ -86,3 +86,21 @@ def test_pro_tier_seams():
finally:
pro_routes.ROUTERS = saved
importlib.reload(web_router) # rebuild a pro-free api_router for others
def test_pro_cli_registered_when_mounted():
"""When decnet/pro/ is mounted, its CLI modules' commands join the root app.
Read-only against the already-built decnet.cli.app — no reload, no fs
mutation. Skips on the Community build, where decnet.pro is absent."""
import importlib.util
if importlib.util.find_spec("decnet.pro.cli") is None:
import pytest
pytest.skip("decnet.pro not mounted (community build)")
import decnet.cli as cli
group_names = {g.name for g in cli.app.registered_groups}
assert "pro-intel" in group_names # shipped example pro daemon group