Skip to content

Add on_enter/on_leave for LLM pre-call on @boundary - #29

Merged
susheem-k merged 1 commit into
mainfrom
feat/boundary-on-enter-precall
Jul 24, 2026
Merged

Add on_enter/on_leave for LLM pre-call on @boundary#29
susheem-k merged 1 commit into
mainfrom
feat/boundary-on-enter-precall

Conversation

@susheem-k

Copy link
Copy Markdown
Contributor

Summary

  • Add ChronicleSession on_enter / on_leave hooks on @boundary and wrap_llm (LIVE + live cut-point).
  • on_enter runs after input capture and before the function: may raise to abort, or return kwargs to merge (MUTATE).
  • on_leave runs after the attempt when on_enter completed (including on function raise).
  • Bump package to 0.3.0.

Enables TokenOps to run governor.pre_call for kind="llm" boundaries without a separate wrap_complete path.

Test plan

  • pytest tests/test_on_enter.py tests/test_on_crossing.py tests/test_transparency.py
  • CI green

Made with Cursor

Governors can abort or MUTATE kwargs before the wrapped call; on_leave pairs cleanup. Bumps to 0.3.0.

Co-authored-by: Cursor <cursoragent@cursor.com>
@susheem-k
susheem-k merged commit 81f768e into main Jul 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant