mirror of
https://github.com/openai/codex.git
synced 2026-11-22 07:13:50 +00:00
Use Arc-based ToolCtx in tool runtimes (#12583)
## Why Tool handlers and runtimes needed to pass the same turn/session context for shell and non-shell workflows without duplicative ownership churn. Using shared pointers avoids temporary lifetimes and keeps existing behavior unchanged while simplifying call sites. ## What changed - Converted `ToolCtx` to store shared context handles (`Arc`-based), including updates across shell, apply-patch, and unified-exec paths. - Updated orchestrator/runtime call sites to consume the shared context consistently and remove brittle move/borrow patterns. - Kept behavior unchanged while preparing the type surface for the new shell escalation integration in the next stack commit. ## Verification - Validated this commit stack point with `just clippy` and confirmed workspace compiles cleanly in this stack state. [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/openai/codex/pull/12583). * #12584 * __->__ #12583 * #12556
This commit is contained in:
1 parent
fec517cd38
commit
7f75e74201
9 files changed
+60
-49
No files matched your search
@@ -31,6 +31,7 @@ use async_trait::async_trait;
|
|||||||
use codex_apply_patch::ApplyPatchAction;
|
use codex_apply_patch::ApplyPatchAction;
|
||||||
use codex_apply_patch::ApplyPatchFileChange;
|
use codex_apply_patch::ApplyPatchFileChange;
|
||||||
use codex_utils_absolute_path::AbsolutePathBuf;
|
use codex_utils_absolute_path::AbsolutePathBuf;
|
||||||
|
use std::sync::Arc;
|
||||||
|
|
||||||
pub struct ApplyPatchHandler;
|
pub struct ApplyPatchHandler;
|
||||||
|
|
||||||
@@ -139,8 +140,8 @@ impl ToolHandler for ApplyPatchHandler {
|
|||||||
let mut orchestrator = ToolOrchestrator::new();
|
let mut orchestrator = ToolOrchestrator::new();
|
||||||
let mut runtime = ApplyPatchRuntime::new();
|
let mut runtime = ApplyPatchRuntime::new();
|
||||||
let tool_ctx = ToolCtx {
|
let tool_ctx = ToolCtx {
|
||||||
session: session.as_ref(),
|
session: session.clone(),
|
||||||
turn: turn.as_ref(),
|
turn: turn.clone(),
|
||||||
call_id: call_id.clone(),
|
call_id: call_id.clone(),
|
||||||
tool_name: tool_name.to_string(),
|
tool_name: tool_name.to_string(),
|
||||||
};
|
};
|
||||||
@@ -149,7 +150,7 @@ impl ToolHandler for ApplyPatchHandler {
|
|||||||
&mut runtime,
|
&mut runtime,
|
||||||
&req,
|
&req,
|
||||||
&tool_ctx,
|
&tool_ctx,
|
||||||
&turn,
|
turn.as_ref(),
|
||||||
turn.approval_policy.value(),
|
turn.approval_policy.value(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
@@ -193,8 +194,8 @@ pub(crate) async fn intercept_apply_patch(
|
|||||||
command: &[String],
|
command: &[String],
|
||||||
cwd: &Path,
|
cwd: &Path,
|
||||||
timeout_ms: Option<u64>,
|
timeout_ms: Option<u64>,
|
||||||
session: &Session,
|
session: Arc<Session>,
|
||||||
turn: &TurnContext,
|
turn: Arc<TurnContext>,
|
||||||
tracker: Option<&SharedTurnDiffTracker>,
|
tracker: Option<&SharedTurnDiffTracker>,
|
||||||
call_id: &str,
|
call_id: &str,
|
||||||
tool_name: &str,
|
tool_name: &str,
|
||||||
@@ -203,11 +204,13 @@ pub(crate) async fn intercept_apply_patch(
|
|||||||
codex_apply_patch::MaybeApplyPatchVerified::Body(changes) => {
|
codex_apply_patch::MaybeApplyPatchVerified::Body(changes) => {
|
||||||
session
|
session
|
||||||
.record_model_warning(
|
.record_model_warning(
|
||||||
format!("apply_patch was requested via {tool_name}. Use the apply_patch tool instead of exec_command."),
|
format!(
|
||||||
turn,
|
"apply_patch was requested via {tool_name}. Use the apply_patch tool instead of exec_command."
|
||||||
|
),
|
||||||
|
turn.as_ref(),
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
match apply_patch::apply_patch(turn, changes).await {
|
match apply_patch::apply_patch(turn.as_ref(), changes).await {
|
||||||
InternalApplyPatchInvocation::Output(item) => {
|
InternalApplyPatchInvocation::Output(item) => {
|
||||||
let content = item?;
|
let content = item?;
|
||||||
Ok(Some(ToolOutput::Function {
|
Ok(Some(ToolOutput::Function {
|
||||||
@@ -219,8 +222,12 @@ pub(crate) async fn intercept_apply_patch(
|
|||||||
let changes = convert_apply_patch_to_protocol(&apply.action);
|
let changes = convert_apply_patch_to_protocol(&apply.action);
|
||||||
let approval_keys = file_paths_for_action(&apply.action);
|
let approval_keys = file_paths_for_action(&apply.action);
|
||||||
let emitter = ToolEmitter::apply_patch(changes.clone(), apply.auto_approved);
|
let emitter = ToolEmitter::apply_patch(changes.clone(), apply.auto_approved);
|
||||||
let event_ctx =
|
let event_ctx = ToolEventCtx::new(
|
||||||
ToolEventCtx::new(session, turn, call_id, tracker.as_ref().copied());
|
session.as_ref(),
|
||||||
|
turn.as_ref(),
|
||||||
|
call_id,
|
||||||
|
tracker.as_ref().copied(),
|
||||||
|
);
|
||||||
emitter.begin(event_ctx).await;
|
emitter.begin(event_ctx).await;
|
||||||
|
|
||||||
let req = ApplyPatchRequest {
|
let req = ApplyPatchRequest {
|
||||||
@@ -235,8 +242,8 @@ pub(crate) async fn intercept_apply_patch(
|
|||||||
let mut orchestrator = ToolOrchestrator::new();
|
let mut orchestrator = ToolOrchestrator::new();
|
||||||
let mut runtime = ApplyPatchRuntime::new();
|
let mut runtime = ApplyPatchRuntime::new();
|
||||||
let tool_ctx = ToolCtx {
|
let tool_ctx = ToolCtx {
|
||||||
session,
|
session: session.clone(),
|
||||||
turn,
|
turn: turn.clone(),
|
||||||
call_id: call_id.to_string(),
|
call_id: call_id.to_string(),
|
||||||
tool_name: tool_name.to_string(),
|
tool_name: tool_name.to_string(),
|
||||||
};
|
};
|
||||||
@@ -245,13 +252,17 @@ pub(crate) async fn intercept_apply_patch(
|
|||||||
&mut runtime,
|
&mut runtime,
|
||||||
&req,
|
&req,
|
||||||
&tool_ctx,
|
&tool_ctx,
|
||||||
turn,
|
turn.as_ref(),
|
||||||
turn.approval_policy.value(),
|
turn.approval_policy.value(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
.map(|result| result.output);
|
.map(|result| result.output);
|
||||||
let event_ctx =
|
let event_ctx = ToolEventCtx::new(
|
||||||
ToolEventCtx::new(session, turn, call_id, tracker.as_ref().copied());
|
session.as_ref(),
|
||||||
|
turn.as_ref(),
|
||||||
|
call_id,
|
||||||
|
tracker.as_ref().copied(),
|
||||||
|
);
|
||||||
let content = emitter.finish(event_ctx, out).await?;
|
let content = emitter.finish(event_ctx, out).await?;
|
||||||
Ok(Some(ToolOutput::Function {
|
Ok(Some(ToolOutput::Function {
|
||||||
body: FunctionCallOutputBody::Text(content),
|
body: FunctionCallOutputBody::Text(content),
|
||||||
|
|||||||
@@ -296,8 +296,8 @@ impl ShellHandler {
|
|||||||
&exec_params.command,
|
&exec_params.command,
|
||||||
&exec_params.cwd,
|
&exec_params.cwd,
|
||||||
exec_params.expiration.timeout_ms(),
|
exec_params.expiration.timeout_ms(),
|
||||||
session.as_ref(),
|
session.clone(),
|
||||||
turn.as_ref(),
|
turn.clone(),
|
||||||
Some(&tracker),
|
Some(&tracker),
|
||||||
&call_id,
|
&call_id,
|
||||||
tool_name.as_str(),
|
tool_name.as_str(),
|
||||||
@@ -343,8 +343,8 @@ impl ShellHandler {
|
|||||||
let mut orchestrator = ToolOrchestrator::new();
|
let mut orchestrator = ToolOrchestrator::new();
|
||||||
let mut runtime = ShellRuntime::new();
|
let mut runtime = ShellRuntime::new();
|
||||||
let tool_ctx = ToolCtx {
|
let tool_ctx = ToolCtx {
|
||||||
session: session.as_ref(),
|
session: session.clone(),
|
||||||
turn: turn.as_ref(),
|
turn: turn.clone(),
|
||||||
call_id: call_id.clone(),
|
call_id: call_id.clone(),
|
||||||
tool_name,
|
tool_name,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -172,8 +172,8 @@ impl ToolHandler for UnifiedExecHandler {
|
|||||||
&command,
|
&command,
|
||||||
&cwd,
|
&cwd,
|
||||||
Some(yield_time_ms),
|
Some(yield_time_ms),
|
||||||
context.session.as_ref(),
|
context.session.clone(),
|
||||||
context.turn.as_ref(),
|
context.turn.clone(),
|
||||||
Some(&tracker),
|
Some(&tracker),
|
||||||
&context.call_id,
|
&context.call_id,
|
||||||
tool_name.as_str(),
|
tool_name.as_str(),
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ impl ToolOrchestrator {
|
|||||||
async fn run_attempt<Rq, Out, T>(
|
async fn run_attempt<Rq, Out, T>(
|
||||||
tool: &mut T,
|
tool: &mut T,
|
||||||
req: &Rq,
|
req: &Rq,
|
||||||
tool_ctx: &ToolCtx<'_>,
|
tool_ctx: &ToolCtx,
|
||||||
attempt: &SandboxAttempt<'_>,
|
attempt: &SandboxAttempt<'_>,
|
||||||
has_managed_network_requirements: bool,
|
has_managed_network_requirements: bool,
|
||||||
) -> (Result<Out, ToolError>, Option<DeferredNetworkApproval>)
|
) -> (Result<Out, ToolError>, Option<DeferredNetworkApproval>)
|
||||||
@@ -56,7 +56,7 @@ impl ToolOrchestrator {
|
|||||||
T: ToolRuntime<Rq, Out>,
|
T: ToolRuntime<Rq, Out>,
|
||||||
{
|
{
|
||||||
let network_approval = begin_network_approval(
|
let network_approval = begin_network_approval(
|
||||||
tool_ctx.session,
|
&tool_ctx.session,
|
||||||
&tool_ctx.turn.sub_id,
|
&tool_ctx.turn.sub_id,
|
||||||
&tool_ctx.call_id,
|
&tool_ctx.call_id,
|
||||||
has_managed_network_requirements,
|
has_managed_network_requirements,
|
||||||
@@ -65,8 +65,8 @@ impl ToolOrchestrator {
|
|||||||
.await;
|
.await;
|
||||||
|
|
||||||
let attempt_tool_ctx = ToolCtx {
|
let attempt_tool_ctx = ToolCtx {
|
||||||
session: tool_ctx.session,
|
session: tool_ctx.session.clone(),
|
||||||
turn: tool_ctx.turn,
|
turn: tool_ctx.turn.clone(),
|
||||||
call_id: tool_ctx.call_id.clone(),
|
call_id: tool_ctx.call_id.clone(),
|
||||||
tool_name: tool_ctx.tool_name.clone(),
|
tool_name: tool_ctx.tool_name.clone(),
|
||||||
};
|
};
|
||||||
@@ -79,7 +79,7 @@ impl ToolOrchestrator {
|
|||||||
match network_approval.mode() {
|
match network_approval.mode() {
|
||||||
NetworkApprovalMode::Immediate => {
|
NetworkApprovalMode::Immediate => {
|
||||||
let finalize_result =
|
let finalize_result =
|
||||||
finish_immediate_network_approval(tool_ctx.session, network_approval).await;
|
finish_immediate_network_approval(&tool_ctx.session, network_approval).await;
|
||||||
if let Err(err) = finalize_result {
|
if let Err(err) = finalize_result {
|
||||||
return (Err(err), None);
|
return (Err(err), None);
|
||||||
}
|
}
|
||||||
@@ -88,7 +88,7 @@ impl ToolOrchestrator {
|
|||||||
NetworkApprovalMode::Deferred => {
|
NetworkApprovalMode::Deferred => {
|
||||||
let deferred = network_approval.into_deferred();
|
let deferred = network_approval.into_deferred();
|
||||||
if run_result.is_err() {
|
if run_result.is_err() {
|
||||||
finish_deferred_network_approval(tool_ctx.session, deferred).await;
|
finish_deferred_network_approval(&tool_ctx.session, deferred).await;
|
||||||
return (run_result, None);
|
return (run_result, None);
|
||||||
}
|
}
|
||||||
(run_result, deferred)
|
(run_result, deferred)
|
||||||
@@ -100,7 +100,7 @@ impl ToolOrchestrator {
|
|||||||
&mut self,
|
&mut self,
|
||||||
tool: &mut T,
|
tool: &mut T,
|
||||||
req: &Rq,
|
req: &Rq,
|
||||||
tool_ctx: &ToolCtx<'_>,
|
tool_ctx: &ToolCtx,
|
||||||
turn_ctx: &crate::codex::TurnContext,
|
turn_ctx: &crate::codex::TurnContext,
|
||||||
approval_policy: AskForApproval,
|
approval_policy: AskForApproval,
|
||||||
) -> Result<OrchestratorRunResult<Out>, ToolError>
|
) -> Result<OrchestratorRunResult<Out>, ToolError>
|
||||||
@@ -128,7 +128,7 @@ impl ToolOrchestrator {
|
|||||||
}
|
}
|
||||||
ExecApprovalRequirement::NeedsApproval { reason, .. } => {
|
ExecApprovalRequirement::NeedsApproval { reason, .. } => {
|
||||||
let approval_ctx = ApprovalCtx {
|
let approval_ctx = ApprovalCtx {
|
||||||
session: tool_ctx.session,
|
session: &tool_ctx.session,
|
||||||
turn: turn_ctx,
|
turn: turn_ctx,
|
||||||
call_id: &tool_ctx.call_id,
|
call_id: &tool_ctx.call_id,
|
||||||
retry_reason: reason,
|
retry_reason: reason,
|
||||||
@@ -256,7 +256,7 @@ impl ToolOrchestrator {
|
|||||||
&& network_approval_context.is_none();
|
&& network_approval_context.is_none();
|
||||||
if !bypass_retry_approval {
|
if !bypass_retry_approval {
|
||||||
let approval_ctx = ApprovalCtx {
|
let approval_ctx = ApprovalCtx {
|
||||||
session: tool_ctx.session,
|
session: &tool_ctx.session,
|
||||||
turn: turn_ctx,
|
turn: turn_ctx,
|
||||||
call_id: &tool_ctx.call_id,
|
call_id: &tool_ctx.call_id,
|
||||||
retry_reason: Some(retry_reason),
|
retry_reason: Some(retry_reason),
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ impl ApplyPatchRuntime {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fn stdout_stream(ctx: &ToolCtx<'_>) -> Option<crate::exec::StdoutStream> {
|
fn stdout_stream(ctx: &ToolCtx) -> Option<crate::exec::StdoutStream> {
|
||||||
Some(crate::exec::StdoutStream {
|
Some(crate::exec::StdoutStream {
|
||||||
sub_id: ctx.turn.sub_id.clone(),
|
sub_id: ctx.turn.sub_id.clone(),
|
||||||
call_id: ctx.call_id.clone(),
|
call_id: ctx.call_id.clone(),
|
||||||
@@ -156,7 +156,7 @@ impl ToolRuntime<ApplyPatchRequest, ExecToolCallOutput> for ApplyPatchRuntime {
|
|||||||
&mut self,
|
&mut self,
|
||||||
req: &ApplyPatchRequest,
|
req: &ApplyPatchRequest,
|
||||||
attempt: &SandboxAttempt<'_>,
|
attempt: &SandboxAttempt<'_>,
|
||||||
ctx: &ToolCtx<'_>,
|
ctx: &ToolCtx,
|
||||||
) -> Result<ExecToolCallOutput, ToolError> {
|
) -> Result<ExecToolCallOutput, ToolError> {
|
||||||
let spec = Self::build_command_spec(req)?;
|
let spec = Self::build_command_spec(req)?;
|
||||||
let env = attempt
|
let env = attempt
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ impl ShellRuntime {
|
|||||||
Self
|
Self
|
||||||
}
|
}
|
||||||
|
|
||||||
fn stdout_stream(ctx: &ToolCtx<'_>) -> Option<crate::exec::StdoutStream> {
|
fn stdout_stream(ctx: &ToolCtx) -> Option<crate::exec::StdoutStream> {
|
||||||
Some(crate::exec::StdoutStream {
|
Some(crate::exec::StdoutStream {
|
||||||
sub_id: ctx.turn.sub_id.clone(),
|
sub_id: ctx.turn.sub_id.clone(),
|
||||||
call_id: ctx.call_id.clone(),
|
call_id: ctx.call_id.clone(),
|
||||||
@@ -150,7 +150,7 @@ impl ToolRuntime<ShellRequest, ExecToolCallOutput> for ShellRuntime {
|
|||||||
fn network_approval_spec(
|
fn network_approval_spec(
|
||||||
&self,
|
&self,
|
||||||
req: &ShellRequest,
|
req: &ShellRequest,
|
||||||
_ctx: &ToolCtx<'_>,
|
_ctx: &ToolCtx,
|
||||||
) -> Option<NetworkApprovalSpec> {
|
) -> Option<NetworkApprovalSpec> {
|
||||||
req.network.as_ref()?;
|
req.network.as_ref()?;
|
||||||
Some(NetworkApprovalSpec {
|
Some(NetworkApprovalSpec {
|
||||||
@@ -163,7 +163,7 @@ impl ToolRuntime<ShellRequest, ExecToolCallOutput> for ShellRuntime {
|
|||||||
&mut self,
|
&mut self,
|
||||||
req: &ShellRequest,
|
req: &ShellRequest,
|
||||||
attempt: &SandboxAttempt<'_>,
|
attempt: &SandboxAttempt<'_>,
|
||||||
ctx: &ToolCtx<'_>,
|
ctx: &ToolCtx,
|
||||||
) -> Result<ExecToolCallOutput, ToolError> {
|
) -> Result<ExecToolCallOutput, ToolError> {
|
||||||
let base_command = &req.command;
|
let base_command = &req.command;
|
||||||
let session_shell = ctx.session.user_shell();
|
let session_shell = ctx.session.user_shell();
|
||||||
@@ -207,7 +207,7 @@ impl ToolRuntime<ShellRequest, ExecToolCallOutput> for ShellRuntime {
|
|||||||
.session
|
.session
|
||||||
.services
|
.services
|
||||||
.zsh_exec_bridge
|
.zsh_exec_bridge
|
||||||
.execute_shell_request(&env, ctx.session, ctx.turn, &ctx.call_id)
|
.execute_shell_request(&env, &ctx.session, &ctx.turn, &ctx.call_id)
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ impl<'a> ToolRuntime<UnifiedExecRequest, UnifiedExecProcess> for UnifiedExecRunt
|
|||||||
fn network_approval_spec(
|
fn network_approval_spec(
|
||||||
&self,
|
&self,
|
||||||
req: &UnifiedExecRequest,
|
req: &UnifiedExecRequest,
|
||||||
_ctx: &ToolCtx<'_>,
|
_ctx: &ToolCtx,
|
||||||
) -> Option<NetworkApprovalSpec> {
|
) -> Option<NetworkApprovalSpec> {
|
||||||
req.network.as_ref()?;
|
req.network.as_ref()?;
|
||||||
Some(NetworkApprovalSpec {
|
Some(NetworkApprovalSpec {
|
||||||
@@ -166,7 +166,7 @@ impl<'a> ToolRuntime<UnifiedExecRequest, UnifiedExecProcess> for UnifiedExecRunt
|
|||||||
&mut self,
|
&mut self,
|
||||||
req: &UnifiedExecRequest,
|
req: &UnifiedExecRequest,
|
||||||
attempt: &SandboxAttempt<'_>,
|
attempt: &SandboxAttempt<'_>,
|
||||||
ctx: &ToolCtx<'_>,
|
ctx: &ToolCtx,
|
||||||
) -> Result<UnifiedExecProcess, ToolError> {
|
) -> Result<UnifiedExecProcess, ToolError> {
|
||||||
let base_command = &req.command;
|
let base_command = &req.command;
|
||||||
let session_shell = ctx.session.user_shell();
|
let session_shell = ctx.session.user_shell();
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ use codex_protocol::approvals::ExecPolicyAmendment;
|
|||||||
use codex_protocol::approvals::NetworkApprovalContext;
|
use codex_protocol::approvals::NetworkApprovalContext;
|
||||||
use codex_protocol::protocol::AskForApproval;
|
use codex_protocol::protocol::AskForApproval;
|
||||||
use codex_protocol::protocol::ReviewDecision;
|
use codex_protocol::protocol::ReviewDecision;
|
||||||
|
use futures::Future;
|
||||||
|
use futures::future::BoxFuture;
|
||||||
|
use serde::Serialize;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
|
use std::sync::Arc;
|
||||||
use futures::Future;
|
|
||||||
use futures::future::BoxFuture;
|
|
||||||
use serde::Serialize;
|
|
||||||
|
|
||||||
#[derive(Clone, Default, Debug)]
|
#[derive(Clone, Default, Debug)]
|
||||||
pub(crate) struct ApprovalStore {
|
pub(crate) struct ApprovalStore {
|
||||||
@@ -267,9 +267,9 @@ pub(crate) trait Sandboxable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) struct ToolCtx<'a> {
|
pub(crate) struct ToolCtx {
|
||||||
pub session: &'a Session,
|
pub session: Arc<Session>,
|
||||||
pub turn: &'a TurnContext,
|
pub turn: Arc<TurnContext>,
|
||||||
pub call_id: String,
|
pub call_id: String,
|
||||||
pub tool_name: String,
|
pub tool_name: String,
|
||||||
}
|
}
|
||||||
@@ -281,7 +281,7 @@ pub(crate) enum ToolError {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) trait ToolRuntime<Req, Out>: Approvable<Req> + Sandboxable {
|
pub(crate) trait ToolRuntime<Req, Out>: Approvable<Req> + Sandboxable {
|
||||||
fn network_approval_spec(&self, _req: &Req, _ctx: &ToolCtx<'_>) -> Option<NetworkApprovalSpec> {
|
fn network_approval_spec(&self, _req: &Req, _ctx: &ToolCtx) -> Option<NetworkApprovalSpec> {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -594,8 +594,8 @@ impl UnifiedExecProcessManager {
|
|||||||
exec_approval_requirement,
|
exec_approval_requirement,
|
||||||
};
|
};
|
||||||
let tool_ctx = ToolCtx {
|
let tool_ctx = ToolCtx {
|
||||||
session: context.session.as_ref(),
|
session: context.session.clone(),
|
||||||
turn: context.turn.as_ref(),
|
turn: context.turn.clone(),
|
||||||
call_id: context.call_id.clone(),
|
call_id: context.call_id.clone(),
|
||||||
tool_name: "exec_command".to_string(),
|
tool_name: "exec_command".to_string(),
|
||||||
};
|
};
|
||||||
@@ -604,7 +604,7 @@ impl UnifiedExecProcessManager {
|
|||||||
&mut runtime,
|
&mut runtime,
|
||||||
&req,
|
&req,
|
||||||
&tool_ctx,
|
&tool_ctx,
|
||||||
context.turn.as_ref(),
|
&context.turn,
|
||||||
context.turn.approval_policy.value(),
|
context.turn.approval_policy.value(),
|
||||||
)
|
)
|
||||||
.await
|
.await
|
||||||
|
|||||||
Reference in new issue
Block a user