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: Based on the diff provided, the change is removing the `README.md` file. This is a routine ma
Steven Enamakelb05d3f4f825d
diff --git a/crates/openhuman-core/src/flows/mod.rs b/crates/openhuman-core/src/flows/mod.rsindex dfb7153c79..6c174e195b 100644--- a/crates/openhuman-core/src/flows/mod.rs+++ b/crates/openhuman-core/src/flows/mod.rs@@ -14,7 +14,7 @@//! # Gate shape — leaf, not facade//!//! The whole family (this module plus [`tinyflows`]) is gated at-//! `pub mod flows;` in `crates/openhuman-core/src/mod.rs` on `#[cfg(feature = "flows")]`,+//! `pub mod flows;` in `crates/openhuman-core/src/lib.rs` on `#[cfg(feature = "flows")]`,//! and the submodules below inherit that gate. There is **no `stub.rs`**://! every symbol reached from outside is a *registration site* (`core::all`,//! `core::jsonrpc`'s `FlowTriggerSubscriber`, `core::runtime::services`' bootdiff --git a/crates/openhuman-core/src/medulla/README.md b/crates/openhuman-core/src/medulla/README.mdnew file mode 100644index 0000000000..5a9812aabc--- /dev/null+++ b/crates/openhuman-core/src/medulla/README.md@@ -0,0 +1,75 @@+# Medulla++OpenHuman as a Medulla **client**: the HTTP/SSE surface that talks to the+Medulla orchestration backend, the wire vocabulary it speaks, and the+harness-contract types the client and the harness share. Do not confuse this+with `crates/openhuman-core/src/platform/socket/medulla`, which is the opposite+direction — OpenHuman as a Medulla **worker** answering inbound Socket.IO from+a remote operator. A single binary can be both at once; see `mod.rs` for the+full split.++Gated on the `medulla` Cargo feature and tagged+`DomainGroup::Medulla` (`crate::core::all::DomainGroup`) at runtime. `contract`+and `events` are ungated carve-outs: they are inert serde/std types with no+runtime coupling, and `crates/openhuman-embed/src/` names them in public+signatures, so gating them would take the embed facade down with them.++The `medulla_local` engine (a supervised `medulla-serve` child process) has+been removed; its `subconscious.engine = "medulla"` config keys are still+accepted as inert serde (`config::schema::subconscious`) so existing configs+keep booting while that behaviour is re-ported onto this domain.++## Layout++- `mod.rs` — feature gate, the client/worker split, `RESERVED_TOOL_NAMES` (the+ harness's built-in memory/task-tracker tool names a module author must not+ collide with).+- `contract.rs` — ungated. `WorkerContract` and `VerificationEvidence`: the+ advisory boundaries and completion evidence Medulla transports verbatim for+ a delegated worker lane. `camelCase` wire shapes.+- `events/` — ungated. `SessionEvent` (with an `Unknown` fallback so a newer+ backend never drops rows on an older host) and `EventEnvelope`; `types.rs`+ is the data model, `serde_impl.rs` the compact-JSON codec. Presentation+ (transcript rendering, last-message lookup) deliberately stays out — that's+ the host's concern.+- `client/` — `MedullaClient` / `MedullaClientBuilder`, `DEFAULT_BASE_URL`.+ Unwraps the backend's `{success, data}` envelope; API errors surface as+ `ClientError::Api`, preserving `errorCode`. Submodules: `account`,+ `sessions`, `orchestration`, `routing` (`RoutingStrategy`), `program`,+ `feedback` (the public feedback board), `sse` (event streaming — attaches+ the `x-sdk-name` product-identity header itself in its connect path, since+ the SSE handshake authenticates via `?token=` and never reaches the+ client's normal `authed()` helper), and `types`/`error`.+- `chat/` — on-disk chat thread-tree store (`medulla_chat`), migrated from+ medulla-public. Kept separate from `threads/` and `session_db/`: its on-disk+ format is a live user-data contract, and folding it into an existing store+ would mean migrating every existing chat tree.+- `resolve.rs` — resolves a configured `MedullaClient` from ambient config and+ credentials. There is no `[medulla]` config section: the Medulla API and the+ OpenHuman backend are the same deployment, so `api_url` and the existing+ session token already address it.+ `OPENHUMAN_MEDULLA_BASE_URL` overrides the base URL for pointing a dev host+ at a different Medulla deployment.+- `ops.rs` / `schemas.rs` — the `medulla` RPC namespace: `medulla_status`,+ `medulla_roster`, `medulla_create_session`, `medulla_get_session`,+ `medulla_list_sessions`, `medulla_list_messages`, `medulla_send_message`,+ `medulla_list_events`, `medulla_abort`. Handlers delegate straight to `ops`;+ transport and client-construction failures become `StructuredRpcError`s so a+ host can branch on a stable `data.kind`.++## Called by++- `crates/openhuman-core/src/flows/medulla_bridge.rs` — bridges the+ `platform::socket::medulla` worker's workflow events to this domain's+ session/event surface; never talks to a runtime worker directly.+- `crates/openhuman-core/src/api/product.rs` — `MedullaClient` is one of the+ callers required to send `x-sdk-name` on every backend request, including+ its separate SSE handshake (see AGENTS.md).+- `crates/openhuman-core/src/desktop/app_state/` — reads the resolved config+ snapshot `MedullaClient` uses per request.++## Tests++`mod_tests.rs`, `resolve_tests.rs`, `ops_tests.rs`, `schemas_tests.rs`,+`chat/chat_tests.rs`, `client/tests/`, `client/routing_routing_strategy_tests_tests.rs`,+`client/feedback/feedback_tests.rs`, `events/tests/`.diff --git a/crates/openhuman-core/src/threads/README.md b/crates/openhuman-core/src/threads/README.mdindex 4fd41db959..ba157a1caa 100644--- a/crates/openhuman-core/src/threads/README.md+++ b/crates/openhuman-core/src/threads/README.md@@ -17,17 +17,23 @@ Conversation thread and message management. Owns the RPC surface and controller| File | Role || --- | --- |-| `crates/openhuman-core/src/threads/mod.rs` | Export-focused: module docstring, `mod` decls, re-exports (`ThreadsError`, `THREAD_NOT_FOUND_KIND`, controller schema/registry pair, welcome-migration entry point). |-| `crates/openhuman-core/src/threads/ops.rs` | Business logic / RPC entry points returning `RpcOutcome<ApiEnvelope<T>>`. All thread + message + turn-state ops live here; wraps results in `ApiEnvelope` with request-id/count meta. |-| `crates/openhuman-core/src/threads/schemas.rs` | `ControllerSchema` definitions, `all_controller_schemas`, `all_registered_controllers`, and `handle_*` functions delegating to `ops`. Also hosts the `task_board_get`/`task_board_put` handlers (proxy to `agent::task_board`). |+| `crates/openhuman-core/src/threads/mod.rs` | Export-focused: module docstring, `mod` decls (incl. `goals`, `todos`, `transcript_view` submodules), re-exports (`ThreadsError`, `THREAD_NOT_FOUND_KIND`, controller schema/registry pair, welcome-migration entry point). |+| `crates/openhuman-core/src/threads/ops.rs` | Thin shell: `include!`s `ops_part_01.rs` and `ops_part_02.rs` (split for file-size, not module boundaries). Business logic / RPC entry points returning `RpcOutcome<ApiEnvelope<T>>` live in the parts; all thread + message + turn-state ops wrap results in `ApiEnvelope` with request-id/count meta. |+| `crates/openhuman-core/src/threads/schemas.rs` | Thin shell: `include!`s `schemas_part_01.rs` and `schemas_part_02.rs`. `ControllerSchema` definitions, `all_controller_schemas`, `all_registered_controllers`, and `handle_*` functions delegating to `ops` live in the parts, along with the `task_board_get`/`task_board_put` handlers (proxy to `agent::task_board`). || `crates/openhuman-core/src/threads/error.rs` | `ThreadsError` taxonomy (`NotFound` / `Message`); encodes `NotFound` as a `StructuredRpcError` (`kind: "ThreadNotFound"`, `expected_user_state: true`) at the controller boundary so the frontend handles stale thread refs without string-matching or Sentry noise. || `crates/openhuman-core/src/threads/title.rs` | Pure, provider-free helpers: placeholder-title detection, raw-title sanitization, whitespace collapse, fallback title from user message, prompt builder, log fingerprint. Heavily unit-tested. || `crates/openhuman-core/src/threads/welcome_migration.rs` | One-shot, marker-guarded migration of legacy welcome-agent threads/transcripts to orchestrator naming. || `crates/openhuman-core/src/threads/turn_state/mod.rs` | Submodule export hub for in-flight turn snapshots. || `crates/openhuman-core/src/threads/turn_state/types.rs` | Wire/storage types: `TurnState`, `TurnLifecycle`, `TurnPhase`, `ToolTimelineEntry`/`Status`, `SubagentActivity`/`ToolCall`, and the get/list/clear request/response payloads. camelCase to mirror `chatRuntimeSlice.ts`. || `crates/openhuman-core/src/threads/turn_state/store.rs` | `TurnStateStore` — atomic per-thread JSON snapshot store (tempfile + persist + dir fsync), process-wide mutex; `put`/`get`/`delete`/`list`/`clear_all`/`mark_all_interrupted` plus free-fn wrappers. |-| `crates/openhuman-core/src/threads/turn_state/mirror.rs` | `TurnStateMirror` — translates `agent::progress::AgentProgress` events into `TurnState` mutations (incl. the ordered narration/thinking/tool `transcript`), flushing at iteration/tool boundaries; on completion marks the snapshot `Completed` and **keeps** it (so the "View processing" panel can replay the finished turn), flags `Interrupted` if the bridge exits without `TurnCompleted`. |-| `*_tests.rs` | Sibling test suites: `ops_tests.rs`, `schemas_tests.rs`, `turn_state/store_tests.rs`, `turn_state/mirror_tests.rs` (plus inline tests in `error.rs`, `title.rs`, `welcome_migration.rs`). |+| `crates/openhuman-core/src/threads/turn_state/mirror.rs` (+ `mirror_part_01.rs`/`mirror_part_02.rs`) | `TurnStateMirror` — translates `agent::progress::AgentProgress` events into `TurnState` mutations (incl. the ordered narration/thinking/tool `transcript`), flushing at iteration/tool boundaries; on completion marks the snapshot `Completed` and **keeps** it (so the "View processing" panel can replay the finished turn), flags `Interrupted` if the bridge exits without `TurnCompleted`. |+| `*_tests.rs` | Sibling test suites: `ops_tests*.rs`, `schemas_tests.rs`, `turn_state/store_tests.rs`, `turn_state/mirror_tests*.rs` (plus inline tests in `error.rs`, `title.rs`, `welcome_migration.rs`). |++## Submodules++- [`goals/`](goals/mod.rs) — thin OpenHuman host adapters over `tinyagents_graph::goals`. Tinyagents owns the goal type, lifecycle, persistence, and prompt rendering; this module owns workspace-store resolution, the `thread_goals.*` JSON-RPC schemas (`get`/`set`/`complete`/`pause`/`resume`/`clear`, 6 functions), domain events, the legacy-file migration, heartbeat dispatch, and adapters for OpenHuman's pre-tinyagents `Tool`/`StopHook` traits (`continuation.rs`, `migration.rs`, `ops.rs`, `runtime.rs`, `schemas.rs`, `store.rs`, `tools.rs`). The external `thread_goals` RPC namespace is stable regardless of the tinyagents-side implementation.+- [`todos/`](todos/README.md) — compatibility surface over `tinyagents_graph::todos` (task-board types, normalization, markdown rendering, CRUD, plan decisions, the single-`in_progress` invariant, atomic claims, durable storage). OpenHuman keeps the `todos.*` JSON-RPC API (14 functions, split across `schemas_part_01.rs`/`schemas_part_02.rs`), the granular `todo_*` agent tools (`tools.rs`), and `runs.rs`, which binds the TinyAgents autonomous-run ledger to `BoardLocation` addressing and imports retired `agent_task_boards/<hex>.runs.json` ledgers. See the submodule README for details.+- [`transcript_view/`](transcript_view/mod.rs) — projects the append-only `session_raw/*.jsonl` transcript source of truth into typed `DisplayItem`s for the chat renderer, with newest-first pagination over a bounded in-memory cache (`cache.rs`, `project.rs`, `types.rs`). Entry point `get_page` backs the `threads.transcript_get` RPC.## Public surface