Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(security): add tool_call_id column to pending_approvals table

Steven Enamakel1d1a6b4bfa87
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context/scout_run.rs b/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context/scout_run.rs
index 0ae36ddcda..9bad8ce5b3 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context/scout_run.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/agent_prepare_context/scout_run.rs
@@ -135,6 +135,7 @@ pub async fn run_context_scout_with_catalog(
None,
crate::agent::tinyagents::host::OpenHumanRunContext::new(),
None,
+ None,
)
.await
}
@@ -224,6 +225,7 @@ pub(super) async fn run_context_scout_with_catalog_and_workspace(
crate::agent::tinyagents::host::OpenHumanRunContext,
>,
>,
+ parent_call_id: Option<String>,
) -> anyhow::Result<ToolResult> {
let question = question.trim().to_string();
let focus = focus.map(|s| s.to_string());
diff --git a/crates/openhuman-core/src/security/approval/store.rs b/crates/openhuman-core/src/security/approval/store.rs
index 9e386ab0d8..0e581dee48 100644
--- a/crates/openhuman-core/src/security/approval/store.rs
+++ b/crates/openhuman-core/src/security/approval/store.rs
@@ -115,6 +115,10 @@ fn migrate_columns(conn: &Connection) -> Result<()> {
"source_context",
"ALTER TABLE pending_approvals ADD COLUMN source_context TEXT",
),
+ (
+ "tool_call_id",
+ "ALTER TABLE pending_approvals ADD COLUMN tool_call_id TEXT",
+ ),
] {
if !have.contains(col) {
conn.execute(ddl, params![])
@@ -217,8 +221,8 @@ pub fn insert_pending(config: &Config, pending: &PendingApproval, session_id: &s
conn.execute(
"INSERT INTO pending_approvals
(request_id, tool_name, action_summary, args_redacted,
- session_id, created_at, expires_at, source_context)
- VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8)",
+ session_id, created_at, expires_at, source_context, tool_call_id)
+ VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9)",
params![
pending.request_id,
pending.tool_name,
@@ -228,6 +232,7 @@ pub fn insert_pending(config: &Config, pending: &PendingApproval, session_id: &s
created,
expires,
source_context,
+ pending.tool_call_id,
],
)
.context("[approval::store] insert pending row")?;