Skip to content

Conversation

@tharindud
Copy link
Contributor

Signed-off-by: Tharindu Dissanayake [email protected]

Copilot AI review requested due to automatic review settings November 6, 2025 15:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR deprecates the Runtime.instance() method in favor of a new GlobalRuntime.instance() method, introducing better semantics for global runtime access. The deprecated package is added as a new dependency to manage the deprecation decorator.

  • Introduces GlobalRuntime class extending Runtime as the singleton runtime instance
  • Marks Runtime.instance() as deprecated with version 0.2.4
  • Updates all internal usages of Runtime.instance() to GlobalRuntime.instance()

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
ak-py/pyproject.toml Adds deprecated>=1.3.1 as a new dependency
ak-py/uv.lock Updates lock file with deprecated and wrapt package entries
ak-py/src/agentkernel/core/runtime.py Adds deprecation decorator to Runtime.instance(), delegates to GlobalRuntime.instance()
ak-py/src/agentkernel/core/init.py Exports GlobalRuntime alongside Runtime
ak-py/src/agentkernel/core/service.py Updates to use GlobalRuntime.instance() instead of Runtime.instance()
ak-py/src/agentkernel/api/agent.py Updates to use GlobalRuntime.instance() instead of Runtime.instance()
ak-py/src/agentkernel/api/rest_request_handler.py Updates docstring example to use GlobalRuntime.instance()
ak-py/src/agentkernel/mcp/akmcp.py Updates to use GlobalRuntime.instance() instead of Runtime.instance()
ak-py/src/agentkernel/a2a/a2a.py Updates to use GlobalRuntime.instance() instead of Runtime.instance()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tharindud tharindud marked this pull request as ready for review November 6, 2025 15:44
@tharindud tharindud marked this pull request as draft November 6, 2025 23:17
@tharindud tharindud marked this pull request as ready for review November 7, 2025 00:50
@tharindud tharindud merged commit 5dfe5e2 into develop Nov 7, 2025
12 checks passed
@tharindud tharindud deleted the feature/deprecate-runtime-instance branch November 7, 2025 00:51
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.

3 participants