[PR #296] [MERGED] refact: introduce runtime plugin architecture and context separation #302

Closed
opened 2026-02-16 02:17:11 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/run-llama/workflows-py/pull/296
Author: @adrianlyjak
Created: 1/22/2026
Status: Merged
Merged: 1/31/2026
Merged by: @adrianlyjak

Base: mainHead: adrian/runtime-split


📝 Commits (3)

  • e68d7c8 refact: introduce runtime plugin architecture and context separation
  • 9a025f9 fixing precommit
  • 39f9be1 Error out for invalid send_event before workflow is started

📊 Changes

47 files changed (+3720 additions, -1214 deletions)

View changed files

.changeset/nine-hairs-relax.md (+10 -0)
📝 AGENTS.md (+10 -0)
📝 packages/llama-index-integration-tests/tests/test_context_store.py (+27 -14)
📝 packages/llama-index-integration-tests/tests/test_human_in_the_loop.py (+8 -5)
📝 packages/llama-index-utils-workflow/pyproject.toml (+1 -1)
📝 packages/llama-index-utils-workflow/src/llama_index/utils/workflow/__init__.py (+14 -11)
📝 packages/llama-index-workflows-server/tests/server/test_handler_serialization.py (+59 -5)
📝 packages/llama-index-workflows-server/tests/server/test_idle_release.py (+9 -5)
📝 packages/llama-index-workflows-server/tests/server/test_idle_release_live_http.py (+3 -1)
📝 packages/llama-index-workflows-server/tests/server/test_server_endpoints.py (+17 -6)
📝 packages/llama-index-workflows-server/tests/server/test_server_persistence.py (+4 -4)
📝 packages/llama-index-workflows/src/llama_agents/workflows/__init__.py (+1 -1)
📝 packages/llama-index-workflows/src/workflows/context/context.py (+234 -217)
📝 packages/llama-index-workflows/src/workflows/context/context_types.py (+5 -0)
packages/llama-index-workflows/src/workflows/context/external_context.py (+186 -0)
packages/llama-index-workflows/src/workflows/context/internal_context.py (+187 -0)
packages/llama-index-workflows/src/workflows/context/pre_context.py (+115 -0)
📝 packages/llama-index-workflows/src/workflows/context/state_store.py (+102 -3)
📝 packages/llama-index-workflows/src/workflows/errors.py (+10 -0)
📝 packages/llama-index-workflows/src/workflows/handler.py (+161 -51)

...and 27 more files

📄 Description

  • Add Runtime abstract base class with BasicRuntime as default implementation
  • Split context into external, internal, and pre-context modules
  • Replace workflow_registry with workflow_tracker for workflow lifecycle management
  • Remove broker.py in favor of runtime-managed execution
  • Add plugins package with get_current_runtime() for context-aware runtime access
  • Update handler and workflow to use new runtime interfaces

Open with Devin

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/run-llama/workflows-py/pull/296 **Author:** [@adrianlyjak](https://github.com/adrianlyjak) **Created:** 1/22/2026 **Status:** ✅ Merged **Merged:** 1/31/2026 **Merged by:** [@adrianlyjak](https://github.com/adrianlyjak) **Base:** `main` ← **Head:** `adrian/runtime-split` --- ### 📝 Commits (3) - [`e68d7c8`](https://github.com/run-llama/workflows-py/commit/e68d7c8901e2e561fa3b0e45d5199bd01f85b5f0) refact: introduce runtime plugin architecture and context separation - [`9a025f9`](https://github.com/run-llama/workflows-py/commit/9a025f9c63a92745a5258119180358fa92703d68) fixing precommit - [`39f9be1`](https://github.com/run-llama/workflows-py/commit/39f9be186c570b3b71ad5e4b0c2542af0242d552) Error out for invalid send_event before workflow is started ### 📊 Changes **47 files changed** (+3720 additions, -1214 deletions) <details> <summary>View changed files</summary> ➕ `.changeset/nine-hairs-relax.md` (+10 -0) 📝 `AGENTS.md` (+10 -0) 📝 `packages/llama-index-integration-tests/tests/test_context_store.py` (+27 -14) 📝 `packages/llama-index-integration-tests/tests/test_human_in_the_loop.py` (+8 -5) 📝 `packages/llama-index-utils-workflow/pyproject.toml` (+1 -1) 📝 `packages/llama-index-utils-workflow/src/llama_index/utils/workflow/__init__.py` (+14 -11) 📝 `packages/llama-index-workflows-server/tests/server/test_handler_serialization.py` (+59 -5) 📝 `packages/llama-index-workflows-server/tests/server/test_idle_release.py` (+9 -5) 📝 `packages/llama-index-workflows-server/tests/server/test_idle_release_live_http.py` (+3 -1) 📝 `packages/llama-index-workflows-server/tests/server/test_server_endpoints.py` (+17 -6) 📝 `packages/llama-index-workflows-server/tests/server/test_server_persistence.py` (+4 -4) 📝 `packages/llama-index-workflows/src/llama_agents/workflows/__init__.py` (+1 -1) 📝 `packages/llama-index-workflows/src/workflows/context/context.py` (+234 -217) 📝 `packages/llama-index-workflows/src/workflows/context/context_types.py` (+5 -0) ➕ `packages/llama-index-workflows/src/workflows/context/external_context.py` (+186 -0) ➕ `packages/llama-index-workflows/src/workflows/context/internal_context.py` (+187 -0) ➕ `packages/llama-index-workflows/src/workflows/context/pre_context.py` (+115 -0) 📝 `packages/llama-index-workflows/src/workflows/context/state_store.py` (+102 -3) 📝 `packages/llama-index-workflows/src/workflows/errors.py` (+10 -0) 📝 `packages/llama-index-workflows/src/workflows/handler.py` (+161 -51) _...and 27 more files_ </details> ### 📄 Description - Add Runtime abstract base class with BasicRuntime as default implementation - Split context into external, internal, and pre-context modules - Replace workflow_registry with workflow_tracker for workflow lifecycle management - Remove broker.py in favor of runtime-managed execution - Add plugins package with get_current_runtime() for context-aware runtime access - Update handler and workflow to use new runtime interfaces <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/run-llama/workflows-py/pull/296"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 02:17:11 -05:00
yindo closed this issue 2026-02-16 02:17:11 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: run-llama/workflows-py#302