from enact import EnactClient
from enact.connectors.github import GitHubConnector
from enact.connectors.postgres import PostgresConnector
from enact.policies.git import dont_push_to_main
from enact.policies.db import dont_delete_without_where
# one-time setup — replaces your SDK clients
enact = EnactClient(
secret="...",
systems={
"github": GitHubConnector(token="..."),
"postgres": PostgresConnector(dsn="postgresql://..."),
},
policies=[dont_push_to_main, dont_delete_without_where],
)
# same intent — now policy-gated, receipt-backed, rollback-able
result, receipt = enact.run(
workflow="agent_pr_workflow",
user_email="agent@company.com",
payload={"repo": "myorg/app", "branch": "agent/fix-123"},
)