Provider contract
Contract providers implement so the orchestrator can snapshot, plan, and apply changes safely.
The big picture
Required methods
name() -> str
name() -> strlabel() -> str
label() -> strfeatures() -> dict[str, bool]
features() -> dict[str, bool]capabilities() -> dict[str, Any]
capabilities() -> dict[str, Any]build_index(cfg: dict, feature: str) -> dict | list
build_index(cfg: dict, feature: str) -> dict | listadd(cfg: dict, items: list[dict], feature: str, dry_run: bool) -> dict
add(cfg: dict, items: list[dict], feature: str, dry_run: bool) -> dictremove(cfg: dict, items: list[dict], feature: str, dry_run: bool) -> dict
remove(cfg: dict, items: list[dict], feature: str, dry_run: bool) -> dictOptional but strongly recommended
health(cfg: dict, emit: callable | None = None) -> dict
health(cfg: dict, emit: callable | None = None) -> dictactivities(cfg: dict) -> dict[str, str]
activities(cfg: dict) -> dict[str, str]Index semantics: present vs delta
Present (default)
Delta
Verify-after-write support
Good provider write responses (so applier + blackbox work)
Persistence flags (items you don’t want in baselines)
Context injection (ops.ctx)
Implementation checklist
Related pages
Last updated
Was this helpful?