Add session scoped runs and cancellation
This commit is contained in:
@@ -40,6 +40,8 @@ class ToolExecutionContext:
|
||||
scratchpad_directory: Path | None = None
|
||||
python_env_dir: Path | None = None
|
||||
extra_env: dict[str, str] = field(default_factory=dict)
|
||||
cancel_event: Any | None = None
|
||||
process_registry: Any | None = None
|
||||
tool_registry: dict[str, 'AgentTool'] | None = None
|
||||
search_runtime: 'SearchRuntime | None' = None
|
||||
account_runtime: 'AccountRuntime | None' = None
|
||||
@@ -127,6 +129,8 @@ def build_tool_context(
|
||||
scratchpad_directory: Path | None = None,
|
||||
python_env_dir: Path | None = None,
|
||||
extra_env: dict[str, str] | None = None,
|
||||
cancel_event: Any | None = None,
|
||||
process_registry: Any | None = None,
|
||||
tool_registry: dict[str, AgentTool] | None = None,
|
||||
search_runtime: 'SearchRuntime | None' = None,
|
||||
account_runtime: 'AccountRuntime | None' = None,
|
||||
@@ -156,6 +160,8 @@ def build_tool_context(
|
||||
else None
|
||||
),
|
||||
extra_env=dict(extra_env or {}),
|
||||
cancel_event=cancel_event,
|
||||
process_registry=process_registry,
|
||||
tool_registry=tool_registry,
|
||||
search_runtime=search_runtime,
|
||||
account_runtime=account_runtime,
|
||||
|
||||
Reference in New Issue
Block a user