Skip to content

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

test(ci): cover embed tool injection contract in boundary self-test

Steven Enamakel456c3c5ac7d3
diff --git a/scripts/ci/check-agent-runtime-boundary.mjs b/scripts/ci/check-agent-runtime-boundary.mjs
index 3820c0ebd5..7ffcb6176f 100644
--- a/scripts/ci/check-agent-runtime-boundary.mjs
+++ b/scripts/ci/check-agent-runtime-boundary.mjs
@@ -422,6 +422,24 @@ function assertSelfTests() {
throw new Error(
"agent-runtime boundary self-test: host tool policy export must stay exact",
);
+ const toolExport =
+ "pub use tinytools::{PermissionLevel, Tool, ToolExposure, ToolResult};";
+ if (
+ !isEmbedContractExport(embedPath, [{ text: toolExport }], 0) ||
+ isEmbedContractExport(
+ "crates/openhuman-core/src/tools/mod.rs",
+ [{ text: toolExport }],
+ 0,
+ ) ||
+ isEmbedContractExport(
+ embedPath,
+ [{ text: toolExport.replace("ToolResult", "ToolResult, ToolRegistry") }],
+ 0,
+ )
+ )
+ throw new Error(
+ "agent-runtime boundary self-test: embed tool injection contract must stay exact",
+ );
const sdkPath = "crates/openhuman-core/src/agent/tinyagents/budget.rs";
const sdkStatement =
"pub use tinyinference_llm::model::budget::{Budget, BudgetExceeded, BudgetSnapshot, CallBudget, Spend, SpendLimits};";