feat: table renames, cp.run() context manager, adoption tiers (0.22.0)#10
Closed
ryanwi wants to merge 1 commit into
Closed
feat: table renames, cp.run() context manager, adoption tiers (0.22.0)#10ryanwi wants to merge 1 commit into
ryanwi wants to merge 1 commit into
Conversation
- Rename four SQL tables: control_sessions→agent_runs, control_events→audit_events, action_proposals→proposals, command_ledger→idempotency_ledger. Python class names unchanged; migration SQL in docs/compatibility.md. - Add cp.run() context manager (async + sync + resilient variants) yielding RunHandle. Opens/activates/closes session automatically; tags written to close payload; aborts with error repr on exception. Mirrors token_budget_tracker() ergonomics. - Add SyncControlPlane.activate_session() used by ControlPlaneFacade.run(). - Export RunHandle from top-level package. - Add examples/audit_trail.py (Tier 2 runnable demo). - README: adoption tiers section (Tier 1/2/3) with per-tier example pointers. - Bump version to 0.22.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
control_sessions→agent_runs,control_events→audit_events,action_proposals→proposals,command_ledger→idempotency_ledger. Python class names unchanged. Migration SQL for existing deployments added todocs/compatibility.md.cp.run()context manager — newRunHandle-yielding context manager on all four facade/resilient classes (async + sync). Opens, activates, and closes a session automatically; tags viarun.tag()land in the close payload; exceptions abort the session with error repr and re-raise. Mirrorstoken_budget_tracker()ergonomics.examples/audit_trail.pyas the runnable Tier 2 demo.Test plan
uv run pytest -q— 411 tests passmake check— lint + typecheck + tests cleanuv run python examples/audit_trail.py— success path prints COMPLETED, error path prints ABORTEDcreate_tables()on a fresh DB