Skip to content

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

docs(cron,threads): add READMEs for cron and threads modules

Steven Enamakel91138b7fe5c2
diff --git a/crates/openhuman-core/src/cron/README.md b/crates/openhuman-core/src/cron/README.md
index 91fdc432f3..5977bc4eb6 100644
--- a/crates/openhuman-core/src/cron/README.md
+++ b/crates/openhuman-core/src/cron/README.md
@@ -155,8 +155,9 @@ nothing is sent and no alert is raised. For a web origin, the reply is stored in
the origin thread under `run_reply_message_id("cron:<job>:<run>")`, the
web-channel `proactive_message` event is emitted with that `thread_id` and
`request_id`, and `append_to_origin_transcript` appends it to the thread's agent
-transcript (idempotent on the same key, and it waits out a live turn on the
-session, up to 120 seconds). For a channel origin, the reply goes to the
+transcript in the session store, under the key the session host wrote it with
+(`agent_key_for` of the job's tenant and agent), idempotent on the same key, and
+it waits out a live turn on the session, up to 120 seconds. For a channel origin, the reply goes to the
origin's `reply_target` through `cron::channel_bridge` and is appended to that
chat's in-memory history.
diff --git a/crates/openhuman-core/src/threads/README.md b/crates/openhuman-core/src/threads/README.md
index 083c981583..35c65c961a 100644
--- a/crates/openhuman-core/src/threads/README.md
+++ b/crates/openhuman-core/src/threads/README.md
@@ -26,13 +26,17 @@ A thread has three separate records on disk, all under the workspace:
threads/<hex(thread_id)>.jsonl the thread's message log (what the UI lists)
turn_states/<hex(thread)>/<hex(request)>.json
snapshot of one turn's progress
-<workspace>/session_raw/*.jsonl model-facing transcript (agent session host)
+session store (agent::session_store) model-facing transcript (agent session host)
```
The message log is the user-facing history: one row per user message and
agent reply, which `threads.messages_list` returns. The transcript is what
-the model sees, written by the agent session host, and is the source for
-`threads.transcript_get` and `threads.token_usage`. The turn-state snapshots
+the model sees, written by the agent session host through the session store
+port, and is the source for `threads.transcript_get` and `threads.token_usage`.
+Every transcript read here goes through that port under the key the session
+host wrote with: `ops::support::transcript_store(ctx)` resolves it from the
+request's own context (`<profile>~<agent>` for a SaaS profile, else the
+context's agent, else the chat agent id), never from ambient state. The turn-state snapshots
record what a turn was doing (phase, tool timeline, streamed text) so a client
that reloads mid-turn, or after a restart, can rebuild the process view.
@@ -164,12 +168,12 @@ label from threads and renames `welcome*` session transcripts to
| [`ops/title_generation.rs`](./ops/title_generation.rs) | Model-generated titles and the replaceable-title rule. |
| [`ops/working_dir.rs`](./ops/working_dir.rs) | Validating and binding a thread's working folder. |
| [`ops/search.rs`](./ops/search.rs) | `threads.search`: cross-thread search with snippets for the global `Cmd`/`Ctrl+K` search. |
-| [`ops/transcript.rs`](./ops/transcript.rs) | `threads.transcript_get`: paginated display items from `tinyagents_session::transcript::view`. |
-| [`ops/usage.rs`](./ops/usage.rs) | `threads.token_usage`: token and cost totals from `transcript::spend::thread_spend`, re-priced, with per-sub-agent rows and the last turn's tokens for the context gauge. |
+| [`ops/transcript.rs`](./ops/transcript.rs) | `threads.transcript_get`: paginated display items from `tinyagents_session::transcript::view::get_page_in` over the request's transcript store. |
+| [`ops/usage.rs`](./ops/usage.rs) | `threads.token_usage`: token and cost totals from `transcript::spend::thread_spend_in` over the request's transcript store, re-priced, with per-sub-agent rows and the last turn's tokens for the context gauge. |
| [`ops/live_state.rs`](./ops/live_state.rs) | `threads.goal_get` and `threads.todos_get`: one-shot reads of the thread's agent goal and todo list for hydration on load. |
| [`ops/turn_state_ops.rs`](./ops/turn_state_ops.rs) | `threads.turn_state_*` over the snapshot store. |
| [`ops/purge.rs`](./ops/purge.rs) | Workspace-wide purge. |
-| [`ops/support.rs`](./ops/support.rs) | Envelopes, workspace resolution, `run_to_completion`, type conversions, fallback titles. |
+| [`ops/support.rs`](./ops/support.rs) | Envelopes, workspace and transcript-store resolution (`transcript_store`), `run_to_completion`, type conversions, fallback titles. |
| [`schemas/`](./schemas/) | `schema_defs.rs` (controller schemas), `handlers.rs` (param parsing, thin handlers), `registry.rs` (the controller list). |
| [`store/`](./store/) | Re-export of `tinyagents_session::threads`, the `blocking` wrappers and the channel bus subscriber. See [store/README.md](store/README.md). |
| [`turn_state/`](./turn_state/) | `mirror/observe.rs` (progress projection) and `rpc_types.rs` (turn-state RPC payloads). |