Skip to content

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

docs: update references from `openhuman-session` to `openhuman_tinyhumans::session`

Steven Enamakeld8da848339be
diff --git a/AGENTS.md b/AGENTS.md
index 030a887530..97fdb9526d 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -20,7 +20,7 @@ Architecture: [overview](gitbooks/developing/architecture.md),
| `crates/openhuman-core/src/main.rs` | `openhuman-core` CLI |
| `crates/openhuman-embed/` | Typed library facade for embedding the core in another product |
| `crates/openhuman-rpc/` | Shared RPC contracts, response decoding, and HTTP client used by app and TUI |
-| `crates/openhuman-session/` | Host-side login/session owner (login-token exchange, `/auth/me`, current-user cache, credential handoff) used by app and TUI |
+| `crates/openhuman-tinyhumans/` | The TinyHumans layer above embed: SDK-backed backend transport, a `RuntimeBuilder` that boots connected, and the host-side login/session owner (login-token exchange, `/auth/me`, current-user cache, credential handoff) used by app and TUI |
| `crates/openhuman-tui/` | Standalone terminal frontend |
| `tests/` | Rust integration and JSON-RPC tests |
| `gitbooks/` | Public product and contributor documentation |
@@ -270,7 +270,7 @@ progress events.
and does only what it owns with it: user-dir activation, gated services,
the scheduler gate, Sentry and prompt identity. Login-token exchange,
`GET /auth/me` and the current-user cache belong to the host's session
- owner: `crates/openhuman-session` behind the Tauri shell's `auth_*`
+ owner: `openhuman_tinyhumans::session` behind the Tauri shell's `auth_*`
commands and the TUI, `openhuman_embed::Auth` for embedders, the CLI or
`OPENHUMAN_BACKEND_API_KEY` / `OPENHUMAN_BACKEND_SESSION_TOKEN` for
headless hosts. Do not add backend auth endpoints back to the core.
@@ -345,8 +345,10 @@ sits above `openhuman-embed` and is installed once per process
agents, memory, tools and RPC without any TinyHumans connection and answers
backend-touching calls with `BackendApiError::BackendUnavailable` /
`BACKEND_UNAVAILABLE:`. Never add `tinyhumans-sdk` back to the core; the only
-crates allowed to depend on it are `openhuman-tinyhumans` and, until it is
-merged in, `openhuman-session`.
+crate allowed to depend on it is `openhuman-tinyhumans`. Every host that boots
+a core (`crates/openhuman-app/src/main.rs` and `lib.rs::run`,
+`crates/openhuman-tui/src/runner.rs`) calls `openhuman_tinyhumans::install`
+first.
Add missing backend routes to the vendored SDK (its unexposed-route registry
is the route policy the transport enforces) and name them from the core;
@@ -369,7 +371,7 @@ Every TinyHumans backend request must carry a sanitized `x-sdk-name`:
- `IntegrationClient`, except redirected file downloads
- `MedullaClient`, including its separate SSE handshake
- the host session owner's `POST /auth/login-token/consume` and
- `GET /auth/me` (`crates/openhuman-session`, through `ClientHeaders`)
+ `GET /auth/me` (`openhuman_tinyhumans::session`, through `ClientHeaders`)
- the agent Langfuse ingestion request
Set `ProductIdentity` once during startup before building clients. Do not add
diff --git a/crates/openhuman-core/src/api/README.md b/crates/openhuman-core/src/api/README.md
index 8383ec43cc..e710b919f2 100644
--- a/crates/openhuman-core/src/api/README.md
+++ b/crates/openhuman-core/src/api/README.md
@@ -145,7 +145,7 @@ all specified by `headers.rs`). Key surface:
`send_channel_*`, `*_channel_thread`, `revoke_integration`) all go through
`authed_json`. Every one of them is bearer-only: the core never obtains,
exchanges or validates a session — login-token exchange and `/auth/me`
- validation live in the host's session owner (`crates/openhuman-session`),
+ validation live in the host's session owner (`openhuman_tinyhumans::session`),
and `fetch_profile` exists only for channel link-checks that read a
connected channel id off the profile.
- `connect`, `url_for`, `raw_client` — OAuth connect flow and URL helpers for
@@ -202,7 +202,7 @@ see [`models/mod.rs`](models/mod.rs) for the full list.
downloads), `MedullaClient` (including its separate SSE handshake), the
agent's Langfuse ingestion request, and — outside this crate — the host
session owner's `POST /auth/login-token/consume` / `GET /auth/me`
- (`crates/openhuman-session`, via `ClientHeaders`).
+ (`openhuman_tinyhumans::session`, via `ClientHeaders`).
- Never add `x-sdk-name` to third-party endpoints, MCP servers, BYOK
inference endpoints, or presigned storage redirects.
- When auditing hand-built backend requests, grep for
diff --git a/crates/openhuman-core/src/desktop/app_state/README.md b/crates/openhuman-core/src/desktop/app_state/README.md
index 55468851bb..9d5fc0c1dd 100644
--- a/crates/openhuman-core/src/desktop/app_state/README.md
+++ b/crates/openhuman-core/src/desktop/app_state/README.md
@@ -2,7 +2,7 @@
Aggregator that the React shell polls every few seconds (`openhuman.app_state_snapshot`) to render the OS-level chrome: the stored credential and user, local-AI status, service health, onboarding tasks, keyring status, config-recovery notice. Owns the on-disk `app-state.json` and the merge/patch surface for shell-managed local fields. Does NOT own any of the underlying domain state — it assembles snapshots from peer domains and persists shell-side onboarding metadata.
-The snapshot never talks to the backend. The user it reports is the payload the host handed the core with `auth.set_credential` (the host's own `/auth/me` answer); the *live* current user is the session owner's business — the Tauri shell's `openhuman-session` cache (`crates/openhuman-session`) — and the frontend merges it in (`app/src/services/coreStateApi.ts`).
+The snapshot never talks to the backend. The user it reports is the payload the host handed the core with `auth.set_credential` (the host's own `/auth/me` answer); the *live* current user is the session owner's business — the Tauri shell's session cache (`openhuman_tinyhumans::session::CurrentUserCache`) — and the frontend merges it in (`app/src/services/coreStateApi.ts`).
## Key files
diff --git a/crates/openhuman-core/src/security/credentials/README.md b/crates/openhuman-core/src/security/credentials/README.md
index c3f08eeaa0..d78bf3531b 100644
--- a/crates/openhuman-core/src/security/credentials/README.md
+++ b/crates/openhuman-core/src/security/credentials/README.md
@@ -2,7 +2,7 @@
Credential management for the backend credential the core authenticates with and for provider/OAuth auth profiles. Owns the on-disk **auth-profiles** store (encrypted JSON + OS keychain), the `app-session` / `api-key` credential slots and everything the core does when one is installed or removed, per-provider token storage (e.g. API keys, OAuth token sets), the backend OAuth connect/handoff flows, and the Composio direct-mode (BYO key) credential slot. Exposes everything under the `auth.*` JSON-RPC / CLI namespace and runs the canonical sign-out teardown when a `SessionExpired` event fires.
-**The core never obtains, validates, exchanges or refreshes a credential.** Login-token exchange, `GET /auth/me` validation and the current-user cache are the host's job — the Tauri shell and the TUI through `crates/openhuman-session`, an embedder through `openhuman_embed::Auth`, an operator through the CLI or the boot env vars. They hand the result over with `auth.set_credential`.
+**The core never obtains, validates, exchanges or refreshes a credential.** Login-token exchange, `GET /auth/me` validation and the current-user cache are the host's job — the Tauri shell and the TUI through `openhuman_tinyhumans::session`, an embedder through `openhuman_embed::Auth`, an operator through the CLI or the boot env vars. They hand the result over with `auth.set_credential`.
## Responsibilities
diff --git a/crates/openhuman-embed/README.md b/crates/openhuman-embed/README.md
index 4ee903c3fd..210e41dcc9 100644
--- a/crates/openhuman-embed/README.md
+++ b/crates/openhuman-embed/README.md
@@ -143,7 +143,7 @@ its own `Provider` (BYOK) never touches the key. `HarnessBuilder::session`
remains for hosts that drive backend features on behalf of a signed-in user;
the core stores that session as handed over (`auth.set_credential`) and never
validates it — obtaining and validating a JWT is the host's job (see
-`crates/openhuman-session`).
+`openhuman_tinyhumans::session`).
### `Harness`: the one-agent shorthand
diff --git a/docs/TEST-COVERAGE-MATRIX.md b/docs/TEST-COVERAGE-MATRIX.md
index edb8ec451f..9ced550755 100644
--- a/docs/TEST-COVERAGE-MATRIX.md
+++ b/docs/TEST-COVERAGE-MATRIX.md
@@ -80,11 +80,11 @@ Canonical mapping of every product feature to its test source(s). Drives gap-fil
| ID | Feature | Layer | Test path(s) | Status | Notes |
| ----- | -------------------------------------- | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| 1.3.1 | Token Issuance | WD+RU+RI | `login-flow.spec.ts`, `crates/openhuman-session/src/{client,manager}_tests.rs`, `json_rpc_e2e.rs` | ✅ | |
+| 1.3.1 | Token Issuance | WD+RU+RI | `login-flow.spec.ts`, `crates/openhuman-tinyhumans/src/session/{client,manager}_tests.rs`, `json_rpc_e2e.rs` | ✅ | |
| 1.3.2 | Session Persistence | WD+RU | `logout-relogin-onboarding.spec.ts`, `crates/openhuman-core/src/security/credentials/ops_credential_tests.rs` | ✅ | |
| 1.3.3 | Refresh Token Rotation | VU | _missing_ — tracked #968 | ❌ | Slice-level refresh logic |
-| 1.3.4 | Product Identity Header (`x-sdk-name`) | RU | `crates/openhuman-core/src/api/product.rs`, `crates/openhuman-core/src/api/rest_tests.rs`, `crates/openhuman-session/src/client_tests.rs`, `crates/openhuman-core/src/medulla/client/tests/{integration_tests,sse_tests}.rs`, `crates/openhuman-core/src/integrations/client_tests.rs` | ✅ | #5406 — every backend-bound request is attributed to a product, defaulting to `openhuman` and overridable by an embedding product (OpenCompany, Medulla). RU covers the sanitiser (trim / allowlist / truncate / reject), the default, and the override on the wire across all four transports: the SDK path, `raw_client()`, `MedullaClient::authed`, and the SSE handshake (which authenticates by query parameter and so never reaches `authed()`). Managed embeddings go out through `tinyagents`' own clients and Socket.IO sets no HTTP headers, so neither is covered here. |
-| 1.3.5 | Credential handoff to core (`auth.set_credential`) | RU+RI | `crates/openhuman-core/src/security/credentials/ops_credential_tests.rs`, `crates/openhuman-session/src/link_tests.rs`, `tests/config_auth_app_state_connectivity_e2e.rs`, `tests/raw_coverage/app_state_credentials_raw_coverage_e2e.rs` | ✅ | The core takes a JWT / API key / local token as given (no `/auth/me`): expired JWTs and sessions without a user id are refused, same-token/same-user is a cheap refresh, a different user is signed out first, the snapshot reports the handed-over user and never calls the backend. |
+| 1.3.4 | Product Identity Header (`x-sdk-name`) | RU | `crates/openhuman-core/src/api/product.rs`, `crates/openhuman-core/src/api/rest_tests.rs`, `crates/openhuman-tinyhumans/src/session/client_tests.rs`, `crates/openhuman-core/src/medulla/client/tests/{integration_tests,sse_tests}.rs`, `crates/openhuman-core/src/integrations/client_tests.rs` | ✅ | #5406 — every backend-bound request is attributed to a product, defaulting to `openhuman` and overridable by an embedding product (OpenCompany, Medulla). RU covers the sanitiser (trim / allowlist / truncate / reject), the default, and the override on the wire across all four transports: the SDK path, `raw_client()`, `MedullaClient::authed`, and the SSE handshake (which authenticates by query parameter and so never reaches `authed()`). Managed embeddings go out through `tinyagents`' own clients and Socket.IO sets no HTTP headers, so neither is covered here. |
+| 1.3.5 | Credential handoff to core (`auth.set_credential`) | RU+RI | `crates/openhuman-core/src/security/credentials/ops_credential_tests.rs`, `crates/openhuman-tinyhumans/src/session/link_tests.rs`, `tests/config_auth_app_state_connectivity_e2e.rs`, `tests/raw_coverage/app_state_credentials_raw_coverage_e2e.rs` | ✅ | The core takes a JWT / API key / local token as given (no `/auth/me`): expired JWTs and sessions without a user id are refused, same-token/same-user is a cheap refresh, a different user is signed out first, the snapshot reports the handed-over user and never calls the backend. |
### 1.4 Logout & Revocation
diff --git a/gitbooks/developing/architecture/tauri-shell.md b/gitbooks/developing/architecture/tauri-shell.md
index cf3cb22b21..76d4322029 100644
--- a/gitbooks/developing/architecture/tauri-shell.md
+++ b/gitbooks/developing/architecture/tauri-shell.md
@@ -13,7 +13,7 @@ The desktop host for OpenHuman: Tauri v2 + WebView, IPC commands, window managem
2. **IPC**. Expose an explicit set of Tauri commands (see [Commands](#tauri-ipc-commands-app-src-tauri)).
3. **Core lifecycle**. Run the core JSON-RPC server as an in-process tokio task (`core_process.rs`) and hand the renderer its URL/bearer via `core_rpc_url` / `core_rpc_token`.
4. **Window + tray**. Desktop window behavior (main, mascot, notch, overlay windows) and system tray (see `lib.rs`).
-5. **Session ownership**. Log the user in and keep the current user fresh (`session/`, backed by `crates/openhuman-session`): exchange the login token, validate the JWT against `GET /auth/me`, cache `/auth/me`, and hand the resulting credential to the core with `auth.set_credential`. The core never talks to the backend's auth endpoints itself.
+5. **Session ownership**. Log the user in and keep the current user fresh (`session/`, backed by `openhuman_tinyhumans::session`): exchange the login token, validate the JWT against `GET /auth/me`, cache `/auth/me`, and hand the resulting credential to the core with `auth.set_credential`. The core never talks to the backend's auth endpoints itself.
## Core process model
@@ -57,7 +57,7 @@ crates/openhuman-app/src/
├── workspace_paths.rs # Safe workspace-relative file open/reveal/preview
├── app_update.rs # Updater support (commands live in lib.rs)
├── loopback_oauth.rs # Localhost OAuth redirect listener
-├── session/ # Session owner: auth_* commands over openhuman-session
+├── session/ # Session owner: auth_* commands over openhuman_tinyhumans::session
├── claude_code.rs # Claude Code login launch
├── mcp_commands.rs # MCP client helpers
├── file_logging.rs # Log file sink + logs-folder commands
@@ -179,7 +179,7 @@ Frontend: **`app/src/services/gatewayService.ts`**, surfaced in Settings → Cor
### Session (`session/`)
-The shell is the session owner on the desktop: it talks to the TinyHumans backend's auth endpoints so the core never has to. `openhuman-session` does the work; the shell adds the link to the core (`HttpCoreLink`, the same `(url, token)` the renderer uses, so a gateway switch is followed) and these commands. Errors carry a stable `PREFIX:` (`REJECTED`, `EXPIRED`, `TRANSIENT`, `CONSUME_FAILED`, `USER_ID_UNAVAILABLE`, `CORE`) the renderer classifies on.
+The shell is the session owner on the desktop: it talks to the TinyHumans backend's auth endpoints so the core never has to. `openhuman_tinyhumans::session` does the work; the shell adds the link to the core (`HttpCoreLink`, the same `(url, token)` the renderer uses, so a gateway switch is followed) and these commands. Errors carry a stable `PREFIX:` (`REJECTED`, `EXPIRED`, `TRANSIENT`, `CONSUME_FAILED`, `USER_ID_UNAVAILABLE`, `CORE`) the renderer classifies on.
| Command | Purpose |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------ |