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
chore: rename RpcOutcome to Outcome across codebase and fix a doc example
Steven Enamakela4e8ef4066eb
diff --git a/Cargo.toml b/Cargo.tomlindex 02c0896b50..ada16a7418 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -1,6 +1,6 @@# Virtual workspace root. Members: `crates/openhuman-core` (package `openhuman`,# the core library), `crates/openhuman-embed` (library facade),-# `crates/openhuman-rpc` (shared RPC contracts/client), `crates/openhuman-tinyhumans`+# `crates/openhuman-rpc` (JSON-RPC envelopes, client and server, above the core), `crates/openhuman-tinyhumans`# (SDK-backed backend transport + login/session ownership for hosts),# `crates/openhuman-cli` (the `openhuman-core` binary, developer bins and the# root integration tests), and `crates/openhuman-tui` (terminal client). `crates/openhuman-app` is deliberately excluded: it is itsdiff --git a/app/test/e2e/helpers/telegram.ts b/app/test/e2e/helpers/telegram.tsindex 06589640fc..f53d0474ab 100644--- a/app/test/e2e/helpers/telegram.ts+++ b/app/test/e2e/helpers/telegram.ts@@ -151,7 +151,7 @@ export async function connectTelegramBot(}// The result shape from ops.rs is { status, restart_required, message? }.- // It is wrapped by RpcOutcome which the Node RPC client unwraps one level.+ // It is wrapped by Outcome which the Node RPC client unwraps one level.const result = (out.result as Record<string, unknown> | null) ?? {};const inner =typeof result.result === 'object' && result.result !== null@@ -207,7 +207,7 @@ export async function getTelegramChannelStatus(): Promise<TelegramStatusEntry |}// channels_status returns entries: ChannelStatusEntry[].- // The core wraps with RpcOutcome so the Node client may unwrap one level.+ // The core wraps with Outcome so the Node client may unwrap one level.const result = (out.result as Record<string, unknown> | null) ?? {};const entries: TelegramStatusEntry[] = Array.isArray(result)? resultdiff --git a/app/test/e2e/specs/composio-github-tools-tags.spec.ts b/app/test/e2e/specs/composio-github-tools-tags.spec.tsindex 2ddad928f3..7597ba5f99 100644--- a/app/test/e2e/specs/composio-github-tools-tags.spec.ts+++ b/app/test/e2e/specs/composio-github-tools-tags.spec.ts@@ -156,7 +156,7 @@ describe('Composio GitHub tools — tags query param flow', () => {});expect(result.ok).toBe(true);- // RpcOutcome with logs serializes as { result: value, logs: [...] };+ // Outcome with logs serializes as { result: value, logs: [...] };// without logs it returns value directly. Unwrap both shapes.const raw = result.result as any;const tools: Array<{ function: { name: string } }> = raw?.result?.tools ?? raw?.tools ?? [];diff --git a/app/test/e2e/specs/credential-channels-flow.spec.ts b/app/test/e2e/specs/credential-channels-flow.spec.tsindex cfaa6a2e58..ce072761c5 100644--- a/app/test/e2e/specs/credential-channels-flow.spec.ts+++ b/app/test/e2e/specs/credential-channels-flow.spec.ts@@ -61,7 +61,7 @@ interface ChannelStatusEntry {has_credentials?: boolean;}-/** `RpcOutcome` wraps payloads inconsistently across controllers; drill down. */+/** `Outcome` wraps payloads inconsistently across controllers; drill down. */function unwrap(result: unknown): unknown {const outer = (result as Record<string, unknown> | null) ?? {};if (Array.isArray(outer)) return outer;diff --git a/app/test/e2e/specs/mega-flow.spec.ts b/app/test/e2e/specs/mega-flow.spec.tsindex f8f1cf1011..a751fa4042 100644--- a/app/test/e2e/specs/mega-flow.spec.ts+++ b/app/test/e2e/specs/mega-flow.spec.ts@@ -276,7 +276,7 @@ describe('Mega flow — login + Gmail OAuth + Composio in one session', () => {const enableTriggerMethod = 'openhuman.composio_enable_trigger';const before = await callOpenhumanRpc(listTriggersMethod, {});expectRpcOk(listTriggersMethod, before);- // list_triggers always emits a log line → RpcOutcome wraps in {result, logs}.+ // list_triggers always emits a log line → Outcome wraps in {result, logs}.// JSON-RPC result shape: { result: { triggers: [...] }, logs: [...] }// callResult.result = { result: { triggers: [...] }, logs: [...] }const beforeList = (before.result?.result?.triggers ??@@ -444,7 +444,7 @@ describe('Mega flow — login + Gmail OAuth + Composio in one session', () => {// CreateConversationThreadRequest only accepts `labels` (deny_unknown_fields).const createA = await callOpenhumanRpc('openhuman.threads_create_new', {});expect(createA.ok).toBe(true);- // threads_create_new returns RpcOutcome<ApiEnvelope<ConversationThreadSummary>> with+ // threads_create_new returns Outcome<ApiEnvelope<ConversationThreadSummary>> with// empty logs → bare ApiEnvelope: { data: { id, ... }, meta: {...} }// callResult.result = { data: { id, ... }, meta: {...} }const threadId: string = createA.result?.data?.id ?? '';@@ -453,7 +453,7 @@ describe('Mega flow — login + Gmail OAuth + Composio in one session', () => {// List threads — must have at least 1.const listA = await callOpenhumanRpc('openhuman.threads_list', {});expect(listA.ok).toBe(true);- // threads_list returns RpcOutcome<ApiEnvelope<{threads, count}>> with empty logs+ // threads_list returns Outcome<ApiEnvelope<{threads, count}>> with empty logs// callResult.result = { data: { threads: [...], count: N }, meta: {...} }const threadsA: unknown[] = listA.result?.data?.threads ?? [];expect(threadsA.length).toBeGreaterThan(0);@@ -619,7 +619,7 @@ describe('Mega flow — login + Gmail OAuth + Composio in one session', () => {const result = await callOpenhumanRpc('openhuman.update_version', {});expect(result.ok).toBe(true);- // update_version always emits a log → RpcOutcome wraps in {result, logs}.+ // update_version always emits a log → Outcome wraps in {result, logs}.// JSON-RPC result shape: { result: { version, target_triple, asset_prefix }, logs: [...] }// callResult.result = { result: { version, ... }, logs: [...] }// callResult.result.result = { version, target_triple, asset_prefix }@@ -747,7 +747,7 @@ describe('Mega flow — login + Gmail OAuth + Composio in one session', () => {clearRequestLog();// Step 1 — create a fresh thread.- // threads_create_new returns RpcOutcome<ApiEnvelope<ConversationThreadSummary>> with+ // threads_create_new returns Outcome<ApiEnvelope<ConversationThreadSummary>> with// empty logs → bare ApiEnvelope: { data: { id, title, ... }, meta: {...} }// callResult.result = { data: { id, ... }, meta: {...} }const create = await callOpenhumanRpc('openhuman.threads_create_new', {});@@ -783,7 +783,7 @@ describe('Mega flow — login + Gmail OAuth + Composio in one session', () => {});expect(msgList.ok).toBe(true);- // threads_messages_list returns RpcOutcome<ApiEnvelope<ConversationMessagesResponse>>+ // threads_messages_list returns Outcome<ApiEnvelope<ConversationMessagesResponse>>// with empty logs → bare ApiEnvelope: { data: { messages: [...], count: N }, meta: {...} }// callResult.result = { data: { messages: [...] }, meta: {...} }const messages: unknown[] = msgList.result?.data?.messages ?? [];diff --git a/app/test/e2e/specs/notifications.spec.ts b/app/test/e2e/specs/notifications.spec.tsindex 163219aa34..fdd9e1c746 100644--- a/app/test/e2e/specs/notifications.spec.ts+++ b/app/test/e2e/specs/notifications.spec.ts@@ -96,7 +96,7 @@ describe('Notifications', () => {});stepLog('notification_ingest result', { ok: result.ok, result: result.result });expect(result.ok).toBe(true);- // handle_ingest returns RpcOutcome::new(..., vec![]) → bare value (no extra .result wrapper)+ // handle_ingest returns Outcome::new(..., vec![]) → bare value (no extra .result wrapper)const payload = (result.result as any) ?? {};expect(payload.skipped).not.toBe(true);expect(typeof payload.id).toBe('string');diff --git a/app/test/e2e/specs/telegram-channel-flow.spec.ts b/app/test/e2e/specs/telegram-channel-flow.spec.tsindex e5bbb8dfc0..ce230e05af 100644--- a/app/test/e2e/specs/telegram-channel-flow.spec.ts+++ b/app/test/e2e/specs/telegram-channel-flow.spec.ts@@ -163,7 +163,7 @@ describe('Telegram channel — connect / receive / send / disconnect', () => {expect(out.ok).toBe(true);- // channels_list wraps its result in RpcOutcome — drill one level down.+ // channels_list wraps its result in Outcome — drill one level down.const resultRaw = (out.result as Record<string, unknown> | null) ?? {};const channels: unknown[] = Array.isArray(resultRaw)? resultRawdiff --git a/app/test/e2e/specs/voice-mode.spec.ts b/app/test/e2e/specs/voice-mode.spec.tsindex f55f89d243..25271931e9 100644--- a/app/test/e2e/specs/voice-mode.spec.ts+++ b/app/test/e2e/specs/voice-mode.spec.ts@@ -406,7 +406,7 @@ describe.skip('Voice mode — Human tab capture & error mapping (#1610)', () =>// The result must be defined and must be an object — not a raw string// or an unhandled panic. The actual transcription text may differ// (depends on which STT provider the core resolved), but the shape must- // have a `text` field (or a `result.text` field via RpcOutcome).+ // have a `text` field (or a `result.text` field via Outcome).expect(result).toBeDefined();const payload = (result as any).result ?? result;expect(typeof payload).toBe('object');diff --git a/crates/openhuman-core/src/core/logging.rs b/crates/openhuman-core/src/core/logging.rsindex 36fd95c159..3bbe637e02 100644--- a/crates/openhuman-core/src/core/logging.rs+++ b/crates/openhuman-core/src/core/logging.rs@@ -186,7 +186,7 @@ fn level_tag(level: &Level) -> &'static str {}}-/// Shortens a Rust module path (e.g., `openhuman_core::rpc` -> `rpc`).+/// Shortens a Rust module path (e.g., `openhuman_core::core` -> `core`).fn short_target(target: &str) -> &str {target.rsplit("::").next().unwrap_or(target)}