The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
Merge branch 'main' into tinybox-gateways
Steven Enamakel0c0279e0ce75
diff --cc app/src-tauri/src/core_rpc.rsindex cca20fc556,f810c48730..e15b8a39a6--- a/app/src-tauri/src/core_rpc.rs+++ b/app/src-tauri/src/core_rpc.rs@@@ -152,61 -131,8 +152,9 @@@ pub(crate) async fn post_json_rpcOk(RelayHttpResponse { status, body: text })}- /// Invoke a core JSON-RPC method against the embedded local core, returning the- /// inner result value. Handles building the JSON-RPC envelope, applying the- /// per-launch bearer, and unwrapping the `{ "result": <v>, "logs": [...] }`- /// `RpcOutcome` envelope some core handlers emit.- pub(crate) async fn call_core_rpc(- method: &str,- params: serde_json::Value,- ) -> Result<serde_json::Value, String> {- let url = core_rpc_url_value();- let token = crate::core_process::current_rpc_token();- let envelope = serde_json::json!({- "jsonrpc": "2.0",- "id": 1,- "method": method,- "params": params,- });- let resp = post_json_rpc(&url, token.as_deref(), envelope.to_string()).await?;- if !(200..300).contains(&resp.status) {- return Err(format!("core rpc {method} returned status {}", resp.status));- }- let parsed: serde_json::Value = serde_json::from_str(&resp.body)- .map_err(|e| format!("core rpc {method}: invalid JSON response: {e}"))?;- if let Some(err) = parsed.get("error") {- if !err.is_null() {- return Err(format!("core rpc {method} error: {err}"));- }- }- let result = parsed- .get("result")- .cloned()- .ok_or_else(|| format!("core rpc {method}: response has no result field"))?;- Ok(unwrap_rpc_outcome(result))- }-- /// Unwrap the `{ "result": <value>, "logs": [...] }` `RpcOutcome` envelope that- /// logged core handlers wrap their payload in; passes bare values through- /// unchanged.- fn unwrap_rpc_outcome(value: serde_json::Value) -> serde_json::Value {- if let Some(obj) = value.as_object() {- if obj.len() == 2- && obj.contains_key("result")- && obj.get("logs").map(|l| l.is_array()).unwrap_or(false)- {- return obj- .get("result")- .cloned()- .unwrap_or(serde_json::Value::Null);- }- }- value- }-#[cfg(test)]mod tests {+ use super::redact_url_for_log;use super::relay_bearer_header;#[test]diff --cc docs/TEST-COVERAGE-MATRIX.mdindex d4d6c39dac,02bd7f099f..88d9a1db39--- a/docs/TEST-COVERAGE-MATRIX.md+++ b/docs/TEST-COVERAGE-MATRIX.md@@@ -178,14 -178,14 +178,14 @@@ Canonical mapping of every product feat### 4.2 Messaging-| ID | Feature | Layer | Test path(s) | Status | Notes |-| ----- | ------------------------------------------------------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |-| 4.2.1 | User Message Handling | WD+RI | `conversations-web-channel-flow.spec.ts`, `tests/json_rpc_e2e.rs` | ✅ | |-| 4.2.2 | AI Response Generation | WD | `agent-review.spec.ts` | ✅ | Mock LLM |-| 4.2.3 | Streaming Responses | RI | `tests/json_rpc_e2e.rs`, `tests/agent_harness_e2e.rs` | ✅ | `tests/agent_harness_e2e.rs` adds provider-level SSE tool-arg accumulation (chunked args reassembled + parsed) and engine-level delta forwarding (#3471) |-| 4.2.4 | Parallel inference (cross-thread + within-thread forked turns) | RU+VU | `src/openhuman/web_chat/web_tests.rs`, `app/src/store/__tests__/chatRuntimeSlice.test.ts`, `app/src/providers/__tests__/ChatRuntimeProvider.test.tsx` | 🟡 | Concurrent same-/cross-thread dispatch, cooperative `CancellationToken` teardown, and parallel-lane stream routing covered; dedicated WD E2E is a follow-up |-| 4.2.5 | Per-thread todo list (plan strip above composer) | RU+VU+WD | `src/openhuman/agent/tools/todo.rs`, `app/src/pages/conversations/components/ThreadTodoStrip.test.tsx`, `app/test/e2e/specs/chat-thread-todo-strip.spec.ts` | ✅ | Read-only thread-scoped todo strip fed by `task_board_updated`; agent `todo` tool guidance + thread binding; E2E drives a `todo` tool call and asserts the card renders |+| ID | Feature | Layer | Test path(s) | Status | Notes |+| ----- | ------------------------------------------------------------------ | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+| 4.2.1 | User Message Handling | WD+RI | `conversations-web-channel-flow.spec.ts`, `tests/json_rpc_e2e.rs` | ✅ | |+| 4.2.2 | AI Response Generation | WD | `agent-review.spec.ts` | ✅ | Mock LLM |+| 4.2.3 | Streaming Responses | RI | `tests/json_rpc_e2e.rs`, `tests/agent_harness_e2e.rs` | ✅ | `tests/agent_harness_e2e.rs` adds provider-level SSE tool-arg accumulation (chunked args reassembled + parsed) and engine-level delta forwarding (#3471) |+| 4.2.4 | Parallel inference (cross-thread + within-thread forked turns) | RU+VU | `src/openhuman/web_chat/web_tests.rs`, `app/src/store/__tests__/chatRuntimeSlice.test.ts`, `app/src/providers/__tests__/ChatRuntimeProvider.test.tsx` | 🟡 | Concurrent same-/cross-thread dispatch, cooperative `CancellationToken` teardown, and parallel-lane stream routing covered; dedicated WD E2E is a follow-up |+| 4.2.5 | Per-thread todo list (plan strip above composer) | RU+VU+WD | `src/openhuman/agent/tools/todo.rs`, `app/src/pages/conversations/components/ThreadTodoStrip.test.tsx`, `app/test/e2e/specs/chat-thread-todo-strip.spec.ts` | ✅ | Read-only thread-scoped todo strip fed by `task_board_updated`; agent `todo` tool guidance + thread binding; E2E drives a `todo` tool call and asserts the card renders |- | 4.2.6 | Background-activity panel (chat-header Background tasks button) | VU+WD | `app/src/pages/conversations/hooks/useBackgroundActivity.test.ts`, `app/src/pages/conversations/components/__tests__/BackgroundActivityRows.test.tsx`, `app/test/e2e/specs/chat-background-activity-panel.spec.ts` | ✅ | View-only panel surfacing this chat's async sub-agents + global cron jobs, subconscious/heartbeat status, and memory syncing; freshness-only "Syncing now" labeling; E2E opens the panel and asserts its sections render and close |+ | 4.2.6 | Background-activity panel (chat-header Background tasks button) | VU+WD | `app/src/features/conversations/hooks/useBackgroundActivity.test.ts`, `app/src/features/conversations/components/__tests__/BackgroundActivityRows.test.tsx`, `app/test/e2e/specs/chat-background-activity-panel.spec.ts` | ✅ | View-only panel surfacing this chat's async sub-agents + global cron jobs and memory syncing; freshness-only "Syncing now" labeling; E2E opens the panel and asserts its sections render and close || 4.2.7 | Plan-mode review (Approve / Reject / Send-feedback before execute) | RU+RI+VU | `src/openhuman/agent/plan_review/gate.rs`, `src/openhuman/agent/plan_review/tool.rs`, `src/openhuman/agent/plan_review/schemas.rs`, `tests/json_rpc_e2e.rs`, `app/src/pages/conversations/components/PlanReviewCard.test.tsx`, `app/src/pages/__tests__/Conversations.render.test.tsx` | ✅ | Interactive turns call `request_plan_review`, which parks the LIVE turn on the in-memory `PlanReviewGate` (oneshot) until the user decides; `plan_review_request` socket event drives `PlanReviewCard`, which resolves via `openhuman.plan_review_decide` (approve resumes-and-executes / reject resumes-and-stops / revise resumes-with-feedback). RU covers gate park/resolve/timeout + tool auto-approve + parking; RI covers the decide RPC; VU covers the card + provider wiring. WD E2E (agent-driven park flow) tracked as follow-up || 4.2.8 | Composer attachments (image / video / document; drag-drop + paste) | VU | `app/src/lib/attachments.test.ts`, `app/src/components/chat/__tests__/ChatComposer.test.tsx`, `app/src/pages/__tests__/Conversations.attachments.test.tsx` | 🟡 | Attach affordance gated on the resolved vision tier (images/video need vision; documents flow on any model); video is sampled into still frames client-side and forwarded through the existing `[IMAGE:]` vision path; drag-drop + clipboard-paste reuse the picker ingest. VU covers MIME/kind/limits/marker building + drag-drop + paste; real video decode and the frames→vision round-trip are manual-smoke only (jsdom has no video codec). WD E2E is a follow-up |@@@ -194,15 -194,14 +194,14 @@@### 4.3 Tool Invocation-| ID | Feature | Layer | Test path(s) | Status | Notes |-| ----- | ----------------------------- | ----- | ----------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |-| 4.3.1 | Tool Trigger via Chat | WD | `skill-execution-flow.spec.ts`, `skill-multi-round.spec.ts` | ✅ | |-| 4.3.2 | Permission-Based Execution | RU+WD | `src/openhuman/tools/`, `skill-execution-flow.spec.ts` | ✅ | |-| 4.3.3 | Tool Failure Handling | WD | `skill-execution-flow.spec.ts` | ✅ | |-| 4.3.4 | Subagent Mascot Visualization | VU | `app/src/features/human/SubMascotLayer.test.tsx`, `app/src/features/human/chatMascot/ChatMascotOverlay.test.tsx` | ✅ | Renders spawned/completed/failed subagent timeline rows as colored mascots with activity bubbles |-| 4.3.5 | Image Tool Contracts | RU | `src/openhuman/media/image/` | ✅ | High-level `image_generation` / `view_image` schema, gating, serialization, prompt guidance, and contract e2e coverage for #2984 |-| 4.3.7 | Mascot Avatar Animation | VU | `app/src/features/human/Mascot/RiveMascot.test.tsx`, `app/src/features/human/Mascot/riveMaps.test.ts` | ✅ | Rive `MascotSM` state machine: face→pose mapping, Oculus→`visme_codes` viseme normalization, and idle random pose rotation for the `tiny_mascot.riv` upgrade |+| ID | Feature | Layer | Test path(s) | Status | Notes |+| ----- | ----------------------------- | ----- | ---------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |+| 4.3.1 | Tool Trigger via Chat | WD | `skill-execution-flow.spec.ts`, `skill-multi-round.spec.ts` | ✅ | |+| 4.3.2 | Permission-Based Execution | RU+WD | `src/openhuman/tools/`, `skill-execution-flow.spec.ts` | ✅ | |+| 4.3.3 | Tool Failure Handling | WD | `skill-execution-flow.spec.ts` | ✅ | |+| 4.3.4 | Subagent Mascot Visualization | VU | `app/src/features/human/SubMascotLayer.test.tsx`, `app/src/features/human/chatMascot/ChatMascotOverlay.test.tsx` | ✅ | Renders spawned/completed/failed subagent timeline rows as colored companion mascots with activity bubbles |+| 4.3.5 | Image Tool Contracts | RU | `src/openhuman/media/image/` | ✅ | High-level `image_generation` / `view_image` schema, gating, serialization, prompt guidance, and contract e2e coverage for #2984 |- | 4.3.6 | Background Monitor Tools | RU+RI | `src/openhuman/subconscious/monitors/`, `src/openhuman/tools/ops_tests.rs`, `tests/json_rpc_e2e.rs` | ✅ | First-class monitor domain covers command denial, line streaming, timeout, stop, bounded output, registry exposure, and JSON-RPC list/read surface for #3371 |+| 4.3.7 | Mascot Avatar Animation | VU | `app/src/features/human/Mascot/RiveMascot.test.tsx`, `app/src/features/human/Mascot/riveMaps.test.ts` | ✅ | Rive `MascotSM` state machine: face→pose mapping, Oculus→`visme_codes` viseme normalization, and idle random pose rotation for the `tiny_mascot.riv` upgrade |### 4.4 Agent Harness Behaviors@@@ -544,15 -538,13 +538,14 @@@ End-to-end coverage of the agent harnes### 13.1 Account & Security- | ID | Feature | Layer | Test path(s) | Status | Notes |- | ------ | -------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |- | 13.1.1 | Profile Management | VU | `app/src/components/settings/panels/__tests__/PrivacyPanel.test.tsx` | 🟡 | |- | 13.1.2 | Linked Accounts | WD | `auth-access-control.spec.ts` | 🟡 | UI surface unasserted |- | 13.1.3 | Meet Handoff Prompt-Injection Guard | VU | `app/src/services/__tests__/webviewAccountService.meetPromptInjection.test.ts` | ✅ | Was ❌ — guard blocks handoff on hostile transcripts and wraps non-blocked transcripts in `<meeting_transcript source="untrusted_external_audio">` delimiters (#1920) |- | 13.1.4 | Wallet Balances Panel | VU | `app/src/components/settings/panels/__tests__/WalletBalancesPanel.test.tsx`, `app/src/services/walletApi.test.ts` | ✅ | Loading/error/empty/loaded states; Retry + Refresh re-invocation; chain badges; truncated address; providerStatus chip |- | 13.1.5 | Approval History | VU | `app/src/components/settings/panels/__tests__/ApprovalHistoryPanel.test.tsx`, `app/src/services/api/approvalApi.test.ts` | ✅ | Was ❌ — read-only audit surface over `approval_list_recent_decisions`; covers loaded/empty/error/refresh states, per-decision badge, and the bare-array vs `{result,logs}` envelope normalization |- | 13.1.6 | Action Timeout | VU, RU, RI | `app/src/components/settings/panels/__tests__/AgentAccessPanel.test.tsx`, `src/openhuman/tools/timeout/mod.rs`, `src/openhuman/config/ops_tests.rs`, `tests/json_rpc_e2e.rs` | ✅ | New (#3100) — UI control over `config_get/update_agent_settings` for `[agent].agent_timeout_secs`; covers load/persist-on-blur/range-rejection/no-op/env-override-disable, the runtime-mutable `tool_timeout` resolver + env precedence, ops apply/reject, and the RPC roundtrip |+ | ID | Feature | Layer | Test path(s) | Status | Notes |+ | ------ | ----------------------------------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |+ | 13.1.1 | Profile Management | VU | `app/src/components/settings/panels/__tests__/PrivacyPanel.test.tsx` | 🟡 | |+ | 13.1.2 | Linked Accounts | WD | `auth-access-control.spec.ts` | 🟡 | UI surface unasserted |+ | 13.1.4 | Wallet Balances Panel | VU | `app/src/components/settings/panels/__tests__/WalletBalancesPanel.test.tsx`, `app/src/services/walletApi.test.ts` | ✅ | Loading/error/empty/loaded states; Retry + Refresh re-invocation; chain badges; truncated address; providerStatus chip |+ | 13.1.5 | Approval History | VU | `app/src/components/settings/panels/__tests__/ApprovalHistoryPanel.test.tsx`, `app/src/services/api/approvalApi.test.ts` | ✅ | Was ❌ — read-only audit surface over `approval_list_recent_decisions`; covers loaded/empty/error/refresh states, per-decision badge, and the bare-array vs `{result,logs}` envelope normalization |+ | 13.1.6 | Action Timeout | VU, RU, RI | `app/src/components/settings/panels/__tests__/AgentAccessPanel.test.tsx`, `src/openhuman/tools/timeout/mod.rs`, `src/openhuman/config/ops_tests.rs`, `tests/json_rpc_e2e.rs` | ✅ | New (#3100) — UI control over `config_get/update_agent_settings` for `[agent].agent_timeout_secs`; covers load/persist-on-blur/range-rejection/no-op/env-override-disable, the runtime-mutable `tool_timeout` resolver + env precedence, ops apply/reject, and the RPC roundtrip |+| 13.1.7 | Core Gateways (run the core elsewhere) | RU, VU | `app/src-tauri/src/gateway/{types,store,ops,provision,registry}` (sibling `*_tests.rs`), `app/src/services/__tests__/gatewayService.test.ts`, `app/src/components/settings/panels/core/__tests__/GatewaySection.test.tsx`, `app/src/lib/bootCheck/index.test.ts` | ✅ | New — routing the frontend to a core in a Docker container, on a machine over SSH, or both, via tinybox. Covers the reach/confinement pairing, the wire shape, store round-trips and the reserved desktop id, the box spec (published port, network policy, `fixed(guest, host)` order) and core command, port-conflict retry classification, boot re-activation and its failure path, and an `#[ignore]`d end-to-end provisioning test that spawns a real detached process and polls `/health` |### 13.2 Automation & Channels