-
Notifications
You must be signed in to change notification settings - Fork 6.7k
feat: RuntimeState event bus integration with checkpoint/resume #5241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
74 commits
Select commit
Hold shift + click to select a range
6627845
feat: pass RuntimeState through event bus, add .checkpoint(directory)
greysonlalonde cf241d8
feat: pass RuntimeState through event bus, add .checkpoint() and .fro…
greysonlalonde 2e1f882
feat: convert executor/tools/prompts to BaseModel, enable checkpoint …
greysonlalonde 743ebed
fix: preserve kickoff_event_id on resume, verbose already works
greysonlalonde 9ab85e6
refactor: make CrewAgentExecutorMixin a proper base class with Fields…
greysonlalonde 5179b41
Merge branch 'main' into chore/runtime-state-event-bus
greysonlalonde 2c4914b
Merge branch 'main' into chore/runtime-state-event-bus
greysonlalonde 6504e39
feat: type executor fields, auto-register entities in event bus, conv…
greysonlalonde 78fbe45
fix: TokenCalcHandler hashability, test MinimalExecutor as instance
greysonlalonde de9f121
fix: type remaining Any fields on CrewAgentExecutor
greysonlalonde 0b980db
fix: use spec= on test mocks for typed executor fields
greysonlalonde 3a08e95
fix: replace object.__new__ and MinimalExecutor subclass with proper …
greysonlalonde caaccd7
fix: validate entity_type tag before auto-registering in emit()
greysonlalonde 2e1525f
fix: mypy errors in streaming.py and core.py
greysonlalonde 1ed6646
refactor: move RuntimeState to runtime_state.py, type _runtime_state …
greysonlalonde de93007
refactor: move RuntimeState to state/, add async checkpoint with prov…
greysonlalonde c653d41
feat: add EventRecord to RuntimeState checkpoints
greysonlalonde 5ace0bf
fix: suppress duplicate lifecycle events on checkpoint resume
greysonlalonde 6dc9f46
feat: mid-task checkpoint resume and executor refactor
greysonlalonde 191053c
refactor: generic from_checkpoint with provider, full LLM serialization
greysonlalonde fb8b59d
fix: guard register_entity when RuntimeState is None
greysonlalonde f9d58d4
fix: add BaseAgentExecutor to model_rebuild chain
greysonlalonde fba5605
fix: use spec= on mocks for typed executor fields
greysonlalonde 7f24d74
fix: use real pydantic instances in executor tests, preserve cache ha…
greysonlalonde a3d25c6
fix: register RuntimeState in Flow.from_checkpoint
greysonlalonde 206259b
fix: add spec= to remaining mocks passed to pydantic models
greysonlalonde a94c2bf
fix: bypass pydantic validation for mocks in BaseAgentExecutor tests
greysonlalonde c1f9d92
fix: assign mocks post-init for remaining executor tests
greysonlalonde e72b08e
fix: resolve mypy errors from optional executor fields
greysonlalonde 81e51f0
Merge branch 'main' into chore/runtime-state-event-bus
greysonlalonde b882988
fix: checkpoint resume bugs and handler signature caching
greysonlalonde dc2904d
Merge branch 'main' into chore/runtime-state-event-bus
greysonlalonde ebb58a2
fix: bump uv-pre-commit to 0.11.3, distinguish checkpoint resume
greysonlalonde d769469
fix: restore checkpoint_train flag during checkpoint resume
greysonlalonde 88d9984
Merge branch 'chore/runtime-state-event-bus' of https://github.com/cr…
greysonlalonde c4bbb03
refactor: use lru_cache for handler param count
greysonlalonde 70fc701
fix: bump litellm to ~=1.83.0 and openai to ~=2.30.0
greysonlalonde fac186a
fix: handle unhashable partial handlers in param count cache
greysonlalonde 686cff6
fix: register entities in aemit like emit does
greysonlalonde 0079c70
ci: bump uv from 0.8.4 to 0.11.3 in all workflows
greysonlalonde da5a890
fix: share event metadata setup between emit and aemit
greysonlalonde 3f447f2
cleanup: remove redundant _registered_entity_ids class annotation
greysonlalonde 0c228b4
fix: seed _registered_entity_ids from restored RuntimeState
greysonlalonde e0fc321
fix: return 0 instead of None when checkpoint resumes from first task
greysonlalonde 6e7afb7
fix: avoid duplicating LLM hooks on checkpoint restore
greysonlalonde 055d146
fix: resolve mypy errors from openai 2.x type changes
greysonlalonde 5c243b7
fix: skip adding crew-owned agents as top-level RuntimeState entities
greysonlalonde b46e965
fix: return state messages by reference, not copy
greysonlalonde 167b609
fix: restore event scope stack from checkpoint event record
greysonlalonde e1bbab7
fix: eliminate PydanticSerializationUnexpectedValue warnings
greysonlalonde 97866c6
fix: pre-cache tiktoken encoding before VCR intercepts requests
greysonlalonde 470af2f
feat: add llm_type and executor_type discriminators for checkpoint fi…
greysonlalonde ef7654d
fix: add RWLock to EventRecord for thread-safe concurrent access
greysonlalonde 4e15d49
fix: wire executor back-references in BaseAgent.from_checkpoint
greysonlalonde 408cd04
cleanup: remove dead _entity_discriminator and CheckpointPayload
greysonlalonde 6aa6d27
Merge branch 'main' into chore/runtime-state-event-bus
greysonlalonde e5452d5
fix: use json mode in RuntimeState entity serialization
greysonlalonde b55e86a
fix: only restore crew-level scope on checkpoint resume
greysonlalonde 61422be
fix: populate task_id on task events and match in scope restore
greysonlalonde 9235edc
feat: preserve event subtypes through checkpoint serialization
greysonlalonde 57cd9cf
fix: aemit skips ContextVar scope mutations, only records events
greysonlalonde 594e1d4
fix: restore emission counter from checkpoint event record
greysonlalonde d2b092a
fix: clear error messages for missing llm_type/executor_type
greysonlalonde 54897bb
fix: restore type[BaseModel] | None on CrewStructuredTool.args_schema
greysonlalonde 07aa7c0
fix: skip create_agent_executor for resuming agents
greysonlalonde c9c3ac8
fix: serialize args_schema as JSON schema for checkpoint roundtrip
greysonlalonde 3ceeda3
Merge branch 'main' into chore/runtime-state-event-bus
greysonlalonde 14d5d5b
fix: accumulate all prior task outputs when skipping on checkpoint re…
greysonlalonde 7c3b987
fix: make BaseTool survive checkpoint JSON round-trip
greysonlalonde ac0a4b2
fix: make BaseTool survive checkpoint JSON round-trip
greysonlalonde a9cea10
Merge branch 'main' into chore/runtime-state-event-bus
greysonlalonde 3ced490
test: include required in expected init_params_schema keys
greysonlalonde 4db05c3
fix: restore Flow execution state from checkpoint fields
greysonlalonde 3be42f9
fix: restore Flow subclass on checkpoint resume
greysonlalonde File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.