Skip to content

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

Merge upstream/main into desktop-integration

Steven Enamakelb7264fd2839f
diff --cc app/src/components/flows/__tests__/FlowRunInspectorDrawer.test.tsx
index e42f9a0ae6,84c92f4f8f..f8c5689f3c
--- a/app/src/components/flows/__tests__/FlowRunInspectorDrawer.test.tsx
+++ b/app/src/components/flows/__tests__/FlowRunInspectorDrawer.test.tsx
@@@ -291,9 -291,9 +291,8 @@@ describe('FlowRunInspectorDrawer', () =
decide,
});
renderDrawer('thread-1', vi.fn());
- const card = within(screen.getByTestId('flow-run-pending-approval-req-a'));
--
- fireEvent.click(card.getByRole('button', { name: label }));
+ const card = screen.getByTestId('flow-run-pending-approval-req-a');
+ fireEvent.click(within(card).getByRole('button', { name: button }));
expect(decide).toHaveBeenCalledWith('req-a', decision);
});
diff --cc app/src/features/conversations/aui/SubagentTaskCard.test.tsx
index 161b3cfdbc,f4497efb9a..08faabf971
--- a/app/src/features/conversations/aui/SubagentTaskCard.test.tsx
+++ b/app/src/features/conversations/aui/SubagentTaskCard.test.tsx
@@@ -4,12 -4,12 +4,18 @@@ import { describe, expect, it, vi } fro
import type { SubagentActivity } from '../../../store/chatRuntimeSlice';
import { SubagentTaskCard } from './SubagentTaskCard';
+// The nested transcript's MessagePrimitive needs a ThreadPrimitive.Viewport.
+// These tests exercise the card and its reply actions without mounting a thread.
+vi.mock('../../../components/assistant-ui/elements/task-card.aui', () => ({
+ TaskTranscript: () => <div>Nested transcript</div>,
+}));
+
+ const append = vi.hoisted(() => vi.fn());
+ vi.mock('@assistant-ui/react', async importActual => ({
+ ...(await importActual<typeof import('@assistant-ui/react')>()),
+ useAui: () => ({ thread: { append } }),
+ }));
+
const activity: SubagentActivity = {
taskId: 'sub-1',
agentId: 'researcher',
diff --cc crates/openhuman-core/src/agent/tinyagents/middleware_tests.rs
index 71c8aa8aa4,737415a900..2126897d5d
--- a/crates/openhuman-core/src/agent/tinyagents/middleware_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/middleware_tests.rs
@@@ -478,10 -478,10 +478,12 @@@ fn embedder_hook_mw
})])
}
+#[path = "middleware_approval_guard_tests.rs"]
+mod approval_guard_tests;
#[path = "middleware_loop_guard_tests.rs"]
mod loop_guard_tests;
+ #[path = "middleware_prompt_cache_tests.rs"]
+ mod prompt_cache_tests;
#[path = "middleware_repeat_progress_tests.rs"]
mod repeat_progress_tests;
#[path = "middleware_tool_output_artifact_tests.rs"]
diff --cc crates/openhuman-core/src/tools/ops_tests_catalog_fixture_tests.rs
index c2950cecab,bc1b8d7bef..f84c3e51d3
--- a/crates/openhuman-core/src/tools/ops_tests_catalog_fixture_tests.rs
+++ b/crates/openhuman-core/src/tools/ops_tests_catalog_fixture_tests.rs
@@@ -124,7 -142,6 +142,7 @@@ fn tool_catalog_matches_frontend_fixtur
let path = fixture_path();
if std::env::var("UPDATE_TOOL_CATALOG").as_deref() == Ok("1") {
- assert!(PRODUCT_FEATURES_COMPILED, "{REGENERATE_COMMAND}");
++ assert!(full_product_features_enabled(), "{REGENERATE_COMMAND}");
let json = serde_json::to_string_pretty(&names).expect("serialize tool catalog");
if let Some(parent) = path.parent() {
std::fs::create_dir_all(parent).expect("create fixture directory");
@@@ -153,11 -170,18 +171,18 @@@
expected.sort();
expected.dedup();
+ // Contributor and partial-feature builds may lack product tools, but
+ // every registered name must still belong to the shipped catalog.
+ let full_product = full_product_features_enabled();
let added: Vec<&String> = names.iter().filter(|n| !expected.contains(n)).collect();
- let removed: Vec<&String> = expected.iter().filter(|n| !names.contains(n)).collect();
- if !added.is_empty() || (PRODUCT_FEATURES_COMPILED && !removed.is_empty()) {
+ let removed: Vec<&String> = if full_product {
+ expected.iter().filter(|n| !names.contains(n)).collect()
+ } else {
+ Vec::new()
+ };
+ if !added.is_empty() || !removed.is_empty() {
panic!(
- "core tool catalog drifted from the frontend fixture at {} (product features compiled: {PRODUCT_FEATURES_COMPILED}).\n\
- "core tool catalog drifted from the frontend fixture at {}.\n\
++ "core tool catalog drifted from the frontend fixture at {} (product features compiled: {full_product}).\n\
added: {added:?}\n\
removed: {removed:?}\n\n\
Regenerate with:\n {REGENERATE_COMMAND}",