Skip to content

LLM-kind @boundary pre_call via Chronicle on_enter - #39

Merged
susheem-k merged 6 commits into
mainfrom
feat/llm-boundary-precall
Jul 24, 2026
Merged

LLM-kind @boundary pre_call via Chronicle on_enter#39
susheem-k merged 6 commits into
mainfrom
feat/llm-boundary-precall

Conversation

@susheem-k

Copy link
Copy Markdown
Collaborator

Summary

  • Attach TokenOps on_enter / on_leave in install_crossing_hook so kind=\"llm\" Chronicle boundaries run governor.pre_call (and ledger admit/complete) without wrap_complete.
  • wrap_complete / wrap_stream set a context flag so they do not double-govern.
  • Bump to 0.1.2.
  • Depends on Chronicle PR #29 (on_enter / on_leave); pyproject pins that branch until agent-chronicle 0.3.0 is on PyPI — then switch to >=0.3.0.

Test plan

  • pytest tests/test_llm_boundary_precall.py (halt + MUTATE max_output)
  • Existing wrap_complete / crossing tests
  • CI green (after Chronicle branch is fetchable)
  • After Chronicle 0.3.0 release: replace git pin with agent-chronicle>=0.3.0

Made with Cursor

susheem-k and others added 6 commits July 24, 2026 19:42
Bare @boundary(..., kind=\"llm\") under tokenops_run runs worst-case halt and output-cap MUTATE without wrap_complete. wrap_complete opts out of the double path. Bumps to 0.1.2; depends on chronicle on_enter (0.3.0 branch).

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Narrow max_output_tokens parsing so object→int is type-safe, and add a local mypy hook alongside ruff so commits catch CI lint failures.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@susheem-k
susheem-k merged commit 8cd57a4 into main Jul 24, 2026
3 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