Skip to content

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

docs(threads): add README for thread module

Steven Enamakel6e1a12787d07
diff --git a/crates/openhuman-core/src/threads/README.md b/crates/openhuman-core/src/threads/README.md
index 0fd6793924..82221f85ec 100644
--- a/crates/openhuman-core/src/threads/README.md
+++ b/crates/openhuman-core/src/threads/README.md
@@ -20,8 +20,8 @@ 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 (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` (thread + message ops, title generation, delete) and `ops_part_02.rs` (purge, `turn_state_*`, `token_usage`, `transcript_get`). Split for file-size, not module boundaries. RPC entry points return `RpcOutcome<ApiEnvelope<T>>` 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/ops.rs` | Thin shell over the `ops/` submodule: `crud.rs` (thread + message ops, delete), `title_generation.rs`, `purge.rs`, `turn_state_ops.rs` (`turn_state_*`), `usage.rs` (`token_usage`), and `transcript.rs` (`transcript_get`). Split for file-size, not module boundaries. RPC entry points return `RpcOutcome<ApiEnvelope<T>>` with request-id/count meta. |
+| `crates/openhuman-core/src/threads/schemas.rs` | Thin shell over the `schemas/` submodule: `schema_defs.rs`, `registry.rs`, `handlers.rs`. `ControllerSchema` definitions, `all_controller_schemas`, `all_registered_controllers`, and `handle_*` functions delegating to `ops` live there, 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. |