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
docs(session-import, config-schema): add README files for agent session import and config schema
Steven Enamakel9bb81184654c
diff --git a/crates/openhuman-core/src/agent/session_import/README.md b/crates/openhuman-core/src/agent/session_import/README.mdindex 318e45f149..bceeaa3740 100644--- a/crates/openhuman-core/src/agent/session_import/README.md+++ b/crates/openhuman-core/src/agent/session_import/README.md@@ -12,7 +12,7 @@ which every other TinyAgents-store consumer in the crate reuses.> checked into this repository; `types.rs` still refers to it when explaining> why stream names are dot-separated.-## Sources → destination+## Sources and destination- Transcript JSONL under `session_raw/`: the current flat layout(`session_raw/{stem}.jsonl`) and the legacy date-folder layout@@ -20,21 +20,21 @@ which every other TinyAgents-store consumer in the crate reuses.- Markdown-only sessions under `sessions/{dir}/{stem}.md` that have no JSONLtwin. A Markdown file next to a JSONL source is recorded as a companionpointer only, never read.-- Precedence per session stem: flat JSONL > legacy-dir JSONL > Markdown-only- (`scan.rs::discover_sources`); a duplicate stem is a warning, not a second- item.+- Precedence per session stem: flat JSONL beats legacy-dir JSONL beats+ Markdown-only (`scan.rs::discover_sources`); a duplicate stem is a warning,+ not a second item.- `session_db/sessions.db` is opened read-only, when present, to join`agent_runs` ids onto the descriptor and cross-check parent lineage. The- stem chain (`a__b` → parent `a`) wins over a disagreeing ledger.+ stem chain (`a__b` maps to parent `a`) wins over a disagreeing ledger.All writes land under `{workspace}/tinyagents_store/`:-- `kv/sessions/{sanitized stem}.json` — `SessionDescriptor` compatibility+- `kv/sessions/{sanitized stem}.json`: `SessionDescriptor` compatibilityrecord mapping the OpenHuman session key to TinyAgents identifiers.-- `kv/migration_items/{sha256(relative source path)}.json` — per-item+- `kv/migration_items/{sha256(relative source path)}.json`: per-itemidempotency ledger (`ItemLedgerRecord`).-- `kv/migrations/session_import_v1.json` — global run marker.-- `journal/session.{stem}.messages.jsonl` — message journal, one+- `kv/migrations/session_import_v1.json`: global run marker.+- `journal/session.{stem}.messages.jsonl`: message journal, one`StoreRecord` per line via TinyAgents `JsonlAppendStore`.Source files are never mutated or deleted.@@ -60,9 +60,9 @@ Source files are never mutated or deleted.| --- | --- || `mod.rs` | Module docs and re-exports (`ImportOptions`, `ImportSummary`, controller registration). || `types.rs` | Serde types: `ImportOptions`, `ImportSummary`, `ItemReport`, `SessionDescriptor`, `JournalMessage`, `ItemLedgerRecord`, and the store-layout constants (`KV_SUBDIR`, `JOURNAL_SUBDIR`, `NS_*`, `MARKER_KEY`, `IMPORT_VERSION`). |-| `scan.rs` | `discover_sources` — walks `session_raw/` and `sessions/`, dedupes by stem per the precedence order above. |+| `scan.rs` | `discover_sources` walks `session_raw/` and `sessions/`, deduping by stem per the precedence order above. || `convert.rs` | Pure helpers: `parent_session_key` stem lineage, `sanitize_store_name`, `stream_name`, `effective_thread_id` (synthesizes `imported-{stem}` when `_meta` has none), `build_descriptor`, `journal_messages`. |-| `ops.rs` | `run_import` — scan → read all → plan/write per item → marker; `open_session_stores` opens the shared KV/journal handles over `{workspace}/tinyagents_store/{kv,journal}`. |+| `ops.rs` | `run_import` scans, reads all, plans/writes per item, then writes the marker; `open_session_stores` opens the shared KV/journal handles over `{workspace}/tinyagents_store/{kv,journal}`. || `live.rs` | Dual-write of each persisted turn into the same layout (`write_live_turn`), gated by `AgentConfig::session_dual_write` (default on) with the `OPENHUMAN_SESSION_DUAL_WRITE` env kill switch; store-backed shadow read of the same session (`shadow_read_compare`), gated by `AgentConfig::session_shadow_reads` (default on) with `OPENHUMAN_SESSION_SHADOW_READS`; `session_kv_store` exposes the KV store on `RunContext.stores` as `TINYAGENTS_SESSION_KV_STORE`. Env vars can only force off, never on. Errors are logged and swallowed by callers; the legacy transcript stays authoritative for both reads and writes. || `schemas.rs` | `session_import.run` `ControllerSchema` and handler; resolves the workspace from config unless `workspace` is passed. || `*_tests.rs` | Sibling test suites for `convert`, `live`, `ops`, `schemas`. |@@ -76,13 +76,13 @@ in `crates/openhuman-core/src/core/all.rs`.## Used by-- `crates/openhuman-core/src/core/all.rs` — registers the controller.-- `tinyagents_session::transcript` — the legacy transcript readers+- `crates/openhuman-core/src/core/all.rs`: registers the controller.+- `tinyagents_session::transcript`: the legacy transcript readers(`read_transcript`, `read_transcript_legacy_md`) the importer converts from.-- `crates/openhuman-core/src/agent/session_host/turn/session_io/transcript_persist.rs`- — calls `live::write_live_turn` after each transcript write and+- `crates/openhuman-core/src/agent/session_host/turn/session_io/transcript_persist.rs`:+ calls `live::write_live_turn` after each transcript write and`live::shadow_read_compare` after each transcript load, both on background tasks.-- `crates/openhuman-core/src/agent/tinyagents/turn_runner.rs` — registers+- `crates/openhuman-core/src/agent/tinyagents/turn_runner.rs`: registers`live::session_kv_store` on the per-turn `RunContext`.- `open_session_stores` is reused by `agent/tinyagents/{journal,reaper,todos,replay/ops}.rs`and `threads/goals/migration.rs` so every TinyAgents-store consumer sharesdiff --git a/crates/openhuman-core/src/config/schema/README.md b/crates/openhuman-core/src/config/schema/README.mdindex 07dbda4d6b..f034f85823 100644--- a/crates/openhuman-core/src/config/schema/README.md+++ b/crates/openhuman-core/src/config/schema/README.md@@ -93,8 +93,10 @@ keys that select an implementation, rather than tune one:picks which ranker answers a tool search over tools exposed as`ToolExposure::Deferred`; `top_k` (default 3) caps how many matches comeback.-- `[storage]` / `[memory]` (`storage_memory.rs`, `LlmBackend`): selects the- embedding and storage backend for the built-in memory engine.+- `[storage]` / `[memory]` (`storage_memory.rs`): re-exports+ `MemoryConfig`, `StorageConfig`, `StorageProviderConfig`, and `LlmBackend`+ from `tinymemory_api::host::storage_memory`, the storage-provider and+ embedding-model selection for the built-in memory engine.`autonomy.rs` is not an engine selector; it is the config-side half of thesandbox policy contract described under Workspace/identity helpers below.@@ -116,7 +118,7 @@ sandbox policy contract described under Workspace/identity helpers below.3. Fill `config_path` / `workspace_dir` / `action_dir` (`resolve_action_dir`),then apply the two pre-schema-version legacy rewrites in `load/migrate.rs`(`migrate_legacy_inference_url`, `migrate_cloud_provider_slugs`).-4. Apply environment-variable overrides — `Config::apply_env_overrides_from`+4. Apply environment-variable overrides through `Config::apply_env_overrides_from`in `load/env_overlay.rs`, split into submodules under `load/env_overlay/`(`dictation_context.rs`, `learning_memory.rs`, `observability.rs`,`proxy.rs`, `runtime.rs`, `search.rs`, `subsystems_update.rs`);@@ -138,7 +140,7 @@ writes and fsyncs a 0600 temp file, then hands off to`load/atomic_commit.rs::commit_replacement`, which preserves the previousconfig as `.bak` and renames the temp file into place. The split exists socallers can tell "nothing written" (an `Err` before the rename) from "already-committed" (after it) and roll back in-memory state accordingly — the+committed" (after it) and roll back in-memory state accordingly; themigrations runner depends on this.`load/mod.rs` also exports `CONFIG_OWNER_MISMATCH_MARKER`: the loader appends