Coverage for src/keel/capabilities.py: 100%
9 statements
« prev ^ index » next coverage.py v7.14.1, created at 2026-06-16 18:07 +0000
« prev ^ index » next coverage.py v7.14.1, created at 2026-06-16 18:07 +0000
1"""Static capability vocabulary shared by config, extensions, and runtime detection."""
3from __future__ import annotations
5KNOWN_CAPABILITIES: tuple[str, ...] = (
6 "shell",
7 "git",
8 "gh",
9 "gh-auth",
10 "github-mcp",
11 "subagents",
12 "parallel-subagents",
13 "browser",
14 "adb",
15 "firebase",
16 "filesystem-write",
17 "worktree",
18 "release-publish",
19 "secret-access",
20 "production-adjacent",
21 "private-setup",
22)
25def validate_names(names: tuple[str, ...] | list[str], *, source: str) -> list[str]:
26 """Return errors for unknown capability names."""
28 known = set(KNOWN_CAPABILITIES)
29 errors: list[str] = []
30 for name in names:
31 if name not in known:
32 errors.append(
33 f"{source}: unknown capability {name!r}; valid: {', '.join(KNOWN_CAPABILITIES)}"
34 )
35 return errors