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
fix: restore main after the #7044 merge dropped earlier PRs
Ghost Scripterc52e0c6408bd
diff --git a/.env.example b/.env.exampleindex 38eec596ea..091caf89d2 100644--- a/.env.example+++ b/.env.example@@ -91,6 +91,12 @@ OPENHUMAN_MODEL=# [optional] Workspace directory (default: ~/.openhuman or ~/.openhuman-staging when OPENHUMAN_APP_ENV=staging)# Leave commented out to use the default. Setting to empty string is treated as unset.# OPENHUMAN_WORKSPACE=+# [optional] Master key for the `encrypted_file` keyring used in staging/production,+# as 64 hex characters (`openssl rand -hex 32`). Headless/container deploys have no+# OS keychain to hold it; set exactly one of these two, injected from your secret+# manager. Losing the key orphans every secret encrypted under it.+# OPENHUMAN_KEYRING_MASTER_KEY=+# OPENHUMAN_KEYRING_MASTER_KEY_FILE=/run/secrets/openhuman_master_key# [optional] Default: 0.7OPENHUMAN_TEMPERATURE=0.7# [optional] Language for background LLM artifacts such as memory-tree summaries,@@ -140,6 +146,16 @@ OPENHUMAN_TEMPERATURE=0.7# ---------------------------------------------------------------------------# [optional] Default: 0OPENHUMAN_BROWSER_ALLOW_ALL=0+# [optional] Trace TinyComputer runs, as `[computer] trace = true` does: every+# browser task records its decisions and keeps its full report, and desktop+# commands are traced, under <workspace>/state/computer/. Reports hold page+# text. Default: 0+OPENHUMAN_COMPUTER_TRACE=0+# [optional] TinyComputer's own debug journal, read by the module inside this+# process: every Jev call with its latency, and the wall time of each decision,+# action and step, written under this directory (1 = ./.jev-journal). Read it+# with tinycomputer's `jev_journal` example. Off when unset.+# TINYCOMPUTER_JEV_JOURNAL=# [optional] Default: 0OPENHUMAN_LOG_PROMPTS=0# [optional] Enable reasoning modediff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 71272ebc1c..ee992fdec1 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -339,4 +339,51 @@ If you are contributing through a coding agent or remote environment, include th- Keep logs grep-friendly and avoid logging secrets, tokens, or full PII.- Follow ESLint, Prettier, and Rust formatting output as authoritative.+### UI translations++All locales use the same workflow. Use `useT()` for UI text and treat+`app/src/lib/i18n/en.ts` as the key source. Preserve existing good translations,+translate new or changed English meanings, and remove keys retired from English.+`scripts/apply-i18n-translations.ts` applies translation JSON files, retains+existing values, removes obsolete keys, and writes keys in English order. Supply+real translations for new strings; its English fallback is not a finished translation.+Run `pnpm i18n:check`, `pnpm i18n:english:check`, the i18n coverage test, and Prettier.+Preserve interpolation placeholders exactly, including repeated placeholders and+double braces. Keep product names, paths, commands, and technical identifiers intact.++#### Japanese UI copy++Review text where it appears: a button, setting label, status, empty state, or+confirmation dialog. Prefer short action labels and plain, polite sentences.+Remove roundabout wording, not information: keep conditions, units, upload+destinations, consent requirements, and deletion scope. Errors should describe+what happened without guessing a cause. For example, keep "no answer" distinct+from "no data" or a connection failure.++| Context | Prefer | Avoid |+| --- | --- | --- |+| Save button | 保存 | 変更内容の保存を実行 |+| Saved status | 保存しました | 正常に保存されました |+| Available action | 変更できます | 変更することができます |+| Delete a stored memory item | メモリーから削除 | 忘れる |++Use these terms consistently on the Memory screens. Translate by meaning rather+than substituting words mechanically; source connections and answer citations are+different concepts.++| Concept | Japanese |+| --- | --- |+| Memory / memory engine | メモリー / メモリーエンジン |+| Learning / preference | 学習内容 / 好み |+| Brain / belief / memory pack | ブレイン / 信念 / メモリーパック |+| Source to sync / answer citation | ソース / 出典 |+| Context brief | コンテキスト要約; 要約 when the context is clear |+| Sync / import | 同期 / インポート |+| Endpoint URL / API key | 接続先URL / APIキー |+| Conversation / thread / turn | 会話 / スレッド / ターン |++Keep backend count units such as ターン; do not reinterpret them as messages or+conversations. This is contributor writing guidance, not a separate Japanese key+matcher, fallback, or validation rule.+Thank you for contributing to OpenHuman.diff --git a/Cargo.lock b/Cargo.lockindex eef6fe423e..e7498bd711 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -17,6 +17,15 @@ version = "2.0.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"+[[package]]+name = "adobe-cmap-parser"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ae8abfa9a4688de8fc9f42b3f013b6fffec18ed8a554f5f113577e0b9b3212a3"+dependencies = [+ "pom",+]+[[package]]name = "aead"version = "0.5.2"@@ -305,6 +314,16 @@ dependencies = ["syn 3.0.6",]+[[package]]+name = "atoi_simd"+version = "0.18.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f3cdb3708a128e559a30fb830e8a77a5022ee6902806925c216658652b452a44"+dependencies = [+ "debug_unsafe",+ "rustversion",+]+[[package]]name = "atomic"version = "0.6.1"@@ -535,6 +554,15 @@ dependencies = ["hybrid-array",]+[[package]]+name = "block-padding"+version = "0.3.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93"+dependencies = [+ "generic-array",+]+[[package]]name = "block-padding"version = "0.4.2"@@ -701,6 +729,23 @@ dependencies = ["serde",]+[[package]]+name = "calamine"+version = "0.36.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5fa68281b1a76b54a62156474adb06bb380a67e07dd60656e3217152b42183f3"+dependencies = [+ "atoi_simd",+ "byteorder",+ "codepage",+ "encoding_rs",+ "fast-float2",+ "log",+ "quick-xml 0.41.0",+ "serde",+ "zip 8.6.0",+]+[[package]]name = "castaway"version = "0.2.4"@@ -710,6 +755,15 @@ dependencies = ["rustversion",]+[[package]]+name = "cbc"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6"+dependencies = [+ "cipher 0.4.4",+]+[[package]]name = "cbc"version = "0.2.1"@@ -729,6 +783,12 @@ dependencies = ["shlex",]+[[package]]+name = "cff-parser"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c5810ca1a2b5870df2aab1c03e11c40c361ba51d6e3e361e56310f1cb3b4e087"+[[package]]name = "cfg-if"version = "1.0.5"@@ -892,6 +952,15 @@ dependencies = ["objc",]+[[package]]+name = "codepage"+version = "0.1.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bdff162541cd8b79de82e2edcc7eff3a8c2a6dc3d75152636028f96d93de3b26"+dependencies = [+ "encoding_rs",+]+[[package]]name = "coins-bip32"version = "0.13.2"@@ -1167,6 +1236,12 @@ dependencies = ["libc",]+[[package]]+name = "core_detect"+version = "1.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48"+[[package]]name = "coreaudio-rs"version = "0.14.2"@@ -1485,6 +1560,12 @@ version = "0.1.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "092966b41edc516079bdf31ec78a2e0588d1d0c08f78b91d8307215928642b2b"+[[package]]+name = "debug_unsafe"+version = "0.1.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7eed2c4702fa172d1ce21078faa7c5203e69f5394d48cc436d25928394a867a2"+[[package]]name = "debugid"version = "0.8.0"@@ -1703,6 +1784,15 @@ version = "1.0.20"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"+[[package]]+name = "ecb"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1a8bfa975b1aec2145850fcaa1c6fe269a16578c44705a532ae3edc92b8881c7"+dependencies = [+ "cipher 0.4.4",+]+[[package]]name = "ecdsa"version = "0.16.9"@@ -1782,6 +1872,20 @@ version = "0.2.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e079f19b08ca6239f47f8ba8509c11cf3ea30095831f7fed61441475edd8c449"+[[package]]+name = "encoding_rs"+version = "0.8.42"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8e985e0451871ad22fb8d2b6b076e2028a502a0d3950998c2c5c0a4f9b5d9679"+dependencies = [+ "cfg-if",+ "core_detect",+ "multiversion_no_op",+ "rustversion",+ "scopeguard",+ "simdutf8",+]+[[package]]name = "engineioxide"version = "0.15.2"@@ -1893,6 +1997,15 @@ version = "3.4.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "0b5343afd4a8365a643ac588dab4cf234a190c7f6c88c9f6dd6ffe00837661b7"+[[package]]+name = "euclid"+version = "0.20.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2bb7ef65b3777a325d1eeefefab5b6d4959da54747e33bd6258e789640f307ad"+dependencies = [+ "num-traits",+]+[[package]]name = "euclid"version = "0.22.14"@@ -1950,6 +2063,12 @@ dependencies = ["regex",]+[[package]]+name = "fast-float2"+version = "0.2.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c6e8948ce679d00a02a94739ea185595dca7118ed04feb991127e443bd3d761f"+[[package]]name = "fastrand"version = "2.5.0"@@ -2815,6 +2934,7 @@ version = "0.1.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01"dependencies = [+ "block-padding 0.3.3","generic-array",]@@ -2824,7 +2944,7 @@ version = "0.2.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "4250ce6452e92010fdf7268ccc5d14faa80bb12fc741938534c58f16804e03c7"dependencies = [- "block-padding",+ "block-padding 0.4.2","hybrid-array",]@@ -3261,6 +3381,33 @@ version = "0.4.34"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"+[[package]]+name = "lopdf"+version = "0.42.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "25aab26d99567469098e64a02f42679f8965c6401263eefa31d8f2dcc37a221c"+dependencies = [+ "aes 0.8.4",+ "bitflags 2.13.2",+ "cbc 0.1.2",+ "ecb",+ "encoding_rs",+ "flate2",+ "getrandom 0.4.3",+ "indexmap",+ "itoa",+ "log",+ "md-5",+ "nom 8.0.0",+ "rand 0.10.2",+ "rangemap",+ "sha2 0.10.9",+ "stringprep",+ "thiserror 2.0.20",+ "ttf-parser",+ "weezl",+]+[[package]]name = "lru"version = "0.18.4"@@ -3331,6 +3478,16 @@ version = "0.8.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3"+[[package]]+name = "md-5"+version = "0.10.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"+dependencies = [+ "cfg-if",+ "digest 0.10.7",+]+[[package]]name = "md5"version = "0.8.1"@@ -3437,6 +3594,12 @@ dependencies = ["pxfm",]+[[package]]+name = "multiversion_no_op"+version = "1.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d"+[[package]]name = "native-tls"version = "0.2.18"@@ -3998,7 +4161,7 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381"[[package]]name = "openhuman"-version = "0.64.10"+version = "0.64.12"dependencies = ["aes-gcm","aho-corasick",@@ -4114,12 +4277,12 @@ dependencies = ["wiremock","x25519-dalek 2.0.1","zeroize",- "zip",+ "zip 2.4.2",][[package]]name = "openhuman-cli"-version = "0.64.10"+version = "0.64.12"dependencies = ["aes-gcm","anyhow",@@ -4181,7 +4344,7 @@ dependencies = [[[package]]name = "openhuman-embed"-version = "0.64.10"+version = "0.64.12"dependencies = ["anyhow","async-trait",@@ -4207,7 +4370,7 @@ dependencies = [[[package]]name = "openhuman-rpc"-version = "0.64.10"+version = "0.64.12"dependencies = ["anyhow","axum",@@ -4240,7 +4403,7 @@ dependencies = [[[package]]name = "openhuman-tinyhumans"-version = "0.64.10"+version = "0.64.12"dependencies = ["aes-gcm","anyhow",@@ -4271,7 +4434,7 @@ dependencies = [[[package]]name = "openhuman-tui"-version = "0.64.10"+version = "0.64.12"dependencies = ["anyhow","async-trait",@@ -4464,6 +4627,23 @@ dependencies = ["hmac 0.12.1",]+[[package]]+name = "pdf-extract"+version = "0.12.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e5c4820f5811e424ce037d08493ac87752ecc54339e0f1e40c3d17da93278861"+dependencies = [+ "adobe-cmap-parser",+ "cff-parser",+ "encoding_rs",+ "euclid 0.20.14",+ "log",+ "lopdf",+ "postscript",+ "type1-encoding-parser",+ "unicode-normalization",+]+[[package]]name = "percent-encoding"version = "2.3.2"@@ -4638,7 +4818,7 @@ checksum = "2896bade328c13f7042a297ea5ac5b0951f6cf989dea5f32c2fd98da398195cb"dependencies = ["base64 0.23.1","indexmap",- "quick-xml",+ "quick-xml 0.42.0","serde","time",]@@ -4690,6 +4870,12 @@ dependencies = ["universal-hash 0.6.1",]+[[package]]+name = "pom"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "60f6ce597ecdcc9a098e7fddacb1065093a3d66446fa16c675e7e71d1b5c28e6"+[[package]]name = "portable-atomic"version = "1.15.0"@@ -4705,6 +4891,12 @@ dependencies = ["portable-atomic",]+[[package]]+name = "postscript"+version = "0.14.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "78451badbdaebaf17f053fd9152b3ffb33b516104eacb45e7864aaa9c712f306"+[[package]]name = "potential_utf"version = "0.1.6"@@ -4827,6 +5019,16 @@ version = "2.0.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"+[[package]]+name = "quick-xml"+version = "0.41.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1"+dependencies = [+ "encoding_rs",+ "memchr",+]+[[package]]name = "quick-xml"version = "0.42.0"@@ -5019,6 +5221,12 @@ dependencies = ["rand_core 0.9.5",]+[[package]]+name = "rangemap"+version = "1.8.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a611d15b50743feb4c76b7d03edcb0e64f399c26961e4efe6975bc398be6aa3d"+[[package]]name = "ratatui"version = "0.30.2"@@ -6111,6 +6319,17 @@ dependencies = ["pin-project-lite",]+[[package]]+name = "stringprep"+version = "0.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1"+dependencies = [+ "unicode-bidi",+ "unicode-normalization",+ "unicode-properties",+]+[[package]]name = "strsim"version = "0.11.1"@@ -6483,7 +6702,7 @@ dependencies = ["tracing","uuid","wait-timeout",- "zip",+ "zip 2.4.2",][[package]]@@ -6621,7 +6840,7 @@ dependencies = ["toml","tracing","ureq",- "zip",+ "zip 2.4.2",][[package]]@@ -7113,42 +7332,46 @@ dependencies = [[[package]]name = "tinymemory-api"-version = "1.23.1"+version = "1.23.4"dependencies = ["async-trait","chrono","serde","serde_json",- "sha2 0.10.9",+ "sha2 0.11.0","thiserror 2.0.20",][[package]]name = "tinymemory-integrations"-version = "1.23.1"+version = "1.23.4"dependencies = ["async-trait",+ "calamine","chrono","futures","log",+ "pdf-extract",+ "quick-xml 0.41.0","regex","reqwest","rusqlite","schemars","serde","serde_json",- "sha2 0.10.9",+ "sha2 0.11.0","thiserror 2.0.20","tinymemory-api","tinymemory-tools","tokio","tracing","walkdir",+ "zip 8.6.0",][[package]]name = "tinymemory-tools"-version = "1.23.1"+version = "1.23.4"dependencies = ["chrono","futures",@@ -7677,6 +7900,12 @@ version = "0.2.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"+[[package]]+name = "ttf-parser"+version = "0.25.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31"+[[package]]name = "tungstenite"version = "0.24.0"@@ -7714,12 +7943,27 @@ dependencies = ["thiserror 2.0.20",]+[[package]]+name = "type1-encoding-parser"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fa10c302f5a53b7ad27fd42a3996e23d096ba39b5b8dd6d9e683a05b01bee749"+dependencies = [+ "pom",+]+[[package]]name = "typed-arena"version = "2.0.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a"+[[package]]+name = "typed-path"+version = "0.12.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e"+[[package]]name = "typenum"version = "1.20.1"@@ -7753,12 +7997,33 @@ version = "2.9.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142"+[[package]]+name = "unicode-bidi"+version = "0.3.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5"+[[package]]name = "unicode-ident"version = "1.0.26"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"+[[package]]+name = "unicode-normalization"+version = "0.1.25"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8"+dependencies = [+ "tinyvec",+]++[[package]]+name = "unicode-properties"+version = "0.1.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d"+[[package]]name = "unicode-segmentation"version = "1.13.3"@@ -8051,7 +8316,7 @@ dependencies = ["async-trait","buffa","bytes",- "cbc",+ "cbc 0.2.1","chrono","ctr 0.10.1","curve25519-dalek 5.0.0",@@ -8336,7 +8601,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7012add459f951456ec9d6c7e6fc340b1ce15d6fc9629f8c42853412c029e57e"dependencies = ["bitflags 1.3.2",- "euclid",+ "euclid 0.22.14","lazy_static","serde","wezterm-dynamic",@@ -9074,6 +9339,20 @@ dependencies = ["zopfli",]+[[package]]+name = "zip"+version = "8.6.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2d04a6b5381502aa6087c94c669499eb1602eb9c5e8198e534de571f7154809b"+dependencies = [+ "crc32fast",+ "flate2",+ "indexmap",+ "memchr",+ "typed-path",+ "zopfli",+]+[[package]]name = "zlib-rs"version = "0.6.8"diff --git a/Cargo.toml b/Cargo.tomlindex 8734be5364..5fe49b9f04 100644--- a/Cargo.toml+++ b/Cargo.toml@@ -29,7 +29,7 @@ exclude = [][workspace.package]-version = "0.64.10"+version = "0.64.12"edition = "2021"license = "GPL-3.0-only"repository = "https://github.com/tinyhumansai/openhuman"diff --git a/README.md b/README.mdindex 704cc1c050..9ec305fba1 100644--- a/README.md+++ b/README.md@@ -38,7 +38,7 @@</p><p align="center">- 🇺🇸 <a href="./README.md">English</a> | 🇨🇳 <a href="./docs/README.zh-CN.md">简体中文</a> | 🇯🇵 <a href="./docs/README.ja-JP.md">日本語</a> | 🇰🇷 <a href="./docs/README.ko.md">한국어</a> | 🇩🇪 <a href="./docs/README.de.md">Deutsch</a> | 🇹🇷 <a href="./docs/README.tr.md">Türkçe</a> | 🇵🇰 <a href="./docs/README.ur-pk.md">اردو</a>+ 🇺🇸 <a href="./README.md">English</a> | 🇸🇦 <a href="./docs/README.ar.md">العربية</a> | 🇨🇳 <a href="./docs/README.zh-CN.md">简体中文</a> | 🇯🇵 <a href="./docs/README.ja-JP.md">日本語</a> | 🇰🇷 <a href="./docs/README.ko.md">한국어</a> | 🇩🇪 <a href="./docs/README.de.md">Deutsch</a> | 🇹🇷 <a href="./docs/README.tr.md">Türkçe</a> | 🇵🇰 <a href="./docs/README.ur-pk.md">اردو</a></p><p align="center">diff --git a/app/package.json b/app/package.jsonindex 2e17fa2a39..dac7783d03 100644--- a/app/package.json+++ b/app/package.json@@ -1,6 +1,6 @@{"name": "openhuman-app",- "version": "0.64.10",+ "version": "0.64.12","type": "module","engines": {"node": ">=24.0.0"diff --git a/app/scripts/e2e-run-all-flows.sh b/app/scripts/e2e-run-all-flows.shindex 9df79e6bb9..6496d72a0b 100755--- a/app/scripts/e2e-run-all-flows.sh+++ b/app/scripts/e2e-run-all-flows.sh@@ -244,6 +244,7 @@ if should_run_suite "navigation"; thenrun "test/e2e/specs/navigation-settings-panels.spec.ts" "navigation-settings" "navigation"run "test/e2e/specs/command-palette.spec.ts" "command-palette" "navigation"run "test/e2e/specs/channels-smoke.spec.ts" "channels-smoke" "navigation"+ run "test/e2e/specs/chip-tabs-keyboard.spec.ts" "chip-tabs-keyboard" "navigation"run "test/e2e/specs/guided-tour-gates.spec.ts" "guided-tour-gates" "navigation"_mini_summary "navigation"fi@@ -407,6 +408,7 @@ if should_run_suite "settings"; thenrun "test/e2e/specs/settings-advanced-config.spec.ts" "settings-advanced" "settings"run "test/e2e/specs/settings-feature-preferences.spec.ts" "settings-features" "settings"run "test/e2e/specs/settings-search.spec.ts" "settings-search" "settings"+ run "test/e2e/specs/chip-tabs-keyboard.spec.ts" "chip-tabs-keyboard" "settings"_mini_summary "settings"fidiff --git a/app/src/components/BootCheckGate/BootCheckGate.tsx b/app/src/components/BootCheckGate/BootCheckGate.tsxindex 8a6232f9f8..a017bea563 100644--- a/app/src/components/BootCheckGate/BootCheckGate.tsx+++ b/app/src/components/BootCheckGate/BootCheckGate.tsx@@ -37,7 +37,6 @@ import {} from '../../utils/configPersistence';import { isTauri } from '../../utils/tauriCommands/common';import AppBackground from '../AppBackground';-import LanguageSelect from '../LanguageSelect';import Button from '../ui/Button';const log = debug('boot-check');@@ -96,15 +95,6 @@ function Panel({ children }: PanelProps) {);}-function BootCheckLanguageSelect() {- const { t } = useT();- return (- <div className="absolute right-5 top-5">- <LanguageSelect id="boot-check-language" ariaLabel={t('settings.language')} />- </div>- );-}-// ---------------------------------------------------------------------------// Picker (first-ever launch)// ---------------------------------------------------------------------------@@ -238,7 +228,10 @@ function ModePicker({ onConfirm }: PickerProps) {return (<Panel>- <BootCheckLanguageSelect />+ {/* A stable hook for the E2E readiness helper. It used to match the+ picker by its heading text, so renaming the copy made the wait pass+ vacuously for every spec. */}+ <div data-testid="boot-check-picker" hidden /><h2 className="text-xl font-semibold text-content">{isDesktop ? t('bootCheck.chooseCoreMode') : t('bootCheck.connectToCore')}</h2>@@ -325,8 +318,7 @@ function ModePicker({ onConfirm }: PickerProps) {</div><div className="flex flex-col gap-1"><label className="text-xs font-medium text-content-secondary">- {t('bootCheck.authToken')} (- <code className="text-[10px]">OPENHUMAN_CORE_TOKEN</code>)+ {t('bootCheck.authToken')}</label><inputtype="text"@@ -577,8 +569,24 @@ export default function BootCheckGate({ children }: BootCheckGateProps) {const dispatch = useAppDispatch();const coreMode = useAppSelector(state => state.coreMode.mode);+ /**+ * A first launch boots local without asking.+ *+ * The picker used to greet every new user with an infrastructure question+ * before the app had shown them anything. It cannot be answered on a first+ * run either: the cloud branch needs a URL and a bearer for a core the user+ * must already have deployed, so anyone able to answer it has by definition+ * been here before. Local is right for essentially everyone, and when it is+ * not — a port conflict, a core that will not start — the boot check already+ * surfaces a typed failure with a targeted recovery, which is a far better+ * moment to ask than a cold start.+ *+ * The web build is the exception: it cannot spawn a local core, so cloud is+ * its only option and the picker stays its first screen.+ */+ const canBootLocal = isTauri();const [phase, setPhase] = useState<Phase>(() =>- coreMode.kind === 'unset' ? 'picker' : 'checking'+ coreMode.kind === 'unset' && !canBootLocal ? 'picker' : 'checking');const [result, setResult] = useState<BootCheckResult | null>(null);const [actionBusy, setActionBusy] = useState(false);@@ -629,10 +637,23 @@ export default function BootCheckGate({ children }: BootCheckGateProps) {// do not synchronously cascade — suppress the linter warning here.useEffect(() => {+ if (coreMode.kind === 'unset' && canBootLocal && phase === 'checking') {+ // Adopt local the same way the picker's Continue would, so the+ // synchronous localStorage marker is written before any reload can+ // race the persisted slice (see `deriveInitialMode`).+ log('[boot-check] gate — first launch, booting local without asking');+ storeRpcUrl('');+ clearStoredCoreToken();+ storeCoreMode('local');+ clearCoreRpcUrlCache();+ clearCoreRpcTokenCache();+ dispatch(setCoreMode({ kind: 'local' }));+ return;+ }if (coreMode.kind !== 'unset' && phase === 'checking') {void runCheck(coreMode);}- }, [coreMode, phase, runCheck]);+ }, [coreMode, phase, runCheck, canBootLocal, dispatch]);// ------------------------------------------------------------------// Picker confirm — dispatches setCoreMode and kicks off check.@@ -795,6 +816,14 @@ export default function BootCheckGate({ children }: BootCheckGateProps) {// Render// ------------------------------------------------------------------+ // A desktop first launch is on its way to local: the effect above dispatches+ // the mode, but it runs AFTER this render, so the unset mode would fall into+ // the picker branch below and flash the very screen the demotion removes.+ // Show the checking screen instead and let the effect catch up.+ if (canBootLocal && coreMode.kind === 'unset' && phase === 'checking') {+ return <CheckingScreen />;+ }+// Unset — show picker (even if Redux persisted something; phase reflects truth).if (phase === 'picker' || coreMode.kind === 'unset') {return (diff --git a/app/src/components/BootCheckGate/__tests__/BootCheckGate.test.tsx b/app/src/components/BootCheckGate/__tests__/BootCheckGate.test.tsxindex 29aa93d9e3..a5b86c6ebd 100644--- a/app/src/components/BootCheckGate/__tests__/BootCheckGate.test.tsx+++ b/app/src/components/BootCheckGate/__tests__/BootCheckGate.test.tsx@@ -13,8 +13,10 @@ import { fireEvent, render, screen, waitFor } from '@testing-library/react';import { Provider } from 'react-redux';import { beforeEach, describe, expect, it, vi } from 'vitest';+import en from '../../../lib/i18n/en';import coreModeReducer, { type CoreModeState } from '../../../store/coreModeSlice';import localeReducer from '../../../store/localeSlice';+import { clearStoredCoreToken, storeCoreMode, storeRpcUrl } from '../../../utils/configPersistence';import BootCheckGate from '../BootCheckGate';// The global test setup mocks isTauri()=>false (web). The existing picker@@ -23,6 +25,14 @@ import BootCheckGate from '../BootCheckGate';// describe at the bottom flips it back to false.const mockedIsTauri = vi.mocked(isTauri);+// Assert against the real English dictionary so copy edits do not silently+// turn these behavioural tests red (or green).+const copy = (key: string): string => {+ const value = (en as Record<string, string>)[key];+ if (value === undefined) throw new Error(`missing en key ${key}`);+ return value;+};+// ---------------------------------------------------------------------------// Mocks// ---------------------------------------------------------------------------@@ -86,6 +96,21 @@ function renderGate(store = makeStore()) {);}+/**+ * Reach the picker the way a real desktop user now does: first launch+ * auto-boots local (no picker), the boot check comes back unreachable, and the+ * user clicks copy('bootCheck.switchMode'). Consumes exactly one+ * `mockRunBootCheck` result (queued with `Once`), so callers may set their own+ * default result beforehand for what happens after the picker's Continue.+ */+async function renderPicker(store = makeStore()) {+ mockRunBootCheck.mockResolvedValueOnce({ kind: 'unreachable', reason: 'Connection refused' });+ const view = renderGate(store);+ fireEvent.click(await screen.findByRole('button', { name: copy('bootCheck.switchMode') }));+ await screen.findByText(copy('bootCheck.chooseCoreMode'));+ return view;+}+// ---------------------------------------------------------------------------// Tests// ---------------------------------------------------------------------------@@ -95,23 +120,66 @@ beforeEach(() => {mockedIsTauri.mockReturnValue(true);});-describe('BootCheckGate — picker (unset mode)', () => {- it('shows the mode picker when coreMode is unset', () => {- renderGate();- expect(screen.getByText('Select a Runtime')).toBeInTheDocument();- expect(screen.getByText('Run Locally (Recommended)')).toBeInTheDocument();- expect(screen.getByText('Run on the Cloud (Complex)')).toBeInTheDocument();+describe('BootCheckGate — first launch on desktop (unset mode)', () => {+ beforeEach(() => {+ mockRunBootCheck.mockReset();+ vi.mocked(storeCoreMode).mockClear();+ });++ // The picker used to be the first screen. It asked an infrastructure+ // question before the app showed anything, and its cloud branch cannot be+ // answered on a genuine first run (needs a URL + bearer for an already+ // deployed core). It is now a fallback, not an entry point.+ it('does not show the picker and proceeds to the checking phase', async () => {+ mockRunBootCheck.mockImplementation(() => new Promise(() => {}));+ const store = makeStore();+ renderGate(store);++ await waitFor(() => {+ expect(screen.getByText(copy('bootCheck.checkingCore'))).toBeInTheDocument();+ });+ expect(screen.queryByText(copy('bootCheck.chooseCoreMode'))).not.toBeInTheDocument();+ expect(screen.queryByText(copy('bootCheck.localRecommended'))).not.toBeInTheDocument();+ expect(store.getState().coreMode.mode).toEqual({ kind: 'local' });});- it('does NOT render children while in picker', () => {+ it('adopts local mode and persists the marker', async () => {+ mockRunBootCheck.mockResolvedValue({ kind: 'match' });renderGate();++ await waitFor(() => {+ expect(screen.getByTestId('app-content')).toBeInTheDocument();+ });+ expect(storeCoreMode).toHaveBeenCalledWith('local');+ expect(clearStoredCoreToken).toHaveBeenCalled();+ expect(storeRpcUrl).toHaveBeenCalledWith('');+ expect(mockRunBootCheck).toHaveBeenCalledWith({ kind: 'local' }, expect.any(Object));+ });++ it('reaches the picker as a fallback when local boot fails', async () => {+ await renderPicker();+ expect(screen.getByText(copy('bootCheck.localRecommended'))).toBeInTheDocument();+ expect(screen.getByText(copy('bootCheck.cloudMode'))).toBeInTheDocument();+ });+});++describe('BootCheckGate — picker (reached via Pick a Different Runtime)', () => {+ it('shows the mode picker when coreMode is unset', async () => {+ await renderPicker();+ expect(screen.getByText(copy('bootCheck.chooseCoreMode'))).toBeInTheDocument();+ expect(screen.getByText(copy('bootCheck.localRecommended'))).toBeInTheDocument();+ expect(screen.getByText(copy('bootCheck.cloudMode'))).toBeInTheDocument();+ });++ it('does NOT render children while in picker', async () => {+ await renderPicker();expect(screen.queryByTestId('app-content')).not.toBeInTheDocument();});it('continues with local mode when user clicks Continue', async () => {mockRunBootCheck.mockResolvedValue({ kind: 'match' });- renderGate();+ await renderPicker();// Local is pre-selected — just click ContinuefireEvent.click(screen.getByRole('button', { name: 'Continue' }));@@ -121,27 +189,27 @@ describe('BootCheckGate — picker (unset mode)', () => {});});- it('shows URL input when user selects Cloud', () => {- renderGate();+ it('shows URL input when user selects Cloud', async () => {+ await renderPicker();- fireEvent.click(screen.getByText('Run on the Cloud (Complex)'));+ fireEvent.click(screen.getByText(copy('bootCheck.cloudMode')));expect(screen.getByPlaceholderText(/https:\/\/core\.example\.com/)).toBeInTheDocument();});- it('shows URL validation error when cloud URL is empty', () => {- renderGate();+ it('shows URL validation error when cloud URL is empty', async () => {+ await renderPicker();- fireEvent.click(screen.getByText('Run on the Cloud (Complex)'));+ fireEvent.click(screen.getByText(copy('bootCheck.cloudMode')));fireEvent.click(screen.getByRole('button', { name: 'Continue' }));- expect(screen.getByText('Please enter a runtime URL.')).toBeInTheDocument();+ expect(screen.getByText(copy('bootCheck.invalidUrl'))).toBeInTheDocument();});- it('shows URL validation error for non-http URL', () => {- renderGate();+ it('shows URL validation error for non-http URL', async () => {+ await renderPicker();- fireEvent.click(screen.getByText('Run on the Cloud (Complex)'));+ fireEvent.click(screen.getByText(copy('bootCheck.cloudMode')));const input = screen.getByPlaceholderText(/https:\/\/core\.example\.com/);fireEvent.change(input, { target: { value: 'ftp://invalid' } });fireEvent.click(screen.getByRole('button', { name: 'Continue' }));@@ -149,10 +217,10 @@ describe('BootCheckGate — picker (unset mode)', () => {expect(screen.getByText(/start with http/)).toBeInTheDocument();});- it('shows URL validation error for malformed URL string', () => {- renderGate();+ it('shows URL validation error for malformed URL string', async () => {+ await renderPicker();- fireEvent.click(screen.getByText('Run on the Cloud (Complex)'));+ fireEvent.click(screen.getByText(copy('bootCheck.cloudMode')));const input = screen.getByPlaceholderText(/https:\/\/core\.example\.com/);fireEvent.change(input, { target: { value: 'not a url at all' } });fireEvent.click(screen.getByRole('button', { name: 'Continue' }));@@ -160,10 +228,10 @@ describe('BootCheckGate — picker (unset mode)', () => {expect(screen.getByText(/That doesn't look like a valid URL/)).toBeInTheDocument();});- it('shows token validation error when cloud URL is valid but token is missing', () => {- renderGate();+ it('shows token validation error when cloud URL is valid but token is missing', async () => {+ await renderPicker();- fireEvent.click(screen.getByText('Run on the Cloud (Complex)'));+ fireEvent.click(screen.getByText(copy('bootCheck.cloudMode')));const urlInput = screen.getByPlaceholderText(/https:\/\/core\.example\.com/);fireEvent.change(urlInput, { target: { value: 'https://core.example.com/rpc' } });// Token left blank.@@ -175,12 +243,12 @@ describe('BootCheckGate — picker (unset mode)', () => {it('accepts a Tailscale HTTP core URL in cloud mode', async () => {mockRunBootCheck.mockResolvedValue({ kind: 'match' });- renderGate();- fireEvent.click(screen.getByText('Run on the Cloud (Complex)'));+ await renderPicker();+ fireEvent.click(screen.getByText(copy('bootCheck.cloudMode')));fireEvent.change(screen.getByPlaceholderText(/https:\/\/core\.example\.com/), {target: { value: 'http://100.116.244.64:7788/rpc' },});- fireEvent.change(screen.getByPlaceholderText(/Bearer token/i), {+ fireEvent.change(screen.getByPlaceholderText(copy('bootCheck.bearerTokenPlaceholder')), {target: { value: 'tok-1234' },});fireEvent.click(screen.getByRole('button', { name: 'Continue' }));@@ -201,12 +269,12 @@ describe('BootCheckGate — picker (unset mode)', () => {it('normalizes a cloud core base URL to the /rpc endpoint before continuing', async () => {mockRunBootCheck.mockResolvedValue({ kind: 'match' });- renderGate();- fireEvent.click(screen.getByText('Run on the Cloud (Complex)'));+ await renderPicker();+ fireEvent.click(screen.getByText(copy('bootCheck.cloudMode')));fireEvent.change(screen.getByPlaceholderText(/https:\/\/core\.example\.com/), {target: { value: 'https://example.trycloudflare.com/' },});- fireEvent.change(screen.getByPlaceholderText(/Bearer token/i), {+ fireEvent.change(screen.getByPlaceholderText(copy('bootCheck.bearerTokenPlaceholder')), {target: { value: 'tok-1234' },});fireEvent.click(screen.getByRole('button', { name: 'Continue' }));@@ -227,16 +295,16 @@ describe('BootCheckGate — picker (unset mode)', () => {it('warns about public HTTP cloud URLs but does not block them', async () => {mockRunBootCheck.mockResolvedValue({ kind: 'match' });- renderGate();+ await renderPicker();- fireEvent.click(screen.getByText('Run on the Cloud (Complex)'));+ fireEvent.click(screen.getByText(copy('bootCheck.cloudMode')));const urlInput = screen.getByPlaceholderText(/https:\/\/core\.example\.com/);fireEvent.change(urlInput, { target: { value: 'http://core.example.com/rpc' } });// Non-blocking warning shows inline as soon as the public HTTP URL is typed.expect(screen.getByText(/traffic will not be encrypted/i)).toBeInTheDocument();- fireEvent.change(screen.getByPlaceholderText(/Bearer token/i), {+ fireEvent.change(screen.getByPlaceholderText(copy('bootCheck.bearerTokenPlaceholder')), {target: { value: 'tok-1234' },});fireEvent.click(screen.getByRole('button', { name: 'Continue' }));@@ -254,17 +322,17 @@ describe('BootCheckGate — picker (unset mode)', () => {});});- it('clears the token error as soon as the user types into the token field', () => {- renderGate();+ it('clears the token error as soon as the user types into the token field', async () => {+ await renderPicker();- fireEvent.click(screen.getByText('Run on the Cloud (Complex)'));+ fireEvent.click(screen.getByText(copy('bootCheck.cloudMode')));fireEvent.change(screen.getByPlaceholderText(/https:\/\/core\.example\.com/), {target: { value: 'https://core.example.com/rpc' },});fireEvent.click(screen.getByRole('button', { name: 'Continue' }));expect(screen.getByText(/We'll need an auth token to connect/i)).toBeInTheDocument();- const tokenInput = screen.getByPlaceholderText(/Bearer token/i);+ const tokenInput = screen.getByPlaceholderText(copy('bootCheck.bearerTokenPlaceholder'));fireEvent.change(tokenInput, { target: { value: 'tok' } });expect(screen.queryByText(/We'll need an auth token to connect/i)).not.toBeInTheDocument();@@ -273,12 +341,12 @@ describe('BootCheckGate — picker (unset mode)', () => {it('advances past picker and triggers boot check when cloud URL + token are both set', async () => {mockRunBootCheck.mockResolvedValue({ kind: 'match' });- renderGate();- fireEvent.click(screen.getByText('Run on the Cloud (Complex)'));+ await renderPicker();+ fireEvent.click(screen.getByText(copy('bootCheck.cloudMode')));fireEvent.change(screen.getByPlaceholderText(/https:\/\/core\.example\.com/), {target: { value: 'https://core.example.com/rpc' },});- fireEvent.change(screen.getByPlaceholderText(/Bearer token/i), {+ fireEvent.change(screen.getByPlaceholderText(copy('bootCheck.bearerTokenPlaceholder')), {target: { value: 'tok-1234' },});fireEvent.click(screen.getByRole('button', { name: 'Continue' }));@@ -303,11 +371,13 @@ describe('BootCheckGate — picker test connection', () => {});function fillCloudInputs(url = 'https://core.example.com/rpc', token = 'tok-abc') {- fireEvent.click(screen.getByText('Run on the Cloud (Complex)'));+ fireEvent.click(screen.getByText(copy('bootCheck.cloudMode')));fireEvent.change(screen.getByPlaceholderText(/https:\/\/core\.example\.com/), {target: { value: url },});- fireEvent.change(screen.getByPlaceholderText(/Bearer token/i), { target: { value: token } });+ fireEvent.change(screen.getByPlaceholderText(copy('bootCheck.bearerTokenPlaceholder')), {+ target: { value: token },+ });}it('shows Connected on a 200 response', async () => {@@ -317,7 +387,7 @@ describe('BootCheckGate — picker test connection', () => {json: async () => ({ result: { ok: true } }),} as unknown as Response);- renderGate();+ await renderPicker();fillCloudInputs();fireEvent.click(screen.getByRole('button', { name: 'Test Connection' }));@@ -337,7 +407,7 @@ describe('BootCheckGate — picker test connection', () => {json: async () => ({ result: { ok: true } }),} as unknown as Response);- renderGate();+ await renderPicker();fillCloudInputs('https://example.trycloudflare.com/');fireEvent.click(screen.getByRole('button', { name: 'Test Connection' }));@@ -357,7 +427,7 @@ describe('BootCheckGate — picker test connection', () => {json: async () => ({ error: 'unauthorized' }),} as unknown as Response);- renderGate();+ await renderPicker();fillCloudInputs();fireEvent.click(screen.getByRole('button', { name: 'Test Connection' }));@@ -373,7 +443,7 @@ describe('BootCheckGate — picker test connection', () => {json: async () => ({}),} as unknown as Response);- renderGate();+ await renderPicker();fillCloudInputs();fireEvent.click(screen.getByRole('button', { name: 'Test Connection' }));@@ -385,7 +455,7 @@ describe('BootCheckGate — picker test connection', () => {it('shows Unreachable when fetch rejects', async () => {mockTestCoreRpcConnection.mockRejectedValue(new Error('network down'));- renderGate();+ await renderPicker();fillCloudInputs();fireEvent.click(screen.getByRole('button', { name: 'Test Connection' }));@@ -402,7 +472,7 @@ describe('BootCheckGate — picker test connection', () => {json: async () => ({}),} as unknown as Response);- renderGate();+ await renderPicker();fillCloudInputs();fireEvent.click(screen.getByRole('button', { name: 'Test Connection' }));@@ -412,18 +482,18 @@ describe('BootCheckGate — picker test connection', () => {expect(screen.getByTestId('test-status-unreachable').textContent).toMatch(/HTTP 500/);});- it('does not call the test endpoint when URL is missing', () => {- renderGate();- fireEvent.click(screen.getByText('Run on the Cloud (Complex)'));+ it('does not call the test endpoint when URL is missing', async () => {+ await renderPicker();+ fireEvent.click(screen.getByText(copy('bootCheck.cloudMode')));fireEvent.click(screen.getByRole('button', { name: 'Test Connection' }));expect(mockTestCoreRpcConnection).not.toHaveBeenCalled();- expect(screen.getByText('Please enter a runtime URL.')).toBeInTheDocument();+ expect(screen.getByText(copy('bootCheck.invalidUrl'))).toBeInTheDocument();});- it('does not call the test endpoint when token is missing', () => {- renderGate();- fireEvent.click(screen.getByText('Run on the Cloud (Complex)'));+ it('does not call the test endpoint when token is missing', async () => {+ await renderPicker();+ fireEvent.click(screen.getByText(copy('bootCheck.cloudMode')));fireEvent.change(screen.getByPlaceholderText(/https:\/\/core\.example\.com/), {target: { value: 'https://core.example.com/rpc' },});@@ -440,14 +510,14 @@ describe('BootCheckGate — picker test connection', () => {json: async () => ({}),} as unknown as Response);- renderGate();+ await renderPicker();fillCloudInputs();fireEvent.click(screen.getByRole('button', { name: 'Test Connection' }));await waitFor(() => {expect(screen.getByTestId('test-status-ok')).toBeInTheDocument();});- fireEvent.change(screen.getByPlaceholderText(/Bearer token/i), {+ fireEvent.change(screen.getByPlaceholderText(copy('bootCheck.bearerTokenPlaceholder')), {target: { value: 'tok-def' },});@@ -461,10 +531,9 @@ describe('BootCheckGate — checking state', () => {mockRunBootCheck.mockImplementation(() => new Promise(() => {}));renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {- expect(screen.getByText('Waking up your runtime…')).toBeInTheDocument();+ expect(screen.getByText(copy('bootCheck.checkingCore'))).toBeInTheDocument();});});});@@ -474,7 +543,6 @@ describe('BootCheckGate — match result', () => {mockRunBootCheck.mockResolvedValue({ kind: 'match' });renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {expect(screen.getByTestId('app-content')).toBeInTheDocument();@@ -487,10 +555,9 @@ describe('BootCheckGate — daemonDetected', () => {mockRunBootCheck.mockResolvedValue({ kind: 'daemonDetected' });renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {- expect(screen.getByText('Legacy Background Runtime Detected')).toBeInTheDocument();+ expect(screen.getByText(copy('bootCheck.legacyDetected'))).toBeInTheDocument();expect(screen.getByRole('button', { name: 'Remove and Continue' })).toBeInTheDocument();});});@@ -501,11 +568,12 @@ describe('BootCheckGate — outdatedLocal', () => {mockRunBootCheck.mockResolvedValue({ kind: 'outdatedLocal' });renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {- expect(screen.getByText('Local Runtime Needs a Restart')).toBeInTheDocument();- expect(screen.getByRole('button', { name: 'Restart Runtime' })).toBeInTheDocument();+ expect(screen.getByText(copy('bootCheck.localNeedsRestart'))).toBeInTheDocument();+ expect(+ screen.getByRole('button', { name: copy('bootCheck.restartCore') })+ ).toBeInTheDocument();});});});@@ -526,8 +594,10 @@ describe('BootCheckGate — outdatedCloud', () => {);await waitFor(() => {- expect(screen.getByText('Cloud Runtime Needs an Update')).toBeInTheDocument();- expect(screen.getByRole('button', { name: 'Update Cloud Runtime' })).toBeInTheDocument();+ expect(screen.getByText(copy('bootCheck.cloudNeedsUpdate'))).toBeInTheDocument();+ expect(+ screen.getByRole('button', { name: copy('bootCheck.updateCloudCore') })+ ).toBeInTheDocument();});});});@@ -537,10 +607,9 @@ describe('BootCheckGate — noVersionMethod', () => {mockRunBootCheck.mockResolvedValue({ kind: 'noVersionMethod' });renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {- expect(screen.getByText('Runtime Version Check Failed')).toBeInTheDocument();+ expect(screen.getByText(copy('bootCheck.versionCheckFailed'))).toBeInTheDocument();});});});@@ -550,29 +619,31 @@ describe('BootCheckGate — unreachable', () => {mockRunBootCheck.mockResolvedValue({ kind: 'unreachable', reason: 'Connection refused' });renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {- expect(screen.getByText("Can't Reach the Runtime")).toBeInTheDocument();+ expect(screen.getByText(copy('bootCheck.cannotReach'))).toBeInTheDocument();expect(screen.getByRole('button', { name: 'Quit' })).toBeInTheDocument();- expect(screen.getByRole('button', { name: 'Pick a Different Runtime' })).toBeInTheDocument();+ expect(+ screen.getByRole('button', { name: copy('bootCheck.switchMode') })+ ).toBeInTheDocument();});});- it("returns to picker when 'Pick a Different Runtime' is clicked", async () => {+ it('returns to picker when the switch-mode button is clicked', async () => {mockRunBootCheck.mockResolvedValue({ kind: 'unreachable', reason: 'Connection refused' });renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {- expect(screen.getByRole('button', { name: 'Pick a Different Runtime' })).toBeInTheDocument();+ expect(+ screen.getByRole('button', { name: copy('bootCheck.switchMode') })+ ).toBeInTheDocument();});- fireEvent.click(screen.getByRole('button', { name: 'Pick a Different Runtime' }));+ fireEvent.click(screen.getByRole('button', { name: copy('bootCheck.switchMode') }));await waitFor(() => {- expect(screen.getByText('Select a Runtime')).toBeInTheDocument();+ expect(screen.getByText(copy('bootCheck.chooseCoreMode'))).toBeInTheDocument();});});});@@ -595,10 +666,10 @@ describe('BootCheckGate — pre-set mode (subsequent launches)', () => {);await waitFor(() => {- expect(screen.getByText('Waking up your runtime…')).toBeInTheDocument();+ expect(screen.getByText(copy('bootCheck.checkingCore'))).toBeInTheDocument();});- expect(screen.queryByText('Select a Runtime')).not.toBeInTheDocument();+ expect(screen.queryByText(copy('bootCheck.chooseCoreMode'))).not.toBeInTheDocument();});});@@ -616,7 +687,6 @@ describe('BootCheckGate — port conflict recovery', () => {});renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {expect(screen.getByTestId('fix-automatically-btn')).toBeInTheDocument();@@ -628,10 +698,9 @@ describe('BootCheckGate — port conflict recovery', () => {mockRunBootCheck.mockResolvedValue({ kind: 'unreachable', reason: 'some other error' });renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {- expect(screen.getByText("Can't Reach the Runtime")).toBeInTheDocument();+ expect(screen.getByText(copy('bootCheck.cannotReach'))).toBeInTheDocument();});expect(screen.queryByTestId('fix-automatically-btn')).not.toBeInTheDocument();});@@ -643,7 +712,6 @@ describe('BootCheckGate — port conflict recovery', () => {mockRecoverPortConflict.mockResolvedValue({ success: true, message: 'ok', new_port: 7789 });renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {expect(screen.getByTestId('fix-automatically-btn')).toBeInTheDocument();@@ -663,7 +731,6 @@ describe('BootCheckGate — port conflict recovery', () => {mockRecoverPortConflict.mockResolvedValue({ success: true, message: 'ok', new_port: 7789 });renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {expect(screen.getByTestId('fix-automatically-btn')).toBeInTheDocument();@@ -690,7 +757,6 @@ describe('BootCheckGate — port conflict recovery', () => {});renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {expect(screen.getByTestId('fix-automatically-btn')).toBeInTheDocument();@@ -705,7 +771,7 @@ describe('BootCheckGate — port conflict recovery', () => {});});- it('"Pick a Different Runtime" still renders as secondary for port conflict', async () => {+ it('the switch-mode button still renders as secondary for port conflict', async () => {mockRunBootCheck.mockResolvedValue({kind: 'unreachable',reason: 'port conflict',@@ -713,10 +779,11 @@ describe('BootCheckGate — port conflict recovery', () => {});renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {- expect(screen.getByRole('button', { name: 'Pick a Different Runtime' })).toBeInTheDocument();+ expect(+ screen.getByRole('button', { name: copy('bootCheck.switchMode') })+ ).toBeInTheDocument();});});});@@ -739,7 +806,6 @@ describe('BootCheckGate — foreign port owner', () => {mockRunBootCheck.mockResolvedValue(foreignResult);renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {expect(screen.getByTestId('force-quit-owner-btn')).toBeInTheDocument();@@ -754,7 +820,6 @@ describe('BootCheckGate — foreign port owner', () => {mockForceQuitPortOwner.mockResolvedValue({ success: true, message: 'ok', new_port: 7789 });renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {expect(screen.getByTestId('force-quit-owner-btn')).toBeInTheDocument();@@ -773,7 +838,6 @@ describe('BootCheckGate — foreign port owner', () => {mockForceQuitPortOwner.mockResolvedValue({ success: false, message: 'access denied' });renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {expect(screen.getByTestId('force-quit-owner-btn')).toBeInTheDocument();@@ -798,7 +862,6 @@ describe('BootCheckGate — foreign port owner', () => {});renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {expect(screen.getByTestId('fix-automatically-btn')).toBeInTheDocument();@@ -820,7 +883,6 @@ describe('BootCheckGate — foreign port owner', () => {});renderGate();- fireEvent.click(screen.getByRole('button', { name: 'Continue' }));await waitFor(() => {expect(screen.getByTestId('force-quit-owner-btn')).toBeInTheDocument();@@ -834,18 +896,28 @@ describe('BootCheckGate — foreign port owner', () => {describe('BootCheckGate — picker (web build, !isTauri)', () => {beforeEach(() => {mockedIsTauri.mockReturnValue(false);+ vi.mocked(storeCoreMode).mockClear();+ });++ it('shows the picker as the FIRST screen and does not auto-adopt local', () => {+ renderGate();++ expect(screen.getByText(copy('bootCheck.connectToCore'))).toBeInTheDocument();+ expect(screen.queryByText(copy('bootCheck.checkingCore'))).not.toBeInTheDocument();+ expect(storeCoreMode).not.toHaveBeenCalled();+ expect(mockRunBootCheck).not.toHaveBeenCalled();});it('uses the web-friendly title and hides the Local option', () => {renderGate();- expect(screen.getByText('Connect to Your Runtime')).toBeInTheDocument();- expect(screen.queryByText('Select a Runtime')).not.toBeInTheDocument();- expect(screen.queryByText('Run Locally (Recommended)')).not.toBeInTheDocument();+ expect(screen.getByText(copy('bootCheck.connectToCore'))).toBeInTheDocument();+ expect(screen.queryByText(copy('bootCheck.chooseCoreMode'))).not.toBeInTheDocument();+ expect(screen.queryByText(copy('bootCheck.localRecommended'))).not.toBeInTheDocument();// The selectable Cloud tile is also gone — cloud is implicit and the// URL/token form is rendered directly.expect(- screen.queryByRole('button', { name: 'Run on the Cloud (Complex)' })+ screen.queryByRole('button', { name: copy('bootCheck.cloudMode') })).not.toBeInTheDocument();});@@ -853,7 +925,9 @@ describe('BootCheckGate — picker (web build, !isTauri)', () => {renderGate();expect(screen.getByPlaceholderText(/https:\/\/core\.example\.com/)).toBeInTheDocument();- expect(screen.getByPlaceholderText(/Bearer token/i)).toBeInTheDocument();+ expect(+ screen.getByPlaceholderText(copy('bootCheck.bearerTokenPlaceholder'))+ ).toBeInTheDocument();});it('shows a Download desktop app CTA linking to the release page', () => {@@ -878,7 +952,7 @@ describe('BootCheckGate — picker (web build, !isTauri)', () => {fireEvent.change(screen.getByPlaceholderText(/https:\/\/core\.example\.com/), {target: { value: 'https://core.example.com/rpc' },});- fireEvent.change(screen.getByPlaceholderText(/Bearer token/i), {+ fireEvent.change(screen.getByPlaceholderText(copy('bootCheck.bearerTokenPlaceholder')), {target: { value: 'tok-web' },});fireEvent.click(screen.getByRole('button', { name: 'Continue' }));diff --git a/app/src/components/LanguageSelect.test.tsx b/app/src/components/LanguageSelect.test.tsxindex 73211ea28d..29da120cd1 100644--- a/app/src/components/LanguageSelect.test.tsx+++ b/app/src/components/LanguageSelect.test.tsx@@ -51,4 +51,29 @@ describe('LanguageSelect', () => {expect(screen.getByText('Language')).toBeInTheDocument();expect(document.documentElement.lang).toBe('en');});++ it('offers Japanese in its native script and applies it immediately', () => {+ const store = renderPicker();+ expect(screen.getByRole('option', { name: '🇯🇵 日本語' })).toHaveValue('ja');++ fireEvent.change(screen.getByRole('combobox'), { target: { value: 'ja' } });++ expect(store.getState().locale.current).toBe('ja');+ expect(screen.getByRole('combobox')).toHaveValue('ja');+ expect(screen.getByText('言語')).toBeInTheDocument();+ expect(document.documentElement.lang).toBe('ja');+ expect(document.documentElement.dir).toBe('ltr');+ });++ it('can switch back to English after Japanese', () => {+ const store = renderPicker();+ const picker = screen.getByRole('combobox');+ fireEvent.change(picker, { target: { value: 'ja' } });+ fireEvent.change(picker, { target: { value: 'en' } });++ expect(store.getState().locale.current).toBe('en');+ expect(picker).toHaveValue('en');+ expect(screen.getByText('Language')).toBeInTheDocument();+ expect(document.documentElement.lang).toBe('en');+ });});diff --git a/app/src/components/LanguageSelect.tsx b/app/src/components/LanguageSelect.tsxindex c6cf2ce8a4..2bca687a8e 100644--- a/app/src/components/LanguageSelect.tsx+++ b/app/src/components/LanguageSelect.tsx@@ -13,6 +13,7 @@ interface LocaleOption {const LOCALE_OPTIONS: LocaleOption[] = [{ value: 'en', flag: '🇬🇧', label: 'English' },+ { value: 'ja', flag: '🇯🇵', label: '日本語' },{ value: 'ko', flag: '🇰🇷', label: '한국어' },{ value: 'zh-CN', flag: '🇨🇳', label: '简体中文' },{ value: 'hi', flag: '🇮🇳', label: 'हिन्दी' },diff --git a/app/src/components/layout/ChipTabs.test.tsx b/app/src/components/layout/ChipTabs.test.tsxindex 4c799ec1ab..347ad3dee6 100644--- a/app/src/components/layout/ChipTabs.test.tsx+++ b/app/src/components/layout/ChipTabs.test.tsx@@ -44,6 +44,9 @@ describe('ChipTabs', () => {// pre-interaction, so this one cannot be restored — not because jsdom can't// traverse focus, but because the behavior it asserted no longer exists.//+ // Real Tab entry, arrows, Home/End and both wraps are covered by+ // app/test/e2e/specs/chip-tabs-keyboard.spec.ts on the Search settings row.+ //// The other three tests below — the arrow-key it.each and the wrap test —// are NOT a coverage gap: they're restored using `userEvent.keyboard(...)`// rather than raw `fireEvent.keyDown` + manual `.focus()`. The raw-eventdiff --git a/app/src/components/memory/MemoryAddSourceDialog.tsx b/app/src/components/memory/MemoryAddSourceDialog.tsxindex 69a73de415..cb5c3272ff 100644--- a/app/src/components/memory/MemoryAddSourceDialog.tsx+++ b/app/src/components/memory/MemoryAddSourceDialog.tsx@@ -9,9 +9,11 @@ import { useT } from '../../lib/i18n/I18nContext';import {DOCUMENT_SOURCE_KINDS,type DocumentSourceKind,+ isOutOfCreditsMessage,type SourceAddRequest,} from '../../services/api/memoryApi';import { Button, Label, ModalShell, NativeSelect, TextField } from '../ui';+import { MemoryCreditsPrompt } from './MemoryErrorAlert';import { parsePositiveInt } from './memoryFormat';import { sourceKindLabel, sourceTargetHint } from './memorySourceLabels';@@ -142,11 +144,17 @@ export default function MemoryAddSourceDialog({{t('memoryPage.documents.scheduleHelp')}</p></div>- {error !== null && (- <p className="text-xs text-coral-600" role="alert" data-testid="memory-add-source-error">- {error}- </p>- )}+ {error !== null &&+ (isOutOfCreditsMessage(error, t) ? (+ <MemoryCreditsPrompt message={error} data-testid="memory-add-source-error" />+ ) : (+ <p+ className="text-xs text-coral-600"+ role="alert"+ data-testid="memory-add-source-error">+ {error}+ </p>+ ))}</form></ModalShell>);diff --git a/app/src/components/memory/MemoryAskTab.test.tsx b/app/src/components/memory/MemoryAskTab.test.tsxindex 6df33fc988..8a6f141e9d 100644--- a/app/src/components/memory/MemoryAskTab.test.tsx+++ b/app/src/components/memory/MemoryAskTab.test.tsx@@ -164,7 +164,37 @@ describe('MemoryAskTab', () => {hoisted.recall.mockRejectedValue(new Error('ENGINE: upstream timeout'));renderWithProviders(<MemoryAskTab fetchModes={['hybrid']} />);ask('anything');- expect(await screen.findByTestId('memory-ask-error')).toHaveTextContent('upstream timeout');+ const error = await screen.findByTestId('memory-ask-error');+ expect(error).toHaveTextContent('upstream timeout');+ expect(error).toHaveAttribute('data-variant', 'destructive');+ expect(screen.queryByTestId('memory-top-up')).not.toBeInTheDocument();+ });++ it('prompts a top-up, not an error, when recall is out of credits', async () => {+ hoisted.recall.mockRejectedValue(+ Object.assign(new Error('insufficient credits: [USER_INSUFFICIENT_CREDITS] HTTP 402'), {+ data: { code: 'INSUFFICIENT_CREDITS', kind: 'INSUFFICIENT_CREDITS' },+ })+ );+ renderWithProviders(<MemoryAskTab fetchModes={['hybrid']} />);+ ask('anything');+ const prompt = await screen.findByTestId('memory-ask-error');+ expect(prompt).toHaveAttribute('data-kind', 'out-of-credits');+ expect(prompt).toHaveAttribute('data-variant', 'warning');+ expect(prompt).toHaveTextContent('Out of credits');+ expect(prompt).toHaveTextContent('Top up to restore it');+ expect(prompt).not.toHaveTextContent('HTTP 402');+ expect(screen.getByTestId('memory-top-up')).toHaveTextContent('Top up');+ });++ it('prompts a top-up for a core that only sends the code as text', async () => {+ hoisted.recall.mockRejectedValue(new Error('INSUFFICIENT_CREDITS: top up'));+ renderWithProviders(<MemoryAskTab fetchModes={['hybrid']} />);+ ask('anything');+ expect(await screen.findByTestId('memory-ask-error')).toHaveAttribute(+ 'data-kind',+ 'out-of-credits'+ );});it('previews the pack a turn would get for a chosen agent', async () => {diff --git a/app/src/components/memory/MemoryAskTab.tsx b/app/src/components/memory/MemoryAskTab.tsxindex 51f0fc5397..fff1c04dbc 100644--- a/app/src/components/memory/MemoryAskTab.tsx+++ b/app/src/components/memory/MemoryAskTab.tsx@@ -25,8 +25,6 @@ import {type RecallAnswer,} from '../../services/api/memoryApi';import {- Alert,- AlertDescription,Button,Card,Label,@@ -36,6 +34,7 @@ import {ToggleGroupRoot,} from '../ui';import { CenteredLoadingState } from '../ui/LoadingState';+import MemoryErrorAlert from './MemoryErrorAlert';import MemoryHitRow from './MemoryHitRow';import MemoryPackPreview from './MemoryPackPreview';@@ -92,7 +91,7 @@ export default function MemoryAskTab({ fetchModes }: MemoryAskTabProps) {}} catch (err) {log('%s failed: %o', raw ? 'fetch' : 'recall', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));} finally {setBusy(false);}@@ -167,11 +166,7 @@ export default function MemoryAskTab({ fetchModes }: MemoryAskTabProps) {</form></Card>- {error !== null && (- <Alert variant="destructive" data-testid="memory-ask-error">- <AlertDescription>{error}</AlertDescription>- </Alert>- )}+ {error !== null && <MemoryErrorAlert message={error} data-testid="memory-ask-error" />}{busy && <CenteredLoadingState label={t('memoryPage.ask.thinking')} />}diff --git a/app/src/components/memory/MemoryBackgroundTab.tsx b/app/src/components/memory/MemoryBackgroundTab.tsxindex 9d2a50c2b3..483beb5df7 100644--- a/app/src/components/memory/MemoryBackgroundTab.tsx+++ b/app/src/components/memory/MemoryBackgroundTab.tsx@@ -19,6 +19,7 @@ import {} from '../../services/api/memoryApi';import { Alert, AlertDescription, Badge, Button, Card } from '../ui';import { CenteredLoadingState } from '../ui/LoadingState';+import MemoryErrorAlert from './MemoryErrorAlert';import { fill, formatTimestamp } from './memoryFormat';import { JOB_OUTCOME_VARIANT, jobKindLabel, jobOutcomeLabel } from './memoryLifecycleLabels';@@ -44,12 +45,12 @@ export default function MemoryBackgroundTab() {setError(null);} catch (err) {log('jobs_list failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));setJobs(prev => prev ?? { pending: [], history: [] });} finally {setRefreshing(false);}- }, []);+ }, [t]);useEffect(() => {let cancelled = false;@@ -60,13 +61,13 @@ export default function MemoryBackgroundTab() {.catch(err => {if (cancelled) return;log('jobs_list failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));setJobs({ pending: [], history: [] });});return () => {cancelled = true;};- }, []);+ }, [t]);const run = async (id?: string) => {const key = id ?? '*';@@ -80,7 +81,7 @@ export default function MemoryBackgroundTab() {await reload();} catch (err) {log('jobs_run failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));} finally {setRunning(prev => {const next = new Set(prev);@@ -94,11 +95,7 @@ export default function MemoryBackgroundTab() {return (<div className="space-y-4 animate-fade-up" data-testid="memory-background-tab">- {error !== null && (- <Alert variant="destructive" data-testid="memory-background-error">- <AlertDescription>{error}</AlertDescription>- </Alert>- )}+ {error !== null && <MemoryErrorAlert message={error} data-testid="memory-background-error" />}{notice !== null && (<Alert variant="success" data-testid="memory-background-notice"><AlertDescription>{notice}</AlertDescription>diff --git a/app/src/components/memory/MemoryBrainIngestDialog.tsx b/app/src/components/memory/MemoryBrainIngestDialog.tsxindex f5348acd3a..e9b142738e 100644--- a/app/src/components/memory/MemoryBrainIngestDialog.tsx+++ b/app/src/components/memory/MemoryBrainIngestDialog.tsx@@ -7,7 +7,7 @@import { useId, useState } from 'react';import { useT } from '../../lib/i18n/I18nContext';-import type { BrainIngestRequest } from '../../services/api/memoryApi';+import { type BrainIngestRequest, isOutOfCreditsMessage } from '../../services/api/memoryApi';import {Button,Label,@@ -17,6 +17,7 @@ import {ToggleGroupItem,ToggleGroupRoot,} from '../ui';+import { MemoryCreditsPrompt } from './MemoryErrorAlert';type IngestFrom = 'text' | 'path';@@ -157,14 +158,17 @@ export default function MemoryBrainIngestDialog({onChange={e => setSource(e.target.value)}/></div>- {error !== null && (- <p- className="text-xs text-coral-600"- role="alert"- data-testid="memory-brain-ingest-error">- {error}- </p>- )}+ {error !== null &&+ (isOutOfCreditsMessage(error, t) ? (+ <MemoryCreditsPrompt message={error} data-testid="memory-brain-ingest-error" />+ ) : (+ <p+ className="text-xs text-coral-600"+ role="alert"+ data-testid="memory-brain-ingest-error">+ {error}+ </p>+ ))}</form></ModalShell>);diff --git a/app/src/components/memory/MemoryBrainSearch.tsx b/app/src/components/memory/MemoryBrainSearch.tsxindex 2dff009f36..1cd41b4cf8 100644--- a/app/src/components/memory/MemoryBrainSearch.tsx+++ b/app/src/components/memory/MemoryBrainSearch.tsx@@ -9,8 +9,9 @@ import { type FormEvent, useState } from 'react';import { useT } from '../../lib/i18n/I18nContext';import { type Hit, memoryBrainSearch, memoryErrorMessage } from '../../services/api/memoryApi';-import { Alert, AlertDescription, Button, Card, NativeSelect, TextField } from '../ui';+import { Button, Card, NativeSelect, TextField } from '../ui';import { CenteredLoadingState } from '../ui/LoadingState';+import MemoryErrorAlert from './MemoryErrorAlert';import MemoryHitRow from './MemoryHitRow';import { brainSourceLabel } from './memoryLifecycleLabels';@@ -47,7 +48,7 @@ export default function MemoryBrainSearch({ sources }: MemoryBrainSearchProps) {setHits(res.hits ?? []);} catch (err) {log('search failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));} finally {setBusy(false);}@@ -95,9 +96,7 @@ export default function MemoryBrainSearch({ sources }: MemoryBrainSearchProps) {{error !== null && (<div className="px-4 pb-3">- <Alert variant="destructive" data-testid="memory-brain-search-error">- <AlertDescription>{error}</AlertDescription>- </Alert>+ <MemoryErrorAlert message={error} data-testid="memory-brain-search-error" /></div>)}diff --git a/app/src/components/memory/MemoryBrainTab.test.tsx b/app/src/components/memory/MemoryBrainTab.test.tsxindex 08da2839b0..c39e83fc1b 100644--- a/app/src/components/memory/MemoryBrainTab.test.tsx+++ b/app/src/components/memory/MemoryBrainTab.test.tsx@@ -174,6 +174,17 @@ describe('MemoryBrainTab', () => {expect(screen.getByTestId('memory-brain-ingest')).toBeInTheDocument();});+ it('prompts a top-up in the ingest dialog when the account is out of credits', async () => {+ hoisted.ingest.mockRejectedValue(new Error('INSUFFICIENT_CREDITS: HTTP 402'));+ renderWithProviders(<MemoryBrainTab />);+ fireEvent.click(await screen.findByTestId('memory-brain-add'));+ fireEvent.change(screen.getByTestId('memory-brain-ingest-text'), { target: { value: 'x' } });+ fireEvent.click(screen.getByTestId('memory-brain-ingest-submit'));+ const prompt = await screen.findByTestId('memory-brain-ingest-error');+ expect(prompt).toHaveAttribute('data-kind', 'out-of-credits');+ expect(screen.getByTestId('memory-top-up')).toBeInTheDocument();+ });+it('shows a load error', async () => {hoisted.sources.mockRejectedValue(new Error('MEMORY_OFF'));renderWithProviders(<MemoryBrainTab />);diff --git a/app/src/components/memory/MemoryBrainTab.tsx b/app/src/components/memory/MemoryBrainTab.tsxindex 9e3e8b89e4..e10ef9d41a 100644--- a/app/src/components/memory/MemoryBrainTab.tsx+++ b/app/src/components/memory/MemoryBrainTab.tsx@@ -27,6 +27,7 @@ import { Alert, AlertDescription, Button, Card, ConfirmDialog } from '../ui';import { CenteredLoadingState } from '../ui/LoadingState';import MemoryBrainIngestDialog from './MemoryBrainIngestDialog';import MemoryBrainSearch from './MemoryBrainSearch';+import MemoryErrorAlert from './MemoryErrorAlert';import { fill } from './memoryFormat';import { brainSourceLabel } from './memoryLifecycleLabels';import MemorySyncedSources from './MemorySyncedSources';@@ -51,10 +52,10 @@ export default function MemoryBrainTab() {setError(null);} catch (err) {log('brain_sources failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));setBrain(prev => prev ?? { root: '', sources: [], unfiled: 0 });}- }, []);+ }, [t]);useEffect(() => {let cancelled = false;@@ -67,13 +68,13 @@ export default function MemoryBrainTab() {.catch(err => {if (cancelled) return;log('brain_sources failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));setBrain({ root: '', sources: [], unfiled: 0 });});return () => {cancelled = true;};- }, []);+ }, [t]);const ingest = async (req: BrainIngestRequest): Promise<boolean> => {setSaving(true);@@ -91,7 +92,7 @@ export default function MemoryBrainTab() {return true;} catch (err) {log('brain_ingest failed: %o', err);- setAddError(memoryErrorMessage(err));+ setAddError(memoryErrorMessage(err, t));return false;} finally {setSaving(false);@@ -117,7 +118,7 @@ export default function MemoryBrainTab() {await reload();} catch (err) {log('brain_forget failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));setForgetTarget(null);} finally {setSaving(false);@@ -128,11 +129,7 @@ export default function MemoryBrainTab() {return (<div className="space-y-4 animate-fade-up" data-testid="memory-brain-tab">- {error !== null && (- <Alert variant="destructive" data-testid="memory-brain-error">- <AlertDescription>{error}</AlertDescription>- </Alert>- )}+ {error !== null && <MemoryErrorAlert message={error} data-testid="memory-brain-error" />}{notice !== null && (<Alert variant="success" data-testid="memory-brain-notice"><AlertDescription>{notice}</AlertDescription>diff --git a/app/src/components/memory/MemoryConversationsBackfill.tsx b/app/src/components/memory/MemoryConversationsBackfill.tsxindex 45a4c3c5bf..e32c666357 100644--- a/app/src/components/memory/MemoryConversationsBackfill.tsx+++ b/app/src/components/memory/MemoryConversationsBackfill.tsx@@ -21,6 +21,7 @@ import {memoryErrorMessage,} from '../../services/api/memoryApi';import { Alert, AlertDescription, Button, Card, ConfirmDialog, Progress } from '../ui';+import MemoryErrorAlert from './MemoryErrorAlert';import { fill } from './memoryFormat';const log = debug('openhuman:memory:backfill');@@ -47,9 +48,9 @@ export default function MemoryConversationsBackfill() {setView(next);} catch (err) {log('status failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));}- }, []);+ }, [t]);useEffect(() => {let cancelled = false;@@ -60,12 +61,12 @@ export default function MemoryConversationsBackfill() {.catch(err => {if (cancelled) return;log('status failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));});return () => {cancelled = true;};- }, []);+ }, [t]);const running = view?.state.phase === 'running';useEffect(() => {@@ -83,7 +84,7 @@ export default function MemoryConversationsBackfill() {setView(next);} catch (err) {log('start failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));} finally {setStarting(false);setConsentOpen(false);@@ -157,11 +158,7 @@ export default function MemoryConversationsBackfill() {<AlertDescription>{state.error || t('memoryPage.backfill.failed')}</AlertDescription></Alert>)}- {error !== null && (- <Alert variant="destructive" data-testid="memory-backfill-error">- <AlertDescription>{error}</AlertDescription>- </Alert>- )}+ {error !== null && <MemoryErrorAlert message={error} data-testid="memory-backfill-error" />}</div>{consentOpen && view && (diff --git a/app/src/components/memory/MemoryConversationsTab.tsx b/app/src/components/memory/MemoryConversationsTab.tsxindex 57f21fe997..49d3f94f2d 100644--- a/app/src/components/memory/MemoryConversationsTab.tsx+++ b/app/src/components/memory/MemoryConversationsTab.tsx@@ -21,9 +21,10 @@ import {memoryPolicyGet,memoryPolicySet,} from '../../services/api/memoryApi';-import { Alert, AlertDescription, Button, Card, Switch } from '../ui';+import { Button, Card, Switch } from '../ui';import { CenteredLoadingState } from '../ui/LoadingState';import MemoryConversationsBackfill from './MemoryConversationsBackfill';+import MemoryErrorAlert from './MemoryErrorAlert';import { fill } from './memoryFormat';import MemoryHitRow from './MemoryHitRow';@@ -50,21 +51,21 @@ export default function MemoryConversationsTab() {setPolicy(got.value);} else {log('policy_get failed: %o', got.reason);- setError(memoryErrorMessage(got.reason));+ setError(memoryErrorMessage(got.reason, t));}if (list.status === 'fulfilled') {log('agents: %d', list.value.agents?.length ?? 0);setAgents(list.value.agents ?? []);} else {log('agents_list failed: %o', list.reason);- setError(prev => prev ?? memoryErrorMessage(list.reason));+ setError(prev => prev ?? memoryErrorMessage(list.reason, t));setAgents([]);}});return () => {cancelled = true;};- }, []);+ }, [t]);const setLogging = async (next: boolean) => {setSaving(true);@@ -74,31 +75,34 @@ export default function MemoryConversationsTab() {setPolicy(await memoryPolicySet({ log_conversations: next }));} catch (err) {log('policy_set failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));} finally {setSaving(false);}};- const loadItems = useCallback(async (agentId: string, after: string | null) => {- setLoadingItems(true);- try {- const page = await memoryItemsList({- filter: { kinds: ['conversation'], agent_id: agentId },- limit: PAGE_SIZE,- cursor: after ?? undefined,- });- log('items: agent=%s n=%d more=%s', agentId, page.items?.length ?? 0, !!page.next_cursor);- setItems(prev => [...(after ? (prev ?? []) : []), ...(page.items ?? [])]);- setCursor(page.next_cursor ?? null);- } catch (err) {- log('items_list failed: %o', err);- setError(memoryErrorMessage(err));- setItems(prev => prev ?? []);- } finally {- setLoadingItems(false);- }- }, []);+ const loadItems = useCallback(+ async (agentId: string, after: string | null) => {+ setLoadingItems(true);+ try {+ const page = await memoryItemsList({+ filter: { kinds: ['conversation'], agent_id: agentId },+ limit: PAGE_SIZE,+ cursor: after ?? undefined,+ });+ log('items: agent=%s n=%d more=%s', agentId, page.items?.length ?? 0, !!page.next_cursor);+ setItems(prev => [...(after ? (prev ?? []) : []), ...(page.items ?? [])]);+ setCursor(page.next_cursor ?? null);+ } catch (err) {+ log('items_list failed: %o', err);+ setError(memoryErrorMessage(err, t));+ setItems(prev => prev ?? []);+ } finally {+ setLoadingItems(false);+ }+ },+ [t]+ );const toggleAgent = (agentId: string) => {if (openAgent === agentId) {@@ -118,9 +122,7 @@ export default function MemoryConversationsTab() {return (<div className="space-y-4 animate-fade-up" data-testid="memory-conversations-tab">{error !== null && (- <Alert variant="destructive" data-testid="memory-conversations-error">- <AlertDescription>{error}</AlertDescription>- </Alert>+ <MemoryErrorAlert message={error} data-testid="memory-conversations-error" />)}{policy !== null && (diff --git a/app/src/components/memory/MemoryEngineConnectDialog.tsx b/app/src/components/memory/MemoryEngineConnectDialog.tsxdeleted file mode 100644index 09188459dd..0000000000--- a/app/src/components/memory/MemoryEngineConnectDialog.tsx+++ /dev/null@@ -1,132 +0,0 @@-/**- * "Connect {engine}" — where a self-hosted engine's endpoint and API key are- * typed (CortexDB at launch). Mirrors the web-search connect dialog: keys are- * entered rarely, so they live in a dialog rather than inline in the list.- */-import { useId, useState } from 'react';--import { useT } from '../../lib/i18n/I18nContext';-import type { EngineDescriptor, EngineSetRequest } from '../../services/api/memoryApi';-import { Button, Label, ModalShell, TextField } from '../ui';-import { fill } from './memoryFormat';--interface MemoryEngineConnectDialogProps {- engine: EngineDescriptor;- /** The endpoint currently configured for this engine, when it is active. */- currentEndpoint?: string;- /** A key is already stored for this engine. */- keySaved: boolean;- saving: boolean;- /** Persist the selection; resolves true when the core accepted it. */- onSubmit: (req: EngineSetRequest) => Promise<boolean>;- onClose: () => void;-}--export default function MemoryEngineConnectDialog({- engine,- currentEndpoint,- keySaved,- saving,- onSubmit,- onClose,-}: MemoryEngineConnectDialogProps) {- const { t } = useT();- const baseId = useId();- const [endpoint, setEndpoint] = useState(currentEndpoint || engine.default_endpoint || '');- const [apiKey, setApiKey] = useState('');-- // A self-hosted engine always takes an endpoint, even one with a default- // (CortexDB defaults to its cloud): otherwise a local server is unreachable.- const showEndpoint = engine.needs_endpoint || !engine.hosted;- const keyRequired = engine.needs_key && !keySaved;- const canSubmit =- !saving &&- (!showEndpoint || endpoint.trim().length > 0) &&- (!keyRequired || apiKey.trim().length > 0);-- const submit = async () => {- if (!canSubmit) return;- const req: EngineSetRequest = { engine: engine.id };- if (showEndpoint) req.endpoint = endpoint.trim();- if (apiKey.trim()) req.api_key = apiKey.trim();- if (await onSubmit(req)) onClose();- };-- return (- <ModalShell- title={fill(t('memoryPage.engine.connectTitle'), { engine: engine.label })}- titleId={`${baseId}-title`}- subtitle={engine.description}- onClose={onClose}- maxWidthClassName="max-w-md"- testId={`memory-engine-connect-${engine.id}`}- footer={- <div className="flex justify-end gap-2">- <Button type="button" variant="secondary" size="sm" onClick={onClose} disabled={saving}>- {t('common.cancel')}- </Button>- <Button- type="button"- variant="primary"- size="sm"- data-testid={`memory-engine-connect-${engine.id}-submit`}- disabled={!canSubmit}- onClick={() => void submit()}>- {t('memoryPage.engine.connect')}- </Button>- </div>- }>- <form- className="flex flex-col gap-4"- onSubmit={event => {- event.preventDefault();- void submit();- }}>- {showEndpoint && (- <div className="flex flex-col gap-1.5">- <Label htmlFor={`${baseId}-endpoint`} className="text-xs text-content-secondary">- {t('memoryPage.engine.endpoint')}- </Label>- <TextField- id={`${baseId}-endpoint`}- data-testid={`memory-engine-connect-${engine.id}-endpoint`}- type="url"- mono- spellCheck={false}- value={endpoint}- disabled={saving}- placeholder={engine.default_endpoint ?? 'https://'}- onChange={e => setEndpoint(e.target.value)}- />- </div>- )}- {engine.needs_key && (- <div className="flex flex-col gap-1.5">- <Label htmlFor={`${baseId}-key`} className="text-xs text-content-secondary">- {t('memoryPage.engine.apiKey')}- </Label>- <TextField- id={`${baseId}-key`}- data-testid={`memory-engine-connect-${engine.id}-key`}- type="password"- mono- autoComplete="off"- spellCheck={false}- data-lpignore="true"- data-1p-ignore="true"- value={apiKey}- disabled={saving}- placeholder={keySaved ? t('memoryPage.engine.keySavedPlaceholder') : ''}- onChange={e => setApiKey(e.target.value)}- />- {keySaved && (- <p className="text-[11px] leading-4 text-content-muted">- {t('memoryPage.engine.keySavedHint')}- </p>- )}- </div>- )}- </form>- </ModalShell>- );-}diff --git a/app/src/components/memory/MemoryEngineTab.test.tsx b/app/src/components/memory/MemoryEngineTab.test.tsxindex 45eaaf4a2a..d543728bdc 100644--- a/app/src/components/memory/MemoryEngineTab.test.tsx+++ b/app/src/components/memory/MemoryEngineTab.test.tsx@@ -1,52 +1,53 @@import { fireEvent, screen, waitFor } from '@testing-library/react';import { beforeEach, describe, expect, it, vi } from 'vitest';-import type { EngineDescriptor, EngineState } from '../../services/api/memoryApi';+import type { EngineState } from '../../services/api/memoryApi';import { renderWithProviders } from '../../test/test-utils';-import MemoryEngineTab from './MemoryEngineTab';+import { createLocalSessionToken } from '../../utils/localSession';+import MemoryEngineTab, {+ CORTEXDB_SELF_HOST_DOCS_URL,+ isLoopbackEndpoint,+} from './MemoryEngineTab';-const hoisted = vi.hoisted(() => ({ enginesList: vi.fn(), engineSet: vi.fn(), signedIn: true }));+const hoisted = vi.hoisted(() => ({+ engineSet: vi.fn(),+ openUrl: vi.fn(),+ signedIn: true,+ token: 'header.payload.sig',+}));vi.mock('../../services/api/memoryApi', async importOriginal => ({...(await importOriginal<typeof import('../../services/api/memoryApi')>()),- memoryEnginesList: (...a: unknown[]) => hoisted.enginesList(...a),memoryEngineSet: (...a: unknown[]) => hoisted.engineSet(...a),}));+vi.mock('../../utils/openUrl', () => ({ openUrl: (...a: unknown[]) => hoisted.openUrl(...a) }));+vi.mock('../../providers/CoreStateProvider', () => ({useCoreState: () => ({snapshot: {auth: { isAuthenticated: hoisted.signedIn, userId: hoisted.signedIn ? 'u1' : null },- sessionToken: hoisted.signedIn ? 'header.payload.sig' : null,+ sessionToken: hoisted.signedIn ? hoisted.token : null,},}),}));-vi.mock('../../utils/localSession', () => ({ isLocalSessionToken: () => false }));--const TINYHUMANS: EngineDescriptor = {- id: 'tinyhumans',- label: 'TinyHumans',- description: 'Hosted memory',- hosted: true,- needs_endpoint: false,- needs_key: false,- default_endpoint: null,+const OFF: EngineState = { engine: null, has_key: false, status: 'off', fetch_modes: [] };+const BUILTIN_ON: EngineState = {+ engine: 'tinyhumans',+ endpoint: 'https://api.tinyhumans.ai',+ has_key: true,+ status: 'ok',fetch_modes: ['hybrid'],};-const CORTEXDB: EngineDescriptor = {- id: 'cortexdb',- label: 'CortexDB',- description: 'Your own CortexDB',- hosted: false,- // As the engine reports it: the endpoint has a default, so it is optional.- needs_endpoint: false,- needs_key: true,- default_endpoint: 'https://api-v1.cortexdb.ai',- fetch_modes: ['keyword', 'vector', 'hybrid'],+const CLOUD_ON: EngineState = {+ engine: 'cortexdb',+ endpoint: 'https://api-v1.cortexdb.ai',+ has_key: true,+ status: 'ok',+ fetch_modes: ['hybrid'],};--const OFF: EngineState = { engine: null, has_key: false, status: 'off', fetch_modes: [] };+const LOCAL_ON: EngineState = { ...CLOUD_ON, endpoint: 'http://localhost:3141' };function renderTab(state: EngineState | null = OFF) {const onStateChange = vi.fn();@@ -54,153 +55,282 @@ function renderTab(state: EngineState | null = OFF) {return { onStateChange };}+const open = (option: string) =>+ fireEvent.click(screen.getByTestId(`memory-engine-${option}-trigger`));+const type = (testId: string, value: string) =>+ fireEvent.change(screen.getByTestId(testId), { target: { value } });+beforeEach(() => {- hoisted.enginesList- .mockReset()- .mockResolvedValue({ engines: [TINYHUMANS, CORTEXDB], active: null });hoisted.engineSet.mockReset();+ hoisted.openUrl.mockReset().mockResolvedValue(undefined);hoisted.signedIn = true;+ hoisted.token = 'header.payload.sig';+});++describe('isLoopbackEndpoint', () => {+ it.each([+ ['http://localhost:3141', true],+ ['http://127.0.0.1:3141/', true],+ ['http://127.1.2.3:3141', true],+ ['http://[::1]:3141', true],+ ['https://localhost', true],+ [' http://localhost:3141 ', true],+ ['http://192.168.1.10:3141', false],+ // The URL parser rejects out-of-range octets before the host check runs.+ ['http://127.999.1.1:3141', false],+ ['http://127.256.0.1:3141', false],+ ['http://memory.example.internal:3141/', false],+ ['https://api-v1.cortexdb.ai', false],+ ['http://localhost.evil.com', false],+ ['ftp://localhost', false],+ ['localhost:3141', false],+ ['', false],+ ])('%s → %s', (endpoint, expected) => {+ expect(isLoopbackEndpoint(endpoint)).toBe(expected);+ });});describe('MemoryEngineTab', () => {- it('lists the engines and explains that memory is off', async () => {+ it('shows a loading state until the engine state arrives', () => {+ renderTab(null);+ expect(screen.queryByTestId('memory-engines')).not.toBeInTheDocument();+ });++ it('offers the three options with Built-in open when nothing is connected', () => {renderTab();- expect(await screen.findByTestId('memory-engine-tinyhumans')).toBeInTheDocument();- expect(screen.getByTestId('memory-engine-cortexdb')).toBeInTheDocument();+ expect(screen.getByTestId('memory-engine-builtin')).toBeInTheDocument();+ expect(screen.getByTestId('memory-engine-apikey')).toBeInTheDocument();+ expect(screen.getByTestId('memory-engine-selfhost')).toBeInTheDocument();expect(screen.getByTestId('memory-engine-status-off')).toHaveTextContent('Memory is off');+ expect(screen.getByTestId('memory-engine-builtin-use')).toBeEnabled();+ expect(screen.queryByTestId('memory-engine-apikey-key')).not.toBeInTheDocument();});- it('shows the engine-reported reason when memory is off', async () => {+ it('shows the engine-reported reason when memory is off', () => {renderTab({ ...OFF, reason: 'Signed out and no CortexDB key' });- expect(await screen.findByTestId('memory-engine-status-off')).toHaveTextContent(+ expect(screen.getByTestId('memory-engine-status-off')).toHaveTextContent('Signed out and no CortexDB key');});- it('selects TinyHumans in one click when signed in', async () => {- const next: EngineState = {- engine: 'tinyhumans',- has_key: false,- status: 'ok',- fetch_modes: ['hybrid'],- };- hoisted.engineSet.mockResolvedValue(next);- const { onStateChange } = renderTab();- fireEvent.click(await screen.findByTestId('memory-engine-tinyhumans-use'));- await waitFor(() => expect(hoisted.engineSet).toHaveBeenCalledWith({ engine: 'tinyhumans' }));- expect(onStateChange).toHaveBeenCalledWith(next);- });+ describe('Built-in', () => {+ it('selects the tinyhumans engine in one click when signed in', async () => {+ hoisted.engineSet.mockResolvedValue(BUILTIN_ON);+ const { onStateChange } = renderTab();+ fireEvent.click(screen.getByTestId('memory-engine-builtin-use'));+ await waitFor(() => expect(hoisted.engineSet).toHaveBeenCalledWith({ engine: 'tinyhumans' }));+ expect(onStateChange).toHaveBeenCalledWith(BUILTIN_ON);+ });- it('disables TinyHumans with an explanation when signed out', async () => {- hoisted.signedIn = false;- renderTab();- const use = await screen.findByTestId('memory-engine-tinyhumans-use');- expect(use).toBeDisabled();- expect(screen.getByTestId('memory-engine-tinyhumans-detail')).toHaveTextContent(- 'Sign in required'- );- });+ it('says to sign in and cannot be selected when signed out', () => {+ hoisted.signedIn = false;+ renderTab();+ expect(screen.getByTestId('memory-engine-builtin-trigger')).toHaveTextContent(+ 'Sign in to use'+ );+ expect(screen.getByTestId('memory-engine-builtin-sign-in')).toBeInTheDocument();+ expect(screen.getByTestId('memory-engine-builtin-use')).toBeDisabled();+ });- it('connects CortexDB with the default endpoint and a key', async () => {- const next: EngineState = {- engine: 'cortexdb',- endpoint: 'https://api-v1.cortexdb.ai',- has_key: true,- status: 'ok',- fetch_modes: ['keyword', 'vector', 'hybrid'],- };- hoisted.engineSet.mockResolvedValue(next);- const { onStateChange } = renderTab();- fireEvent.click(await screen.findByTestId('memory-engine-cortexdb-use'));-- const endpoint = screen.getByTestId('memory-engine-connect-cortexdb-endpoint');- expect(endpoint).toHaveValue('https://api-v1.cortexdb.ai');- const submit = screen.getByTestId('memory-engine-connect-cortexdb-submit');- expect(submit).toBeDisabled(); // key required- fireEvent.change(screen.getByTestId('memory-engine-connect-cortexdb-key'), {- target: { value: 'secret' },- });- fireEvent.click(submit);-- await waitFor(() =>- expect(hoisted.engineSet).toHaveBeenCalledWith({- engine: 'cortexdb',- endpoint: 'https://api-v1.cortexdb.ai',- api_key: 'secret',- })- );- expect(onStateChange).toHaveBeenCalledWith(next);- await waitFor(() =>- expect(screen.queryByTestId('memory-engine-connect-cortexdb')).not.toBeInTheDocument()- );- });+ it('treats a local session token as signed out', () => {+ hoisted.token = createLocalSessionToken();+ renderTab();+ expect(screen.getByTestId('memory-engine-builtin-use')).toBeDisabled();+ });- it('connects CortexDB to a local server instead of the default endpoint', async () => {- hoisted.engineSet.mockResolvedValue({- engine: 'cortexdb',- endpoint: 'http://127.0.0.1:3141',- has_key: true,- status: 'ok',- fetch_modes: ['hybrid'],+ it('marks an active Built-in engine and offers no button', () => {+ renderTab(BUILTIN_ON);+ expect(screen.getByTestId('memory-engine-builtin-active')).toHaveTextContent('Active');+ expect(screen.queryByTestId('memory-engine-builtin-use')).not.toBeInTheDocument();+ expect(screen.queryByTestId('memory-engine-apikey-active')).not.toBeInTheDocument();});- renderTab();- fireEvent.click(await screen.findByTestId('memory-engine-cortexdb-use'));- fireEvent.change(screen.getByTestId('memory-engine-connect-cortexdb-endpoint'), {- target: { value: ' http://127.0.0.1:3141 ' },+ it('shows Off on the configured Built-in engine while signed out', () => {+ hoisted.signedIn = false;+ renderTab({+ ...OFF,+ engine: 'tinyhumans',+ endpoint: 'https://api.tinyhumans.ai',+ reason: 'sign in to use TinyHumans memory',+ });+ expect(screen.getByTestId('memory-engine-builtin-active')).toHaveTextContent('Off');+ expect(screen.getByTestId('memory-engine-builtin-use')).toBeDisabled();+ expect(screen.getByTestId('memory-engine-builtin-sign-in')).toBeInTheDocument();+ expect(screen.getByTestId('memory-engine-builtin-endpoint')).toHaveTextContent(+ 'https://api.tinyhumans.ai'+ );});- fireEvent.change(screen.getByTestId('memory-engine-connect-cortexdb-key'), {- target: { value: 'local-key' },++ it('shows the backend origin the core reports, read-only', () => {+ renderTab({ ...BUILTIN_ON, endpoint: 'https://staging-api.example.test' });+ const endpoint = screen.getByTestId('memory-engine-builtin-endpoint');+ expect(endpoint).toHaveTextContent('https://staging-api.example.test');+ expect(endpoint.tagName).not.toBe('INPUT');+ expect(+ screen.getByText(/Facts and beliefs drawn from them fill in over the following minutes/)+ ).toBeInTheDocument();});- fireEvent.click(screen.getByTestId('memory-engine-connect-cortexdb-submit'));- await waitFor(() =>- expect(hoisted.engineSet).toHaveBeenCalledWith({- engine: 'cortexdb',- endpoint: 'http://127.0.0.1:3141',- api_key: 'local-key',- })- );- });+ it('shows no Built-in origin while another option is configured', () => {+ renderTab(CLOUD_ON);+ open('builtin');+ expect(screen.getByTestId('memory-engine-builtin-use')).toBeInTheDocument();+ expect(screen.queryByTestId('memory-engine-builtin-endpoint')).not.toBeInTheDocument();+ });- it('refuses to connect CortexDB with a blank endpoint', async () => {- renderTab();- fireEvent.click(await screen.findByTestId('memory-engine-cortexdb-use'));- fireEvent.change(screen.getByTestId('memory-engine-connect-cortexdb-endpoint'), {- target: { value: ' ' },+ it('shows a failed switch inside the item and stays open', async () => {+ hoisted.engineSet.mockRejectedValue(new Error('UNAUTHORIZED: session expired'));+ renderTab();+ fireEvent.click(screen.getByTestId('memory-engine-builtin-use'));+ expect(await screen.findByTestId('memory-engine-builtin-error')).toHaveTextContent(+ 'session expired'+ );+ expect(screen.getByTestId('memory-engine-builtin-use')).toBeEnabled();});- fireEvent.change(screen.getByTestId('memory-engine-connect-cortexdb-key'), {- target: { value: 'secret' },++ it('shows Connecting while the switch is in flight', async () => {+ let resolve: (s: EngineState) => void = () => undefined;+ hoisted.engineSet.mockReturnValue(new Promise<EngineState>(r => (resolve = r)));+ renderTab();+ fireEvent.click(screen.getByTestId('memory-engine-builtin-use'));+ expect(await screen.findByText('Connecting…')).toBeInTheDocument();+ expect(screen.getByTestId('memory-engine-builtin-use')).toBeDisabled();+ resolve(BUILTIN_ON);+ await waitFor(() => expect(screen.queryByText('Connecting…')).not.toBeInTheDocument());});- expect(screen.getByTestId('memory-engine-connect-cortexdb-submit')).toBeDisabled();});- it('marks the active engine and reports a degraded status', async () => {- renderTab({- engine: 'cortexdb',- endpoint: 'https://cortex.local',- has_key: true,- status: 'degraded',- reason: 'slow answers',- fetch_modes: ['hybrid'],- });- expect(await screen.findByTestId('memory-engine-cortexdb-active')).toHaveTextContent('Active');- expect(screen.getByTestId('memory-engine-cortexdb-detail')).toHaveTextContent(- 'https://cortex.local'- );- expect(screen.getByTestId('memory-engine-status-degraded')).toHaveTextContent('slow answers');- });+ describe('API key', () => {+ it('connects CortexDB cloud with only a key, clearing any custom endpoint', async () => {+ hoisted.engineSet.mockResolvedValue(CLOUD_ON);+ const { onStateChange } = renderTab();+ open('apikey');+ expect(screen.getByTestId('memory-engine-apikey-trigger')).toHaveTextContent(+ 'https://api-v1.cortexdb.ai'+ );+ expect(screen.queryByTestId('memory-engine-apikey-endpoint')).not.toBeInTheDocument();+ const submit = screen.getByTestId('memory-engine-apikey-submit');+ expect(submit).toBeDisabled();+ type('memory-engine-apikey-key', ' secret ');+ fireEvent.click(submit);- it('shows a failed switch without closing the picker', async () => {- hoisted.engineSet.mockRejectedValue(new Error('UNAUTHORIZED: bad key'));- renderTab();- fireEvent.click(await screen.findByTestId('memory-engine-tinyhumans-use'));- expect(await screen.findByTestId('memory-engine-save-error')).toHaveTextContent('bad key');+ await waitFor(() =>+ expect(hoisted.engineSet).toHaveBeenCalledWith({+ engine: 'cortexdb',+ endpoint: '',+ api_key: 'secret',+ })+ );+ expect(onStateChange).toHaveBeenCalledWith(CLOUD_ON);+ await waitFor(() => expect(screen.getByTestId('memory-engine-apikey-key')).toHaveValue(''));+ });++ it('is open and active for a cloud cortexdb engine, and saves without a new key', async () => {+ hoisted.engineSet.mockResolvedValue(CLOUD_ON);+ renderTab(CLOUD_ON);+ expect(screen.getByTestId('memory-engine-apikey-active')).toHaveTextContent('Active');+ expect(screen.getByTestId('memory-engine-apikey-key')).toHaveAttribute(+ 'placeholder',+ 'Saved. Enter a new key to replace it'+ );+ const submit = screen.getByTestId('memory-engine-apikey-submit');+ expect(submit).toHaveTextContent('Save');+ fireEvent.click(submit);+ await waitFor(() =>+ expect(hoisted.engineSet).toHaveBeenCalledWith({ engine: 'cortexdb', endpoint: '' })+ );+ });++ it('reports a degraded or unreachable engine on its badge', () => {+ renderTab({ ...CLOUD_ON, status: 'degraded', reason: 'slow answers' });+ expect(screen.getByTestId('memory-engine-apikey-active')).toHaveTextContent('Degraded');+ expect(screen.getByTestId('memory-engine-status-degraded')).toHaveTextContent('slow answers');+ });++ it('reports an unreachable engine', () => {+ renderTab({ ...CLOUD_ON, status: 'down', reason: 'connection refused' });+ expect(screen.getByTestId('memory-engine-apikey-active')).toHaveTextContent('Unreachable');+ expect(screen.getByTestId('memory-engine-status-down')).toHaveTextContent(+ 'connection refused'+ );+ });++ it('shows a rejected key inside the item', async () => {+ hoisted.engineSet.mockRejectedValue(new Error('UNAUTHORIZED: bad key'));+ renderTab();+ open('apikey');+ type('memory-engine-apikey-key', 'wrong');+ fireEvent.click(screen.getByTestId('memory-engine-apikey-submit'));+ expect(await screen.findByTestId('memory-engine-apikey-error')).toHaveTextContent('bad key');+ });});- it('shows an error when the engine list cannot load', async () => {- hoisted.enginesList.mockRejectedValue(new Error('core offline'));- renderTab();- expect(await screen.findByTestId('memory-engine-load-error')).toHaveTextContent('core offline');+ describe('Self-host', () => {+ it('links out to the CortexDB self-hosting guide', () => {+ renderTab();+ open('selfhost');+ fireEvent.click(screen.getByTestId('memory-engine-selfhost-docs'));+ expect(hoisted.openUrl).toHaveBeenCalledWith(CORTEXDB_SELF_HOST_DOCS_URL);+ });++ it('refuses an endpoint that is not on this computer', () => {+ renderTab();+ open('selfhost');+ type('memory-engine-selfhost-endpoint', 'http://192.168.1.10:3141');+ type('memory-engine-selfhost-key', 'local-key');+ expect(screen.getByTestId('memory-engine-selfhost-endpoint-error')).toHaveTextContent(+ 'Self-hosting is local only'+ );+ expect(screen.getByTestId('memory-engine-selfhost-submit')).toBeDisabled();+ });++ it('connects a loopback server with its key', async () => {+ hoisted.engineSet.mockResolvedValue({ ...LOCAL_ON, endpoint: 'http://127.0.0.1:3141' });+ renderTab();+ open('selfhost');+ type('memory-engine-selfhost-endpoint', ' http://127.0.0.1:3141 ');+ expect(screen.getByTestId('memory-engine-selfhost-submit')).toBeDisabled(); // key required+ expect(screen.queryByTestId('memory-engine-selfhost-endpoint-error')).not.toBeInTheDocument();+ type('memory-engine-selfhost-key', 'local-key');+ fireEvent.click(screen.getByTestId('memory-engine-selfhost-submit'));+ await waitFor(() =>+ expect(hoisted.engineSet).toHaveBeenCalledWith({+ engine: 'cortexdb',+ endpoint: 'http://127.0.0.1:3141',+ api_key: 'local-key',+ })+ );+ });++ it('is open and active for a loopback cortexdb engine, with its endpoint filled in', async () => {+ hoisted.engineSet.mockResolvedValue(LOCAL_ON);+ renderTab(LOCAL_ON);+ expect(screen.getByTestId('memory-engine-selfhost-active')).toHaveTextContent('Active');+ expect(screen.queryByTestId('memory-engine-apikey-active')).not.toBeInTheDocument();+ expect(screen.getByTestId('memory-engine-selfhost-trigger')).toHaveTextContent(+ 'http://localhost:3141'+ );+ expect(screen.getByTestId('memory-engine-selfhost-endpoint')).toHaveValue(+ 'http://localhost:3141'+ );+ fireEvent.click(screen.getByTestId('memory-engine-selfhost-submit'));+ await waitFor(() =>+ expect(hoisted.engineSet).toHaveBeenCalledWith({+ engine: 'cortexdb',+ endpoint: 'http://localhost:3141',+ })+ );+ });++ it('fills in the local endpoint when the state arrives after the first render', () => {+ const onStateChange = vi.fn();+ const { rerender } = renderWithProviders(+ <MemoryEngineTab state={null} onStateChange={onStateChange} />+ );+ rerender(<MemoryEngineTab state={LOCAL_ON} onStateChange={onStateChange} />);+ expect(screen.getByTestId('memory-engine-selfhost-endpoint')).toHaveValue(+ 'http://localhost:3141'+ );+ });});});diff --git a/app/src/components/memory/MemoryEngineTab.tsx b/app/src/components/memory/MemoryEngineTab.tsxindex 9b28001953..93748a244a 100644--- a/app/src/components/memory/MemoryEngineTab.tsx+++ b/app/src/components/memory/MemoryEngineTab.tsx@@ -1,38 +1,92 @@/**- * Memory → Engine: pick who stores and answers, in the provider-list shape the- * web-search settings use.+ * Memory → Engine: memory runs on CortexDB, reached one of three ways, shown as+ * a single-open accordion (#7025):*- * - TinyHumans (hosted) needs a signed-in account; signed out, its row is- * disabled and says why.- * - CortexDB (self-hosted) opens a connect dialog for its endpoint and key.+ * - Built-in: the `tinyhumans` engine, the TinyHumans backend's `/memory/*`+ * API (CortexDB hosted per account), authenticated by sign-in. The backend+ * origin it uses is shown read-only from `memory_engine_get`. Signed out (or+ * on a local session), it says so and cannot be selected.+ * - Your API key: the `cortexdb` engine on CortexDB's managed API. The endpoint+ * is fixed; only the key is entered.+ * - Self-host: the `cortexdb` engine on a server on this computer. Self-host is+ * local only (a product rule), so the endpoint's host must be loopback; either+ * scheme is fine there. The core itself allows https to any host and+ * cleartext http only to loopback, so this check is the stricter of the two.*- * The status banner reads `memory_engine_get`: off (with the reason, or the- * generic "sign in or connect your own" explanation), degraded or down.+ * Which item is active is derived from `memory_engine_get`: `tinyhumans` is+ * Built-in, and `cortexdb` is Self-host when its endpoint is loopback, else+ * API key. The status banner still explains an off, degraded or down engine.** debug logging: DEBUG=openhuman:memory:engine*/import debug from 'debug';-import { useCallback, useEffect, useState } from 'react';+import { ExternalLink } from 'lucide-react';+import { useCallback, useId, useState } from 'react';import { useT } from '../../lib/i18n/I18nContext';import { useCoreState } from '../../providers/CoreStateProvider';import {- type EngineDescriptor,type EngineSetRequest,type EngineState,isMemoryOn,memoryEngineSet,- memoryEnginesList,memoryErrorMessage,} from '../../services/api/memoryApi';import { isLocalSessionToken } from '../../utils/localSession';-import { ProviderGroup, ProviderListRow } from '../settings/panels/ai/ProviderListRow';-import { Alert, AlertDescription, AlertTitle, Badge, Button } from '../ui';+import { openUrl } from '../../utils/openUrl';+import {+ AccordionContent,+ AccordionItem,+ AccordionRoot,+ AccordionTrigger,+ Alert,+ AlertDescription,+ AlertTitle,+ Badge,+ Button,+ Label,+ TextField,+} from '../ui';import { CenteredLoadingState } from '../ui/LoadingState';-import MemoryEngineConnectDialog from './MemoryEngineConnectDialog';const log = debug('openhuman:memory:engine');+/** CortexDB's self-hosting guide, linked from the Self-host item. */+export const CORTEXDB_SELF_HOST_DOCS_URL = 'https://cortexdb.ai/docs/self-hosting/quickstart';++/** CortexDB's managed API, the fixed endpoint of the API-key item. */+const CORTEXDB_CLOUD_ENDPOINT = 'https://api-v1.cortexdb.ai';++/** CortexDB's default port on this computer, shown as the example endpoint. */+const SELF_HOST_EXAMPLE_ENDPOINT = 'http://localhost:3141';++type EngineOption = 'builtin' | 'apikey' | 'selfhost';++/**+ * True for an http(s) URL whose host is this computer (localhost, 127.x, ::1).+ * Both schemes are accepted: the core refuses only cleartext http off loopback.+ */+export function isLoopbackEndpoint(raw: string): boolean {+ let url: URL;+ try {+ url = new URL(raw.trim());+ } catch {+ return false;+ }+ if (url.protocol !== 'http:' && url.protocol !== 'https:') return false;+ const host = url.hostname;+ return host === 'localhost' || host === '[::1]' || /^127(\.\d{1,3}){3}$/.test(host);+}++/** The accordion item the configured engine corresponds to. */+function optionOf(state: EngineState | null): EngineOption | null {+ if (state?.engine === 'tinyhumans') return 'builtin';+ if (state?.engine === 'cortexdb') {+ return state.endpoint && isLoopbackEndpoint(state.endpoint) ? 'selfhost' : 'apikey';+ }+ return null;+}+interface MemoryEngineTabProps {/** The current engine state (null while the page is still loading it). */state: EngineState | null;@@ -44,58 +98,47 @@ interface MemoryEngineTabProps {export default function MemoryEngineTab({ state, onStateChange, embedded }: MemoryEngineTabProps) {const { t } = useT();+ const baseId = useId();const { snapshot } = useCoreState();const signedIn = snapshot.auth.isAuthenticated && !isLocalSessionToken(snapshot.sessionToken);- const [engines, setEngines] = useState<EngineDescriptor[] | null>(null);- const [loadError, setLoadError] = useState<string | null>(null);- const [saveError, setSaveError] = useState<string | null>(null);- const [saving, setSaving] = useState(false);- const [dialogFor, setDialogFor] = useState<EngineDescriptor | null>(null);-- useEffect(() => {- let cancelled = false;- memoryEnginesList()- .then(list => {- if (cancelled) return;- log('engines: %d active=%s', list.engines.length, list.active ?? 'none');- setEngines(list.engines);- })- .catch(err => {- if (cancelled) return;- log('engines list failed: %o', err);- setLoadError(memoryErrorMessage(err));- });- return () => {- cancelled = true;- };- }, []);+ const active = optionOf(state);+ const on = isMemoryOn(state);++ const [open, setOpen] = useState<string | undefined>(undefined);+ const [saving, setSaving] = useState<EngineOption | null>(null);+ const [errors, setErrors] = useState<Partial<Record<EngineOption, string>>>({});+ const [cloudKey, setCloudKey] = useState('');+ // Untouched (null) shows the configured local endpoint, which may arrive+ // after the first render when a host loads the state itself.+ const [typedEndpoint, setTypedEndpoint] = useState<string | null>(null);+ const [localKey, setLocalKey] = useState('');const select = useCallback(- async (req: EngineSetRequest): Promise<boolean> => {- setSaving(true);- setSaveError(null);+ async (option: EngineOption, req: EngineSetRequest): Promise<boolean> => {+ setSaving(option);+ setErrors(prev => ({ ...prev, [option]: undefined }));try {const next = await memoryEngineSet(req);- log('engine set: %s status=%s', next.engine ?? 'none', next.status);+ log('engine set (%s): %s status=%s', option, next.engine ?? 'none', next.status);onStateChange(next);return true;} catch (err) {- log('engine set failed: %o', err);- setSaveError(memoryErrorMessage(err));+ log('engine set (%s) failed: %o', option, err);+ setErrors(prev => ({ ...prev, [option]: memoryErrorMessage(err, t) }));return false;} finally {- setSaving(false);+ setSaving(null);}},- [onStateChange]+ [onStateChange, t]);- const activeId = state?.engine ?? null;- const on = isMemoryOn(state);+ if (!state) {+ return <CenteredLoadingState label={t('memoryPage.loading')} />;+ }const statusBanner = (() => {- if (!state) return null;if (!on) {return (<Alert variant="info" data-testid="memory-engine-status-off">@@ -123,95 +166,280 @@ export default function MemoryEngineTab({ state, onStateChange, embedded }: Memoreturn null;})();- const rowDetail = (engine: EngineDescriptor): string => {- if (engine.hosted && !signedIn) return t('memoryPage.engine.signInRequired');- if (engine.id === activeId && state?.endpoint) return state.endpoint;- if (engine.hosted) return t('memoryPage.engine.hostedDetail');- return engine.default_endpoint || t('memoryPage.engine.selfHostedDetail');+ const activeBadge = (option: EngineOption) => {+ if (option !== active) return null;+ const [variant, label] = !on+ ? (['warning', t('memoryPage.engine.statusOff')] as const)+ : state.status === 'down'+ ? (['danger', t('memoryPage.engine.badgeDown')] as const)+ : state.status === 'degraded'+ ? (['warning', t('memoryPage.engine.badgeDegraded')] as const)+ : (['success', t('memoryPage.engine.active')] as const);+ return (+ <Badge variant={variant} data-testid={`memory-engine-${option}-active`}>+ {label}+ </Badge>+ );};- const choose = (engine: EngineDescriptor) => {- if (engine.needs_endpoint || engine.needs_key) {- setDialogFor(engine);- return;- }- void select({ engine: engine.id });+ const itemError = (option: EngineOption) =>+ errors[option] ? (+ <Alert variant="destructive" data-testid={`memory-engine-${option}-error`}>+ <AlertDescription>{errors[option]}</AlertDescription>+ </Alert>+ ) : null;++ const actionLabel = (option: EngineOption) =>+ saving === option+ ? t('memoryPage.engine.connecting')+ : option === active+ ? t('memoryPage.engine.save')+ : t('memoryPage.engine.connect');++ const keyField = (+ option: 'apikey' | 'selfhost',+ value: string,+ onChange: (value: string) => void+ ) => {+ const saved = option === active && state.has_key;+ return (+ <div className="flex flex-col gap-1.5">+ <Label htmlFor={`${baseId}-${option}-key`} className="text-xs text-content-secondary">+ {t('memoryPage.engine.apiKey')}+ </Label>+ <TextField+ id={`${baseId}-${option}-key`}+ data-testid={`memory-engine-${option}-key`}+ type="password"+ mono+ autoComplete="off"+ spellCheck={false}+ data-lpignore="true"+ data-1p-ignore="true"+ value={value}+ disabled={saving !== null}+ placeholder={saved ? t('memoryPage.engine.keySavedPlaceholder') : ''}+ onChange={e => onChange(e.target.value)}+ />+ {saved && (+ <p className="text-[11px] leading-4 text-content-muted">+ {t('memoryPage.engine.keySavedHint')}+ </p>+ )}+ </div>+ );+ };++ // Built-in.+ const builtinBlocked = !signedIn;+ const builtinIdle = active === 'builtin' && on;++ // API key: the endpoint is CortexDB's managed API. Sending a blank endpoint+ // clears any custom (self-host) endpoint, so the engine falls back to it.+ const cloudKeyRequired = !(active === 'apikey' && state.has_key);+ const canSubmitCloud = saving === null && (!cloudKeyRequired || cloudKey.trim().length > 0);+ const submitCloud = async () => {+ if (!canSubmitCloud) return;+ const req: EngineSetRequest = { engine: 'cortexdb', endpoint: '' };+ if (cloudKey.trim()) req.api_key = cloudKey.trim();+ if (await select('apikey', req)) setCloudKey('');+ };++ // Self-host: loopback only.+ const localEndpoint = typedEndpoint ?? (active === 'selfhost' ? (state.endpoint ?? '') : '');+ const endpointTyped = localEndpoint.trim().length > 0;+ const endpointLocal = isLoopbackEndpoint(localEndpoint);+ const localKeyRequired = !(active === 'selfhost' && state.has_key);+ const canSubmitLocal =+ saving === null && endpointLocal && (!localKeyRequired || localKey.trim().length > 0);+ const submitLocal = async () => {+ if (!canSubmitLocal) return;+ const req: EngineSetRequest = { engine: 'cortexdb', endpoint: localEndpoint.trim() };+ if (localKey.trim()) req.api_key = localKey.trim();+ if (await select('selfhost', req)) setLocalKey('');};+ const trigger = (option: EngineOption, title: string, detail: string) => (+ <AccordionTrigger data-testid={`memory-engine-${option}-trigger`}>+ <span className="flex min-w-0 flex-1 flex-col gap-0.5">+ <span className="flex items-center gap-2">+ {title}+ {activeBadge(option)}+ </span>+ <span className="truncate text-xs font-normal text-content-muted">{detail}</span>+ </span>+ </AccordionTrigger>+ );+return (<divclassName={embedded ? 'space-y-4' : 'space-y-4 animate-fade-up'}data-testid="memory-engine-tab">{statusBanner}- {saveError !== null && (- <Alert variant="destructive" data-testid="memory-engine-save-error">- <AlertDescription>{saveError}</AlertDescription>- </Alert>- )}- {loadError !== null ? (- <Alert variant="destructive" data-testid="memory-engine-load-error">- <AlertTitle>{t('memoryPage.engine.loadError')}</AlertTitle>- <AlertDescription>{loadError}</AlertDescription>- </Alert>- ) : engines === null ? (- <CenteredLoadingState label={t('memoryPage.loading')} />- ) : (- <ProviderGroup- title={t('memoryPage.engine.listTitle')}- description={t('memoryPage.engine.listDescription')}- card+ <div className="space-y-2">+ <div>+ <h3 className="text-sm font-semibold text-content">{t('memoryPage.engine.listTitle')}</h3>+ <p className="text-xs text-content-muted">{t('memoryPage.engine.listDescription')}</p>+ </div>++ <AccordionRoot+ type="single"+ collapsible+ variant="card"+ value={open ?? active ?? 'builtin'}+ onValueChange={setOpen}data-testid="memory-engines">- {engines.map(engine => {- const isActive = engine.id === activeId;- const blocked = engine.hosted && !signedIn;- const testId = `memory-engine-${engine.id}`;- const configurable = engine.needs_endpoint || engine.needs_key;- return (- <ProviderListRow- key={engine.id}- slug={engine.id}- label={engine.label}- tone=""- detail={<span data-testid={`${testId}-detail`}>{rowDetail(engine)}</span>}- detailMono={!blocked && !engine.hosted}- badge={- isActive ? (- <Badge variant={on ? 'success' : 'warning'} data-testid={`${testId}-active`}>- {on ? t('memoryPage.engine.active') : t('memoryPage.engine.statusOff')}- </Badge>- ) : null- }- control={- isActive && !configurable ? null : (- <Button- type="button"- size="sm"- variant={isActive ? 'secondary' : 'primary'}- disabled={saving || blocked}- data-testid={`${testId}-use`}- onClick={() => choose(engine)}>- {isActive ? t('memoryPage.engine.edit') : t('memoryPage.engine.use')}- </Button>- )- }- data-testid={testId}- />- );- })}- </ProviderGroup>- )}-- {dialogFor && (- <MemoryEngineConnectDialog- engine={dialogFor}- currentEndpoint={dialogFor.id === activeId ? state?.endpoint : undefined}- keySaved={dialogFor.id === activeId && Boolean(state?.has_key)}- saving={saving}- onSubmit={select}- onClose={() => setDialogFor(null)}- />- )}+ <AccordionItem value="builtin" variant="card" data-testid="memory-engine-builtin">+ {trigger(+ 'builtin',+ t('memoryPage.engine.builtin.title'),+ builtinBlocked+ ? t('memoryPage.engine.builtin.signInRequired')+ : t('memoryPage.engine.builtin.detail')+ )}+ <AccordionContent className="space-y-3">+ <p>{t('memoryPage.engine.builtin.description')}</p>+ <p className="text-xs text-content-muted">+ {t('memoryPage.engine.builtin.enrichmentNote')}+ </p>+ {/* The backend origin the core resolved, read-only: never a+ hard-coded URL, and only known while Built-in is configured. */}+ {active === 'builtin' && state.endpoint && (+ <p className="text-xs text-content-muted">+ {t('memoryPage.engine.endpoint')}:{' '}+ <span className="font-mono" data-testid="memory-engine-builtin-endpoint">+ {state.endpoint}+ </span>+ </p>+ )}+ {builtinBlocked && (+ <p+ className="text-xs text-content-muted"+ data-testid="memory-engine-builtin-sign-in">+ {t('memoryPage.engine.builtin.signInHint')}+ </p>+ )}+ {itemError('builtin')}+ {!builtinIdle && (+ <Button+ type="button"+ size="sm"+ variant="primary"+ disabled={saving !== null || builtinBlocked}+ data-testid="memory-engine-builtin-use"+ onClick={() => void select('builtin', { engine: 'tinyhumans' })}>+ {saving === 'builtin'+ ? t('memoryPage.engine.connecting')+ : t('memoryPage.engine.use')}+ </Button>+ )}+ </AccordionContent>+ </AccordionItem>++ <AccordionItem value="apikey" variant="card" data-testid="memory-engine-apikey">+ {trigger('apikey', t('memoryPage.engine.apiKeyOption.title'), CORTEXDB_CLOUD_ENDPOINT)}+ <AccordionContent>+ <form+ className="flex flex-col gap-3"+ onSubmit={event => {+ event.preventDefault();+ void submitCloud();+ }}>+ <p>{t('memoryPage.engine.apiKeyOption.description')}</p>+ {keyField('apikey', cloudKey, setCloudKey)}+ {itemError('apikey')}+ <div>+ <Button+ type="submit"+ size="sm"+ variant="primary"+ disabled={!canSubmitCloud}+ data-testid="memory-engine-apikey-submit">+ {actionLabel('apikey')}+ </Button>+ </div>+ </form>+ </AccordionContent>+ </AccordionItem>++ <AccordionItem value="selfhost" variant="card" data-testid="memory-engine-selfhost">+ {trigger(+ 'selfhost',+ t('memoryPage.engine.selfHost.title'),+ active === 'selfhost' && state.endpoint+ ? state.endpoint+ : t('memoryPage.engine.selfHost.detail')+ )}+ <AccordionContent>+ <form+ className="flex flex-col gap-3"+ onSubmit={event => {+ event.preventDefault();+ void submitLocal();+ }}>+ <ol className="list-decimal space-y-1 pl-4">+ <li>+ {t('memoryPage.engine.selfHost.step1')}{' '}+ <a+ href={CORTEXDB_SELF_HOST_DOCS_URL}+ target="_blank"+ rel="noopener noreferrer"+ data-testid="memory-engine-selfhost-docs"+ onClick={event => {+ event.preventDefault();+ void openUrl(CORTEXDB_SELF_HOST_DOCS_URL).catch(() => undefined);+ }}+ className="inline-flex items-center gap-1 font-medium text-primary-600 hover:underline dark:text-primary-300">+ {t('memoryPage.engine.selfHost.docsLink')}+ <ExternalLink className="h-3 w-3" aria-hidden />+ </a>+ </li>+ <li>{t('memoryPage.engine.selfHost.step2')}</li>+ <li>{t('memoryPage.engine.selfHost.step3')}</li>+ </ol>+ <div className="flex flex-col gap-1.5">+ <Label+ htmlFor={`${baseId}-selfhost-endpoint`}+ className="text-xs text-content-secondary">+ {t('memoryPage.engine.endpoint')}+ </Label>+ <TextField+ id={`${baseId}-selfhost-endpoint`}+ data-testid="memory-engine-selfhost-endpoint"+ type="url"+ mono+ spellCheck={false}+ value={localEndpoint}+ disabled={saving !== null}+ placeholder={SELF_HOST_EXAMPLE_ENDPOINT}+ onChange={e => setTypedEndpoint(e.target.value)}+ />+ {endpointTyped && !endpointLocal && (+ <p+ className="text-[11px] leading-4 text-destructive"+ data-testid="memory-engine-selfhost-endpoint-error">+ {t('memoryPage.engine.selfHost.notLocal')}+ </p>+ )}+ </div>+ {keyField('selfhost', localKey, setLocalKey)}+ {itemError('selfhost')}+ <div>+ <Button+ type="submit"+ size="sm"+ variant="primary"+ disabled={!canSubmitLocal}+ data-testid="memory-engine-selfhost-submit">+ {actionLabel('selfhost')}+ </Button>+ </div>+ </form>+ </AccordionContent>+ </AccordionItem>+ </AccordionRoot>+ </div></div>);}diff --git a/app/src/components/memory/MemoryErrorAlert.test.tsx b/app/src/components/memory/MemoryErrorAlert.test.tsxnew file mode 100644index 0000000000..899bac4082--- /dev/null+++ b/app/src/components/memory/MemoryErrorAlert.test.tsx@@ -0,0 +1,113 @@+import { act, fireEvent, screen } from '@testing-library/react';+import { useState } from 'react';+import { Route, Routes } from 'react-router-dom';+import { describe, expect, it, vi } from 'vitest';++import { I18nProvider, useT } from '../../lib/i18n/I18nContext';+import { memoryErrorMessage } from '../../services/api/memoryApi';+import { setLocale } from '../../store/localeSlice';+import { renderWithProviders } from '../../test/test-utils';+import MemoryErrorAlert from './MemoryErrorAlert';++/** Renders the alert for `err` the way the memory views do: via memoryErrorMessage. */+function Harness({ err, retry }: { err: unknown; retry?: () => void }) {+ const { t } = useT();+ return (+ <MemoryErrorAlert message={memoryErrorMessage(err, t)} data-testid="alert" onRetry={retry} />+ );+}++function renderAt(err: unknown, retry?: () => void) {+ renderWithProviders(+ <Routes>+ <Route path="/" element={<Harness err={err} retry={retry} />} />+ <Route path="/settings/account" element={<div data-testid="billing-page" />} />+ </Routes>+ );+}++const coded = (code: string, message = 'engine detail') =>+ Object.assign(new Error(message), { data: { code, kind: code } });++describe('MemoryErrorAlert', () => {+ it('turns INSUFFICIENT_CREDITS into a top-up prompt, not an error', () => {+ renderAt(coded('INSUFFICIENT_CREDITS', 'insufficient credits: HTTP 402'));+ const alert = screen.getByTestId('alert');+ expect(alert).toHaveAttribute('data-kind', 'out-of-credits');+ expect(alert).toHaveAttribute('data-variant', 'warning');+ expect(alert).toHaveTextContent('Out of credits');+ expect(alert).toHaveTextContent('nothing stored has been lost');+ expect(alert).not.toHaveTextContent('HTTP 402');+ });++ it('sends Top up to the billing page', () => {+ renderAt(coded('INSUFFICIENT_CREDITS'));+ fireEvent.click(screen.getByTestId('memory-top-up'));+ expect(screen.getByTestId('billing-page')).toBeInTheDocument();+ });++ it.each([+ ['UNAVAILABLE', "Memory can't be reached right now"],+ ['ENGINE', 'engine detail'],+ ['UNAUTHORIZED', 'engine detail'],+ ])('keeps the error alert for %s', (code, text) => {+ renderAt(coded(code));+ const alert = screen.getByTestId('alert');+ expect(alert).toHaveAttribute('data-variant', 'destructive');+ expect(alert).toHaveTextContent(text);+ expect(alert).not.toHaveAttribute('data-kind');+ expect(screen.queryByTestId('memory-top-up')).not.toBeInTheDocument();+ });++ it('keeps the error alert for an error with no code', () => {+ renderAt(new Error('something broke'));+ expect(screen.getByTestId('alert')).toHaveAttribute('data-variant', 'destructive');+ expect(screen.queryByTestId('memory-top-up')).not.toBeInTheDocument();+ });++ it('offers Retry beside the error for other errors', () => {+ const retry = vi.fn();+ renderAt(coded('ENGINE'), retry);+ fireEvent.click(screen.getByRole('button', { name: 'Try again' }));+ expect(retry).toHaveBeenCalledTimes(1);+ });++ it('keeps Retry beside Top up when out of credits, for after a top-up', () => {+ const retry = vi.fn();+ renderAt(coded('INSUFFICIENT_CREDITS'), retry);+ expect(screen.getByTestId('memory-top-up')).toBeInTheDocument();+ fireEvent.click(screen.getByRole('button', { name: 'Try again' }));+ expect(retry).toHaveBeenCalledTimes(1);+ });++ it('shows no Retry when the view offers none', () => {+ renderAt(coded('INSUFFICIENT_CREDITS'));+ expect(screen.queryByRole('button', { name: 'Try again' })).not.toBeInTheDocument();+ });++ // Accepted edge of matching on the message: views keep the text they made+ // when the action failed, so after a language switch it no longer matches+ // the new language's text and falls back to the error alert.+ it('falls back to the error alert for a message made before a language switch', () => {+ function Frozen() {+ const { t } = useT();+ const [message] = useState(() => memoryErrorMessage(coded('INSUFFICIENT_CREDITS'), t));+ return <MemoryErrorAlert message={message} data-testid="alert" />;+ }+ const { store } = renderWithProviders(+ <I18nProvider>+ <Frozen />+ </I18nProvider>+ );+ expect(screen.getByTestId('alert')).toHaveAttribute('data-kind', 'out-of-credits');++ act(() => {+ store.dispatch(setLocale('fr'));+ });+ const alert = screen.getByTestId('alert');+ expect(alert).toHaveAttribute('data-variant', 'destructive');+ expect(alert).not.toHaveAttribute('data-kind');+ expect(alert).toHaveTextContent('Top up to restore it');+ expect(screen.queryByTestId('memory-top-up')).not.toBeInTheDocument();+ });+});diff --git a/app/src/components/memory/MemoryErrorAlert.tsx b/app/src/components/memory/MemoryErrorAlert.tsxnew file mode 100644index 0000000000..fef0ec9b1a--- /dev/null+++ b/app/src/components/memory/MemoryErrorAlert.tsx@@ -0,0 +1,102 @@+/**+ * How a failed memory action is shown. An exhausted credit balance+ * (`INSUFFICIENT_CREDITS`) is a prompt to top up, not an error: it explains+ * that nothing stored was lost and links to billing. Every other failure keeps+ * the destructive alert.+ */+import { useNavigate } from 'react-router-dom';++import { useT } from '../../lib/i18n/I18nContext';+import { isOutOfCreditsMessage } from '../../services/api/memoryApi';+import { Alert, AlertDescription, AlertTitle, Button } from '../ui';++/** Where the app sends every "top up" action (`open_billing` in useAppNotices). */+const BILLING_ROUTE = '/settings/account';++interface MemoryCreditsPromptProps {+ /** The out-of-credits explanation. */+ message: string;+ /** Retries the failed action (e.g. after a top-up), shown beside Top up. */+ onRetry?: () => void;+ className?: string;+ 'data-testid'?: string;+}++/** "Out of credits: top up", with a button to billing. */+export function MemoryCreditsPrompt({+ message,+ onRetry,+ className,+ 'data-testid': testId,+}: MemoryCreditsPromptProps) {+ const { t } = useT();+ const navigate = useNavigate();+ return (+ <Alert variant="warning" className={className} data-testid={testId} data-kind="out-of-credits">+ <AlertTitle>{t('memory.outOfCredits.title')}</AlertTitle>+ <AlertDescription className="flex flex-wrap items-center gap-2">+ <span>{message}</span>+ <Button+ type="button"+ size="xs"+ variant="primary"+ data-testid="memory-top-up"+ onClick={() => navigate(BILLING_ROUTE)}>+ {t('memory.outOfCredits.action')}+ </Button>+ {onRetry && <RetryButton onRetry={onRetry} />}+ </AlertDescription>+ </Alert>+ );+}++interface MemoryErrorAlertProps {+ /** The message `memoryErrorMessage(err, t)` produced. */+ message: string;+ className?: string;+ 'data-testid'?: string;+ /** Retries the failed action; shown in both the prompt and the error alert. */+ onRetry?: () => void;+}++function RetryButton({ onRetry }: { onRetry: () => void }) {+ const { t } = useT();+ return (+ <Button type="button" variant="tertiary" size="xs" onClick={onRetry}>+ {t('common.retry')}+ </Button>+ );+}++/** The credits prompt for an exhausted balance, else the error alert. */+export default function MemoryErrorAlert({+ message,+ className,+ 'data-testid': testId,+ onRetry,+}: MemoryErrorAlertProps) {+ const { t } = useT();+ if (isOutOfCreditsMessage(message, t)) {+ return (+ <MemoryCreditsPrompt+ message={message}+ onRetry={onRetry}+ className={className}+ data-testid={testId}+ />+ );+ }+ return (+ <Alert variant="destructive" className={className} data-testid={testId}>+ <AlertDescription>+ {message}+ {onRetry && (+ <>+ {' '}+ <RetryButton onRetry={onRetry} />+ </>+ )}+ </AlertDescription>+ </Alert>+ );+}diff --git a/app/src/components/memory/MemoryExplorerTab.tsx b/app/src/components/memory/MemoryExplorerTab.tsxindex 8b47bf0255..03830da33f 100644--- a/app/src/components/memory/MemoryExplorerTab.tsx+++ b/app/src/components/memory/MemoryExplorerTab.tsx@@ -30,8 +30,9 @@ import {memoryItemsList,type PathStep,} from '../../services/api/memoryApi';-import { Alert, AlertDescription, Button, Card, NativeSelect } from '../ui';+import { Button, Card, NativeSelect } from '../ui';import { CenteredLoadingState } from '../ui/LoadingState';+import MemoryErrorAlert from './MemoryErrorAlert';import { facetLabel, facetValueLabel, isMonoFacet, nextFacet } from './memoryFacetLabels';import { fill } from './memoryFormat';import MemoryHitRow from './MemoryHitRow';@@ -72,12 +73,12 @@ export default function MemoryExplorerTab() {.catch(err => {if (cancelled) return;log('explore failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));});return () => {cancelled = true;};- }, [facet, path, reloadKey]);+ }, [facet, path, reloadKey, t]);useEffect(() => {let cancelled = false;@@ -90,13 +91,13 @@ export default function MemoryExplorerTab() {.catch(err => {if (cancelled) return;log('list failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));setItems([]);});return () => {cancelled = true;};- }, [path, reloadKey]);+ }, [path, reloadKey, t]);const goTo = useCallback((next: PathStep[]) => {setError(null);@@ -114,7 +115,7 @@ export default function MemoryExplorerTab() {setItems(prev => [...(prev ?? []), ...(next.items ?? [])]);setCursor(next.next_cursor ?? null);} catch (err) {- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));} finally {setLoadingMore(false);}@@ -159,21 +160,14 @@ export default function MemoryExplorerTab() {</nav>{error !== null && (- <Alert variant="destructive" data-testid="memory-explorer-error">- <AlertDescription>- <span>{error}</span>{' '}- <Button- type="button"- variant="tertiary"- size="xs"- onClick={() => {- setError(null);- setReloadKey(k => k + 1);- }}>- {t('common.retry')}- </Button>- </AlertDescription>- </Alert>+ <MemoryErrorAlert+ message={error}+ data-testid="memory-explorer-error"+ onRetry={() => {+ setError(null);+ setReloadKey(k => k + 1);+ }}+ />)}<Carddiff --git a/app/src/components/memory/MemoryImportBanner.test.tsx b/app/src/components/memory/MemoryImportBanner.test.tsxindex ac5f1983a3..bae12beea2 100644--- a/app/src/components/memory/MemoryImportBanner.test.tsx+++ b/app/src/components/memory/MemoryImportBanner.test.tsx@@ -84,6 +84,32 @@ describe('MemoryImportBanner', () => {);});+ it('resumes a failed import through the consent dialog', async () => {+ hoisted.status.mockResolvedValue({+ state: { phase: 'error', imported: 2, total: 9, error: 'not enough credits to import' },+ });+ hoisted.start.mockResolvedValue({ state: { phase: 'running', imported: 2, total: 9 } });+ renderWithProviders(<MemoryImportBanner engineLabel="TinyHumans" />);++ fireEvent.click(await screen.findByTestId('memory-import-resume'));+ expect(screen.getByTestId('memory-import-consent')).toBeInTheDocument();+ expect(hoisted.start).not.toHaveBeenCalled();++ fireEvent.click(screen.getByTestId('memory-import-confirm'));+ expect(await screen.findByTestId('memory-import-running')).toHaveTextContent(+ '2 of 9 items imported'+ );+ expect(hoisted.start).toHaveBeenCalledTimes(1);+ expect(screen.queryByTestId('memory-import-resume')).not.toBeInTheDocument();+ });++ it('offers no resume while an import is running', async () => {+ hoisted.status.mockResolvedValue({ state: { phase: 'running', imported: 1, total: 9 } });+ renderWithProviders(<MemoryImportBanner engineLabel="TinyHumans" />);+ expect(await screen.findByTestId('memory-import-running')).toBeInTheDocument();+ expect(screen.queryByTestId('memory-import-resume')).not.toBeInTheDocument();+ });+it('shows a start failure', async () => {hoisted.start.mockRejectedValue(new Error('UNAUTHORIZED: sign in again'));renderWithProviders(<MemoryImportBanner engineLabel="TinyHumans" />);diff --git a/app/src/components/memory/MemoryImportBanner.tsx b/app/src/components/memory/MemoryImportBanner.tsxindex 038e0335ae..129ee96084 100644--- a/app/src/components/memory/MemoryImportBanner.tsx+++ b/app/src/components/memory/MemoryImportBanner.tsx@@ -20,6 +20,7 @@ import {memoryImportStatus,} from '../../services/api/memoryApi';import { Alert, AlertDescription, AlertTitle, Button, ConfirmDialog, Progress } from '../ui';+import MemoryErrorAlert from './MemoryErrorAlert';import { fill } from './memoryFormat';const log = debug('openhuman:memory:import');@@ -64,9 +65,9 @@ export default function MemoryImportBanner({ engineLabel }: MemoryImportBannerPrsetState(res.state);} catch (err) {log('status failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));}- }, []);+ }, [t]);const running = state?.phase === 'running';useEffect(() => {@@ -85,7 +86,7 @@ export default function MemoryImportBanner({ engineLabel }: MemoryImportBannerPrsetConsentOpen(false);} catch (err) {log('import start failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));setConsentOpen(false);} finally {setStarting(false);@@ -153,14 +154,24 @@ export default function MemoryImportBanner({ engineLabel }: MemoryImportBannerPrtotal: state.total,})}</AlertDescription>+ {state.phase === 'error' && (+ // The core keeps the checkpoint, so starting again resumes where+ // the import stopped; it still goes through the consent dialog.+ <Button+ type="button"+ size="sm"+ variant="primary"+ data-testid="memory-import-resume"+ onClick={() => setConsentOpen(true)}>+ {t('memoryPage.import.resume')}+ </Button>+ )}</div></Alert>)}{error !== null && (- <Alert variant="destructive" className="mt-3" data-testid="memory-import-error">- <AlertDescription>{error}</AlertDescription>- </Alert>+ <MemoryErrorAlert message={error} className="mt-3" data-testid="memory-import-error" />)}{consentOpen && (diff --git a/app/src/components/memory/MemoryItemDialog.tsx b/app/src/components/memory/MemoryItemDialog.tsxindex 44eaa31cda..15b22a4ce0 100644--- a/app/src/components/memory/MemoryItemDialog.tsx+++ b/app/src/components/memory/MemoryItemDialog.tsx@@ -15,8 +15,9 @@ import {memoryItemsGet,type MemoryMeta,} from '../../services/api/memoryApi';-import { Alert, AlertDescription, Badge, Button, ModalShell } from '../ui';+import { Badge, Button, ModalShell } from '../ui';import { CenteredLoadingState } from '../ui/LoadingState';+import MemoryErrorAlert from './MemoryErrorAlert';import { facetLabel } from './memoryFacetLabels';import { formatTimestamp, KIND_VARIANT, kindLabel } from './memoryFormat';@@ -84,12 +85,12 @@ export default function MemoryItemDialog({ id, onClose, onForgotten }: MemoryIte.catch(err => {if (cancelled) return;log('read failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));});return () => {cancelled = true;};- }, [id]);+ }, [id, t]);const forget = async () => {setForgetting(true);@@ -101,7 +102,7 @@ export default function MemoryItemDialog({ id, onClose, onForgotten }: MemoryIteonClose();} catch (err) {log('forget failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));} finally {setForgetting(false);}@@ -137,11 +138,7 @@ export default function MemoryItemDialog({ id, onClose, onForgotten }: MemoryIte</div>}><div className="space-y-4">- {error !== null && (- <Alert variant="destructive" data-testid="memory-item-error">- <AlertDescription>{error}</AlertDescription>- </Alert>- )}+ {error !== null && <MemoryErrorAlert message={error} data-testid="memory-item-error" />}{missing ? (<p className="text-sm text-content-muted" data-testid="memory-item-missing">{t('memoryPage.explorer.itemMissing')}diff --git a/app/src/components/memory/MemoryLearningsTab.test.tsx b/app/src/components/memory/MemoryLearningsTab.test.tsxindex bfe7f8ce60..e6e312f02b 100644--- a/app/src/components/memory/MemoryLearningsTab.test.tsx+++ b/app/src/components/memory/MemoryLearningsTab.test.tsx@@ -5,15 +5,31 @@ import type { Hit } from '../../services/api/memoryApi';import { renderWithProviders } from '../../test/test-utils';import MemoryLearningsTab from './MemoryLearningsTab';-const hoisted = vi.hoisted(() => ({ list: vi.fn(), learn: vi.fn(), forget: vi.fn() }));+const hoisted = vi.hoisted(() => ({+ list: vi.fn(),+ learn: vi.fn(),+ forget: vi.fn(),+ jobs: vi.fn(),+}));vi.mock('../../services/api/memoryApi', async importOriginal => ({...(await importOriginal<typeof import('../../services/api/memoryApi')>()),memoryItemsList: (...a: unknown[]) => hoisted.list(...a),memoryLearn: (...a: unknown[]) => hoisted.learn(...a),memoryForget: (...a: unknown[]) => hoisted.forget(...a),+ memoryJobsList: (...a: unknown[]) => hoisted.jobs(...a),}));+function pendingBuild(id: string) {+ return {+ id,+ root: 'default',+ job: { job: 'build_beliefs' },+ queued_at: '2026-10-06T00:00:00Z',+ attempts: 0,+ };+}+function learning(id: string, text: string): Hit {return { id, kind: 'learning', text, meta: {}, score: 0 };}@@ -22,6 +38,8 @@ beforeEach(() => {hoisted.list.mockReset();hoisted.learn.mockReset();hoisted.forget.mockReset();+ hoisted.jobs.mockReset();+ hoisted.jobs.mockResolvedValue({ pending: [], history: [] });});describe('MemoryLearningsTab', () => {@@ -55,6 +73,46 @@ describe('MemoryLearningsTab', () => {hoisted.list.mockResolvedValue({ items: [] });renderWithProviders(<MemoryLearningsTab />);expect(await screen.findByTestId('memory-learnings-empty')).toBeInTheDocument();+ await waitFor(() => expect(hoisted.jobs).toHaveBeenCalled());+ expect(screen.queryByTestId('memory-learnings-deriving')).not.toBeInTheDocument();+ });++ it('says beliefs are still building when the list is empty and a build is pending', async () => {+ hoisted.list.mockResolvedValue({ items: [] });+ hoisted.jobs.mockResolvedValue({+ pending: [pendingBuild('j1'), { ...pendingBuild('j2'), job: { job: 'ingest_brain' } }],+ history: [],+ });+ renderWithProviders(<MemoryLearningsTab />);+ expect(await screen.findByTestId('memory-learnings-deriving')).toHaveTextContent(+ 'still building beliefs'+ );+ expect(screen.queryByTestId('memory-learnings-empty')).not.toBeInTheDocument();+ });++ it('keeps the plain empty state when only other jobs are pending or the queue cannot be read', async () => {+ hoisted.list.mockResolvedValue({ items: [] });+ hoisted.jobs.mockResolvedValue({+ pending: [{ ...pendingBuild('j2'), job: { job: 'ingest_brain' } }],+ history: [],+ });+ const { unmount } = renderWithProviders(<MemoryLearningsTab />);+ expect(await screen.findByTestId('memory-learnings-empty')).toBeInTheDocument();+ await waitFor(() => expect(hoisted.jobs).toHaveBeenCalled());+ expect(screen.queryByTestId('memory-learnings-deriving')).not.toBeInTheDocument();+ unmount();++ hoisted.jobs.mockRejectedValue(new Error('core offline'));+ renderWithProviders(<MemoryLearningsTab />);+ expect(await screen.findByTestId('memory-learnings-empty')).toBeInTheDocument();+ expect(screen.queryByTestId('memory-learnings-deriving')).not.toBeInTheDocument();+ });++ it('does not read the job queue when there are learnings', async () => {+ hoisted.list.mockResolvedValue({ items: [learning('l1', 'Prefers dark mode')] });+ renderWithProviders(<MemoryLearningsTab />);+ await screen.findByTestId('memory-learning-l1');+ expect(hoisted.jobs).not.toHaveBeenCalled();});it('pages with the cursor', async () => {diff --git a/app/src/components/memory/MemoryLearningsTab.tsx b/app/src/components/memory/MemoryLearningsTab.tsxindex 84dd6ec98c..328f59f0f2 100644--- a/app/src/components/memory/MemoryLearningsTab.tsx+++ b/app/src/components/memory/MemoryLearningsTab.tsx@@ -4,6 +4,10 @@* adds one with `memory_learn`, and deletes with `memory_forget`. Beliefs the* background builder distilled (tagged `belief`) carry a "Built belief" badge.*+ * Beliefs are built by a queued background job minutes behind the writes, so+ * an empty list while a build is pending reads as "still building", never as+ * "no memory" (#6718).+ ** debug logging: DEBUG=openhuman:memory:learnings*/import debug from 'debug';@@ -18,10 +22,12 @@ import {memoryErrorMessage,memoryForget,memoryItemsList,+ memoryJobsList,memoryLearn,} from '../../services/api/memoryApi';-import { Alert, AlertDescription, Button, Card, Label, NativeSelect, TextArea } from '../ui';+import { Button, Card, Label, NativeSelect, TextArea } from '../ui';import { CenteredLoadingState } from '../ui/LoadingState';+import MemoryErrorAlert from './MemoryErrorAlert';import MemoryHitRow from './MemoryHitRow';const log = debug('openhuman:memory:learnings');@@ -38,6 +44,7 @@ export default function MemoryLearningsTab() {const [kind, setKind] = useState<LearningKind>('fact');const [adding, setAdding] = useState(false);const [deleting, setDeleting] = useState<string | null>(null);+ const [buildsPending, setBuildsPending] = useState(false);const kindLabel = (k: LearningKind): string => {switch (k) {@@ -64,6 +71,28 @@ export default function MemoryLearningsTab() {return page;}, []);+ // Only asked when the list is empty; a failure leaves the plain empty state.+ const empty = items !== null && items.length === 0;+ useEffect(() => {+ if (!empty) return;+ let cancelled = false;+ memoryJobsList()+ .then(jobs => {+ if (cancelled) return;+ const pending = (jobs.pending ?? []).filter(job => job.job?.job === 'build_beliefs');+ log('empty list: %d belief build(s) pending', pending.length);+ setBuildsPending(pending.length > 0);+ })+ .catch(err => {+ if (cancelled) return;+ log('jobs list failed: %o', err);+ setBuildsPending(false);+ });+ return () => {+ cancelled = true;+ };+ }, [empty]);+const reload = useCallback(async () => {setError(null);try {@@ -72,10 +101,10 @@ export default function MemoryLearningsTab() {setCursor(page.next_cursor ?? null);} catch (err) {log('list failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));setItems(prev => prev ?? []);}- }, [loadPage]);+ }, [loadPage, t]);useEffect(() => {let cancelled = false;@@ -88,13 +117,13 @@ export default function MemoryLearningsTab() {.catch(err => {if (cancelled) return;log('list failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));setItems([]);});return () => {cancelled = true;};- }, [loadPage]);+ }, [loadPage, t]);const loadMore = async () => {if (!cursor) return;@@ -104,7 +133,7 @@ export default function MemoryLearningsTab() {setItems(prev => [...(prev ?? []), ...(page.items ?? [])]);setCursor(page.next_cursor ?? null);} catch (err) {- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));} finally {setLoadingMore(false);}@@ -123,7 +152,7 @@ export default function MemoryLearningsTab() {await reload();} catch (err) {log('learn failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));} finally {setAdding(false);}@@ -137,7 +166,7 @@ export default function MemoryLearningsTab() {setItems(prev => (prev ?? []).filter(item => item.id !== id));} catch (err) {log('forget failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));} finally {setDeleting(null);}@@ -186,17 +215,19 @@ export default function MemoryLearningsTab() {</form></Card>- {error !== null && (- <Alert variant="destructive" data-testid="memory-learnings-error">- <AlertDescription>{error}</AlertDescription>- </Alert>- )}+ {error !== null && <MemoryErrorAlert message={error} data-testid="memory-learnings-error" />}{items === null ? (<CenteredLoadingState label={t('memoryPage.loading')} />) : (<Card title={t('memoryPage.learnings.listTitle')} data-testid="memory-learnings-list">- {items.length === 0 ? (+ {items.length === 0 && buildsPending ? (+ <p+ className="px-4 py-3 text-sm text-content-muted"+ data-testid="memory-learnings-deriving">+ {t('memoryPage.learnings.deriving')}+ </p>+ ) : items.length === 0 ? (<pclassName="px-4 py-3 text-sm text-content-muted"data-testid="memory-learnings-empty">diff --git a/app/src/components/memory/MemoryPackPreview.tsx b/app/src/components/memory/MemoryPackPreview.tsxindex c59d73e534..3254ca3b7c 100644--- a/app/src/components/memory/MemoryPackPreview.tsx+++ b/app/src/components/memory/MemoryPackPreview.tsx@@ -22,8 +22,9 @@ import {memoryPolicyGet,type PackPreview,} from '../../services/api/memoryApi';-import { Alert, AlertDescription, Badge, Button, Card, Label, NativeSelect, TextArea } from '../ui';+import { Badge, Button, Card, Label, NativeSelect, TextArea } from '../ui';import { CenteredLoadingState } from '../ui/LoadingState';+import MemoryErrorAlert from './MemoryErrorAlert';import { fill } from './memoryFormat';const log = debug('openhuman:memory:pack');@@ -73,7 +74,7 @@ export default function MemoryPackPreview() {setPreview(res);} catch (err) {log('preview failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));} finally {setBusy(false);}@@ -127,11 +128,7 @@ export default function MemoryPackPreview() {</form></Card>- {error !== null && (- <Alert variant="destructive" data-testid="memory-pack-error">- <AlertDescription>{error}</AlertDescription>- </Alert>- )}+ {error !== null && <MemoryErrorAlert message={error} data-testid="memory-pack-error" />}{busy && <CenteredLoadingState label={t('memoryPage.pack.building')} />}diff --git a/app/src/components/memory/MemorySettingsTab.tsx b/app/src/components/memory/MemorySettingsTab.tsxindex 0a89b52b55..c0c5eb0c85 100644--- a/app/src/components/memory/MemorySettingsTab.tsx+++ b/app/src/components/memory/MemorySettingsTab.tsx@@ -22,8 +22,9 @@ import {memoryPolicySet,type PolicyUpdate,} from '../../services/api/memoryApi';-import { Alert, AlertDescription, Card, NumberField, Switch } from '../ui';+import { Card, NumberField, Switch } from '../ui';import { CenteredLoadingState } from '../ui/LoadingState';+import MemoryErrorAlert from './MemoryErrorAlert';import { parseIntInRange } from './memoryFormat';const log = debug('openhuman:memory:settings');@@ -138,12 +139,12 @@ export default function MemorySettingsTab() {.catch(err => {if (cancelled) return;log('policy_get failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));});return () => {cancelled = true;};- }, [apply]);+ }, [apply, t]);const save = async (update: PolicyUpdate) => {setSaving(true);@@ -153,7 +154,7 @@ export default function MemorySettingsTab() {apply(await memoryPolicySet(update));} catch (err) {log('policy_set failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));// Show the stored values again, not the rejected entry.setDrafts(prev => (policy ? draftsFrom(policy) : prev));} finally {@@ -175,9 +176,7 @@ export default function MemorySettingsTab() {if (policy === null || drafts === null) {return error !== null ? (- <Alert variant="destructive" data-testid="memory-settings-error">- <AlertDescription>{error}</AlertDescription>- </Alert>+ <MemoryErrorAlert message={error} data-testid="memory-settings-error" />) : (<CenteredLoadingState label={t('memoryPage.loading')} />);@@ -187,11 +186,7 @@ export default function MemorySettingsTab() {return (<div className="space-y-4 animate-fade-up" data-testid="memory-settings-tab">- {error !== null && (- <Alert variant="destructive" data-testid="memory-settings-error">- <AlertDescription>{error}</AlertDescription>- </Alert>- )}+ {error !== null && <MemoryErrorAlert message={error} data-testid="memory-settings-error" />}<Cardtitle={t('memoryPage.settings.recallTitle')}diff --git a/app/src/components/memory/MemorySyncedSources.test.tsx b/app/src/components/memory/MemorySyncedSources.test.tsxindex f9fe14ebfe..4ff0214527 100644--- a/app/src/components/memory/MemorySyncedSources.test.tsx+++ b/app/src/components/memory/MemorySyncedSources.test.tsx@@ -107,6 +107,20 @@ describe('MemorySyncedSources', () => {expect(hoisted.add).toHaveBeenCalledWith({ kind: 'github', target: 'acme/missing' });});+ it('prompts a top-up in the add dialog when the account is out of credits', async () => {+ hoisted.add.mockRejectedValue(new Error('INSUFFICIENT_CREDITS: HTTP 402'));+ renderWithProviders(<MemorySyncedSources />);+ fireEvent.click(await screen.findByTestId('memory-sources-add'));+ fireEvent.change(screen.getByTestId('memory-add-source-target'), {+ target: { value: '/Users/me/notes' },+ });+ fireEvent.click(screen.getByTestId('memory-add-source-submit'));+ const prompt = await screen.findByTestId('memory-add-source-error');+ expect(prompt).toHaveAttribute('data-kind', 'out-of-credits');+ expect(prompt).not.toHaveTextContent('HTTP 402');+ expect(screen.getByTestId('memory-top-up')).toBeInTheDocument();+ });+it('syncs one source and marks it syncing', async () => {hoisted.sync.mockResolvedValue({ started: ['s1'] });renderWithProviders(<MemorySyncedSources />);diff --git a/app/src/components/memory/MemorySyncedSources.tsx b/app/src/components/memory/MemorySyncedSources.tsxindex 8e6773bc9f..cbaf7fb911 100644--- a/app/src/components/memory/MemorySyncedSources.tsx+++ b/app/src/components/memory/MemorySyncedSources.tsx@@ -20,9 +20,10 @@ import {type Source,type SourceAddRequest,} from '../../services/api/memoryApi';-import { Alert, AlertDescription, Badge, Button, Card, Checkbox, ConfirmDialog } from '../ui';+import { Badge, Button, Card, Checkbox, ConfirmDialog } from '../ui';import { CenteredLoadingState } from '../ui/LoadingState';import MemoryAddSourceDialog from './MemoryAddSourceDialog';+import MemoryErrorAlert from './MemoryErrorAlert';import { fill, formatTimestamp } from './memoryFormat';import { SOURCE_STATUS_VARIANT, sourceKindLabel, sourceStatusLabel } from './memorySourceLabels';@@ -49,10 +50,10 @@ export default function MemorySyncedSources() {setError(null);} catch (err) {log('list failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));setSources(prev => prev ?? []);}- }, []);+ }, [t]);// Initial load. `reload` re-reads on demand (polling); the effect awaits// before touching state so the first render is never re-rendered in place.@@ -67,13 +68,13 @@ export default function MemorySyncedSources() {.catch(err => {if (cancelled) return;log('list failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));setSources([]);});return () => {cancelled = true;};- }, []);+ }, [t]);// While anything is syncing, re-read the registry so status, item counts and// errors move on their own; idle registries are not polled.@@ -94,7 +95,7 @@ export default function MemorySyncedSources() {return true;} catch (err) {log('add failed: %o', err);- setAddError(memoryErrorMessage(err));+ setAddError(memoryErrorMessage(err, t));return false;} finally {setSaving(false);@@ -114,7 +115,7 @@ export default function MemorySyncedSources() {);} catch (err) {log('sync failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));} finally {setSyncing(prev => {const next = new Set(prev);@@ -136,7 +137,7 @@ export default function MemorySyncedSources() {setRemoveTarget(null);} catch (err) {log('remove failed: %o', err);- setError(memoryErrorMessage(err));+ setError(memoryErrorMessage(err, t));setRemoveTarget(null);} finally {setSaving(false);@@ -148,9 +149,7 @@ export default function MemorySyncedSources() {return (<div className="space-y-4" data-testid="memory-synced-sources">{error !== null && (- <Alert variant="destructive" data-testid="memory-synced-sources-error">- <AlertDescription>{error}</AlertDescription>- </Alert>+ <MemoryErrorAlert message={error} data-testid="memory-synced-sources-error" />)}<Carddiff --git a/app/src/components/oauth/OAuthProviderButton.tsx b/app/src/components/oauth/OAuthProviderButton.tsxindex 719336f9e1..2a946578bb 100644--- a/app/src/components/oauth/OAuthProviderButton.tsx+++ b/app/src/components/oauth/OAuthProviderButton.tsx@@ -4,8 +4,10 @@ import { useEffect, useRef, useState } from 'react';import { useT } from '../../lib/i18n/I18nContext';import { checkBackendHealthy } from '../../services/backendHealth';import {+ beginAwaitingAuthCallback,beginDeepLinkAuthProcessing,completeDeepLinkAuthProcessing,+ endAwaitingAuthCallback,getDeepLinkAuthState,} from '../../store/deepLinkAuthState';import type { OAuthProviderConfig } from '../../types/oauth';@@ -190,8 +192,13 @@ const OAuthProviderButton = ({const timer = window.setTimeout(() => {log('[%s] timeout -> reset isLoading', provider.id);reset();- // 90s with no deep-link is a strong "something went wrong" signal even- // if the user never refocused the app. Probe so we can attribute it.+ // Stop holding the hand-off screen: after this long the browser is not+ // coming back on its own, and a spinner with no end is worse than a+ // screen that says so.+ endAwaitingAuthCallback();+ // Five minutes with no deep-link is a strong "something went wrong"+ // signal even if the user never refocused the app. Probe so we can+ // attribute it.probeBackendOnReturn('timeout');}, OAUTH_LOADING_TIMEOUT_MS);@@ -340,7 +347,12 @@ const OAuthProviderButton = ({window.location.href = loginUrl;}browserOpenedRef.current = true;+ // The launch step is done, but the sign-in is not: the user is now in+ // another window. Mark that explicitly so the UI can hold a hand-off+ // screen until the callback lands, instead of snapping back to the+ // sign-in buttons a second after the browser opens.completeDeepLinkAuthProcessing();+ beginAwaitingAuthCallback();} catch (error) {completeDeepLinkAuthProcessing();const message = getOAuthStartupFailureMessage(provider, error);diff --git a/app/src/components/oauth/__tests__/OAuthProviderButton.test.tsx b/app/src/components/oauth/__tests__/OAuthProviderButton.test.tsxindex 3663f49ff2..d95201ea5b 100644--- a/app/src/components/oauth/__tests__/OAuthProviderButton.test.tsx+++ b/app/src/components/oauth/__tests__/OAuthProviderButton.test.tsx@@ -3,8 +3,10 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { checkBackendHealthy } from '../../../services/backendHealth';import {+ beginAwaitingAuthCallback,beginDeepLinkAuthProcessing,completeDeepLinkAuthProcessing,+ endAwaitingAuthCallback,getDeepLinkAuthState,} from '../../../store/deepLinkAuthState';import { handleDeepLinkUrls } from '../../../utils/desktopDeepLinkListener';@@ -35,6 +37,8 @@ vi.mock('../../../utils/desktopDeepLinkListener', () => ({vi.mock('../../../store/deepLinkAuthState', () => ({beginDeepLinkAuthProcessing: vi.fn(),completeDeepLinkAuthProcessing: vi.fn(),+ beginAwaitingAuthCallback: vi.fn(),+ endAwaitingAuthCallback: vi.fn(),getDeepLinkAuthState: vi.fn(),}));@@ -67,6 +71,7 @@ describe('OAuthProviderButton', () => {vi.mocked(isTauri).mockReturnValue(true);vi.mocked(getDeepLinkAuthState).mockReturnValue({isProcessing: false,+ awaitingCallback: false,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,@@ -124,6 +129,7 @@ describe('OAuthProviderButton', () => {it('does NOT reset isLoading on focus when a deep-link auth round-trip is processing', async () => {vi.mocked(getDeepLinkAuthState).mockReturnValue({isProcessing: true,+ awaitingCallback: false,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,@@ -199,6 +205,29 @@ describe('OAuthProviderButton', () => {expect(screen.getByRole('button', { name: 'Google' })).toBeEnabled();});+ it('ends the awaiting-callback hand-off when the 300s timeout elapses, not before', async () => {+ render(<OAuthProviderButton provider={stubProvider} />);++ fireEvent.click(screen.getByRole('button', { name: 'Google' }));+ await act(async () => {+ for (let i = 0; i < 6; i++) await Promise.resolve();+ });++ // The browser is open: the hand-off flag was raised and not yet dropped.+ expect(beginAwaitingAuthCallback).toHaveBeenCalledTimes(1);+ expect(endAwaitingAuthCallback).not.toHaveBeenCalled();++ await act(async () => {+ vi.advanceTimersByTime(299_999);+ });+ expect(endAwaitingAuthCallback).not.toHaveBeenCalled();++ await act(async () => {+ vi.advanceTimersByTime(1);+ });+ expect(endAwaitingAuthCallback).toHaveBeenCalledTimes(1);+ });+it('honors onClickOverride and skips the OAuth flow', () => {const override = vi.fn();@@ -485,6 +514,7 @@ describe('OAuthProviderButton web dev redirect', () => {vi.mocked(isTauri).mockReturnValue(false);vi.mocked(getDeepLinkAuthState).mockReturnValue({isProcessing: false,+ awaitingCallback: false,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,@@ -543,6 +573,7 @@ describe('OAuthProviderButton — every configured provider reaches its own backvi.mocked(isTauri).mockReturnValue(true);vi.mocked(getDeepLinkAuthState).mockReturnValue({isProcessing: false,+ awaitingCallback: false,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,diff --git a/app/src/components/settings/panels/AIPanel.tsx b/app/src/components/settings/panels/AIPanel.tsxindex dad0c63501..126466a774 100644--- a/app/src/components/settings/panels/AIPanel.tsx+++ b/app/src/components/settings/panels/AIPanel.tsx@@ -11,7 +11,7 @@** This file is a thin composition — every section lives in `./ai/*`.*/-import { useCallback, useRef, useState } from 'react';+import { useCallback, useEffect, useRef, useState } from 'react';import { useT } from '../../../lib/i18n/I18nContext';import {@@ -62,6 +62,16 @@ interface AIPanelProps {onTabChange?: (tab: AIPanelTab) => void;/** Suppress PanelPage's internal tab chrome for a host-rendered chip row. */hideTabChrome?: boolean;+ /**+ * Reports whether the panel holds unsaved edits.+ *+ * The onboarding wizard needs this: the panel keeps its own `SaveBar`, so a+ * host with its own Continue button offers two competing ways to commit, and+ * Continue used to navigate away and drop the edits silently. The wizard+ * subscribes and disables Continue while dirty. Undefined for Settings,+ * which has no second commit control.+ */+ onDirtyChange?: (dirty: boolean) => void;/** Host-owned "Add provider" dialog state (the host renders the button in* its header). Undefined lets the providers section keep its own button. */addProviderOpen?: boolean;@@ -75,10 +85,17 @@ const AIPanel = ({hideTabChrome = false,addProviderOpen,onAddProviderOpenChange,+ onDirtyChange,}: AIPanelProps = {}) => {const { t } = useT();const { navigateBack } = useSettingsNavigation();const { saved, draft, isDirty, save, persist, discard, loading, error, reload } = useAISettings();++ // Let a host with its own commit control know there are unsaved edits. See+ // the prop's note: without this the wizard's Continue silently discarded them.+ useEffect(() => {+ onDirtyChange?.(isDirty);+ }, [isDirty, onDirtyChange]);// #1574 §4b: advisory re-embed modal, driven by the backend status RPC.const ollama = useOllamaStatus();const installed = useInstalledModels(ollama.snapshot);@@ -206,6 +223,7 @@ const AIPanel = ({content: (<div className="flex w-full flex-col gap-4"><ProviderAuthSection+ hideAddButton={hideTabChrome}draft={draft}persist={persist}loading={loading}diff --git a/app/src/components/settings/panels/BrowserConnectionsPanel.test.tsx b/app/src/components/settings/panels/BrowserConnectionsPanel.test.tsxindex a91e564346..d9d8e2f598 100644--- a/app/src/components/settings/panels/BrowserConnectionsPanel.test.tsx+++ b/app/src/components/settings/panels/BrowserConnectionsPanel.test.tsx@@ -64,7 +64,7 @@ describe('BrowserConnectionsPanel', () => {));await waitFor(() => expect(screen.getByText('connections.browser.testBrowser')).toBeEnabled());- mocks.rpc.mockResolvedValueOnce({ result: { module_ready: true, chrome_ready: true } });+ mocks.rpc.mockResolvedValueOnce({ module_ready: true, chrome_ready: true });fireEvent.click(screen.getByText('connections.browser.testBrowser'));await waitFor(() =>expect(mocks.rpc).toHaveBeenCalledWith({@@ -131,10 +131,58 @@ describe('BrowserConnectionsPanel', () => {);});+ it('sends only the accepted fields when the config carries legacy browser keys', async () => {+ mocks.getConfig.mockResolvedValue({+ result: {+ config: {+ browser: {+ enabled: false,+ headless: true,+ viewport_width: 1280,+ viewport_height: 800,+ profile_mode: 'fresh',+ max_task_steps: 20,+ task_timeout_secs: 120,+ chrome_path: null,+ allowed_domains: [],+ session_name: null,+ backend: 'auto',+ native_headless: true,+ native_webdriver_url: 'http://127.0.0.1:9515',+ native_chrome_path: null,+ computer_use: { endpoint: 'http://127.0.0.1:8787/v1/actions', timeout_ms: 15000 },+ },+ http_request: { allowed_domains: ['selenium.dev'] },+ },+ },+ });+ renderWithProviders(<BrowserConnectionsPanel />);+ await screen.findByText('selenium.dev');+ fireEvent.click(screen.getByLabelText('connections.browser.enabled'));+ fireEvent.click(screen.getByText('connections.browser.save'));+ await waitFor(() => expect(mocks.update).toHaveBeenCalledTimes(1));+ const sent = mocks.update.mock.calls[0][0] as Record<string, unknown>;+ expect(Object.keys(sent).sort()).toEqual(+ [+ 'chrome_path',+ 'download_dir',+ 'enabled',+ 'headless',+ 'max_task_steps',+ 'profile_mode',+ 'profile_path',+ 'task_timeout_secs',+ 'viewport_height',+ 'viewport_width',+ ].sort()+ );+ expect(sent).toMatchObject({ enabled: true, viewport_height: 800 });+ });+it('checks Chrome by opening and closing a core browser session', async () => {renderWithProviders(<BrowserConnectionsPanel />);await screen.findByText('selenium.dev');- mocks.rpc.mockResolvedValueOnce({ result: { module_ready: true, chrome_ready: true } });+ mocks.rpc.mockResolvedValueOnce({ module_ready: true, chrome_ready: true, error: null });fireEvent.click(screen.getByText('connections.browser.testBrowser'));await waitFor(() =>expect(mocks.rpc).toHaveBeenCalledWith({@@ -148,7 +196,9 @@ describe('BrowserConnectionsPanel', () => {renderWithProviders(<BrowserConnectionsPanel />);await screen.findByText('selenium.dev');mocks.rpc.mockResolvedValueOnce({- result: { module_ready: true, chrome_ready: false, error: 'Chrome unavailable' },+ module_ready: true,+ chrome_ready: false,+ error: 'Chrome unavailable',});fireEvent.click(screen.getByText('connections.browser.testBrowser'));expect(await screen.findByText('connections.browser.chromeNotReady')).toBeInTheDocument();diff --git a/app/src/components/settings/panels/BrowserConnectionsPanel.tsx b/app/src/components/settings/panels/BrowserConnectionsPanel.tsxindex 724a10a445..cbe4d9cf11 100644--- a/app/src/components/settings/panels/BrowserConnectionsPanel.tsx+++ b/app/src/components/settings/panels/BrowserConnectionsPanel.tsx@@ -50,6 +50,24 @@ const defaults: BrowserSettings = {task_timeout_secs: 120,};+/** The fields this panel edits, all accepted by `config.update_browser_settings`. */+const SETTING_KEYS = Object.keys(defaults) as (keyof BrowserSettings)[];++/**+ * Keep only the panel's own fields. The `[browser]` config block also carries+ * legacy keys (`allowed_domains`, `native_*`, `computer_use`, ...), and the+ * core rejects any unknown param, so sending the whole block fails every save.+ */+function pickSettings(source: Partial<Record<keyof BrowserSettings, unknown>>): BrowserSettings {+ const picked: Partial<Record<keyof BrowserSettings, unknown>> = {};+ for (const key of SETTING_KEYS) {+ if (source[key] !== undefined) picked[key] = source[key];+ }+ return { ...defaults, ...(picked as Partial<BrowserSettings>) };+}++type BrowserReadiness = { module_ready: boolean; chrome_ready: boolean; error?: string | null };+export interface BrowserConnectionsPanelProps {/** Render only the body, for hosting inside the Computer panel's chip tabs. */embedded?: boolean;@@ -68,8 +86,7 @@ export default function BrowserConnectionsPanel({const refresh = useCallback(async () => {const configResponse = await openhumanGetConfig();const config = configResponse.result.config;- const browser = (config.browser ?? {}) as Partial<BrowserSettings>;- setSettings({ ...defaults, ...browser });+ setSettings(pickSettings((config.browser ?? {}) as Partial<BrowserSettings>));const httpRequest = (config.http_request ?? {}) as { allowed_domains?: string[] };setAllowedDomains(httpRequest.allowed_domains ?? []);}, []);@@ -100,7 +117,7 @@ export default function BrowserConnectionsPanel({setMessage(t('connections.browser.boundsRequired'));return;}- await openhumanUpdateBrowserSettings(settings);+ await openhumanUpdateBrowserSettings(pickSettings(settings));setChromeReady(null);await refresh();setMessage(t('connections.browser.saved'));@@ -115,11 +132,12 @@ export default function BrowserConnectionsPanel({setBusy(true);setMessage('');try {- const response = await callCoreRpc<{- result: { module_ready: boolean; chrome_ready: boolean; error?: string };- }>({ method: 'openhuman.modules_browser_check_readiness' });- setChromeReady(response.result.chrome_ready);- setMessage(response.result.error ?? t('connections.browser.readinessChecked'));+ // callCoreRpc already unwraps the JSON-RPC `result`.+ const response = await callCoreRpc<BrowserReadiness>({+ method: 'openhuman.modules_browser_check_readiness',+ });+ setChromeReady(response.chrome_ready);+ setMessage(response.error ?? t('connections.browser.readinessChecked'));} catch (error) {setChromeReady(false);setMessage(error instanceof Error ? error.message : String(error));diff --git a/app/src/components/settings/panels/SearchPanel.test.tsx b/app/src/components/settings/panels/SearchPanel.test.tsxindex dbad7504e1..a275841037 100644--- a/app/src/components/settings/panels/SearchPanel.test.tsx+++ b/app/src/components/settings/panels/SearchPanel.test.tsx@@ -379,6 +379,24 @@ describe('SearchPanel — connected providers', () => {});});+describe('SearchPanel — wizard chrome', () => {+ test('Connected group cites the Routing tab normally', async () => {+ await renderPanel();+ expect(screen.getByTestId('search-providers')).toHaveTextContent(+ 'settings.search.connectedDesc'+ );+ });++ // The copy points at a Routing tab the onboarding wizard hides.+ test('Connected group carries no description when the tab chrome is hidden', async () => {+ renderWithProviders(<SearchPanel embedded hideTabChrome />);+ await screen.findByTestId('search-providers');+ expect(screen.getByTestId('search-providers')).not.toHaveTextContent(+ 'settings.search.connectedDesc'+ );+ });+});+describe('SearchPanel — add a provider', () => {const withTinyFish = () =>settings({diff --git a/app/src/components/settings/panels/SearchPanel.tsx b/app/src/components/settings/panels/SearchPanel.tsxindex 67865b3bf1..3ae83ff209 100644--- a/app/src/components/settings/panels/SearchPanel.tsx+++ b/app/src/components/settings/panels/SearchPanel.tsx@@ -46,13 +46,30 @@ const errorMessage = (err: unknown) => (err instanceof Error ? err.message : Str* `embedded` renders without the page title (the onboarding wizard owns its* own heading); the switch and tabs then sit at the top of the body.*/-const SearchPanel = ({ embedded = false }: { embedded?: boolean }) => {+const SearchPanel = ({+ embedded = false,+ hideTabChrome = false,+}: {+ embedded?: boolean;+ /**+ * Drop the providers/routing/websites chip tabs and show providers only.+ *+ * The onboarding wizard sets this: a three-step wizard with its own tabbed+ * sub-navigation inside one step reads as two nesting levels of the same+ * idea, and the routing and websites tabs are refinements nobody needs+ * before their first message. Both stay reachable from Settings. Defaults+ * false so Settings is unchanged.+ */+ hideTabChrome?: boolean;+}) => {const { t } = useT();const { snapshot } = useCoreState();const isLocalSession = isLocalSessionToken(snapshot.sessionToken);const enabledId = useId();- const [tab, setTab] = useState<SearchPanelTab>('providers');+ const [selectedTab, setTab] = useState<SearchPanelTab>('providers');+ // With the chip row hidden there is no way back from another tab, so pin it.+ const tab: SearchPanelTab = hideTabChrome ? 'providers' : selectedTab;const [settings, setSettings] = useState<SearchSettings | null>(null);const [status, setStatus] = useState<Status>({ kind: 'loading' });const saving = status.kind === 'saving';@@ -117,8 +134,32 @@ const SearchPanel = ({ embedded = false }: { embedded?: boolean }) => {{ id: 'websites' as const, label: t('settings.search.tabWebsites') },];+ // One honest answer to "will search actually work?". `effective_roles` lists+ // the usable providers per role in serving order, so an empty list for every+ // role means no tool will be offered to the agent. Derived from the settings+ // the panel already holds — `SearchProviderInfo.usable` is dead, nothing+ // reads it, and there is no RPC that runs a probe query.+ const searchReady = Boolean(+ settings?.enabled &&+ Object.values(settings.effective_roles ?? {}).some(providers => providers.length > 0)+ );+const body = (<div className="flex w-full flex-col gap-4" data-testid="search-settings-panel">+ {hideTabChrome && settings && settings.enabled ? (+ <Alert+ variant={searchReady ? 'success' : 'warning'}+ density="compact"+ role={undefined}+ data-testid="search-readiness">+ <AlertDescription>+ {searchReady+ ? t('onboarding.custom.search.ready')+ : t('onboarding.custom.search.notReady')}+ </AlertDescription>+ </Alert>+ ) : null}+{managedUnavailable && (<Alert variant="info"><AlertDescription>{t('settings.search.localManagedUnavailable')}</AlertDescription>@@ -139,6 +180,7 @@ const SearchPanel = ({ embedded = false }: { embedded?: boolean }) => {saving={saving}managedUnavailable={managedUnavailable}updateProvider={updateProvider}+ hideTabChrome={hideTabChrome}t={t}/>)}@@ -164,14 +206,16 @@ const SearchPanel = ({ embedded = false }: { embedded?: boolean }) => {return (<div className="flex w-full flex-col gap-4"><div className="flex flex-wrap items-center justify-between gap-3">- <ChipTabs- className="flex flex-wrap gap-1.5"- ariaLabel={t('settings.search.title')}- testIdPrefix="search-tab"- items={tabs}- value={tab}- onChange={setTab}- />+ {hideTabChrome ? null : (+ <ChipTabs+ className="flex flex-wrap gap-1.5"+ ariaLabel={t('settings.search.title')}+ testIdPrefix="search-tab"+ items={tabs}+ value={tab}+ onChange={setTab}+ />+ )}{enabledSwitch}</div>{body}diff --git a/app/src/components/settings/panels/SearchPanelProviders.tsx b/app/src/components/settings/panels/SearchPanelProviders.tsxindex 9a3d829bdf..d4c023cd20 100644--- a/app/src/components/settings/panels/SearchPanelProviders.tsx+++ b/app/src/components/settings/panels/SearchPanelProviders.tsx@@ -29,6 +29,7 @@ import {canUseManaged,directNeedsSetup,hasBaseUrl,+ isStrandedManaged,rolesSummary,SearchProviderSwatch,STATUS_VARIANT,@@ -52,6 +53,8 @@ interface Props {managedUnavailable: boolean;updateProvider: (id: string, patch: SearchProviderUpdate) => Promise<boolean>;t: Translate;+ /** Wizard mode: the Routing/Websites tabs are hidden, so do not cite them. */+ hideTabChrome?: boolean;}/** The secondary line under a connected provider's name. */@@ -70,11 +73,18 @@ const SearchPanelProviders = ({saving,managedUnavailable,updateProvider,+ hideTabChrome = false,t,}: Props) => {const [dialog, setDialog] = useState<DialogState | null>(null);- const connected = settings.providers.filter(p => p.enabled);- const available = settings.providers.filter(p => !p.enabled);+ // A provider enabled only over the managed route is not connected when this+ // session has no account behind that route — see `isStrandedManaged`.+ const connected = settings.providers.filter(+ p => p.enabled && !isStrandedManaged(p, managedUnavailable)+ );+ const available = settings.providers.filter(+ p => !p.enabled || isStrandedManaged(p, managedUnavailable)+ );const viaTinyHumans = available.filter(p => canUseManaged(p, managedUnavailable));const ownKey = available.filter(p => !canUseManaged(p, managedUnavailable));const dialogProvider = dialog ? settings.providers.find(p => p.id === dialog.id) : undefined;@@ -177,7 +187,10 @@ const SearchPanelProviders = ({<div className="flex w-full flex-col gap-4"><ProviderGrouptitle={t('settings.search.connectedTitle')}- description={t('settings.search.connectedDesc')}+ /* The copy ends "the Routing tab decides which one is tried first".+ The onboarding wizard hides that tab, so it points at something the+ reader cannot see. */+ description={hideTabChrome ? undefined : t('settings.search.connectedDesc')}carddata-testid="search-providers">{connected.length === 0 && (diff --git a/app/src/components/settings/panels/__tests__/AIPanel.test.tsx b/app/src/components/settings/panels/__tests__/AIPanel.test.tsxindex a01530f330..8f996f6017 100644--- a/app/src/components/settings/panels/__tests__/AIPanel.test.tsx+++ b/app/src/components/settings/panels/__tests__/AIPanel.test.tsx@@ -1,7 +1,8 @@import { fireEvent, screen, waitFor, within } from '@testing-library/react';-import { beforeEach, describe, expect, it, vi } from 'vitest';+import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';import { listConnections as listComposioConnections } from '../../../../lib/composio/composioApi';+import { getCoreStateSnapshot, setCoreStateSnapshot } from '../../../../lib/coreState/store';import { I18nProvider } from '../../../../lib/i18n/I18nContext';import {clearCloudProviderKey,@@ -22,6 +23,7 @@ import {import { creditsApi } from '../../../../services/api/creditsApi';import { callCoreRpc } from '../../../../services/coreRpcClient';import { renderWithProviders } from '../../../../test/test-utils';+import { createLocalSessionToken } from '../../../../utils/localSession';import { connectOpenRouterViaOAuth } from '../../../../utils/openrouterOAuth';import { openUrl } from '../../../../utils/openUrl';import { isTauri } from '../../../../utils/tauriCommands/common';@@ -241,9 +243,23 @@ const baseConnections = [{ id: 'pending-cal', toolkit: 'googlecalendar', status: 'PENDING' },];+// AIPanel tests mount no CoreStateProvider, so the session hooks read the+// module-level snapshot store. Seed it with a real (non-local) session so the+// managed OpenHuman row — which only exists for real sessions — is available.+const originalCoreState = getCoreStateSnapshot();+function seedSessionToken(sessionToken: string | null) {+ setCoreStateSnapshot({+ ...originalCoreState,+ snapshot: { ...originalCoreState.snapshot, sessionToken },+ });+}+describe('AIPanel', () => {+ afterEach(() => setCoreStateSnapshot(originalCoreState));+beforeEach(() => {vi.clearAllMocks();+ seedSessionToken('header.payload.signature');vi.mocked(isTauri).mockReturnValue(false);vi.mocked(loadAISettings).mockResolvedValue(baseSettings);vi.mocked(loadLocalProviderSnapshot).mockResolvedValue(baseLocalSnapshot);@@ -319,6 +335,14 @@ describe('AIPanel', () => {).toBeInTheDocument();});+ it('omits the managed OpenHuman row for a local ("Continue Locally") session', async () => {+ seedSessionToken(createLocalSessionToken());+ renderWithProviders(<AIPanel />);+ await waitFor(() => expect(screen.getAllByText(/^LLM Providers$/).length).toBeGreaterThan(0));+ expect(screen.queryByTestId('provider-row-openhuman')).not.toBeInTheDocument();+ expect(screen.queryByText(/^Always on$/i)).not.toBeInTheDocument();+ });+it('shows the per-workload routing tables directly, with no mode selector', async () => {renderWithProviders(<AIPanel />);fireEvent.click(await screen.findByRole('tab', { name: /^Routing$/i }));diff --git a/app/src/components/settings/panels/__tests__/ComposioPanel.test.tsx b/app/src/components/settings/panels/__tests__/ComposioPanel.test.tsxindex ee11aa1a6f..9cd886a95c 100644--- a/app/src/components/settings/panels/__tests__/ComposioPanel.test.tsx+++ b/app/src/components/settings/panels/__tests__/ComposioPanel.test.tsx@@ -124,6 +124,28 @@ describe('ComposioPanel', () => {expect(screen.getByText(/Managed Composio auth is unavailable here/i)).toBeInTheDocument();});+ test('renders the direct-only explanation in Japanese for a local session', async () => {+ coreStateMock.mockReturnValue({ snapshot: { sessionToken: 'header.payload.local' } });+ const Panel = await importPanel();+ const { I18nProvider } = await import('../../../../lib/i18n/I18nContext');+ renderWithProviders(+ <I18nProvider>+ <Panel embedded />+ </I18nProvider>,+ { preloadedState: { locale: { current: 'ja' } } }+ );++ expect(+ await screen.findByText(+ 'この環境ではComposioのマネージド認証を利用できません。独自のComposio APIキーを入力するか、設定を後回しにしてください。'+ )+ ).toBeInTheDocument();+ expect(screen.getByText('直接接続(独自のAPIキーを使用)')).toBeInTheDocument();+ expect(+ screen.queryByText(/Managed Composio auth is unavailable here/i)+ ).not.toBeInTheDocument();+ });+test('saving Direct mode with a key calls setApiKey and masks the field', async () => {const Panel = await importPanel();renderWithProviders(<Panel />);diff --git a/app/src/components/settings/panels/__tests__/CoreConnectionPanel.test.tsx b/app/src/components/settings/panels/__tests__/CoreConnectionPanel.test.tsxindex a23efc2e0c..a950ecffd8 100644--- a/app/src/components/settings/panels/__tests__/CoreConnectionPanel.test.tsx+++ b/app/src/components/settings/panels/__tests__/CoreConnectionPanel.test.tsx@@ -78,7 +78,7 @@ describe('CoreConnectionPanel', () => {await waitFor(() => expect(screen.getByText('Connected to local core')).toBeInTheDocument());// Remote toggle is off in local mode → no URL field.- expect(screen.queryByLabelText(/Runtime URL/i)).not.toBeInTheDocument();+ expect(screen.queryByLabelText(/Address/i)).not.toBeInTheDocument();});test('cloud mode surfaces the remote URL and remote connected status', async () => {@@ -117,12 +117,10 @@ describe('CoreConnectionPanel', () => {// Flip the remote toggle on to reveal the form.fireEvent.click(screen.getByTestId('core-use-remote-toggle'));- fireEvent.change(screen.getByLabelText(/Runtime URL/i), {+ fireEvent.change(screen.getByLabelText(/Address/i), {target: { value: 'https://core.example.com/rpc' },});- fireEvent.change(screen.getByLabelText(/Auth Token/i), {- target: { value: 'remote-token-xyz' },- });+ fireEvent.change(screen.getByLabelText(/^Token/i), { target: { value: 'remote-token-xyz' } });fireEvent.click(screen.getByTestId('core-save-btn'));@@ -203,10 +201,10 @@ describe('CoreConnectionPanel', () => {// Empty URL → invalid-URL error.fireEvent.click(screen.getByText('Test Connection'));- await waitFor(() => expect(screen.getByText(/enter a runtime URL/i)).toBeInTheDocument());+ await waitFor(() => expect(screen.getByText(/enter an address/i)).toBeInTheDocument());// Valid URL but empty token → token-required error.- fireEvent.change(screen.getByLabelText(/Runtime URL/i), {+ fireEvent.change(screen.getByLabelText(/Address/i), {target: { value: 'https://core.example.com/rpc' },});fireEvent.click(screen.getByText('Test Connection'));diff --git a/app/src/components/settings/panels/__tests__/CoreConnectionPanel.urlValidation.test.tsx b/app/src/components/settings/panels/__tests__/CoreConnectionPanel.urlValidation.test.tsxindex dce2cfe2b4..8dc371f5b2 100644--- a/app/src/components/settings/panels/__tests__/CoreConnectionPanel.urlValidation.test.tsx+++ b/app/src/components/settings/panels/__tests__/CoreConnectionPanel.urlValidation.test.tsx@@ -70,8 +70,8 @@ async function openRemoteForm(url: string, token = 'remote-token-xyz') {await waitFor(() => expect(screen.getByText('Connected to local core')).toBeInTheDocument());fireEvent.click(screen.getByTestId('core-use-remote-toggle'));- fireEvent.change(screen.getByLabelText(/Runtime URL/i), { target: { value: url } });- fireEvent.change(screen.getByLabelText(/Auth Token/i), { target: { value: token } });+ fireEvent.change(screen.getByLabelText(/Address/i), { target: { value: url } });+ fireEvent.change(screen.getByLabelText(/^Token/i), { target: { value: token } });return rendered;}@@ -151,7 +151,7 @@ describe('CoreConnectionPanel remote URL validation', () => {await openRemoteForm('http://127.0.0.1:7788/rpc');await waitFor(() =>- expect(screen.getByLabelText(/Runtime URL/i)).toHaveValue('http://127.0.0.1:7788/rpc')+ expect(screen.getByLabelText(/Address/i)).toHaveValue('http://127.0.0.1:7788/rpc'));expect(screen.queryByText(HTTP_WARNING)).not.toBeInTheDocument();});@@ -160,7 +160,7 @@ describe('CoreConnectionPanel remote URL validation', () => {await openRemoteForm('http://192.168.1.50:7788/rpc');await waitFor(() =>- expect(screen.getByLabelText(/Runtime URL/i)).toHaveValue('http://192.168.1.50:7788/rpc')+ expect(screen.getByLabelText(/Address/i)).toHaveValue('http://192.168.1.50:7788/rpc'));expect(screen.queryByText(HTTP_WARNING)).not.toBeInTheDocument();});@@ -169,7 +169,7 @@ describe('CoreConnectionPanel remote URL validation', () => {await openRemoteForm('https://core.example.com/rpc');await waitFor(() =>- expect(screen.getByLabelText(/Runtime URL/i)).toHaveValue('https://core.example.com/rpc')+ expect(screen.getByLabelText(/Address/i)).toHaveValue('https://core.example.com/rpc'));expect(screen.queryByText(HTTP_WARNING)).not.toBeInTheDocument();});diff --git a/app/src/components/settings/panels/ai/ProviderAuthSection.tsx b/app/src/components/settings/panels/ai/ProviderAuthSection.tsxindex dd437eaf05..db73b6bcca 100644--- a/app/src/components/settings/panels/ai/ProviderAuthSection.tsx+++ b/app/src/components/settings/panels/ai/ProviderAuthSection.tsx@@ -19,6 +19,7 @@import { Plus } from 'lucide-react';import { useState } from 'react';+import { useManagedInferenceAvailable } from '../../../../hooks/useLocalSession';import { useT } from '../../../../lib/i18n/I18nContext';import type { ProviderAuthError } from '../../../../services/api/aiSettingsApi';import Alert, { AlertDescription } from '../../../ui/Alert';@@ -106,6 +107,7 @@ export const ProviderAuthSection = ({onEditCustomProvider,addOpen: controlledAddOpen,onAddOpenChange,+ hideAddButton = false,}: {draft: AISettings;persist: (next: AISettings) => Promise<void>;@@ -139,8 +141,17 @@ export const ProviderAuthSection = ({*/addOpen?: boolean;onAddOpenChange?: (open: boolean) => void;+ /**+ * Hide the standalone "Add a provider" button.+ *+ * The onboarding wizard renders the provider catalog inline, so the button+ * opened a dialog onto a list already on screen — two ways to do one thing,+ * and the loudest control on a step whose primary action is Continue.+ */+ hideAddButton?: boolean;}) => {const { t } = useT();+ const managedAvailable = useManagedInferenceAvailable();const [localAddOpen, setLocalAddOpen] = useState(false);const hostControlsAdd = controlledAddOpen !== undefined;const addOpen = controlledAddOpen ?? localAddOpen;@@ -164,10 +175,19 @@ export const ProviderAuthSection = ({const bySlug = (slug: string) => draft.cloudProviders.find(cp => cp.slug === slug);const connectedCloud = BUILTIN_CLOUD_PROVIDER_SLUGS.filter(slug => bySlug(slug));+const connectedLocal = LOCAL_RUNTIME_SLUGS.filter(slug => bySlug(slug));const customProviders = draft.cloudProviders.filter(cp => !BUILTIN_RESERVED_SLUGS.includes(cp.slug));+ // An empty "Connected" card is a heading over nothing. It used to be+ // guaranteed non-empty by the always-on managed row; now that the row is+ // gated on a real session, a local user with no keys yet got a bare box.+ const hasConnected =+ managedAvailable ||+ connectedCloud.length > 0 ||+ customProviders.length > 0 ||+ connectedLocal.length > 0;// Three categories, each a different question rather than a slice of one:// cloud wants an API key, local wants an endpoint on this machine, CLI wants@@ -268,7 +288,7 @@ export const ProviderAuthSection = ({)}{codexAuthError ? <ProviderSetupErrorNotice error={codexAuthError} /> : null}- {!hostControlsAdd && (+ {!hostControlsAdd && !hideAddButton && (<div className="flex justify-end"><AddProviderButton onClick={() => setAddOpen(true)} /></div>@@ -277,128 +297,147 @@ export const ProviderAuthSection = ({{loading && <CenteredLoadingState label={t('common.loading')} />}{/* ─── Connected ────────────────────────────────────────────────────- Managed leads and is always present. #3760: it renders a badge, not a- disabled toggle — a locked switch reads as switchable-but-broken and- invites a fight the user cannot win. */}- <ProviderGroup- title={t('settings.ai.providers.groupConnected')}- description={t('settings.ai.providers.connectedDesc')}- card- data-testid="provider-group-connected">- <ProviderListRow- slug="openhuman"- label={t('settings.ai.routing.managed')}- tone={BUILTIN_PROVIDER_META.openhuman?.tone ?? ''}- detail={t('settings.ai.providers.managedDetail')}- control={<Badge variant="success">{t('settings.ai.routing.managedAlwaysOn')}</Badge>}- data-testid="provider-row-openhuman"- />+ Managed leads WHEN IT EXISTS. It used to render unconditionally, so a+ self-hosting user — signed in with "Continue Locally", no TinyHumans+ account behind the session — was told OpenHuman "chooses a model for+ each task" and shown an "Always on" badge for a service they do not+ have. That is the first thing the inference step shows them, and it+ is false. The row now follows the same rule the search and embeddings+ panels already apply.- {connectedCloud.map(slug => {- const existing = bySlug(slug)!;- const meta = BUILTIN_PROVIDER_META[slug];- const label = meta?.label ?? slug;- const actions: ProviderRowAction[] = [- {- label: t('settings.ai.providers.replaceKey'),- onSelect: () => onOpenKeyDialog(slug, null),- },- ];- return (+ #3760: it renders a badge, not a disabled toggle — a locked switch+ reads as switchable-but-broken and invites a fight the user cannot+ win. */}+ {hasConnected && (+ <ProviderGroup+ title={t('settings.ai.providers.groupConnected')}+ /* The description says "Managed is always on as a fallback. Choose+ which provider each task uses on the Routing tab." Both halves are+ wrong without a managed session: there is no managed fallback, and+ the onboarding wizard hides the Routing tab. Shown only where both+ are true. */+ description={managedAvailable ? t('settings.ai.providers.connectedDesc') : undefined}+ card+ data-testid="provider-group-connected">+ {managedAvailable && (<ProviderListRow- key={slug}- slug={slug}- label={label}- tone={meta?.tone ?? ''}- detail={existing.maskedKey || hostOf(existing.endpoint)}- detailMono+ slug="openhuman"+ label={t('settings.ai.routing.managed')}+ tone={BUILTIN_PROVIDER_META.openhuman?.tone ?? ''}+ detail={t('settings.ai.providers.managedDetail')}control={- <Switch- id={`provider-toggle-${slug}`}- checked- onCheckedChange={async () => await removeProvider(existing, false)}- disabled={busyAction === `toggle-${slug}`}- aria-label={providerToggleAriaLabel(t, true, label)}- />+ <Badge variant="success">{t('settings.ai.routing.managedAlwaysOn')}</Badge>}- actions={actions}- actionsLabel={formatI18n(t('settings.ai.providers.rowActions'), {- provider: label,- })}- data-testid={`provider-row-${slug}`}+ data-testid="provider-row-openhuman"/>- );- })}+ )}- {customProviders.map(existing => (- <ProviderListRow- key={existing.id}- slug={existing.slug}- label={existing.label}- tone={BUILTIN_PROVIDER_META.custom?.tone ?? ''}- detail={hostOf(existing.endpoint) || existing.maskedKey}- detailMono- badge={<Badge variant="primary">{t('settings.ai.providers.custom')}</Badge>}- control={- <Switch- id={`provider-toggle-${existing.slug}`}- checked- onCheckedChange={async () => await removeProvider(existing, false)}- disabled={busyAction === `toggle-${existing.slug}`}- aria-label={providerToggleAriaLabel(t, true, existing.label)}- />- }- actions={[- { label: t('common.edit'), onSelect: () => onEditCustomProvider(existing) },+ {connectedCloud.map(slug => {+ const existing = bySlug(slug)!;+ const meta = BUILTIN_PROVIDER_META[slug];+ const label = meta?.label ?? slug;+ const actions: ProviderRowAction[] = [{- label: t('common.remove'),- destructive: true,- onSelect: () => void removeProvider(existing, false),+ label: t('settings.ai.providers.replaceKey'),+ onSelect: () => onOpenKeyDialog(slug, null),},- ]}- actionsLabel={formatI18n(t('settings.ai.providers.rowActions'), {- provider: existing.label,- })}- data-testid={`provider-row-${existing.slug}`}- />- ))}+ ];+ return (+ <ProviderListRow+ key={slug}+ slug={slug}+ label={label}+ tone={meta?.tone ?? ''}+ detail={existing.maskedKey || hostOf(existing.endpoint)}+ detailMono+ control={+ <Switch+ id={`provider-toggle-${slug}`}+ checked+ onCheckedChange={async () => await removeProvider(existing, false)}+ disabled={busyAction === `toggle-${slug}`}+ aria-label={providerToggleAriaLabel(t, true, label)}+ />+ }+ actions={actions}+ actionsLabel={formatI18n(t('settings.ai.providers.rowActions'), {+ provider: label,+ })}+ data-testid={`provider-row-${slug}`}+ />+ );+ })}- {connectedLocal.map(slug => {- const existing = bySlug(slug)!;- const label = LOCAL_CHIP_LABEL[slug as LocalChipSlug];- return (+ {customProviders.map(existing => (<ProviderListRow- key={slug}- slug={slug}- label={label}- tone={LOCAL_CHIP_TONE[slug as LocalChipSlug]}- // The endpoint is the thing that breaks on a local runtime, so- // it is shown in full rather than reduced to a host.- detail={existing.endpoint || t('settings.ai.providers.connected')}+ key={existing.id}+ slug={existing.slug}+ label={existing.label}+ tone={BUILTIN_PROVIDER_META.custom?.tone ?? ''}+ detail={hostOf(existing.endpoint) || existing.maskedKey}detailMono+ badge={<Badge variant="primary">{t('settings.ai.providers.custom')}</Badge>}control={<Switch- id={`local-runtime-toggle-${slug}`}+ id={`provider-toggle-${existing.slug}`}checked- onCheckedChange={async () => await removeProvider(existing, true)}- disabled={busyAction === `toggle-${slug}`}- aria-label={providerToggleAriaLabel(t, true, label)}+ onCheckedChange={async () => await removeProvider(existing, false)}+ disabled={busyAction === `toggle-${existing.slug}`}+ aria-label={providerToggleAriaLabel(t, true, existing.label)}/>}actions={[+ { label: t('common.edit'), onSelect: () => onEditCustomProvider(existing) },{- label: t('settings.ai.editEndpoint'),- onSelect: () => onOpenKeyDialog(slug, label),+ label: t('common.remove'),+ destructive: true,+ onSelect: () => void removeProvider(existing, false),},]}actionsLabel={formatI18n(t('settings.ai.providers.rowActions'), {- provider: label,+ provider: existing.label,})}- data-testid={`provider-row-${slug}`}+ data-testid={`provider-row-${existing.slug}`}/>- );- })}- </ProviderGroup>+ ))}++ {connectedLocal.map(slug => {+ const existing = bySlug(slug)!;+ const label = LOCAL_CHIP_LABEL[slug as LocalChipSlug];+ return (+ <ProviderListRow+ key={slug}+ slug={slug}+ label={label}+ tone={LOCAL_CHIP_TONE[slug as LocalChipSlug]}+ // The endpoint is the thing that breaks on a local runtime, so+ // it is shown in full rather than reduced to a host.+ detail={existing.endpoint || t('settings.ai.providers.connected')}+ detailMono+ control={+ <Switch+ id={`local-runtime-toggle-${slug}`}+ checked+ onCheckedChange={async () => await removeProvider(existing, true)}+ disabled={busyAction === `toggle-${slug}`}+ aria-label={providerToggleAriaLabel(t, true, label)}+ />+ }+ actions={[+ {+ label: t('settings.ai.editEndpoint'),+ onSelect: () => onOpenKeyDialog(slug, label),+ },+ ]}+ actionsLabel={formatI18n(t('settings.ai.providers.rowActions'), {+ provider: label,+ })}+ data-testid={`provider-row-${slug}`}+ />+ );+ })}+ </ProviderGroup>+ )}{/* ─── CLI logins ────────────────────────────────────────────────Only Claude Code earns a row here, and only once connected: it owns adiff --git a/app/src/components/settings/panels/ai/__tests__/ProviderAuthSection.test.tsx b/app/src/components/settings/panels/ai/__tests__/ProviderAuthSection.test.tsxnew file mode 100644index 0000000000..25e8a45886--- /dev/null+++ b/app/src/components/settings/panels/ai/__tests__/ProviderAuthSection.test.tsx@@ -0,0 +1,177 @@+import { configureStore } from '@reduxjs/toolkit';+import { render, screen } from '@testing-library/react';+import type { ComponentProps } from 'react';+import { Provider } from 'react-redux';+import { describe, expect, it, vi } from 'vitest';++import { I18nProvider } from '../../../../../lib/i18n/I18nContext';+import type { Locale } from '../../../../../lib/i18n/types';+import { CoreStateContext } from '../../../../../providers/coreStateContext';+import localeReducer from '../../../../../store/localeSlice';+import { createLocalSessionToken } from '../../../../../utils/localSession';+import { type CloudProvider, EMPTY_SETTINGS } from '../aiPanelTypes';+import { ProviderAuthSection } from '../ProviderAuthSection';++function renderSection(+ sessionToken: string | null,+ extra: Partial<ComponentProps<typeof ProviderAuthSection>> = {}+) {+ const store = configureStore({+ reducer: { locale: localeReducer },+ preloadedState: { locale: { current: 'en' as Locale } },+ });+ return render(+ <Provider store={store}>+ <I18nProvider>+ <CoreStateContext.Provider value={{ snapshot: { sessionToken } } as never}>+ <ProviderAuthSection+ draft={EMPTY_SETTINGS}+ persist={vi.fn().mockResolvedValue(undefined)}+ loading={false}+ error=""+ busyAction={null}+ providerAuthErrors={[]}+ providerSaveNotice={null}+ onDismissProviderSaveNotice={vi.fn()}+ onProviderRemoved={vi.fn()}+ codexAuthError={null}+ onConnectCodex={vi.fn()}+ onConnectProvider={vi.fn().mockResolvedValue(undefined)}+ onOpenKeyDialog={vi.fn()}+ onAddCustomProvider={vi.fn()}+ onEditCustomProvider={vi.fn()}+ {...extra}+ />+ </CoreStateContext.Provider>+ </I18nProvider>+ </Provider>+ );+}++describe('ProviderAuthSection managed row', () => {+ it('shows the managed OpenHuman row for a normal session', () => {+ renderSection('header.payload.signature');+ expect(screen.getByTestId('provider-row-openhuman')).toBeInTheDocument();+ });++ it('hides the managed row for a local ("Continue Locally") session', () => {+ renderSection(createLocalSessionToken());+ expect(screen.queryByTestId('provider-row-openhuman')).not.toBeInTheDocument();+ });++ it('drops the whole Connected group when nothing is connected', () => {+ // The group used to be guaranteed non-empty by the always-on managed row.+ // With that row gated on a real session, a local user who has not added a+ // key yet was left with a "Connected" heading over an empty card.+ renderSection(createLocalSessionToken());+ expect(screen.queryByTestId('provider-group-connected')).not.toBeInTheDocument();+ });++ it('hides the managed row when signed out', () => {+ renderSection(null);+ expect(screen.queryByTestId('provider-row-openhuman')).not.toBeInTheDocument();+ });+});++describe('ProviderAuthSection wizard affordances', () => {+ it('shows the standalone "Add a provider" button by default', () => {+ renderSection('header.payload.signature');+ expect(screen.getByTestId('add-provider-open')).toBeInTheDocument();+ });++ it('hides the standalone "Add a provider" button when hideAddButton is set', () => {+ renderSection('header.payload.signature', { hideAddButton: true });+ expect(screen.queryByTestId('add-provider-open')).not.toBeInTheDocument();+ });++ // The description promises a managed fallback and cites the Routing tab; both+ // are false without a managed session.+ it('describes the Connected group only when a managed session exists', () => {+ const managed = renderSection('header.payload.signature');+ expect(screen.getByTestId('provider-group-connected')).toHaveTextContent(+ 'Managed is always on as a fallback'+ );+ managed.unmount();++ // A local session has nothing connected, so the group — and with it the+ // claim about a managed fallback and the Routing tab — is gone entirely.+ renderSection(createLocalSessionToken());+ expect(screen.queryByTestId('provider-group-connected')).not.toBeInTheDocument();+ expect(screen.queryByText(/Managed is always on as a fallback/)).not.toBeInTheDocument();+ });+});++/**+ * Rows inside the "Connected" group.+ *+ * The group is now gated on actually having something connected, so these rows+ * only render when the draft carries providers. Each shape has its own branch+ * (builtin cloud, user-defined custom, local runtime), and each is rendered+ * here so the gate cannot hide a broken row.+ */+describe('ProviderAuthSection connected rows', () => {+ const provider = (over: Partial<CloudProvider> = {}): CloudProvider => ({+ id: 'p1',+ slug: 'openai',+ label: 'OpenAI',+ endpoint: 'https://api.openai.com/v1',+ authStyle: 'bearer' as CloudProvider['authStyle'],+ maskedKey: 'sk-…4f2a',+ ...over,+ });++ it('renders a connected builtin cloud provider with its masked key', () => {+ renderSection('header.payload.signature', {+ draft: { ...EMPTY_SETTINGS, cloudProviders: [provider()] },+ });++ expect(screen.getByTestId('provider-group-connected')).toBeInTheDocument();+ expect(screen.getByTestId('provider-row-openai')).toHaveTextContent('sk-…4f2a');+ });++ it('renders a user-defined custom provider by host, with edit and remove', () => {+ renderSection('header.payload.signature', {+ draft: {+ ...EMPTY_SETTINGS,+ cloudProviders: [+ provider({ id: 'c1', slug: 'my-proxy', label: 'My Proxy', maskedKey: '' }),+ ],+ },+ });++ const row = screen.getByTestId('provider-row-my-proxy');+ expect(row).toBeInTheDocument();+ // A custom provider shows where it points rather than a key it may not have.+ expect(row).toHaveTextContent('api.openai.com');+ });++ it('renders a local runtime with its full endpoint, not just the host', () => {+ renderSection('header.payload.signature', {+ draft: {+ ...EMPTY_SETTINGS,+ cloudProviders: [+ provider({+ id: 'l1',+ slug: 'ollama',+ label: 'Ollama',+ endpoint: 'http://localhost:11434',+ maskedKey: '',+ }),+ ],+ },+ });++ expect(screen.getByTestId('provider-row-ollama')).toHaveTextContent('http://localhost:11434');+ });++ it('keeps the group for a local session once a provider is connected', () => {+ // The group disappears only while nothing is connected — a local user who+ // has added their own key still needs to see it.+ renderSection(createLocalSessionToken(), {+ draft: { ...EMPTY_SETTINGS, cloudProviders: [provider()] },+ });++ expect(screen.getByTestId('provider-group-connected')).toBeInTheDocument();+ expect(screen.queryByTestId('provider-row-openhuman')).not.toBeInTheDocument();+ });+});diff --git a/app/src/components/settings/panels/searchPanelShared.tsx b/app/src/components/settings/panels/searchPanelShared.tsxindex 82626f762b..4b5a946bf3 100644--- a/app/src/components/settings/panels/searchPanelShared.tsx+++ b/app/src/components/settings/panels/searchPanelShared.tsx@@ -70,6 +70,30 @@ export function statusLabel(status: SearchProviderStatus, t: Translate): stringexport const canUseManaged = (provider: SearchProviderInfo, managedUnavailable: boolean) =>!managedUnavailable && provider.routes.includes('managed') && provider.managed_available;+/**+ * Enabled, but only over the managed route, with no account behind this+ * session.+ *+ * The core reports providers like Exa and Gemini as `enabled` with+ * `route: 'managed'` because they are on by default via TinyHumans. In a local+ * session that route is unreachable, so rendering them under "Connected" with+ * an on-toggle claimed a working provider the agent cannot actually call --+ * the row said "Connected", "via TinyHumans" and "Sign in required" all at+ * once. They belong with the providers you could connect with your own key.+ */+export const isStrandedManaged = (+ provider: SearchProviderInfo,+ managedUnavailable: boolean+): boolean =>+ managedUnavailable &&+ provider.enabled &&+ provider.route === 'managed' &&+ // Only move it if the catalogue can actually offer something: a provider+ // with no direct route would land in a blocked tile with no switch and no+ // action, leaving it enabled in core settings and uncontrollable from here.+ // Those keep their Connected row, where the toggle can still turn them off.+ provider.routes.includes('direct');+/** A provider that can be reached with the user's own key or instance. */export const canUseDirect = (provider: SearchProviderInfo) => provider.routes.includes('direct');diff --git a/app/src/components/ui/Field.test.tsx b/app/src/components/ui/Field.test.tsxnew file mode 100644index 0000000000..cb081e8049--- /dev/null+++ b/app/src/components/ui/Field.test.tsx@@ -0,0 +1,34 @@+import { render, screen } from '@testing-library/react';+import { describe, expect, it } from 'vitest';++import Field from './Field';++describe('Field', () => {+ it('keeps the row structure when there is no error', () => {+ const { container } = render(+ <Field htmlFor="a" label="Name" control={<input id="a" />} data-testid="f" />+ );+ const root = screen.getByTestId('f');+ expect(root.className).toContain('flex items-center justify-between gap-4 px-4 py-3');+ expect(root.className).not.toContain('flex-wrap');+ expect(container.querySelector('[data-slot="field-error"]')).toBeNull();+ expect(screen.getByRole('textbox')).not.toHaveAttribute('aria-invalid');+ expect(screen.getByRole('textbox')).not.toHaveAttribute('aria-describedby');+ });++ it('renders the error and wires it to the control', () => {+ render(<Field htmlFor="a" label="Name" error="Required" control={<input id="a" />} />);+ const msg = screen.getByText('Required');+ const input = screen.getByRole('textbox');+ expect(msg.id).toBeTruthy();+ expect(input).toHaveAttribute('aria-describedby', msg.id);+ expect(input).toHaveAttribute('aria-invalid', 'true');+ });++ it('merges an existing aria-describedby', () => {+ render(<Field error="Bad" control={<input aria-describedby="hint" />} />);+ const input = screen.getByRole('textbox');+ const id = screen.getByText('Bad').id;+ expect(input.getAttribute('aria-describedby')).toBe(`hint ${id}`);+ });+});diff --git a/app/src/components/ui/Field.tsx b/app/src/components/ui/Field.tsxindex a618cf8be7..3b14985e8f 100644--- a/app/src/components/ui/Field.tsx+++ b/app/src/components/ui/Field.tsx@@ -1,4 +1,4 @@-import { type ReactNode } from 'react';+import { cloneElement, isValidElement, type ReactElement, type ReactNode, useId } from 'react';import { cn } from '../../lib/cn';@@ -9,6 +9,14 @@ export interface FieldProps {control: ReactNode;stacked?: boolean;disabled?: boolean;+ /**+ * Validation message, rendered in coral below the control. The control gets+ * `aria-describedby` (merged with any it already has) and `aria-invalid`+ * when `control` is a single React element. If it is a fragment or a+ * component that drops those props, wire it yourself: the message id is+ * `${htmlFor}-error` when `htmlFor` is set, otherwise a generated id.+ */+ error?: string;className?: string;'data-testid'?: string;}@@ -28,9 +36,23 @@ const Field = ({control,stacked = false,disabled = false,+ error,className,'data-testid': testId,}: FieldProps) => {+ const generatedId = useId();+ const errorId = error ? (htmlFor ? `${htmlFor}-error` : `${generatedId}-error`) : undefined;++ let controlEl = control;+ if (errorId && isValidElement(control)) {+ const el = control as ReactElement<{ 'aria-describedby'?: string }>;+ const existing = el.props['aria-describedby'];+ controlEl = cloneElement(el, {+ 'aria-describedby': existing ? `${existing} ${errorId}` : errorId,+ 'aria-invalid': true,+ } as Record<string, unknown>);+ }+const labelEl =label && htmlFor ? (<label htmlFor={htmlFor} className="text-sm font-medium text-content">@@ -48,6 +70,9 @@ const Field = ({stacked? 'flex flex-col gap-2 px-4 py-3': 'flex items-center justify-between gap-4 px-4 py-3',+ // Only an errored row wraps, so the error drops below the control row+ // while error-free rows keep their exact geometry.+ error && !stacked && 'flex-wrap',disabled && 'pointer-events-none opacity-50',className)}>@@ -59,7 +84,12 @@ const Field = ({)}</div>)}- <div className={stacked ? 'w-full' : 'shrink-0'}>{control}</div>+ <div className={stacked ? 'w-full' : 'shrink-0'}>{controlEl}</div>+ {error && (+ <p id={errorId} data-slot="field-error" className="w-full text-xs text-coral-600">+ {error}+ </p>+ )}</div>);};diff --git a/app/src/components/ui/Skeleton.test.tsx b/app/src/components/ui/Skeleton.test.tsxnew file mode 100644index 0000000000..254cb6ec18--- /dev/null+++ b/app/src/components/ui/Skeleton.test.tsx@@ -0,0 +1,26 @@+import { render } from '@testing-library/react';+import { describe, expect, it } from 'vitest';++import Skeleton from './Skeleton';++describe('Skeleton', () => {+ it('renders a hidden placeholder', () => {+ const { container } = render(<Skeleton />);+ const el = container.querySelector('[data-slot="skeleton"]');+ expect(el).not.toBeNull();+ expect(el).toHaveAttribute('aria-hidden', 'true');+ });++ it('only animates when motion is allowed', () => {+ const { container } = render(<Skeleton className="h-4 w-32" />);+ const el = container.firstElementChild as HTMLElement;+ expect(el.className).toContain('motion-safe:animate-pulse');+ expect(el.className).not.toMatch(/(^|\s)animate-pulse/);+ expect(el.className).toContain('h-4');+ });++ it('passes style through', () => {+ const { container } = render(<Skeleton style={{ width: 10 }} />);+ expect((container.firstElementChild as HTMLElement).style.width).toBe('10px');+ });+});diff --git a/app/src/components/ui/Skeleton.tsx b/app/src/components/ui/Skeleton.tsxnew file mode 100644index 0000000000..3979fe6b0a--- /dev/null+++ b/app/src/components/ui/Skeleton.tsx@@ -0,0 +1,27 @@+import { type ComponentPropsWithRef } from 'react';++import { cn } from '../../lib/cn';++export type SkeletonProps = ComponentPropsWithRef<'div'>;++/**+ * A loading placeholder block. Size it with `className` (`h-4 w-32`) or+ * `style` (`{ width, height }`).+ *+ * MOTION. The pulse is gated in CSS with `motion-safe:`, so a user who asks+ * for reduced motion gets a static block — no JS media query involved.+ *+ * A11Y. It conveys nothing to a screen reader, so it is `aria-hidden` by+ * default. Announce loading state on the surrounding region (`aria-busy`, a+ * status message); a caller can still override `aria-hidden` explicitly.+ */+const Skeleton = ({ className, ...rest }: SkeletonProps) => (+ <div+ data-slot="skeleton"+ aria-hidden="true"+ className={cn('rounded-md bg-surface-strong motion-safe:animate-pulse', className)}+ {...rest}+ />+);++export default Skeleton;diff --git a/app/src/components/ui/Stepper.test.tsx b/app/src/components/ui/Stepper.test.tsxnew file mode 100644index 0000000000..843e74a7ab--- /dev/null+++ b/app/src/components/ui/Stepper.test.tsx@@ -0,0 +1,35 @@+import { render, screen } from '@testing-library/react';+import { describe, expect, it } from 'vitest';++import Stepper from './Stepper';++const labels = ['One', 'Two', 'Three'];++describe('Stepper', () => {+ it('renders labels in order under the given aria-label', () => {+ render(<Stepper labels={labels} activeIndex={0} ariaLabel="Progress" data-testid="s" />);+ expect(screen.getByRole('list', { name: 'Progress' })).toBe(screen.getByTestId('s'));+ expect(screen.getAllByRole('listitem').map(li => li.textContent)).toEqual([+ '1One',+ '2Two',+ '3Three',+ ]);+ });++ it('marks only the active step as current', () => {+ render(<Stepper labels={labels} activeIndex={1} ariaLabel="Progress" />);+ const items = screen.getAllByRole('listitem');+ expect(items[1]).toHaveAttribute('aria-current', 'step');+ expect(items[0]).not.toHaveAttribute('aria-current');+ expect(items[2]).not.toHaveAttribute('aria-current');+ });++ it('shows a check for completed steps and a number otherwise', () => {+ render(<Stepper labels={labels} activeIndex={2} ariaLabel="Progress" />);+ const items = screen.getAllByRole('listitem');+ expect(items[0].querySelector('svg')).not.toBeNull();+ expect(items[1].querySelector('svg')).not.toBeNull();+ expect(items[2].querySelector('svg')).toBeNull();+ expect(items[2].textContent).toContain('3');+ });+});diff --git a/app/src/components/ui/Stepper.tsx b/app/src/components/ui/Stepper.tsxnew file mode 100644index 0000000000..ff8f84003d--- /dev/null+++ b/app/src/components/ui/Stepper.tsx@@ -0,0 +1,84 @@+import { cn } from '../../lib/cn';+import { CheckIcon } from './icons';++export interface StepperProps {+ /** Ordered labels for each step. */+ labels: string[];+ /** Zero-based index of the step that is currently active. */+ activeIndex: number;+ /** Accessible name for the step list. Required: a primitive owns no copy. */+ ariaLabel: string;+ className?: string;+ 'data-testid'?: string;+}++/**+ * Horizontal step indicator — a dot per step joined by connectors, with three+ * states: completed (sage, check), active (primary, `aria-current="step"`) and+ * upcoming (outlined). Promoted out of the onboarding wizard.+ */+const Stepper = ({+ labels,+ activeIndex,+ ariaLabel,+ className,+ 'data-testid': testId,+}: StepperProps) => (+ <ol+ role="list"+ data-slot="stepper"+ data-testid={testId}+ aria-label={ariaLabel}+ className={cn('flex w-full items-start justify-between', className)}>+ {labels.map((label, idx) => {+ const completed = idx < activeIndex;+ const active = idx === activeIndex;+ const isLast = idx === labels.length - 1;++ const dotClasses = completed+ ? 'bg-sage-500 border-sage-500 text-content-inverted'+ : active+ ? 'bg-primary-500 border-primary-500 text-content-inverted'+ : 'bg-surface border-line-strong text-content-faint';++ const labelClasses = completed+ ? 'text-sage-700 dark:text-sage-300'+ : active+ ? 'text-content font-semibold'+ : 'text-content-faint';++ const connectorClasses = completed ? 'bg-sage-500' : 'bg-surface-strong';++ return (+ <li+ key={label}+ data-slot="stepper-item"+ aria-current={active ? 'step' : undefined}+ className="relative flex flex-1 flex-col items-center">+ <div className="flex w-full items-center">+ <div+ aria-hidden+ className={cn('h-0.5 flex-1', idx === 0 ? 'opacity-0' : connectorClasses)}+ />+ <div+ className={cn(+ 'flex h-6 w-6 flex-none items-center justify-center rounded-full border-2 text-[10px] font-semibold',+ dotClasses+ )}>+ {completed ? <CheckIcon className="h-3 w-3" aria-hidden /> : idx + 1}+ </div>+ <div+ aria-hidden+ className={cn('h-0.5 flex-1', isLast ? 'opacity-0' : connectorClasses)}+ />+ </div>+ <span className={cn('mt-2 text-[11px] leading-tight text-center', labelClasses)}>+ {label}+ </span>+ </li>+ );+ })}+ </ol>+);++export default Stepper;diff --git a/app/src/components/ui/index.ts b/app/src/components/ui/index.tsindex ec5b117b0a..aac1f5a110 100644--- a/app/src/components/ui/index.ts+++ b/app/src/components/ui/index.ts@@ -101,6 +101,8 @@ export { default as EmptyState, type EmptyStateProps } from './EmptyState';export { default as StatusLine, type StatusLineProps } from './StatusLine';export { default as ListRow, type ListRowProps } from './ListRow';export { default as Progress, type ProgressProps } from './Progress';+export { default as Skeleton, type SkeletonProps } from './Skeleton';+export { default as Stepper, type StepperProps } from './Stepper';export { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from './Table';export {default as DataTable,diff --git a/app/src/features/conversations/Conversations.processSourceCommand.test.tsx b/app/src/features/conversations/Conversations.processSourceCommand.test.tsxindex 0e9383c35a..1b75c88cac 100644--- a/app/src/features/conversations/Conversations.processSourceCommand.test.tsx+++ b/app/src/features/conversations/Conversations.processSourceCommand.test.tsx@@ -18,6 +18,7 @@ import { SidebarSlotOutlet, SidebarSlotProvider } from '../../components/layout/import { registry } from '../../lib/commands/registry';import { threadApi } from '../../services/api/threadApi';import { chatSend } from '../../services/chatService';+import { callCoreRpc } from '../../services/coreRpcClient';import chatRuntimeReducer from '../../store/chatRuntimeSlice';import layoutReducer from '../../store/layoutSlice';import queueReducer from '../../store/queueSlice';@@ -30,32 +31,91 @@ import threadTodosReducer from '../../store/threadTodosSlice';import type { Thread } from '../../types/thread';import Conversations from './Conversations';-const { mockGetThreads, mockGetThreadMessages, mockUseUsageState } = vi.hoisted(() => ({- mockGetThreads: vi.fn().mockResolvedValue({ threads: [], count: 0 }),- mockGetThreadMessages: vi.fn().mockResolvedValue({ messages: [], count: 0 }),- mockUseUsageState: vi.fn(() => ({- teamUsage: null,- currentPlan: null,- currentTier: 'FREE' as const,- isFreeTier: true,- usagePct: 0,- isNearLimit: false,- isAtLimit: false,- isBudgetExhausted: false,- shouldShowBudgetCompletedMessage: false,- isLoading: false,- refresh: vi.fn(),- })),+vi.mock('../../services/socketService', () => ({+ socketService: {+ getSocket: vi.fn(() => ({ id: 'composer-test-socket' })),+ on: vi.fn(),+ off: vi.fn(),+ },}));+const { mockGetThreads, mockGetThreadMessages, mockUseUsageState, mockChatSend } = vi.hoisted(+ () => ({+ mockGetThreads: vi.fn().mockResolvedValue({ threads: [], count: 0 }),+ mockGetThreadMessages: vi.fn().mockResolvedValue({ messages: [], count: 0 }),+ mockChatSend: vi.fn().mockResolvedValue(undefined),+ mockUseUsageState: vi.fn(() => ({+ teamUsage: null,+ currentPlan: null,+ currentTier: 'FREE' as const,+ isFreeTier: true,+ usagePct: 0,+ isNearLimit: false,+ isAtLimit: false,+ isBudgetExhausted: false,+ shouldShowBudgetCompletedMessage: false,+ isLoading: false,+ refresh: vi.fn(),+ })),+ })+);++vi.mock('../../services/coreRpcClient', () => ({ callCoreRpc: vi.fn().mockResolvedValue({}) }));+vi.mock('../../services/chatService', () => ({chatCancel: vi.fn().mockResolvedValue({ accepted: true, turnCancelled: true }),chatClearQueue: vi.fn().mockResolvedValue(0),- chatSend: vi.fn().mockResolvedValue(undefined),+ chatSend: mockChatSend,subscribeChatEvents: vi.fn(() => () => {}),useRustChat: vi.fn(() => true),}));+vi.mock('../../components/chat/ModelQualityPill', async importOriginal => {+ const actual = await importOriginal<typeof import('../../components/chat/ModelQualityPill')>();+ return { ...actual, useModelPickerProviders: () => ({ providers: [], loading: false }) };+});++vi.mock('../../components/settings/panels/ai/ProviderModelPickerDialog', () => ({+ ProviderModelPickerDialog: ({+ onSelect,+ }: {+ onSelect: (selection: {+ source: { kind: 'cloud'; providerSlug: string } | { kind: 'local' } | { kind: 'managed' };+ model: string;+ }) => void;+ }) => (+ <div data-testid="provider-model-picker-dialog">+ <button+ type="button"+ onClick={() =>+ onSelect({ source: { kind: 'cloud', providerSlug: 'huggingface' }, model: 'org/model' })+ }>+ Pick Hugging Face model+ </button>+ <button+ type="button"+ onClick={() =>+ onSelect({ source: { kind: 'cloud', providerSlug: 'unknown-provider' }, model: 'model' })+ }>+ Pick unknown provider model+ </button>+ <button+ type="button"+ onClick={() => onSelect({ source: { kind: 'managed' }, model: 'openrouter/author/model' })}>+ Pick managed model+ </button>+ <button+ type="button"+ onClick={() => onSelect({ source: { kind: 'local' }, model: 'qwen3:4b-instruct' })}>+ Pick local model+ </button>+ <button type="button" onClick={() => onSelect({ source: { kind: 'managed' }, model: '' })}>+ Clear model+ </button>+ </div>+ ),+}));+vi.mock('../../services/api/threadApi', () => ({threadApi: {createNewThread: vi.fn().mockResolvedValue({ id: 'new-thread', labels: [] }),@@ -138,13 +198,17 @@ function buildStore(preload: Record<string, unknown>) {});}-async function renderChat(composer?: 'text' | 'mic-cloud', withProcessData = false) {+async function renderChat(+ composer?: 'text' | 'mic-cloud',+ withProcessData = false,+ active = false+) {mockGetThreads.mockResolvedValue({ threads: [thread], count: 1 });const store = buildStore({thread: {threads: [thread],selectedThreadId: THREAD_ID,- activeThreadIds: {},+ activeThreadIds: active ? { [THREAD_ID]: true } : {},welcomeThreadId: null,messagesByThreadId: { [THREAD_ID]: [] },messages: [],@@ -179,6 +243,84 @@ async function renderChat(composer?: 'text' | 'mic-cloud', withProcessData = falreturn store;}+async function submitComposerText(text: string) {+ const input = screen.getByRole('textbox');+ await act(async () => {+ input.textContent = text;+ fireEvent.input(input, { data: text, inputType: 'insertText' });+ });+ const sendButton = screen.getByTestId('send-message-button');+ await waitFor(() => expect(sendButton).not.toBeDisabled());+ await act(async () => {+ fireEvent.click(sendButton);+ });+ await waitFor(() => expect(mockChatSend).toHaveBeenCalledTimes(1));+}++async function clickSendButtonWithDraft(text: string) {+ const input = screen.getByRole('textbox');+ await act(async () => {+ input.textContent = text;+ fireEvent.input(input, { data: text, inputType: 'insertText' });+ });+ const sendButton = screen.getByTestId('send-message-button');+ await waitFor(() => expect(sendButton).not.toBeDisabled());+ await act(async () => {+ fireEvent.click(sendButton);+ });+}++async function selectPickerModel() {+ fireEvent.click(screen.getByTestId('composer-chat-settings'));+ fireEvent.click(await screen.findByRole('button', { name: 'Pick Hugging Face model' }));+}++async function selectPickerRoute(name: 'managed' | 'local' | 'unknown provider') {+ fireEvent.click(screen.getByTestId('composer-chat-settings'));+ fireEvent.click(await screen.findByRole('button', { name: `Pick ${name} model` }));+}++async function clearPickerModel() {+ fireEvent.click(screen.getByTestId('composer-chat-settings'));+ fireEvent.click(await screen.findByRole('button', { name: 'Clear model' }));+}++function deferred<T>() {+ let resolve!: (value: T) => void;+ let reject!: (reason?: unknown) => void;+ const promise = new Promise<T>((resolvePromise, rejectPromise) => {+ resolve = resolvePromise;+ reject = rejectPromise;+ });+ return { promise, resolve, reject };+}++function mockModelSettingsWrites(writes: Record<string, Promise<unknown> | Promise<unknown>[]>) {+ vi.mocked(callCoreRpc).mockImplementation(({ method, params }) => {+ if (method === 'openhuman.inference_update_model_settings') {+ const defaultModel = (params as { default_model: string }).default_model;+ const writesForValue = writes[defaultModel];+ const write = Array.isArray(writesForValue) ? writesForValue.shift() : writesForValue;+ return (write ?? Promise.resolve({})) as ReturnType<typeof callCoreRpc>;+ }+ return Promise.resolve({}) as ReturnType<typeof callCoreRpc>;+ });+}++async function useRealChatSend() {+ const actual = await vi.importActual<typeof import('../../services/chatService')>(+ '../../services/chatService'+ );+ mockChatSend.mockImplementation(actual.chatSend);+}++function latestChatRpc() {+ return vi+ .mocked(callCoreRpc)+ .mock.calls.filter(([request]) => request.method === 'openhuman.channel_web_chat')+ .at(-1)?.[0];+}+// The predicate's other half (`selectedThreadId !== null`) is deliberately not// asserted here: on `/chat` it is unreachable as a steady state. The boot effect// reuses an empty thread or calls `handleCreateNewThread`, so the page always@@ -273,3 +415,342 @@ describe('the agent-process-source command follows the panel that hosts it', ()expect(registry.runAction(ACTION_ID)).toBe(true);});});++describe('composer model routing', () => {+ afterEach(() => {+ cleanup();+ registry.reset();+ vi.mocked(threadApi.appendMessage)+ .mockReset()+ .mockImplementation(async (_threadId: string, message) => message);+ vi.mocked(callCoreRpc).mockReset().mockResolvedValue({});+ mockChatSend.mockReset().mockResolvedValue(undefined);+ });++ it('waits for a successful model clear before sending a normal default turn', async () => {+ const clear = deferred<unknown>();+ mockModelSettingsWrites({ 'huggingface:org/model': Promise.resolve({}), '': clear.promise });+ await renderChat('text');+ await selectPickerModel();+ await clearPickerModel();++ await clickSendButtonWithDraft('wait for clear');+ expect(mockChatSend).not.toHaveBeenCalled();+ expect(threadApi.appendMessage).not.toHaveBeenCalled();++ await act(async () => clear.resolve({}));+ await waitFor(() => expect(mockChatSend).toHaveBeenCalledTimes(1));+ expect(mockChatSend.mock.calls[0][0]).not.toHaveProperty('model');+ });++ it('waits for a successful model clear before sending a follow-up', async () => {+ const clear = deferred<unknown>();+ mockModelSettingsWrites({ 'huggingface:org/model': Promise.resolve({}), '': clear.promise });+ await renderChat('text', false, true);+ await selectPickerModel();+ await clearPickerModel();++ await clickSendButtonWithDraft('wait for follow-up clear');+ expect(mockChatSend).not.toHaveBeenCalled();++ await act(async () => clear.resolve({}));+ await waitFor(() => expect(mockChatSend).toHaveBeenCalledTimes(1));+ expect(mockChatSend.mock.calls[0][0]).toMatchObject({ queueMode: 'followup' });+ expect(mockChatSend.mock.calls[0][0]).not.toHaveProperty('model');+ });++ it('blocks a normal send after a rejected clear and keeps the draft', async () => {+ const clear = deferred<unknown>();+ mockModelSettingsWrites({ 'huggingface:org/model': Promise.resolve({}), '': clear.promise });+ await renderChat('text');+ await selectPickerModel();+ await clearPickerModel();++ await clickSendButtonWithDraft('retry this draft');+ await act(async () => clear.reject(new Error('clear failed')));++ expect(mockChatSend).not.toHaveBeenCalled();+ expect(threadApi.appendMessage).not.toHaveBeenCalled();+ expect(screen.getByRole('textbox')).toHaveTextContent('retry this draft');+ await waitFor(() =>+ expect(screen.getByTestId('chat-send-error')).toHaveAttribute(+ 'data-chat-send-error-code',+ 'cloud_send_failed'+ )+ );++ const input = screen.getByRole('textbox');+ await act(async () => {+ input.textContent = 'retry this draft edited';+ fireEvent.input(input, { data: 'retry this draft edited', inputType: 'insertText' });+ });+ await waitFor(() => expect(screen.queryByTestId('chat-send-error')).not.toBeInTheDocument());+ expect(mockChatSend).not.toHaveBeenCalled();+ });++ it('blocks a follow-up after a rejected clear and keeps the draft', async () => {+ const clear = deferred<unknown>();+ mockModelSettingsWrites({ 'huggingface:org/model': Promise.resolve({}), '': clear.promise });+ await renderChat('text', false, true);+ await selectPickerModel();+ await clearPickerModel();++ await clickSendButtonWithDraft('retry this follow-up');+ await act(async () => clear.reject(new Error('clear failed')));++ expect(mockChatSend).not.toHaveBeenCalled();+ expect(screen.getByRole('textbox')).toHaveTextContent('retry this follow-up');+ await waitFor(() =>+ expect(screen.getByTestId('chat-send-error')).toHaveAttribute(+ 'data-chat-send-error-code',+ 'cloud_send_failed'+ )+ );++ const input = screen.getByRole('textbox');+ await act(async () => {+ input.textContent = 'retry this follow-up edited';+ fireEvent.input(input, { data: 'retry this follow-up edited', inputType: 'insertText' });+ });+ await waitFor(() => expect(screen.queryByTestId('chat-send-error')).not.toBeInTheDocument());+ expect(mockChatSend).not.toHaveBeenCalled();+ });++ it.each([+ { label: 'normal send', followup: false },+ { label: 'follow-up send', followup: true },+ ])(+ 'retries a rejected clear on later default $label attempts until one succeeds',+ async ({ followup }) => {+ const firstClear = deferred<unknown>();+ const secondClear = deferred<unknown>();+ const thirdClear = deferred<unknown>();+ mockModelSettingsWrites({+ 'huggingface:org/model': Promise.resolve({}),+ '': [firstClear.promise, secondClear.promise, thirdClear.promise],+ });+ await renderChat('text', false, followup);+ await selectPickerModel();+ await clearPickerModel();++ const clearCalls = () =>+ vi.mocked(callCoreRpc).mock.calls.filter(([request]) => {+ const params = request.params as { default_model?: string };+ return (+ request.method === 'openhuman.inference_update_model_settings' &&+ params.default_model === ''+ );+ });++ await clickSendButtonWithDraft('first blocked attempt');+ expect(clearCalls()).toHaveLength(1);+ await act(async () => firstClear.reject(new Error('clear unavailable')));+ expect(mockChatSend).not.toHaveBeenCalled();+ expect(screen.getByRole('textbox')).toHaveTextContent('first blocked attempt');++ await clickSendButtonWithDraft('second blocked attempt');+ await waitFor(() => expect(clearCalls()).toHaveLength(2));+ expect(mockChatSend).not.toHaveBeenCalled();+ expect(threadApi.appendMessage).not.toHaveBeenCalled();+ await act(async () => secondClear.reject(new Error('clear still unavailable')));+ expect(mockChatSend).not.toHaveBeenCalled();+ expect(screen.getByRole('textbox')).toHaveTextContent('second blocked attempt');++ await clickSendButtonWithDraft('third attempt');+ await waitFor(() => expect(clearCalls()).toHaveLength(3));+ expect(mockChatSend).not.toHaveBeenCalled();+ expect(threadApi.appendMessage).not.toHaveBeenCalled();+ await act(async () => thirdClear.resolve({}));++ await waitFor(() => expect(mockChatSend).toHaveBeenCalledTimes(1));+ expect(mockChatSend.mock.calls[0][0]).not.toHaveProperty('model');+ if (followup) {+ expect(mockChatSend.mock.calls[0][0]).toMatchObject({ queueMode: 'followup' });+ } else {+ expect(mockChatSend.mock.calls[0][0]).not.toHaveProperty('queueMode');+ }+ }+ );++ it('waits on the newer clear when an older clear fails late', async () => {+ const olderClear = deferred<unknown>();+ const newerClear = deferred<unknown>();+ mockModelSettingsWrites({+ 'huggingface:org/model': Promise.resolve({}),+ '': [olderClear.promise, newerClear.promise],+ });+ await renderChat('text');+ await selectPickerModel();+ await clearPickerModel();+ await clearPickerModel();++ const clearCalls = () =>+ vi.mocked(callCoreRpc).mock.calls.filter(([request]) => {+ const params = request.params as { default_model?: string };+ return (+ request.method === 'openhuman.inference_update_model_settings' &&+ params.default_model === ''+ );+ });++ await clickSendButtonWithDraft('wait for latest clear');+ expect(clearCalls()).toHaveLength(1);+ expect(mockChatSend).not.toHaveBeenCalled();++ await act(async () => olderClear.reject(new Error('older clear failed late')));+ await waitFor(() => expect(clearCalls()).toHaveLength(2));+ expect(mockChatSend).not.toHaveBeenCalled();++ await act(async () => newerClear.resolve({}));+ await waitFor(() => expect(mockChatSend).toHaveBeenCalledTimes(1));+ expect(mockChatSend.mock.calls[0][0]).not.toHaveProperty('model');+ });++ it('does not wait for selected-model persistence before an explicit-model send', async () => {+ const persist = deferred<unknown>();+ mockModelSettingsWrites({ 'huggingface:org/model': persist.promise });+ await renderChat('text');++ await selectPickerModel();+ await submitComposerText('explicit while persistence is pending');++ expect(mockChatSend.mock.calls[0][0]).toMatchObject({ model: 'huggingface:org/model' });+ expect(persist.promise).toBeInstanceOf(Promise);+ await act(async () => persist.resolve({}));+ });++ it('lets a newly selected explicit model send after an earlier clear fails', async () => {+ const clear = deferred<unknown>();+ mockModelSettingsWrites({ 'huggingface:org/model': Promise.resolve({}), '': clear.promise });+ await renderChat('text');+ await selectPickerModel();+ await clearPickerModel();+ await clickSendButtonWithDraft('blocked default draft');+ await act(async () => clear.reject(new Error('clear failed')));+ expect(mockChatSend).not.toHaveBeenCalled();++ await selectPickerModel();+ await submitComposerText('new explicit route');++ expect(mockChatSend.mock.calls[0][0]).toMatchObject({ model: 'huggingface:org/model' });+ });++ it('serializes a pending selection before a later clear', async () => {+ const selection = deferred<unknown>();+ const clear = deferred<unknown>();+ mockModelSettingsWrites({ 'huggingface:org/model': selection.promise, '': clear.promise });+ await renderChat('text');+ await selectPickerModel();+ await clearPickerModel();++ await clickSendButtonWithDraft('clear wins');+ expect(mockChatSend).not.toHaveBeenCalled();++ await act(async () => selection.resolve({}));+ expect(mockChatSend).not.toHaveBeenCalled();+ await act(async () => clear.resolve({}));+ await waitFor(() => expect(mockChatSend).toHaveBeenCalledTimes(1));+ expect(mockChatSend.mock.calls[0][0]).not.toHaveProperty('model');+ });++ it('leaves the persisted model to the core for a normal send by default', async () => {+ mockChatSend.mockClear();+ await renderChat('text');+ await submitComposerText('normal default route');++ expect(mockChatSend.mock.calls[0][0]).not.toHaveProperty('model');+ });++ it('leaves the persisted model to the core for a follow-up send by default', async () => {+ mockChatSend.mockClear();+ await renderChat('text', false, true);+ await submitComposerText('follow-up default route');++ expect(mockChatSend.mock.calls[0][0]).toMatchObject({ queueMode: 'followup' });+ expect(mockChatSend.mock.calls[0][0]).not.toHaveProperty('model');+ });++ it('forwards the concrete provider/model chosen in the picker for a normal send', async () => {+ mockChatSend.mockClear();+ await useRealChatSend();+ await renderChat('text');++ await selectPickerModel();+ await submitComposerText('explicit picker route');++ expect(latestChatRpc()).toMatchObject({+ method: 'openhuman.channel_web_chat',+ params: { model_override: 'huggingface:org/model' },+ });+ const resolverCalls = vi+ .mocked(callCoreRpc)+ .mock.calls.filter(([request]) => request.method === 'openhuman.inference_resolve_model');+ expect(resolverCalls.at(-1)?.[0]).toMatchObject({+ method: 'openhuman.inference_resolve_model',+ params: { hint: 'huggingface:org/model' },+ });+ });++ it('forwards the concrete provider/model chosen in the picker for a follow-up send', async () => {+ mockChatSend.mockClear();+ await useRealChatSend();+ await renderChat('text', false, true);++ await selectPickerModel();+ await submitComposerText('explicit follow-up picker route');++ expect(latestChatRpc()).toMatchObject({+ method: 'openhuman.channel_web_chat',+ params: { model_override: 'huggingface:org/model', queue_mode: 'followup' },+ });+ });++ it.each([+ ['managed', 'openrouter/author/model'],+ ['local', 'ollama:qwen3:4b-instruct'],+ ] as const)('serializes the %s picker route at the core boundary', async (route, model) => {+ mockChatSend.mockClear();+ await useRealChatSend();+ await renderChat('text');++ await selectPickerRoute(route);+ await submitComposerText(`${route} picker route`);++ expect(latestChatRpc()).toMatchObject({+ method: 'openhuman.channel_web_chat',+ params: { model_override: model },+ });+ });++ it('keeps an unknown provider route rejected at the core boundary', async () => {+ vi.mocked(callCoreRpc).mockImplementation(({ method, params }) => {+ if (+ method === 'openhuman.channel_web_chat' &&+ (params as { model_override?: string }).model_override === 'unknown-provider:model'+ ) {+ return Promise.reject(new Error('unsupported provider route')) as ReturnType<+ typeof callCoreRpc+ >;+ }+ return Promise.resolve({}) as ReturnType<typeof callCoreRpc>;+ });+ await useRealChatSend();+ await renderChat('text');++ await selectPickerRoute('unknown provider');+ await clickSendButtonWithDraft('unknown provider route');++ await waitFor(() => expect(mockChatSend).toHaveBeenCalledTimes(1));+ expect(latestChatRpc()).toMatchObject({+ method: 'openhuman.channel_web_chat',+ params: { model_override: 'unknown-provider:model' },+ });+ await waitFor(() => {+ expect(screen.getByRole('textbox')).toHaveTextContent('unknown provider route');+ expect(screen.getByTestId('chat-send-error')).toHaveAttribute(+ 'data-chat-send-error-code',+ 'cloud_send_failed'+ );+ });+ });+});diff --git a/app/src/features/conversations/Conversations.tsx b/app/src/features/conversations/Conversations.tsxindex 6fe44774d1..cfd3c5bd16 100644--- a/app/src/features/conversations/Conversations.tsx+++ b/app/src/features/conversations/Conversations.tsx@@ -6,13 +6,13 @@ import { type ChatSendError, chatSendError } from '../../chat/chatSendError';import { checkPromptInjection, promptGuardMessage } from '../../chat/promptInjectionGuard';import { trackAnalyticsEvent } from '../../components/analytics';import { AgentStatus } from '../../components/assistant-ui/elements/agent-status';-import { TodoList } from '../../components/assistant-ui/elements/todo-list';import ChatFilesChip from '../../components/chat/ChatFilesChip';import WorkflowProposalCard from '../../components/chat/WorkflowProposalCard';import { ConfirmationModal } from '../../components/intelligence/ConfirmationModal';import { SidebarContent } from '../../components/layout/shell/SidebarSlot';import { ArtifactCardAdapter } from '../../features/conversations/aui/ArtifactCardAdapter';import { ContextUsage } from '../../features/conversations/aui/ContextUsage';+import { PinnedTodoCard } from '../../features/conversations/aui/PinnedTodoCard';import { PlanReviewCardCore } from '../../features/conversations/aui/PlanReviewPart';import { toAuiTodoItems } from '../../features/conversations/aui/TodoListPart';import { useRunMode } from '../../features/conversations/aui/useRunMode';@@ -61,7 +61,13 @@ import { useT } from '../../lib/i18n/I18nContext';import { decideApproval } from '../../services/api/approvalApi';import { threadApi } from '../../services/api/threadApi';import { fetchThreadTokenUsage } from '../../services/api/threadUsageApi';-import { aiRegenerate, chatCancel, chatSend, useRustChat } from '../../services/chatService';+import {+ aiRegenerate,+ chatCancel,+ chatSend,+ editMessage,+ useRustChat,+} from '../../services/chatService';import { callCoreRpc } from '../../services/coreRpcClient';import {beginInferenceTurn,@@ -88,6 +94,7 @@ import {markThreadInferenceActive,setSelectedThread,THREAD_NOT_FOUND_MESSAGE,+ truncateMessagesFrom,updateThreadTitle,} from '../../store/threadSlice';import type { ConfirmationModal as ConfirmationModalType } from '../../types/intelligence';@@ -105,9 +112,14 @@ import {ReasoningEffortPicker,toReasoningEffortChoice,} from './aui/ReasoningEffortPicker';+import { StallWarning } from './aui/StallWarning';+import { ThreadWorkspaceChip } from './aui/ThreadWorkspaceChip';import { useChatSurfaceRegistration } from './hooks/useChatSurfaceRegistration';+import { useThreadDraft } from './hooks/useThreadDraft';import { ThreadList } from './threadList/ThreadList';import { openTinyVoice } from './utils/openTinyVoice';+import { useThreadPins } from './threadList/useThreadPins';+import { useUnreadThreads } from './threadList/useUnreadThreads';const CHAT_MODEL_HINT = 'hint:chat';const debug = debugFactory('conversations');@@ -115,6 +127,10 @@ const debug = debugFactory('conversations');// tool activity, or the core's 20s `inference_heartbeat`) before the chat// warns that it has gone quiet. A warning only — see `handleSilence`.const SILENCE_WARNING_MS = 120_000;+// How long after a Stop the thread may still show a running turn before the+// UI settles it locally. The core publishes `chat_cancelled` before it answers+// the cancel RPC, so this only fires when that event never reached us.+const STOP_SETTLE_FALLBACK_MS = 5_000;interface ConversationsProps {/**@@ -156,10 +172,16 @@ interface ConversationsProps {projectThreadList?: boolean;}+type ComposerModelClearBarrier = {+ promise: Promise<void>;+ status: 'pending' | 'resolved' | 'rejected';+};+// Stable empty reference so the `activeThreadIds` selector returns the same// object identity when the slice field is absent (narrow test stores),// avoiding spurious re-renders.const EMPTY_ACTIVE_THREADS: Record<string, true> = {};+const EMPTY_PENDING_APPROVALS: Record<string, unknown> = {};// Stable empty live tool-timeline / processing-transcript for the selected// thread. A fresh `[]` here took a new identity every render, invalidating the@@ -265,8 +287,14 @@ const Conversations = ({: false;const firstActiveThreadId = Object.keys(activeThreadIds)[0] ?? null;- const [inputValue, setInputValue] = useState('');+ // Per-thread, reload-surviving draft (`useThreadDraft`): switching threads+ // swaps it instead of carrying half-typed text into the next conversation.+ const [inputValue, setInputValue] = useThreadDraft(selectedThreadId ?? null);const [attachments, setAttachments] = useState<Attachment[]>([]);+ // Failed sends retain their attachments by originating thread. A send may+ // reject after the user has navigated elsewhere, so restoring into the+ // component-wide composer state would leak one thread's files into another.+ const failedAttachmentsByThreadRef = useRef<Map<string, Attachment[]>>(new Map());// What ingest counts its budget against. Tracks state on every render (so a// removal or a send's clear is picked up) and is written synchronously as each// file is admitted, which is what keeps two overlapping ingests honest.@@ -323,6 +351,10 @@ const Conversations = ({// that contributes to "Maximum update depth exceeded" (TAURI-REACT-2G).const sendErrorRef = useRef(sendError);sendErrorRef.current = sendError;+ const preserveSendErrorForRestoredDraftRef = useRef(false);+ // The user message is persisted before chatSend starts. Reuse it when an+ // unchanged failed draft is retried instead of appending a second prompt.+ const persistedFailedMessageByThreadRef = useRef<Map<string, ThreadMessage>>(new Map());const createThreadErrorRef = useRef(createThreadError);createThreadErrorRef.current = createThreadError;const displayedSendError = deriveChatErrorBanner(@@ -400,6 +432,10 @@ const Conversations = ({const pendingPlanReviewByThread = useAppSelector(state => state.chatRuntime.pendingPlanReviewByThread);+ // Optional-chain + default: narrow test stores may omit the field.+ const pendingApprovalByThread = useAppSelector(+ state => state.chatRuntime.pendingApprovalByThread ?? EMPTY_PENDING_APPROVALS+ );const pendingWorkflowProposalsByThread = useAppSelector(state => state.chatRuntime.pendingWorkflowProposalsByThread);@@ -447,6 +483,8 @@ const Conversations = ({// (the same field Settings → Routing → "Default model" edits). `null` clears// the pin back to the managed default.const [composerModelOverride, setComposerModelOverride] = useState<string | null>(null);+ const modelSettingsWriteQueueRef = useRef<Promise<void>>(Promise.resolve());+ const composerModelClearBarrierRef = useRef<ComposerModelClearBarrier | null>(null);// `undefined` means no explicit picker selection, so usage-reported context// remains authoritative. `null` means the selected model did not report a// window, and the meter deliberately shows an unknown limit.@@ -454,17 +492,38 @@ const Conversations = ({number | null | undefined>(undefined);// The composer's thinking level. Sent with every turn (`reasoning_effort`)- // so it applies immediately, and written to the core's- // `runtime.reasoning_effort` so it survives a restart and is the default for- // turns the composer does not start — the same split as the model pick.- const [composerReasoningEffort, setComposerReasoningEffort] =+ // so it applies immediately, and written to the core so it survives a+ // restart and is the default for turns the composer does not start — the+ // same split as the model pick. It is remembered per model+ // (`runtime.reasoning_effort_by_model`) when a model is picked, and globally+ // (`runtime.reasoning_effort`) for the managed default; a model with no+ // level of its own shows, and sends, the global one.+ const [globalReasoningEffort, setGlobalReasoningEffort] =useState<ReasoningEffortChoice>('default');+ const [reasoningEffortByModel, setReasoningEffortByModel] = useState<+ Record<string, ReasoningEffortChoice>+ >({});+ // The model a turn runs on: this session's pick, else the persisted+ // `default_model` (the core keys per-model levels by it after a restart,+ // before anything is picked here).+ const [persistedDefaultModel, setPersistedDefaultModel] = useState<string | null>(null);+ const reasoningModel = composerModelOverride ?? persistedDefaultModel;+ const composerReasoningEffort: ReasoningEffortChoice =+ (reasoningModel ? reasoningEffortByModel[reasoningModel] : undefined) ?? globalReasoningEffort;useEffect(() => {let cancelled = false;void openhumanGetClientConfig().then(res => {if (!cancelled) {- setComposerReasoningEffort(toReasoningEffortChoice(res.result?.reasoning_effort));+ setGlobalReasoningEffort(toReasoningEffortChoice(res.result?.reasoning_effort));+ setPersistedDefaultModel(res.result?.default_model?.trim() || null);+ const byModel: Record<string, ReasoningEffortChoice> = {};+ for (const [model, effort] of Object.entries(+ res.result?.reasoning_effort_by_model ?? {}+ )) {+ byModel[model] = toReasoningEffortChoice(effort);+ }+ setReasoningEffortByModel(byModel);}}).catch((err: unknown) => {@@ -476,37 +535,106 @@ const Conversations = ({cancelled = true;};}, []);- const applyComposerReasoningEffort = useCallback((value: ReasoningEffortChoice) => {- setComposerReasoningEffort(value);- void openhumanUpdateRuntimeSettings({ reasoning_effort: value === 'default' ? '' : value })- .then(() => {- console.debug('[chat][composer-reasoning] persisted reasoning_effort', { effort: value });+ const applyComposerReasoningEffort = useCallback(+ (value: ReasoningEffortChoice) => {+ const model = reasoningModel;+ if (model) {+ // `default` on a model drops its own level, falling back to the global one.+ setReasoningEffortByModel(prev => {+ const next = { ...prev };+ if (value === 'default') delete next[model];+ else next[model] = value;+ return next;+ });+ } else {+ setGlobalReasoningEffort(value);+ }+ void openhumanUpdateRuntimeSettings({+ reasoning_effort: value === 'default' ? '' : value,+ ...(model ? { reasoning_effort_model: model } : {}),})- .catch((err: unknown) => {- // The per-send value still applies; only persistence failed.- console.warn('[chat][composer-reasoning] failed to persist reasoning_effort', {- message: err instanceof Error ? err.message : String(err),+ .then(() => {+ console.debug('[chat][composer-reasoning] persisted reasoning_effort', {+ effort: value,+ perModel: Boolean(model),+ });+ })+ .catch((err: unknown) => {+ // The per-send value still applies; only persistence failed.+ console.warn('[chat][composer-reasoning] failed to persist reasoning_effort', {+ message: err instanceof Error ? err.message : String(err),+ });});- });- }, []);- const applyComposerModel = useCallback((value: string | null, contextWindow?: number | null) => {- setComposerModelOverride(value);- setComposerModelContextWindow(contextWindow ?? null);- void callCoreRpc({- method: 'openhuman.inference_update_model_settings',- params: { default_model: value ?? '' },- })- .then(() => {+ },+ [reasoningModel]+ );+ const persistComposerModelSettings = useCallback((value: string | null) => {+ const write = modelSettingsWriteQueueRef.current+ .catch(() => undefined)+ .then(() =>+ callCoreRpc({+ method: 'openhuman.inference_update_model_settings',+ params: { default_model: value ?? '' },+ })+ );+ modelSettingsWriteQueueRef.current = write.then(+ () => undefined,+ () => undefined+ );+ void write.then(+ () => {console.debug('[chat][composer-model] persisted default_model', { pinned: value !== null });- })- .catch((err: unknown) => {+ },+ (err: unknown) => {// The in-session override still applies; only persistence failed.console.warn('[chat][composer-model] failed to persist default_model', {message: err instanceof Error ? err.message : String(err),});- });+ }+ );+ return write;}, []);+ const startComposerModelClear = useCallback(() => {+ const promise = persistComposerModelSettings(null).then(+ () => {+ barrier.status = 'resolved';+ },+ error => {+ barrier.status = 'rejected';+ throw error;+ }+ );+ const barrier: ComposerModelClearBarrier = { promise, status: 'pending' };+ composerModelClearBarrierRef.current = barrier;+ // Keep a failed clear available for the next explicit send retry while+ // marking the rejection handled if the user does not submit again.+ void promise.catch(() => undefined);+ return promise;+ }, [persistComposerModelSettings]);++ const waitForComposerModelClear = useCallback(() => {+ const barrier = composerModelClearBarrierRef.current;+ if (!barrier) return null;+ if (barrier.status === 'rejected') return startComposerModelClear();+ return barrier.promise;+ }, [startComposerModelClear]);++ const applyComposerModel = useCallback(+ (value: string | null, contextWindow?: number | null) => {+ setComposerModelOverride(value);+ setPersistedDefaultModel(value);+ setComposerModelContextWindow(contextWindow ?? null);+ if (value === null) {+ void startComposerModelClear();+ } else {+ composerModelClearBarrierRef.current = null;+ void persistComposerModelSettings(value);+ }+ },+ [persistComposerModelSettings, startComposerModelClear]+ );+useEffect(() => {let cancelled = false;(async () => {@@ -538,6 +666,21 @@ const Conversations = ({// thread. Per-thread (a Set) so a send to thread B isn't blocked by an// in-flight send to thread A.const pendingSendsRef = useRef<Set<string>>(new Set());+ // Threads whose Stop landed while their send RPC was still in flight. The+ // core registers a turn only as that RPC returns, so the cancel found+ // nothing to stop; the send path re-issues it once the turn exists.+ const stopRequestedDuringSendRef = useRef<Set<string>>(new Set());+ // A confirmed cancellation may lose its terminal event; the existing+ // fallback is still allowed to settle that turn. An unconfirmed cancel must+ // reconcile with core before local running state is cleared.+ const confirmedCancellationRef = useRef<Set<string>>(new Set());+ // Per-thread backstop armed by every Stop: if the thread still shows a+ // running turn once it fires (the `chat_cancelled` event was lost, the cancel+ // RPC failed), the local running state is settled so Stop never leaves a+ // spinner the user cannot get rid of.+ const stopSettleTimersRef = useRef<Map<string, ReturnType<typeof setTimeout>>>(new Map());+ const inferenceTurnLifecycleRef = useRef(inferenceTurnLifecycleByThread);+ inferenceTurnLifecycleRef.current = inferenceTurnLifecycleByThread;// Per-thread silence timers. Each in-flight turn gets its own 120s watchdog// keyed by thread id, so concurrent turns on different threads don't share// (and clobber) a single timeout.@@ -545,19 +688,24 @@ const Conversations = ({// Threads whose turn has gone quiet past the silence window while the core// still reports it running (or cannot say). Drives a warning only — the turn// is never torn down client-side; the Stop button is how the user ends it.- const [stalledThreadIds, setStalledThreadIds] = useState<ReadonlySet<string>>(() => new Set());+ // Value: epoch ms the thread last showed any inference signal (the stall+ // moment minus the silence window), so the warning can say how long it has+ // been quiet.+ const [stalledThreadIds, setStalledThreadIds] = useState<ReadonlyMap<string, number>>(+ () => new Map()+ );const markThreadStalled = useCallback((threadId: string) => {setStalledThreadIds(prev => {if (prev.has(threadId)) return prev;- const next = new Set(prev);- next.add(threadId);+ const next = new Map(prev);+ next.set(threadId, Date.now() - SILENCE_WARNING_MS);return next;});}, []);const clearThreadStalled = useCallback((threadId: string) => {setStalledThreadIds(prev => {if (!prev.has(threadId)) return prev;- const next = new Set(prev);+ const next = new Map(prev);next.delete(threadId);return next;});@@ -647,6 +795,15 @@ const Conversations = ({// usage (read back from its session transcripts) so the totals reflect prior// turns instead of starting at zero. Best-effort; live turns accumulate on top// via recordChatTurnUsage and a brand-new thread (hasUsage=false) is left as-is.+ useEffect(() => {+ const failedAttachments = failedAttachmentsByThreadRef.current.get(selectedThreadId ?? '');+ attachmentsRef.current = failedAttachments ? failedAttachments.slice() : [];+ setAttachments(failedAttachments ? failedAttachments.slice() : []);+ // A thread switch must not carry the previous thread's files into this+ // composer. Failed attachments remain in the map for that thread.+ // eslint-disable-next-line react-hooks/exhaustive-deps+ }, [selectedThreadId]);+useEffect(() => {if (!selectedThreadId) return;let cancelled = false;@@ -784,10 +941,13 @@ const Conversations = ({window.addEventListener('dictation://insert-text', onDictationInsert as EventListener);return () =>window.removeEventListener('dictation://insert-text', onDictationInsert as EventListener);- }, []);+ // `setInputValue` is `useThreadDraft`'s stable setter.+ }, [setInputValue]);useEffect(() => {- if (sendErrorRef.current && inputValue.length > 0) {+ if (preserveSendErrorForRestoredDraftRef.current) {+ preserveSendErrorForRestoredDraftRef.current = false;+ } else if (sendErrorRef.current && inputValue.length > 0) {setSendError(null);}// The store-recorded create failure (#5156) dismisses on the same signal:@@ -886,10 +1046,13 @@ const Conversations = ({useEffect(() => {isMountedRef.current = true;const timers = sendingTimeoutsRef.current;+ const stopTimers = stopSettleTimersRef.current;return () => {isMountedRef.current = false;for (const timeout of timers.values()) clearTimeout(timeout);timers.clear();+ for (const timeout of stopTimers.values()) clearTimeout(timeout);+ stopTimers.clear();};}, []);@@ -1152,8 +1315,13 @@ const Conversations = ({if (!sendingThreadId) return;pendingSendsRef.current.add(sendingThreadId);addPendingSendingThread(sendingThreadId);+ // A new turn starts here: a Stop aimed at the previous one must not reach it.+ stopRequestedDuringSendRef.current.delete(sendingThreadId);+ clearStopSettleTimer(sendingThreadId);const pendingAttachments = attachments.slice();+ failedAttachmentsByThreadRef.current.set(sendingThreadId, pendingAttachments);const modelOverride = composerModelOverride ?? CHAT_MODEL_HINT;+ const modelClearBarrier = modelOverride === undefined ? waitForComposerModelClear() : null;let messageText = buildMessageWithAttachments(trimmed, pendingAttachments);const userMessage: ThreadMessage = {id: `msg_${globalThis.crypto.randomUUID()}`,@@ -1165,11 +1333,60 @@ const Conversations = ({};try {- const persisted = await dispatch(- addMessageLocal({ threadId: sendingThreadId, message: userMessage })- ).unwrap();- // The core saved the originals before returning this durable reference.- messageText = persisted.message.content;+ if (modelClearBarrier) {+ try {+ await modelClearBarrier;+ } catch (error) {+ // assistant-ui clears its composer when `onNew` resolves, so restore+ // this draft when the clear barrier prevents the send from starting.+ preserveSendErrorForRestoredDraftRef.current = true;+ setInputValue(normalized);+ if (selectedThreadId === sendingThreadId) {+ attachmentsRef.current = pendingAttachments.slice();+ setAttachments(pendingAttachments);+ }+ throw error;+ }+ }+ const previousFailedMessage = persistedFailedMessageByThreadRef.current.get(sendingThreadId);+ const retryingUnchangedMessage =+ previousFailedMessage && previousFailedMessage.content === messageText;+ if (retryingUnchangedMessage) {+ // The core already has this exact prompt from the failed attempt.+ messageText = previousFailedMessage.content;+ } else if (previousFailedMessage) {+ // A corrected retry must replace the already-persisted failed prompt;+ // appending it would leave both prompts in the transcript. The edit+ // operation truncates the failed tail and starts the corrected turn.+ dispatch(+ truncateMessagesFrom({+ threadId: sendingThreadId,+ messageId: previousFailedMessage.id,+ inclusive: true,+ })+ );+ await editMessage({+ threadId: sendingThreadId,+ messageId: previousFailedMessage.id,+ content: messageText,+ });+ setInputValue('');+ setAttachments([]);+ attachmentsRef.current = [];+ failedAttachmentsByThreadRef.current.delete(sendingThreadId);+ persistedFailedMessageByThreadRef.current.delete(sendingThreadId);+ setSendError(null);+ pendingSendsRef.current.delete(sendingThreadId);+ removePendingSendingThread(sendingThreadId);+ return;+ } else {+ const persisted = await dispatch(+ addMessageLocal({ threadId: sendingThreadId, message: userMessage })+ ).unwrap();+ // The core saved the originals before returning this durable reference.+ messageText = persisted.message.content;+ persistedFailedMessageByThreadRef.current.set(sendingThreadId, persisted.message);+ }} catch (error) {// RTK's unwrap() re-throws the rejectWithValue payload directly (a plain// string, not an Error). Check for the stale-thread sentinel before@@ -1189,6 +1406,9 @@ const Conversations = ({}setInputValue('');setAttachments([]);+ attachmentsRef.current = [];+ failedAttachmentsByThreadRef.current.delete(sendingThreadId);+ persistedFailedMessageByThreadRef.current.delete(sendingThreadId);setSendError(null);setAttachError(null);// Silence watchdog: fires only if 120s pass without ANY inference signal@@ -1214,7 +1434,7 @@ const Conversations = ({await chatSend({threadId: sendingThreadId,message: messageText,- model: modelOverride,+ ...(modelOverride !== undefined ? { model: modelOverride } : {}),locale: uiLocale,reasoningEffort: composerReasoningEffort,});@@ -1227,6 +1447,15 @@ const Conversations = ({// user turn isn't blocked by a stale ref/state.pendingSendsRef.current.delete(sendingThreadId);removePendingSendingThread(sendingThreadId);+ // Stop was pressed while this RPC was in flight, before the core had a+ // turn to cancel. The turn is registered now, so cancel it for real.+ if (stopRequestedDuringSendRef.current.delete(sendingThreadId)) {+ debug(+ '[chat] stop generation: re-issuing Stop pressed during send thread=%s',+ sendingThreadId+ );+ stopThreadTurn(sendingThreadId);+ }// Active-thread reset happens in the global ChatRuntimeProvider events.} catch (err) {@@ -1246,10 +1475,22 @@ const Conversations = ({} else {setSendError(chatSendError('cloud_send_failed', msg));}+ // assistant-ui clears its composer after `onNew` resolves. Restore the+ // draft when the core rejects the send so the user can correct and retry.+ preserveSendErrorForRestoredDraftRef.current = true;+ failedAttachmentsByThreadRef.current.set(sendingThreadId, pendingAttachments);+ setInputValue(normalized);+ if (selectedThreadId === sendingThreadId) {+ attachmentsRef.current = pendingAttachments.slice();+ setAttachments(pendingAttachments);+ }dispatch(clearRuntimeForThread({ threadId: sendingThreadId }));dispatch(clearThreadInferenceActive(sendingThreadId));pendingSendsRef.current.delete(sendingThreadId);removePendingSendingThread(sendingThreadId);+ // No turn was started, so a Stop pressed meanwhile has nothing to stop.+ stopRequestedDuringSendRef.current.delete(sendingThreadId);+ clearStopSettleTimer(sendingThreadId);}};@@ -1272,6 +1513,7 @@ const Conversations = ({if (!normalized && pendingAttachments.length === 0) return;const modelOverride = composerModelOverride ?? CHAT_MODEL_HINT;+ const modelClearBarrier = modelOverride === undefined ? waitForComposerModelClear() : null;const messageText = buildMessageWithAttachments(normalized, pendingAttachments);// Build the full user message exactly like a normal send (content +// attachment metadata) so the follow-up persists identically when it is@@ -1294,10 +1536,18 @@ const Conversations = ({setAttachError(null);try {+ if (modelClearBarrier) {+ try {+ await modelClearBarrier;+ } catch (error) {+ preserveSendErrorForRestoredDraftRef.current = true;+ throw error;+ }+ }await chatSend({threadId,message: messageText,- model: modelOverride,+ ...(modelOverride !== undefined ? { model: modelOverride } : {}),locale: uiLocale,queueMode: 'followup',reasoningEffort: composerReasoningEffort,@@ -1317,7 +1567,12 @@ const Conversations = ({// assistant-ui clears its composer after `onNew` resolves. This path// handles the transport error locally, so restore the rejected follow-up// explicitly instead of letting the user's draft disappear.+ failedAttachmentsByThreadRef.current.set(threadId, pendingAttachments);setInputValue(normalized);+ if (selectedThreadId === threadId) {+ attachmentsRef.current = pendingAttachments.slice();+ setAttachments(pendingAttachments);+ }}};@@ -1336,13 +1591,70 @@ const Conversations = ({// `ChatRuntimeProvider.onCancelled` persists the partial and its processing// trail after the core confirms cancellation. Keeping that in one place also// covers turns superseded without a local Stop click.- const handleStopGeneration = useCallback(() => {- if (!selectedThreadId) {- debug('[chat] stop generation: no selected thread — noop');- return;- }- const threadId = selectedThreadId;- debug('[chat] stop generation: thread=%s', threadId);+ function clearStopSettleTimer(threadId: string) {+ const timer = stopSettleTimersRef.current.get(threadId);+ if (timer === undefined) return;+ clearTimeout(timer);+ stopSettleTimersRef.current.delete(threadId);+ }++ // End a thread's local running state without waiting for the core.+ function settleStoppedThread(threadId: string, reason: string) {+ debug('[chat] stop generation: settling local state thread=%s reason=%s', threadId, reason);+ clearStopSettleTimer(threadId);+ clearSilenceTimer(threadId);+ turnSignatureByThreadRef.current.delete(threadId);+ clearThreadStalled(threadId);+ dispatch(clearRuntimeForThread({ threadId }));+ dispatch(clearThreadInferenceActive(threadId));+ }++ function stopThreadTurn(threadId: string) {+ const sendPending = pendingSendsRef.current.has(threadId);+ confirmedCancellationRef.current.delete(threadId);+ debug('[chat] stop generation: thread=%s sendPending=%s', threadId, sendPending);+ // The core registers the turn only as the send RPC returns; until then+ // this cancel may find nothing. Remember the Stop so the send path can+ // re-issue it against the registered turn instead of letting it run.+ if (sendPending) stopRequestedDuringSendRef.current.add(threadId);++ clearStopSettleTimer(threadId);+ stopSettleTimersRef.current.set(+ threadId,+ setTimeout(() => {+ stopSettleTimersRef.current.delete(threadId);+ if (!isMountedRef.current) return;+ // A send in flight owns the thread's state (and re-issues the Stop).+ if (pendingSendsRef.current.has(threadId)) return;+ const lifecycle = inferenceTurnLifecycleRef.current[threadId];+ if (lifecycle !== 'started' && lifecycle !== 'streaming') return;+ if (confirmedCancellationRef.current.delete(threadId)) {+ settleStoppedThread(threadId, 'confirmed cancellation without terminal event');+ return;+ }+ // The cancel RPC may have failed before reaching core. Reconcile+ // before clearing local state so a still-running turn is not hidden.+ void threadApi+ .getTurnState(threadId)+ .then(state => {+ if (!isMountedRef.current) return;+ const stillRunning = state?.lifecycle === 'started' || state?.lifecycle === 'streaming';+ if (!stillRunning) {+ settleStoppedThread(threadId, 'core confirms no running turn after stop');+ } else {+ debug('[chat] stop generation: core still reports running thread=%s', threadId);+ }+ })+ .catch(error => {+ debug(+ '[chat] stop generation: reconciliation failed thread=%s err=%o',+ threadId,+ error+ );+ });+ }, STOP_SETTLE_FALLBACK_MS)+ );+void chatCancel(threadId).then(outcome => {const accepted = outcome?.accepted === true;const turnCancelled = outcome?.turnCancelled === true;@@ -1352,31 +1664,34 @@ const Conversations = ({accepted,turnCancelled);+ // A rejected cancel is left to the backstop above.if (!accepted) return;- if (!turnCancelled) {- // The core has nothing running on this thread, so no `cancelled`- // chat_error will ever arrive to clear the composer. Without this the- // thread stays "generating" with a Stop button that can never work —- // e.g. a turn whose terminal event was lost across a reconnect. A send- // still waiting on its RPC is skipped: its turn may not be registered- // yet, and its own completion path owns the state.- if (pendingSendsRef.current.has(threadId)) {- debug('[chat] stop generation: nothing in flight but send pending thread=%s', threadId);- return;- }- debug(- '[chat] stop generation: nothing in flight — settling local state thread=%s',- threadId- );- clearSilenceTimer(threadId);- turnSignatureByThreadRef.current.delete(threadId);- clearThreadStalled(threadId);- dispatch(clearRuntimeForThread({ threadId }));- dispatch(clearThreadInferenceActive(threadId));+ if (turnCancelled) {+ // The turn was registered after all; a `chat_cancelled` is on its way.+ confirmedCancellationRef.current.add(threadId);+ stopRequestedDuringSendRef.current.delete(threadId);return;}+ // The core has nothing running on this thread, so no `cancelled`+ // chat_error will ever arrive to clear the composer — e.g. a turn+ // whose terminal event was lost across a reconnect. A send still+ // waiting on its RPC is the exception: its turn is not registered+ // yet, and the deferred Stop recorded above cancels it once it is.+ if (pendingSendsRef.current.has(threadId)) {+ debug('[chat] stop generation: deferring until send returns thread=%s', threadId);+ return;+ }+ settleStoppedThread(threadId, 'nothing in flight');});- }, [selectedThreadId, dispatch, clearSilenceTimer, clearThreadStalled]);+ }++ function handleStopGeneration() {+ if (!selectedThreadId) {+ debug('[chat] stop generation: no selected thread — noop');+ return;+ }+ stopThreadTurn(selectedThreadId);+ }handleStopGenerationRef.current = handleStopGeneration;@@ -1396,30 +1711,70 @@ const Conversations = ({true);- const handleComposerEscape = useCallback(() => {- if (!selectedThreadActive) return;+ // The last *visible* user prompt (hidden system/injected messages are+ // excluded to match how the transcript is rendered), as composer text.+ const lastVisibleUserPrompt = useCallback((): string => {+ const lastUserMessage = [...messages]+ .reverse()+ .find(m => m.sender === 'user' && !m.extraMetadata?.hidden);+ return lastUserMessage ? parseMessageImages(lastUserMessage.content ?? '').text : '';+ }, [messages]);++ // Returns whether Escape did anything, so the composer only swallows the key+ // when it acted and an open popover can still close on it.+ const handleComposerEscape = useCallback((): boolean => {+ if (!selectedThreadActive) return false;const composerEmpty = inputValue.trim().length === 0;debug('[chat] esc interrupt: thread=%s composerEmpty=%s',selectedThreadId ?? 'none',composerEmpty);- handleStopGeneration();+ handleStopGenerationRef.current?.();if (composerEmpty) {- // Restore the last *visible* user prompt (hidden system/injected- // messages are excluded here to match how the transcript is rendered).- const lastUserMessage = [...messages]- .reverse()- .find(m => m.sender === 'user' && !m.extraMetadata?.hidden);- const restored = lastUserMessage- ? parseMessageImages(lastUserMessage.content ?? '').text- : '';+ const restored = lastVisibleUserPrompt();if (restored.length > 0) {debug('[chat] esc interrupt: restored prompt len=%d', restored.length);setInputValue(restored);}}- }, [handleStopGeneration, inputValue, messages, selectedThreadActive, selectedThreadId]);+ return true;+ }, [+ handleStopGeneration,+ inputValue,+ lastVisibleUserPrompt,+ selectedThreadActive,+ selectedThreadId,+ setInputValue,+ ]);++ // ArrowUp in an empty composer recalls this thread's last prompt for a+ // quick resend or tweak. Returns whether it did, so the caret key otherwise+ // behaves normally.+ const handleRecallLastPrompt = useCallback((): boolean => {+ if (inputValue.length > 0) return false;+ const restored = lastVisibleUserPrompt();+ if (restored.length === 0) return false;+ debug('[chat] arrow-up recall: thread=%s len=%d', selectedThreadId ?? 'none', restored.length);+ setInputValue(restored);+ return true;+ }, [inputValue, lastVisibleUserPrompt, selectedThreadId, setInputValue]);++ // The composer's placeholder follows the thread: a turn parked on the user+ // (approval, plan review, drafted workflow) asks for that answer first; a+ // turn in flight takes the text as a queued follow-up.+ const selectedThreadWaitingOnUser = selectedThreadId+ ? Boolean(+ pendingApprovalByThread[selectedThreadId] ||+ pendingPlanReviewByThread[selectedThreadId] ||+ pendingWorkflowProposalsByThread[selectedThreadId]+ )+ : false;+ const composerPlaceholder = selectedThreadWaitingOnUser+ ? t('composer.placeholder.waiting')+ : selectedThreadActive+ ? t('composer.placeholder.running')+ : undefined;// The transcript itself renders from the assistant-ui runtime// (`AssistantUiChat`). What remains here is what the composer footer and the@@ -1552,6 +1907,24 @@ const Conversations = ({: { id: parentId, title: t('chat.parentThread') };}, [threads, selectedThreadId, t]);+ // A thread is "running" for the sidebar while its send is pending, the core+ // has marked it active, or its inference turn is started/streaming. Covers+ // background threads too, so a row keeps shimmering after you switch away.+ const isThreadRunning = useCallback(+ (threadId: string): boolean => {+ if (pendingSendingThreadIds.has(threadId) || activeThreadIds[threadId]) return true;+ const lifecycle = inferenceTurnLifecycleByThread[threadId];+ return lifecycle === 'started' || lifecycle === 'streaming';+ },+ [pendingSendingThreadIds, activeThreadIds, inferenceTurnLifecycleByThread]+ );+ const runningThreadIds = useMemo(+ () => threads.filter(thread => isThreadRunning(thread.id)).map(thread => thread.id),+ [threads, isThreadRunning]+ );+ const unreadThreadIds = useUnreadThreads(runningThreadIds, selectedThreadId ?? null);+ const { isPinned: isThreadPinnedNow, togglePin: toggleThreadPin } = useThreadPins();+// Thread list (left pane). Rendered through `TwoPanelLayout` below in page// mode; the embedded `variant="sidebar"` mode shows no thread list at all.const threadSidebar = (@@ -1567,6 +1940,10 @@ const Conversations = ({}}}resolveTitle={resolveThreadDisplayTitle}+ isThreadRunning={isThreadRunning}+ unreadThreadIds={unreadThreadIds}+ isPinned={isThreadPinnedNow}+ onTogglePin={toggleThreadPin}onRequestDelete={thread =>setDeleteModal({isOpen: true,@@ -1640,10 +2017,9 @@ const Conversations = ({/>)}{selectedThreadId && liveTodos && liveTodos.length > 0 && (- <TodoList- data-testid="todo-checklist"+ <PinnedTodoCard+ threadId={selectedThreadId}items={toAuiTodoItems(liveTodos)}- title={t('conversations.todos.title')}className="mb-2"/>)}@@ -1707,20 +2083,14 @@ const Conversations = ({inferenceTurnLifecycleByThread[selectedThreadId] === 'streaming')? (inferenceStatusByThread[selectedThreadId]?.phase ?? 'thinking'): null;- const stallWarningBanner = selectedStalledPhase ? (- <div className="mb-2" role="status">- <p- className="text-xs text-amber-700"- data-testid="chat-stall-warning"- data-chat-stall-phase={selectedStalledPhase}>- {t(- selectedStalledPhase === 'thinking'- ? 'chat.stallWarning.thinking'- : 'chat.stallWarning.working'- )}- </p>- </div>- ) : null;+ const stallWarningBanner =+ selectedStalledPhase && selectedThreadId ? (+ <StallWarning+ phase={selectedStalledPhase}+ quietSince={stalledThreadIds.get(selectedThreadId)}+ onStop={handleStopGeneration}+ />+ ) : null;const sendAdvisoryBanner = sendAdvisory ? (<div className="flex items-center justify-between mb-2">@@ -1914,6 +2284,10 @@ const Conversations = ({{liveArtifactDeck}{/* The core's run queue for this thread; renders nothing while empty. */}<ComposerMessageQueue />+ {/* Where this conversation works. Last, so it sits directly on the+ input; renders only while the thread has no messages, since the+ core fixes the folder at the first send. */}+ <ThreadWorkspaceChip threadId={selectedThreadId ?? null} /></>);@@ -1923,6 +2297,7 @@ const Conversations = ({<ReasoningEffortPickervalue={composerReasoningEffort}onChange={applyComposerReasoningEffort}+ modelLabel={reasoningModel}/>{chatFilesChip}</>@@ -2011,6 +2386,8 @@ const Conversations = ({inputValue={inputValue}onInputValueChange={setInputValue}onEscape={handleComposerEscape}+ onRecallLastPrompt={handleRecallLastPrompt}+ composerPlaceholder={composerPlaceholder}attachments={attachments}onAttachFiles={handleAttachFiles}onRemoveAttachment={id => setAttachments(previous => previous.filter(a => a.id !== id))}diff --git a/app/src/hooks/useLocalSession.test.tsx b/app/src/hooks/useLocalSession.test.tsxnew file mode 100644index 0000000000..1706ab738f--- /dev/null+++ b/app/src/hooks/useLocalSession.test.tsx@@ -0,0 +1,69 @@+import { renderHook } from '@testing-library/react';+import type { ReactNode } from 'react';+import { afterEach, describe, expect, it } from 'vitest';++import { getCoreStateSnapshot, setCoreStateSnapshot } from '../lib/coreState/store';+import { CoreStateContext } from '../providers/coreStateContext';+import { createLocalSessionToken } from '../utils/localSession';+import { useIsLocalSession, useManagedInferenceAvailable } from './useLocalSession';++const REMOTE_TOKEN = 'header.payload.signature';++function withContext(sessionToken: string | null) {+ const value = { snapshot: { sessionToken } } as never;+ return ({ children }: { children: ReactNode }) => (+ <CoreStateContext.Provider value={value}>{children}</CoreStateContext.Provider>+ );+}++function seedStore(sessionToken: string | null) {+ const current = getCoreStateSnapshot();+ setCoreStateSnapshot({ ...current, snapshot: { ...current.snapshot, sessionToken } });+}++describe('useLocalSession hooks with a CoreStateProvider', () => {+ it('treats a local token as a local session with no managed inference', () => {+ const wrapper = withContext(createLocalSessionToken());+ expect(renderHook(() => useIsLocalSession(), { wrapper }).result.current).toBe(true);+ expect(renderHook(() => useManagedInferenceAvailable(), { wrapper }).result.current).toBe(+ false+ );+ });++ it('treats a real session as non-local with managed inference available', () => {+ const wrapper = withContext(REMOTE_TOKEN);+ expect(renderHook(() => useIsLocalSession(), { wrapper }).result.current).toBe(false);+ expect(renderHook(() => useManagedInferenceAvailable(), { wrapper }).result.current).toBe(true);+ });++ it('signed out is neither local nor managed-capable', () => {+ const wrapper = withContext(null);+ expect(renderHook(() => useIsLocalSession(), { wrapper }).result.current).toBe(false);+ expect(renderHook(() => useManagedInferenceAvailable(), { wrapper }).result.current).toBe(+ false+ );+ });+});++describe('useLocalSession hooks without a CoreStateProvider', () => {+ const original = getCoreStateSnapshot();+ afterEach(() => setCoreStateSnapshot(original));++ it('does not throw and reads a local token from the snapshot store', () => {+ seedStore(createLocalSessionToken());+ expect(renderHook(() => useIsLocalSession()).result.current).toBe(true);+ expect(renderHook(() => useManagedInferenceAvailable()).result.current).toBe(false);+ });++ it('reads a real token from the snapshot store', () => {+ seedStore(REMOTE_TOKEN);+ expect(renderHook(() => useIsLocalSession()).result.current).toBe(false);+ expect(renderHook(() => useManagedInferenceAvailable()).result.current).toBe(true);+ });++ it('reports no managed inference when the store holds no session', () => {+ seedStore(null);+ expect(renderHook(() => useIsLocalSession()).result.current).toBe(false);+ expect(renderHook(() => useManagedInferenceAvailable()).result.current).toBe(false);+ });+});diff --git a/app/src/hooks/useLocalSession.ts b/app/src/hooks/useLocalSession.tsnew file mode 100644index 0000000000..c73a8006a8--- /dev/null+++ b/app/src/hooks/useLocalSession.ts@@ -0,0 +1,50 @@+import { useContext } from 'react';++import { getCoreStateSnapshot } from '../lib/coreState/store';+import { CoreStateContext } from '../providers/coreStateContext';+import { isLocalSessionToken } from '../utils/localSession';++/**+ * Session-shape helpers for surfaces that must tell a signed-in TinyHumans+ * user apart from a "Continue Locally" one.+ *+ * `isLocalSessionToken(snapshot.sessionToken)` is repeated across a dozen+ * components; these hooks give the two questions actually being asked a name,+ * and give the onboarding wizard one implementation instead of the two it had+ * (one driven by `useEffect`, one by a ref plus a setState during render).+ *+ * They read `CoreStateContext` directly rather than through `useCoreState()`,+ * which throws when no provider is mounted. Settings panels are rendered in+ * unit tests without one, so a throwing read would turn a visibility question+ * into a crash. When the context is absent the hooks fall back to the+ * module-level snapshot store, which is the same state the provider commits+ * to — it just does not re-render on change. That is acceptable here: a+ * session cannot change shape underneath a mounted panel, because an identity+ * flip restarts the app (`handleIdentityFlip` → `restartApp`).+ */+function readSessionToken(context: ReturnType<typeof useSessionContext>): string | null {+ return context ? context.snapshot.sessionToken : getCoreStateSnapshot().snapshot.sessionToken;+}++function useSessionContext() {+ return useContext(CoreStateContext);+}++/** True when the session is the offline "Continue Locally" one. */+export function useIsLocalSession(): boolean {+ const context = useSessionContext();+ return isLocalSessionToken(readSessionToken(context));+}++/**+ * True when OpenHuman-managed services (inference, embeddings, managed search+ * routes) are actually available — that is, when the session is a real+ * TinyHumans session. A local session has no account behind it and therefore+ * no managed anything, and a surface that claims otherwise is lying to the+ * user.+ */+export function useManagedInferenceAvailable(): boolean {+ const context = useSessionContext();+ const token = readSessionToken(context);+ return Boolean(token) && !isLocalSessionToken(token);+}diff --git a/app/src/lib/i18n/I18nContext.tsx b/app/src/lib/i18n/I18nContext.tsxindex 67e3d529aa..53292417a5 100644--- a/app/src/lib/i18n/I18nContext.tsx+++ b/app/src/lib/i18n/I18nContext.tsx@@ -10,6 +10,7 @@ import fr from './fr';import hi from './hi';import id from './id';import it from './it';+import ja from './ja';import ko from './ko';import pl from './pl';import pt from './pt';@@ -29,6 +30,7 @@ interface I18nContextValue {const translations: Record<Locale, Record<string, string>> = {en,+ ja,ko,'zh-CN': zhCN,hi,diff --git a/app/src/lib/i18n/__tests__/I18nContext.test.tsx b/app/src/lib/i18n/__tests__/I18nContext.test.tsxindex aa5e79fa4d..a0104a31cb 100644--- a/app/src/lib/i18n/__tests__/I18nContext.test.tsx+++ b/app/src/lib/i18n/__tests__/I18nContext.test.tsx@@ -59,6 +59,18 @@ describe('I18nProvider', () => {expect(screen.getByTestId('missing-key')).toHaveTextContent('this.key.does.not.exist');});+ it('serves Japanese translations with the existing unknown-key fallback', () => {+ renderWithLocale('ja');++ expect(screen.getByTestId('locale')).toHaveTextContent('ja');+ expect(screen.getByText('言語')).toBeInTheDocument();+ expect(screen.getByText('アプリデータを削除')).toBeInTheDocument();+ expect(screen.getByText('終了')).toBeInTheDocument();+ expect(screen.getByTestId('missing-key')).toHaveTextContent('this.key.does.not.exist');+ expect(document.documentElement.lang).toBe('ja');+ expect(document.documentElement.dir).toBe('ltr');+ });+it('serves German translations from the registered locale map', () => {renderWithLocale('de');diff --git a/app/src/lib/i18n/__tests__/coverage.test.ts b/app/src/lib/i18n/__tests__/coverage.test.tsindex 0b1b8e13b4..b39e1f0534 100644--- a/app/src/lib/i18n/__tests__/coverage.test.ts+++ b/app/src/lib/i18n/__tests__/coverage.test.ts@@ -14,6 +14,7 @@ const LOCALES = ['ru','id','it',+ 'ja','ko','pl','tr',@@ -67,6 +68,18 @@ describe('i18n coverage', () => {expect(mismatches).toEqual([]);});+ it('preserves Japanese interpolation placeholders exactly', () => {+ const japanese = loadLocale('ja');+ const placeholders = (value: string) => value.match(/\{+[^{}]+\}+/g)?.sort() ?? [];+ const mismatches = Object.entries(enFlat)+ .filter(+ ([key, value]) =>+ JSON.stringify(placeholders(japanese[key])) !== JSON.stringify(placeholders(value))+ )+ .map(([key]) => key);+ expect(mismatches).toEqual([]);+ });+it.each(['en', ...LOCALES])('locale %s contains no em dashes', locale => {const flat = locale === 'en' ? enFlat : loadLocale(locale);const keysWithEmDashes = Object.entries(flat)diff --git a/app/src/lib/i18n/__tests__/mascotDismissPath.test.ts b/app/src/lib/i18n/__tests__/mascotDismissPath.test.tsindex 06d45e2b16..006a8a2a33 100644--- a/app/src/lib/i18n/__tests__/mascotDismissPath.test.ts+++ b/app/src/lib/i18n/__tests__/mascotDismissPath.test.ts@@ -9,6 +9,7 @@ import fr from '../fr';import hi from '../hi';import id from '../id';import itIT from '../it';+import ja from '../ja';import ko from '../ko';import pl from '../pl';import pt from '../pt';@@ -25,6 +26,7 @@ const LOCALES: Record<string, Record<string, string>> = {hi,id,it: itIT,+ ja,ko,pl,pt,diff --git a/app/src/lib/i18n/ar.ts b/app/src/lib/i18n/ar.tsindex 05019e8ec1..7e53216cd1 100644--- a/app/src/lib/i18n/ar.ts+++ b/app/src/lib/i18n/ar.ts@@ -192,8 +192,8 @@ const messages: TranslationMap = {'feedback.comments.loadError': 'تعذّر تحميل التعليقات','feedback.comments.postError': 'تعذّر نشر التعليق','feedback.comments.you': 'أنت',- 'conversations.backgroundTasks.statusRunning': 'Running',- 'conversations.backgroundTasks.close': 'Close',+ 'conversations.backgroundTasks.statusRunning': 'قيد التشغيل',+ 'conversations.backgroundTasks.close': 'إغلاق','conversations.backgroundTasks.sectionThisChat': 'في هذه المحادثة','conversations.backgroundTasks.sectionScheduled': 'المهام المجدولة','conversations.backgroundTasks.sectionMemory': 'مزامنة الذاكرة',@@ -202,7 +202,7 @@ const messages: TranslationMap = {'conversations.backgroundTasks.memoryJobTitle': 'مزامنة الذاكرة','conversations.backgroundTasks.cancelJob': 'إلغاء','conversations.backgroundTasks.cronEmpty': 'لا توجد مهام مجدولة.',- 'conversations.backgroundTasks.cronSchedCron': 'Cron {expr}',+ 'conversations.backgroundTasks.cronSchedCron': 'مجدول {expr}','conversations.backgroundTasks.memUpToDate': 'كل الذكريات محدَّثة','nav.home': 'الرئيسية','nav.chat': 'المحادثة',@@ -422,6 +422,35 @@ const messages: TranslationMap = {'welcome.privacyPolicy': 'سياسة الخصوصية','welcome.termsOutro': '.','welcome.connect': 'اختبار',+ 'welcome.hero.subtitle': 'ذكاؤك الاصطناعي، بذاكرة وصوت والويب كاملًا.',+ 'welcome.th.title': 'المتابعة مع TinyHumans',+ 'welcome.th.promise': 'حساب واحد. كل شيء مضمّن. لا شيء لتهيئته.',+ 'welcome.th.featureInference': 'الاستدلال',+ 'welcome.th.featureSearch': 'البحث في الويب',+ 'welcome.th.featureVoice': 'الصوت',+ 'welcome.th.featureMemory': 'الذاكرة',+ 'welcome.th.featureEmbeddings': 'التضمينات',+ 'welcome.th.featureBilling': 'الفوترة',+ 'welcome.th.credit': 'رصيد 5$ للبدء',+ 'welcome.th.cta': 'المتابعة مع TinyHumans',+ 'welcome.th.providers': 'سجّل الدخول عبر Google أو GitHub أو X',+ 'welcome.self.title': 'سأُعدّه بنفسي',+ 'welcome.self.promise': 'استخدم مفاتيح API ونقاط النهاية الخاصة بك.',+ 'welcome.self.listLabel': 'ستُعدّ:',+ 'welcome.self.step1': 'الاستدلال',+ 'welcome.self.step2': 'البحث في الويب',+ 'welcome.self.step3': 'الذاكرة',+ 'welcome.self.time': 'حوالي 3 دقائق. يمكنك تغيير أي شيء لاحقًا في الإعدادات.',+ 'welcome.self.cta': 'سأُعدّه بنفسي',+ 'welcome.serverPrompt': 'هل تشغّل OpenHuman على خادم بالفعل؟',+ 'welcome.serverCta': 'اتصل به.',+ 'welcome.handoff.title': 'إنهاء تسجيل الدخول في متصفحك',+ 'welcome.handoff.body': 'فتحنا tinyhumans.ai. عُد عندما تنتهي.',+ 'welcome.handoff.reopen': 'افتح الصفحة مرة أخرى',+ 'welcome.handoff.failedTitle': 'لم يكتمل تسجيل الدخول',+ 'welcome.handoff.failedBody': 'ربما حظر المتصفح العودة إلى OpenHuman.',+ 'welcome.handoff.retry': 'حاول مرة أخرى',+ 'welcome.handoff.fallbackSelf': 'أعدّه بنفسي بدلًا من ذلك','home.askAssistant': 'اسأل مساعدك أي شيء...','home.statusOk': 'مساعدك جاهز متى كنت مستعدًا. اكتب شيئًا في الأسفل للبدء.','home.statusBackendOnly': 'جارٍ إعادة الاتصال بالخادم… سيتوفر وكيلك قريبًا.',@@ -515,9 +544,9 @@ const messages: TranslationMap = {'skills.rows.edit': 'تعديل {name}','skills.rows.remove': 'إزالة {name}','skills.explorer.searchPlaceholder': 'ابحث في المهارات...',- 'skills.explorer.scopeUser': 'User',- 'skills.explorer.scopeProject': 'Project',- 'skills.explorer.scopeLegacy': 'Legacy',+ 'skills.explorer.scopeUser': 'المستخدم',+ 'skills.explorer.scopeProject': 'المشروع',+ 'skills.explorer.scopeLegacy': 'القديم','skills.explorer.noDescription': 'لم يتم تقديم وصف.','skills.explorer.uninstallSuccess': 'تم إلغاء تثبيت المهارة بنجاح.','skills.explorer.registryTab': 'السجل',@@ -650,6 +679,12 @@ const messages: TranslationMap = {'memory.search': 'البحث في الذكريات...','memory.noResults': 'لم يتم العثور على ذكريات','memory.empty': 'لا توجد ذكريات بعد. تُنشأ الذكريات تلقائيًا أثناء تفاعلك.',+ 'memory.error.insufficientCredits':+ 'الذاكرة غير متاحة: نفد رصيد حسابك. أعد الشحن لاستعادتها؛ لم يُفقد أي شيء مخزّن.',+ 'memory.error.unavailable':+ 'تعذّر الوصول إلى الذاكرة حاليًا. لم يُفقد أي شيء مخزّن؛ حاول مرة أخرى بعد قليل.',+ 'memory.outOfCredits.title': 'نفد الرصيد',+ 'memory.outOfCredits.action': 'اشحن الرصيد','memory.tab.memory': 'الذاكرة','memory.tab.agents': 'المكتبة','memory.analyzeNow': 'تحليل الآن',@@ -716,7 +751,7 @@ const messages: TranslationMap = {'onboarding.custom.stepperVoice': 'الصوت','onboarding.custom.stepperOAuth': 'OAuth','onboarding.custom.stepperSearch': 'البحث',- 'onboarding.custom.stepperEmbeddings': 'Embeddings',+ 'onboarding.custom.stepperEmbeddings': 'التضمينات','onboarding.custom.stepperMemory': 'الذاكرة','onboarding.custom.stepCounter': 'الخطوة {n} من {total}','onboarding.custom.defaultTitle': 'افتراضي',@@ -730,8 +765,9 @@ const messages: TranslationMap = {'onboarding.custom.configureLater':'يمكنك إكمال الإعداد بعد انتهاء الإعداد الأولي. سننقلك إلى صفحة الإعدادات المناسبة عند الانتهاء.','onboarding.custom.openSettings': 'فتح في الإعدادات',- 'onboarding.custom.inference.title': 'الاستدلال (النص)',- 'onboarding.custom.inference.subtitle': 'أي نموذج لغوي يجب أن يُجيب على أسئلتك ويشغّل وكلاءك؟',+ 'onboarding.custom.inference.title': 'اختر مزوّد النموذج',+ 'onboarding.custom.inference.subtitle':+ 'يحتاج OpenHuman إلى نموذج ليفكّر به. أضف مفتاحًا لمزوّد تستخدمه بالفعل، أو وجّهه إلى نموذج يعمل محليًا.','onboarding.custom.inference.defaultDesc':'يُوجّه OpenHuman كل عبء عمل إلى نموذج افتراضي مناسب. بدون مفاتيح أو إعداد.','onboarding.custom.inference.configureDesc':@@ -748,13 +784,16 @@ const messages: TranslationMap = {'يشغّل OpenHuman مساحة عمل Composio مُدارة. نقرة واحدة لتوصيل كل خدمة لاحقًا.','onboarding.custom.oauth.configureDesc':'استخدم حساب Composio الخاص بك / مفتاح API. اضبطه من الإعدادات › الاتصالات.',- 'onboarding.custom.search.title': 'البحث على الويب',- 'onboarding.custom.search.subtitle': 'كيف يبحث OpenHuman على الويب نيابةً عنك.',+ 'onboarding.custom.search.title': 'دع OpenHuman يبحث في الويب',+ 'onboarding.custom.search.subtitle': 'من دون هذا، لا يعرف OpenHuman سوى ما تدرّب عليه.','onboarding.custom.search.defaultDesc':'يعمل البحث على الويب فورًا: Exa وGemini مضمّنان مع TinyHumans، دون الحاجة إلى مفتاح API.','onboarding.custom.search.configureDesc':'Exa وGemini مضمّنان. أضف مزوّدي بحث آخرين بمفتاح API الخاص بك من الإعدادات › الأدوات.',- 'onboarding.custom.embeddings.title': 'Embeddings',+ 'onboarding.custom.search.skipForNow': 'تخطَّ الآن',+ 'onboarding.custom.search.ready': 'البحث على الويب جاهز.',+ 'onboarding.custom.search.notReady': 'أضف مزوّدًا أدناه ليتمكن OpenHuman من البحث على الويب.',+ 'onboarding.custom.embeddings.title': 'التضمينات','onboarding.custom.embeddings.subtitle':'كيف يُولِّد OpenHuman تضمينات المتجهات للبحث الدلالي في الذاكرة.','onboarding.custom.embeddings.defaultDesc':@@ -827,9 +866,9 @@ const messages: TranslationMap = {'settings.about.serverUrl': 'الخادم URL','settings.about.serverUrlUnavailable': 'غير متاح','settings.about.connectionHelperLocal':- 'مأخوذة في العملية من قذيفة Xqx1x على عملية الإطلاق يتم اختيار المرفأ في البداية لذا تغيرت هذه الـ (إكسكساكس) بين الإطلاقات',+ 'يتم تشغيله داخل العملية بواسطة غلاف Tauri عند إطلاق التطبيق. يتم اختيار المنفذ عند بدء التشغيل، لذا يتغير عنوان URL هذا بين عمليات الإطلاق.','settings.about.connectionHelperCloud':- 'متصلة بقاعدة نائية غيّر هذا في (بوتشيك) أو مُخلّق السحابة.',+ 'متصل بقاعدة سحابية. غيّر هذا في config.toml أو في مُنشئ السحابة.','settings.usage.title': 'الاستخدام','settings.usage.menuDesc': 'التكاليف وتوفير الرموز وسجل الاستخدام والنشاط في الخلفية','settings.costDashboard.monthToDate': 'من بداية الشهر',@@ -844,39 +883,39 @@ const messages: TranslationMap = {'settings.costDashboard.title': 'لوحة بيانات التكاليف','settings.costDashboard.sevenDayCost': 'التكلفة اليومية','settings.costDashboard.sevenDayTokens': '7 أيام',- 'settings.costDashboard.totalSpend': 'المجموع 7 أيام',+ 'settings.costDashboard.totalSpend': 'إجمالي الإنفاق','settings.costDashboard.monthlyPace': 'الوتيرة الشهرية','settings.costDashboard.modelBreakdown': 'التوزيع حسب النموذج',- 'settings.costDashboard.model': 'النموذج النموذجي',- 'settings.costDashboard.provider': 'Provider',+ 'settings.costDashboard.model': 'النموذج',+ 'settings.costDashboard.provider': 'المزوّد','settings.costDashboard.cost': 'التكلفة',- 'settings.costDashboard.tokens': 'Tokens',+ 'settings.costDashboard.tokens': 'الرموز','settings.costDashboard.requests': 'الطلبات','settings.costDashboard.percentOfTotal': 'النسبة المئوية من المجموع',- 'settings.costDashboard.inputTokens': 'الناتج',- 'settings.costDashboard.outputTokens': 'الناتج',+ 'settings.costDashboard.inputTokens': 'المدخلات',+ 'settings.costDashboard.outputTokens': 'المخرجات','settings.costDashboard.noData': 'لم تسجل أي تكلفة حتى الآن في الأيام السبعة الماضية.','settings.costDashboard.noModels': 'لا نشاط نموذجي في الأيام السبعة الماضية.',- 'settings.costDashboard.loading': 'لوح التعبئة',+ 'settings.costDashboard.loading': 'جارٍ تحميل لوحة بيانات التكاليف…','settings.costDashboard.disabledHint':- 'خزانة التكاليف معطلة في الدير مجموعة [xx0xx] مُمَكَّنَة = حقيقي في Xqx1x إلى re-enable.',+ 'لوحة معلومات التكلفة معطّلة في الإعدادات. اضبط [cost.dashboard] enabled = true في config.toml لإعادة تفعيلها.','settings.costDashboard.subtitle':'استخدام محلي لكل استدعاء للمزوّد. قد تكون التكاليف تقديرية؛ وتتم الفوترة المستضافة بشكل منفصل.','settings.costDashboard.summaryAriaLabel': 'القياسات الموجزة للتكاليف','settings.costDashboard.lastSevenDays': '7 أيام','settings.costDashboard.monthlyPaceHint':'الإنفاق الشهري المتوقع في المعدل اليومي الحالي (الساعة × 30).',- 'settings.costDashboard.todayBadge': 'TODAY',+ 'settings.costDashboard.todayBadge': 'اليوم','settings.costDashboard.unknownProvider': 'لا شيء','settings.costDashboard.justNow': 'الآن',- 'settings.costDashboard.secondsAgo': 'اكساكسوكس قبل',- 'settings.costDashboard.minutesAgo': 'Xqx0xx قبل',- 'settings.costDashboard.hoursAgo': 'Xqx0xx منذ ح',- 'settings.costDashboard.daysAgo': 'Xqx0xx قبل',- 'settings.costDashboard.updated': 'Updated',- 'settings.costDashboard.refresh': 'التجديد',- 'settings.costDashboard.utcNote': '"يوماً مربوطاً في "إكسكساكس',- 'settings.costDashboard.stackedNote': 'الناتج + الناتج',+ 'settings.costDashboard.secondsAgo': 'منذ {value} ث',+ 'settings.costDashboard.minutesAgo': 'منذ {value} د',+ 'settings.costDashboard.hoursAgo': 'منذ {value} س',+ 'settings.costDashboard.daysAgo': 'منذ {value} ي',+ 'settings.costDashboard.updated': 'تم التحديث',+ 'settings.costDashboard.refresh': 'تحديث',+ 'settings.costDashboard.utcNote': 'الأيام مجمّعة بتوقيت UTC',+ 'settings.costDashboard.stackedNote': 'المدخلات + المخرجات','settings.costDashboard.modelBreakdownHint': 'تم تجميعها خلال السبعة أيام الماضية','settings.costDashboard.usageLog': 'سجل الاستخدام','settings.costDashboard.usageLogHint': 'أحدث السجلات من آخر {days} يومًا، بحد أقصى {limit} صفًا.',@@ -1046,24 +1085,25 @@ const messages: TranslationMap = {'mcp.toolList.availableSingular': '{count} الأداة المتاحة','mcp.toolList.availablePlural': '{count} الأدوات المتاحة','mcp.toolList.tryTool': 'حاول',- 'mcp.toolList.tryToolAria': 'ملعب إعدام مفتوح',+ 'mcp.toolList.tryToolAria': 'فتح مساحة اختبار التنفيذ للأداة {name}','mcp.playground.title': 'تشغيل {name}','mcp.playground.inputSchema': 'مخطط الإدخال','mcp.playground.argsLabel': 'المعطيات (JSON)',- 'mcp.playground.argsHelp': 'نوع (إكسكساكس) مطابق للشيما Empty input is treated as {}.',+ 'mcp.playground.argsHelp':+ 'اكتب JSON مطابقًا لمخطط الإدخال (schema). يتم التعامل مع الإدخال الفارغ على أنه {}.','mcp.playground.runShortcut': '⌘/Ctrl + Enter للتشغيل','mcp.playground.format': 'الشكل','mcp.playground.invalidJson': 'JSON غير صالح','mcp.playground.run': 'تشغيل الأداة','mcp.playground.running': 'تشغيل...','mcp.playground.result': 'النتيجة',- 'mcp.playground.resultError': '(تول) أعاد الخطأ',- 'mcp.playground.copyResult': 'النتيجة',- 'mcp.playground.copied': 'Copied',+ 'mcp.playground.resultError': 'أعادت الأداة خطأً',+ 'mcp.playground.copyResult': 'نسخ النتيجة',+ 'mcp.playground.copied': 'تم النسخ','mcp.playground.history': 'التاريخ',- 'mcp.playground.historyEmpty': 'ولا توجد أية احتجاجات حتى الآن في هذه الدورة.',- 'mcp.playground.historyLoad': 'Load',- 'mcp.playground.unexpectedError': 'خطأ غير متوقع يستدعي أداة',+ 'mcp.playground.historyEmpty': 'لا توجد استدعاءات حتى الآن في هذه الجلسة.',+ 'mcp.playground.historyLoad': 'تحميل',+ 'mcp.playground.unexpectedError': 'خطأ غير متوقع أثناء استدعاء الأداة.','app.update.dismissNotification': 'تجاهل إشعار التحديث','bootCheck.rpcAuthSuffix': 'في كل RPC.','mobile.nav.ariaLabel': 'التنقل عبر الهاتف المحمول',@@ -1367,23 +1407,23 @@ const messages: TranslationMap = {'voice.providers.chip.cloud': 'OpenHuman (مُدار)','voice.providers.chip.cloudAria': 'موفر OpenHuman المُدار مُفعَّل دائماً','voice.providers.chip.piper': 'Piper (محلي)',- 'voice.providers.chip.enableProvider': 'Enable',- 'voice.providers.chip.disableProvider': 'Disable',+ 'voice.providers.chip.enableProvider': 'تفعيل',+ 'voice.providers.chip.disableProvider': 'تعطيل','voice.providers.chip.apiKeyLabel': 'مفتاح API','voice.providers.chip.apiKeyPlaceholder': 'sk-…','voice.providers.chip.comingSoon': 'قريباً',- 'voice.modal.title': 'Configure',+ 'voice.modal.title': 'تهيئة','voice.modal.desc': 'أدخل مفتاح API لتفعيل هذا الموفر. يمكنك اختبار الاتصال قبل الحفظ.','voice.modal.testKey': 'اختبار المفتاح','voice.modal.testing': 'جارٍ الاختبار…','voice.modal.saveAndEnable': 'حفظ وتفعيل',- 'voice.modal.enable': 'Enable',+ 'voice.modal.enable': 'تفعيل','voice.modal.piperDesc':'استخدم تثبيت Piper الخاص بك لتحويل النص إلى كلام محلياً. يعمل Piper بالكامل دون اتصال بالإنترنت وبزمن استجابة منخفض.','voice.routing.title': 'توجيه الصوت','voice.routing.desc':'اختر الموفرين المُفعَّلين الذين يتولون تحويل الكلام إلى نص والنص إلى كلام.',- 'voice.routing.save': 'Save',+ 'voice.routing.save': 'حفظ','voice.routing.testStt': 'اختبار STT','voice.routing.testTts': 'اختبار TTS','voice.routing.elevenlabsVoice': 'صوت ElevenLabs',@@ -1591,60 +1631,60 @@ const messages: TranslationMap = {'stats.latest': 'الأحدث','stats.sessions': 'الجلسات','stats.tokens': 'رموز',- 'bootCheck.invalidUrl': 'يرجى إدخال عنوان URL لبيئة التشغيل.',+ 'bootCheck.invalidUrl': 'يرجى إدخال عنوان.','bootCheck.urlMustStartWith': 'يجب أن يبدأ عنوان URL بـ http:// أو https://','bootCheck.validUrlRequired': 'لا يبدو أن هذا عنوان URL صالح (جرّب https://core.example.com/rpc)','bootCheck.tokenRequired': 'سنحتاج إلى رمز مصادقة للاتصال.','bootCheck.httpPublicWarning':'هذا عنوان HTTP عادي على مضيف عام: لن تكون حركة البيانات مشفّرة. استخدم HTTPS ما لم تكن تثق بهذه الشبكة.',- 'bootCheck.chooseCoreMode': 'اختر بيئة التشغيل',- 'bootCheck.connectToCore': 'اتصل ببيئة تشغيلك',- 'bootCheck.desktopDescription': 'يحتاج OpenHuman إلى بيئة تشغيل للعمل. اختر مكانها.',+ 'bootCheck.chooseCoreMode': 'أين تريد تشغيل OpenHuman؟',+ 'bootCheck.connectToCore': 'الاتصال بـ OpenHuman',+ 'bootCheck.desktopDescription':+ 'تعذّر تشغيل OpenHuman على هذا الكمبيوتر. اختر المكان الذي يجب أن يعمل فيه.','bootCheck.webDescription':- 'على الويب، يتصل OpenHuman ببيئة تشغيل تتحكم فيها. أدخل عنوان URL الخاص بها ورمز المصادقة أدناه، أو احصل على تطبيق سطح المكتب لتشغيلها مباشرة على جهازك.',+ 'على الويب، يتصل OpenHuman بخادم تتحكم فيه. أدخل عنوانه والرمز أدناه، أو نزّل تطبيق سطح المكتب لتشغيله مباشرةً على جهازك.','bootCheck.preferDesktop': 'تفضّل إبقاء كل شيء على جهازك؟','bootCheck.downloadDesktop': 'احصل على تطبيق سطح المكتب',- 'bootCheck.localRecommended': 'التشغيل محليًا (موصى به)',- 'bootCheck.localDescription':- 'يعمل مباشرة على جهازك. الأسرع، خصوصي تمامًا، لا شيء يحتاج إلى إعداد.',- 'bootCheck.cloudMode': 'التشغيل على السحابة (معقد)',+ 'bootCheck.localRecommended': 'على هذا الكمبيوتر',+ 'bootCheck.localDescription': 'الأسرع والأكثر خصوصية بالكامل، ولا يحتاج إلى أي إعداد.',+ 'bootCheck.cloudMode': 'على خادم أستضيفه بنفسي','bootCheck.cloudDescription':- 'الاتصال ببيئة تشغيل تستضيفها في مكان آخر. تبقى متصلة 24×7 حتى لا تحتاج إلى إبقاء هذا الجهاز يعمل.',- 'bootCheck.coreRpcUrl': 'عنوان URL لبيئة التشغيل',+ 'يبقى متصلاً على مدار الساعة، فلا حاجة لإبقاء هذا الكمبيوتر قيد التشغيل.',+ 'bootCheck.coreRpcUrl': 'العنوان','bootCheck.rpcUrlPlaceholder': 'https://core.example.com/rpc',- 'bootCheck.authToken': 'رمز المصادقة',- 'bootCheck.bearerTokenPlaceholder': 'رمز Bearer من بيئة تشغيلك البعيدة',+ 'bootCheck.authToken': 'الرمز',+ 'bootCheck.bearerTokenPlaceholder': 'الرمز الخاص بخادمك','bootCheck.storedLocally': 'يُحفظ على هذا الجهاز فقط. يُرسَل كـ ','bootCheck.testing': 'جارٍ الاختبار…','bootCheck.testConnection': 'اختبار الاتصال','bootCheck.connectedOk': 'متصل. أنت جاهز للانطلاق.','bootCheck.authFailed': 'الرمز لم ينجح. تحقق منه وحاول مرة أخرى.','bootCheck.unreachablePrefix': 'تعذّر الوصول إليه:',- 'bootCheck.checkingCore': 'جارٍ تنشيط بيئة تشغيلك…',- 'bootCheck.cannotReach': 'تعذّر الوصول إلى بيئة التشغيل',- 'bootCheck.cannotReachDesc': 'تعذّر الاتصال ببيئة تشغيلك. هل تريد تجربة بيئة مختلفة؟',- 'bootCheck.switchMode': 'اختر بيئة تشغيل مختلفة',+ 'bootCheck.checkingCore': 'جارٍ تشغيل OpenHuman…',+ 'bootCheck.cannotReach': 'تعذّر الوصول إليه',+ 'bootCheck.cannotReachDesc': 'تعذّر الاتصال. هل تريد المحاولة في مكان آخر؟',+ 'bootCheck.switchMode': 'تغيير مكان التشغيل','bootCheck.quit': 'خروج',- 'bootCheck.legacyDetected': 'تم اكتشاف بيئة تشغيل خلفية قديمة',+ 'bootCheck.legacyDetected': 'تم العثور على خدمة خلفية قديمة','bootCheck.legacyDescription':- 'خدمة OpenHuman مثبّتة بشكل منفصل تعمل بالفعل على هذا الجهاز. نحتاج إلى إزالتها قبل أن تتولى بيئة التشغيل المدمجة.',+ 'يوجد بالفعل برنامج خلفي لـ OpenHuman مثبّت بشكل منفصل ويعمل على هذا الجهاز. نحتاج إلى إزالته قبل أن تتولى النسخة المدمجة المهمة.','bootCheck.removing': 'جارٍ الإزالة…','bootCheck.removeContinue': 'إزالة ومتابعة',- 'bootCheck.localNeedsRestart': 'بيئة التشغيل المحلية تحتاج إلى إعادة تشغيل',+ 'bootCheck.localNeedsRestart': 'يحتاج OpenHuman إلى إعادة التشغيل','bootCheck.localNeedsRestartDesc':- 'بيئة تشغيلك المحلية على إصدار مختلف عن هذا التطبيق. ستعيد إعادة التشغيل السريعة مزامنتهما.',+ 'إصدار OpenHuman على هذا الكمبيوتر مختلف عن إصدار هذا التطبيق. ستعيدهما إعادة تشغيل سريعة إلى التزامن.','bootCheck.restarting': 'جارٍ إعادة التشغيل…',- 'bootCheck.restartCore': 'إعادة تشغيل بيئة التشغيل',- 'bootCheck.cloudNeedsUpdate': 'بيئة التشغيل السحابية تحتاج إلى تحديث',+ 'bootCheck.restartCore': 'إعادة التشغيل',+ 'bootCheck.cloudNeedsUpdate': 'يحتاج خادمك إلى تحديث','bootCheck.cloudNeedsUpdateDesc':- 'بيئة تشغيلك السحابية على إصدار مختلف عن هذا التطبيق. شغّل المحدّث لإعادة مزامنتهما.',+ 'إصدار خادمك مختلف عن إصدار هذا التطبيق. شغّل أداة التحديث لإعادتهما إلى التزامن.','bootCheck.updating': 'جارٍ التحديث…',- 'bootCheck.updateCloudCore': 'تحديث بيئة التشغيل السحابية',- 'bootCheck.versionCheckFailed': 'فشل التحقق من إصدار بيئة التشغيل',+ 'bootCheck.updateCloudCore': 'تحديث الخادم',+ 'bootCheck.versionCheckFailed': 'فشل التحقق من الإصدار','bootCheck.versionCheckFailedDesc':- 'بيئة تشغيلك تعمل لكنها لا تُبلّغ عن إصدارها. قد تكون قديمة. أعد تشغيلها أو حدّثها للمتابعة.',+ 'خادمك يعمل لكنه لا يبلّغ عن إصداره. قد يكون قديماً. أعد تشغيله أو حدّثه للمتابعة.','bootCheck.working': 'جارٍ العمل…',- 'bootCheck.restartUpdateCore': 'إعادة تشغيل / تحديث بيئة التشغيل',+ 'bootCheck.restartUpdateCore': 'إعادة التشغيل / التحديث','bootCheck.unexpectedError': 'خطأ غير متوقع في فحص بدء التشغيل','bootCheck.actionFailed': 'حدث خطأ ما. يرجى المحاولة مرة أخرى.','bootCheck.portConflictTitle': 'تعذّر تشغيل محرّك التطبيق',@@ -1842,7 +1882,7 @@ const messages: TranslationMap = {'chat.approval.error': 'لا يمكن تسجيل قرارك حاول مرة أخرى','chat.approval.fallback': 'العميل يريد القيام بعمل يحتاج إلى موافقتك','chat.approval.title': 'الموافقة المطلوبة',- 'chat.approval.tool': 'Tool:',+ 'chat.approval.tool': 'الأداة:','chat.approval.expiresIn': 'تنتهي الصلاحية بعد {time}','chat.elicitation.send': 'إرسال','chat.elicitation.decline': 'رفض',@@ -1922,10 +1962,10 @@ const messages: TranslationMap = {'channels.web.displayName': 'الويب','channels.web.description': 'الدردشة عبر واجهة مستخدم الويب المضمنة.','channels.web.authMode.managed_dm.description': 'استخدم دردشة الويب المضمنة - لا يلزم الإعداد.',- 'channels.yuanbao.connect': 'Connect',+ 'channels.yuanbao.connect': 'اتصال','channels.yuanbao.connecting': 'جارٍ الاتصال…','channels.yuanbao.fieldRequired': '{field} مطلوب',- 'channels.yuanbao.reconnect': 'Reconnect',+ 'channels.yuanbao.reconnect': 'إعادة الاتصال','channels.yuanbao.savedRestartRequired': 'تم حفظ القناة. أعد تشغيل التطبيق لتفعيلها.','channels.yuanbao.unexpectedStatus': 'حالة اتصال غير متوقعة: {status}','commandPalette.ariaLabel': 'لوحة الأوامر',@@ -2032,9 +2072,9 @@ const messages: TranslationMap = {'composio.connect.wabaIdHint':'احصل عليه عبر GET /me/businesses ثم GET /{business_id}/owned_whatsapp_business_accounts باستخدام رمز وصول Meta الخاص بك.','composio.connect.wabaIdLabel': 'تسمية معرف WABA',- 'composio.connect.atlassianSubdomainPlaceholder': 'your-subdomain',+ 'composio.connect.atlassianSubdomainPlaceholder': 'النطاق-الفرعي-الخاص-بك','composio.connect.dynamicsOrgNamePlaceholder': 'myorg',- 'composio.connect.wabaIdPlaceholder': 'e.g. 123456789012345',+ 'composio.connect.wabaIdPlaceholder': 'مثال: 123456789012345','composio.connect.waitingFor': 'بانتظار','composio.connect.waitingHint': 'تلميح الانتظار','composio.triggers.heading': 'المشغّلات',@@ -3070,12 +3110,12 @@ const messages: TranslationMap = {'settings.ai.apiKeyFieldLabel': 'تسمية حقل مفتاح API','settings.ai.apiKeyRequired': 'يرجى لصق مفتاح API للمتابعة.','settings.ai.apiKeyStoredEncrypted': 'مفتاح API محفوظ مشفّرًا',- 'settings.ai.apiKeysEncrypted': 'Xqx0xx',+ 'settings.ai.apiKeysEncrypted': 'مفاتيح API مشفّرة','settings.ai.clearStoredKey': 'مسح المفتاح المحفوظ','settings.ai.connectProvider': 'ربط مزود','settings.ai.customRouting': 'توجيه مخصص','settings.ai.discard': 'تجاهل',- 'settings.ai.editProvider': 'تعديل المزود',+ 'settings.ai.editProvider': 'تعديل {label}','settings.ai.llmProviders': 'مزودو LLM','settings.ai.providers.groupCloud': 'السحابة','settings.ai.providers.groupLocal': 'بيئات محلية',@@ -3189,7 +3229,7 @@ const messages: TranslationMap = {'settings.ai.topHours': 'أعلى الساعات','settings.ai.noHourlySpend': 'لا يوجد إنفاق بالساعة حتى الآن.','settings.ai.openhumanDefault': 'OpenHuman (افتراضي)',- 'settings.ai.localModelResolved': 'Xqx1xxxxxx',+ 'settings.ai.localModelResolved': 'Ollama · {model}','settings.ai.loadingModels': 'جارٍ تحميل النماذج...','settings.ai.enterModelIdManually': 'أو أدخل معرف النموذج يدويًا:','settings.ai.selectModel': 'حدد نموذجًا...',@@ -3247,7 +3287,7 @@ const messages: TranslationMap = {'settings.ai.slugReservedError': 'اختر اسم موفر مختلف.','settings.ai.providerNamePlaceholder': 'موفر الخدمة الخاص بي','settings.ai.slugLabel': 'الارتباط الثابت:',- 'settings.ai.openAiUrlLabel': 'Xqx1xxxxxxxxxxx',+ 'settings.ai.openAiUrlLabel': 'عنوان URL لـ OpenAI','settings.ai.openAiUrlPlaceholder': 'https://api.openai.com/v1','settings.ai.keepExistingKeyPlaceholder': 'اتركه فارغًا للاحتفاظ بالمفتاح الموجود','settings.ai.signInWithOpenRouter': 'قم بتسجيل الدخول باستخدام OpenRouter',@@ -3271,9 +3311,9 @@ const messages: TranslationMap = {'settings.ai.managedSourceDetail': 'مُدار بواسطة TinyHumans','settings.ai.routing.managedAlwaysOn': 'دائما على','settings.ai.routing.managedDesc':- '(Xqx0xx) سيحقق كل شيء في السحابة، ويختار أفضل نموذج للمهمة، ويرفع التكاليف إلى أقصى حد، ويحتفظ بأمن التخلف عن الدفع.',+ 'سيشغّل OpenHuman جميع عمليات الاستنتاج في السحابة، ويختار النموذج الأفضل للمهمة، ويحسّن التكاليف، ويحافظ على أكثر إعدادات التوجيه أماناً افتراضياً.','settings.ai.routing.managedMsg':- 'وسيتولى Xqx0xx معالجة جميع الإفادات المتعلقة بكل عبء عمل، ويختار تلقائيا أفضل طريق للتكاليف والجودة والأمن.',+ 'سيتولى OpenHuman معالجة جميع عمليات الاستنتاج لكل عبء عمل، ويختار تلقائياً أفضل مسار للتكلفة والجودة والأمان.','settings.ai.routing.useYourOwn': 'استخدم النماذج الخاصة بك','settings.ai.routing.useYourOwnDesc':'اختيار مقدم واحد + نموذج ودفع كل عبء عمل من خلاله. وهذا أمر بسيط، ولكن يمكن أن يكون غير فعال لأن الوزن الخفيف والوزن الثقيل يتقاسمان نفس الطريق.',@@ -3291,26 +3331,26 @@ const messages: TranslationMap = {'النماذج المستخدمة أثناء التفاعل المباشر للمستعملين، والردود، والتفسير، وحلقات العملاء، والمساعدة في التدوين.','settings.ai.routing.backgroundTasks': 'مهام الخلفية','settings.ai.routing.bgTasksDesc': 'النماذج المستخدمة خارج التدفق الرئيسي للمحادثات للتلخيص.',- 'settings.ai.routing.workload.chat.label': 'Chat',+ 'settings.ai.routing.workload.chat.label': 'المحادثة','settings.ai.routing.workload.chat.description':'المحادثة المباشرة ذهابًا وإيابًا: الوضع "السريع" في المحادثات','settings.ai.routing.workload.chat.hint':'موصى به: نموذج دردشة سريع رخيص أو متوسط التكلفة مع رموز مميزة عالية/ثانية وزمن وصول منخفض. يمكن للنماذج المحلية مفتوحة المصدر أن تعمل بشكل جيد هنا إذا شعرت بالاستجابة.',- 'settings.ai.routing.workload.reasoning.label': 'Reasoning',+ 'settings.ai.routing.workload.reasoning.label': 'التفكير المنطقي','settings.ai.routing.workload.reasoning.description':'وكيل الدردشة الرئيسي، ملخص الاجتماع: وضع "الاستدلال" في المحادثات','settings.ai.routing.workload.reasoning.hint':'موصى به: حدود أكثر تكلفة أو نموذج تفكير قوي للتفكير العميق. يتم استخدام هذا لوكيل الدردشة الرئيسي وملخصات الاجتماعات وتوليف الإجابات الأثقل.',- 'settings.ai.routing.workload.agentic.label': 'Agentic',+ 'settings.ai.routing.workload.agentic.label': 'الوكلاء','settings.ai.routing.workload.agentic.description':'مشغلو الوكيل الفرعي، وحلقات الأدوات، وقرارات GIF','settings.ai.routing.workload.agentic.hint':'موصى به: نموذج موثوق لمتابعة التعليمات مع استخدام قوي للأداة. عادةً ما تكون النماذج الحدودية متوسطة التكلفة هي الأكثر أمانًا؛ يمكن أن تعمل النماذج مفتوحة المصدر القادرة على العمل إذا كان استدعاء الأداة مستقرًا.',- 'settings.ai.routing.workload.coding.label': 'Coding',+ 'settings.ai.routing.workload.coding.label': 'البرمجة','settings.ai.routing.workload.coding.description': 'يمر إنشاء التعليمات البرمجية وإعادة البناء','settings.ai.routing.workload.coding.hint':'موصى به: نموذج تم ضبطه بالبرمجة مع اتباع تعليمات قوية، وجودة التحرير، وأداء السياق الطويل. وهذا عادة ما يستحق إنفاق المزيد عليه.',- 'settings.ai.routing.workload.vision.label': 'Vision',+ 'settings.ai.routing.workload.vision.label': 'الرؤية الحاسوبية','settings.ai.routing.workload.vision.description':'فهم الصورة للوكيل الفرعي للرؤية: متعدد الوسائط دائمًا','settings.ai.routing.workload.vision.hint':@@ -3373,6 +3413,8 @@ const messages: TranslationMap = {'تكاملاتك الحالية (Gmail، Slack، GitHub، إلخ المرتبطة عبر OpenHuman) لن تكون مرئية: فهي موجودة في مستأجر Composio المُدار من OpenHuman.','settings.composio.intro':'يُدمج Composio أكثر من 250 تطبيقًا خارجيًا كأدوات يمكن للوكيل استدعاؤها. اختر كيفية توجيه هذه الاستدعاءات.',+ 'settings.composio.directOnlyDesc':+ 'المصادقة المُدارة لـ Composio غير متاحة هنا. أدخل مفتاح API الخاص بك لـ Composio أو تخطَّ هذه الخطوة الآن.','settings.composio.modeDirect': 'مباشر (استخدم مفتاح API الخاص بك)','settings.composio.modeDirectDesc':'تذهب الاستدعاءات إلى backend.composio.dev مباشرةً. سيادي / مناسب للعمل دون اتصال. تنفيذ الأدوات يعمل بشكل متزامن؛ مشغّلات الـ webhooks الفورية لم تُوجَّه بعد في الوضع المباشر (مشكلة متابعة).',@@ -3452,12 +3494,12 @@ const messages: TranslationMap = {'تشغيل أي مهارة معبأة - ملء مدخلاته وإطلاق النار على خلفية مستقلة','settings.developerMenu.skillsRunner.panelDesc':'اختر مهارة معبأة، واملأ مدخلاتها المعلنة، وأطلق النار ونبات الخلفية. استخدم (ديف) بدلاً من ذلك إذا أردت وظيفة متكررة',- 'settings.skillsRunner.skill': 'Skill',+ 'settings.skillsRunner.skill': 'المهارة','settings.skillsRunner.selectSkill': 'اختيار مهارة...','settings.skillsRunner.loadingSkills': 'مهارات التعبئة','settings.skillsRunner.loadingDescription': 'مُدخلات مهارة التعبئة...','settings.skillsRunner.noInputs': 'هذه المهارة لا تعلن أي مدخلات',- 'settings.skillsRunner.placeholder.required': 'required',+ 'settings.skillsRunner.placeholder.required': 'مطلوب','settings.skillsRunner.runNow': 'اركض الآن','settings.skillsRunner.starting': 'بدء...','settings.skillsRunner.started': 'بدأت...',@@ -3498,14 +3540,14 @@ const messages: TranslationMap = {'settings.skillsRunner.repoPicker.loading': 'مستودعات التعبئة...','settings.skillsRunner.repoPicker.select': 'اختيار مستودع...','settings.skillsRunner.repoPicker.empty':- 'لم تُعاد أي مستودعات Connect GitHub via xqx1x to populate this list.',+ 'لم يتم العثور على أي مستودعات. اربط GitHub عبر Composio لملء هذه القائمة.','settings.skillsRunner.repoPicker.notConnected':'GitHub غير متصل عبر Composio. قم بتوصيله من خلال المهارات ← Composio أولًا.','settings.skillsRunner.repoPicker.privateTag': '(خاص)','settings.skillsRunner.branchPicker.needRepo': 'اختر مذكرة أولاً','settings.skillsRunner.branchPicker.loading': 'فروع التعبئة...','settings.skillsRunner.branchPicker.select': 'اختيار فرع...',- 'settings.devWorkflow.githubRepository': 'مخزن Xqx0xx',+ 'settings.devWorkflow.githubRepository': 'مستودع GitHub','settings.devWorkflow.loadingRepositories': 'مستودعات التعبئة...','settings.devWorkflow.selectRepository': 'اختيار مستودع','settings.devWorkflow.privateTag': '(خاص)',@@ -3514,7 +3556,7 @@ const messages: TranslationMap = {'settings.devWorkflow.upstream': 'أعلى النهر:','settings.devWorkflow.targetBranch': 'الفرع المستهدف','settings.devWorkflow.errorNotConnected':- 'اكساكسوكس ليس متصلاً يرجى ربط Xqx1xx عبر ستينغز تقدمت أولاً',+ 'GitHub غير متصل. يُرجى ربط GitHub عبر الإعدادات > متقدم > Composio أولاً.','settings.devWorkflow.errorNoRepositories': 'لا توجد مستودعات لهذا الحساب','settings.developerMenu.cronJobs.title': 'مهام Cron','settings.developerMenu.cronJobs.desc': 'عرض وتكوين المهام المجدولة لمهارات وقت التشغيل',@@ -3569,13 +3611,13 @@ const messages: TranslationMap = {'settings.mcpServer.configFilePath': 'ملف التكوين','settings.mcpServer.clientSelectorAriaLabel': 'MCP محدد العميل','settings.appearance.menuDesc': 'اختر الفاتح أو الداكن أو مطابقة سمة النظام',- 'settings.agentAccess.title': 'الوكيل OS وصول',+ 'settings.agentAccess.title': 'وصول الوكيل لنظام التشغيل (OS)','settings.agentAccess.menuDesc': 'التحكم في المكان الذي يمكن فيه للوكيل أن يستخدم القذيفة',- 'settings.agentAccess.loadError': 'فشل في تحديد مواقع الدخول',- 'settings.agentAccess.saveError': 'عدم توفير أماكن الوصول',- 'settings.agentAccess.saved': 'منقذ - ينطبق على رسالتك القادمة.',- 'settings.agentAccess.loading': 'التعبئة...',- 'settings.agentAccess.defaultTag': '(عجز)',+ 'settings.agentAccess.loadError': 'فشل في تحميل إعدادات الوصول',+ 'settings.agentAccess.saveError': 'فشل في حفظ إعدادات الوصول',+ 'settings.agentAccess.saved': 'تم الحفظ - ينطبق على رسالتك القادمة.',+ 'settings.agentAccess.loading': 'جارٍ التحميل...',+ 'settings.agentAccess.defaultTag': '(افتراضي)','settings.agentAccess.fullWarning':'الدخول الكامل يُديرُ الأوامرَ بوصولِ حسابِكَ الكاملِ وهو لَيسَ مُربّطَ رملَ. فقط قم بتمكينها عندما تضغطين على العميل بهذه الآلة ولا تزال الأدلة الإبداعية والنظامية مجمدة، وما زالت أعمال التدمير والشبكات والتركيب تتطلب الموافقة.','settings.agentAccess.confine.label': 'مقصورة على مكان العمل',@@ -3591,7 +3633,7 @@ const messages: TranslationMap = {'settings.agentAccess.timeout.invalid': 'أدخل عدداً صحيحاً من الثواني ضمن النطاق المسموح به','settings.agentAccess.timeout.envOverride':'متغير البيئة OPENHUMAN_TOOL_TIMEOUT_SECS يتجاوز هذا الإعداد، لذا لن يكون للتغييرات هنا أي تأثير حتى يتم إلغاء ضبطه.',- 'settings.agentAccess.grantedFolders': 'الملفات الممنوحة',+ 'settings.agentAccess.grantedFolders': 'المجلدات الممنوحة','settings.agentAccess.filesFolder.label': 'مجلد الملفات','settings.agentAccess.filesFolder.desc':'المكان الذي تُحفظ فيه الملفات التي ينشئها الوكيل، مثل العروض التقديمية والمستندات والصور ومقاطع الفيديو. يسري التغيير على الملفات الجديدة؛ وتبقى الملفات الحالية في مكانها.',@@ -3601,20 +3643,20 @@ const messages: TranslationMap = {'settings.agentAccess.filesFolder.loadError': 'تعذّر تحميل مجلد الملفات.','settings.agentAccess.filesFolder.open': 'إظهار في المجلد','settings.agentAccess.filesFolder.openError': 'تعذّر فتح مجلد الملفات.',- 'settings.agentAccess.alwaysAllow': 'الأدوات المتدنية دائما',+ 'settings.agentAccess.alwaysAllow': 'الأدوات المسموح بها دائمًا','settings.agentAccess.alwaysAllowDesc':'الأدوات التي وضعت علامة "الطرق تسمح" في الدردشة دون أن تسأل. أزيلي واحدة ليتم دفعها مجدداً',- 'settings.agentAccess.alwaysAllowNone': 'لا أدوات متدنية دائماً حتى الآن',+ 'settings.agentAccess.alwaysAllowNone': 'لا توجد أدوات مسموح بها دائمًا حتى الآن.','settings.agentAccess.grantedDesc':- 'يُرجى من العميل القراءة والكتابة، بالإضافة إلى مكان العمل. وتُحجب دائماً المخازن الإبداعية (Assh و///.gnupg و/.aws, keychains) ودليل النظام (/etc, /System, C:/ xqx0xx,...) حتى داخل ملف مُنح.',- 'settings.agentAccess.noneGranted': 'لم تُمنح الملفات',- 'settings.agentAccess.readWrite': 'يصبح نصها كما يلي:',- 'settings.agentAccess.readOnly': 'القراءة فقط',- 'settings.agentAccess.remove': 'إزالة الألغام',+ 'المجلدات التي يمكن للوكيل قراءتها والكتابة فيها، بالإضافة إلى مساحة العمل. مخازن بيانات الاعتماد (~/.ssh و ~/.gnupg و ~/.aws وسلاسل المفاتيح) وأدلة النظام (/etc و /System و C:\\Windows و…) محظورة دائماً، حتى داخل مجلد مسموح به.',+ 'settings.agentAccess.noneGranted': 'لم يتم منح أي مجلدات.',+ 'settings.agentAccess.readWrite': 'قراءة + كتابة',+ 'settings.agentAccess.readOnly': 'قراءة فقط',+ 'settings.agentAccess.remove': 'إزالة','settings.agentAccess.pathPlaceholder': 'المسار المطلق للمجلد','settings.agentAccess.accessLevelLabel': 'مستوى الوصول',- 'settings.agentAccess.add': 'مضاف',- 'settings.agentAccess.saving': 'إنقاذ...',+ 'settings.agentAccess.add': 'إضافة',+ 'settings.agentAccess.saving': 'جارٍ الحفظ...','settings.agentAccess.actionSandbox': 'صندوق الإجراءات','settings.agentAccess.readWriteAccess': 'قراءة + كتابة','settings.agentAccess.actionSandboxDesc': 'دليل العمل الافتراضي لأدوات الطرفية والملفات وgit.',@@ -3664,9 +3706,9 @@ const messages: TranslationMap = {'settings.sandbox.enableDesc': 'تشغيل أدوات الوكيل داخل بيئة Sandbox معزولة.','settings.sandbox.backendLabel': 'الخلفية','settings.sandbox.backendDesc': 'اختر خلفية العزل المستخدمة للتنفيذ داخل Sandbox.',- 'settings.sandbox.backend.landlock': 'Landlock (Linux)',- 'settings.sandbox.backend.firejail': 'Firejail (Linux)',- 'settings.sandbox.backend.bubblewrap': 'Bubblewrap (Linux)',+ 'settings.sandbox.backend.landlock': 'Landlock (لينكس)',+ 'settings.sandbox.backend.firejail': 'Firejail (لينكس)',+ 'settings.sandbox.backend.bubblewrap': 'Bubblewrap (لينكس)','settings.sandbox.dockerSettings': 'إعدادات Docker','settings.sandbox.dockerImage': 'الصورة','settings.sandbox.dockerImagePlaceholder': 'alpine:3.20',@@ -3812,12 +3854,12 @@ const messages: TranslationMap = {'settings.persona.displayNameLabel': 'اسم التلاعب','settings.persona.displayNamePlaceholder': 'e.g','settings.persona.descriptionLabel': 'الوصف',- 'settings.persona.descriptionPlaceholder': 'Xqx0xx. مساعد هادئ ومختصر لفريقي',+ 'settings.persona.descriptionPlaceholder': 'مثال: مساعد هادئ وموجز لفريقي.','settings.persona.soul.editorLabel': 'SOUL','settings.persona.soul.reset': 'إعادة إلى الافتراضي','settings.persona.soul.usingDefault': 'باستخدام الخزنة',- 'settings.persona.soul.saveError': 'لا يُمكنُ أَنْ يَوفّرَ Xqx0xxx',- 'settings.persona.soul.resetError': 'لا يمكن إعادة تشغيل Xqx0xx',+ 'settings.persona.soul.saveError': 'تعذر حفظ SOUL.md',+ 'settings.persona.soul.resetError': 'تعذر إعادة تعيين SOUL.md','settings.persona.builder.modeLabel': 'وضع محرر الشخصية','settings.persona.builder.modeGuided': 'موجّه','settings.persona.builder.modeAdvanced': 'متقدّم',@@ -3868,7 +3910,7 @@ const messages: TranslationMap = {'skills.create.description': 'الوصف','skills.create.descriptionPlaceholder': 'ما الذي تفعله هذه المهارة؟','skills.create.optional': '(اختياري)',- 'skills.create.inputs.heading': 'Inputs',+ 'skills.create.inputs.heading': 'المدخلات','skills.create.inputs.help':'أعلن عن المعاملات التي تحتاجها المهارة. سيعرض تشغيل المهارات نموذجاً لهذه المعاملات عند التشغيل.','skills.create.inputs.add': 'إضافة إدخال',@@ -3878,11 +3920,11 @@ const messages: TranslationMap = {'الأحرف والأرقام والشرطات السفلية والشرطات فقط؛ يجب أن يبدأ بحرف.','skills.create.inputs.row.description': 'وصف الإدخال','skills.create.inputs.row.descriptionPlaceholder': 'ما الذي يذهب في هذا الحقل؟',- 'skills.create.inputs.row.type': 'Type',- 'skills.create.inputs.row.required': 'Required',+ 'skills.create.inputs.row.type': 'النوع',+ 'skills.create.inputs.row.required': 'مطلوب','skills.create.inputs.row.remove': 'حذف الإدخال',- 'skills.create.inputs.type.string': 'Text',- 'skills.create.inputs.type.integer': 'Number',+ 'skills.create.inputs.type.string': 'نص',+ 'skills.create.inputs.type.integer': 'رقم','skills.create.inputs.type.boolean': 'نعم / لا','skills.create.license': 'الترخيص','skills.create.licensePlaceholder': 'MIT',@@ -4058,9 +4100,9 @@ const messages: TranslationMap = {'walletBalances.colAddress': 'العنوان','walletBalances.colBalance': 'الرصيد','walletBalances.colActions': 'إجراءات',- 'walletBalances.refresh': 'Refresh',+ 'walletBalances.refresh': 'تحديث','walletBalances.loading': 'جارٍ تحميل الأرصدة…',- 'walletBalances.retry': 'Retry',+ 'walletBalances.retry': 'إعادة المحاولة','walletBalances.emptyState': 'لا توجد حسابات محفظة بعد: أعدّ محفظة في عبارة الاسترداد.','walletBalances.copyAddress': 'نسخ العنوان','walletBalances.providerMissing': 'الموفر غير متاح',@@ -4140,7 +4182,7 @@ const messages: TranslationMap = {'chat.files.error.download_failed': 'فشل التنزيل. حاول مرة أخرى.','chat.files.error.delete_failed': 'تعذّر حذف الملف. حاول مرة أخرى.','chat.files.error.reveal_failed': 'تعذّر عرض الملف. ربما نُقل أو حُذف خارج OpenHuman.',- 'memory.tab.council': 'Council',+ 'memory.tab.council': 'المجلس','activity.tabs.automations': 'أتمتة','activity.tabs.automationsDescription':'إجراءات قابلة لإعادة الاستخدام والتشغيل: هدف مع الخطوات للوصول إليه.',@@ -4285,15 +4327,18 @@ const messages: TranslationMap = {// Monthly cost badge- 'onboarding.custom.vault.title': 'إعداد الذاكرة والخزينة',+ 'onboarding.custom.vault.title': 'امنح OpenHuman ذاكرة','onboarding.custom.vault.subtitle':- 'تأكيد موضع كتابة ملاحظات الذاكرة، وكيفية قراءة البيانات المصدر، وسلامة مسار الخزينة.',+ 'المكان الذي يُحفظ فيه ما تخبره به، ليبقى حاضرًا عبر المحادثات.','onboarding.custom.vault.defaultDesc':'استخدم الإعدادات الافتراضية لذاكرة OpenHuman المُدارة. يمكن مراجعة مسار الخزينة وصحة المزامنة لاحقًا.','onboarding.custom.vault.configureDesc':'راجع ملكية الخزينة، وشغّل فحوصات الصحة، واضبط عناصر التحكم في الذاكرة الآن.','onboarding.custom.vault.localDisabledReason':'يتطلب الإعداد المُدار تسجيل الدخول إلى OpenHuman وغير متاح في الوضع المحلي.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'يتطلب الإعداد المُدار حساب OpenHuman. في الجلسة المحلية تقوم بإعداد كل خدمة بنفسك.',+ 'onboarding.custom.unsavedChanges': 'احفظ تغييراتك قبل المتابعة.','onboarding.custom.vault.exitError': 'تعذّر إتمام الإعداد. يُرجى المحاولة مجددًا.','skills.create.whenToUse': 'متى يُستخدم','skills.create.whenToUsePlaceholder': 'مثال: عندما يطلب المستخدم تنظيم صندوق الوارد',@@ -4609,7 +4654,7 @@ const messages: TranslationMap = {'migration.vendor.hermesDesc': 'المذكرات والملاحظات الواردة من Hermes','migration.sourceHeadingDesc': 'اختر المساعد للاستيراد من','migration.confirmTitle': 'استيراد إلى مكان العمل هذا؟',- 'skills.explorer.runnerTab': 'Runner',+ 'skills.explorer.runnerTab': 'المشغّل','desktop.enableLabel': 'دع العميل يتحكم في تطبيقات','desktop.statusSetupNeeded': 'الإنشاءات اللازمة','desktop.permissionState.granted': 'منح',@@ -4653,14 +4698,14 @@ const messages: TranslationMap = {'settings.ai.routing.columnRoute': 'تشغيل على','settings.ai.routing.selectProvider': 'مورد مختار ونموذج','settings.ai.routing.chooseModel': 'اختيار نموذج',- 'settings.composio.statusDirect': 'Direct',+ 'settings.composio.statusDirect': 'مباشر','settings.cron.jobs.columnJob': 'وظيفة(ب)','settings.cron.jobs.columnState': 'الدولة','settings.cron.jobs.searchPlaceholder': 'وظائف البحث...','settings.developerMenu.eventLog.column.time': 'الوقت','settings.developerMenu.eventLog.column.event': 'الحدث',- 'settings.agentAccess.group.approvals': 'الموافقة',- 'settings.agentAccess.group.fileSystem': 'نظام التمويل',+ 'settings.agentAccess.group.approvals': 'الموافقات',+ 'settings.agentAccess.group.fileSystem': 'نظام الملفات','settings.agentAccess.group.limits': 'الحدود','settings.agentAccess.toolFormat.label': 'تنسيق استدعاء الأدوات','settings.agentAccess.toolFormat.desc':@@ -4683,7 +4728,7 @@ const messages: TranslationMap = {'settings.sandbox.backendHint.firejail': 'سجن العمليات المسروقة','settings.sandbox.backendHint.bubblewrap': 'أماكن أسماء مستخدمي الوزن الخفيف','settings.sandbox.backendHint.none': 'تشغيل الأدوات مباشرة، موحدة',- 'settings.sandbox.linuxTag': 'Linux',+ 'settings.sandbox.linuxTag': 'لينكس','settings.sandbox.dockerImageDesc': 'أدوات تصوير الحاويات تعمل','settings.sandbox.limitBlankHint': 'اترك فارغاً بدون حدود','settings.approvalHistory.tableTitle': 'المقررات',@@ -4704,7 +4749,7 @@ const messages: TranslationMap = {'settings.persona.templates.custom.desc': 'خليطك الخاص: حرر الحقول تحت','walletBalances.tableTitle': 'الأرصدة','walletBalances.searchPlaceholder': 'ابحث عن شبكة أو عنوان',- 'settings.keychain.title': 'Keychain',+ 'settings.keychain.title': 'سلسلة المفاتيح','attachment.previewAlt': 'عرض موجز','attachment.imagePreviewTitle': 'لمحة عن الصور','attachment.addAria': 'ملحق',@@ -4722,8 +4767,8 @@ const messages: TranslationMap = {'messageTiming.firstToken': 'أولاً','messageTiming.speed': 'السرعة','messageTiming.tokensPerSecond': '{value} رمز في الثانية',- 'messageTiming.chunks': 'Chunks',- 'quote.label': 'Quote',+ 'messageTiming.chunks': 'الأجزاء',+ 'quote.label': 'اقتباس','quote.dismiss': 'إزالة الاقتباس','assistantUi.threadList.searchThreads': 'البحث عن خيوط','assistantUi.threadList.noThreadsFound': 'لا يوجد خيوط',@@ -4753,6 +4798,8 @@ const messages: TranslationMap = {'انتهت صلاحية جلسة Codex الخاصة بك. يُرجى إعادة ربطها من الإعدادات ← التكاملات.','chat_error.session_expired':'انتهت صلاحية جلسة OpenHuman الخاصة بك. يُرجى تسجيل الدخول مرة أخرى للمتابعة.',+ 'chat_error.local_session_managed_unavailable':+ 'أنت تستخدم الملف الشخصي المحلي غير المتصل، وليس له حساب OpenHuman، لذلك لا يمكن تشغيل النموذج المُدار (السحابي). سجّل الدخول لاستخدام النماذج المُدارة، أو غيّر التوجيه إلى "استخدم النماذج الخاصة بك" في الاتصالات ← مفاتيح API ← LLM وأضف مزوّدك الخاص.','chat_error.action_budget':'لقد بلغت حد الإجراءات في الساعة لدى OpenHuman. هذا حد أمان محلي وليس من مزوّد الذكاء الاصطناعي لديك. يتعافى الحد تدريجيًا؛ يمكنك متابعة المحادثة في هذا الموضوع وستُستأنف الخطوات الكثيفة الاستخدام للأدوات مع تجدد الحد.','chat_error.max_iterations':@@ -4884,29 +4931,48 @@ const messages: TranslationMap = {'memoryPage.meta.url': 'رابط','memoryPage.off.title': 'الذاكرة متوقفة','memoryPage.off.description':- 'اختر محرّك ذاكرة لبدء التذكّر. سجّل الدخول لاستخدام ذاكرة TinyHumans، أو اربط CortexDB الخاص بك.',+ 'اربط CortexDB لبدء التذكّر. سجّل الدخول لاستخدام CortexDB المدمج، أو اتصل بمفتاح API الخاص بك أو بخادم على هذا الكمبيوتر.','memoryPage.off.action': 'اختر محرّكًا',- 'memoryPage.engine.listTitle': 'محرّكات الذاكرة',+ 'memoryPage.engine.listTitle': 'ذاكرة CortexDB','memoryPage.engine.listDescription':- 'يعمل محرّك واحد فقط في كل مرة. فهو يخزّن كل ما تحتفظ به الذاكرة ويجيب عن الأسئلة المتعلقة به.',- 'memoryPage.engine.loadError': 'تعذّر تحميل محرّكات الذاكرة',+ 'تعمل الذاكرة على CortexDB. اختر طريقة اتصال هذا التطبيق بها. يكون اتصال واحد فقط نشطًا في كل مرة.','memoryPage.engine.offExplanation':- 'لا يوجد حاليًا أي محرّك ذاكرة صالح للاستخدام، لذلك لا يتم تخزين أو استرجاع أي شيء. سجّل الدخول لاستخدام ذاكرة TinyHumans، أو اربط CortexDB الخاص بك باستخدام نقطة نهاية ومفتاح API.',+ 'لا يوجد حاليًا اتصال ذاكرة قابل للاستخدام، لذلك لا يُحفظ أو يُستدعى أي شيء. سجّل الدخول لاستخدام CortexDB المدمج، أو اربط CortexDB بمفتاح API الخاص بك أو على هذا الكمبيوتر.','memoryPage.engine.statusDegraded': 'أداء الذاكرة متدهور','memoryPage.engine.statusDown': 'تعذّر الوصول إلى محرّك الذاكرة','memoryPage.engine.statusOff': 'متوقف','memoryPage.engine.active': 'نشط','memoryPage.engine.use': 'استخدام',- 'memoryPage.engine.edit': 'تعديل',- 'memoryPage.engine.signInRequired': 'يلزم تسجيل الدخول',- 'memoryPage.engine.hostedDetail': 'مستضاف لدى TinyHumans',- 'memoryPage.engine.selfHostedDetail': 'نقطة النهاية ومفتاح API الخاصان بك',- 'memoryPage.engine.connectTitle': 'ربط {engine}','memoryPage.engine.connect': 'ربط','memoryPage.engine.endpoint': 'نقطة النهاية','memoryPage.engine.apiKey': 'مفتاح API','memoryPage.engine.keySavedPlaceholder': 'تم الحفظ. أدخل مفتاحًا جديدًا لاستبداله','memoryPage.engine.keySavedHint': 'يوجد مفتاح محفوظ بالفعل. اترك هذا الحقل فارغًا للاحتفاظ به.',+ 'memoryPage.engine.badgeDegraded': 'أداء منخفض',+ 'memoryPage.engine.badgeDown': 'يتعذّر الوصول',+ 'memoryPage.engine.connecting': 'جارٍ الاتصال…',+ 'memoryPage.engine.save': 'حفظ',+ 'memoryPage.engine.builtin.title': 'CortexDB المدمج',+ 'memoryPage.engine.builtin.detail': 'مضمّن في حساب TinyHumans الخاص بك',+ 'memoryPage.engine.builtin.signInRequired': 'سجّل الدخول للاستخدام',+ 'memoryPage.engine.builtin.description':+ 'CortexDB تستضيفه TinyHumans ومضمّن في حسابك. سجّل الدخول لاستخدامه؛ لا شيء لإعداده.',+ 'memoryPage.engine.builtin.enrichmentNote':+ 'تُحفظ الذكريات الجديدة فورًا. وتكتمل الحقائق والمعتقدات المستخلصة منها خلال الدقائق التالية.',+ 'memoryPage.engine.builtin.signInHint':+ 'سجّل الدخول إلى حساب TinyHumans لاستخدام CortexDB المدمج.',+ 'memoryPage.engine.apiKeyOption.title': 'CortexDB بمفتاح API الخاص بك',+ 'memoryPage.engine.apiKeyOption.description':+ 'استخدم حساب CortexDB الخاص بك. يُخزَّن المفتاح بأمان على هذا الكمبيوتر، ولا يُحفظ أبدًا في ملف الإعدادات.',+ 'memoryPage.engine.selfHost.title': 'استضافة CortexDB بنفسك',+ 'memoryPage.engine.selfHost.detail': 'خادم CortexDB على هذا الكمبيوتر',+ 'memoryPage.engine.selfHost.step1': 'شغّل خادم CortexDB على هذا الكمبيوتر باتباع الدليل:',+ 'memoryPage.engine.selfHost.docsLink': 'دليل الاستضافة الذاتية لـ CortexDB',+ 'memoryPage.engine.selfHost.step2':+ 'شغّل الخادم بمفتاح API (CORTEX_API_KEY). يتصل التطبيق بهذا المفتاح.',+ 'memoryPage.engine.selfHost.step3': 'أدخل العنوان المحلي للخادم والمفتاح أدناه، ثم اتصل.',+ 'memoryPage.engine.selfHost.notLocal':+ 'الاستضافة الذاتية محلية فقط. استخدم عنوانًا على هذا الكمبيوتر، مثل http://localhost:3141.','memoryPage.ask.questionLabel': 'سؤالك','memoryPage.ask.queryLabel': 'استعلام البحث','memoryPage.ask.placeholder': 'ماذا قررنا بشأن خطة الإطلاق؟',@@ -4937,6 +5003,8 @@ const messages: TranslationMap = {'memoryPage.learnings.listTitle': 'المعلومات المكتسبة','memoryPage.learnings.empty':'لا توجد معلومات مكتسبة بعد. أضف واحدة أعلاه، أو سيضيفها وكيلك أثناء عمله معك.',+ 'memoryPage.learnings.deriving':+ 'لا شيء هنا بعد. لا تزال الذاكرة تبني المعتقدات من محادثاتك الأخيرة؛ ستظهر هنا بعد التشغيل التالي في الخلفية.','memoryPage.learnings.delete': 'حذف المعلومة','memoryPage.conversations.turns': '{count} أدوار','memoryPage.documents.listDescription': 'تُبقيها الذاكرة متزامنة وتجيب اعتمادًا على محتواها.',@@ -5108,6 +5176,7 @@ const messages: TranslationMap = {'memoryPage.import.running': 'جارٍ استيراد الذاكرة السابقة…','memoryPage.import.done': 'تم استيراد الذاكرة السابقة','memoryPage.import.failed': 'فشل الاستيراد',+ 'memoryPage.import.resume': 'استئناف الاستيراد','memoryPage.import.progress': 'تم استيراد {imported} من {total} عنصر',// Live voice agents'voice.live.mute': 'كتم الميكروفون',diff --git a/app/src/lib/i18n/bn.ts b/app/src/lib/i18n/bn.tsindex 84d70980ee..d8d3f2daf9 100644--- a/app/src/lib/i18n/bn.ts+++ b/app/src/lib/i18n/bn.ts@@ -433,6 +433,35 @@ const messages: TranslationMap = {'welcome.privacyPolicy': 'গোপনীয়তা নীতি','welcome.termsOutro': '.','welcome.connect': 'পরীক্ষা করুন',+ 'welcome.hero.subtitle': 'আপনার AI, স্মৃতি, কণ্ঠস্বর আর পুরো ওয়েব নিয়ে।',+ 'welcome.th.title': 'TinyHumans দিয়ে চালিয়ে যান',+ 'welcome.th.promise': 'একটি অ্যাকাউন্ট। সবকিছু অন্তর্ভুক্ত। কনফিগার করার কিছু নেই।',+ 'welcome.th.featureInference': 'ইনফারেন্স',+ 'welcome.th.featureSearch': 'ওয়েব সার্চ',+ 'welcome.th.featureVoice': 'ভয়েস',+ 'welcome.th.featureMemory': 'মেমরি',+ 'welcome.th.featureEmbeddings': 'এমবেডিং',+ 'welcome.th.featureBilling': 'বিলিং',+ 'welcome.th.credit': 'শুরুতে $5 ক্রেডিট',+ 'welcome.th.cta': 'TinyHumans দিয়ে চালিয়ে যান',+ 'welcome.th.providers': 'Google, GitHub বা X দিয়ে সাইন ইন করুন',+ 'welcome.self.title': 'আমি নিজেই সেট আপ করব',+ 'welcome.self.promise': 'নিজের API কী ও এন্ডপয়েন্ট নিয়ে আসুন।',+ 'welcome.self.listLabel': 'আপনি সেট আপ করবেন:',+ 'welcome.self.step1': 'ইনফারেন্স',+ 'welcome.self.step2': 'ওয়েব সার্চ',+ 'welcome.self.step3': 'মেমরি',+ 'welcome.self.time': 'প্রায় ৩ মিনিট। পরে সেটিংসে গিয়ে যেকোনো কিছু বদলাতে পারবেন।',+ 'welcome.self.cta': 'আমি নিজেই সেট আপ করব',+ 'welcome.serverPrompt': 'ইতিমধ্যে কোনো সার্ভারে OpenHuman চালাচ্ছেন?',+ 'welcome.serverCta': 'সেটির সাথে সংযুক্ত হন।',+ 'welcome.handoff.title': 'আপনার ব্রাউজারে সাইন-ইন শেষ হচ্ছে',+ 'welcome.handoff.body': 'আমরা tinyhumans.ai খুলেছি। শেষ হলে ফিরে আসুন।',+ 'welcome.handoff.reopen': 'পেজটি আবার খুলুন',+ 'welcome.handoff.failedTitle': 'সাইন-ইন ফিরে আসেনি',+ 'welcome.handoff.failedBody': 'ব্রাউজার হয়তো OpenHuman-এ ফেরা আটকে দিয়েছে।',+ 'welcome.handoff.retry': 'আবার চেষ্টা করুন',+ 'welcome.handoff.fallbackSelf': 'বরং আমি নিজেই সেট আপ করব','home.askAssistant': 'আপনার অ্যাসিস্ট্যান্টকে যেকোনো কিছু জিজ্ঞেস করুন...','home.statusOk': 'আপনার সহকারী প্রস্তুত। শুরু করতে নিচে কিছু লিখুন।','home.statusBackendOnly': 'ব্যাকএন্ডে পুনরায় সংযোগ হচ্ছে… আপনার এজেন্ট শীঘ্রই আবার পাওয়া যাবে।',@@ -663,6 +692,12 @@ const messages: TranslationMap = {'memory.noResults': 'কোনো মেমোরি পাওয়া যায়নি','memory.empty':'এখনো কোনো মেমোরি নেই। আপনি যত ইন্টারঅ্যাক্ট করবেন, মেমোরি স্বয়ংক্রিয়ভাবে তৈরি হবে।',+ 'memory.error.insufficientCredits':+ 'মেমরি উপলব্ধ নয়: আপনার অ্যাকাউন্টের ক্রেডিট শেষ। ফিরিয়ে আনতে টপ আপ করুন; সংরক্ষিত কিছুই হারায়নি।',+ 'memory.error.unavailable':+ 'এই মুহূর্তে মেমরিতে পৌঁছানো যাচ্ছে না। সংরক্ষিত কিছুই হারায়নি; একটু পরে আবার চেষ্টা করুন।',+ 'memory.outOfCredits.title': 'ক্রেডিট শেষ',+ 'memory.outOfCredits.action': 'টপ আপ করুন','memory.tab.memory': 'মেমোরি','memory.tab.agents': 'লাইব্রেরি','memory.analyzeNow': 'এখনই বিশ্লেষণ করুন',@@ -744,9 +779,9 @@ const messages: TranslationMap = {'onboarding.custom.configureLater':'অনবোর্ডিং শেষে এটি কনফিগার করতে পারবেন। সম্পন্ন হলে সংশ্লিষ্ট সেটিংস পেজে নিয়ে যাওয়া হবে।','onboarding.custom.openSettings': 'সেটিংসে খুলুন',- 'onboarding.custom.inference.title': 'ইনফারেন্স (টেক্সট)',+ 'onboarding.custom.inference.title': 'একটি মডেল প্রোভাইডার বেছে নিন','onboarding.custom.inference.subtitle':- 'কোন ল্যাঙ্গুয়েজ মডেল আপনার প্রশ্নের উত্তর দেবে এবং এজেন্ট চালাবে?',+ 'OpenHuman-এর চিন্তা করতে একটি মডেল দরকার। আপনি ইতিমধ্যে যে প্রোভাইডার ব্যবহার করেন তার একটি কী যোগ করুন, অথবা লোকালি চলা কোনো মডেলের দিকে নির্দেশ করুন।','onboarding.custom.inference.defaultDesc':'OpenHuman প্রতিটি ওয়ার্কলোড একটি সেন্সিবল ডিফল্ট মডেলে রুট করে। কোনো কী বা সেটআপ নেই।','onboarding.custom.inference.configureDesc':@@ -764,12 +799,17 @@ const messages: TranslationMap = {'OpenHuman একটি ম্যানেজড Composio ওয়ার্কস্পেস চালায়। পরে প্রতিটি সার্ভিস সংযুক্ত করতে এক ক্লিক।','onboarding.custom.oauth.configureDesc':'নিজের Composio অ্যাকাউন্ট / API কী আনুন। Settings › Connections-এ কনফিগার করুন।',- 'onboarding.custom.search.title': 'ওয়েব সার্চ',- 'onboarding.custom.search.subtitle': 'OpenHuman আপনার হয়ে কীভাবে ওয়েব সার্চ করে।',+ 'onboarding.custom.search.title': 'OpenHuman-কে ওয়েব সার্চ করতে দিন',+ 'onboarding.custom.search.subtitle':+ 'এটি ছাড়া OpenHuman শুধু তাই জানে যা দিয়ে তাকে প্রশিক্ষণ দেওয়া হয়েছে।','onboarding.custom.search.defaultDesc':'ওয়েব সার্চ সঙ্গে সঙ্গে কাজ করে: Exa ও Gemini, TinyHumans-এ অন্তর্ভুক্ত, কোনো API কী লাগে না।','onboarding.custom.search.configureDesc':'Exa ও Gemini অন্তর্ভুক্ত। সেটিংস › টুলস-এ নিজের API কী দিয়ে আরও সার্চ প্রদানকারী যোগ করুন।',+ 'onboarding.custom.search.skipForNow': 'আপাতত এড়িয়ে যান',+ 'onboarding.custom.search.ready': 'ওয়েব সার্চ প্রস্তুত।',+ 'onboarding.custom.search.notReady':+ 'নিচে একটি প্রদানকারী যোগ করুন, যাতে OpenHuman ওয়েবে সার্চ করতে পারে।','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'OpenHuman কীভাবে সিমান্টিক মেমোরি অনুসন্ধানের জন্য ভেক্টর এম্বেডিং তৈরি করে।',@@ -1621,62 +1661,60 @@ const messages: TranslationMap = {'stats.latest': 'সর্বশেষ','stats.sessions': 'সেশন','stats.tokens': 'টোকেন',- 'bootCheck.invalidUrl': 'একটি রানটাইম URL দিন।',+ 'bootCheck.invalidUrl': 'অনুগ্রহ করে একটি ঠিকানা লিখুন।','bootCheck.urlMustStartWith': 'URL-টি http:// বা https:// দিয়ে শুরু হতে হবে','bootCheck.validUrlRequired':'এটি বৈধ URL মনে হচ্ছে না (চেষ্টা করুন https://core.example.com/rpc)','bootCheck.tokenRequired': 'সংযোগ করতে একটি অথ টোকেন প্রয়োজন।','bootCheck.httpPublicWarning':'এটি একটি পাবলিক হোস্টে সাধারণ HTTP URL: ট্রাফিক এনক্রিপ্ট করা হবে না। এই নেটওয়ার্কে আস্থা না থাকলে HTTPS ব্যবহার করুন।',- 'bootCheck.chooseCoreMode': 'একটি রানটাইম বেছে নিন',- 'bootCheck.connectToCore': 'আপনার রানটাইমে সংযুক্ত হন',+ 'bootCheck.chooseCoreMode': 'OpenHuman কোথায় চলবে?',+ 'bootCheck.connectToCore': 'OpenHuman-এর সাথে সংযুক্ত হন','bootCheck.desktopDescription':- 'OpenHuman চিন্তা করতে একটি রানটাইম প্রয়োজন। এটি কোথায় থাকবে তা বেছে নিন।',+ 'এই কম্পিউটারে OpenHuman চালু করা যায়নি। এটি কোথায় চলবে তা বেছে নিন।','bootCheck.webDescription':- 'ওয়েবে, OpenHuman আপনার নিয়ন্ত্রণে একটি রানটাইমে সংযুক্ত হয়। নিচে এর URL ও অথ টোকেন দিন, অথবা সরাসরি আপনার মেশিনে চালাতে ডেস্কটপ অ্যাপ নিন।',+ 'ওয়েবে OpenHuman আপনার নিয়ন্ত্রণে থাকা একটি সার্ভারের সাথে সংযুক্ত হয়। নিচে তার ঠিকানা ও টোকেন দিন, অথবা সরাসরি আপনার কম্পিউটারে চালাতে ডেস্কটপ অ্যাপ নামিয়ে নিন।','bootCheck.preferDesktop': 'সব নিজের ডিভাইসে রাখতে চান?','bootCheck.downloadDesktop': 'ডেস্কটপ অ্যাপ নিন',- 'bootCheck.localRecommended': 'লোকালি চালান (প্রস্তাবিত)',- 'bootCheck.localDescription':- 'সরাসরি আপনার কম্পিউটারে চলে। সবচেয়ে দ্রুত, সম্পূর্ণ ব্যক্তিগত, কিছু সেটআপ করতে হবে না।',- 'bootCheck.cloudMode': 'ক্লাউডে চালান (জটিল)',- 'bootCheck.cloudDescription':- 'অন্য কোথাও হোস্ট করা রানটাইমে সংযুক্ত হন। ২৪×৭ অনলাইন থাকে, এই ডিভাইস চালু রাখতে হয় না।',- 'bootCheck.coreRpcUrl': 'রানটাইম URL',+ 'bootCheck.localRecommended': 'এই কম্পিউটারে',+ 'bootCheck.localDescription': 'সবচেয়ে দ্রুত, সম্পূর্ণ ব্যক্তিগত, কিছুই সেট আপ করতে হবে না।',+ 'bootCheck.cloudMode': 'আমার নিজের সার্ভারে',+ 'bootCheck.cloudDescription': '২৪ ঘণ্টা অনলাইনে থাকে, তাই এই কম্পিউটার চালু রাখতে হবে না।',+ 'bootCheck.coreRpcUrl': 'ঠিকানা','bootCheck.rpcUrlPlaceholder': 'https://core.example.com/rpc',- 'bootCheck.authToken': 'অথ টোকেন',- 'bootCheck.bearerTokenPlaceholder': 'আপনার রিমোট রানটাইম থেকে বেয়ারার টোকেন',+ 'bootCheck.authToken': 'টোকেন',+ 'bootCheck.bearerTokenPlaceholder': 'আপনার সার্ভারের টোকেন','bootCheck.storedLocally': 'শুধু এই ডিভাইসে রাখা। পাঠানো হয় ','bootCheck.testing': 'পরীক্ষা হচ্ছে…','bootCheck.testConnection': 'সংযোগ পরীক্ষা করুন','bootCheck.connectedOk': 'সংযুক্ত। সব ঠিকঠাক।','bootCheck.authFailed': 'টোকেনটি কাজ করেনি। আবার পরীক্ষা করুন।','bootCheck.unreachablePrefix': 'পৌঁছানো যায়নি:',- 'bootCheck.checkingCore': 'আপনার রানটাইম জাগানো হচ্ছে…',- 'bootCheck.cannotReach': 'রানটাইমে পৌঁছানো যাচ্ছে না',- 'bootCheck.cannotReachDesc': 'আপনার রানটাইমে সংযোগ করা যায়নি। অন্য একটি চেষ্টা করবেন?',- 'bootCheck.switchMode': 'ভিন্ন রানটাইম বেছে নিন',+ 'bootCheck.checkingCore': 'OpenHuman চালু হচ্ছে…',+ 'bootCheck.cannotReach': 'পৌঁছানো যাচ্ছে না',+ 'bootCheck.cannotReachDesc': 'আমরা সংযোগ করতে পারিনি। অন্য কোথাও চেষ্টা করতে চান?',+ 'bootCheck.switchMode': 'কোথায় চলবে তা বদলান','bootCheck.quit': 'প্রস্থান',- 'bootCheck.legacyDetected': 'লেগ্যাসি ব্যাকগ্রাউন্ড রানটাইম শনাক্ত হয়েছে',+ 'bootCheck.legacyDetected': 'পুরনো ব্যাকগ্রাউন্ড সার্ভিস পাওয়া গেছে','bootCheck.legacyDescription':- 'এই ডিভাইসে আলাদাভাবে ইনস্টল করা একটি OpenHuman ডেমন ইতিমধ্যে চলছে। বিল্ট-ইন রানটাইম নিয়ন্ত্রণ নেওয়ার আগে এটি সরাতে হবে।',+ 'এই ডিভাইসে আলাদাভাবে ইনস্টল করা একটি OpenHuman ডেমন আগে থেকেই চলছে। বিল্ট-ইনটি দায়িত্ব নেওয়ার আগে আমাদের এটি সরাতে হবে।','bootCheck.removing': 'সরানো হচ্ছে…','bootCheck.removeContinue': 'সরান ও চালিয়ে যান',- 'bootCheck.localNeedsRestart': 'লোকাল রানটাইম রিস্টার্ট প্রয়োজন',+ 'bootCheck.localNeedsRestart': 'OpenHuman রিস্টার্ট করতে হবে','bootCheck.localNeedsRestartDesc':- 'আপনার লোকাল রানটাইম এই অ্যাপের চেয়ে ভিন্ন ভার্সনে আছে। দ্রুত রিস্টার্ট তাদের আবার সমন্বয় করবে।',+ 'এই কম্পিউটারের OpenHuman-এর সংস্করণ এই অ্যাপের থেকে আলাদা। একটি দ্রুত রিস্টার্টেই আবার মিলে যাবে।','bootCheck.restarting': 'রিস্টার্ট হচ্ছে…',- 'bootCheck.restartCore': 'রানটাইম রিস্টার্ট করুন',- 'bootCheck.cloudNeedsUpdate': 'ক্লাউড রানটাইম আপডেট প্রয়োজন',+ 'bootCheck.restartCore': 'রিস্টার্ট',+ 'bootCheck.cloudNeedsUpdate': 'আপনার সার্ভার আপডেট করতে হবে','bootCheck.cloudNeedsUpdateDesc':- 'আপনার ক্লাউড রানটাইম এই অ্যাপের চেয়ে ভিন্ন ভার্সনে আছে। আপডেটার চালান।',+ 'আপনার সার্ভারের সংস্করণ এই অ্যাপের থেকে আলাদা। আবার মিলিয়ে নিতে আপডেটার চালান।','bootCheck.updating': 'আপডেট হচ্ছে…',- 'bootCheck.updateCloudCore': 'ক্লাউড রানটাইম আপডেট করুন',- 'bootCheck.versionCheckFailed': 'রানটাইম ভার্সন পরীক্ষা ব্যর্থ',+ 'bootCheck.updateCloudCore': 'সার্ভার আপডেট করুন',+ 'bootCheck.versionCheckFailed': 'সংস্করণ যাচাই ব্যর্থ হয়েছে','bootCheck.versionCheckFailedDesc':- 'আপনার রানটাইম চলছে কিন্তু ভার্সন জানাচ্ছে না। পুরনো হতে পারে। চালিয়ে যেতে রিস্টার্ট বা আপডেট করুন।',+ 'আপনার সার্ভার চালু আছে, কিন্তু তার সংস্করণ জানাচ্ছে না। এটি পুরনো হতে পারে। চালিয়ে যেতে রিস্টার্ট বা আপডেট করুন।','bootCheck.working': 'কাজ হচ্ছে…',- 'bootCheck.restartUpdateCore': 'রানটাইম রিস্টার্ট / আপডেট করুন',+ 'bootCheck.restartUpdateCore': 'রিস্টার্ট / আপডেট','bootCheck.unexpectedError': 'অপ্রত্যাশিত বুট-চেক ত্রুটি','bootCheck.actionFailed': 'কিছু একটা ভুল হয়েছে। আবার চেষ্টা করুন।','bootCheck.portConflictTitle': 'অ্যাপ ইঞ্জিন চালু করা যায়নি',@@ -3433,6 +3471,8 @@ const messages: TranslationMap = {'OpenHuman-এর মাধ্যমে লিঙ্ক করা আপনার বিদ্যমান ইন্টিগ্রেশনগুলি (Gmail, Slack, GitHub ইত্যাদি) দৃশ্যমান হবে না: সেগুলি OpenHuman-পরিচালিত Composio টেন্যান্টে থাকে।','settings.composio.intro':'Composio ২৫০+ বহিরাগত অ্যাপকে টুল হিসেবে ইন্টিগ্রেট করে যা আপনার এজেন্ট কল করতে পারে। এই টুল কলগুলি কীভাবে রুট হবে তা নির্বাচন করুন।',+ 'settings.composio.directOnlyDesc':+ 'এখানে Composio-এর পরিচালিত প্রমাণীকরণ উপলভ্য নয়। আপনার নিজের Composio API কী লিখুন অথবা আপাতত এই ধাপটি এড়িয়ে যান।','settings.composio.modeDirect': 'ডাইরেক্ট (নিজের API কী আনুন)','settings.composio.modeDirectDesc':'কলগুলি সরাসরি backend.composio.dev-এ যায়। সার্বভৌম / অফলাইন-বান্ধব। টুল এক্সিকিউশন সিঙ্ক্রোনাসভাবে কাজ করে; রিয়েল-টাইম ট্রিগার webhooks এখনও direct মোডে রুট করা হয় না (ফলো-আপ ইস্যু)।',@@ -4367,15 +4407,18 @@ const messages: TranslationMap = {// Monthly cost badge- 'onboarding.custom.vault.title': 'মেমোরি ও ভল্ট সেটআপ',+ 'onboarding.custom.vault.title': 'OpenHuman-কে একটি স্মৃতি দিন','onboarding.custom.vault.subtitle':- 'নিশ্চিত করুন মেমোরি নোট কোথায় লেখা হয়, উৎস ডেটা কীভাবে পড়া হয় এবং আপনার ভল্ট পাইপলাইন সুস্থ কিনা।',+ 'আপনি তাকে যা বলেন তা যেখানে জমা থাকে, যাতে এক চ্যাট থেকে আরেক চ্যাটে তা বজায় থাকে।','onboarding.custom.vault.defaultDesc':'OpenHuman-পরিচালিত মেমোরির ডিফল্ট ব্যবহার করুন। ভল্ট পাথ এবং সিঙ্ক স্বাস্থ্য পরে পর্যালোচনা করা যাবে।','onboarding.custom.vault.configureDesc':'ভল্টের মালিকানা পর্যালোচনা করুন, স্বাস্থ্য পরীক্ষা চালান এবং এখনই মেমোরি নিয়ন্ত্রণ সামঞ্জস্য করুন।','onboarding.custom.vault.localDisabledReason':'পরিচালিত সেটআপের জন্য OpenHuman সাইন-ইন প্রয়োজন এবং লোকাল মোডে উপলব্ধ নয়।',+ 'onboarding.custom.localDefaultDisabledReason':+ 'পরিচালিত সেটআপের জন্য একটি OpenHuman অ্যাকাউন্ট প্রয়োজন। লোকাল সেশনে আপনাকে প্রতিটি সার্ভিস নিজে কনফিগার করতে হবে।',+ 'onboarding.custom.unsavedChanges': 'চালিয়ে যাওয়ার আগে আপনার পরিবর্তনগুলো সংরক্ষণ করুন।','onboarding.custom.vault.exitError': 'অনবোর্ডিং শেষ করা যায়নি। আবার চেষ্টা করুন।','skills.create.whenToUse': 'কখন ব্যবহার করবেন','skills.create.whenToUsePlaceholder': 'যেমন, যখন ব্যবহারকারী তাদের ইনবক্স গোছাতে বলেন',@@ -4841,6 +4884,8 @@ const messages: TranslationMap = {'আপনার Codex সেশনের মেয়াদ শেষ হয়ে গেছে। অনুগ্রহ করে সেটিংস → ইন্টিগ্রেশন থেকে আবার সংযুক্ত করুন।','chat_error.session_expired':'আপনার OpenHuman সেশনের মেয়াদ শেষ হয়ে গেছে। চালিয়ে যেতে আবার সাইন ইন করুন।',+ 'chat_error.local_session_managed_unavailable':+ 'আপনি স্থানীয় অফলাইন প্রোফাইলে আছেন, যার পেছনে কোনো OpenHuman অ্যাকাউন্ট নেই, তাই ম্যানেজড (ক্লাউড) মডেল চালানো যাবে না। ম্যানেজড মডেল ব্যবহার করতে সাইন ইন করুন, অথবা সংযোগ → API কী → LLM-এ রাউটিং "আপনার নিজের মডেলগুলি ব্যবহার করুন"-এ বদলে নিয়ে নিজের প্রোভাইডার যোগ করুন।','chat_error.action_budget':'আপনি OpenHuman-এর ঘণ্টাপ্রতি অ্যাকশন সীমায় পৌঁছে গেছেন। এটি একটি স্থানীয় নিরাপত্তা সীমা, আপনার AI প্রদানকারীর নয়। সীমাটি ধীরে ধীরে ফিরে আসে; আপনি এই থ্রেডে চ্যাট চালিয়ে যেতে পারেন এবং সীমা পূরণ হলে টুল-নির্ভর ধাপগুলো আবার শুরু হবে।','chat_error.max_iterations':@@ -4978,29 +5023,48 @@ const messages: TranslationMap = {'memoryPage.meta.url': 'লিঙ্ক','memoryPage.off.title': 'মেমোরি বন্ধ আছে','memoryPage.off.description':- 'মনে রাখা শুরু করতে একটি মেমোরি ইঞ্জিন বেছে নিন। TinyHumans মেমোরি ব্যবহার করতে সাইন ইন করুন, অথবা আপনার নিজের CortexDB সংযুক্ত করুন।',+ 'মনে রাখা শুরু করতে CortexDB সংযুক্ত করুন। বিল্ট-ইন CortexDB ব্যবহার করতে সাইন ইন করুন, অথবা নিজের API কী বা এই কম্পিউটারের সার্ভার দিয়ে সংযুক্ত করুন।','memoryPage.off.action': 'একটি ইঞ্জিন বেছে নিন',- 'memoryPage.engine.listTitle': 'মেমোরি ইঞ্জিন',+ 'memoryPage.engine.listTitle': 'CortexDB মেমরি','memoryPage.engine.listDescription':- 'একসময়ে একটিই ইঞ্জিন সক্রিয় থাকে। মেমোরি যা কিছু রাখে সেটি তা সংরক্ষণ করে এবং এ নিয়ে প্রশ্নের উত্তর দেয়।',- 'memoryPage.engine.loadError': 'মেমোরি ইঞ্জিন লোড করা যায়নি',+ 'মেমরি CortexDB-তে চলে। এই অ্যাপ কীভাবে এর সাথে সংযুক্ত হবে তা বেছে নিন। একবারে একটিই সংযোগ সক্রিয় থাকে।','memoryPage.engine.offExplanation':- 'এই মুহূর্তে কোনো মেমোরি ইঞ্জিন ব্যবহারযোগ্য নয়, তাই কিছুই সংরক্ষিত বা মনে করা হচ্ছে না। TinyHumans মেমোরি ব্যবহার করতে সাইন ইন করুন, অথবা এন্ডপয়েন্ট ও API কী দিয়ে আপনার নিজের CortexDB সংযুক্ত করুন।',+ 'এখন কোনো মেমরি সংযোগ ব্যবহারযোগ্য নয়, তাই কিছুই সংরক্ষণ বা স্মরণ করা হয় না। বিল্ট-ইন CortexDB ব্যবহার করতে সাইন ইন করুন, অথবা আপনার API কী দিয়ে বা এই কম্পিউটারে CortexDB সংযুক্ত করুন।','memoryPage.engine.statusDegraded': 'মেমোরির কার্যক্ষমতা কমে গেছে','memoryPage.engine.statusDown': 'মেমোরি ইঞ্জিনে পৌঁছানো যাচ্ছে না','memoryPage.engine.statusOff': 'বন্ধ','memoryPage.engine.active': 'সক্রিয়','memoryPage.engine.use': 'ব্যবহার করুন',- 'memoryPage.engine.edit': 'সম্পাদনা',- 'memoryPage.engine.signInRequired': 'সাইন ইন প্রয়োজন',- 'memoryPage.engine.hostedDetail': 'TinyHumans দ্বারা হোস্ট করা',- 'memoryPage.engine.selfHostedDetail': 'আপনার নিজের এন্ডপয়েন্ট ও API কী',- 'memoryPage.engine.connectTitle': '{engine} সংযুক্ত করুন','memoryPage.engine.connect': 'সংযুক্ত করুন','memoryPage.engine.endpoint': 'এন্ডপয়েন্ট','memoryPage.engine.apiKey': 'API কী','memoryPage.engine.keySavedPlaceholder': 'সংরক্ষিত আছে। বদলাতে নতুন কী লিখুন','memoryPage.engine.keySavedHint': 'একটি কী আগে থেকেই সংরক্ষিত আছে। রাখতে চাইলে এটি খালি রাখুন।',+ 'memoryPage.engine.badgeDegraded': 'ধীরগতি',+ 'memoryPage.engine.badgeDown': 'পৌঁছানো যাচ্ছে না',+ 'memoryPage.engine.connecting': 'সংযোগ হচ্ছে…',+ 'memoryPage.engine.save': 'সংরক্ষণ করুন',+ 'memoryPage.engine.builtin.title': 'বিল্ট-ইন CortexDB',+ 'memoryPage.engine.builtin.detail': 'আপনার TinyHumans অ্যাকাউন্টের সাথে অন্তর্ভুক্ত',+ 'memoryPage.engine.builtin.signInRequired': 'ব্যবহার করতে সাইন ইন করুন',+ 'memoryPage.engine.builtin.description':+ 'TinyHumans হোস্ট করা এবং আপনার অ্যাকাউন্টের সাথে অন্তর্ভুক্ত CortexDB। ব্যবহার করতে সাইন ইন করুন; কিছুই সেট আপ করতে হবে না।',+ 'memoryPage.engine.builtin.enrichmentNote':+ 'নতুন স্মৃতি সঙ্গে সঙ্গে সংরক্ষিত হয়। সেগুলো থেকে পাওয়া তথ্য ও বিশ্বাস পরের কয়েক মিনিটে যুক্ত হয়।',+ 'memoryPage.engine.builtin.signInHint':+ 'বিল্ট-ইন CortexDB ব্যবহার করতে আপনার TinyHumans অ্যাকাউন্টে সাইন ইন করুন।',+ 'memoryPage.engine.apiKeyOption.title': 'আপনার API কী দিয়ে CortexDB',+ 'memoryPage.engine.apiKeyOption.description':+ 'নিজের CortexDB অ্যাকাউন্ট ব্যবহার করুন। কীটি এই কম্পিউটারে নিরাপদে সংরক্ষিত থাকে, কখনো কনফিগ ফাইলে নয়।',+ 'memoryPage.engine.selfHost.title': 'নিজে CortexDB হোস্ট করুন',+ 'memoryPage.engine.selfHost.detail': 'এই কম্পিউটারে একটি CortexDB সার্ভার',+ 'memoryPage.engine.selfHost.step1': 'গাইড অনুসরণ করে এই কম্পিউটারে একটি CortexDB সার্ভার চালান:',+ 'memoryPage.engine.selfHost.docsLink': 'CortexDB সেলফ-হোস্টিং গাইড',+ 'memoryPage.engine.selfHost.step2':+ 'একটি API কী (CORTEX_API_KEY) দিয়ে সার্ভার চালু করুন। অ্যাপ সেই কী দিয়ে সংযুক্ত হয়।',+ 'memoryPage.engine.selfHost.step3': 'নিচে সার্ভারের লোকাল ঠিকানা ও কী লিখুন, তারপর সংযুক্ত করুন।',+ 'memoryPage.engine.selfHost.notLocal':+ 'সেলফ-হোস্টিং শুধু লোকাল। এই কম্পিউটারের একটি ঠিকানা ব্যবহার করুন, যেমন http://localhost:3141।','memoryPage.ask.questionLabel': 'আপনার প্রশ্ন','memoryPage.ask.queryLabel': 'অনুসন্ধানের কোয়েরি','memoryPage.ask.placeholder': 'লঞ্চ প্ল্যান নিয়ে আমরা কী সিদ্ধান্ত নিয়েছিলাম?',@@ -5031,6 +5095,8 @@ const messages: TranslationMap = {'memoryPage.learnings.listTitle': 'শেখা বিষয়','memoryPage.learnings.empty':'এখনও কোনো শেখা বিষয় নেই। উপরে একটি যোগ করুন, অথবা আপনার সঙ্গে কাজ করতে করতে আপনার এজেন্ট নিজেই যোগ করবে।',+ 'memoryPage.learnings.deriving':+ 'এখনও এখানে কিছু নেই। মেমরি এখনও আপনার সাম্প্রতিক কথোপকথন থেকে ধারণা তৈরি করছে; পরবর্তী ব্যাকগ্রাউন্ড রানের পরে সেগুলো এখানে দেখা যাবে।','memoryPage.learnings.delete': 'শেখা বিষয় মুছুন','memoryPage.conversations.turns': '{count}টি টার্ন','memoryPage.documents.listDescription':@@ -5206,6 +5272,7 @@ const messages: TranslationMap = {'memoryPage.import.running': 'আগের মেমোরি ইমপোর্ট হচ্ছে…','memoryPage.import.done': 'আগের মেমোরি ইমপোর্ট হয়েছে','memoryPage.import.failed': 'ইমপোর্ট ব্যর্থ হয়েছে',+ 'memoryPage.import.resume': 'ইমপোর্ট আবার চালু করুন','memoryPage.import.progress': '{total}টির মধ্যে {imported}টি আইটেম ইমপোর্ট হয়েছে',// Live voice agents'voice.live.mute': 'মাইক্রোফোন মিউট করুন',diff --git a/app/src/lib/i18n/de.ts b/app/src/lib/i18n/de.tsindex 476238ace3..ca109d2078 100644--- a/app/src/lib/i18n/de.ts+++ b/app/src/lib/i18n/de.ts@@ -454,6 +454,36 @@ const messages: TranslationMap = {'welcome.privacyPolicy': 'Datenschutzrichtlinie zu','welcome.termsOutro': '.','welcome.connect': 'Testen',+ 'welcome.hero.subtitle': 'Deine KI, mit Gedächtnis, Stimme und dem ganzen Web.',+ 'welcome.th.title': 'Weiter mit TinyHumans',+ 'welcome.th.promise': 'Ein Konto. Alles inklusive. Nichts zu konfigurieren.',+ 'welcome.th.featureInference': 'Inferenz',+ 'welcome.th.featureSearch': 'Websuche',+ 'welcome.th.featureVoice': 'Sprache',+ 'welcome.th.featureMemory': 'Gedächtnis',+ 'welcome.th.featureEmbeddings': 'Embeddings',+ 'welcome.th.featureBilling': 'Abrechnung',+ 'welcome.th.credit': '5 $ Guthaben zum Start',+ 'welcome.th.cta': 'Weiter mit TinyHumans',+ 'welcome.th.providers': 'Mit Google, GitHub oder X anmelden',+ 'welcome.self.title': 'Selbst einrichten',+ 'welcome.self.promise': 'Bring deine eigenen API-Schlüssel und Endpunkte mit.',+ 'welcome.self.listLabel': 'Du richtest ein:',+ 'welcome.self.step1': 'Inferenz',+ 'welcome.self.step2': 'Websuche',+ 'welcome.self.step3': 'Gedächtnis',+ 'welcome.self.time': 'Etwa 3 Minuten. Alles lässt sich später in den Einstellungen ändern.',+ 'welcome.self.cta': 'Selbst einrichten',+ 'welcome.serverPrompt': 'Du betreibst OpenHuman schon auf einem Server?',+ 'welcome.serverCta': 'Verbinde dich damit.',+ 'welcome.handoff.title': 'Anmeldung im Browser wird abgeschlossen',+ 'welcome.handoff.body': 'Wir haben tinyhumans.ai geöffnet. Komm zurück, wenn du fertig bist.',+ 'welcome.handoff.reopen': 'Seite erneut öffnen',+ 'welcome.handoff.failedTitle': 'Anmeldung nicht zurückgekehrt',+ 'welcome.handoff.failedBody':+ 'Der Browser hat die Rückkehr zu OpenHuman möglicherweise blockiert.',+ 'welcome.handoff.retry': 'Erneut versuchen',+ 'welcome.handoff.fallbackSelf': 'Stattdessen selbst einrichten','home.askAssistant': 'Frag deinen Assistenten etwas ...','home.statusOk':'Dein Assistent ist bereit, wenn du es bist. Schreib unten etwas, um loszulegen.',@@ -691,6 +721,12 @@ const messages: TranslationMap = {'memory.noResults': 'Keine Erinnerungen gefunden','memory.empty':'Noch keine Erinnerungen. Erinnerungen werden automatisch erstellt, während du interagierst.',+ 'memory.error.insufficientCredits':+ 'Gedächtnis nicht verfügbar: Dein Konto hat kein Guthaben mehr. Lade es auf, um es wiederherzustellen; nichts Gespeichertes ist verloren.',+ 'memory.error.unavailable':+ 'Das Gedächtnis ist gerade nicht erreichbar. Nichts Gespeichertes ist verloren; versuche es gleich noch einmal.',+ 'memory.outOfCredits.title': 'Kein Guthaben mehr',+ 'memory.outOfCredits.action': 'Aufladen','memory.tab.memory': 'Erinnerung','memory.tab.agents': 'Bibliothek','memory.analyzeNow': 'Jetzt analysieren',@@ -775,9 +811,9 @@ const messages: TranslationMap = {'onboarding.custom.configureLater':'Du kannst die Verknüpfung nach dem Onboarding abschließen. Sobald du fertig bist, wirst du auf die passende Einstellungsseite weitergeleitet.','onboarding.custom.openSettings': 'In den Einstellungen öffnen',- 'onboarding.custom.inference.title': 'Schlussfolgerung (Text)',+ 'onboarding.custom.inference.title': 'Wähle einen Modellanbieter','onboarding.custom.inference.subtitle':- 'Welches Sprachmodell soll deine Fragen beantworten und deine Agenten betreiben?',+ 'OpenHuman braucht ein Modell zum Denken. Füge einen Schlüssel für einen Anbieter hinzu, den du bereits nutzt, oder verweise auf ein lokal laufendes Modell.','onboarding.custom.inference.defaultDesc':'OpenHuman leitet jede Arbeitslast an ein sinnvolles Standardmodell weiter. Keine Schlüssel, keine Einrichtung.','onboarding.custom.inference.configureDesc':@@ -795,12 +831,16 @@ const messages: TranslationMap = {'OpenHuman führt einen verwalteten Composio-Arbeitsbereich aus. Ein Klick, um jeden Dienst später zu verbinden.','onboarding.custom.oauth.configureDesc':'Bring dein eigenes Composio-Konto / API-Schlüssel mit. Konfiguriere unter Einstellungen › Verbindungen.',- 'onboarding.custom.search.title': 'Websuche',- 'onboarding.custom.search.subtitle': 'Wie OpenHuman das Web in deinem Namen durchsucht.',+ 'onboarding.custom.search.title': 'OpenHuman im Web suchen lassen',+ 'onboarding.custom.search.subtitle': 'Ohne das weiß OpenHuman nur, worauf es trainiert wurde.','onboarding.custom.search.defaultDesc':'Die Websuche funktioniert sofort: Exa und Gemini sind bei TinyHumans inbegriffen, kein API-Schlüssel nötig.','onboarding.custom.search.configureDesc':'Exa und Gemini sind inbegriffen. Weitere Suchanbieter fügen Sie mit eigenem API-Schlüssel unter Einstellungen › Werkzeuge hinzu.',+ 'onboarding.custom.search.skipForNow': 'Vorerst überspringen',+ 'onboarding.custom.search.ready': 'Die Websuche ist bereit.',+ 'onboarding.custom.search.notReady':+ 'Fügen Sie unten einen Anbieter hinzu, damit OpenHuman im Web suchen kann.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'Wie OpenHuman Vektor-Embeddings für die semantische Gedächtnissuche erstellt.',@@ -1673,31 +1713,30 @@ const messages: TranslationMap = {'stats.latest': 'Neueste','stats.sessions': 'Sitzungen','stats.tokens': 'Token',- 'bootCheck.invalidUrl': 'Bitte gib eine Laufzeit URL ein.',+ 'bootCheck.invalidUrl': 'Bitte gib eine Adresse ein.','bootCheck.urlMustStartWith': 'Der URL muss mit http:// oder https:// beginnen.','bootCheck.validUrlRequired':'Das sieht nicht nach einem gültigen URL aus (versuche es mit https://core.example.com/rpc)','bootCheck.tokenRequired': 'Für die Verbindung benötigen wir ein Authentifizierungstoken.','bootCheck.httpPublicWarning':'Dies ist eine reine HTTP-URL auf einem öffentlichen Host: der Datenverkehr wird nicht verschlüsselt. Verwende HTTPS, sofern du diesem Netzwerk nicht vertraust.',- 'bootCheck.chooseCoreMode': 'Wähle eine Laufzeit aus',- 'bootCheck.connectToCore': 'Stelle eine Verbindung zu deiner Laufzeit her',+ 'bootCheck.chooseCoreMode': 'Wo soll OpenHuman laufen?',+ 'bootCheck.connectToCore': 'Mit OpenHuman verbinden','bootCheck.desktopDescription':- 'OpenHuman benötigt eine Laufzeit zum Nachdenken. Wähle, wo es leben soll.',+ 'OpenHuman konnte auf diesem Computer nicht gestartet werden. Wähle, wo es laufen soll.','bootCheck.webDescription':- 'Im Web stellt OpenHuman eine Verbindung zu einer von dir gesteuerten Laufzeit her. Gib unten den URL und das Authentifizierungstoken ein oder greife auf die Desktop-App zu, um eine direkt auf deinem Computer auszuführen.',+ 'Im Web verbindet sich OpenHuman mit einem Server, den du selbst betreibst. Gib unten dessen Adresse und Token ein oder lade die Desktop-App, um es direkt auf deinem Rechner auszuführen.','bootCheck.preferDesktop': 'Möchtest du lieber alles auf deinem eigenen Gerät behalten?','bootCheck.downloadDesktop': 'Hol dir die Desktop-App',- 'bootCheck.localRecommended': 'Lokal ausführen (empfohlen)',- 'bootCheck.localDescription':- 'Läuft direkt hier auf deinem Computer. Am schnellsten, völlig privat, nichts einzurichten.',- 'bootCheck.cloudMode': 'In der Cloud ausführen (komplex)',+ 'bootCheck.localRecommended': 'Auf diesem Computer',+ 'bootCheck.localDescription': 'Am schnellsten, völlig privat, nichts einzurichten.',+ 'bootCheck.cloudMode': 'Auf einem eigenen Server','bootCheck.cloudDescription':- 'Stelle eine Verbindung zu einer Laufzeit her, die du woanders hostest. Die Laufzeit bleibt rund um die Uhr online, sodass du dieses Gerät nicht laufen lassen musst.',- 'bootCheck.coreRpcUrl': 'Laufzeit URL',+ 'Bleibt rund um die Uhr online, sodass dein Computer nicht eingeschaltet bleiben muss.',+ 'bootCheck.coreRpcUrl': 'Adresse','bootCheck.rpcUrlPlaceholder': 'https://core.example.com/rpc',- 'bootCheck.authToken': 'Authentifizierungstoken',- 'bootCheck.bearerTokenPlaceholder': 'Das Bearer-Token von deiner Remote-Laufzeit',+ 'bootCheck.authToken': 'Token',+ 'bootCheck.bearerTokenPlaceholder': 'Der Token von deinem Server','bootCheck.storedLocally': 'Wird nur auf diesem Gerät gespeichert. Gesendet als ','bootCheck.testing': 'Testen…','bootCheck.testConnection': 'Testverbindung',@@ -1705,32 +1744,32 @@ const messages: TranslationMap = {'bootCheck.authFailed':'Dieser Token hat nicht funktioniert. Prüfe ihn noch einmal und versuche es erneut.','bootCheck.unreachablePrefix': 'Konnte es nicht erreichen:',- 'bootCheck.checkingCore': 'Deine Laufzeit wird aufgeweckt ...',- 'bootCheck.cannotReach': 'Die Laufzeit kann nicht erreicht werden',+ 'bootCheck.checkingCore': 'OpenHuman wird gestartet…',+ 'bootCheck.cannotReach': 'Keine Verbindung möglich','bootCheck.cannotReachDesc':- 'Wir konnten keine Verbindung zu deiner Laufzeit herstellen. Möchtest du etwas anderes ausprobieren?',- 'bootCheck.switchMode': 'Wähle eine andere Laufzeit',+ 'Die Verbindung hat nicht geklappt. Möchtest du es woanders versuchen?',+ 'bootCheck.switchMode': 'Ändern, wo es läuft','bootCheck.quit': 'Beenden',- 'bootCheck.legacyDetected': 'Legacy-Hintergrundlaufzeit erkannt',+ 'bootCheck.legacyDetected': 'Alter Hintergrunddienst gefunden','bootCheck.legacyDescription':- 'Auf diesem Gerät läuft bereits ein separat installierter OpenHuman-Daemon. Wir müssen es bereinigen, bevor die integrierte Laufzeit übernehmen kann.',+ 'Auf diesem Gerät läuft bereits ein separat installierter OpenHuman-Daemon. Wir müssen ihn entfernen, bevor die integrierte Version übernehmen kann.','bootCheck.removing': 'Entfernen…','bootCheck.removeContinue': 'Entfernen und fortfahren',- 'bootCheck.localNeedsRestart': 'Die lokale Laufzeit erfordert einen Neustart',+ 'bootCheck.localNeedsRestart': 'OpenHuman muss neu gestartet werden','bootCheck.localNeedsRestartDesc':- 'Deine lokale Laufzeit hat eine andere Version als diese App. Durch einen schnellen Neustart werden sie wieder synchronisiert.',+ 'OpenHuman auf diesem Computer hat eine andere Version als diese App. Ein kurzer Neustart bringt beide wieder in Einklang.','bootCheck.restarting': 'Neustart...',- 'bootCheck.restartCore': 'Starte die Runtime neu',- 'bootCheck.cloudNeedsUpdate': 'Cloud Runtime benötigt ein Update',+ 'bootCheck.restartCore': 'Neu starten',+ 'bootCheck.cloudNeedsUpdate': 'Dein Server braucht ein Update','bootCheck.cloudNeedsUpdateDesc':- 'Deine Cloud-Laufzeitumgebung hat eine andere Version als diese App. Führe den Updater aus, um sie wieder zu synchronisieren.',+ 'Dein Server hat eine andere Version als diese App. Führe das Update aus, um beide wieder in Einklang zu bringen.','bootCheck.updating': 'Aktualisierung…',- 'bootCheck.updateCloudCore': 'Aktualisiere Cloud Runtime',- 'bootCheck.versionCheckFailed': 'Laufzeitversionsprüfung fehlgeschlagen',+ 'bootCheck.updateCloudCore': 'Server aktualisieren',+ 'bootCheck.versionCheckFailed': 'Versionsprüfung fehlgeschlagen','bootCheck.versionCheckFailedDesc':- 'Deine Laufzeit ist aktiv, meldet jedoch nicht ihre Version. Möglicherweise ist es veraltet. Starte es neu oder aktualisiere es, um fortzufahren.',+ 'Dein Server läuft, meldet aber seine Version nicht. Möglicherweise ist er veraltet. Starte ihn neu oder aktualisiere ihn, um fortzufahren.','bootCheck.working': 'Arbeiten…',- 'bootCheck.restartUpdateCore': 'Runtime neu starten/aktualisieren',+ 'bootCheck.restartUpdateCore': 'Neu starten / Aktualisieren','bootCheck.unexpectedError': 'Unerwarteter Boot-Check-Fehler','bootCheck.actionFailed': 'Etwas ist schief gelaufen. Bitte versuche es erneut.','bootCheck.portConflictTitle': 'App-Engine konnte nicht gestartet werden',@@ -3524,6 +3563,8 @@ const messages: TranslationMap = {'Deine vorhandenen Integrationen (Gmail, Slack, GitHub usw., die über OpenHuman verknüpft sind) sind nicht sichtbar – sie befinden sich im von OpenHuman verwalteten Composio-Mandanten.','settings.composio.intro':'Composio integriert mehr als 250 externe Apps als Tools, die dein Agent aufrufen kann. Wähle aus, wie diese Werkzeugaufrufe weitergeleitet werden.',+ 'settings.composio.directOnlyDesc':+ 'Die verwaltete Composio-Authentifizierung ist hier nicht verfügbar. Gib deinen eigenen Composio-API-Schlüssel ein oder überspringe diesen Schritt vorerst.','settings.composio.modeDirect': 'Direkt (bring deinen eigenen API-Schlüssel mit)','settings.composio.modeDirectDesc':'Anrufe gehen direkt an backend.composio.dev. Souverän / offlinefreundlich. Die Werkzeugausführung erfolgt synchron; Echtzeit-Trigger-Webhooks werden noch nicht im Direktmodus weitergeleitet (Folgeproblem).',@@ -4477,15 +4518,18 @@ const messages: TranslationMap = {// Onboarding: Custom > Vault'onboarding.custom.stepperVault': 'Vault',- 'onboarding.custom.vault.title': 'Speicher & Vault-Einrichtung',+ 'onboarding.custom.vault.title': 'Gib OpenHuman ein Gedächtnis','onboarding.custom.vault.subtitle':- 'Bestätigen Sie, wohin Speichernotizen geschrieben werden, wie Quelldaten gelesen werden und ob Ihre Vault-Pipeline fehlerfrei ist.',+ 'Hier wird gespeichert, was du ihm erzählst, damit es über Chats hinweg erhalten bleibt.','onboarding.custom.vault.defaultDesc':'Von OpenHuman verwaltete Standardspeichereinstellungen verwenden. Vault-Pfad und Synchronisierungsstatus können später eingesehen werden.','onboarding.custom.vault.configureDesc':'Vault-Eigentümerschaft prüfen, Integritätsprüfungen durchführen und Speicherkontrollen jetzt anpassen.','onboarding.custom.vault.localDisabledReason':'Die verwaltete Einrichtung erfordert eine OpenHuman-Anmeldung und ist im lokalen Modus nicht verfügbar.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'Die verwaltete Einrichtung erfordert ein OpenHuman-Konto. In einer lokalen Sitzung konfigurieren Sie jeden Dienst selbst.',+ 'onboarding.custom.unsavedChanges': 'Speichern Sie Ihre Änderungen, bevor Sie fortfahren.','onboarding.custom.vault.exitError':'Onboarding konnte nicht abgeschlossen werden. Bitte versuchen Sie es erneut.',@@ -4975,6 +5019,8 @@ const messages: TranslationMap = {'Deine Codex-Sitzung ist abgelaufen. Verbinde sie bitte erneut unter Einstellungen → Integrationen.','chat_error.session_expired':'Deine OpenHuman-Sitzung ist abgelaufen. Bitte melde dich erneut an, um fortzufahren.',+ 'chat_error.local_session_managed_unavailable':+ 'Du bist im lokalen Offline-Profil, hinter dem kein OpenHuman-Konto steht, deshalb kann das verwaltete (Cloud-)Modell nicht ausgeführt werden. Melde dich an, um verwaltete Modelle zu nutzen, oder stelle das Routing unter Verbindungen → API-Schlüssel → LLM auf „Verwenden Sie Ihre eigenen Modelle“ um und füge einen eigenen Anbieter hinzu.','chat_error.action_budget':'Du hast das stündliche Aktionslimit von OpenHuman erreicht. Das ist eine lokale Sicherheitsgrenze, nicht die deines KI-Anbieters. Das Limit baut sich allmählich ab; du kannst in diesem Thread weiterchatten, und werkzeugintensive Schritte laufen wieder an, sobald sich das Limit auffüllt.','chat_error.max_iterations':@@ -5115,24 +5161,18 @@ const messages: TranslationMap = {'memoryPage.meta.url': 'Link','memoryPage.off.title': 'Gedächtnis ist aus','memoryPage.off.description':- 'Wähle eine Gedächtnis-Engine, damit sich dein Agent Dinge merken kann. Melde dich an, um das TinyHumans-Gedächtnis zu nutzen, oder verbinde deine eigene CortexDB.',+ 'Verbinde CortexDB, um mit dem Erinnern zu beginnen. Melde dich an, um das integrierte CortexDB zu nutzen, oder verbinde dich mit deinem eigenen API-Schlüssel oder einem Server auf diesem Computer.','memoryPage.off.action': 'Engine auswählen',- 'memoryPage.engine.listTitle': 'Gedächtnis-Engines',+ 'memoryPage.engine.listTitle': 'CortexDB-Gedächtnis','memoryPage.engine.listDescription':- 'Es ist immer nur eine Engine aktiv. Sie speichert alles, was das Gedächtnis behält, und beantwortet Fragen dazu.',- 'memoryPage.engine.loadError': 'Die Gedächtnis-Engines konnten nicht geladen werden',+ 'Das Gedächtnis läuft auf CortexDB. Wähle, wie sich diese App damit verbindet. Es ist immer nur eine Verbindung aktiv.','memoryPage.engine.offExplanation':- 'Zurzeit ist keine Gedächtnis-Engine verfügbar, daher wird nichts gespeichert oder abgerufen. Melde dich an, um das TinyHumans-Gedächtnis zu nutzen, oder verbinde deine eigene CortexDB mit einem Endpunkt und einem API-Schlüssel.',+ 'Gerade ist keine Gedächtnisverbindung nutzbar, daher wird nichts gespeichert oder abgerufen. Melde dich an, um das integrierte CortexDB zu nutzen, verbinde dich mit deinem API-Schlüssel oder hoste CortexDB auf diesem Computer.','memoryPage.engine.statusDegraded': 'Gedächtnis ist eingeschränkt','memoryPage.engine.statusDown': 'Gedächtnis-Engine ist nicht erreichbar','memoryPage.engine.statusOff': 'Aus','memoryPage.engine.active': 'Aktiv','memoryPage.engine.use': 'Verwenden',- 'memoryPage.engine.edit': 'Bearbeiten',- 'memoryPage.engine.signInRequired': 'Anmeldung erforderlich',- 'memoryPage.engine.hostedDetail': 'Gehostet von TinyHumans',- 'memoryPage.engine.selfHostedDetail': 'Dein eigener Endpunkt und API-Schlüssel',- 'memoryPage.engine.connectTitle': '{engine} verbinden','memoryPage.engine.connect': 'Verbinden','memoryPage.engine.endpoint': 'Endpunkt','memoryPage.engine.apiKey': 'API-Schlüssel',@@ -5140,6 +5180,33 @@ const messages: TranslationMap = {'Gespeichert. Gib einen neuen Schlüssel ein, um ihn zu ersetzen','memoryPage.engine.keySavedHint':'Ein Schlüssel ist bereits gespeichert. Lass das Feld leer, um ihn zu behalten.',+ 'memoryPage.engine.badgeDegraded': 'Eingeschränkt',+ 'memoryPage.engine.badgeDown': 'Nicht erreichbar',+ 'memoryPage.engine.connecting': 'Verbinde…',+ 'memoryPage.engine.save': 'Speichern',+ 'memoryPage.engine.builtin.title': 'Integriertes CortexDB',+ 'memoryPage.engine.builtin.detail': 'In deinem TinyHumans-Konto enthalten',+ 'memoryPage.engine.builtin.signInRequired': 'Zum Nutzen anmelden',+ 'memoryPage.engine.builtin.description':+ 'CortexDB, gehostet von TinyHumans und in deinem Konto enthalten. Melde dich an, um es zu nutzen; es gibt nichts einzurichten.',+ 'memoryPage.engine.builtin.enrichmentNote':+ 'Neue Erinnerungen werden sofort gespeichert. Fakten und Überzeugungen daraus werden in den folgenden Minuten ergänzt.',+ 'memoryPage.engine.builtin.signInHint':+ 'Melde dich bei deinem TinyHumans-Konto an, um das integrierte CortexDB zu nutzen.',+ 'memoryPage.engine.apiKeyOption.title': 'CortexDB mit deinem API-Schlüssel',+ 'memoryPage.engine.apiKeyOption.description':+ 'Nutze dein eigenes CortexDB-Konto. Der Schlüssel wird sicher auf diesem Computer gespeichert, nie in der Konfigurationsdatei.',+ 'memoryPage.engine.selfHost.title': 'CortexDB selbst hosten',+ 'memoryPage.engine.selfHost.detail': 'Ein CortexDB-Server auf diesem Computer',+ 'memoryPage.engine.selfHost.step1':+ 'Starte einen CortexDB-Server auf diesem Computer anhand der Anleitung:',+ 'memoryPage.engine.selfHost.docsLink': 'CortexDB-Anleitung zum Selbsthosten',+ 'memoryPage.engine.selfHost.step2':+ 'Starte den Server mit einem API-Schlüssel (CORTEX_API_KEY). Die App verbindet sich mit diesem Schlüssel.',+ 'memoryPage.engine.selfHost.step3':+ 'Gib unten die lokale Adresse des Servers und den Schlüssel ein und verbinde dich dann.',+ 'memoryPage.engine.selfHost.notLocal':+ 'Selbsthosten ist nur lokal möglich. Verwende eine Adresse auf diesem Computer, z. B. http://localhost:3141.','memoryPage.ask.questionLabel': 'Deine Frage','memoryPage.ask.queryLabel': 'Suchanfrage','memoryPage.ask.placeholder': 'Was haben wir zum Launch-Plan entschieden?',@@ -5171,6 +5238,8 @@ const messages: TranslationMap = {'memoryPage.learnings.listTitle': 'Erkenntnisse','memoryPage.learnings.empty':'Noch keine Erkenntnisse. Füge oben eine hinzu, oder dein Agent ergänzt sie bei der Zusammenarbeit mit dir.',+ 'memoryPage.learnings.deriving':+ 'Noch nichts da. Das Gedächtnis baut noch Überzeugungen aus deinen letzten Unterhaltungen auf; sie erscheinen hier nach dem nächsten Hintergrundlauf.','memoryPage.learnings.delete': 'Erkenntnis löschen','memoryPage.conversations.turns': '{count} Runden','memoryPage.documents.listDescription':@@ -5349,6 +5418,7 @@ const messages: TranslationMap = {'memoryPage.import.running': 'Früheres Gedächtnis wird importiert…','memoryPage.import.done': 'Früheres Gedächtnis importiert','memoryPage.import.failed': 'Import fehlgeschlagen',+ 'memoryPage.import.resume': 'Import fortsetzen','memoryPage.import.progress': '{imported} von {total} Elementen importiert',// Live voice agents'voice.live.mute': 'Mikrofon stummschalten',diff --git a/app/src/lib/i18n/en.ts b/app/src/lib/i18n/en.tsindex 7246deeffd..adbf3f10b1 100644--- a/app/src/lib/i18n/en.ts+++ b/app/src/lib/i18n/en.ts@@ -313,6 +313,35 @@ const en: TranslationMap = {'welcome.privacyPolicy': 'Privacy Policy','welcome.termsOutro': '.','welcome.connect': 'Test',+ 'welcome.hero.subtitle': 'Your AI, with memory, voice, and the whole web.',+ 'welcome.th.title': 'Continue with TinyHumans',+ 'welcome.th.promise': 'One account. Everything included. Nothing to configure.',+ 'welcome.th.featureInference': 'Inference',+ 'welcome.th.featureSearch': 'Web search',+ 'welcome.th.featureVoice': 'Voice',+ 'welcome.th.featureMemory': 'Memory',+ 'welcome.th.featureEmbeddings': 'Embeddings',+ 'welcome.th.featureBilling': 'Billing',+ 'welcome.th.credit': '$5 of credit to start',+ 'welcome.th.cta': 'Continue with TinyHumans',+ 'welcome.th.providers': 'Sign in with Google, GitHub or X',+ 'welcome.self.title': 'Set it up myself',+ 'welcome.self.promise': 'Bring your own API keys and endpoints.',+ 'welcome.self.listLabel': "You'll set up:",+ 'welcome.self.step1': 'Inference',+ 'welcome.self.step2': 'Web search',+ 'welcome.self.step3': 'Memory',+ 'welcome.self.time': 'About 3 minutes. Change anything later in Settings.',+ 'welcome.self.cta': 'Set it up myself',+ 'welcome.serverPrompt': 'Already running OpenHuman on a server?',+ 'welcome.serverCta': 'Connect to it.',+ 'welcome.handoff.title': 'Finishing sign-in in your browser',+ 'welcome.handoff.body': "We opened tinyhumans.ai. Come back when you're done.",+ 'welcome.handoff.reopen': 'Open the page again',+ 'welcome.handoff.failedTitle': "Sign-in didn't come back",+ 'welcome.handoff.failedBody': 'The browser may have blocked the return to OpenHuman.',+ 'welcome.handoff.retry': 'Try again',+ 'welcome.handoff.fallbackSelf': 'Set it up myself instead',// Home page'home.askAssistant': 'Ask your assistant anything...',@@ -619,6 +648,12 @@ const en: TranslationMap = {'memory.search': 'Search memories...','memory.noResults': 'No memories found','memory.empty': 'No memories yet. Memories are created automatically as you interact.',+ 'memory.error.insufficientCredits':+ 'Memory is unavailable: your account is out of credits. Top up to restore it; nothing stored has been lost.',+ 'memory.error.unavailable':+ "Memory can't be reached right now. Nothing stored has been lost; try again in a moment.",+ 'memory.outOfCredits.title': 'Out of credits',+ 'memory.outOfCredits.action': 'Top up','memory.tab.memory': 'Memory','memory.tab.agents': 'Library',@@ -769,9 +804,9 @@ const en: TranslationMap = {'onboarding.custom.openSettings': 'Open in Settings',// Onboarding: Custom > Inference (text)- 'onboarding.custom.inference.title': 'Inference (Text)',+ 'onboarding.custom.inference.title': 'Choose a model provider','onboarding.custom.inference.subtitle':- 'Which language model should answer your questions and run your agents?',+ 'OpenHuman needs a model to think with. Add a key for a provider you already use, or point at one running locally.','onboarding.custom.inference.defaultDesc':'OpenHuman routes workloads through its managed backend by default. No keys, no setup.','onboarding.custom.inference.configureDesc':@@ -795,12 +830,15 @@ const en: TranslationMap = {'Bring your own Composio account / API key. Configure in Settings › Connections.',// Onboarding: Custom > Search- 'onboarding.custom.search.title': 'Web Search',- 'onboarding.custom.search.subtitle': 'How OpenHuman searches the web on your behalf.',+ 'onboarding.custom.search.title': 'Let OpenHuman search the web',+ 'onboarding.custom.search.subtitle': 'Without this, OpenHuman only knows what it was trained on.','onboarding.custom.search.defaultDesc':'Web search works out of the box: Exa and Gemini are included with TinyHumans, no API key needed.','onboarding.custom.search.configureDesc':'Exa and Gemini are included. Add more search providers with your own API key in Settings › Tools.',+ 'onboarding.custom.search.skipForNow': 'Skip for now',+ 'onboarding.custom.search.ready': 'Web search is ready.',+ 'onboarding.custom.search.notReady': 'Add a provider below so OpenHuman can search the web.',// Onboarding: Custom > Embeddings'onboarding.custom.embeddings.title': 'Embeddings',@@ -812,15 +850,18 @@ const en: TranslationMap = {'Bring your own embedding provider (OpenAI, Voyage, Ollama, etc.).',// Onboarding: Custom > Vault- 'onboarding.custom.vault.title': 'Memory & Vault Setup',+ 'onboarding.custom.vault.title': 'Give OpenHuman a memory','onboarding.custom.vault.subtitle':- 'Confirm where memory notes are written, how source data is read, and whether your vault pipeline is healthy.',+ 'Where what you tell it gets stored, so it carries across chats.','onboarding.custom.vault.defaultDesc':'Use OpenHuman-managed memory defaults. Vault path and sync health can still be reviewed later.','onboarding.custom.vault.configureDesc':'Review vault ownership, run health checks, and tune memory controls now.','onboarding.custom.vault.localDisabledReason':'Managed setup requires OpenHuman sign-in and is unavailable in local mode.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'Managed setup needs an OpenHuman account. In a local session you configure each service yourself.',+ 'onboarding.custom.unsavedChanges': 'Save your changes before continuing.','onboarding.custom.vault.exitError': 'Could not finish onboarding. Please try again.',// Onboarding: Custom > Memory@@ -1878,61 +1919,61 @@ const en: TranslationMap = {'stats.tokens': 'tokens',// Boot Check Gate- 'bootCheck.invalidUrl': 'Please enter a runtime URL.',+ 'bootCheck.invalidUrl': 'Please enter an address.','bootCheck.urlMustStartWith': 'The URL needs to start with http:// or https://','bootCheck.validUrlRequired':"That doesn't look like a valid URL (try https://core.example.com/rpc)",'bootCheck.tokenRequired': "We'll need an auth token to connect.",'bootCheck.httpPublicWarning':'This is a plain HTTP URL on a public host: traffic will not be encrypted. Use HTTPS unless you trust this network.',- 'bootCheck.chooseCoreMode': 'Select a Runtime',- 'bootCheck.connectToCore': 'Connect to Your Runtime',- 'bootCheck.desktopDescription': 'OpenHuman needs a runtime to think. Pick where it should live.',+ 'bootCheck.chooseCoreMode': 'Where should OpenHuman run?',+ 'bootCheck.connectToCore': 'Connect to OpenHuman',+ 'bootCheck.desktopDescription':+ "OpenHuman couldn't start on this computer. Pick where it should run.",'bootCheck.webDescription':- 'On the web, OpenHuman connects to a runtime you control. Drop in its URL and auth token below, or grab the desktop app to run one right on your machine.',+ 'On the web, OpenHuman connects to a server you control. Drop in its address and token below, or grab the desktop app to run it right on your machine.','bootCheck.preferDesktop': 'Rather keep everything on your own device?','bootCheck.downloadDesktop': 'Get the Desktop App',- 'bootCheck.localRecommended': 'Run Locally (Recommended)',- 'bootCheck.localDescription':- 'Runs right here on your computer. Fastest, fully private, nothing to set up.',- 'bootCheck.cloudMode': 'Run on the Cloud (Complex)',+ 'bootCheck.localRecommended': 'On this computer',+ 'bootCheck.localDescription': 'Fastest, fully private, nothing to set up.',+ 'bootCheck.cloudMode': 'On a server I host','bootCheck.cloudDescription':- "Connect to a runtime you're hosting elsewhere. Stays online 24×7 so you don't need to keep this device running.",- 'bootCheck.coreRpcUrl': 'Runtime URL',+ "Stays online 24×7 so you don't need to keep this computer running.",+ 'bootCheck.coreRpcUrl': 'Address','bootCheck.rpcUrlPlaceholder': 'https://core.example.com/rpc',- 'bootCheck.authToken': 'Auth Token',- 'bootCheck.bearerTokenPlaceholder': 'The bearer token from your remote runtime',+ 'bootCheck.authToken': 'Token',+ 'bootCheck.bearerTokenPlaceholder': 'The token from your server','bootCheck.storedLocally': 'Kept on this device only. Sent as ','bootCheck.testing': 'Testing…','bootCheck.testConnection': 'Test Connection','bootCheck.connectedOk': "Connected. You're good to go.",'bootCheck.authFailed': "That token didn't work. Double-check it and try again.",'bootCheck.unreachablePrefix': "Couldn't reach it:",- 'bootCheck.checkingCore': 'Waking up your runtime…',- 'bootCheck.cannotReach': "Can't Reach the Runtime",- 'bootCheck.cannotReachDesc': "We couldn't connect to your runtime. Want to try a different one?",- 'bootCheck.switchMode': 'Pick a Different Runtime',+ 'bootCheck.checkingCore': 'Starting OpenHuman…',+ 'bootCheck.cannotReach': "Can't reach it",+ 'bootCheck.cannotReachDesc': "We couldn't connect. Want to try somewhere else?",+ 'bootCheck.switchMode': 'Change where it runs','bootCheck.quit': 'Quit',- 'bootCheck.legacyDetected': 'Legacy Background Runtime Detected',+ 'bootCheck.legacyDetected': 'Old background service found','bootCheck.legacyDescription':- 'A separately-installed OpenHuman daemon is already running on this device. We need to clear it out before the built-in runtime can take over.',+ 'A separately-installed OpenHuman daemon is already running on this device. We need to clear it out before the built-in one can take over.','bootCheck.removing': 'Removing…','bootCheck.removeContinue': 'Remove and Continue',- 'bootCheck.localNeedsRestart': 'Local Runtime Needs a Restart',+ 'bootCheck.localNeedsRestart': 'OpenHuman needs a restart','bootCheck.localNeedsRestartDesc':- 'Your local runtime is on a different version than this app. A quick restart will get them back in sync.',+ 'OpenHuman on this computer is a different version than this app. A quick restart will get them back in sync.','bootCheck.restarting': 'Restarting…',- 'bootCheck.restartCore': 'Restart Runtime',- 'bootCheck.cloudNeedsUpdate': 'Cloud Runtime Needs an Update',+ 'bootCheck.restartCore': 'Restart',+ 'bootCheck.cloudNeedsUpdate': 'Your server needs an update','bootCheck.cloudNeedsUpdateDesc':- 'Your cloud runtime is on a different version than this app. Run the updater to bring them back in sync.',+ 'Your server is on a different version than this app. Run the updater to bring them back in sync.','bootCheck.updating': 'Updating…',- 'bootCheck.updateCloudCore': 'Update Cloud Runtime',- 'bootCheck.versionCheckFailed': 'Runtime Version Check Failed',+ 'bootCheck.updateCloudCore': 'Update server',+ 'bootCheck.versionCheckFailed': 'Version check failed','bootCheck.versionCheckFailedDesc':- "Your runtime is up but isn't reporting its version. It may be outdated. Restart or update it to continue.",+ "Your server is up but isn't reporting its version. It may be outdated. Restart or update it to continue.",'bootCheck.working': 'Working…',- 'bootCheck.restartUpdateCore': 'Restart / Update Runtime',+ 'bootCheck.restartUpdateCore': 'Restart / Update','bootCheck.unexpectedError': 'Unexpected Boot-Check Error','bootCheck.actionFailed': 'Something went wrong. Please try again.','bootCheck.portConflictTitle': "Couldn't Start the App Engine",@@ -4013,6 +4054,8 @@ const en: TranslationMap = {"Your existing integrations (Gmail, Slack, GitHub, etc. linked through OpenHuman) won't be visible: they live in the OpenHuman-managed Composio tenant.",'settings.composio.intro':'Composio integrates 250+ external apps as tools your agent can call. Choose how those tool calls are routed.',+ 'settings.composio.directOnlyDesc':+ 'Managed Composio auth is unavailable here. Enter your own Composio API key or skip this for now.','settings.composio.modeDirect': 'Direct (bring your own API key)','settings.composio.modeDirectDesc':'Calls go to backend.composio.dev directly. Sovereign / offline-friendly. Tool execution works synchronously; real-time trigger webhooks are not yet routed in direct mode (follow-up issue).',@@ -5123,6 +5166,8 @@ const en: TranslationMap = {'Your Codex session has expired. Please reconnect it in Settings → Integrations.','chat_error.session_expired':'Your OpenHuman session has expired. Please sign in again to continue.',+ 'chat_error.local_session_managed_unavailable':+ 'You\'re on the local offline profile, which has no OpenHuman account behind it, so the managed (cloud) model can\'t run. Sign in to use managed models, or switch routing to "Use Your Own Models" in Connections → API keys → LLM and add your own provider.','chat_error.action_budget':"You've hit OpenHuman's per-hour action budget. This is a local safety cap, not your AI provider. The window decays gradually; you can keep chatting in this thread and tool-heavy steps will resume as the budget refills.",'chat_error.max_iterations':@@ -5256,29 +5301,50 @@ const en: TranslationMap = {'memoryPage.meta.url': 'Link','memoryPage.off.title': 'Memory is off','memoryPage.off.description':- 'Choose a memory engine to start remembering. Sign in to use TinyHumans memory, or connect your own CortexDB.',+ 'Connect CortexDB to start remembering. Sign in to use built-in CortexDB, or connect with your own API key or a server on this computer.','memoryPage.off.action': 'Choose an engine',- 'memoryPage.engine.listTitle': 'Memory engines',+ 'memoryPage.engine.listTitle': 'CortexDB memory','memoryPage.engine.listDescription':- 'One engine is active at a time. It stores everything memory keeps and answers questions about it.',- 'memoryPage.engine.loadError': 'Could not load the memory engines',+ 'Memory runs on CortexDB. Choose how this app connects to it. One connection is active at a time.','memoryPage.engine.offExplanation':- 'No memory engine is usable right now, so nothing is stored or recalled. Sign in to use TinyHumans memory, or connect your own CortexDB with an endpoint and API key.',+ 'No memory connection is usable right now, so nothing is stored or recalled. Sign in to use built-in CortexDB, or connect CortexDB with your API key or on this computer.','memoryPage.engine.statusDegraded': 'Memory is degraded','memoryPage.engine.statusDown': 'Memory engine is unreachable','memoryPage.engine.statusOff': 'Off','memoryPage.engine.active': 'Active','memoryPage.engine.use': 'Use',- 'memoryPage.engine.edit': 'Edit',- 'memoryPage.engine.signInRequired': 'Sign in required',- 'memoryPage.engine.hostedDetail': 'Hosted by TinyHumans',- 'memoryPage.engine.selfHostedDetail': 'Your own endpoint and API key',- 'memoryPage.engine.connectTitle': 'Connect {engine}','memoryPage.engine.connect': 'Connect','memoryPage.engine.endpoint': 'Endpoint','memoryPage.engine.apiKey': 'API key','memoryPage.engine.keySavedPlaceholder': 'Saved. Enter a new key to replace it','memoryPage.engine.keySavedHint': 'A key is already saved. Leave this empty to keep it.',+ 'memoryPage.engine.badgeDegraded': 'Degraded',+ 'memoryPage.engine.badgeDown': 'Unreachable',+ 'memoryPage.engine.connecting': 'Connecting…',+ 'memoryPage.engine.save': 'Save',+ 'memoryPage.engine.builtin.title': 'Built-in CortexDB',+ 'memoryPage.engine.builtin.detail': 'Included with your TinyHumans account',+ 'memoryPage.engine.builtin.signInRequired': 'Sign in to use',+ 'memoryPage.engine.builtin.description':+ 'CortexDB hosted by TinyHumans and included with your account. Sign in to use it; there is nothing to set up.',+ 'memoryPage.engine.builtin.enrichmentNote':+ 'New memories are saved right away. Facts and beliefs drawn from them fill in over the following minutes.',+ 'memoryPage.engine.builtin.signInHint':+ 'Sign in to your TinyHumans account to use built-in CortexDB.',+ 'memoryPage.engine.apiKeyOption.title': 'CortexDB with your API key',+ 'memoryPage.engine.apiKeyOption.description':+ 'Use your own CortexDB account. The key is stored securely on this computer, never in the config file.',+ 'memoryPage.engine.selfHost.title': 'Self-host CortexDB',+ 'memoryPage.engine.selfHost.detail': 'A CortexDB server on this computer',+ 'memoryPage.engine.selfHost.step1':+ 'Run a CortexDB server on this computer by following the guide:',+ 'memoryPage.engine.selfHost.docsLink': 'CortexDB self-hosting guide',+ 'memoryPage.engine.selfHost.step2':+ 'Start the server with an API key (CORTEX_API_KEY). The app connects with that key.',+ 'memoryPage.engine.selfHost.step3':+ "Enter the server's local address and the key below, then connect.",+ 'memoryPage.engine.selfHost.notLocal':+ 'Self-hosting is local only. Use an address on this computer, such as http://localhost:3141.','memoryPage.ask.questionLabel': 'Your question','memoryPage.ask.queryLabel': 'Search query','memoryPage.ask.placeholder': 'What did we decide about the launch plan?',@@ -5309,6 +5375,8 @@ const en: TranslationMap = {'memoryPage.learnings.listTitle': 'Learnings','memoryPage.learnings.empty':'No learnings yet. Add one above, or your agent will add them as it works with you.',+ 'memoryPage.learnings.deriving':+ 'Nothing here yet. Memory is still building beliefs from your recent conversations; they appear here after the next background run.','memoryPage.learnings.delete': 'Delete learning','memoryPage.conversations.turns': '{count} turns','memoryPage.documents.listDescription':@@ -5483,6 +5551,7 @@ const en: TranslationMap = {'memoryPage.import.running': 'Importing previous memory…','memoryPage.import.done': 'Previous memory imported','memoryPage.import.failed': 'Import failed',+ 'memoryPage.import.resume': 'Resume import','memoryPage.import.progress': '{imported} of {total} items imported',// Live voice agents'voice.live.mute': 'Mute microphone',diff --git a/app/src/lib/i18n/es.ts b/app/src/lib/i18n/es.tsindex 6c3a7a1600..c3adf0af1e 100644--- a/app/src/lib/i18n/es.ts+++ b/app/src/lib/i18n/es.ts@@ -448,6 +448,35 @@ const messages: TranslationMap = {'welcome.privacyPolicy': 'Política de privacidad','welcome.termsOutro': '.','welcome.connect': 'Probar',+ 'welcome.hero.subtitle': 'Tu IA, con memoria, voz y toda la web.',+ 'welcome.th.title': 'Continuar con TinyHumans',+ 'welcome.th.promise': 'Una cuenta. Todo incluido. Nada que configurar.',+ 'welcome.th.featureInference': 'Inferencia',+ 'welcome.th.featureSearch': 'Búsqueda web',+ 'welcome.th.featureVoice': 'Voz',+ 'welcome.th.featureMemory': 'Memoria',+ 'welcome.th.featureEmbeddings': 'Embeddings',+ 'welcome.th.featureBilling': 'Facturación',+ 'welcome.th.credit': '5 $ de crédito para empezar',+ 'welcome.th.cta': 'Continuar con TinyHumans',+ 'welcome.th.providers': 'Inicia sesión con Google, GitHub o X',+ 'welcome.self.title': 'Configurarlo yo mismo',+ 'welcome.self.promise': 'Trae tus propias claves de API y endpoints.',+ 'welcome.self.listLabel': 'Configurarás:',+ 'welcome.self.step1': 'Inferencia',+ 'welcome.self.step2': 'Búsqueda web',+ 'welcome.self.step3': 'Memoria',+ 'welcome.self.time': 'Unos 3 minutos. Cambia lo que quieras más tarde en Ajustes.',+ 'welcome.self.cta': 'Configurarlo yo mismo',+ 'welcome.serverPrompt': '¿Ya ejecutas OpenHuman en un servidor?',+ 'welcome.serverCta': 'Conéctate a él.',+ 'welcome.handoff.title': 'Terminando el inicio de sesión en tu navegador',+ 'welcome.handoff.body': 'Abrimos tinyhumans.ai: vuelve cuando termines.',+ 'welcome.handoff.reopen': 'Abrir la página de nuevo',+ 'welcome.handoff.failedTitle': 'El inicio de sesión no regresó',+ 'welcome.handoff.failedBody': 'Puede que el navegador haya bloqueado el regreso a OpenHuman.',+ 'welcome.handoff.retry': 'Intentar de nuevo',+ 'welcome.handoff.fallbackSelf': 'Configurarlo yo mismo en su lugar','home.askAssistant': 'Pregúntale lo que quieras a tu asistente...','home.statusOk': 'Tu asistente está listo cuando tú lo estés. Escribe algo abajo para empezar.','home.statusBackendOnly':@@ -684,6 +713,12 @@ const messages: TranslationMap = {'memory.search': 'Buscar recuerdos...','memory.noResults': 'No se encontraron recuerdos','memory.empty': 'Sin recuerdos aún. Los recuerdos se crean automáticamente mientras interactúas.',+ 'memory.error.insufficientCredits':+ 'La memoria no está disponible: tu cuenta se quedó sin créditos. Recarga para restaurarla; no se ha perdido nada guardado.',+ 'memory.error.unavailable':+ 'No se puede acceder a la memoria ahora mismo. No se ha perdido nada guardado; inténtalo de nuevo en un momento.',+ 'memory.outOfCredits.title': 'Sin créditos',+ 'memory.outOfCredits.action': 'Recargar','memory.tab.memory': 'Memoria','memory.tab.agents': 'Biblioteca','memory.analyzeNow': 'Analizar ahora',@@ -767,9 +802,9 @@ const messages: TranslationMap = {'onboarding.custom.configureLater':'Puedes terminar de configurar esto después del onboarding. Te llevaremos a la página de configuración correspondiente cuando termines.','onboarding.custom.openSettings': 'Abrir en Configuración',- 'onboarding.custom.inference.title': 'Inferencia (Texto)',+ 'onboarding.custom.inference.title': 'Elige un proveedor de modelos','onboarding.custom.inference.subtitle':- '¿Qué modelo de lenguaje debe responder tus preguntas y ejecutar tus agentes?',+ 'OpenHuman necesita un modelo con el que pensar. Añade una clave de un proveedor que ya uses, o apunta a uno que se ejecute en local.','onboarding.custom.inference.defaultDesc':'OpenHuman dirige cada carga de trabajo a un modelo predeterminado adecuado. Sin claves, sin configuración.','onboarding.custom.inference.configureDesc':@@ -787,12 +822,17 @@ const messages: TranslationMap = {'OpenHuman ejecuta un espacio de trabajo de Composio gestionado. Un clic para conectar cada servicio más tarde.','onboarding.custom.oauth.configureDesc':'Usa tu propia cuenta / clave API de Composio. Configura en Configuración › Conexiones.',- 'onboarding.custom.search.title': 'Búsqueda web',- 'onboarding.custom.search.subtitle': 'Cómo OpenHuman busca en la web en tu nombre.',+ 'onboarding.custom.search.title': 'Deja que OpenHuman busque en la web',+ 'onboarding.custom.search.subtitle':+ 'Sin esto, OpenHuman solo sabe aquello con lo que fue entrenado.','onboarding.custom.search.defaultDesc':'La búsqueda web funciona desde el principio: Exa y Gemini están incluidos con TinyHumans, sin clave de API.','onboarding.custom.search.configureDesc':'Exa y Gemini están incluidos. Añade más proveedores de búsqueda con tu propia clave de API en Ajustes › Herramientas.',+ 'onboarding.custom.search.skipForNow': 'Omitir por ahora',+ 'onboarding.custom.search.ready': 'La búsqueda web está lista.',+ 'onboarding.custom.search.notReady':+ 'Añade un proveedor abajo para que OpenHuman pueda buscar en la web.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'Cómo OpenHuman genera embeddings vectoriales para la búsqueda semántica en memoria.',@@ -1657,63 +1697,61 @@ const messages: TranslationMap = {'stats.latest': 'Más reciente','stats.sessions': 'Sesiones','stats.tokens': 'fichas',- 'bootCheck.invalidUrl': 'Ingresa una URL de runtime.',+ 'bootCheck.invalidUrl': 'Introduce una dirección.','bootCheck.urlMustStartWith': 'La URL debe comenzar con http:// o https://','bootCheck.validUrlRequired':'Eso no parece una URL válida (prueba con https://core.example.com/rpc)','bootCheck.tokenRequired': 'Necesitaremos un token de autenticación para conectarnos.','bootCheck.httpPublicWarning':'Esta es una URL HTTP sin cifrar en un host público: el tráfico no estará cifrado. Usa HTTPS a menos que confíes en esta red.',- 'bootCheck.chooseCoreMode': 'Seleccionar un runtime',- 'bootCheck.connectToCore': 'Conectar a tu runtime',+ 'bootCheck.chooseCoreMode': '¿Dónde quieres que se ejecute OpenHuman?',+ 'bootCheck.connectToCore': 'Conectar con OpenHuman','bootCheck.desktopDescription':- 'OpenHuman necesita un runtime para funcionar. Elige dónde debe vivir.',+ 'OpenHuman no pudo iniciarse en este equipo. Elige dónde debe ejecutarse.','bootCheck.webDescription':- 'En la web, OpenHuman se conecta a un runtime que tú controlas. Ingresa su URL y token de autenticación abajo, o descarga la app de escritorio para ejecutar uno en tu máquina.',+ 'En la web, OpenHuman se conecta a un servidor que tú controlas. Introduce abajo su dirección y su token, o descarga la app de escritorio para ejecutarlo directamente en tu equipo.','bootCheck.preferDesktop': '¿Prefieres tener todo en tu propio dispositivo?','bootCheck.downloadDesktop': 'Obtener la app de escritorio',- 'bootCheck.localRecommended': 'Ejecutar localmente (Recomendado)',- 'bootCheck.localDescription':- 'Corre directamente en tu computadora. El más rápido, completamente privado, sin nada que configurar.',- 'bootCheck.cloudMode': 'Ejecutar en la nube (Complejo)',+ 'bootCheck.localRecommended': 'En este equipo',+ 'bootCheck.localDescription': 'Lo más rápido, totalmente privado y sin nada que configurar.',+ 'bootCheck.cloudMode': 'En un servidor propio','bootCheck.cloudDescription':- 'Conéctate a un runtime que estás alojando en otro lugar. Permanece en línea 24×7 para que no necesites mantener este dispositivo encendido.',- 'bootCheck.coreRpcUrl': 'URL del runtime',+ 'Se mantiene en línea las 24 horas, así no necesitas dejar este equipo encendido.',+ 'bootCheck.coreRpcUrl': 'Dirección','bootCheck.rpcUrlPlaceholder': 'https://core.example.com/rpc',- 'bootCheck.authToken': 'Token de autenticación',- 'bootCheck.bearerTokenPlaceholder': 'El bearer token de tu runtime remoto',+ 'bootCheck.authToken': 'Token',+ 'bootCheck.bearerTokenPlaceholder': 'El token de tu servidor','bootCheck.storedLocally': 'Solo guardado en este dispositivo. Enviado como ','bootCheck.testing': 'Probando…','bootCheck.testConnection': 'Probar conexión','bootCheck.connectedOk': 'Conectado. Todo listo.','bootCheck.authFailed': 'Ese token no funcionó. Verifícalo e inténtalo de nuevo.','bootCheck.unreachablePrefix': 'No se pudo alcanzar:',- 'bootCheck.checkingCore': 'Activando tu runtime…',- 'bootCheck.cannotReach': 'No se puede alcanzar el runtime',- 'bootCheck.cannotReachDesc':- 'No pudimos conectarnos a tu runtime. ¿Quieres probar con uno diferente?',- 'bootCheck.switchMode': 'Elegir un runtime diferente',+ 'bootCheck.checkingCore': 'Iniciando OpenHuman…',+ 'bootCheck.cannotReach': 'No se puede conectar',+ 'bootCheck.cannotReachDesc': 'No pudimos conectarnos. ¿Quieres probar en otro lugar?',+ 'bootCheck.switchMode': 'Cambiar dónde se ejecuta','bootCheck.quit': 'Salir',- 'bootCheck.legacyDetected': 'Runtime en segundo plano legacy detectado',+ 'bootCheck.legacyDetected': 'Se encontró un servicio antiguo en segundo plano','bootCheck.legacyDescription':- 'Un daemon de OpenHuman instalado por separado ya está corriendo en este dispositivo. Necesitamos eliminarlo antes de que el runtime integrado pueda tomar el control.',+ 'Ya hay un daemon de OpenHuman instalado por separado en este dispositivo. Tenemos que eliminarlo antes de que el integrado pueda encargarse.','bootCheck.removing': 'Eliminando…','bootCheck.removeContinue': 'Eliminar y continuar',- 'bootCheck.localNeedsRestart': 'El runtime local necesita reiniciarse',+ 'bootCheck.localNeedsRestart': 'OpenHuman necesita reiniciarse','bootCheck.localNeedsRestartDesc':- 'Tu runtime local tiene una versión diferente a la de esta app. Un reinicio rápido los sincronizará.',+ 'OpenHuman en este equipo tiene una versión distinta a la de esta app. Un reinicio rápido los volverá a sincronizar.','bootCheck.restarting': 'Reiniciando…',- 'bootCheck.restartCore': 'Reiniciar runtime',- 'bootCheck.cloudNeedsUpdate': 'El runtime en la nube necesita actualizarse',+ 'bootCheck.restartCore': 'Reiniciar',+ 'bootCheck.cloudNeedsUpdate': 'Tu servidor necesita una actualización','bootCheck.cloudNeedsUpdateDesc':- 'Tu runtime en la nube tiene una versión diferente a la de esta app. Ejecuta el actualizador para sincronizarlos.',+ 'Tu servidor tiene una versión distinta a la de esta app. Ejecuta el actualizador para volver a sincronizarlos.','bootCheck.updating': 'Actualizando…',- 'bootCheck.updateCloudCore': 'Actualizar runtime en la nube',- 'bootCheck.versionCheckFailed': 'Verificación de versión del runtime fallida',+ 'bootCheck.updateCloudCore': 'Actualizar servidor',+ 'bootCheck.versionCheckFailed': 'Falló la comprobación de versión','bootCheck.versionCheckFailedDesc':- 'Tu runtime está activo pero no reporta su versión. Puede estar desactualizado. Reinícialo o actualízalo para continuar.',+ 'Tu servidor está activo pero no informa de su versión. Puede estar desactualizado. Reinícialo o actualízalo para continuar.','bootCheck.working': 'Trabajando…',- 'bootCheck.restartUpdateCore': 'Reiniciar / Actualizar runtime',+ 'bootCheck.restartUpdateCore': 'Reiniciar / Actualizar','bootCheck.unexpectedError': 'Error inesperado en verificación de arranque','bootCheck.actionFailed': 'Algo salió mal. Inténtalo de nuevo.','bootCheck.portConflictTitle': 'No se pudo iniciar el motor de la aplicación',@@ -3487,6 +3525,8 @@ const messages: TranslationMap = {'Tus integraciones existentes (Gmail, Slack, GitHub, etc. vinculadas a través de OpenHuman) no serán visibles: viven en el inquilino de Composio gestionado por OpenHuman.','settings.composio.intro':'Composio integra más de 250 aplicaciones externas como herramientas que tu agente puede invocar. Elige cómo se enrutan esas llamadas.',+ 'settings.composio.directOnlyDesc':+ 'La autenticación administrada de Composio no está disponible aquí. Introduce tu propia clave API de Composio u omite este paso por ahora.','settings.composio.modeDirect': 'Directo (usa tu propia clave API)','settings.composio.modeDirectDesc':'Las llamadas van directamente a backend.composio.dev. Soberano / amigable con uso sin conexión. La ejecución de herramientas funciona de forma síncrona; los webhooks de triggers en tiempo real aún no están enrutados en modo directo (incidencia pendiente).',@@ -4440,15 +4480,18 @@ const messages: TranslationMap = {// Monthly cost badge// Onboarding: Custom > Vault- 'onboarding.custom.vault.title': 'Configuración de memoria y bóveda',+ 'onboarding.custom.vault.title': 'Dale una memoria a OpenHuman','onboarding.custom.vault.subtitle':- 'Confirma dónde se escriben las notas de memoria, cómo se leen los datos de origen y si el flujo de bóveda está en buen estado.',+ 'Donde se guarda lo que le cuentas, para que se mantenga entre chats.','onboarding.custom.vault.defaultDesc':'Usa los valores predeterminados de memoria administrada por OpenHuman. La ruta de la bóveda y el estado de sincronización se pueden revisar más adelante.','onboarding.custom.vault.configureDesc':'Revisa la propiedad de la bóveda, ejecuta comprobaciones de estado y ajusta los controles de memoria ahora.','onboarding.custom.vault.localDisabledReason':'La configuración administrada requiere inicio de sesión en OpenHuman y no está disponible en modo local.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'La configuración administrada requiere una cuenta de OpenHuman. En una sesión local configuras cada servicio tú mismo.',+ 'onboarding.custom.unsavedChanges': 'Guarda tus cambios antes de continuar.','onboarding.custom.vault.exitError':'No se pudo completar el proceso de incorporación. Por favor, inténtalo de nuevo.',@@ -4934,6 +4977,8 @@ const messages: TranslationMap = {'Tu sesión de Codex ha caducado. Vuelve a conectarla en Configuración → Integraciones.','chat_error.session_expired':'Tu sesión de OpenHuman ha caducado. Inicia sesión de nuevo para continuar.',+ 'chat_error.local_session_managed_unavailable':+ 'Estás en el perfil local sin conexión, que no tiene ninguna cuenta de OpenHuman detrás, así que no se puede ejecutar el modelo administrado (en la nube). Inicia sesión para usar los modelos administrados o cambia el enrutamiento a "Utilice sus propios modelos" en Conexiones → Claves de API → LLM y añade tu propio proveedor.','chat_error.action_budget':'Has alcanzado el límite de acciones por hora de OpenHuman. Es un tope de seguridad local, no de tu proveedor de IA. La ventana se recupera poco a poco; puedes seguir chateando en este hilo y los pasos que usan muchas herramientas se reanudarán a medida que se reponga el límite.','chat_error.max_iterations':@@ -5071,29 +5116,50 @@ const messages: TranslationMap = {'memoryPage.meta.url': 'Enlace','memoryPage.off.title': 'La memoria está desactivada','memoryPage.off.description':- 'Elige un motor de memoria para empezar a recordar. Inicia sesión para usar la memoria de TinyHumans o conecta tu propio CortexDB.',+ 'Conecta CortexDB para empezar a recordar. Inicia sesión para usar CortexDB integrado, o conéctate con tu propia clave de API o con un servidor en este equipo.','memoryPage.off.action': 'Elegir un motor',- 'memoryPage.engine.listTitle': 'Motores de memoria',+ 'memoryPage.engine.listTitle': 'Memoria CortexDB','memoryPage.engine.listDescription':- 'Solo hay un motor activo a la vez. Almacena todo lo que guarda la memoria y responde preguntas sobre ello.',- 'memoryPage.engine.loadError': 'No se pudieron cargar los motores de memoria',+ 'La memoria funciona con CortexDB. Elige cómo se conecta esta app. Solo hay una conexión activa a la vez.','memoryPage.engine.offExplanation':- 'Ahora mismo no hay ningún motor de memoria disponible, así que no se almacena ni se recuerda nada. Inicia sesión para usar la memoria de TinyHumans o conecta tu propio CortexDB con un endpoint y una clave de API.',+ 'Ahora mismo no hay ninguna conexión de memoria utilizable, así que no se guarda ni se recupera nada. Inicia sesión para usar CortexDB integrado, o conecta CortexDB con tu clave de API o en este equipo.','memoryPage.engine.statusDegraded': 'La memoria funciona con problemas','memoryPage.engine.statusDown': 'No se puede acceder al motor de memoria','memoryPage.engine.statusOff': 'Desactivado','memoryPage.engine.active': 'Activo','memoryPage.engine.use': 'Usar',- 'memoryPage.engine.edit': 'Editar',- 'memoryPage.engine.signInRequired': 'Requiere iniciar sesión',- 'memoryPage.engine.hostedDetail': 'Alojado por TinyHumans',- 'memoryPage.engine.selfHostedDetail': 'Tu propio endpoint y clave de API',- 'memoryPage.engine.connectTitle': 'Conectar {engine}','memoryPage.engine.connect': 'Conectar','memoryPage.engine.endpoint': 'Endpoint','memoryPage.engine.apiKey': 'Clave de API','memoryPage.engine.keySavedPlaceholder': 'Guardada. Introduce una clave nueva para reemplazarla','memoryPage.engine.keySavedHint': 'Ya hay una clave guardada. Déjalo vacío para conservarla.',+ 'memoryPage.engine.badgeDegraded': 'Degradado',+ 'memoryPage.engine.badgeDown': 'Inaccesible',+ 'memoryPage.engine.connecting': 'Conectando…',+ 'memoryPage.engine.save': 'Guardar',+ 'memoryPage.engine.builtin.title': 'CortexDB integrado',+ 'memoryPage.engine.builtin.detail': 'Incluido con tu cuenta de TinyHumans',+ 'memoryPage.engine.builtin.signInRequired': 'Inicia sesión para usarlo',+ 'memoryPage.engine.builtin.description':+ 'CortexDB alojado por TinyHumans e incluido con tu cuenta. Inicia sesión para usarlo; no hay nada que configurar.',+ 'memoryPage.engine.builtin.enrichmentNote':+ 'Los nuevos recuerdos se guardan al instante. Los hechos y creencias que se extraen de ellos se completan en los minutos siguientes.',+ 'memoryPage.engine.builtin.signInHint':+ 'Inicia sesión en tu cuenta de TinyHumans para usar CortexDB integrado.',+ 'memoryPage.engine.apiKeyOption.title': 'CortexDB con tu clave de API',+ 'memoryPage.engine.apiKeyOption.description':+ 'Usa tu propia cuenta de CortexDB. La clave se guarda de forma segura en este equipo, nunca en el archivo de configuración.',+ 'memoryPage.engine.selfHost.title': 'Aloja CortexDB tú mismo',+ 'memoryPage.engine.selfHost.detail': 'Un servidor CortexDB en este equipo',+ 'memoryPage.engine.selfHost.step1':+ 'Ejecuta un servidor CortexDB en este equipo siguiendo la guía:',+ 'memoryPage.engine.selfHost.docsLink': 'Guía de autoalojamiento de CortexDB',+ 'memoryPage.engine.selfHost.step2':+ 'Inicia el servidor con una clave de API (CORTEX_API_KEY). La app se conecta con esa clave.',+ 'memoryPage.engine.selfHost.step3':+ 'Introduce abajo la dirección local del servidor y la clave, y conéctate.',+ 'memoryPage.engine.selfHost.notLocal':+ 'El autoalojamiento es solo local. Usa una dirección de este equipo, como http://localhost:3141.','memoryPage.ask.questionLabel': 'Tu pregunta','memoryPage.ask.queryLabel': 'Consulta de búsqueda','memoryPage.ask.placeholder': '¿Qué decidimos sobre el plan de lanzamiento?',@@ -5124,6 +5190,8 @@ const messages: TranslationMap = {'memoryPage.learnings.listTitle': 'Aprendizajes','memoryPage.learnings.empty':'Aún no hay aprendizajes. Añade uno arriba o tu agente los añadirá a medida que trabaje contigo.',+ 'memoryPage.learnings.deriving':+ 'Aún no hay nada. La memoria todavía está construyendo creencias a partir de tus conversaciones recientes; aparecerán aquí tras la próxima ejecución en segundo plano.','memoryPage.learnings.delete': 'Eliminar aprendizaje','memoryPage.conversations.turns': '{count} turnos','memoryPage.documents.listDescription':@@ -5302,6 +5370,7 @@ const messages: TranslationMap = {'memoryPage.import.running': 'Importando memoria anterior…','memoryPage.import.done': 'Memoria anterior importada','memoryPage.import.failed': 'Error al importar',+ 'memoryPage.import.resume': 'Reanudar importación','memoryPage.import.progress': '{imported} de {total} elementos importados',// Live voice agents'voice.live.mute': 'Silenciar micrófono',diff --git a/app/src/lib/i18n/fr.ts b/app/src/lib/i18n/fr.tsindex 546a0eef58..058dfa479d 100644--- a/app/src/lib/i18n/fr.ts+++ b/app/src/lib/i18n/fr.ts@@ -451,6 +451,35 @@ const messages: TranslationMap = {'welcome.privacyPolicy': 'Politique de confidentialité','welcome.termsOutro': '.','welcome.connect': 'Tester',+ 'welcome.hero.subtitle': 'Votre IA, avec mémoire, voix et tout le web.',+ 'welcome.th.title': 'Continuer avec TinyHumans',+ 'welcome.th.promise': 'Un seul compte. Tout est inclus. Rien à configurer.',+ 'welcome.th.featureInference': 'Inférence',+ 'welcome.th.featureSearch': 'Recherche web',+ 'welcome.th.featureVoice': 'Voix',+ 'welcome.th.featureMemory': 'Mémoire',+ 'welcome.th.featureEmbeddings': 'Embeddings',+ 'welcome.th.featureBilling': 'Facturation',+ 'welcome.th.credit': '5 $ de crédit pour commencer',+ 'welcome.th.cta': 'Continuer avec TinyHumans',+ 'welcome.th.providers': 'Connectez-vous avec Google, GitHub ou X',+ 'welcome.self.title': 'Je le configure moi-même',+ 'welcome.self.promise': 'Apportez vos propres clés API et points de terminaison.',+ 'welcome.self.listLabel': 'Vous allez configurer :',+ 'welcome.self.step1': 'Inférence',+ 'welcome.self.step2': 'Recherche web',+ 'welcome.self.step3': 'Mémoire',+ 'welcome.self.time': 'Environ 3 minutes. Modifiez tout plus tard dans les Paramètres.',+ 'welcome.self.cta': 'Je le configure moi-même',+ 'welcome.serverPrompt': 'Vous exécutez déjà OpenHuman sur un serveur ?',+ 'welcome.serverCta': 'Connectez-vous-y.',+ 'welcome.handoff.title': 'Finalisation de la connexion dans votre navigateur',+ 'welcome.handoff.body': 'Nous avons ouvert tinyhumans.ai. Revenez une fois terminé.',+ 'welcome.handoff.reopen': 'Rouvrir la page',+ 'welcome.handoff.failedTitle': "La connexion n'est pas revenue",+ 'welcome.handoff.failedBody': 'Le navigateur a peut-être bloqué le retour vers OpenHuman.',+ 'welcome.handoff.retry': 'Réessayer',+ 'welcome.handoff.fallbackSelf': 'Plutôt le configurer moi-même','home.askAssistant': "Pose n'importe quelle question à ton assistant…",'home.statusOk':'Ton assistant est prêt quand tu veux. Écris quelque chose ci-dessous pour commencer.',@@ -691,6 +720,12 @@ const messages: TranslationMap = {'memory.noResults': 'Aucun souvenir trouvé','memory.empty':"Aucun souvenir pour l'instant. Les souvenirs sont créés automatiquement au fil de tes interactions.",+ 'memory.error.insufficientCredits':+ "La mémoire est indisponible : votre compte n'a plus de crédits. Rechargez-le pour la rétablir ; rien de ce qui est stocké n'a été perdu.",+ 'memory.error.unavailable':+ "La mémoire est injoignable pour le moment. Rien de ce qui est stocké n'a été perdu ; réessayez dans un instant.",+ 'memory.outOfCredits.title': 'Crédits épuisés',+ 'memory.outOfCredits.action': 'Recharger','memory.tab.memory': 'Mémoire','memory.tab.agents': 'Bibliothèque','memory.analyzeNow': 'Analyser maintenant',@@ -773,9 +808,9 @@ const messages: TranslationMap = {'onboarding.custom.configureLater':"Tu peux finaliser cette configuration après l'initialisation. On t'amènera sur la page Paramètres correspondante une fois que tu auras terminé.",'onboarding.custom.openSettings': 'Ouvrir dans les Paramètres',- 'onboarding.custom.inference.title': 'Inférence (texte)',+ 'onboarding.custom.inference.title': 'Choisissez un fournisseur de modèles','onboarding.custom.inference.subtitle':- 'Quel modèle de langage doit répondre à tes questions et faire tourner tes agents ?',+ "OpenHuman a besoin d'un modèle pour réfléchir. Ajoutez une clé pour un fournisseur que vous utilisez déjà, ou pointez vers un modèle exécuté en local.",'onboarding.custom.inference.defaultDesc':'OpenHuman dirige chaque charge de travail vers un modèle par défaut adapté. Aucune clé, aucune configuration.','onboarding.custom.inference.configureDesc':@@ -793,13 +828,17 @@ const messages: TranslationMap = {'OpenHuman gère un espace de travail Composio. Un clic pour connecter chaque service plus tard.','onboarding.custom.oauth.configureDesc':'Utilise ton propre compte Composio / clé API. À configurer dans Paramètres › Connexions.',- 'onboarding.custom.search.title': 'Recherche web',+ 'onboarding.custom.search.title': 'Laissez OpenHuman chercher sur le web','onboarding.custom.search.subtitle':- 'Comment OpenHuman effectue des recherches sur le web en ton nom.',+ 'Sans cela, OpenHuman ne connaît que ce sur quoi il a été entraîné.','onboarding.custom.search.defaultDesc':'La recherche web fonctionne immédiatement : Exa et Gemini sont inclus avec TinyHumans, sans clé API.','onboarding.custom.search.configureDesc':"Exa et Gemini sont inclus. Ajoutez d'autres fournisseurs de recherche avec votre propre clé API dans Paramètres › Outils.",+ 'onboarding.custom.search.skipForNow': "Passer pour l'instant",+ 'onboarding.custom.search.ready': 'La recherche web est prête.',+ 'onboarding.custom.search.notReady':+ 'Ajoutez un fournisseur ci-dessous pour que OpenHuman puisse effectuer des recherches sur le web.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'Comment OpenHuman génère des embeddings vectoriels pour la recherche sémantique en mémoire.',@@ -1669,63 +1708,61 @@ const messages: TranslationMap = {'stats.latest': 'Dernier','stats.sessions': 'Sessions','stats.tokens': 'jetons',- 'bootCheck.invalidUrl': 'Saisis une URL de runtime.',+ 'bootCheck.invalidUrl': 'Veuillez saisir une adresse.','bootCheck.urlMustStartWith': "L'URL doit commencer par http:// ou https://",'bootCheck.validUrlRequired':'Ça ne ressemble pas à une URL valide (essaie https://core.example.com/rpc)','bootCheck.tokenRequired': "On aura besoin d'un token d'authentification pour se connecter.",'bootCheck.httpPublicWarning':'Ceci est une URL HTTP en clair sur un hôte public: le trafic ne sera pas chiffré. Utilisez HTTPS sauf si vous faites confiance à ce réseau.',- 'bootCheck.chooseCoreMode': 'Sélectionner un runtime',- 'bootCheck.connectToCore': 'Connecte-toi à ton runtime',+ 'bootCheck.chooseCoreMode': "Où OpenHuman doit-il s'exécuter ?",+ 'bootCheck.connectToCore': 'Se connecter à OpenHuman','bootCheck.desktopDescription':- "OpenHuman a besoin d'un runtime pour fonctionner. Choisis où il doit être hébergé.",+ "OpenHuman n'a pas pu démarrer sur cet ordinateur. Choisissez où il doit s'exécuter.",'bootCheck.webDescription':- "Sur le web, OpenHuman se connecte à un runtime que tu contrôles. Renseigne son URL et son token d'authentification ci-dessous, ou télécharge l'app desktop pour en faire tourner un directement sur ta machine.",+ "Sur le web, OpenHuman se connecte à un serveur que vous contrôlez. Saisissez ci-dessous son adresse et son jeton, ou téléchargez l'application de bureau pour l'exécuter directement sur votre machine.",'bootCheck.preferDesktop': 'Tu préfères tout garder sur ton propre appareil ?','bootCheck.downloadDesktop': "Télécharger l'app desktop",- 'bootCheck.localRecommended': 'Exécuter localement (Recommandé)',- 'bootCheck.localDescription':- 'Tourne directement sur ton ordinateur. Le plus rapide, entièrement privé, rien à configurer.',- 'bootCheck.cloudMode': 'Exécuter dans le cloud (Complexe)',+ 'bootCheck.localRecommended': 'Sur cet ordinateur',+ 'bootCheck.localDescription': 'Le plus rapide, entièrement privé, rien à configurer.',+ 'bootCheck.cloudMode': "Sur un serveur que j'héberge",'bootCheck.cloudDescription':- "Connecte-toi à un runtime que tu héberges ailleurs. Reste en ligne 24h/24 et 7j/7: tu n'as pas besoin de garder cet appareil allumé.",- 'bootCheck.coreRpcUrl': 'URL du runtime',+ 'Reste en ligne 24 h/24 et 7 j/7 : inutile de laisser cet ordinateur allumé.',+ 'bootCheck.coreRpcUrl': 'Adresse','bootCheck.rpcUrlPlaceholder': 'https://core.example.com/rpc',- 'bootCheck.authToken': "Token d'authentification",- 'bootCheck.bearerTokenPlaceholder': 'Le token bearer de ton runtime distant',+ 'bootCheck.authToken': 'Jeton',+ 'bootCheck.bearerTokenPlaceholder': 'Le jeton de votre serveur','bootCheck.storedLocally': 'Conservé sur cet appareil uniquement. Envoyé en tant que ','bootCheck.testing': 'Test en cours…','bootCheck.testConnection': 'Tester la connexion','bootCheck.connectedOk': 'Connecté. Tu es prêt.','bootCheck.authFailed': "Ce token n'a pas fonctionné. Vérifie-le et réessaie.",'bootCheck.unreachablePrefix': "Impossible de l'atteindre :",- 'bootCheck.checkingCore': 'Réveil de ton runtime…',- 'bootCheck.cannotReach': "Impossible d'atteindre le runtime",- 'bootCheck.cannotReachDesc':- "On n'a pas pu se connecter à ton runtime. Tu veux en essayer un autre ?",- 'bootCheck.switchMode': 'Choisir un autre runtime',+ 'bootCheck.checkingCore': "Démarrage d'OpenHuman…",+ 'bootCheck.cannotReach': 'Connexion impossible',+ 'bootCheck.cannotReachDesc': "Nous n'avons pas pu nous connecter. Voulez-vous essayer ailleurs ?",+ 'bootCheck.switchMode': "Changer l'endroit d'exécution",'bootCheck.quit': 'Quitter',- 'bootCheck.legacyDetected': 'Runtime de fond hérité détecté',+ 'bootCheck.legacyDetected': 'Ancien service en arrière-plan détecté','bootCheck.legacyDescription':- "Un daemon OpenHuman installé séparément est déjà en cours d'exécution sur cet appareil. On doit le supprimer avant que le runtime intégré puisse prendre le relais.",+ "Un démon OpenHuman installé séparément est déjà en cours d'exécution sur cet appareil. Nous devons le supprimer avant que la version intégrée puisse prendre le relais.",'bootCheck.removing': 'Suppression…','bootCheck.removeContinue': 'Supprimer et continuer',- 'bootCheck.localNeedsRestart': 'Le runtime local doit être redémarré',+ 'bootCheck.localNeedsRestart': 'OpenHuman doit redémarrer','bootCheck.localNeedsRestartDesc':- 'Ton runtime local est sur une version différente de cette app. Un redémarrage rapide les remettra en synchronisation.',+ "OpenHuman sur cet ordinateur n'a pas la même version que cette application. Un redémarrage rapide les remettra en phase.",'bootCheck.restarting': 'Redémarrage…',- 'bootCheck.restartCore': 'Redémarrer le runtime',- 'bootCheck.cloudNeedsUpdate': 'Le runtime cloud doit être mis à jour',+ 'bootCheck.restartCore': 'Redémarrer',+ 'bootCheck.cloudNeedsUpdate': 'Votre serveur doit être mis à jour','bootCheck.cloudNeedsUpdateDesc':- 'Ton runtime cloud est sur une version différente de cette app. Lance la mise à jour pour les remettre en synchronisation.',+ "Votre serveur n'a pas la même version que cette application. Lancez la mise à jour pour les remettre en phase.",'bootCheck.updating': 'Mise à jour…',- 'bootCheck.updateCloudCore': 'Mettre à jour le runtime cloud',- 'bootCheck.versionCheckFailed': 'Échec de la vérification de la version du runtime',+ 'bootCheck.updateCloudCore': 'Mettre à jour le serveur',+ 'bootCheck.versionCheckFailed': 'Échec de la vérification de version','bootCheck.versionCheckFailedDesc':- 'Ton runtime est actif mais ne rapporte pas sa version. Il est peut-être obsolète. Redémarre-le ou mets-le à jour pour continuer.',+ 'Votre serveur est actif mais ne signale pas sa version. Il est peut-être obsolète. Redémarrez-le ou mettez-le à jour pour continuer.','bootCheck.working': 'En cours…',- 'bootCheck.restartUpdateCore': 'Redémarrer / Mettre à jour le runtime',+ 'bootCheck.restartUpdateCore': 'Redémarrer / Mettre à jour','bootCheck.unexpectedError': 'Erreur inattendue lors de la vérification au démarrage','bootCheck.actionFailed': "Une erreur s'est produite. Réessaie.",'bootCheck.portConflictTitle': "Impossible de démarrer le moteur de l'application",@@ -3504,6 +3541,8 @@ const messages: TranslationMap = {'Vos intégrations existantes (Gmail, Slack, GitHub, etc. liées via OpenHuman) ne seront pas visibles: elles vivent dans le tenant Composio géré par OpenHuman.','settings.composio.intro':"Composio intègre plus de 250 applications externes en tant qu'outils que votre agent peut appeler. Choisissez comment ces appels d'outils sont routés.",+ 'settings.composio.directOnlyDesc':+ 'L’authentification gérée de Composio n’est pas disponible ici. Saisis ta propre clé API Composio ou passe cette étape pour le moment.','settings.composio.modeDirect': 'Direct (apporte ta propre clé API)','settings.composio.modeDirectDesc':"Les appels vont directement à backend.composio.dev. Souverain / compatible hors ligne. L'exécution des outils fonctionne de manière synchrone ; les webhooks de déclencheurs en temps réel ne sont pas encore routés en mode direct (problème de suivi).",@@ -4458,15 +4497,18 @@ const messages: TranslationMap = {// Monthly cost badge// Onboarding: Custom > Vault- 'onboarding.custom.vault.title': 'Configuration de la mémoire et du coffre',+ 'onboarding.custom.vault.title': 'Donnez une mémoire à OpenHuman','onboarding.custom.vault.subtitle':- 'Confirmez où les notes de mémoire sont écrites, comment les données sources sont lues et si votre pipeline de coffre est en bon état.',+ "L'endroit où ce que vous lui dites est stocké, pour que cela se retrouve d'une conversation à l'autre.",'onboarding.custom.vault.defaultDesc':"Utiliser les paramètres de mémoire gérés par OpenHuman. Le chemin du coffre et l'état de synchronisation peuvent encore être consultés ultérieurement.",'onboarding.custom.vault.configureDesc':'Vérifiez la propriété du coffre, exécutez des contrôles de santé et affinez les contrôles de mémoire maintenant.','onboarding.custom.vault.localDisabledReason':"La configuration gérée nécessite une connexion à OpenHuman et n'est pas disponible en mode local.",+ 'onboarding.custom.localDefaultDisabledReason':+ 'La configuration gérée nécessite un compte OpenHuman. Dans une session locale, vous configurez chaque service vous-même.',+ 'onboarding.custom.unsavedChanges': 'Enregistrez vos modifications avant de continuer.','onboarding.custom.vault.exitError': "Impossible de terminer l'intégration. Veuillez réessayer.",// Memory Data@@ -4954,6 +4996,8 @@ const messages: TranslationMap = {'Votre session Codex a expiré. Reconnectez-la dans Paramètres → Intégrations.','chat_error.session_expired':'Votre session OpenHuman a expiré. Veuillez vous reconnecter pour continuer.',+ 'chat_error.local_session_managed_unavailable':+ 'Vous utilisez le profil local hors ligne, qui n’est associé à aucun compte OpenHuman : le modèle géré (cloud) ne peut donc pas être exécuté. Connectez-vous pour utiliser les modèles gérés, ou basculez le routage sur « Utilisez vos propres modèles » dans Connexions → Clés API → LLM et ajoutez votre propre fournisseur.','chat_error.action_budget':"Vous avez atteint le quota horaire d'actions d'OpenHuman. C'est une limite de sécurité locale, pas celle de votre fournisseur d'IA. La fenêtre se libère progressivement ; vous pouvez continuer à discuter dans ce fil et les étapes riches en outils reprendront à mesure que le quota se reconstitue.",'chat_error.max_iterations':@@ -5094,24 +5138,18 @@ const messages: TranslationMap = {'memoryPage.meta.url': 'Lien','memoryPage.off.title': 'La mémoire est désactivée','memoryPage.off.description':- 'Choisissez un moteur de mémoire pour commencer à mémoriser. Connectez-vous pour utiliser la mémoire TinyHumans, ou branchez votre propre CortexDB.',+ 'Connectez CortexDB pour commencer à mémoriser. Connectez-vous pour utiliser CortexDB intégré, ou utilisez votre propre clé API ou un serveur sur cet ordinateur.','memoryPage.off.action': 'Choisir un moteur',- 'memoryPage.engine.listTitle': 'Moteurs de mémoire',+ 'memoryPage.engine.listTitle': 'Mémoire CortexDB','memoryPage.engine.listDescription':- 'Un seul moteur est actif à la fois. Il stocke tout ce que la mémoire conserve et répond aux questions à son sujet.',- 'memoryPage.engine.loadError': 'Impossible de charger les moteurs de mémoire',+ "La mémoire fonctionne avec CortexDB. Choisissez comment cette app s'y connecte. Une seule connexion est active à la fois.",'memoryPage.engine.offExplanation':- "Aucun moteur de mémoire n'est utilisable pour le moment : rien n'est stocké ni rappelé. Connectez-vous pour utiliser la mémoire TinyHumans, ou branchez votre propre CortexDB avec un point de terminaison et une clé API.",+ "Aucune connexion mémoire n'est utilisable pour le moment : rien n'est enregistré ni rappelé. Connectez-vous pour utiliser CortexDB intégré, ou connectez CortexDB avec votre clé API ou sur cet ordinateur.",'memoryPage.engine.statusDegraded': 'La mémoire est dégradée','memoryPage.engine.statusDown': 'Le moteur de mémoire est injoignable','memoryPage.engine.statusOff': 'Désactivé','memoryPage.engine.active': 'Actif','memoryPage.engine.use': 'Utiliser',- 'memoryPage.engine.edit': 'Modifier',- 'memoryPage.engine.signInRequired': 'Connexion requise',- 'memoryPage.engine.hostedDetail': 'Hébergé par TinyHumans',- 'memoryPage.engine.selfHostedDetail': 'Votre propre point de terminaison et clé API',- 'memoryPage.engine.connectTitle': 'Connecter {engine}','memoryPage.engine.connect': 'Connecter','memoryPage.engine.endpoint': 'Point de terminaison','memoryPage.engine.apiKey': 'Clé API',@@ -5119,6 +5157,33 @@ const messages: TranslationMap = {'Enregistrée. Saisissez une nouvelle clé pour la remplacer','memoryPage.engine.keySavedHint':'Une clé est déjà enregistrée. Laissez ce champ vide pour la conserver.',+ 'memoryPage.engine.badgeDegraded': 'Dégradé',+ 'memoryPage.engine.badgeDown': 'Injoignable',+ 'memoryPage.engine.connecting': 'Connexion…',+ 'memoryPage.engine.save': 'Enregistrer',+ 'memoryPage.engine.builtin.title': 'CortexDB intégré',+ 'memoryPage.engine.builtin.detail': 'Inclus avec votre compte TinyHumans',+ 'memoryPage.engine.builtin.signInRequired': "Connectez-vous pour l'utiliser",+ 'memoryPage.engine.builtin.description':+ "CortexDB hébergé par TinyHumans et inclus avec votre compte. Connectez-vous pour l'utiliser ; rien à configurer.",+ 'memoryPage.engine.builtin.enrichmentNote':+ 'Les nouveaux souvenirs sont enregistrés immédiatement. Les faits et croyances qui en sont tirés se complètent dans les minutes qui suivent.',+ 'memoryPage.engine.builtin.signInHint':+ 'Connectez-vous à votre compte TinyHumans pour utiliser CortexDB intégré.',+ 'memoryPage.engine.apiKeyOption.title': 'CortexDB avec votre clé API',+ 'memoryPage.engine.apiKeyOption.description':+ 'Utilisez votre propre compte CortexDB. La clé est stockée de façon sécurisée sur cet ordinateur, jamais dans le fichier de configuration.',+ 'memoryPage.engine.selfHost.title': 'Auto-héberger CortexDB',+ 'memoryPage.engine.selfHost.detail': 'Un serveur CortexDB sur cet ordinateur',+ 'memoryPage.engine.selfHost.step1':+ 'Lancez un serveur CortexDB sur cet ordinateur en suivant le guide :',+ 'memoryPage.engine.selfHost.docsLink': "Guide d'auto-hébergement de CortexDB",+ 'memoryPage.engine.selfHost.step2':+ "Démarrez le serveur avec une clé API (CORTEX_API_KEY). L'app se connecte avec cette clé.",+ 'memoryPage.engine.selfHost.step3':+ "Saisissez ci-dessous l'adresse locale du serveur et la clé, puis connectez-vous.",+ 'memoryPage.engine.selfHost.notLocal':+ "L'auto-hébergement est uniquement local. Utilisez une adresse sur cet ordinateur, par exemple http://localhost:3141.",'memoryPage.ask.questionLabel': 'Votre question','memoryPage.ask.queryLabel': 'Requête de recherche','memoryPage.ask.placeholder': "Qu'avons-nous décidé pour le plan de lancement ?",@@ -5150,6 +5215,8 @@ const messages: TranslationMap = {'memoryPage.learnings.listTitle': 'Acquis','memoryPage.learnings.empty':"Aucun acquis pour l'instant. Ajoutez-en un ci-dessus, ou votre agent en ajoutera au fil de votre travail commun.",+ 'memoryPage.learnings.deriving':+ "Rien pour l'instant. La mémoire construit encore des croyances à partir de vos conversations récentes ; elles apparaîtront ici après la prochaine exécution en arrière-plan.",'memoryPage.learnings.delete': "Supprimer l'acquis",'memoryPage.conversations.turns': '{count} échanges','memoryPage.documents.listDescription':@@ -5328,6 +5395,7 @@ const messages: TranslationMap = {'memoryPage.import.running': "Importation de l'ancienne mémoire…",'memoryPage.import.done': 'Ancienne mémoire importée','memoryPage.import.failed': "Échec de l'importation",+ 'memoryPage.import.resume': "Reprendre l'importation",'memoryPage.import.progress': '{imported} éléments sur {total} importés',// Live voice agents'voice.live.mute': 'Couper le micro',diff --git a/app/src/lib/i18n/hi.ts b/app/src/lib/i18n/hi.tsindex 18fe87667c..3d00a4fe38 100644--- a/app/src/lib/i18n/hi.ts+++ b/app/src/lib/i18n/hi.ts@@ -437,6 +437,35 @@ const messages: TranslationMap = {'welcome.privacyPolicy': 'गोपनीयता नीति','welcome.termsOutro': '.','welcome.connect': 'टेस्ट करें',+ 'welcome.hero.subtitle': 'आपका AI, याददाश्त, आवाज़ और पूरे वेब के साथ।',+ 'welcome.th.title': 'TinyHumans के साथ जारी रखें',+ 'welcome.th.promise': 'एक अकाउंट। सब कुछ शामिल। कुछ भी कॉन्फ़िगर करने की ज़रूरत नहीं।',+ 'welcome.th.featureInference': 'इन्फ़रेंस',+ 'welcome.th.featureSearch': 'वेब सर्च',+ 'welcome.th.featureVoice': 'आवाज़',+ 'welcome.th.featureMemory': 'मेमोरी',+ 'welcome.th.featureEmbeddings': 'एम्बेडिंग',+ 'welcome.th.featureBilling': 'बिलिंग',+ 'welcome.th.credit': 'शुरुआत के लिए $5 का क्रेडिट',+ 'welcome.th.cta': 'TinyHumans के साथ जारी रखें',+ 'welcome.th.providers': 'Google, GitHub या X से साइन इन करें',+ 'welcome.self.title': 'मैं खुद सेट अप करूँगा',+ 'welcome.self.promise': 'अपनी API कुंजियाँ और एंडपॉइंट लाएँ।',+ 'welcome.self.listLabel': 'आप ये सेट अप करेंगे:',+ 'welcome.self.step1': 'इन्फ़रेंस',+ 'welcome.self.step2': 'वेब सर्च',+ 'welcome.self.step3': 'मेमोरी',+ 'welcome.self.time': 'लगभग 3 मिनट। कुछ भी बाद में सेटिंग्स में बदल सकते हैं।',+ 'welcome.self.cta': 'मैं खुद सेट अप करूँगा',+ 'welcome.serverPrompt': 'क्या आप पहले से किसी सर्वर पर OpenHuman चला रहे हैं?',+ 'welcome.serverCta': 'उससे कनेक्ट करें।',+ 'welcome.handoff.title': 'आपके ब्राउज़र में साइन-इन पूरा हो रहा है',+ 'welcome.handoff.body': 'हमने tinyhumans.ai खोला है। पूरा होने पर वापस आएँ।',+ 'welcome.handoff.reopen': 'पेज दोबारा खोलें',+ 'welcome.handoff.failedTitle': 'साइन-इन वापस नहीं आया',+ 'welcome.handoff.failedBody': 'हो सकता है ब्राउज़र ने OpenHuman पर वापसी को रोक दिया हो।',+ 'welcome.handoff.retry': 'फिर से कोशिश करें',+ 'welcome.handoff.fallbackSelf': 'इसके बजाय मैं खुद सेट अप करूँगा','home.askAssistant': 'असिस्टेंट से कुछ भी पूछें...','home.statusOk': 'आपका सहायक तैयार है। शुरू करने के लिए नीचे कुछ लिखें।','home.statusBackendOnly': 'बैकएंड से फिर से जुड़ रहे हैं… आपका एजेंट जल्द ही उपलब्ध होगा।',@@ -666,6 +695,12 @@ const messages: TranslationMap = {'memory.search': 'मेमोरी सर्च करें...','memory.noResults': 'कोई मेमोरी नहीं मिली','memory.empty': 'अभी कोई मेमोरी नहीं है। बातचीत के दौरान मेमोरी अपने आप बनती है।',+ 'memory.error.insufficientCredits':+ 'मेमोरी उपलब्ध नहीं है: आपके खाते के क्रेडिट खत्म हो गए हैं। इसे बहाल करने के लिए टॉप अप करें; संग्रहीत कुछ भी खोया नहीं है।',+ 'memory.error.unavailable':+ 'अभी मेमोरी तक नहीं पहुँचा जा सकता। संग्रहीत कुछ भी खोया नहीं है; थोड़ी देर में फिर से कोशिश करें।',+ 'memory.outOfCredits.title': 'क्रेडिट खत्म हो गए',+ 'memory.outOfCredits.action': 'टॉप अप करें','memory.tab.memory': 'मेमोरी','memory.tab.agents': 'लाइब्रेरी','memory.analyzeNow': 'अभी एनालाइज़ करें',@@ -747,9 +782,9 @@ const messages: TranslationMap = {'onboarding.custom.configureLater':'ऑनबोर्डिंग के बाद यह सेट कर सकते हैं। हो जाने पर आपको सही Settings पेज पर ले जाएंगे।','onboarding.custom.openSettings': 'Settings में खोलें',- 'onboarding.custom.inference.title': 'इनफरेंस (टेक्स्ट)',+ 'onboarding.custom.inference.title': 'मॉडल प्रोवाइडर चुनें','onboarding.custom.inference.subtitle':- 'कौन सा लैंग्वेज मॉडल आपके सवाल जवाब देगा और एजेंट चलाएगा?',+ 'OpenHuman को सोचने के लिए एक मॉडल चाहिए। जो प्रोवाइडर आप पहले से इस्तेमाल करते हैं उसकी कुंजी जोड़ें, या लोकल पर चल रहे किसी मॉडल की ओर इशारा करें।','onboarding.custom.inference.defaultDesc':'OpenHuman हर वर्कलोड के लिए खुद सही मॉडल चुनता है। कोई key नहीं, कोई सेटअप नहीं।','onboarding.custom.inference.configureDesc':@@ -766,12 +801,16 @@ const messages: TranslationMap = {'OpenHuman मैनेज्ड Composio वर्कस्पेस चलाता है। हर सर्विस एक क्लिक में कनेक्ट होती है।','onboarding.custom.oauth.configureDesc':'अपना Composio अकाउंट / API key लाएं। Settings › Connections में कॉन्फिगर करें।',- 'onboarding.custom.search.title': 'वेब सर्च',- 'onboarding.custom.search.subtitle': 'OpenHuman आपकी तरफ से वेब कैसे सर्च करता है।',+ 'onboarding.custom.search.title': 'OpenHuman को वेब पर खोजने दें',+ 'onboarding.custom.search.subtitle':+ 'इसके बिना, OpenHuman सिर्फ़ वही जानता है जिस पर उसे प्रशिक्षित किया गया था।','onboarding.custom.search.defaultDesc':'वेब सर्च तुरंत काम करता है: Exa और Gemini, TinyHumans में शामिल हैं, कोई API कुंजी नहीं चाहिए।','onboarding.custom.search.configureDesc':'Exa और Gemini शामिल हैं। सेटिंग्स › टूल्स में अपनी API कुंजी से और सर्च प्रदाता जोड़ें।',+ 'onboarding.custom.search.skipForNow': 'अभी के लिए छोड़ें',+ 'onboarding.custom.search.ready': 'वेब सर्च तैयार है।',+ 'onboarding.custom.search.notReady': 'नीचे कोई प्रदाता जोड़ें ताकि OpenHuman वेब पर सर्च कर सके।','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'OpenHuman सिमेंटिक मेमोरी खोज के लिए वेक्टर एम्बेडिंग कैसे बनाता है।',@@ -1624,62 +1663,60 @@ const messages: TranslationMap = {'stats.latest': 'सबसे नया','stats.sessions': 'सेशन','stats.tokens': 'टोकन',- 'bootCheck.invalidUrl': 'कृपया एक रनटाइम URL डालें।',+ 'bootCheck.invalidUrl': 'कृपया एक पता दर्ज करें।','bootCheck.urlMustStartWith': 'URL को http:// या https:// से शुरू होना चाहिए','bootCheck.validUrlRequired': 'यह सही URL नहीं लगता (कोशिश करें https://core.example.com/rpc)','bootCheck.tokenRequired': 'कनेक्ट करने के लिए एक auth टोकन चाहिए।','bootCheck.httpPublicWarning':'यह किसी सार्वजनिक होस्ट पर सादा HTTP URL है: ट्रैफ़िक एन्क्रिप्ट नहीं होगा। जब तक आपको इस नेटवर्क पर भरोसा न हो, HTTPS का उपयोग करें।',- 'bootCheck.chooseCoreMode': 'रनटाइम चुनें',- 'bootCheck.connectToCore': 'अपने रनटाइम से कनेक्ट करें',+ 'bootCheck.chooseCoreMode': 'OpenHuman कहाँ चलना चाहिए?',+ 'bootCheck.connectToCore': 'OpenHuman से कनेक्ट करें','bootCheck.desktopDescription':- 'OpenHuman को सोचने के लिए एक रनटाइम चाहिए। चुनें कि यह कहाँ रहे।',+ 'OpenHuman इस कंप्यूटर पर शुरू नहीं हो सका। चुनें कि यह कहाँ चलना चाहिए।','bootCheck.webDescription':- 'वेब पर, OpenHuman आपके कंट्रोल के रनटाइम से कनेक्ट होता है। नीचे URL और auth टोकन डालें, या अपनी मशीन पर चलाने के लिए डेस्कटॉप ऐप लें।',+ 'वेब पर OpenHuman आपके नियंत्रण वाले सर्वर से जुड़ता है। नीचे उसका पता और टोकन डालें, या उसे सीधे अपने कंप्यूटर पर चलाने के लिए डेस्कटॉप ऐप डाउनलोड करें।','bootCheck.preferDesktop': 'सब अपने डिवाइस पर रखना चाहते हैं?','bootCheck.downloadDesktop': 'डेस्कटॉप ऐप पाएं',- 'bootCheck.localRecommended': 'लोकल रन करें (सुझावित)',- 'bootCheck.localDescription':- 'आपके कंप्यूटर पर ही चलता है। सबसे तेज़, पूरी तरह प्राइवेट, कुछ सेट नहीं करना।',- 'bootCheck.cloudMode': 'क्लाउड पर चलाएं (जटिल)',+ 'bootCheck.localRecommended': 'इस कंप्यूटर पर',+ 'bootCheck.localDescription': 'सबसे तेज़, पूरी तरह निजी, कुछ भी सेट अप करने की ज़रूरत नहीं।',+ 'bootCheck.cloudMode': 'मेरे अपने सर्वर पर','bootCheck.cloudDescription':- 'कहीं और होस्ट किए रनटाइम से कनेक्ट करें। 24×7 ऑनलाइन रहता है, डिवाइस चलाते रहने की ज़रूरत नहीं।',- 'bootCheck.coreRpcUrl': 'रनटाइम URL',+ '24×7 ऑनलाइन रहता है, इसलिए इस कंप्यूटर को चालू रखने की ज़रूरत नहीं।',+ 'bootCheck.coreRpcUrl': 'पता','bootCheck.rpcUrlPlaceholder': 'https://core.example.com/rpc',- 'bootCheck.authToken': 'Auth टोकन',- 'bootCheck.bearerTokenPlaceholder': 'आपके रिमोट रनटाइम का bearer टोकन',+ 'bootCheck.authToken': 'टोकन',+ 'bootCheck.bearerTokenPlaceholder': 'आपके सर्वर का टोकन','bootCheck.storedLocally': 'केवल इस डिवाइस पर रखा जाता है। भेजा जाता है ','bootCheck.testing': 'टेस्ट हो रहा है…','bootCheck.testConnection': 'कनेक्शन टेस्ट करें','bootCheck.connectedOk': 'कनेक्ट हो गया। आप तैयार हैं।','bootCheck.authFailed': 'वह टोकन काम नहीं किया। दोबारा चेक करके कोशिश करें।','bootCheck.unreachablePrefix': 'नहीं पहुँच पाए:',- 'bootCheck.checkingCore': 'आपका रनटाइम जगा रहे हैं…',- 'bootCheck.cannotReach': 'रनटाइम तक नहीं पहुँच पाए',- 'bootCheck.cannotReachDesc':- 'आपके रनटाइम से कनेक्ट नहीं हो पाया। कोई और रनटाइम ट्राई करना चाहते हैं?',- 'bootCheck.switchMode': 'कोई और रनटाइम चुनें',+ 'bootCheck.checkingCore': 'OpenHuman शुरू हो रहा है…',+ 'bootCheck.cannotReach': 'पहुँच नहीं पा रहे',+ 'bootCheck.cannotReachDesc': 'हम कनेक्ट नहीं कर सके। क्या कहीं और कोशिश करना चाहेंगे?',+ 'bootCheck.switchMode': 'बदलें कि यह कहाँ चले','bootCheck.quit': 'बंद करें',- 'bootCheck.legacyDetected': 'पुराना बैकग्राउंड रनटाइम मिला',+ 'bootCheck.legacyDetected': 'पुरानी बैकग्राउंड सेवा मिली','bootCheck.legacyDescription':- 'इस डिवाइस पर अलग से इन्स्टॉल किया OpenHuman daemon पहले से चल रहा है। बिल्ट-इन रनटाइम शुरू होने से पहले इसे हटाना होगा।',+ 'इस डिवाइस पर अलग से इंस्टॉल किया गया OpenHuman डेमन पहले से चल रहा है। बिल्ट-इन वाले के काम संभालने से पहले हमें इसे हटाना होगा।','bootCheck.removing': 'हटाया जा रहा है…','bootCheck.removeContinue': 'हटाएं और जारी रखें',- 'bootCheck.localNeedsRestart': 'लोकल रनटाइम को रीस्टार्ट चाहिए',+ 'bootCheck.localNeedsRestart': 'OpenHuman को रीस्टार्ट करना होगा','bootCheck.localNeedsRestartDesc':- 'आपका लोकल रनटाइम इस ऐप से अलग वर्जन पर है। एक जल्दी रीस्टार्ट से दोनों सिंक हो जाएंगे।',+ 'इस कंप्यूटर पर OpenHuman का वर्शन इस ऐप से अलग है। एक छोटा रीस्टार्ट दोनों को फिर से मिला देगा।','bootCheck.restarting': 'रीस्टार्ट हो रहा है…',- 'bootCheck.restartCore': 'रनटाइम रीस्टार्ट करें',- 'bootCheck.cloudNeedsUpdate': 'क्लाउड रनटाइम को अपडेट चाहिए',+ 'bootCheck.restartCore': 'रीस्टार्ट करें',+ 'bootCheck.cloudNeedsUpdate': 'आपके सर्वर को अपडेट की ज़रूरत है','bootCheck.cloudNeedsUpdateDesc':- 'आपका क्लाउड रनटाइम इस ऐप से अलग वर्जन पर है। अपडेटर चलाएं ताकि दोनों सिंक हो जाएं।',+ 'आपके सर्वर का वर्शन इस ऐप से अलग है। दोनों को फिर से मिलाने के लिए अपडेटर चलाएँ।','bootCheck.updating': 'अपडेट हो रहा है…',- 'bootCheck.updateCloudCore': 'क्लाउड रनटाइम अपडेट करें',- 'bootCheck.versionCheckFailed': 'रनटाइम वर्जन चेक विफल',+ 'bootCheck.updateCloudCore': 'सर्वर अपडेट करें',+ 'bootCheck.versionCheckFailed': 'वर्शन जाँच विफल रही','bootCheck.versionCheckFailedDesc':- 'आपका रनटाइम चल रहा है लेकिन वर्जन रिपोर्ट नहीं कर रहा। शायद पुराना हो। जारी रखने के लिए रीस्टार्ट या अपडेट करें।',+ 'आपका सर्वर चल रहा है, लेकिन अपना वर्शन नहीं बता रहा। हो सकता है वह पुराना हो। जारी रखने के लिए उसे रीस्टार्ट या अपडेट करें।','bootCheck.working': 'काम हो रहा है…',- 'bootCheck.restartUpdateCore': 'रनटाइम रीस्टार्ट / अपडेट करें',+ 'bootCheck.restartUpdateCore': 'रीस्टार्ट / अपडेट करें','bootCheck.unexpectedError': 'अनपेक्षित बूट-चेक एरर','bootCheck.actionFailed': 'कुछ गड़बड़ हो गई। दोबारा कोशिश करें।','bootCheck.portConflictTitle': 'ऐप इंजन शुरू नहीं हो सका',@@ -3435,6 +3472,8 @@ const messages: TranslationMap = {'आपके मौजूदा एकीकरण (Gmail, Slack, GitHub, आदि OpenHuman के माध्यम से लिंक किए गए) दिखाई नहीं देंगे: वे OpenHuman-प्रबंधित Composio टेनेंट में रहते हैं।','settings.composio.intro':'Composio 250+ बाहरी ऐप्स को टूल्स के रूप में एकीकृत करता है जिन्हें आपका एजेंट कॉल कर सकता है। चुनें कि वे टूल कॉल कैसे रूट किए जाएँ।',+ 'settings.composio.directOnlyDesc':+ 'यहाँ Composio का प्रबंधित प्रमाणीकरण उपलब्ध नहीं है। अपनी Composio API कुंजी दर्ज करें या अभी यह चरण छोड़ दें।','settings.composio.modeDirect': 'डायरेक्ट (अपनी API key लाएं)','settings.composio.modeDirectDesc':'कॉल सीधे backend.composio.dev पर जाती हैं। संप्रभु / ऑफ़लाइन-अनुकूल। टूल निष्पादन सिंक्रोनस रूप से कार्य करता है; रीयल-टाइम ट्रिगर वेबहुक्स अभी डायरेक्ट मोड में रूट नहीं हैं (फॉलो-अप मुद्दा)।',@@ -4366,15 +4405,18 @@ const messages: TranslationMap = {// Monthly cost badge- 'onboarding.custom.vault.title': 'मेमोरी और वॉल्ट सेटअप',+ 'onboarding.custom.vault.title': 'OpenHuman को एक याददाश्त दें','onboarding.custom.vault.subtitle':- 'पुष्टि करें कि मेमोरी नोट्स कहाँ लिखे जाते हैं, स्रोत डेटा कैसे पढ़ा जाता है, और आपका वॉल्ट पाइपलाइन स्वस्थ है या नहीं।',+ 'जहाँ आप उसे जो बताते हैं वह सहेजा जाता है, ताकि वह अलग-अलग चैट में साथ रहे।','onboarding.custom.vault.defaultDesc':'OpenHuman-प्रबंधित मेमोरी डिफ़ॉल्ट का उपयोग करें। वॉल्ट पाथ और सिंक स्वास्थ्य बाद में भी देखे जा सकते हैं।','onboarding.custom.vault.configureDesc':'वॉल्ट स्वामित्व की समीक्षा करें, स्वास्थ्य जाँच चलाएँ और अभी मेमोरी नियंत्रण ठीक करें।','onboarding.custom.vault.localDisabledReason':'प्रबंधित सेटअप के लिए OpenHuman साइन-इन आवश्यक है और लोकल मोड में उपलब्ध नहीं है।',+ 'onboarding.custom.localDefaultDisabledReason':+ 'प्रबंधित सेटअप के लिए OpenHuman खाता आवश्यक है। लोकल सेशन में आपको हर सेवा खुद कॉन्फ़िगर करनी होती है।',+ 'onboarding.custom.unsavedChanges': 'आगे बढ़ने से पहले अपने बदलाव सहेजें।','onboarding.custom.vault.exitError': 'ऑनबोर्डिंग पूरी नहीं हो सकी। कृपया पुनः प्रयास करें।','skills.create.whenToUse': 'कब उपयोग करें','skills.create.whenToUsePlaceholder': 'उदा. जब उपयोगकर्ता अपना इनबॉक्स व्यवस्थित करने को कहे',@@ -4843,6 +4885,8 @@ const messages: TranslationMap = {'आपका Codex सत्र समाप्त हो गया है। कृपया इसे सेटिंग्स → इंटीग्रेशन में फिर से कनेक्ट करें।','chat_error.session_expired':'आपका OpenHuman सत्र समाप्त हो गया है। जारी रखने के लिए कृपया फिर से साइन इन करें।',+ 'chat_error.local_session_managed_unavailable':+ 'आप स्थानीय ऑफ़लाइन प्रोफ़ाइल पर हैं, जिसके पीछे कोई OpenHuman खाता नहीं है, इसलिए मैनेज्ड (क्लाउड) मॉडल नहीं चल सकता। मैनेज्ड मॉडल उपयोग करने के लिए साइन इन करें, या कनेक्शन → API कुंजियाँ → LLM में रूटिंग को "अपने खुद के मॉडल का प्रयोग करें" पर बदलकर अपना प्रोवाइडर जोड़ें।','chat_error.action_budget':'आप OpenHuman की प्रति-घंटा कार्रवाई सीमा तक पहुँच गए हैं। यह एक स्थानीय सुरक्षा सीमा है, आपके AI प्रदाता की नहीं। यह सीमा धीरे-धीरे बहाल होती है; आप इस थ्रेड में चैट जारी रख सकते हैं और सीमा भरते ही टूल-भारी चरण फिर शुरू हो जाएँगे।','chat_error.max_iterations':@@ -4977,30 +5021,49 @@ const messages: TranslationMap = {'memoryPage.meta.url': 'लिंक','memoryPage.off.title': 'मेमोरी बंद है','memoryPage.off.description':- 'याद रखना शुरू करने के लिए एक मेमोरी इंजन चुनें। TinyHumans मेमोरी इस्तेमाल करने के लिए साइन इन करें, या अपना CortexDB कनेक्ट करें।',+ 'याद रखना शुरू करने के लिए CortexDB कनेक्ट करें। बिल्ट-इन CortexDB इस्तेमाल करने के लिए साइन इन करें, या अपनी API कुंजी या इस कंप्यूटर के सर्वर से कनेक्ट करें।','memoryPage.off.action': 'इंजन चुनें',- 'memoryPage.engine.listTitle': 'मेमोरी इंजन',+ 'memoryPage.engine.listTitle': 'CortexDB मेमोरी','memoryPage.engine.listDescription':- 'एक समय में एक ही इंजन सक्रिय रहता है। मेमोरी जो कुछ भी रखती है, वह उसे सहेजता है और उससे जुड़े सवालों के जवाब देता है।',- 'memoryPage.engine.loadError': 'मेमोरी इंजन लोड नहीं हो सके',+ 'मेमोरी CortexDB पर चलती है। चुनें कि यह ऐप उससे कैसे जुड़े। एक समय में केवल एक कनेक्शन सक्रिय रहता है।','memoryPage.engine.offExplanation':- 'अभी कोई मेमोरी इंजन उपयोग के लायक नहीं है, इसलिए कुछ भी सहेजा या याद नहीं किया जा रहा। TinyHumans मेमोरी इस्तेमाल करने के लिए साइन इन करें, या एंडपॉइंट और API कुंजी के साथ अपना CortexDB कनेक्ट करें।',+ 'अभी कोई मेमोरी कनेक्शन उपयोग योग्य नहीं है, इसलिए कुछ भी सहेजा या याद नहीं किया जाता। बिल्ट-इन CortexDB इस्तेमाल करने के लिए साइन इन करें, या अपनी API कुंजी से या इस कंप्यूटर पर CortexDB कनेक्ट करें।','memoryPage.engine.statusDegraded': 'मेमोरी की सेवा में गिरावट है','memoryPage.engine.statusDown': 'मेमोरी इंजन तक पहुँचा नहीं जा सकता','memoryPage.engine.statusOff': 'बंद','memoryPage.engine.active': 'सक्रिय','memoryPage.engine.use': 'उपयोग करें',- 'memoryPage.engine.edit': 'संपादित करें',- 'memoryPage.engine.signInRequired': 'साइन इन ज़रूरी है',- 'memoryPage.engine.hostedDetail': 'TinyHumans द्वारा होस्ट किया गया',- 'memoryPage.engine.selfHostedDetail': 'आपका अपना एंडपॉइंट और API कुंजी',- 'memoryPage.engine.connectTitle': '{engine} कनेक्ट करें','memoryPage.engine.connect': 'कनेक्ट करें','memoryPage.engine.endpoint': 'एंडपॉइंट','memoryPage.engine.apiKey': 'API कुंजी','memoryPage.engine.keySavedPlaceholder': 'सहेजी जा चुकी है। बदलने के लिए नई कुंजी दर्ज करें','memoryPage.engine.keySavedHint':'एक कुंजी पहले से सहेजी हुई है। उसे रखने के लिए इसे खाली छोड़ें।',+ 'memoryPage.engine.badgeDegraded': 'धीमा',+ 'memoryPage.engine.badgeDown': 'पहुंच से बाहर',+ 'memoryPage.engine.connecting': 'कनेक्ट हो रहा है…',+ 'memoryPage.engine.save': 'सहेजें',+ 'memoryPage.engine.builtin.title': 'बिल्ट-इन CortexDB',+ 'memoryPage.engine.builtin.detail': 'आपके TinyHumans खाते में शामिल',+ 'memoryPage.engine.builtin.signInRequired': 'इस्तेमाल के लिए साइन इन करें',+ 'memoryPage.engine.builtin.description':+ 'TinyHumans द्वारा होस्ट किया गया और आपके खाते में शामिल CortexDB। इस्तेमाल के लिए साइन इन करें; कुछ भी सेट अप नहीं करना है।',+ 'memoryPage.engine.builtin.enrichmentNote':+ 'नई यादें तुरंत सहेजी जाती हैं। उनसे निकाले गए तथ्य और धारणाएं अगले कुछ मिनटों में जुड़ती हैं।',+ 'memoryPage.engine.builtin.signInHint':+ 'बिल्ट-इन CortexDB इस्तेमाल करने के लिए अपने TinyHumans खाते में साइन इन करें।',+ 'memoryPage.engine.apiKeyOption.title': 'आपकी API कुंजी के साथ CortexDB',+ 'memoryPage.engine.apiKeyOption.description':+ 'अपना CortexDB खाता इस्तेमाल करें। कुंजी इस कंप्यूटर पर सुरक्षित रूप से सहेजी जाती है, कॉन्फ़िग फ़ाइल में कभी नहीं।',+ 'memoryPage.engine.selfHost.title': 'CortexDB खुद होस्ट करें',+ 'memoryPage.engine.selfHost.detail': 'इस कंप्यूटर पर CortexDB सर्वर',+ 'memoryPage.engine.selfHost.step1': 'गाइड का पालन करके इस कंप्यूटर पर CortexDB सर्वर चलाएं:',+ 'memoryPage.engine.selfHost.docsLink': 'CortexDB सेल्फ-होस्टिंग गाइड',+ 'memoryPage.engine.selfHost.step2':+ 'सर्वर को API कुंजी (CORTEX_API_KEY) के साथ शुरू करें। ऐप उसी कुंजी से कनेक्ट होता है।',+ 'memoryPage.engine.selfHost.step3': 'नीचे सर्वर का लोकल पता और कुंजी डालें, फिर कनेक्ट करें।',+ 'memoryPage.engine.selfHost.notLocal':+ 'सेल्फ-होस्टिंग केवल लोकल है। इस कंप्यूटर का पता इस्तेमाल करें, जैसे http://localhost:3141।','memoryPage.ask.questionLabel': 'आपका सवाल','memoryPage.ask.queryLabel': 'खोज क्वेरी','memoryPage.ask.placeholder': 'लॉन्च प्लान के बारे में हमने क्या तय किया था?',@@ -5031,6 +5094,8 @@ const messages: TranslationMap = {'memoryPage.learnings.listTitle': 'सीखी बातें','memoryPage.learnings.empty':'अभी कोई सीखी बात नहीं है। ऊपर एक जोड़ें, या आपका एजेंट आपके साथ काम करते हुए खुद जोड़ देगा।',+ 'memoryPage.learnings.deriving':+ 'यहाँ अभी कुछ नहीं है। मेमोरी अभी भी आपकी हाल की बातचीत से धारणाएँ बना रही है; अगली बैकग्राउंड रन के बाद वे यहाँ दिखेंगी।','memoryPage.learnings.delete': 'सीखी बात हटाएँ','memoryPage.conversations.turns': '{count} टर्न','memoryPage.documents.listDescription':@@ -5207,6 +5272,7 @@ const messages: TranslationMap = {'memoryPage.import.running': 'पिछली मेमोरी इंपोर्ट हो रही है…','memoryPage.import.done': 'पिछली मेमोरी इंपोर्ट हो गई','memoryPage.import.failed': 'इंपोर्ट विफल रहा',+ 'memoryPage.import.resume': 'इंपोर्ट फिर से शुरू करें','memoryPage.import.progress': '{total} में से {imported} आइटम इंपोर्ट हुए',// Live voice agents'voice.live.mute': 'माइक्रोफ़ोन म्यूट करें',diff --git a/app/src/lib/i18n/id.ts b/app/src/lib/i18n/id.tsindex 8985799a8d..984c7f36c0 100644--- a/app/src/lib/i18n/id.ts+++ b/app/src/lib/i18n/id.ts@@ -441,6 +441,35 @@ const messages: TranslationMap = {'welcome.privacyPolicy': 'Kebijakan Privasi','welcome.termsOutro': '.','welcome.connect': 'Uji',+ 'welcome.hero.subtitle': 'AI Anda, dengan memori, suara, dan seluruh web.',+ 'welcome.th.title': 'Lanjutkan dengan TinyHumans',+ 'welcome.th.promise': 'Satu akun. Semua sudah termasuk. Tidak perlu konfigurasi.',+ 'welcome.th.featureInference': 'Inferensi',+ 'welcome.th.featureSearch': 'Pencarian web',+ 'welcome.th.featureVoice': 'Suara',+ 'welcome.th.featureMemory': 'Memori',+ 'welcome.th.featureEmbeddings': 'Embedding',+ 'welcome.th.featureBilling': 'Penagihan',+ 'welcome.th.credit': 'Kredit $5 untuk memulai',+ 'welcome.th.cta': 'Lanjutkan dengan TinyHumans',+ 'welcome.th.providers': 'Masuk dengan Google, GitHub, atau X',+ 'welcome.self.title': 'Siapkan sendiri',+ 'welcome.self.promise': 'Gunakan kunci API dan endpoint Anda sendiri.',+ 'welcome.self.listLabel': 'Anda akan menyiapkan:',+ 'welcome.self.step1': 'Inferensi',+ 'welcome.self.step2': 'Pencarian web',+ 'welcome.self.step3': 'Memori',+ 'welcome.self.time': 'Sekitar 3 menit. Ubah apa pun nanti di Pengaturan.',+ 'welcome.self.cta': 'Siapkan sendiri',+ 'welcome.serverPrompt': 'Sudah menjalankan OpenHuman di server?',+ 'welcome.serverCta': 'Hubungkan ke sana.',+ 'welcome.handoff.title': 'Menyelesaikan proses masuk di browser Anda',+ 'welcome.handoff.body': 'Kami membuka tinyhumans.ai. Kembali setelah selesai.',+ 'welcome.handoff.reopen': 'Buka halaman lagi',+ 'welcome.handoff.failedTitle': 'Proses masuk tidak kembali',+ 'welcome.handoff.failedBody': 'Browser mungkin memblokir kembalinya ke OpenHuman.',+ 'welcome.handoff.retry': 'Coba lagi',+ 'welcome.handoff.fallbackSelf': 'Siapkan sendiri saja','home.askAssistant': 'Tanyakan apa saja ke asisten Anda...','home.statusOk': 'Asistenmu siap kapan pun kamu siap. Ketik sesuatu di bawah untuk memulai.','home.statusBackendOnly':@@ -676,6 +705,12 @@ const messages: TranslationMap = {'memory.search': 'Cari memori...','memory.noResults': 'Memori tidak ditemukan','memory.empty': 'Belum ada memori. Memori dibuat otomatis saat Anda berinteraksi.',+ 'memory.error.insufficientCredits':+ 'Memori tidak tersedia: kredit akun Anda habis. Isi ulang untuk memulihkannya; tidak ada data tersimpan yang hilang.',+ 'memory.error.unavailable':+ 'Memori tidak dapat dijangkau saat ini. Tidak ada data tersimpan yang hilang; coba lagi sebentar lagi.',+ 'memory.outOfCredits.title': 'Kredit habis',+ 'memory.outOfCredits.action': 'Isi ulang','memory.tab.memory': 'Memori','memory.tab.agents': 'Perpustakaan','memory.analyzeNow': 'Analisis Sekarang',@@ -758,9 +793,9 @@ const messages: TranslationMap = {'onboarding.custom.configureLater':'Anda dapat menyelesaikan pengaturan ini setelah orientasi. Kami akan mengarahkan Anda ke halaman Pengaturan yang sesuai setelah selesai.','onboarding.custom.openSettings': 'Buka di Pengaturan',- 'onboarding.custom.inference.title': 'Inferensi (Teks)',+ 'onboarding.custom.inference.title': 'Pilih penyedia model','onboarding.custom.inference.subtitle':- 'Model bahasa mana yang harus menjawab pertanyaan dan menjalankan agen Anda?',+ 'OpenHuman membutuhkan model untuk berpikir. Tambahkan kunci untuk penyedia yang sudah Anda gunakan, atau arahkan ke model yang berjalan secara lokal.','onboarding.custom.inference.defaultDesc':'OpenHuman mengarahkan setiap beban kerja ke model default yang masuk akal. Tidak perlu key, tidak perlu pengaturan.','onboarding.custom.inference.configureDesc':@@ -778,12 +813,17 @@ const messages: TranslationMap = {'OpenHuman menjalankan workspace Composio terkelola. Satu klik untuk menghubungkan setiap layanan nanti.','onboarding.custom.oauth.configureDesc':'Bawa akun Composio / API key Anda sendiri. Konfigurasi di Pengaturan › Koneksi.',- 'onboarding.custom.search.title': 'Pencarian Web',- 'onboarding.custom.search.subtitle': 'Cara OpenHuman mencari web atas nama Anda.',+ 'onboarding.custom.search.title': 'Biarkan OpenHuman mencari di web',+ 'onboarding.custom.search.subtitle':+ 'Tanpa ini, OpenHuman hanya tahu apa yang dipelajarinya saat dilatih.','onboarding.custom.search.defaultDesc':'Pencarian web langsung berfungsi: Exa dan Gemini sudah termasuk dalam TinyHumans, tanpa kunci API.','onboarding.custom.search.configureDesc':'Exa dan Gemini sudah termasuk. Tambahkan penyedia pencarian lain dengan kunci API milik Anda di Pengaturan › Alat.',+ 'onboarding.custom.search.skipForNow': 'Lewati untuk saat ini',+ 'onboarding.custom.search.ready': 'Pencarian web sudah siap.',+ 'onboarding.custom.search.notReady':+ 'Tambahkan penyedia di bawah agar OpenHuman dapat mencari di web.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'Cara OpenHuman menghasilkan embedding vektor untuk pencarian memori semantik.',@@ -1637,62 +1677,60 @@ const messages: TranslationMap = {'stats.latest': 'Terbaru','stats.sessions': 'Sesi','stats.tokens': 'token',- 'bootCheck.invalidUrl': 'Masukkan URL runtime.',+ 'bootCheck.invalidUrl': 'Masukkan alamat.','bootCheck.urlMustStartWith': 'URL harus diawali dengan http:// atau https://','bootCheck.validUrlRequired': 'Itu bukan URL yang valid (coba https://core.example.com/rpc)','bootCheck.tokenRequired': 'Kami memerlukan token autentikasi untuk terhubung.','bootCheck.httpPublicWarning':'Ini adalah URL HTTP biasa pada host publik: lalu lintas tidak akan dienkripsi. Gunakan HTTPS kecuali Anda memercayai jaringan ini.',- 'bootCheck.chooseCoreMode': 'Pilih Runtime',- 'bootCheck.connectToCore': 'Hubungkan ke Runtime Anda',+ 'bootCheck.chooseCoreMode': 'Di mana OpenHuman harus berjalan?',+ 'bootCheck.connectToCore': 'Hubungkan ke OpenHuman','bootCheck.desktopDescription':- 'OpenHuman memerlukan runtime untuk berpikir. Pilih di mana runtime harus berada.',+ 'OpenHuman tidak dapat dimulai di komputer ini. Pilih di mana ia harus berjalan.','bootCheck.webDescription':- 'Di web, OpenHuman terhubung ke runtime yang Anda kendalikan. Masukkan URL dan token autentikasi di bawah, atau ambil aplikasi desktop untuk menjalankannya langsung di mesin Anda.',+ 'Di web, OpenHuman terhubung ke server yang Anda kendalikan. Masukkan alamat dan token-nya di bawah, atau unduh aplikasi desktop untuk menjalankannya langsung di perangkat Anda.','bootCheck.preferDesktop': 'Lebih suka menyimpan semuanya di perangkat Anda sendiri?','bootCheck.downloadDesktop': 'Dapatkan Aplikasi Desktop',- 'bootCheck.localRecommended': 'Jalankan Secara Lokal (Direkomendasikan)',- 'bootCheck.localDescription':- 'Berjalan langsung di komputer Anda. Tercepat, sepenuhnya privat, tidak perlu pengaturan.',- 'bootCheck.cloudMode': 'Jalankan di Cloud (Kompleks)',+ 'bootCheck.localRecommended': 'Di komputer ini',+ 'bootCheck.localDescription': 'Paling cepat, sepenuhnya privat, tanpa perlu pengaturan.',+ 'bootCheck.cloudMode': 'Di server yang saya kelola','bootCheck.cloudDescription':- 'Hubungkan ke runtime yang Anda hosting di tempat lain. Tetap online 24×7 sehingga Anda tidak perlu terus menjalankan perangkat ini.',- 'bootCheck.coreRpcUrl': 'URL Runtime',+ 'Tetap online 24 jam sehari, jadi komputer ini tidak perlu terus menyala.',+ 'bootCheck.coreRpcUrl': 'Alamat','bootCheck.rpcUrlPlaceholder': 'https://core.example.com/rpc',- 'bootCheck.authToken': 'Token Autentikasi',- 'bootCheck.bearerTokenPlaceholder': 'Token bearer dari runtime jarak jauh Anda',+ 'bootCheck.authToken': 'Token',+ 'bootCheck.bearerTokenPlaceholder': 'Token dari server Anda','bootCheck.storedLocally': 'Hanya disimpan di perangkat ini. Dikirim sebagai ','bootCheck.testing': 'Menguji...','bootCheck.testConnection': 'Uji Koneksi','bootCheck.connectedOk': 'Terhubung. Anda siap melanjutkan.','bootCheck.authFailed': 'Token tersebut tidak berfungsi. Periksa kembali dan coba lagi.','bootCheck.unreachablePrefix': 'Tidak dapat mencapainya:',- 'bootCheck.checkingCore': 'Membangunkan runtime Anda...',- 'bootCheck.cannotReach': 'Tidak Dapat Menjangkau Runtime',- 'bootCheck.cannotReachDesc':- 'Kami tidak dapat terhubung ke runtime Anda. Ingin mencoba yang berbeda?',- 'bootCheck.switchMode': 'Pilih Runtime Berbeda',+ 'bootCheck.checkingCore': 'Memulai OpenHuman…',+ 'bootCheck.cannotReach': 'Tidak dapat terhubung',+ 'bootCheck.cannotReachDesc': 'Kami tidak dapat terhubung. Ingin mencoba di tempat lain?',+ 'bootCheck.switchMode': 'Ubah tempat menjalankannya','bootCheck.quit': 'Keluar',- 'bootCheck.legacyDetected': 'Runtime Latar Belakang Lama Terdeteksi',+ 'bootCheck.legacyDetected': 'Layanan latar belakang lama ditemukan','bootCheck.legacyDescription':- 'Daemon OpenHuman yang diinstal terpisah sudah berjalan di perangkat ini. Kami perlu membersihkannya sebelum runtime bawaan dapat mengambil alih.',+ 'Daemon OpenHuman yang dipasang terpisah sudah berjalan di perangkat ini. Kami perlu menghapusnya sebelum yang bawaan dapat mengambil alih.','bootCheck.removing': 'Menghapus...','bootCheck.removeContinue': 'Hapus dan Lanjutkan',- 'bootCheck.localNeedsRestart': 'Runtime Lokal Perlu Dimulai Ulang',+ 'bootCheck.localNeedsRestart': 'OpenHuman perlu dimulai ulang','bootCheck.localNeedsRestartDesc':- 'Runtime lokal Anda menggunakan versi berbeda dari aplikasi ini. Mulai ulang cepat akan menyinkronkannya kembali.',+ 'OpenHuman di komputer ini memiliki versi yang berbeda dari aplikasi ini. Mulai ulang singkat akan menyinkronkannya kembali.','bootCheck.restarting': 'Memulai ulang...',- 'bootCheck.restartCore': 'Mulai Ulang Runtime',- 'bootCheck.cloudNeedsUpdate': 'Runtime Cloud Perlu Diperbarui',+ 'bootCheck.restartCore': 'Mulai ulang',+ 'bootCheck.cloudNeedsUpdate': 'Server Anda perlu diperbarui','bootCheck.cloudNeedsUpdateDesc':- 'Runtime cloud Anda menggunakan versi berbeda dari aplikasi ini. Jalankan pembaruan untuk menyinkronkannya kembali.',+ 'Server Anda memiliki versi yang berbeda dari aplikasi ini. Jalankan pembaruan untuk menyinkronkannya kembali.','bootCheck.updating': 'Memperbarui...',- 'bootCheck.updateCloudCore': 'Perbarui Runtime Cloud',- 'bootCheck.versionCheckFailed': 'Pemeriksaan Versi Runtime Gagal',+ 'bootCheck.updateCloudCore': 'Perbarui server',+ 'bootCheck.versionCheckFailed': 'Pemeriksaan versi gagal','bootCheck.versionCheckFailedDesc':- 'Runtime Anda aktif tetapi tidak melaporkan versinya. Mungkin sudah usang. Mulai ulang atau perbarui untuk melanjutkan.',+ 'Server Anda aktif tetapi tidak melaporkan versinya. Mungkin sudah usang. Mulai ulang atau perbarui untuk melanjutkan.','bootCheck.working': 'Memproses...',- 'bootCheck.restartUpdateCore': 'Mulai Ulang / Perbarui Runtime',+ 'bootCheck.restartUpdateCore': 'Mulai ulang / Perbarui','bootCheck.unexpectedError': 'Kesalahan Boot-Check Tak Terduga','bootCheck.actionFailed': 'Terjadi kesalahan. Silakan coba lagi.','bootCheck.portConflictTitle': 'Tidak dapat memulai mesin aplikasi',@@ -3457,6 +3495,8 @@ const messages: TranslationMap = {'Integrasi Anda yang sudah ada (Gmail, Slack, GitHub, dll. yang terhubung melalui OpenHuman) tidak akan terlihat: mereka berada di tenant Composio yang dikelola OpenHuman.','settings.composio.intro':'Composio mengintegrasikan 250+ aplikasi eksternal sebagai tool yang dapat dipanggil agen Anda. Pilih cara pemanggilan tool tersebut dirutekan.',+ 'settings.composio.directOnlyDesc':+ 'Autentikasi Composio terkelola tidak tersedia di sini. Masukkan kunci API Composio Anda sendiri atau lewati langkah ini untuk sementara.','settings.composio.modeDirect': 'Langsung (bawa API key Anda sendiri)','settings.composio.modeDirectDesc':'Panggilan langsung ke backend.composio.dev. Berdaulat / ramah offline. Eksekusi tool berjalan sinkron; webhook trigger real-time belum dirutekan dalam mode direct (isu lanjutan).',@@ -4394,15 +4434,18 @@ const messages: TranslationMap = {// Monthly cost badge- 'onboarding.custom.vault.title': 'Pengaturan Memori & Vault',+ 'onboarding.custom.vault.title': 'Beri OpenHuman ingatan','onboarding.custom.vault.subtitle':- 'Konfirmasi di mana catatan memori ditulis, bagaimana data sumber dibaca, dan apakah pipeline vault Anda sehat.',+ 'Tempat apa yang Anda sampaikan disimpan, agar terbawa di berbagai obrolan.','onboarding.custom.vault.defaultDesc':'Gunakan default memori yang dikelola OpenHuman. Jalur vault dan kondisi sinkronisasi tetap dapat ditinjau nanti.','onboarding.custom.vault.configureDesc':'Tinjau kepemilikan vault, jalankan pemeriksaan kesehatan, dan sesuaikan kontrol memori sekarang.','onboarding.custom.vault.localDisabledReason':'Pengaturan terkelola memerlukan masuk OpenHuman dan tidak tersedia dalam mode lokal.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'Pengaturan terkelola memerlukan akun OpenHuman. Dalam sesi lokal, Anda mengonfigurasi setiap layanan sendiri.',+ 'onboarding.custom.unsavedChanges': 'Simpan perubahan Anda sebelum melanjutkan.','onboarding.custom.vault.exitError': 'Tidak dapat menyelesaikan orientasi. Silakan coba lagi.','skills.create.whenToUse': 'Kapan digunakan','skills.create.whenToUsePlaceholder': 'mis. saat pengguna meminta untuk memilah kotak masuk',@@ -4881,6 +4924,8 @@ const messages: TranslationMap = {'Sesi Codex Anda telah kedaluwarsa. Hubungkan kembali di Pengaturan → Integrasi.','chat_error.session_expired':'Sesi OpenHuman Anda telah kedaluwarsa. Silakan masuk lagi untuk melanjutkan.',+ 'chat_error.local_session_managed_unavailable':+ 'Anda berada di profil lokal offline, yang tidak memiliki akun OpenHuman di belakangnya, jadi model terkelola (cloud) tidak dapat dijalankan. Masuk untuk memakai model terkelola, atau ubah perutean ke "Gunakan Model Anda Sendiri" di Koneksi → Kunci API → LLM lalu tambahkan penyedia Anda sendiri.','chat_error.action_budget':'Anda telah mencapai batas aksi per jam OpenHuman. Ini adalah batas keamanan lokal, bukan dari penyedia AI Anda. Batas ini pulih secara bertahap; Anda tetap bisa mengobrol di utas ini dan langkah yang banyak memakai alat akan berlanjut seiring batas terisi kembali.','chat_error.max_iterations':@@ -5018,29 +5063,50 @@ const messages: TranslationMap = {'memoryPage.meta.url': 'Tautan','memoryPage.off.title': 'Memori nonaktif','memoryPage.off.description':- 'Pilih mesin memori untuk mulai mengingat. Masuk untuk menggunakan memori TinyHumans, atau hubungkan CortexDB Anda sendiri.',+ 'Hubungkan CortexDB untuk mulai mengingat. Masuk untuk memakai CortexDB bawaan, atau hubungkan dengan kunci API Anda sendiri atau server di komputer ini.','memoryPage.off.action': 'Pilih mesin',- 'memoryPage.engine.listTitle': 'Mesin memori',+ 'memoryPage.engine.listTitle': 'Memori CortexDB','memoryPage.engine.listDescription':- 'Satu mesin aktif dalam satu waktu. Mesin ini menyimpan semua yang diingat memori dan menjawab pertanyaan tentangnya.',- 'memoryPage.engine.loadError': 'Tidak dapat memuat mesin memori',+ 'Memori berjalan di CortexDB. Pilih cara aplikasi ini terhubung ke sana. Hanya satu koneksi yang aktif pada satu waktu.','memoryPage.engine.offExplanation':- 'Saat ini tidak ada mesin memori yang dapat digunakan, jadi tidak ada yang disimpan atau diingat. Masuk untuk menggunakan memori TinyHumans, atau hubungkan CortexDB Anda sendiri dengan endpoint dan API key.',+ 'Saat ini tidak ada koneksi memori yang bisa dipakai, jadi tidak ada yang disimpan atau diingat. Masuk untuk memakai CortexDB bawaan, atau hubungkan CortexDB dengan kunci API Anda atau di komputer ini.','memoryPage.engine.statusDegraded': 'Memori mengalami gangguan','memoryPage.engine.statusDown': 'Mesin memori tidak dapat dijangkau','memoryPage.engine.statusOff': 'Nonaktif','memoryPage.engine.active': 'Aktif','memoryPage.engine.use': 'Gunakan',- 'memoryPage.engine.edit': 'Ubah',- 'memoryPage.engine.signInRequired': 'Perlu masuk',- 'memoryPage.engine.hostedDetail': 'Dihosting oleh TinyHumans',- 'memoryPage.engine.selfHostedDetail': 'Endpoint dan API key milik Anda sendiri',- 'memoryPage.engine.connectTitle': 'Hubungkan {engine}','memoryPage.engine.connect': 'Hubungkan','memoryPage.engine.endpoint': 'Endpoint','memoryPage.engine.apiKey': 'Kunci API','memoryPage.engine.keySavedPlaceholder': 'Tersimpan. Masukkan kunci baru untuk menggantinya','memoryPage.engine.keySavedHint': 'Kunci sudah tersimpan. Biarkan kosong untuk tetap memakainya.',+ 'memoryPage.engine.badgeDegraded': 'Menurun',+ 'memoryPage.engine.badgeDown': 'Tidak terjangkau',+ 'memoryPage.engine.connecting': 'Menghubungkan…',+ 'memoryPage.engine.save': 'Simpan',+ 'memoryPage.engine.builtin.title': 'CortexDB bawaan',+ 'memoryPage.engine.builtin.detail': 'Termasuk dalam akun TinyHumans Anda',+ 'memoryPage.engine.builtin.signInRequired': 'Masuk untuk memakai',+ 'memoryPage.engine.builtin.description':+ 'CortexDB yang di-host oleh TinyHumans dan sudah termasuk dalam akun Anda. Masuk untuk memakainya; tidak ada yang perlu disiapkan.',+ 'memoryPage.engine.builtin.enrichmentNote':+ 'Memori baru langsung disimpan. Fakta dan keyakinan yang diambil darinya terisi dalam beberapa menit berikutnya.',+ 'memoryPage.engine.builtin.signInHint':+ 'Masuk ke akun TinyHumans Anda untuk memakai CortexDB bawaan.',+ 'memoryPage.engine.apiKeyOption.title': 'CortexDB dengan kunci API Anda',+ 'memoryPage.engine.apiKeyOption.description':+ 'Gunakan akun CortexDB Anda sendiri. Kunci disimpan dengan aman di komputer ini, tidak pernah di file konfigurasi.',+ 'memoryPage.engine.selfHost.title': 'Host CortexDB sendiri',+ 'memoryPage.engine.selfHost.detail': 'Server CortexDB di komputer ini',+ 'memoryPage.engine.selfHost.step1':+ 'Jalankan server CortexDB di komputer ini dengan mengikuti panduan:',+ 'memoryPage.engine.selfHost.docsLink': 'Panduan self-hosting CortexDB',+ 'memoryPage.engine.selfHost.step2':+ 'Jalankan server dengan kunci API (CORTEX_API_KEY). Aplikasi terhubung dengan kunci itu.',+ 'memoryPage.engine.selfHost.step3':+ 'Masukkan alamat lokal server dan kuncinya di bawah, lalu hubungkan.',+ 'memoryPage.engine.selfHost.notLocal':+ 'Self-hosting hanya lokal. Gunakan alamat di komputer ini, seperti http://localhost:3141.','memoryPage.ask.questionLabel': 'Pertanyaan Anda','memoryPage.ask.queryLabel': 'Kueri pencarian','memoryPage.ask.placeholder': 'Apa yang kita putuskan tentang rencana peluncuran?',@@ -5071,6 +5137,8 @@ const messages: TranslationMap = {'memoryPage.learnings.listTitle': 'Pembelajaran','memoryPage.learnings.empty':'Belum ada pembelajaran. Tambahkan satu di atas, atau agen Anda akan menambahkannya saat bekerja bersama Anda.',+ 'memoryPage.learnings.deriving':+ 'Belum ada apa-apa. Memori masih membangun keyakinan dari percakapan terbaru Anda; keyakinan akan muncul di sini setelah proses latar belakang berikutnya.','memoryPage.learnings.delete': 'Hapus pembelajaran','memoryPage.conversations.turns': '{count} giliran','memoryPage.documents.listDescription':@@ -5248,6 +5316,7 @@ const messages: TranslationMap = {'memoryPage.import.running': 'Mengimpor memori sebelumnya…','memoryPage.import.done': 'Memori sebelumnya telah diimpor','memoryPage.import.failed': 'Impor gagal',+ 'memoryPage.import.resume': 'Lanjutkan impor','memoryPage.import.progress': '{imported} dari {total} item diimpor',// Live voice agents'voice.live.mute': 'Bisukan mikrofon',diff --git a/app/src/lib/i18n/it.ts b/app/src/lib/i18n/it.tsindex 3ca309e2d1..d1167e14b5 100644--- a/app/src/lib/i18n/it.ts+++ b/app/src/lib/i18n/it.ts@@ -447,6 +447,35 @@ const messages: TranslationMap = {'welcome.privacyPolicy': 'Informativa sulla privacy','welcome.termsOutro': '.','welcome.connect': 'Test',+ 'welcome.hero.subtitle': 'La tua IA, con memoria, voce e tutto il web.',+ 'welcome.th.title': 'Continua con TinyHumans',+ 'welcome.th.promise': 'Un solo account. Tutto incluso. Niente da configurare.',+ 'welcome.th.featureInference': 'Inferenza',+ 'welcome.th.featureSearch': 'Ricerca web',+ 'welcome.th.featureVoice': 'Voce',+ 'welcome.th.featureMemory': 'Memoria',+ 'welcome.th.featureEmbeddings': 'Embedding',+ 'welcome.th.featureBilling': 'Fatturazione',+ 'welcome.th.credit': '5 $ di credito per iniziare',+ 'welcome.th.cta': 'Continua con TinyHumans',+ 'welcome.th.providers': 'Accedi con Google, GitHub o X',+ 'welcome.self.title': 'Lo configuro io',+ 'welcome.self.promise': 'Porta le tue chiavi API e i tuoi endpoint.',+ 'welcome.self.listLabel': 'Configurerai:',+ 'welcome.self.step1': 'Inferenza',+ 'welcome.self.step2': 'Ricerca web',+ 'welcome.self.step3': 'Memoria',+ 'welcome.self.time': 'Circa 3 minuti. Cambia tutto più tardi in Impostazioni.',+ 'welcome.self.cta': 'Lo configuro io',+ 'welcome.serverPrompt': 'Esegui già OpenHuman su un server?',+ 'welcome.serverCta': 'Connettiti.',+ 'welcome.handoff.title': "Completamento dell'accesso nel browser",+ 'welcome.handoff.body': 'Abbiamo aperto tinyhumans.ai: torna quando hai finito.',+ 'welcome.handoff.reopen': 'Riapri la pagina',+ 'welcome.handoff.failedTitle': "L'accesso non è tornato indietro",+ 'welcome.handoff.failedBody': 'Il browser potrebbe aver bloccato il ritorno a OpenHuman.',+ 'welcome.handoff.retry': 'Riprova',+ 'welcome.handoff.fallbackSelf': 'Preferisco configurarlo io','home.askAssistant': 'Chiedi qualsiasi cosa al tuo assistente...','home.statusOk':'Il tuo assistente è pronto quando lo sei tu. Scrivi qualcosa qui sotto per iniziare.',@@ -685,6 +714,12 @@ const messages: TranslationMap = {'memory.noResults': 'Nessuna memoria trovata','memory.empty':'Nessuna memoria ancora. Le memorie vengono create automaticamente mentre interagisci.',+ 'memory.error.insufficientCredits':+ 'La memoria non è disponibile: il tuo account ha esaurito i crediti. Ricarica per ripristinarla; nulla di quanto salvato è andato perso.',+ 'memory.error.unavailable':+ 'Al momento la memoria non è raggiungibile. Nulla di quanto salvato è andato perso; riprova tra poco.',+ 'memory.outOfCredits.title': 'Crediti esauriti',+ 'memory.outOfCredits.action': 'Ricarica','memory.tab.memory': 'Memoria','memory.tab.agents': 'Libreria','memory.analyzeNow': 'Analizza ora',@@ -766,9 +801,9 @@ const messages: TranslationMap = {'onboarding.custom.configureLater':"Puoi finire di configurare dopo l'onboarding. Ti porteremo alla pagina Impostazioni corrispondente al termine.",'onboarding.custom.openSettings': 'Apri in Impostazioni',- 'onboarding.custom.inference.title': 'Inferenza (testo)',+ 'onboarding.custom.inference.title': 'Scegli un fornitore di modelli','onboarding.custom.inference.subtitle':- 'Quale modello linguistico dovrebbe rispondere alle tue domande ed eseguire i tuoi agenti?',+ 'OpenHuman ha bisogno di un modello con cui ragionare. Aggiungi una chiave per un fornitore che già usi, oppure punta a uno in esecuzione in locale.','onboarding.custom.inference.defaultDesc':'OpenHuman instrada ogni carico di lavoro a un modello predefinito sensato. Niente chiavi, niente configurazione.','onboarding.custom.inference.configureDesc':@@ -786,12 +821,17 @@ const messages: TranslationMap = {'OpenHuman gestisce un workspace Composio gestito. Un clic per connettere ogni servizio in seguito.','onboarding.custom.oauth.configureDesc':'Porta il tuo account Composio / chiave API. Configura in Impostazioni › Connessioni.',- 'onboarding.custom.search.title': 'Ricerca web',- 'onboarding.custom.search.subtitle': 'Come OpenHuman cerca sul web per tuo conto.',+ 'onboarding.custom.search.title': 'Lascia che OpenHuman cerchi sul web',+ 'onboarding.custom.search.subtitle':+ 'Senza questo, OpenHuman conosce solo ciò su cui è stato addestrato.','onboarding.custom.search.defaultDesc':'La ricerca web funziona subito: Exa e Gemini sono inclusi con TinyHumans, senza chiave API.','onboarding.custom.search.configureDesc':'Exa e Gemini sono inclusi. Aggiungi altri fornitori di ricerca con la tua chiave API in Impostazioni › Strumenti.',+ 'onboarding.custom.search.skipForNow': 'Salta per ora',+ 'onboarding.custom.search.ready': 'La ricerca web è pronta.',+ 'onboarding.custom.search.notReady':+ 'Aggiungi un fornitore qui sotto così OpenHuman potrà cercare sul web.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'Come OpenHuman genera gli embedding vettoriali per la ricerca nella memoria semantica.',@@ -1656,62 +1696,60 @@ const messages: TranslationMap = {'stats.latest': 'Ultime','stats.sessions': 'Sessioni','stats.tokens': 'token',- 'bootCheck.invalidUrl': 'Inserisci un URL di runtime.',+ 'bootCheck.invalidUrl': 'Inserisci un indirizzo.','bootCheck.urlMustStartWith': "L'URL deve iniziare con http:// o https://",'bootCheck.validUrlRequired': 'Non sembra un URL valido (prova https://core.example.com/rpc)','bootCheck.tokenRequired': 'Servirà un token di autenticazione per connettersi.','bootCheck.httpPublicWarning':'Questo è un URL HTTP in chiaro su un host pubblico: il traffico non sarà cifrato. Usa HTTPS a meno che tu non ti fidi di questa rete.',- 'bootCheck.chooseCoreMode': 'Seleziona un runtime',- 'bootCheck.connectToCore': 'Connetti al tuo runtime',+ 'bootCheck.chooseCoreMode': 'Dove deve funzionare OpenHuman?',+ 'bootCheck.connectToCore': 'Connettiti a OpenHuman','bootCheck.desktopDescription':- 'OpenHuman ha bisogno di un runtime per pensare. Scegli dove farlo girare.',+ 'OpenHuman non è riuscito ad avviarsi su questo computer. Scegli dove deve funzionare.','bootCheck.webDescription':- "Sul web, OpenHuman si connette a un runtime che controlli tu. Inserisci sotto URL e token di autenticazione, oppure scarica l'app desktop per farne girare uno direttamente sulla tua macchina.",+ "Sul web, OpenHuman si connette a un server che controlli tu. Inserisci qui sotto il suo indirizzo e il token, oppure scarica l'app desktop per eseguirlo direttamente sul tuo computer.",'bootCheck.preferDesktop': 'Preferisci tenere tutto sul tuo dispositivo?','bootCheck.downloadDesktop': "Scarica l'app desktop",- 'bootCheck.localRecommended': 'Esegui localmente (consigliato)',- 'bootCheck.localDescription':- 'Gira direttamente sul tuo computer. Più veloce, completamente privato, niente da configurare.',- 'bootCheck.cloudMode': 'Esegui sul cloud (complesso)',+ 'bootCheck.localRecommended': 'Su questo computer',+ 'bootCheck.localDescription': 'Il più veloce, completamente privato, niente da configurare.',+ 'bootCheck.cloudMode': 'Su un server che gestisco io','bootCheck.cloudDescription':- 'Connettiti a un runtime che stai ospitando altrove. Resta online 24×7 così non devi tenere acceso questo dispositivo.',- 'bootCheck.coreRpcUrl': 'URL runtime',+ 'Resta online 24 ore su 24, così non devi tenere acceso questo computer.',+ 'bootCheck.coreRpcUrl': 'Indirizzo','bootCheck.rpcUrlPlaceholder': 'https://core.example.com/rpc',- 'bootCheck.authToken': 'Token di autenticazione',- 'bootCheck.bearerTokenPlaceholder': 'Il bearer token del tuo runtime remoto',+ 'bootCheck.authToken': 'Token',+ 'bootCheck.bearerTokenPlaceholder': 'Il token del tuo server','bootCheck.storedLocally': 'Conservato solo su questo dispositivo. Inviato come ','bootCheck.testing': 'Test in corso…','bootCheck.testConnection': 'Prova connessione','bootCheck.connectedOk': 'Connesso. Tutto a posto.','bootCheck.authFailed': 'Token non valido. Controllalo e riprova.','bootCheck.unreachablePrefix': 'Impossibile raggiungerlo:',- 'bootCheck.checkingCore': 'Attivazione del runtime…',- 'bootCheck.cannotReach': 'Impossibile raggiungere il runtime',- 'bootCheck.cannotReachDesc':- 'Non siamo riusciti a connetterci al tuo runtime. Vuoi provarne uno diverso?',- 'bootCheck.switchMode': 'Scegli un runtime diverso',+ 'bootCheck.checkingCore': 'Avvio di OpenHuman…',+ 'bootCheck.cannotReach': 'Impossibile raggiungerlo',+ 'bootCheck.cannotReachDesc': 'Non siamo riusciti a connetterci. Vuoi provare altrove?',+ 'bootCheck.switchMode': 'Cambia dove funziona','bootCheck.quit': 'Esci',- 'bootCheck.legacyDetected': 'Runtime in background legacy rilevato',+ 'bootCheck.legacyDetected': 'Trovato un vecchio servizio in background','bootCheck.legacyDescription':- 'Un daemon OpenHuman installato separatamente è già in esecuzione su questo dispositivo. Dobbiamo rimuoverlo prima che il runtime integrato possa subentrare.',+ 'Su questo dispositivo è già in esecuzione un daemon OpenHuman installato separatamente. Dobbiamo rimuoverlo prima che quello integrato possa subentrare.','bootCheck.removing': 'Rimozione…','bootCheck.removeContinue': 'Rimuovi e continua',- 'bootCheck.localNeedsRestart': 'Il runtime locale necessita di un riavvio',+ 'bootCheck.localNeedsRestart': 'OpenHuman deve essere riavviato','bootCheck.localNeedsRestartDesc':- "Il tuo runtime locale ha una versione diversa da quella dell'app. Un riavvio rapido li riallineerà.",+ 'OpenHuman su questo computer ha una versione diversa da questa app. Un rapido riavvio li riallineerà.','bootCheck.restarting': 'Riavvio…',- 'bootCheck.restartCore': 'Riavvia runtime',- 'bootCheck.cloudNeedsUpdate': 'Il runtime cloud necessita di un aggiornamento',+ 'bootCheck.restartCore': 'Riavvia',+ 'bootCheck.cloudNeedsUpdate': 'Il tuo server richiede un aggiornamento','bootCheck.cloudNeedsUpdateDesc':- "Il tuo runtime cloud ha una versione diversa da quella dell'app. Esegui l'updater per riallinearli.",+ "Il tuo server ha una versione diversa da questa app. Esegui l'aggiornamento per riallinearli.",'bootCheck.updating': 'Aggiornamento…',- 'bootCheck.updateCloudCore': 'Aggiorna runtime cloud',- 'bootCheck.versionCheckFailed': 'Verifica versione runtime fallita',+ 'bootCheck.updateCloudCore': 'Aggiorna server',+ 'bootCheck.versionCheckFailed': 'Controllo della versione non riuscito','bootCheck.versionCheckFailedDesc':- 'Il runtime è attivo ma non comunica la sua versione. Potrebbe essere obsoleto. Riavvialo o aggiornalo per continuare.',+ 'Il tuo server è attivo ma non comunica la propria versione. Potrebbe essere obsoleto. Riavvialo o aggiornalo per continuare.','bootCheck.working': 'Elaborazione…',- 'bootCheck.restartUpdateCore': 'Riavvia / aggiorna runtime',+ 'bootCheck.restartUpdateCore': 'Riavvia / Aggiorna','bootCheck.unexpectedError': 'Errore inatteso del controllo di avvio','bootCheck.actionFailed': 'Qualcosa è andato storto. Riprova.','bootCheck.portConflictTitle': "Impossibile avviare il motore dell'app",@@ -3484,6 +3522,8 @@ const messages: TranslationMap = {'Le tue integrazioni esistenti (Gmail, Slack, GitHub, ecc. collegate tramite OpenHuman) non saranno visibili: risiedono nel tenant Composio gestito da OpenHuman.','settings.composio.intro':'Composio integra oltre 250 app esterne come strumenti che il tuo agente può chiamare. Scegli come instradare queste chiamate.',+ 'settings.composio.directOnlyDesc':+ 'L’autenticazione gestita di Composio non è disponibile qui. Inserisci la tua chiave API Composio o salta questo passaggio per ora.','settings.composio.modeDirect': 'Diretta (usa la tua chiave API)','settings.composio.modeDirectDesc':"Le chiamate vanno direttamente a backend.composio.dev. Sovrana / offline-friendly. L'esecuzione degli strumenti funziona in modo sincrono; i webhook dei trigger in tempo reale non sono ancora instradati in modalità diretta (issue di follow-up).",@@ -4433,15 +4473,18 @@ const messages: TranslationMap = {// Monthly cost badge// Onboarding: Custom > Vault- 'onboarding.custom.vault.title': 'Configurazione memoria e Vault',+ 'onboarding.custom.vault.title': 'Dai una memoria a OpenHuman','onboarding.custom.vault.subtitle':- 'Conferma dove vengono scritte le note di memoria, come vengono letti i dati sorgente e se la pipeline del vault è integra.',+ "Dove viene salvato ciò che gli dici, così resta da una chat all'altra.",'onboarding.custom.vault.defaultDesc':'Usa le impostazioni di memoria predefinite gestite da OpenHuman. Il percorso del vault e la salute della sincronizzazione possono essere verificati in seguito.','onboarding.custom.vault.configureDesc':'Verifica la proprietà del vault, esegui controlli di integrità e ottimizza i controlli della memoria ora.','onboarding.custom.vault.localDisabledReason':'La configurazione gestita richiede il login a OpenHuman e non è disponibile in modalità locale.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'La configurazione gestita richiede un account OpenHuman. In una sessione locale configuri ogni servizio da solo.',+ 'onboarding.custom.unsavedChanges': 'Salva le modifiche prima di continuare.','onboarding.custom.vault.exitError': "Impossibile completare l'onboarding. Riprova.",// Memory Data@@ -4921,6 +4964,8 @@ const messages: TranslationMap = {'La tua sessione Codex è scaduta. Ricollegala in Impostazioni → Integrazioni.','chat_error.session_expired':'La tua sessione OpenHuman è scaduta. Accedi di nuovo per continuare.',+ 'chat_error.local_session_managed_unavailable':+ 'Sei nel profilo locale offline, che non ha alcun account OpenHuman alle spalle, quindi il modello gestito (cloud) non può essere eseguito. Accedi per usare i modelli gestiti, oppure imposta l\'instradamento su "Utilizza i tuoi modelli" in Connessioni → Chiavi API → LLM e aggiungi il tuo provider.','chat_error.action_budget':'Hai raggiunto il limite orario di azioni di OpenHuman. È un tetto di sicurezza locale, non del tuo provider di IA. La finestra si libera gradualmente; puoi continuare a chattare in questo thread e i passaggi che usano molti strumenti riprenderanno man mano che il limite si ricarica.','chat_error.max_iterations':@@ -5056,29 +5101,50 @@ const messages: TranslationMap = {'memoryPage.meta.url': 'Link','memoryPage.off.title': 'La memoria è disattivata','memoryPage.off.description':- 'Scegli un motore di memoria per iniziare a ricordare. Accedi per usare la memoria TinyHumans oppure collega il tuo CortexDB.',+ 'Collega CortexDB per iniziare a ricordare. Accedi per usare CortexDB integrato, oppure collegati con la tua chiave API o con un server su questo computer.','memoryPage.off.action': 'Scegli un motore',- 'memoryPage.engine.listTitle': 'Motori di memoria',+ 'memoryPage.engine.listTitle': 'Memoria CortexDB','memoryPage.engine.listDescription':- 'Un solo motore è attivo alla volta. Archivia tutto ciò che la memoria conserva e risponde alle domande su di esso.',- 'memoryPage.engine.loadError': 'Impossibile caricare i motori di memoria',+ 'La memoria funziona su CortexDB. Scegli come questa app si collega. È attiva una sola connessione alla volta.','memoryPage.engine.offExplanation':- 'Al momento nessun motore di memoria è utilizzabile, quindi nulla viene archiviato o richiamato. Accedi per usare la memoria TinyHumans oppure collega il tuo CortexDB con un endpoint e una chiave API.',+ 'Al momento nessuna connessione di memoria è utilizzabile, quindi nulla viene salvato o richiamato. Accedi per usare CortexDB integrato, oppure collega CortexDB con la tua chiave API o su questo computer.','memoryPage.engine.statusDegraded': 'La memoria funziona in modo ridotto','memoryPage.engine.statusDown': 'Il motore di memoria non è raggiungibile','memoryPage.engine.statusOff': 'Disattivata','memoryPage.engine.active': 'Attivo','memoryPage.engine.use': 'Usa',- 'memoryPage.engine.edit': 'Modifica',- 'memoryPage.engine.signInRequired': 'Accesso richiesto',- 'memoryPage.engine.hostedDetail': 'Ospitato da TinyHumans',- 'memoryPage.engine.selfHostedDetail': 'Il tuo endpoint e la tua chiave API',- 'memoryPage.engine.connectTitle': 'Collega {engine}','memoryPage.engine.connect': 'Collega','memoryPage.engine.endpoint': 'Endpoint','memoryPage.engine.apiKey': 'Chiave API','memoryPage.engine.keySavedPlaceholder': 'Salvata. Inserisci una nuova chiave per sostituirla','memoryPage.engine.keySavedHint': 'Una chiave è già salvata. Lascia vuoto per mantenerla.',+ 'memoryPage.engine.badgeDegraded': 'Degradato',+ 'memoryPage.engine.badgeDown': 'Non raggiungibile',+ 'memoryPage.engine.connecting': 'Connessione…',+ 'memoryPage.engine.save': 'Salva',+ 'memoryPage.engine.builtin.title': 'CortexDB integrato',+ 'memoryPage.engine.builtin.detail': 'Incluso nel tuo account TinyHumans',+ 'memoryPage.engine.builtin.signInRequired': 'Accedi per usarlo',+ 'memoryPage.engine.builtin.description':+ "CortexDB ospitato da TinyHumans e incluso nel tuo account. Accedi per usarlo; non c'è nulla da configurare.",+ 'memoryPage.engine.builtin.enrichmentNote':+ 'I nuovi ricordi vengono salvati subito. I fatti e le convinzioni ricavati da essi si completano nei minuti successivi.',+ 'memoryPage.engine.builtin.signInHint':+ 'Accedi al tuo account TinyHumans per usare CortexDB integrato.',+ 'memoryPage.engine.apiKeyOption.title': 'CortexDB con la tua chiave API',+ 'memoryPage.engine.apiKeyOption.description':+ 'Usa il tuo account CortexDB. La chiave è salvata in modo sicuro su questo computer, mai nel file di configurazione.',+ 'memoryPage.engine.selfHost.title': 'Ospita CortexDB in proprio',+ 'memoryPage.engine.selfHost.detail': 'Un server CortexDB su questo computer',+ 'memoryPage.engine.selfHost.step1':+ 'Avvia un server CortexDB su questo computer seguendo la guida:',+ 'memoryPage.engine.selfHost.docsLink': "Guida all'hosting autonomo di CortexDB",+ 'memoryPage.engine.selfHost.step2':+ "Avvia il server con una chiave API (CORTEX_API_KEY). L'app si collega con quella chiave.",+ 'memoryPage.engine.selfHost.step3':+ "Inserisci qui sotto l'indirizzo locale del server e la chiave, poi collegati.",+ 'memoryPage.engine.selfHost.notLocal':+ "L'hosting autonomo è solo locale. Usa un indirizzo su questo computer, ad esempio http://localhost:3141.",'memoryPage.ask.questionLabel': 'La tua domanda','memoryPage.ask.queryLabel': 'Query di ricerca','memoryPage.ask.placeholder': 'Cosa abbiamo deciso sul piano di lancio?',@@ -5109,6 +5175,8 @@ const messages: TranslationMap = {'memoryPage.learnings.listTitle': 'Apprendimenti','memoryPage.learnings.empty':'Ancora nessun apprendimento. Aggiungine uno qui sopra, oppure il tuo agente li aggiungerà mentre lavora con te.',+ 'memoryPage.learnings.deriving':+ 'Ancora niente qui. La memoria sta ancora costruendo convinzioni dalle tue conversazioni recenti; compariranno qui dopo la prossima esecuzione in background.','memoryPage.learnings.delete': 'Elimina apprendimento','memoryPage.conversations.turns': '{count} scambi','memoryPage.documents.listDescription':@@ -5287,6 +5355,7 @@ const messages: TranslationMap = {'memoryPage.import.running': 'Importazione della memoria precedente…','memoryPage.import.done': 'Memoria precedente importata','memoryPage.import.failed': 'Importazione non riuscita',+ 'memoryPage.import.resume': "Riprendi l'importazione",'memoryPage.import.progress': '{imported} di {total} elementi importati',// Live voice agents'voice.live.mute': 'Disattiva microfono',diff --git a/app/src/lib/i18n/ja.ts b/app/src/lib/i18n/ja.tsnew file mode 100644index 0000000000..3bf3ba1bc0--- /dev/null+++ b/app/src/lib/i18n/ja.ts@@ -0,0 +1,5580 @@+import type { TranslationMap } from './types';++// Japanese (日本語) translations. Keys mirror en.ts.+// Missing keys fall back to English via I18nContext.resolveEn().+const messages: TranslationMap = {+ // Navigation+ 'nav.home': 'ホーム',+ 'nav.chat': 'チャット',+ 'nav.human': 'ヒューマン',++ // Assistant surface: face mode toggle (Phase 6)+ 'nav.connections': '接続',+ 'nav.discord': 'Discordに参加',+ 'nav.alerts': 'アラート',+ 'nav.settings': '設定',+ 'nav.activity': 'アクティビティ',+ 'nav.brain': 'メモリー',+ 'nav.flows': 'ワークフロー',+ 'nav.workflowRuns': 'ワークフロー実行',+ 'nav.workflowDiscoveries': 'ワークフローを発見',++ 'nav.wallet': 'ウォレット',+ // Agent World: Settings section UI+ 'nav.avatarMenu.account': 'アカウント',+ 'nav.avatarMenu.invites': '友達を招待',+ 'nav.avatarMenu.wallet': 'ウォレット',+ 'nav.feedback': 'フィードバックを送信',++ // Feedback board+ 'feedback.board': 'フィードバックボード',+ 'feedback.header.desc': 'アイデアを共有し、次に開発する機能に投票してください。',+ // Welcome landing (first destination)+ 'feedback.empty': 'フィードバックはまだありません。最初のアイデアを投稿しましょう。',+ 'feedback.loadMore': 'さらに読み込む',+ 'feedback.loadError': 'フィードバックの読み込みに失敗しました',+ 'feedback.expand': 'もっと見る',+ 'feedback.collapse': '閉じる',+ 'feedback.comments': 'コメント',+ 'feedback.viewIssue': 'イシューを表示',+ 'feedback.status.open': 'オープン',+ 'feedback.status.planned': '計画中',+ 'feedback.status.completed': '完了',+ 'feedback.status.closed': 'クローズ',+ 'feedback.type.feature': '機能',+ 'feedback.type.bug': 'バグ',+ 'feedback.sort.hot': '人気',+ 'feedback.sort.top': 'トップ',+ 'feedback.sort.new': '新着',+ 'feedback.filter.allTypes': 'すべてのタイプ',+ 'feedback.filter.allStatuses': 'すべてのステータス',+ 'feedback.vote.up': '高評価',+ 'feedback.vote.down': '低評価',+ 'feedback.submit.heading': 'フィードバックを投稿',+ 'feedback.submit.subheading':+ '機能の提案やバグの報告を行ってください。他のユーザーが投票できます。',+ 'feedback.submit.titlePlaceholder': 'タイトル',+ 'feedback.submit.bodyPlaceholder': 'アイデアや遭遇した問題を説明してください',+ 'feedback.submit.action': '送信',+ 'feedback.submit.success': 'ありがとうございます。フィードバックがボードに反映されました。',+ 'feedback.submit.rejected': 'フィードバックを公開できませんでした。',+ 'feedback.submit.error': '問題が発生しました。もう一度お試しください。',+ 'feedback.admin.status': 'ステータス',+ 'feedback.admin.updateFailed': 'ステータスの更新に失敗しました',+ 'feedback.comments.empty': 'コメントはまだありません。',+ 'feedback.comments.placeholder': 'コメントを追加',+ 'feedback.comments.post': '投稿',+ 'feedback.comments.loadError': 'コメントの読み込みに失敗しました',+ 'feedback.comments.postError': 'コメントの投稿に失敗しました',+ 'feedback.comments.you': 'あなた',++ // Common+ 'common.cancel': 'キャンセル',+ 'common.save': '保存',+ 'common.confirm': '確定',+ 'common.working': '処理中…',+ 'common.delete': '削除',+ 'common.edit': '編集',+ 'common.search': '検索',+ 'common.notAvailable': '該当なし',+ 'common.loading': '読み込み中…',+ 'common.noResults': '結果がありません',+ 'dataTable.rowsPerPage': '1ページあたりの行数',+ 'dataTable.rangeOf': '{total}件中 {from}–{to}',+ 'dataTable.range': '{from}–{to}',+ 'dataTable.pageOf': '{pages}ページ中 {page}ページ目',+ 'dataTable.firstPage': '最初のページ',+ 'dataTable.previousPage': '前のページ',+ 'dataTable.nextPage': '次のページ',+ 'dataTable.lastPage': '最後のページ',+ 'dataTable.column.status': 'ステータス',+ 'dataTable.column.tools': 'ツール',+ 'dataTable.column.actions': 'アクション',+ 'dataTable.column.format': 'フォーマット',+ 'dataTable.column.scope': 'スコープ',+ 'dataTable.column.version': 'バージョン',+ 'dataTable.column.source': 'ソース',+ 'common.error': 'エラー',+ 'common.success': '成功',+ 'common.back': '戻る',+ 'common.finish': '完了',+ 'window.minimize': '最小化',+ 'window.maximize': '最大化',+ 'window.restore': '元に戻す',+ 'common.close': '閉じる',+ 'notices.title': '通知',+ 'common.enabled': '有効',+ 'common.disabled': '無効',+ 'common.ok': 'OK',+ 'common.name': '名前',+ 'common.retry': '再試行',+ 'common.copy': 'コピー',+ 'common.copied': 'コピーしました',+ 'common.seeAll': 'すべて表示',+ 'common.dismiss': '閉じる',+ 'common.clear': 'クリア',+ 'common.reset': 'リセット',+ 'common.refresh': '更新',+ 'common.download': 'ダウンロード',+ 'common.remove': '削除',+ 'common.showMore': 'もっと見る',+ 'common.showLess': '閉じる',+ 'common.continue': '続行',+ 'common.beta': 'ベータ',+ 'common.betaDisclaimer':+ 'この機能はベータ版です。変更される場合や不完全な部分がある可能性があります。ご意見をお寄せいただければ、改善に役立てます。',++ // Settings Home++ // Settings layman groups (Phase 4 IA revamp)++ // Settings: assistant group items+ 'settings.assistant.personality': 'ペルソナ',+ 'settings.assistant.permissions': '権限',++ // Settings: privacy & security group items++ // Developer & Diagnostics: 7 sub-section group labels+ 'settings.devGroups.knowledgeMemory': 'ナレッジとメモリー',+ 'settings.devGroups.agentsAutonomy': 'エージェントと自律性',+ 'settings.devGroups.automationIntegrations': '自動化と接続',+ 'settings.tokenUsage.title': 'トークン節約',+ 'settings.tokenUsage.menuDesc': '圧縮設定と、それによって節約されたトークン数およびコスト',+ 'settings.tokenUsage.saving': '保存中…',+ 'settings.tokenUsage.saved': '保存済み',+ 'settings.tokenUsage.savingsTitle': '節約額',+ 'settings.tokenUsage.attributedTo': '{model} のコストで計算',+ 'settings.tokenUsage.tokensSaved': '節約されたトークン数',+ 'settings.tokenUsage.costSaved': '節約されたコスト',+ 'settings.tokenUsage.cacheOccupancy': 'キャッシュされた元データ',+ 'settings.tokenUsage.compactions': '圧縮回数',+ 'settings.tokenUsage.overEvents': '{count} 回の圧縮で',+ 'settings.tokenUsage.byCompressor': '圧縮器別',+ 'settings.tokenUsage.refresh': '更新',+ 'settings.tokenUsage.reset': '統計をリセット',+ 'settings.tokenUsage.compressionTitle': '圧縮',+ 'settings.tokenUsage.compressionDesc':+ 'モデルのコンテキストに入る前に、大きなツール出力をコンテンツに応じて圧縮します。',+ 'settings.tokenUsage.routerEnabled': '圧縮を有効化',+ 'settings.tokenUsage.routerEnabledDesc': 'コンテンツルーターのマスタースイッチです。',+ 'settings.tokenUsage.search': '検索結果',+ 'settings.tokenUsage.searchDesc':+ 'grep/検索出力を関連性でランク付けし、上位の一致のみを保持します。',+ 'settings.tokenUsage.code': 'ソースコード',+ 'settings.tokenUsage.codeDesc': 'シグネチャを保持し、関数本体を折りたたみます。',+ 'settings.tokenUsage.html': 'HTML',+ 'settings.tokenUsage.htmlDesc': 'マークアップを除去し、読みやすいテキストに変換します。',+ 'settings.tokenUsage.ml': 'MLテキスト圧縮器',+ 'settings.tokenUsage.mlDesc':+ 'プレーンテキスト用のローカルModernBERTモデル(Pythonランタイムが必要)。',+ 'settings.tokenUsage.ccrTitle': 'キャッシュと復元(CCR)',+ 'settings.tokenUsage.ccrDesc':+ '圧縮された元データをキャッシュし、エージェントが必要に応じて全文を取得できるようにします。',+ 'settings.tokenUsage.ccrEnabled': '復旧用に原本を保持',+ 'settings.tokenUsage.ccrEnabledDesc':+ '原本をオフロードし、取得マーカーを追加して情報を失わないようにします。',+ 'settings.tokenUsage.ccrMinTokens': 'キャッシュの最小サイズ',+ 'settings.tokenUsage.ccrMinTokensDesc':+ '推定トークン数がこの値以上の結果のみをキャッシュし、非可逆圧縮します。',+ 'settings.tokenUsage.tokensUnit': 'トークン',+ 'settings.tokenUsage.ccrDisk': 'キャッシュをディスクに永続化',+ 'settings.tokenUsage.ccrDiskDesc': '再起動後も復旧可能な原本を保持します。',+ 'settings.devGroups.diagnosticsLogs': '診断とログ',+ 'settings.restartTour': 'ツアーを再開',+ 'settings.restartTourDesc': '製品ウォークスルーを最初から再生します',+ 'settings.about': '情報',+ 'settings.aboutDesc': 'アプリのバージョンとソフトウェアアップデート',+ // Developer & Diagnostics (renamed from "Developer Options")+ 'settings.developerDiagnostics': '開発者と診断',+ 'settings.developerDiagnosticsDesc':+ '高度な開発者ツール、診断、メモリー、エージェント、デバッグパネル',+ // Runtime Developer Mode toggle (in About panel)+ 'settings.clearAppData': 'アプリデータを削除',+ 'settings.clearAppDataDesc':+ 'サインアウトし、このデバイスに保存されているすべてのスレッド、設定、キャッシュファイルを削除します。',+ 'settings.clearAppDataIrreversible': 'この操作は元に戻せません。',+ 'settings.clearAppDataAction': 'データを消去',+ 'settings.logOut': 'ログアウト',+ 'settings.logOutDesc': 'アカウントからサインアウトします',+ 'settings.exitLocalSession': 'ローカルセッションを終了',+ 'settings.language': '言語',+ 'settings.layout.shapeHeading': '境界線と角',+ 'settings.layout.corners': '角の丸み',+ 'settings.layout.cornersDesc': 'カード、ボタン、フィールドの角の丸み具合',+ 'settings.layout.corners.none': 'なし',+ 'settings.layout.corners.subtle': '控えめ',+ 'settings.layout.corners.default': 'デフォルト',+ 'settings.layout.corners.round': '丸みあり',+ 'settings.layout.contrast': '境界線のコントラスト',+ 'settings.layout.contrastDesc': '背景に対する境界線と区切り線の視認性',+ 'settings.layout.contrast.subtle': '控えめ',+ 'settings.layout.contrast.default': 'デフォルト',+ 'settings.layout.contrast.strong': '強い',+ 'settings.layout.areasHeading': '境界線の表示対象',+ 'settings.layout.areasDesc': 'フラットにしたい領域の境界線をオフにします。',+ 'settings.layout.area.cards': 'カードとパネル',+ 'settings.layout.area.cardsDesc': '設定カード、グループ化されたセクション、パネル',+ 'settings.layout.area.controls': 'フォームコントロール',+ 'settings.layout.area.controlsDesc': 'テキストフィールド、テキストボックス、ドロップダウン',+ 'settings.layout.area.dividers': '行区切り線',+ 'settings.layout.area.dividersDesc': 'リスト内の行間に細い線を表示',+ 'settings.layout.area.frame': 'ウィンドウフレーム',+ 'settings.layout.area.frameDesc': 'メインコンテンツ領域の周囲の境界線',+ 'settings.layout.reset': 'レイアウトをリセット',+ 'settings.navGroups.general': '一般',+ 'settings.navGroups.appearance': '外観',+ 'settings.personality.menuDesc': 'アシスタントの名前、キャラクター、トーン',+ 'settings.face.title': '顔',+ 'settings.face.menuDesc': 'アシスタントの顔とマスコットカラーを選択',+ 'settings.navGroups.data': 'データ',+ 'settings.languageDesc': 'アプリインターフェースの表示言語',++ // Settings: Account: IA revamp group items (SettingsHome.tsx)++ // Settings: Account+ 'settings.account.session': 'セッション',+ 'settings.account.signedIn': 'OpenHumanにサインイン済み',+ 'settings.account.usageThisCycle': '今期の使用量',+ 'settings.account.usageOf': '{budget}中{spent}',+ 'settings.account.resetsOn': '{date}にリセット',+ 'settings.account.preferences': '設定',+ 'settings.account.manageBilling': 'プランと請求',+ 'settings.account.manageBillingDesc': 'サブスクリプション、クレジット、請求書を管理',+ 'settings.account.openDashboard': 'ダッシュボードを開く',+ 'migration.vendorLabel': 'ソースベンダー',+ 'migration.vendor.openclaw': 'OpenClaw',+ 'migration.vendor.hermes': 'Hermes Agent',+ 'migration.vendor.openclawDesc': 'メモリーデータベースとMarkdownノート',+ 'migration.vendor.hermesDesc': 'Hermesのメモリーとノート',+ 'migration.sourceHeading': 'ソース',+ 'migration.sourceHeadingDesc': 'インポート元のアシスタントを選択',+ 'migration.badgePreview': 'プレビュー',+ 'migration.badgeImported': 'インポート済み',+ 'migration.confirmTitle': 'このワークスペースにインポートしますか?',+ 'migration.sourceLabel': 'ワークスペースフォルダー(任意)',+ 'migration.sourcePlaceholder': '空白のままにすると自動検出(例: ~/.openclaw/workspace)',+ 'migration.sourcePlaceholderHermes': '空白のままにすると自動検出(例: ~/.hermes)',+ 'migration.sourceHint':+ '空白の場合はベンダーの標準的な場所がデフォルトになります。ワークスペースを別の場所に移動した場合は、明示的なパスを設定してください。',+ 'migration.previewAction': 'プレビュー',+ 'migration.previewRunning': 'プレビュー中…',+ 'migration.applyAction': 'インポート',+ 'migration.applyRunning': 'インポート中…',+ 'migration.applyDisclaimer':+ '同じソースのプレビュー後にインポートが可能になります。現在のメモリーは最初にバックアップされます。',+ 'migration.reportTitlePreview': 'インポートされる内容',+ 'migration.reportTitleApplied': 'インポート完了',+ 'migration.report.source': 'ソースワークスペース',+ 'migration.report.target': 'ターゲットワークスペース',+ 'migration.report.fromSqlite': 'SQLite (brain.db) から',+ 'migration.report.fromMarkdown': 'Markdown から',+ 'migration.report.imported': 'インポート済み',+ 'migration.report.skippedUnchanged': 'スキップ (変更なし)',+ 'migration.report.renamedConflicts': '競合時にリネーム',+ 'migration.report.warnings': '警告',+ 'migration.report.previewHint':+ 'まだ何もインポートされていません。インポートをクリックしてコピーしてください。',+ 'migration.report.appliedHint':+ 'インポートされた項目はメモリーに追加されました。再度比較する場合はプレビューを実行してください。',+ 'migration.confirmImport.singular':+ '{count} 件の項目を現在のワークスペースにインポートしますか?\n\nソース: {source}\nターゲット: {target}\n\nインポート実行前に既存のメモリーはバックアップされます。',+ 'migration.confirmImport.plural':+ '{count} 件の項目を現在のワークスペースにインポートしますか?\n\nソース: {source}\nターゲット: {target}\n\nインポート実行前に既存のメモリーはバックアップされます。',++ // Settings: Features+ 'settings.features.tools': 'ツール',++ // Settings: AI & Models+ 'settings.ai.localSetup': 'ローカル AI 設定',++ // Clear App Data modal+ 'clearData.title': 'アプリデータを削除',+ 'clearData.warning':+ 'これによりサインアウトされ、以下のローカルアプリデータが完全に削除されます:',+ 'clearData.bulletSettings': 'アプリ設定とチャット履歴',+ 'clearData.bulletCache': '連携機能のローカルキャッシュデータすべて',+ 'clearData.bulletWorkspace': 'ワークスペースデータ',+ 'clearData.bulletOther': 'その他のすべてのローカルデータ',+ 'clearData.irreversible': 'この操作は元に戻せません。',+ 'clearData.clearing': 'アプリデータを削除中…',+ 'clearData.failed': 'データの消去とログアウトに失敗しました。もう一度お試しください。',+ 'clearData.failedLogout': 'ログアウトに失敗しました。もう一度お試しください。',++ // Welcome page+ 'welcome.logoAlt': 'OpenHuman',+ 'welcome.title': 'OpenHuman へようこそ',+ 'welcome.subtitle':+ 'あなたのパーソナル AI スーパーインテリジェンス。プライベート、シンプル、そして極めて強力。',+ 'welcome.selectRuntime': 'ランタイムを選択',+ 'welcome.clearingAppData': 'アプリデータを消去中...',+ 'welcome.clearAppDataAndRestart': 'アプリデータを消去して再起動',+ 'welcome.clearAppDataWarning':+ 'このデバイス上のローカルに保存されたシークレットとアカウントが削除されます。クラウドアカウントは影響を受けず、すぐに再度サインインできます。',+ 'welcome.resetErrorFallback':+ 'アプリデータを消去できませんでした。OpenHuman を終了して再起動し、もう一度お試しください。',+ 'welcome.signingIn': 'サインイン中...',+ 'welcome.termsIntro': '続行することで、以下に同意したことになります:',+ 'welcome.termsOfUse': '利用規約',+ 'welcome.termsJoiner': 'および',+ 'welcome.privacyPolicy': 'プライバシーポリシー',+ 'welcome.termsOutro': '。',+ 'welcome.connect': 'テスト',++ // Home page+ 'home.askAssistant': 'アシスタントに何でも聞いてください...',+ 'home.statusOk': 'アシスタントの準備ができました。下に入力して開始してください。',+ 'home.statusBackendOnly':+ 'バックエンドに再接続しています…エージェントはまもなく利用可能になります。',+ 'home.statusHostedDegraded':+ 'クラウドに再接続しています…チャットは継続し、統合とチャンネルは接続回復後に再開されます。',+ 'home.statusHostedStopped':+ 'クラウド接続が停止しました。統合とチャンネルを再開するには再度サインインしてください。チャットは継続します。',+ 'home.statusCoreUnreachable':+ 'OpenHumanコアが応答していません。バックグラウンドプロセスがクラッシュしたか、起動に失敗した可能性があります。',+ 'home.statusInternetOffline':+ 'デバイスがオフラインです。ネットワークを確認するか、アプリを再起動して再接続してください。',+ 'home.restartCore': 'コアを再起動',+ 'home.restartingCore': 'コアを再起動中…',+ 'home.themeToggle.toLight': 'ライトモードに切り替え',+ 'home.themeToggle.toDark': 'ダークモードに切り替え',+ 'home.usageExhaustedTitle': '使用量を使い切りました',+ 'openrouterFree.cta': 'OpenRouterの無料モデルを使用',+ 'openrouterFree.error':+ 'OpenRouterの無料モデルに切り替えできませんでした。OpenRouterのサインインを確認して再試行してください。',++ // Routines++ // Chat / Conversations+ 'chat.newThread': '新しいスレッド',+ 'chat.newConversation': '新しい会話',+ 'chat.newWindowPrompt': '本日はどのようなご用件でしょうか?',+ 'chat.welcomeSuggestion.calendarToday': '今日の予定は何ですか?',+ 'chat.welcomeSuggestion.unreadEmail': '未読メールを要約してください。',+ 'chat.welcomeSuggestion.draftReply': '最後のメッセージへの返信を作成してください。',+ 'chat.welcomeSuggestion.followUps': '今週フォローアップすると伝えた事項は何ですか?',+ 'chat.welcomeSuggestion.connectIntegration': '新しい連携を追加してください。',+ 'chat.welcomeSuggestion.dailySummaryFlow':+ '毎日の要約をメールで送るワークフローを作成してください。',+ 'chat.typeMessage': 'メッセージを送信...',+ 'chat.send': 'メッセージを送信',+ 'chat.stopGeneration': '生成を停止',+ 'chat.followupHint':+ 'フォローアップをキューに追加: この返信後に送信されます。⌘/Ctrl+Enterで並列ブランチを作成',+ 'chat.messageQueue.running': '実行中',+ 'chat.messageQueue.queuedCount': '{count}件キュー待ち',+ 'chat.messageQueue.pendingHint': 'これが完了すると送信されます',+ 'chat.messageQueue.remove': 'キューから「{text}」を削除',+ 'chat.connectionState.dropped': '接続が切断されました。サーバー側では実行が継続されています。',+ 'chat.connectionState.reconnect': '再接続',+ 'chat.connectionState.reconnecting': '再接続中',+ 'chat.connectionState.resumed': 'ストリームを再開しました。',+ 'chat.createThreadFailed': '新しいスレッドを作成できませんでした。もう一度お試しください。',+ // Reasoning panel (assistant-ui static reasoning element)+ 'chat.reasoning.thinking': '思考中',+ 'chat.reasoning.thoughtFor': '{n}間思考しました',+ 'chat.reasoning.thoughtBriefly': '簡潔に思考しました',+ 'chat.reasoning.thought': '思考',+ 'chat.reasoning.elapsedSeconds': '{n}秒',+ 'chat.reasoning.elapsedMinutes': '{m}分{s}秒',+ 'chat.copyResponse': '回答をコピー',++ // Share cards (#5006): one-tap "look what my agent did" post to X / LinkedIn.+ 'share.button': '共有',+ 'share.modalTitle': 'この瞬間を共有',+ 'share.modalSubtitle': 'エージェントの行動をXまたはLinkedInに投稿',+ 'share.drafting': 'カードを生成中...',+ 'share.cardAlt': '共有カードのプレビュー',+ 'share.imageError': '画像を生成できませんでした。もう一度お試しください。',+ 'share.captionLabel': 'キャプション',+ 'share.captionPlaceholder': 'キャプションを入力...',+ 'share.privacyNote':+ '共有されるのは見出し、キャプション、エージェント名、およびブランド情報だけです。チャット、メモリー、ファイルはプライベートのままです。',+ 'share.defaultHeadline': '私のOpenHumanエージェントがやったことを見て',+ 'share.defaultAgentName': '私のエージェント',+ 'share.defaultCaption': '私のOpenHumanエージェントがやったことを見て。',+ 'share.captionWithHeadline': '{headline}。私のOpenHumanエージェントで作成。',+ 'share.linkedInHint': 'キャプションをコピーしました。LinkedInの投稿に貼り付けてください。',+ 'share.shareX': 'Xで共有',+ 'share.shareLinkedIn': 'LinkedInで共有',+ 'share.copyImage': '画像をコピー',+ 'share.copiedImage': '画像をコピーしました',+ 'share.copyCaption': 'キャプションをコピー',+ 'share.copiedCaption': 'キャプションをコピーしました',++ // Skills / Connections+ 'scope.legacy': 'レガシー',+ 'scope.user': 'ユーザー',+ 'scope.project': 'プロジェクト',+ 'skills.noResults': '接続が見つかりません',+ 'skills.loadingIntegrations': '統合を読み込み中…',+ 'skills.connect': '接続',+ 'skills.disconnect': '切断',+ 'skills.configure': '管理',+ 'skills.connected': '接続済み',+ 'skills.available': '利用可能',+ 'skills.category.all': 'すべて',+ 'skills.category.builtIn': '組み込み',+ 'skills.category.channels': 'チャネル',+ 'skills.category.productivity': '生産性',+ 'skills.category.chat': 'チャット',+ 'skills.category.toolsAutomation': 'ツールと自動化',+ 'skills.category.social': 'ソーシャル',+ 'skills.category.platform': 'プラットフォーム',+ 'skills.category.other': 'その他',+ 'skills.explorer.emptyCta': 'URLからインストール',+ 'skills.explorer.emptyDescription':+ 'SKILL.mdパッケージをインストールするか、Hermes形式のフォルダを ~/.openhuman/skills に配置してください。',+ 'skills.explorer.emptyTitle': 'スキルが見つかりません',+ 'skills.explorer.sourceFilterAria': 'ソースで絞り込み',+ 'skills.explorer.installFromUrl': 'URLからインストール',+ 'skills.explorer.newSkill': '新規スキル',+ 'skills.explorer.subtitle':+ 'Hermes形式のMarkdown、スクリプト、リファレンス、テンプレート、例、プロンプトを含むSKILL.mdパッケージを参照します。',+ 'skills.explorer.title': 'スキルエクスプローラー',+ 'skills.rows.installedTitle': 'インストール済みスキル',+ 'skills.rows.installedIntro':+ 'このマシンでエージェントが実行できるスキルです。詳細を表示するには開き、行から実行、編集、削除を行ってください。',+ 'skills.rows.registryTitle': 'スキルレジストリ',+ 'skills.rows.registryIntro':+ 'インストール可能なスキルカタログです。検索後、ユーザースキルにインストールしてください。',+ 'skills.rows.open': '{name} を開く',+ 'skills.rows.run': '{name} を実行',+ 'skills.rows.edit': '{name} を編集',+ 'skills.rows.remove': '{name} を削除',+ 'skills.explorer.searchPlaceholder': 'スキルを検索...',+ 'skills.explorer.scopeUser': 'ユーザー',+ 'skills.explorer.scopeProject': 'プロジェクト',+ 'skills.explorer.scopeLegacy': 'レガシー',+ 'skills.explorer.noDescription': '説明がありません。',+ 'skills.explorer.uninstallSuccess': 'スキルを正常にアンインストールしました。',+ 'skills.explorer.runnerTab': 'ランナー',+ 'skills.explorer.registryTab': 'レジストリ',+ 'skills.explorer.installedTab': 'インストール済み',+ 'skills.explorer.refreshRegistry': 'レジストリを更新',+ 'skills.explorer.registryEmptyTitle': 'レジストリエントリがありません',+ 'skills.explorer.registryEmptyDescription':+ 'スキルレジストリを読み込めませんでした。接続を確認して更新してください。',+ 'skills.explorer.installed': 'インストール済み',+ 'skills.explorer.install': 'インストール',+ 'skills.explorer.installing': 'インストール中…',+ 'skills.explorer.notInstallable': 'インストール不可',+ 'skills.explorer.notInstallableHint':+ 'このエントリにはダウンロード用のSKILL.mdがないため、ここからインストールできません。',+ 'skills.integrationsSubtitle':+ 'クラウドベースのOAuth接続: アカウントでサインインすると、Composioがトークンを管理し、エージェントが代理で読み取りや操作を行えます。APIキーの管理は不要です。',+ 'skills.composio.noApiKeyTitle': 'Composio APIキーが設定されていません',+ 'skills.composio.noApiKeyDescription':+ 'ローカルモードでは、独自のComposio APIキーを使用します。ここで統合を接続する前に、設定 → 詳細設定 → Composio でキーを追加してください。',+ 'skills.composio.noApiKeyCta': '設定で開く',+ // Connections page tabs (Phase 2 rename)+ 'connections.tabs.oauth': 'OAuth',+ 'connections.tabs.composioKey': 'Composio',+ 'connections.tabs.channels': 'チャンネル',+ 'connections.tabs.mcp': 'MCPサーバー',+ 'connections.tabs.browser': 'ブラウザ制御',+ 'connections.browser.description': 'ブラウザタスクの設定と準備状況の確認を行います。',+ 'connections.earlyAlphaNotice':+ '早期アルファ版: ブラウザおよびデスクトップ制御はまだテスト中です。動作が予期しない場合や、リリース間での挙動が変更される可能性があります。',+ 'connections.browser.chrome': 'Chrome',+ 'connections.browser.unknown': '不明',+ 'connections.browser.notVerified': '未検証',+ 'connections.browser.enabled': 'ブラウザを有効化',+ 'connections.browser.headless': 'ヘッドレス',+ 'connections.browser.width': 'ビューポート幅',+ 'connections.browser.height': 'ビューポート高さ',+ 'connections.browser.chromePath': 'Chromeパス(任意)',+ 'connections.browser.profileMode': 'プロファイル',+ 'connections.browser.fresh': '新規プロファイル',+ 'connections.browser.persistent': '永続プロファイル',+ 'connections.browser.profilePath': 'プロファイルフォルダー',+ 'connections.browser.downloadDir': 'ダウンロードフォルダー',+ 'connections.browser.maxSteps': '最大タスクステップ数',+ 'connections.browser.timeout': 'タスクタイムアウト(秒)',+ 'connections.browser.allowedWebsites': '許可されたウェブサイト',+ 'connections.browser.sharedPolicy':+ 'ブラウザとウェブ検索は同じウェブサイトポリシーを共有します。',+ 'connections.browser.manageWebsites': '許可されたウェブサイトの管理',+ 'connections.browser.routeDirect': 'OpenRouterへ直接接続',+ 'connections.browser.routeHosted': 'ホスト型プロキシ',+ 'connections.browser.testInConversation': '保存後、会話からページをテストしてください。',+ 'connections.browser.save': '設定を保存',+ 'connections.browser.saved': '設定を保存しました',+ 'connections.browser.testBrowser': 'Chromeをテスト',+ 'connections.browser.chromeReady': 'Chrome準備完了',+ 'connections.browser.chromeNotReady': 'Chrome利用不可',+ 'connections.browser.readinessChecked': '準備状況を確認しました',+ 'connections.browser.boundsRequired':+ '幅は320~3840、高さは240~2160、ステップ数は1~100、タイムアウトは5~600秒の範囲で指定してください。',+ 'connections.browser.noneAllowed': '許可されたウェブサイトはありません',+ 'connections.tabs.skills': 'スキル',+ 'connections.groups.integrations': '統合',+ 'desktop.approvalSummary': '{app}内の「{target}」に対する{operation}',+ 'desktop.action.click': 'クリック',+ 'desktop.action.type_text': 'テキストを入力',+ 'desktop.action.check': 'チェック',+ 'desktop.action.uncheck': 'チェック解除',+ 'desktop.action.expand': '展開',+ 'desktop.action.collapse': '折りたたむ',+ 'desktop.action.scroll': 'スクロール',+ 'computer.title': 'コンピュータ制御',+ 'computer.description':+ 'エージェントがこのコンピュータ上のアプリやウェブサイトで作業できるようにします。',+ 'computer.tabs.desktop': 'デスクトップ',+ 'computer.tabs.browser': 'ブラウザ',+ 'computer.tabs.models': 'モデル',+ 'computer.models.decisionTitle': '判断モデル',+ 'computer.models.decisionDescription':+ 'デスクトップまたはブラウザの各ステップを選択するモデルです。',+ 'computer.models.decisionModel': '判断モデル',+ 'computer.models.jev': 'Jev',+ 'computer.models.openJev': 'OpenJev',+ 'computer.models.sage': 'Sage',+ 'computer.models.sageFast': 'Sage 高速モード',+ 'computer.models.rescueTitle': '計画とリカバリー',+ 'computer.models.rescueDescription':+ 'タスクのステップが失敗した場合、タスクが中断される前にリカバリーモデルが回復方法を提案します。',+ 'computer.models.rescueModel': 'リカバリーモデル',+ 'computer.models.maxRescues': 'タスクあたりのリカバリー回数',+ 'computer.models.plannerModel': 'プランナーモデル',+ 'computer.models.moduleDefault': 'モジュールのデフォルト',+ 'computer.models.rescuesBounds':+ 'タスクあたりのリカバリー回数は0から5の整数である必要があります。',+ 'computer.models.saved': 'コンピュータモデルを保存しました。',+ 'computer.status.title': 'TinyComputerモジュール',+ 'computer.status.check': 'モジュールを確認',+ 'computer.status.configured': '設定済み',+ 'computer.status.missing': '未設定',+ 'computer.status.available': '利用可能',+ 'computer.status.unavailable': '利用不可',+ 'computer.status.incompatible':+ 'モジュールのバージョンが互換性ありません。アプリを更新してください',+ 'computer.status.ownKey': '独自のAPIキー',+ 'computer.status.noCredential': '認証情報がありません',+ 'computer.status.state.available': '未読み込み',+ 'computer.status.state.loading': '読み込み中',+ 'computer.status.state.ready': '準備完了',+ 'computer.status.state.failed': '失敗',+ 'computer.status.state.unsupported': 'このデバイスではサポートされていません',+ 'connections.browser.chromeHint':+ 'ブラウザは TinyComputer モジュール内で実行されます。テストでは Chrome を一時的に起動し、すぐに閉じます。',+ 'computer.models.openJevKey': 'OpenJev API キー',+ 'computer.models.sageKey': 'Sage API キー',+ 'computer.models.keyHint':+ 'このデバイスに暗号化して保存されます。保存済みのキーを維持する場合は空白のままにしてください。',+ 'desktop.title': 'デスクトップ制御',+ 'desktop.description': 'エージェントがこのコンピュータ上のアプリで作業できるようにします。',+ 'desktop.enabledPending':+ '有効化済み。デスクトップツールを使用する前に、以下のセットアップを完了してください。',+ 'desktop.moduleUnavailable':+ 'デスクトップモジュールが利用できません。ステータスを確認して再試行してください。',+ 'desktop.pendingUnavailable':+ '保留中のデスクトップ承認を読み込めませんでした。更新して再試行してください。',+ 'desktop.unsupported': 'このランタイムではデスクトップ制御は利用できません。',+ 'desktop.localOnly': 'この設定はこのコンピュータにのみ適用されます。',+ 'desktop.permissions': 'システム権限',+ 'desktop.permission.accessibility': 'アクセシビリティ',+ 'desktop.permission.screen_recording': '画面収録',+ 'desktop.openSettings': '設定を開く',+ 'desktop.enableLabel': 'エージェントにアプリを操作させる',+ 'desktop.statusSetupNeeded': 'セットアップが必要',+ 'desktop.statusModuleFailed': '利用不可',+ 'desktop.permissionState.granted': '許可済み',+ 'desktop.permissionState.denied': '拒否済み',+ 'desktop.permissionState.notRequired': '不要',+ 'desktop.permissionState.unknown': '未判定',+ 'desktop.checkHeading': 'アクセス確認',+ 'desktop.checkLabel': 'アプリの可視性',+ 'desktop.captureNote':+ 'スクリーンショットには画面収録が必要です。アプリの検査と操作にはアクセシビリティが必要です。',+ 'desktop.testDescription': 'コアがこのコンピュータで実行中のアプリを認識できるか確認します。',+ 'desktop.testButton': 'デスクトップアクセスをテスト',+ 'desktop.testPassed': 'デスクトップアクセスは正常です。',+ 'desktop.testFailed': 'デスクトップアクセスを検証できませんでした。',+ // Per-tab text headers (title reuses connections.tabs.*)+ 'connections.header.composio': 'エージェントが操作できるアプリを接続します。',+ 'connections.header.channels': 'コミュニティが利用しているチャットアプリをリンクします。',+ 'connections.header.mcp': 'MCP サーバーを追加して、エージェントのツールを拡張します。',+ 'connections.header.llm': 'モデルプロバイダーを接続し、タスクごとに使用するモデルを選択します。',+ 'connections.header.embeddings': 'メモリー検索に使用する埋め込みモデルを選択します。',+ 'connections.header.search': 'エージェントの Web 検索を設定します。',+ 'connections.header.wallet': 'ローカルウォレットの残高とリカバリーフレーズ。',+ 'connections.header.composioKey': 'Composio API キーを追加して、数百のアプリ統合を解放します。',+ // Welcome landing (first destination)+ 'connections.welcome.eyebrow': '接続',+ 'connections.welcome.title': 'すべてを、一つの場所で',+ 'connections.welcome.body':+ 'メッセージングアプリ、メール、カレンダー、ツールを接続し、エージェントがコンテキストを読み取り、それらすべてでアクションを実行できるようにします。数十個のタブ間でのコピー&ペーストが不要になります。エージェントがアクセスできる範囲は、あなたが管理できます。',+ 'connections.welcome.ctaChannel': 'チャネルを接続',+ 'connections.welcome.ctaApps': 'アプリを接続',+ 'connections.welcome.ctaSkills': 'スキルを検索',+ 'connections.welcome.featsLabel': 'ここでできること',+ 'connections.welcome.feat1Title': 'チャネルを統合',+ 'connections.welcome.feat1Body':+ 'Slack、WhatsApp、Telegram、Gmailなど:数クリックでリンクできます。',+ 'connections.welcome.feat2Title': 'エージェントに行動させる',+ 'connections.welcome.feat2Body':+ '接続されたすべての情報から文脈を把握し、読み取り、下書き作成、返信を行います。',+ 'connections.welcome.feat3Title': 'コントロールを維持',+ 'connections.welcome.feat3Body':+ 'チャネルごとにアクセス権を付与または取り消せます。あなたの許可なしには何も実行されません。',+ 'connections.groups.apiKeys': 'APIキー',+ // Intelligence / Memory+ 'memory.search': 'メモリーを検索...',+ 'memory.noResults': 'メモリーが見つかりません',+ 'memory.empty': 'メモリーはまだありません。やり取りに応じて自動的に作成されます。',+ 'memory.tab.memory': 'メモリー',+ 'memory.tab.agents': 'ライブラリ',++ 'memory.tab.council': 'カウンシル',++ // Activity surface: Phase 3 renamed tabs+ 'activity.tabs.automations': '自動化',+ 'activity.tabs.automationsDescription':+ '再利用・実行可能な手順:目標と達成ステップを定義します。作成、URLからのインストール、またはワークフローを開いて実行できます。',+ 'activity.tabs.alerts': 'アラート',++ 'intelligence.agents.title': 'エージェントライブラリ',+ 'intelligence.agents.subtitle':+ '実行可能なスペシャリストを確認し、指定したエージェントにタスクを送信します。',+ 'intelligence.agents.refresh': '更新',+ 'intelligence.agents.loading': 'エージェントを読み込み中...',+ 'intelligence.agents.failedToLoad': 'エージェントを読み込めませんでした',+ 'intelligence.agents.empty': '実行可能なエージェントがありません。',+ 'intelligence.agents.readOnly': '読み取り専用',+ 'intelligence.agents.writeCapable': '書き込み可能',+ 'intelligence.agents.allTools': 'すべてのツール',+ 'intelligence.agents.toolCountOne': '{count} 個のツール',+ 'intelligence.agents.toolCountOther': '{count} 個のツール',+ 'intelligence.agents.subagentCountOne': '{count} 個のサブエージェント',+ 'intelligence.agents.subagentCountOther': '{count} 個のサブエージェント',+ 'intelligence.agents.startChat': 'チャットを開始',+ 'intelligence.agents.startChatPrompt':+ 'このエージェントとチャットを開始します。専門分野を紹介し、必要な情報を尋ね、タスクを待ってください。',+ 'intelligence.agents.copyId': 'IDをコピー',+ 'intelligence.agents.copied': 'コピーしました',+ 'intelligence.agents.taskPlaceholder': 'このエージェントへのタスク',+ 'intelligence.agents.runTask': 'タスクを実行',+ 'intelligence.agents.running': '実行中...',+ 'intelligence.agents.model.inherit': '継承',+ 'intelligence.agents.tier.chat': 'チャット',+ 'intelligence.agents.tier.reasoning': '推論',+ 'intelligence.agents.tier.worker': 'ワーカー',+ 'memory.analyzeNow': '今すぐ分析',+ 'namespaceOverview.entitiesShort': '{count} 件のエンティティ',++ // Notifications / Alerts+ 'alerts.title': 'アラート',+ 'alerts.header.desc': 'エージェントのアクティビティと、対応が必要な項目を表示します。',+ 'alerts.empty': 'アラートはありません',+ // Welcome landing (first destination)+ 'notifications.welcome.nav': 'ようこそ',+ 'notifications.welcome.main': 'アラート',+ 'notifications.welcome.eyebrow': '通知',+ 'notifications.welcome.title': '本当に必要なものだけ',+ 'notifications.welcome.body':+ 'エージェントの活動と判断が必要な項目をスコアリングして整理し、重要な情報を優先的に表示します。ノイズは排除されます。',+ 'notifications.welcome.ctaView': 'アラートを表示',+ 'notifications.welcome.featsLabel': '表示内容',+ 'notifications.welcome.feat1Title': '対応が必要な項目',+ 'notifications.welcome.feat1Body':+ 'エージェントが人間による判断が必要とフラグを立てた決定事項やメンション。',+ 'notifications.welcome.feat2Title': 'エージェントのアクティビティ',+ 'notifications.welcome.feat2Body': '実行内容とその成果物のログ。',+ 'notifications.welcome.feat3Title': 'カテゴリ別フィルタ',+ 'notifications.welcome.feat3Body': 'メッセージ、会議、リマインダーなど、思考に沿った形で整理。',+ 'alerts.markAllRead': 'すべて既読にする',+ 'alerts.unread': '未読',++ // Rewards+ // Welcome landing (first destination)+ 'rewards.credits': 'クレジット',+ 'rewards.referralCode': '紹介コード',+ 'rewards.share': '共有',++ // Onboarding+ 'onboarding.welcome': 'こんにちは。OpenHumanです。',+ 'onboarding.welcomeDesc':+ 'あなたのコンピュータ上で動作する、超知能型AIアシスタント。プライベートでシンプル、そして非常にパワフルです。',+ 'onboarding.getStarted': '始める',++ // Onboarding: runtime-choice step (Cloud vs Custom)+ 'onboarding.runtimeChoice.title': 'OpenHumanの実行方法を選択してください',+ 'onboarding.runtimeChoice.subtitle':+ 'OpenHumanにどこまで管理を任せるかを選択します。後から設定で変更できます。',+ 'onboarding.runtimeChoice.cloud.title': 'シンプル',+ 'onboarding.runtimeChoice.cloud.tagline':+ 'OpenHumanが提供するサインイン、モデルルーティング、検索、マネージド統合を使用します。',+ 'onboarding.runtimeChoice.cloud.f1': 'バックエンド経由のOAuthとモデルルーティング',+ 'onboarding.runtimeChoice.cloud.f2': 'トークン圧縮により、利用量をさらに効率的に使用',+ 'onboarding.runtimeChoice.cloud.f3': '1つのサブスクリプションで、すべてのモデルを利用可能',+ 'onboarding.runtimeChoice.cloud.f4': 'モデル、検索、Composioのキーを管理する必要はありません',+ 'onboarding.runtimeChoice.cloud.f5': 'ローカルメモリーツリー、マネージドネットワークサービス',+ 'onboarding.runtimeChoice.custom.title': 'カスタム実行',+ 'onboarding.runtimeChoice.custom.tagline':+ '独自のキーを持ち込み、OpenHumanが呼び出すサービスを選択します。',+ 'onboarding.runtimeChoice.custom.f1': 'ほぼすべての機能にAPIキーが必要です',+ 'onboarding.runtimeChoice.custom.f2': 'すでに契約しているサービスを再利用',+ 'onboarding.runtimeChoice.custom.f3': '対応するワークロードをマシン上で実行',+ 'onboarding.runtimeChoice.custom.f4': 'セットアップの手間は増えますが、細かく調整可能',+ 'onboarding.runtimeChoice.custom.f5': 'パワーユーザーや開発者に最適',+ 'onboarding.runtimeChoice.cloud.creditHighlight': 'サインアップ時に無料クレジットを付与',+ 'onboarding.runtimeChoice.continueCloud': 'シンプルで続行',+ 'onboarding.runtimeChoice.continueCustom': 'カスタムで続行',+ 'onboarding.runtimeChoice.recommended': '推奨',+ 'onboarding.runtimeChoice.exitError':+ 'オンボーディングを完了できませんでした。もう一度お試しください。',++ // Onboarding: API keys step (only when Custom is picked)+ 'onboarding.apiKeys.title': 'APIキーを追加しましょう',+ 'onboarding.apiKeys.subtitle':+ '今すぐ貼り付けるか、後で「接続」›「APIキー」で追加できます。キーはこのデバイスに暗号化されて保存されます。',+ 'onboarding.apiKeys.openaiLabel': 'OpenAI APIキー',+ 'onboarding.apiKeys.openaiPlaceholder': 'sk-...',+ 'onboarding.apiKeys.openaiOauthHint':+ 'ChatGPT Plus/Pro(サブスクリプション)またはOpenAI APIキーのいずれかを使用します。両方は不要です。',+ 'onboarding.apiKeys.openaiOauthOpening': 'サインインを開いています…',+ 'onboarding.apiKeys.openaiOauthConnect': 'ChatGPTでサインイン',+ 'onboarding.apiKeys.openaiOauthConnected': 'ChatGPTに接続しました',+ 'onboarding.apiKeys.openaiOauthCallbackHint':+ 'サインイン後、ブラウザからの完全なリダイレクトURL({url}で始まる)を貼り付けてください。',+ 'onboarding.apiKeys.oauthStartFailed':+ 'ChatGPTサインインを開始できませんでした。再試行するか、APIキーを使用してください。',+ 'onboarding.apiKeys.oauthPasteRedirect':+ 'サインイン後、ブラウザからのリダイレクトURLを貼り付けてください。',+ 'onboarding.apiKeys.oauthCompleteFailed':+ 'ChatGPTサインインが完了しませんでした。リダイレクトURLを確認して再試行してください。',+ 'onboarding.apiKeys.finishSignIn': 'ChatGPTサインインを完了',+ 'onboarding.apiKeys.orApiKey': 'またはAPIキー',+ 'onboarding.apiKeys.anthropicLabel': 'Anthropic APIキー',+ 'onboarding.apiKeys.anthropicPlaceholder': 'sk-ant-...',+ 'onboarding.apiKeys.saveError': 'キーを保存できませんでした。内容を確認して再試行してください。',+ 'onboarding.apiKeys.skipForNow': '後で設定する',+ 'onboarding.apiKeys.continue': '保存して続行',+ 'onboarding.apiKeys.saving': '保存中…',++ // Onboarding: Custom wizard (Inference / Voice / OAuth / Search / Embeddings / Vault / Memory)+ 'onboarding.custom.stepperInference': '推論',+ 'onboarding.custom.stepperVoice': '音声',+ 'onboarding.custom.stepperOAuth': 'OAuth',+ 'onboarding.custom.stepperSearch': '検索',+ 'onboarding.custom.stepperEmbeddings': '埋め込み',+ 'onboarding.custom.stepperVault': '保管庫',+ 'onboarding.custom.stepperMemory': 'メモリー',+ 'onboarding.custom.stepCounter': 'ステップ {n} / {total}',+ 'onboarding.custom.defaultTitle': 'デフォルト',+ 'onboarding.custom.defaultSubtitle': 'OpenHumanに管理を任せます。',+ 'onboarding.custom.configureTitle': '設定',+ 'onboarding.custom.configureSubtitle': '自分で選択します。',+ 'onboarding.custom.progressAriaLabel': 'オンボーディングの進捗',+ 'onboarding.custom.continue': '続行',+ 'onboarding.custom.back': '戻る',+ 'onboarding.custom.finish': 'セットアップを完了',+ 'onboarding.custom.configureLater':+ 'この設定はオンボーディング後に完了できます。完了後、対応する設定ページに移動します。',+ 'onboarding.custom.openSettings': '設定で開く',++ // Onboarding: Custom > Inference (text)+ 'onboarding.custom.inference.title': '推論(テキスト)',+ 'onboarding.custom.inference.subtitle':+ '質問への回答やエージェントの実行に使用する言語モデルを選択してください。',+ 'onboarding.custom.inference.defaultDesc':+ 'OpenHumanはデフォルトで管理されたバックエンドを通じてワークロードをルーティングします。キーや設定は不要です。',+ 'onboarding.custom.inference.configureDesc':+ 'OpenAIまたはAnthropicのキーを使用します。すべてのテキストベースのワークロードに適用されます。',++ // Onboarding: Custom > Voice+ 'onboarding.custom.voice.title': '音声',+ 'onboarding.custom.voice.subtitle': '音声モード用の音声認識と音声合成。',+ 'onboarding.custom.voice.defaultDesc':+ 'OpenHumanには、音声/テキストをホスト型サービスに送信する可能性のある管理されたSTT/TTSプロバイダーが含まれています。',+ 'onboarding.custom.voice.configureDesc':+ '独自のElevenLabs / OpenAI Whisperなどを使用します。設定 › 音声で構成してください。',++ // Onboarding: Custom > OAuth (Composio)+ 'onboarding.custom.oauth.title': '接続(OAuth)',+ 'onboarding.custom.oauth.subtitle': 'OAuthが必要なGmail、Slack、Notionなどの接続サービス。',+ 'onboarding.custom.oauth.defaultDesc':+ 'OpenHumanは、管理されたComposioワークスペースを通じてOAuthとツール呼び出しを仲介します。',+ 'onboarding.custom.oauth.configureDesc':+ '独自のComposioアカウント/APIキーを使用します。設定 › 接続で構成してください。',++ // Onboarding: Custom > Search+ 'onboarding.custom.search.title': 'Web検索',+ 'onboarding.custom.search.subtitle': 'OpenHumanがユーザーに代わってWebを検索する方法。',+ 'onboarding.custom.search.defaultDesc':+ 'Web検索はすぐに使用できます。ExaとGeminiはTinyHumansに含まれており、APIキーは不要です。',+ 'onboarding.custom.search.configureDesc':+ 'ExaとGeminiが含まれています。設定 › ツールで独自のAPIキーを追加して、さらに検索プロバイダーを追加できます。',++ // Onboarding: Custom > Embeddings+ 'onboarding.custom.embeddings.title': '埋め込み',+ 'onboarding.custom.embeddings.subtitle':+ 'OpenHumanがセマンティックメモリー検索用のベクトル埋め込みを生成する方法。',+ 'onboarding.custom.embeddings.defaultDesc':+ 'OpenHuman はマネージド埋め込みサービスを使用します。API キーは不要です。',+ 'onboarding.custom.embeddings.configureDesc':+ 'お好みの埋め込みプロバイダー (OpenAI、Voyage、Ollama など) を利用できます。',++ // Onboarding: Custom > Vault+ 'onboarding.custom.vault.title': 'メモリーと Vault の設定',+ 'onboarding.custom.vault.subtitle':+ 'メモリーノートの書き込み先、ソースデータの読み取り方法、および Vault パイプラインの健全性を確認します。',+ 'onboarding.custom.vault.defaultDesc':+ 'OpenHuman が管理するメモリーのデフォルト設定を使用します。Vault のパスと同期の健全性は後から確認できます。',+ 'onboarding.custom.vault.configureDesc':+ 'Vault の所有権を確認し、ヘルスチェックを実行して、メモリー制御を今すぐ調整します。',+ 'onboarding.custom.vault.localDisabledReason':+ 'マネージド設定には OpenHuman へのサインインが必要であり、ローカルモードでは利用できません。',+ 'onboarding.custom.vault.exitError':+ 'オンボーディングを完了できませんでした。もう一度お試しください。',++ // Onboarding: Custom > Memory+ 'onboarding.custom.memory.title': 'メモリー',+ 'onboarding.custom.memory.subtitle':+ 'OpenHuman がコンテキスト、設定、過去の会話をどのように記憶するかについて。',+ 'onboarding.custom.memory.defaultDesc':+ 'OpenHuman がメモリーの保存と取得を自動的に管理します。設定は不要です。',+ 'onboarding.custom.memory.configureDesc':+ 'メモリーの確認、エクスポート、消去を自分で行います。設定 › メモリーで構成してください。',++ // Accounts+ 'accounts.disconnect': '接続解除',+ 'accounts.disconnectClearMemory': 'このソースからのメモリーも削除する',+ 'accounts.disconnectClearMemoryHint':+ 'この接続に関連付けられたローカルのメモリーチャンクを完全に削除します。',++ // Channels+ 'channels.title': 'チャンネル',+ 'channels.configure': 'チャンネルの設定',+ 'channels.setup': 'セットアップ',+ 'channels.noChannels': '設定済みのチャンネルはありません',+ 'channels.localManagedUnavailable': 'マネージドチャンネルはローカルユーザーでは利用できません。',+ 'channels.addChannel': 'チャンネルを追加',+ 'channels.status.connected': '接続済み',+ 'channels.status.disconnected': '未接続',+ 'channels.status.error': 'エラー',+ 'channels.status.configuring': '設定中',+ 'channels.defaultMessaging': 'デフォルトのメッセージングチャンネル',+ 'channels.setAsDefault': 'デフォルトに設定',+ 'channels.defaultBadge': 'デフォルト',+ 'channels.connectedDesc':+ 'メッセージの送受信準備ができています。デフォルトとして 1 つを選択してください。',+ 'channels.availableDesc': 'リンクできるチャットアプリです。設定するには開いてください。',++ // Webhooks++ // Invites+ 'invites.title': '招待',+ 'invites.noInvites': '保留中の招待はありません',+ 'invites.redeemHeading': '紹介コードをお持ちですか?',+ 'invites.redeemPlaceholder': '紹介コード',+ 'invites.redeemSubmit': '引き換え',++ // Developer Options / Developer & Diagnostics+ 'devOptions.titleDiagnostics': '開発者向けと診断',+ 'devOptions.diagnostics': '診断',+ 'devOptions.toolPolicyDiagnosticsDesc':+ 'ツールインベントリ、ポリシー状態、MCP 許可リスト、および最近のブロック',+ 'devOptions.toolPolicyDiagnostics.loading': '読み込み中…',+ 'devOptions.toolPolicyDiagnostics.unavailable': '診断情報は利用できません',+ 'devOptions.toolPolicyDiagnostics.inventory.title': 'ツール一覧',+ 'devOptions.toolPolicyDiagnostics.inventory.totalTools': 'ツール合計数',+ 'devOptions.toolPolicyDiagnostics.inventory.enabledTools': '有効なツール',+ 'devOptions.toolPolicyDiagnostics.inventory.mcpStdioTools': 'MCP stdio ツール',+ 'devOptions.toolPolicyDiagnostics.inventory.jsonRpcTools': 'JSON-RPC ツール',+ 'devOptions.toolPolicyDiagnostics.posture.title': 'ポリシー設定',+ 'devOptions.toolPolicyDiagnostics.posture.autonomy': '自律性レベル',+ 'devOptions.toolPolicyDiagnostics.posture.workspaceOnly': 'ワークスペースのみ',+ 'devOptions.toolPolicyDiagnostics.posture.maxActionsPerHour': '1時間あたりの最大アクション数',+ 'devOptions.toolPolicyDiagnostics.posture.approvalMediumRisk': '中リスクのアクションに承認を要求',+ 'devOptions.toolPolicyDiagnostics.posture.blockHighRisk': '高リスクのコマンドをブロック',+ 'devOptions.toolPolicyDiagnostics.mcpAllowlists.title': 'MCP 許可リスト',+ 'devOptions.toolPolicyDiagnostics.mcpAllowlists.summary':+ '有効: {enabled} · サーバー {totalCount} 件中 {enabledCount} 件',+ 'devOptions.toolPolicyDiagnostics.mcpAllowlists.unnamed': '名前未設定のサーバー',+ 'devOptions.toolPolicyDiagnostics.mcpAllowlists.allowDeny':+ '許可: {allowCount} · 拒否: {denyCount}',+ 'devOptions.toolPolicyDiagnostics.mcpWriteAudit.title': 'MCP 書き込み監査',+ 'devOptions.toolPolicyDiagnostics.mcpWriteAudit.summary':+ '有効: {enabled} · 最近の行: {recentRows}',+ 'devOptions.toolPolicyDiagnostics.redactedSurfaces.title': '機密性の高い領域',+ 'devOptions.toolPolicyDiagnostics.redactedSurfaces.summary':+ '書き込み可能な領域 {writeCount} 件 · ポリシー対象領域 {policyCount} 件',+ 'devOptions.toolPolicyDiagnostics.recentBlocked.title': '最近ブロックされた呼び出し',+ 'devOptions.toolPolicyDiagnostics.recentBlocked.empty':+ '最近ブロックされたツール呼び出しはありません',++ // Voice / Dictation+ 'voice.pushToTalk': 'プッシュトゥトーク',++ // Misc+ 'misc.somethingWentWrong': '問題が発生しました',+ 'misc.downloading': 'ダウンロード中...',+ 'misc.beta':+ 'OpenHuman は初期ベータ版です。フィードバックの共有やバグ報告を歓迎します。すべての報告がより迅速なリリースにつながります。',+ 'misc.betaFeedback': 'フィードバックを送信',++ // Mnemonic / Recovery+ 'mnemonic.warning': 'これらの単語を順番に書き留め、安全な場所に保管してください。',+ 'mnemonic.revealPhrase': 'リカバリーフレーズを表示',++ // What Leaves My Computer+ 'privacy.description': '外部サービスに送信されるデータの透明性レポート。',+ 'privacy.anonymizedAnalytics': 'プロダクトアナリティクス',+ 'privacy.shareAnonymizedData': 'プロダクトアナリティクスと診断データを共有',+ 'privacy.shareAnonymizedDataDesc':+ 'プライバシーを制限したクラッシュレポートと使用イベント(安定したアカウントIDとアプリバージョンメタデータを含む)を共有して OpenHuman の改善にご協力ください。メッセージ、ウォレットキー、APIキー、セッショントークンは収集されません。',+ 'privacy.analyticsDisclaimer':+ '有効にすると、プロダクトアナリティクスと診断データにプライバシーを制限したクラッシュレポート、使用イベント、安定したアカウントID、アプリバージョンメタデータが含まれる場合があります。メッセージ、ウォレットキー、APIキー、セッショントークンは収集されません。この設定はいつでも変更できます。',++ // Privacy Mode selector (#4435): data-egress posture+ 'privacy.mode.title': 'プライバシーモード',+ 'privacy.mode.description':+ 'デバイス外に送信できるデータの量を制御します。エージェントアクセスモードとは別です。',+ 'privacy.mode.localOnly': 'ローカルのみ',+ 'privacy.mode.localOnlyDesc': 'デバイス内モデルのみ。外部モデル呼び出しはブロックされます。',+ 'privacy.mode.standard': '標準',+ 'privacy.mode.standardDesc': 'バランス型。外部モデルは設定どおりに使用されます。',+ 'privacy.mode.sensitive': '機密',+ 'privacy.mode.sensitiveDesc':+ '機密データに特別な配慮をします。より詳細なコントロールは近日提供予定です。',+ 'privacy.mode.saved': '保存しました',+ 'privacy.mode.saveError': 'プライバシーモードを更新できませんでした。',++ // Privacy status pill + per-action egress disclosure (#4437 / S3)++ // Settings: About+ 'settings.about.updateAvailable': 'が利用可能です',+ 'settings.about.lastChecked': '最終確認',+ 'settings.about.checking': '確認中...',+ 'settings.about.checkForUpdates': '更新を確認',+ 'settings.about.releases': 'リリース',+ 'settings.about.resources': 'リソース',+ 'settings.about.releasesDesc': 'GitHubでリリースノートと以前のビルドを閲覧できます。',+ 'settings.about.openReleases': 'GitHubのリリースを開く',+ 'settings.about.starCta.title': 'OpenHumanをお楽しみですか?',+ 'settings.about.starCta.body':+ 'GitHubでスターを付けてください。より多くの人に届ける助けになります。',+ 'settings.about.starCta.star': 'GitHubでスターを付ける',+ 'settings.about.starCta.dismiss': '後で',+ 'settings.about.connection': '接続',+ 'settings.about.connectionMode': 'モード',+ 'settings.about.connectionModeLocal': 'ローカル',+ 'settings.about.connectionModeCloud': 'クラウド',+ 'settings.about.connectionModeUnset': '未選択',+ 'settings.about.serverUrl': 'サーバーURL',+ 'settings.about.serverUrlUnavailable': '利用不可',+ 'settings.about.connectionHelperLocal':+ 'アプリ起動時にTauriシェルによってプロセス内で起動されます。ポートは起動時に選択されるため、このURLは起動のたびに変わります。',+ 'settings.about.connectionHelperCloud':+ 'リモートコアに接続しています。BootCheckまたはクラウドモードピッカーで変更してください。',+ // Core connection panel (GH-4396)+ 'settings.core.title': 'ゲートウェイ',+ 'settings.core.menuDesc': '組み込みのローカルコアを使用するか、リモートコアに接続します。',+ 'settings.core.useRemoteToggle': 'リモートコアを使用',+ 'settings.core.useRemoteToggleDesc':+ '組み込みのローカルコアの代わりに、HTTP経由でリモートコアに接続します。',+ 'settings.core.statusConnectedRemote': 'リモートコアに接続済み',+ 'settings.core.statusConnectedLocal': 'ローカルコアに接続済み',+ 'settings.core.statusChecking': '接続を確認中…',+ 'settings.core.statusAuthFailed': '到達可能ですが、トークンが拒否されました',+ 'settings.core.statusUnreachable': 'コアに到達できません',+ 'settings.core.recheck': '再確認',+ 'settings.core.save': '保存して再起動',+ 'settings.core.applyRestartNote': '保存すると再接続のためにOpenHumanが再起動します。',++ // Gateways — cores this app provisions and runs elsewhere.+ 'devOptions.gateway': 'ゲートウェイ',+ 'devOptions.provisionedCore': 'このアプリによってプロビジョニングされたコア',+ 'devOptions.gatewayId': 'ゲートウェイ',+ 'settings.gateway.title': 'コアを別の場所で実行',+ 'settings.gateway.description':+ 'コアはコンテナ内、SSHで接続した別のマシン上、またはそのマシンのコンテナ内で実行できます。OpenHumanがコアを起動して接続し、接続先を切り替えると元のコアを停止します。',+ 'settings.gateway.add': '場所を追加',+ 'settings.gateway.save': '場所を保存',+ 'settings.gateway.remove': '削除',+ 'settings.gateway.use': 'これを使用',+ 'settings.gateway.inUse': '使用中',+ 'settings.gateway.activating': '接続中…',+ 'settings.gateway.activatingStep': '接続中: {step}',+ 'settings.gateway.connected': '{endpoint} に接続済み',+ 'settings.gateway.failed': '接続できませんでした: {reason}',+ 'settings.gateway.nameLabel': '名前',+ 'settings.gateway.namePlaceholder': 'ビルドサーバー',+ 'settings.gateway.whereLegend': 'どこで実行しますか?',+ 'settings.gateway.where.here': 'このコンピュータ上',+ 'settings.gateway.where.ssh': 'SSH経由で別のマシン上',+ 'settings.gateway.destinationLabel': 'SSH接続先',+ 'settings.gateway.destinationPlaceholder': '[email protected]',+ 'settings.gateway.destinationHelp':+ 'SSH設定のホスト、または user@host を指定します。設定済みのポート、鍵、ジャンプホストはそのまま使用されます。',+ 'settings.gateway.identityLabel': '秘密鍵(任意)',+ 'settings.gateway.identityPlaceholder': '~/.ssh/id_ed25519',+ 'settings.gateway.acceptNewHostKey': '初回接続時にこのマシンを信頼する',+ 'settings.gateway.acceptNewHostKeyHelp':+ '初めて接続するホストの鍵を受け入れます。以前の鍵から変更されている場合は、安全のため接続を拒否します。',+ 'settings.gateway.containedLabel': 'コンテナ内で実行',+ 'settings.gateway.imageLabel': 'コンテナイメージ',+ 'settings.gateway.binaryLabel': 'openhuman-core へのパス',+ 'settings.gateway.kind.desktop': 'このアプリ内',+ 'settings.gateway.kind.remote': '指定URLのコア',+ 'settings.gateway.kind.docker': 'このコンピューターのコンテナ内',+ 'settings.gateway.kind.ssh': '別のマシン上',+ 'settings.gateway.kind.ssh+docker': '別のマシンのコンテナ内',+ 'settings.gateway.kind.local-process': 'このコンピュータ上',+ 'settings.gateway.idRequired': 'この場所に名前を付けてください。',+ 'settings.gateway.idReserved': 'その名前は、このアプリ自体のコア用に予約されています。',+ 'settings.gateway.destinationRequired': '接続するマシンを入力してください。',+ 'settings.gateway.imageRequired': '実行するコンテナイメージを入力してください。',+ 'settings.gateway.binaryRequired': 'そのマシン上の openhuman-core へのパスを入力してください。',+ 'settings.gateway.portInvalid': 'SSHポートは数値である必要があります。',+ 'settings.usage.title': '使用量',+ 'settings.usage.menuDesc': 'コスト、トークン節約、使用記録、バックグラウンドアクティビティ',+ 'settings.costDashboard.monthToDate': '今月',+ 'settings.costDashboard.period': '期間',+ 'settings.costDashboard.periodDays': '過去 {days} 日間',+ 'settings.costDashboard.all': 'すべて',+ 'settings.costDashboard.costSource': 'コストソース',+ 'settings.costDashboard.estimated': '推定',+ 'settings.costDashboard.providerCharged': 'プロバイダー請求',+ 'settings.costDashboard.searchModelSession': 'モデルまたはセッション',+ 'settings.costDashboard.filteredTotal': '読み込み済み {loaded} 件中 {shown} 件 • {cost}',+ 'settings.costDashboard.title': 'コストダッシュボード',+ 'settings.costDashboard.sevenDayCost': '7日間の1日あたりコスト',+ 'settings.costDashboard.sevenDayTokens': '7日間のトークン使用量',+ 'settings.costDashboard.totalSpend': '7日間合計',+ 'settings.costDashboard.monthlyPace': '月間ペース',+ 'settings.costDashboard.modelBreakdown': 'モデル別内訳',+ 'settings.costDashboard.model': 'モデル',+ 'settings.costDashboard.provider': 'プロバイダー',+ 'settings.costDashboard.cost': 'コスト',+ 'settings.costDashboard.tokens': 'トークン',+ 'settings.costDashboard.requests': 'リクエスト',+ 'settings.costDashboard.percentOfTotal': '合計の割合 (%)',+ 'settings.costDashboard.inputTokens': '入力',+ 'settings.costDashboard.outputTokens': '出力',+ 'settings.costDashboard.noData': '過去7日間のコスト記録はありません。',+ 'settings.costDashboard.noModels': '過去7日間のモデルアクティビティはありません。',+ 'settings.costDashboard.loading': 'コストダッシュボードを読み込み中…',+ 'settings.costDashboard.disabledHint':+ '設定でコストダッシュボードが無効になっています。config.toml の [cost.dashboard] で enabled = true に設定して再度有効にしてください。',+ 'settings.costDashboard.subtitle':+ 'ローカルプロバイダー呼び出しの使用量。コストは推定値の場合があり、ホスティング課金は別途です。',+ 'settings.costDashboard.summaryAriaLabel': 'コストサマリー指標',+ 'settings.costDashboard.lastSevenDays': '過去7日間',+ 'settings.costDashboard.monthlyPaceHint':+ '現在の1日あたり平均コストに基づく月間支出予測(平均 × 30)。',+ 'settings.costDashboard.todayBadge': '本日',+ 'settings.costDashboard.unknownProvider': 'なし',+ 'settings.costDashboard.justNow': 'たった今',+ 'settings.costDashboard.secondsAgo': '{value}秒前',+ 'settings.costDashboard.minutesAgo': '{value}分前',+ 'settings.costDashboard.hoursAgo': '{value}時間前',+ 'settings.costDashboard.daysAgo': '{value}日前',+ 'settings.costDashboard.updated': '更新済み',+ 'settings.costDashboard.refresh': '更新',+ 'settings.costDashboard.utcNote': '日次バケットはUTC基準',+ 'settings.costDashboard.stackedNote': '入力と出力を積み上げ表示',+ 'settings.costDashboard.modelBreakdownHint': '過去7日間の集計です。',+ 'settings.costDashboard.usageLog': '使用ログ',+ 'settings.costDashboard.usageLogHint': '過去{days}日間の最新レコード(最大{limit}行まで表示)。',+ 'settings.costDashboard.noUsageLog': 'この期間の使用記録はありません。',+ 'settings.costDashboard.when': '日時',+ 'settings.costDashboard.category': 'カテゴリ',+ 'settings.costDashboard.session': 'セッション',+ 'settings.costDashboard.noDataHint':+ 'エージェントにメッセージを送信してください。次のプロバイダー呼び出しでのトークン使用量が約10秒以内にチャートに反映されます。',+ 'settings.search.title': '検索エンジン',+ 'settings.search.statusNeedsKey': 'APIキーが必要',+ 'settings.search.getApiKey': 'APIキーを取得',+ 'settings.search.show': '表示',+ 'settings.search.hide': '非表示',+ 'settings.search.statusSaving': '保存中…',+ 'settings.search.statusSaved': '保存しました。',+ 'settings.search.statusError': '失敗しました',+ 'settings.search.placeholderStored': '••••••••(保存済み)',+ 'settings.search.allowedSitesLabel': '許可されたウェブサイト',+ 'settings.search.allowedSitesHint':+ '1行に1つのホストを入力してください(例: reuters.com)。アシスタントはWebフェッチやブラウザツールを通じてこれらのホストを開いて読み取ることができます。各ホストはサブドメインも含まれます。このリストはWeb検索を制限するものではありません。',+ 'settings.search.allowedSitesAllOn':+ 'アシスタントは公開されているすべてのウェブサイトを開くことができます。ローカルおよびプライベートアドレスはブロックされたままです。',+ 'settings.search.allowedSitesPlaceholder': 'reuters.com\napnews.com\ngithub.com',+ 'settings.search.allowedSitesSave': 'ウェブサイトを保存',+ 'settings.search.accessModeAria': 'Webアクセスモード',+ 'settings.search.accessAllowAll': 'すべて許可',+ 'settings.search.accessCustom': 'カスタム',+ 'settings.search.accessBlockAll': 'すべてブロック',+ 'settings.search.accessBlockAllHint':+ 'すべてのWebアクセスがブロックされています。アシスタントはウェブサイトを開いたり読み取ったりできません。',+ 'settings.search.localManagedUnavailable':+ 'TinyHumans経由のプロバイダーを使用するにはサインインが必要です。ローカルセッションでWeb検索を使用するには、独自のAPIキーでプロバイダーを接続してください。',+ 'settings.search.enabledLabel': 'Web検索',+ 'settings.search.providerToggleAria': '{provider}を使用',+ 'settings.search.routeManaged': 'TinyHumans経由',+ 'settings.search.routeDirect': '独自のキー',+ 'settings.search.apiKeyLabel': '{provider} APIキー',+ 'settings.search.placeholderKey': '{provider}のAPIキーを貼り付けてください',+ 'settings.search.baseUrlLabel': 'インスタンスURL',+ 'settings.search.statusReady': '準備完了',+ 'settings.search.statusSignInRequired': 'サインインが必要',+ 'settings.search.statusOff': 'オフ',+ 'settings.search.deepResearchHint':+ '独自の {provider} キーを追加して、ディープリサーチを有効にします。',+ 'settings.search.rolesTitle': 'ロール',+ 'settings.search.rolesDesc':+ '各ロールはエージェント用の 1 つのツールです。最初に利用可能なプロバイダーが処理を担当し、他はフォールバックとして順番に試行されます。',+ 'settings.search.roleSearch': '検索',+ 'settings.search.roleSearchDesc': 'クエリに対するランキング付きのウェブ検索結果。',+ 'settings.search.roleAnswer': '回答',+ 'settings.search.roleAnswerDesc': 'ウェブソースに基づき、引用付きで作成された文章による回答。',+ 'settings.search.roleContents': 'コンテンツ',+ 'settings.search.roleContentsDesc': '指定したページのテキストを取得して抽出します。',+ 'settings.search.roleMoveUp': '{provider} を上に移動',+ 'settings.search.roleMoveDown': '{provider} を下に移動',+ 'settings.search.roleRemove': '{provider} を削除',+ 'settings.search.roleAdd': '{provider} を追加',+ 'settings.search.roleReset': 'デフォルトにリセット',+ 'settings.search.roleUnavailable': '利用不可',+ 'settings.search.advancedTitle': '詳細設定',+ 'settings.search.exposeProviderTools': '各プロバイダー独自のツールを公開',+ 'settings.search.exposeProviderToolsDesc':+ 'ルーティングされた検索ツールを、有効な各プロバイダー独自のツールに置き換えます。ルーティングされたツールのみを認識するエージェント(メインエージェントを含む)はウェブ検索ができなくなり、追加のツールはコンテキストウィンドウをより多く消費します。プロバイダーのテストを行わない限り、この設定はオフのままにしてください。',+ 'settings.search.tabProviders': 'プロバイダー',+ 'settings.search.tabRouting': 'ルーティング',+ 'settings.search.tabWebsites': 'ウェブサイト',+ 'settings.search.offNotice':+ 'ウェブ検索はオフです。再度オンにするまで、エージェントはウェブを検索したり閲覧したりできません。',+ 'settings.search.connectedTitle': '接続済み',+ 'settings.search.connectedDesc':+ 'エージェントが使用できるプロバイダーです。複数同時に有効にできますが、最初に試行されるプロバイダーは「ルーティング」タブで決定されます。',+ 'settings.search.connectedEmpty':+ 'まだプロバイダーが接続されていません。以下から選択してください。',+ 'settings.search.catalogTitle': 'プロバイダーを追加',+ 'settings.search.catalogDesc': '接続するプロバイダーを選択します。いつでも追加できます。',+ 'settings.search.catalogManagedTitle': 'TinyHumans 経由',+ 'settings.search.catalogManagedHelper': '設定不要:ワンクリックで利用可能になります。',+ 'settings.search.catalogOwnTitle': '独自キーを使用',+ 'settings.search.catalogOwnHelper':+ 'プロバイダーから API キーを取得するか、独自インスタンスを指定します。',+ 'settings.search.addProviderAria': '{provider} を接続',+ 'settings.search.detailOwnKey': '独自の API キー',+ 'settings.search.detailNoKey': 'API キーが未設定です',+ 'settings.search.detailNoUrl': 'インスタンス URL が未設定です',+ 'settings.search.deepResearchBadge': 'ディープリサーチ',+ 'settings.search.rowActions': '{provider} のオプション',+ 'settings.search.actionUseOwnKey': '独自キーを使用',+ 'settings.search.actionUseManaged': 'TinyHumans 経由で使用',+ 'settings.search.actionAddKey': 'APIキーを追加',+ 'settings.search.actionAddDeepResearchKey': 'ディープリサーチ用のキーを追加',+ 'settings.search.actionReplaceKey': 'APIキーを置き換える',+ 'settings.search.actionRemoveKey': 'APIキーを削除',+ 'settings.search.actionEditUrl': 'インスタンスURLを変更',+ 'settings.search.connectTitle': '{provider}に接続',+ 'settings.search.connect': '接続',+ 'settings.search.baseUrlHint': 'ポートを含むSearXNGインスタンスのアドレス。',+ 'settings.search.roleServing': '使用中',+ 'settings.search.roleNoProviderShort': '利用可能なプロバイダーがありません',+ 'settings.search.roleFallbacks': '{providers}にフォールバック',+ 'settings.search.roleNoFallback': 'フォールバックなし',+ 'settings.search.roleDialogDesc':+ '最初に利用可能なプロバイダーがこのタスクを実行します。失敗または利用不可の場合、次のプロバイダーが試行されます。',+ // ─── Settings global search bar ────────────────────────────+ // ─── Embeddings settings ───────────────────────────────────+ 'settings.embeddings.description':+ 'メモリーをベクトルに変換してセマンティック検索を行う埋め込みプロバイダーを選択します。プロバイダー、モデル、または次元数を変更すると、保存されたベクトルが無効になり、メモリーの完全なリセットが必要になります。',+ 'settings.embeddings.providerAria': '埋め込みプロバイダー',+ 'settings.embeddings.modelCardTitle': 'モデルと次元数',+ 'settings.embeddings.statusConfigured': '設定済み',+ 'settings.embeddings.statusNeedsKey': 'APIキーが必要',+ 'settings.embeddings.requiresSignIn': 'OpenHumanへのサインインが必要',+ 'settings.embeddings.managedLoginRequired':+ 'マネージド埋め込みを使用するにはOpenHumanへのサインインが必要です。OpenHumanバックエンドを使用するにはサインインしてください。',+ 'settings.embeddings.managedBannerIntro':+ 'マネージド埋め込みはOpenHumanバックエンド経由でルーティングされ、OpenHumanアカウントのセッションが必要です。',+ 'settings.embeddings.managedBannerLocalSession':+ 'ローカルセッションを終了してサインインするか、ローカルまたはBYO(Bring Your Own)埋め込みプロバイダーに切り替えてください。',+ 'settings.embeddings.managedBannerRemoteSession':+ 'OpenHumanセッションを更新するために再度サインインするか、ローカルまたはBYO(Bring Your Own)埋め込みプロバイダーに切り替えてください。',+ 'settings.embeddings.signInAgain': '再度サインイン',+ 'settings.embeddings.apiKeyLabel': '{provider} APIキー',+ 'settings.embeddings.apiKeyLabelGeneric': 'APIキー',+ 'settings.embeddings.placeholderKey': 'APIキーを貼り付けてください…',+ 'settings.embeddings.keyStoredEncrypted': 'APIキーはこのデバイス上で暗号化されて保存されます。',+ 'settings.embeddings.show': '表示',+ 'settings.embeddings.hide': '非表示',+ 'settings.embeddings.model': 'モデル',+ 'settings.embeddings.dimensions': '次元数',+ 'settings.embeddings.customEndpoint': 'カスタムエンドポイント',+ 'settings.embeddings.customModelPlaceholder': 'モデル名',+ 'settings.embeddings.testConnection': '接続テスト',+ 'settings.embeddings.testing': 'テスト中…',+ 'settings.embeddings.testSuccess': '接続済み: {dims}次元',+ 'settings.embeddings.connectionTestFailed': 'テスト失敗',+ 'settings.embeddings.verifyFallback':+ '埋め込みエンドポイントを検証できませんでした。稼働中で埋め込みモデルを提供していることを確認し、再度保存してください。',+ 'settings.embeddings.testFailed': '失敗: {error}',+ 'settings.embeddings.saving': '保存中…',+ 'settings.embeddings.saved': '保存しました。',+ 'settings.embeddings.errorPrefix': '失敗しました',+ 'settings.embeddings.wipeTitle': 'メモリーベクトルをリセットしますか?',+ 'settings.embeddings.wipeBody':+ '埋め込みプロバイダー、モデル、または次元数を変更すると、保存されているすべてのメモリーベクトルが消去されます。リコールが再び機能するには、メモリーの再構築が必要です。この操作は元に戻せません。',+ 'settings.embeddings.cancel': 'キャンセル',+ 'settings.embeddings.confirmWipe': '消去して適用',+ 'settings.embeddings.setupTitle': '{provider} を設定',+ 'settings.embeddings.saveAndSwitch': '保存して切り替え',+ 'settings.embeddings.optional': '任意',+ 'settings.embeddings.vectorSearchDisabled':+ 'ベクトル検索が無効です。メモリーリコールはキーワード一致と最新性のみを使用し、セマンティックランキングは行われません。',+ 'settings.embeddings.clearKey': 'APIキーをクリア',+ 'pages.settings.ai.embeddings': '埋め込み',+ 'pages.settings.ai.embeddingsDesc': 'メモリー検索用のベクトルエンコーディングモデル',++ 'mcp.toolList.noTools': '利用可能なツールがありません。',+ 'devices.comingSoonDescription':+ 'デバイスペアリングは近日公開予定です。このページは、iPhoneのペアリングや接続済みデバイスの管理の拠点となります。',+ 'devices.title': 'デバイス',+ 'devices.revokeAria': '{label} を取り消す',+ 'mcp.catalog.searchAria': 'MCPサーバーカタログを検索',+ 'mcp.catalog.searchPlaceholder': 'MCPサーバーを検索...',+ 'mcp.catalog.loadFailed': 'カタログの読み込みに失敗しました',+ 'mcp.registry.error.notFound':+ 'レジストリにサーバーが見つかりません。サーバー名を確認して再試行するか、利用可能なMCPサーバーを参照するか、URLでサーバーを手動で追加してください。',+ 'mcp.registry.error.network':+ 'MCPレジストリに接続できませんでした。接続を確認して再試行するか、URLでサーバーを手動で追加してください。',+ 'mcp.registry.error.unavailable':+ 'MCPレジストリは現在利用できません。後で再試行するか、利用可能なMCPサーバーを参照するか、URLでサーバーを手動で追加してください。',+ 'mcp.catalog.noResults': 'サーバーが見つかりません。',+ 'mcp.catalog.noResultsFor': '"{query}" に一致するサーバーが見つかりません。',+ 'mcp.catalog.loadMore': 'さらに読み込む',+ 'mcp.toolList.availableSingular': '{count} 個のツールが利用可能',+ 'mcp.toolList.availablePlural': '{count} 個のツールが利用可能',+ 'mcp.toolList.tryTool': '試す',+ 'mcp.toolList.tryToolAria': '{name} の実行プレイグラウンドを開く',+ 'mcp.playground.title': '{name} を実行',+ 'mcp.playground.inputSchema': '入力スキーマ',+ 'mcp.playground.argsLabel': '引数 (JSON)',+ 'mcp.playground.argsHelp':+ '入力スキーマに一致するJSONを入力してください。入力が空の場合は {} として扱われます。',+ 'mcp.playground.runShortcut': '⌘/Ctrl + Enter で実行',+ 'mcp.playground.format': '整形',+ 'mcp.playground.invalidJson': '無効なJSONです',+ 'mcp.playground.run': 'ツールを実行',+ 'mcp.playground.running': '実行中…',+ 'mcp.playground.result': '結果',+ 'mcp.playground.resultError': 'ツールがエラーを返しました',+ 'mcp.playground.copyResult': '結果をコピー',+ 'mcp.playground.copied': 'コピーしました',+ 'mcp.playground.history': '履歴',+ 'mcp.playground.historyEmpty': 'このセッションにはまだ呼び出しがありません。',+ 'mcp.playground.historyLoad': '読み込み',+ 'mcp.playground.unexpectedError': 'ツール呼び出し中に予期しないエラーが発生しました。',+ 'app.update.dismissNotification': '更新通知を閉じる',+ 'bootCheck.rpcAuthSuffix': 'すべての RPC で',+ 'mobile.nav.ariaLabel': 'モバイルナビゲーション',+ 'progress.stepsAria': '進捗ステップ',+ 'progress.stepAria': 'ステップ {current} / {total}',+ 'art.rotatingTetrahedronAria': '回転する逆四面体宇宙船',+ 'mcp.installed.empty': 'インストール済みの MCP サーバーはありません。',+ 'mcp.tab.loading': 'MCP サーバーを読み込み中...',+ 'mcp.tab.transport.hosted': 'ホスト型',+ 'mcp.tab.transport.local': 'Stdio',+ 'mcp.tab.transport.hostedHint':+ 'リモートサーバーで実行されます。インストール時にサインインまたはトークンを設定します',+ 'mcp.tab.transport.localHint':+ 'デバイス上で実行されます。インストール時にトークンが必要な場合があります',+ 'mcp.tab.transportFilter.label': 'タイプ',+ 'mcp.tab.transportFilter.aria': 'トランスポートでサーバーを絞り込む',+ 'mcp.tab.link.website': 'ウェブサイト',+ 'mcp.tab.link.repo': 'リポジトリ',+ 'mcp.tab.officialBadge': '公式',+ 'mcp.tab.officialHint': 'ベンダーによる公式サーバー',+ 'mcp.install.enterValue': '{key} を入力',+ 'mcp.install.show': '表示',+ 'mcp.install.hide': '非表示',+ 'mcp.install.missingRequired': '「{key}」は必須です',+ 'mcp.tab.tablistAria': 'MCP ビュー',+ 'mcp.rows.showTools': '{name} のツールを表示',+ 'mcp.rows.hideTools': '{name} のツールを非表示',+ 'mcp.rows.toolsLoading': 'ツールを読み込み中…',+ 'mcp.rows.toolsFailed': 'ツールを読み込めませんでした。',+ 'mcp.rows.add': 'サーバーを追加',+ 'mcp.rows.edit': '{name} を編集',+ 'mcp.form.addTitle': 'MCP サーバーを追加',+ 'mcp.form.editTitle': '{name} を編集',+ 'mcp.form.subtitle':+ 'ローカルコマンドまたはリモートエンドポイントと、認証に必要な情報を指定します。mcp.json に書き込まれます。',+ 'mcp.form.name': '名前',+ 'mcp.form.nameHint':+ '英数字、ドット、ハイフンが使用可能です。これは mcp.json 内のキーとして使用されます。',+ 'mcp.form.transport': 'トランスポート',+ 'mcp.form.transportStdio': 'ローカルコマンド (stdio)',+ 'mcp.form.transportHttp': 'リモート URL (HTTP)',+ 'mcp.form.command': 'コマンド',+ 'mcp.form.args': '引数',+ 'mcp.form.argsHint': 'スペースで区切ってください。スペースを含む引数は引用符で囲んでください。',+ 'mcp.form.env': '環境変数',+ 'mcp.form.envHint':+ 'コマンドに渡されます。値は暗号化されて保存され、再度表示されることはありません。',+ 'mcp.form.envKey': '変数名',+ 'mcp.form.envValue': '値',+ 'mcp.form.value': '値',+ 'mcp.form.keepStored': '保存済み(変更しない場合は空欄のままにしてください)',+ 'mcp.form.removeRow': '行を削除',+ 'mcp.form.addEnv': '変数を追加',+ 'mcp.form.url': 'URL',+ 'mcp.form.auth': '認証',+ 'mcp.form.authNone': 'なし',+ 'mcp.form.authBearer': 'ベアラートークン',+ 'mcp.form.authHeader': 'カスタムヘッダー',+ 'mcp.form.authOauth': 'ブラウザでサインイン (OAuth)',+ 'mcp.form.token': 'トークン',+ 'mcp.form.tokenHint': 'Authorization: Bearer <token> として送信されます。',+ 'mcp.form.headerName': 'ヘッダー名',+ 'mcp.form.headerValue': 'ヘッダー値',+ 'mcp.form.oauthHint':+ '保存後、サーバーのサインインページがブラウザで開きます。戻ると接続が完了します。',+ 'mcp.form.add': 'サーバーを追加',+ 'mcp.form.save': '保存',+ 'mcp.form.saveAndSignIn': '保存してサインイン',+ 'mcp.form.saving': '保存中…',+ 'mcp.form.saveFailed': 'サーバーを保存できませんでした。',+ 'mcp.rows.title': 'インストール済みサーバー',+ 'mcp.rows.searchPlaceholder': 'サーバーを検索…',+ 'mcp.rows.intro':+ 'エージェントが呼び出せる MCP サーバーです(mcp.json で宣言されています)。サーバーを開くと、認証情報とツールを確認できます。',+ 'mcp.rows.open': '{name} を開く',+ 'mcp.rows.connect': '{name} に接続',+ 'mcp.rows.disconnect': '{name} から切断',+ 'mcp.rows.enable': '{name} を有効化',+ 'mcp.rows.disable': '{name} を無効化',+ 'mcp.rows.remove': '{name} を削除',+ 'mcp.rows.removeTitle': '{name} を削除しますか?',+ 'mcp.rows.removeBody':+ 'サーバーと保存された認証情報が削除されます。mcp.json で再度宣言すると、最初から設定し直す必要があります。',+ 'mcp.rows.opFailed': '操作に失敗しました。',+ 'mcp.json.invalidTitle': 'このファイルはまだ保存できません',+ 'mcp.json.unsaved': '未保存の変更',+ 'mcp.registry.title': 'MCP ディレクトリ',+ 'mcp.tab.section.servers': 'サーバー',+ 'mcp.tab.section.clients': 'クライアント',+ 'mcp.tab.section.json': 'mcp.json',+ 'mcp.tab.section.registry': 'レジストリ',+ 'mcp.tab.back': 'サーバー一覧に戻る',+ 'mcp.tab.action.openPage': 'ページを開く',+ 'mcp.tab.aria.openServerPage': '{name} のページを開く',+ 'mcp.installed.emptyAddInJson': 'mcp.json に追加してください',+ 'mcp.registry.intro':+ 'MCP サーバーのディレクトリです。サーバーを開くと、インストール手順が記載された個別のページに移動します。mcp.json タブで追加してください。',+ 'mcp.json.loadFailedTitle': 'mcp.json を読み込めませんでした',+ 'mcp.json.loadFailedBody':+ 'コアからの応答がないため、ドキュメントを表示できません。空のエディタを表示すると、保存時にサーバー設定が消去される恐れがあります。',+ 'mcp.json.intro':+ '他の MCP クライアントで使用される形式で、MCP サーバーを 1 つのドキュメントとして管理します。インストールページからサーバーブロックを貼り付けて保存してください。',+ 'mcp.json.credentialsNote':+ '認証情報は書き込み専用です。env と headers の値は保存時に記録され、再度表示されることはありません。認証情報なしで保存した項目は、既存の保存内容を維持します。キーを "" に設定すると削除されます。',+ 'mcp.json.editorAria': 'mcp.json ドキュメント',+ 'mcp.json.refusedTitle': 'コアがこのドキュメントを拒否しました',+ 'mcp.json.saved': '保存しました: 追加 {added}、更新 {updated}、削除 {removed}',+ 'mcp.json.saving': '保存中…',+ 'mcp.json.save': '保存',+ 'mcp.json.revert': '元に戻す',+ 'mcp.json.exampleTitle': '例',+ 'mcp.json.saveFailed': 'mcp.json を保存できませんでした。',+ 'mcp.json.parseError.empty':+ 'ドキュメントが空です。サーバーなしの場合は { "mcpServers": {} } です。',+ 'mcp.json.parseError.invalidJson': '無効な JSON です: {detail}',+ 'mcp.json.parseError.rootNotObject': 'mcp.json は `mcpServers` キーを持つオブジェクトです。',+ 'mcp.json.parseError.missingRoot':+ '`mcpServers` キーがありません。すべてのサーバーはこの下に配置します。',+ 'mcp.json.parseError.rootNotMap': '`mcpServers` はサーバー名とその設定をマッピングします。',+ 'mcp.json.parseError.emptyName': 'サーバーには名前が必要です。キーが空の項目があります。',+ 'mcp.json.parseError.entryNotObject':+ '`{name}` はオブジェクトです。例: { "command": "npx", "args": ["-y", "…"] } または { "url": "https://…" }',+ 'mcp.json.parseError.needsUrlOrCommand':+ '`{name}` には `url`(ホスト型)または `command`(ローカル実行)が必要です。',+ 'mcp.json.parseError.bothUrlAndCommand':+ '`{name}` に `url` と `command` の両方が指定されています。サーバーはどちらか一方で接続します。',+ 'mcp.detail.connect': '接続',+ 'mcp.detail.connecting': '接続中...',+ 'mcp.detail.authenticate': 'サインイン',+ 'mcp.detail.authRequired':+ 'このサーバーに接続するには、サインインまたはアクセストークンの追加が必要です。「サインイン」をクリックして認証してください。',+ 'mcp.detail.disconnect': '切断',+ 'mcp.detail.confirmUninstall': 'アンインストールを確認しますか?',+ 'mcp.detail.confirmUninstallAction': 'はい、アンインストール',+ 'mcp.detail.uninstall': 'アンインストール',+ 'mcp.detail.envVars': '環境変数',+ 'mcp.detail.reconfigure': '再設定',+ 'mcp.detail.reconfigureHint':+ 'すべての変数に新しい値を入力し、再接続してください。保存されている値が置き換えられます。',+ 'mcp.detail.saveReconnect': '保存して再接続',+ 'mcp.detail.reconfigureSaving': '保存中…',+ 'mcp.detail.reconfigureSuccess': '環境を更新し、再接続しました。',+ 'mcp.detail.reconfigureReconnectFailed': '保存しましたが、新しい値での再接続に失敗しました。',+ 'mcp.connectAuth.title': '{name} に接続',+ 'mcp.connectAuth.hint':+ 'このサーバーに必要な認証情報を追加してから接続してください。トークンは暗号化されて保存されます。認証が不要なサーバーは空白のままにしてください。',+ 'mcp.connectAuth.requiredLabel': '必須',+ 'mcp.connectAuth.customHeadersLabel': 'カスタムヘッダー',+ 'mcp.connectAuth.customHeadersEmpty':+ 'カスタムヘッダーはありません。レジストリで宣言されていない認証ヘッダーが必要な場合は、追加してください。',+ 'mcp.connectAuth.addHeader': '+ ヘッダーを追加',+ 'mcp.connectAuth.headerName': 'ヘッダー名',+ 'mcp.connectAuth.headerValue': '値',+ 'mcp.connectAuth.removeHeader': 'ヘッダーを削除',+ 'mcp.connectAuth.tokenProvider': 'トークンの取得元:',+ 'mcp.connectAuth.schemeLabel': '値の送信方法',+ 'mcp.connectAuth.schemeBearer': 'Bearer',+ 'mcp.connectAuth.schemeRaw': 'なし',+ 'mcp.connectAuth.reconnectFailed': '認証情報を保存しましたが、接続に失敗しました。',+ 'mcp.connectAuth.oauthHint':+ 'このサーバーはOAuthを使用しています。ブラウザ経由でサインインしてOpenHumanを認可してください。',+ 'mcp.connectAuth.signIn': 'ブラウザでサインイン',+ 'mcp.connectAuth.oauthWaiting': 'サインインを待機中…',+ 'mcp.connectAuth.oauthOrToken':+ 'すでにアクセストークンをお持ちですか? 代わりに下のAuthorizationヘッダーに貼り付けてください。',+ 'mcp.connectAuth.oauthTimeout':+ 'ブラウザでのサインイン待ちがタイムアウトしました。もう一度お試しください。',+ 'mcp.connectAuth.authError.oauthRequired':+ 'このサーバーはOAuthを使用しています。「ブラウザでサインイン」を使用してください。貼り付けたトークンは受け付けられません。',+ 'mcp.connectAuth.authError.tokenRejected':+ 'サーバーがこのトークンを拒否しました。トークンが正しく、有効期限が切れていないことを確認してください。',+ 'mcp.connectAuth.authError.credentialRequired':+ 'このサーバーは認証が必要です。トークンを追加するか、サインインしてください。',+ 'mcp.detail.enable': '有効化',+ 'mcp.detail.disable': '無効化',+ 'mcp.status.disabled': '無効',+ 'mcp.status.unauthorized': 'サインインが必要',+ 'mcp.detail.tools': 'ツール',+ 'onboarding.skipForNow': '今はスキップ',+ 'autonomy.maxActionsLabel': '1時間あたりの最大アクション数',+ 'autonomy.maxActionsHelp':+ 'エージェントがローリング1時間以内に実行できるツールアクションの最大数です。新しい値は次のチャットから適用されます。Cronジョブとチャネルリスナーは、OpenHumanを再起動するまで現在の制限を維持します。',+ 'autonomy.statusSaving': '保存中…',+ 'autonomy.statusSaved': '保存しました。',+ 'autonomy.statusFailed': '失敗しました',+ 'autonomy.unlimitedNote': '無制限: レート制限は無効です。',+ 'autonomy.invalidIntegerMsg':+ '正の整数を入力してください(制限なしの場合は「無制限」プリセットを使用してください)。',+ 'autonomy.presetUnlimited': '無制限',+ 'triggers.toggleFailed': '{trigger} の {action} が失敗しました: {message}',++ // Settings: AI+ 'settings.ai.localRuntime': 'ローカルモデルランタイム',++ // Settings: Billing+ 'settings.billing.movedToWeb': '請求管理はWebへ移行しました',+ 'settings.billing.openDashboard': '請求ダッシュボードを開く',+ 'settings.billing.backToSettings': '設定に戻る',+ 'settings.billing.openingBrowser': 'ブラウザを開いています...',++ // Settings: Tools+ 'settings.tools.chooseCapabilities':+ 'OpenHumanがユーザーに代わって使用できる機能を選択してください。',+ 'settings.tools.saveChanges': '変更を保存',+ 'settings.tools.preferencesSaved': '設定を保存しました',+ 'settings.tools.saveFailed': '設定の保存に失敗しました。もう一度お試しください。',++ // Connections++ // Channels+ 'channels.status.connecting': '接続中',+ 'channels.status.notConfigured': '未設定',+ 'channels.noActiveRoute': 'アクティブなルートがありません',+ 'channels.activeRoute': 'アクティブなルート',+ 'channels.loadingDefinitions': 'チャネル定義を読み込んでいます...',+ 'channels.channelConnections': 'チャネル接続',+ 'channels.configureAuthModes': '各メッセージングチャネルの認証モードを設定します。',+ 'channels.configNotAvailable': '設定対象:',+ 'channels.channel': 'チャネル',++ // Dev Options+ 'devOptions.coreModeNotSet': 'コアモード: 未設定',+ 'devOptions.coreModeNotSetDesc':+ '起動時チェックのピッカーがまだ確定していません。ピッカーの「モード切替」を使用して、ローカルまたはクラウドを選択してください。',+ 'devOptions.local': 'ローカル',+ 'devOptions.embeddedCoreSidecar': '組み込みコアサイドカー',+ 'devOptions.sidecarSpawned': 'アプリ起動時にTauriシェルによってプロセス内で起動されました。',+ 'devOptions.cloud': 'クラウド',+ 'devOptions.remoteCoreRpc': 'リモートコアRPC',+ 'devOptions.token': 'トークン',+ 'devOptions.tokenNotSet': '未設定: RPCは401エラーを返します',+ 'devOptions.triggerSentryTest': 'Sentryテストを実行 (staging)',+ 'devOptions.triggerSentryTestDesc':+ 'タグ付きエラーを発行してSentryパイプラインを検証します。Issue #1072: 検証完了後に削除してください。',+ 'devOptions.sendTestEvent': 'テストイベントを送信',+ 'devOptions.sending': '送信中…',+ 'devOptions.eventSent': 'イベント送信済み',+ 'devOptions.sentryDisabled': '(ID なし:このビルドでは Sentry が無効です)',+ 'devOptions.failed': '失敗',+ 'devOptions.appLogs': 'アプリログ',+ 'devOptions.appLogsDesc':+ '日次ローリングログファイルが含まれるフォルダを開きます。問題を報告する際は、最新のファイルを添付してください。',+ 'devOptions.openLogsFolder': 'ログフォルダを開く',++ // Mnemonic+ 'mnemonic.phraseSaved': 'リカバリーフレーズを保存しました',+ 'mnemonic.walletReady': 'マルチチェーンウォレットのIDが準備完了です。設定に戻ります...',+ 'mnemonic.writeDownWords': 'これらの',+ 'mnemonic.wordsInOrder':+ '単語を順番に書き留め、安全な場所に保管してください。このフレーズは、ローカル暗号化キーおよび EVM、BTC、Solana、Tron のウォレットIDを保護します。',+ 'mnemonic.cannotRecover':+ 'このフレーズを紛失すると二度と復元できず、デバイス内にのみ保存される必要があります。',+ 'mnemonic.copyToClipboard': 'クリップボードにコピー',+ 'mnemonic.alreadyHavePhrase': 'すでにリカバリーフレーズを持っています',+ 'mnemonic.consentSaved': 'このフレーズを保存し、ローカルウォレット設定に使用することに同意します',+ 'mnemonic.enterPhraseToRestore':+ 'ローカルウォレットIDを復元するには、以下にリカバリーフレーズを入力するか、完全なフレーズをいずれかのフィールドに貼り付けてください(新規バックアップは12単語、旧バージョンの24単語フレーズも利用可能です)。',+ 'mnemonic.words': '単語',+ 'mnemonic.validPhrase': '有効なリカバリーフレーズ',+ 'mnemonic.securingData': 'データを保護しています...',+ 'mnemonic.saveRecoveryPhrase': 'リカバリーフレーズを保存',+ 'mnemonic.userNotLoaded':+ 'ユーザーが読み込まれていません。再度サインインするか、ページを更新してください。',+ 'mnemonic.invalidPhrase': '無効なリカバリーフレーズです。単語を確認して再試行してください。',+ 'mnemonic.somethingWentWrong': '問題が発生しました。もう一度お試しください。',+ 'mnemonic.walletAlreadyConfigured': 'ウォレットはすでに設定されています。',+ 'mnemonic.walletSource': 'ソース',+ 'mnemonic.walletWordCount': 'リカバリーフレーズの長さ',+ 'mnemonic.walletLastUpdated': '最終更新日',+ 'mnemonic.replaceWallet': 'ウォレットを置き換える',+ 'mnemonic.replaceWalletWarning':+ 'これにより、現在のウォレットが永続的に置き換えられます。続行する前に、リカバリーフレーズのバックアップを取得していることを確認してください。',+ 'mnemonic.replaceWalletConfirm': '理解しました。ウォレットを置き換えます',+ 'mnemonic.loadingWalletStatus': 'ウォレットの状態を確認しています...',+ 'mnemonic.viewAccounts': 'ウォレットアカウント',+ 'mnemonic.revealRecoveryPhrase': 'リカバリーフレーズを表示',+ 'mnemonic.importAnExistingWallet': '既存のウォレットをインポート',+ 'mnemonic.createANewWallet': '新しいウォレットを作成',+ 'mnemonic.importWallet': 'ウォレットをインポート',++ // Team+ 'team.leave': '退出',+ 'team.deleting': '削除中...',++ // Voice+ 'voice.tapToToggle': 'タップで切り替え',+ 'voice.settingsSaved': '音声設定を保存しました。',+ 'voice.failedToLoadSettings': '音声設定の読み込みに失敗しました',+ 'voice.failedToSaveSettings': '音声設定の保存に失敗しました',+ 'voice.debug.alwaysOn': '常時リスニング',+ 'voice.debug.alwaysOnDesc':+ 'マイクを常時開き、ホットキーなしで発話をエージェントに自動送信します。画面ロック中は一時停止します。',+ 'voice.providers.saved': '音声プロバイダーを保存しました。',+ 'voice.providers.failedToSave': '音声プロバイダーの保存に失敗しました',+ 'voice.mode.start': '音声チャットを開始',+ 'voice.mode.stop': '音声チャットを終了',+ 'voice.mode.connecting': '接続中…',+ 'voice.mode.listening': '聞き取り中',+ 'voice.mode.speaking': '発話中',+ 'voice.pageDesc': '音声エンジン、ルーティング、プッシュトゥトークの設定。',+ 'voice.providers.title': '音声プロバイダー',+ 'voice.providers.cardDesc': '使用するエンジンを有効にします。キーはこのデバイスに保存されます。',+ 'voice.providers.cap.stt': '音声からテキストへ',+ 'voice.providers.cap.tts': 'テキストから音声へ',+ 'voice.providers.alwaysOn': '常時オン',+ 'voice.providers.mascotVoiceCardDesc': 'マスコットの声を「顔」設定で選択します。',+ 'voice.providers.sttProvider': '音声認識プロバイダー',+ 'voice.providers.sttProviderAria': 'STTプロバイダー',+ 'voice.providers.backendSttProxy': 'OpenHuman(マネージド)',+ 'voice.providers.ttsProvider': '音声合成プロバイダー',+ 'voice.providers.ttsProviderAria': 'TTSプロバイダー',+ 'voice.providers.cloudElevenLabsProxy': 'OpenHuman(マネージド)',+ 'voice.providers.localPiper': 'ローカル Piper',+ 'voice.providers.piperVoice': 'Piper 音声',+ 'voice.providers.piperVoiceAria': 'Piper 音声',+ 'voice.providers.customVoiceOption': 'その他(下に入力)…',+ 'voice.providers.customVoiceAria': 'Piper 音声ID(カスタム)',+ 'voice.providers.customVoicePlaceholder': 'en_US-lessac-medium',+ 'voice.providers.piperVoicesDesc':+ '音声は huggingface.co/rhasspy/piper-voices から取得します。OpenHuman は自動ダウンロードしないため、.onnx ファイルを自分でダウンロードし、そのフルパスをカスタム音声として入力してください。',+ 'voice.providers.piperSelfInstallHint':+ 'OpenHuman は Piper やその音声をダウンロードしません。piper バイナリを自分でインストールし(PATH または PIPER_BIN 経由)、huggingface.co/rhasspy/piper-voices から音声をダウンロードして、その .onnx ファイルのフルパスをカスタム音声として入力してください。',+ 'voice.providers.piperRecheck': '再チェック',+ 'voice.providers.piperFound': 'Piper が見つかりました',+ 'voice.providers.piperNotFound': 'Piper が見つかりません',+ 'voice.providers.mascotVoice': 'マスコット音声',+ 'voice.providers.mascotSettings': 'マスコット設定',+ 'voice.providers.piperPreset.lessacMedium': '米国 · Lessac(中立、推奨)',+ 'voice.providers.piperPreset.lessacHigh': '米国 · Lessac(高品質、大容量)',+ 'voice.providers.piperPreset.ryanMedium': '米国 · Ryan(男性)',+ 'voice.providers.piperPreset.amyMedium': '米国 · Amy(女性)',+ 'voice.providers.piperPreset.librittsHigh': 'US · LibriTTS(複数話者)',+ 'voice.providers.piperPreset.alanMedium': 'GB · Alan(男性)',+ 'voice.providers.piperPreset.jennyDiocoMedium': 'GB · Jenny Dioco(女性)',+ 'voice.providers.piperPreset.northernEnglishMaleMedium': 'GB · 北部英語(男性)',++ // Voice provider chips (new chip-toggle UI)+ 'voice.providers.chip.cloud': 'OpenHuman(マネージド)',+ 'voice.providers.chip.cloudAria': 'OpenHuman マネージドプロバイダーは常に有効です',+ 'voice.providers.chip.piper': 'Piper(ローカル)',+ 'voice.providers.chip.enableProvider': '有効化',+ 'voice.providers.chip.disableProvider': '無効化',+ 'voice.providers.chip.apiKeyLabel': 'APIキー',+ 'voice.providers.chip.apiKeyPlaceholder': 'sk-…',+ 'voice.providers.chip.comingSoon': '近日公開',++ // Voice provider modal+ 'voice.modal.title': '設定',+ 'voice.modal.desc':+ 'このプロバイダーを有効にするにはAPIキーを入力してください。保存前に接続をテストできます。',+ 'voice.modal.testKey': 'キーをテスト',+ 'voice.modal.testing': 'テスト中…',+ 'voice.modal.saveAndEnable': '保存して有効化',+ 'voice.modal.enable': '有効化',+ 'voice.modal.piperDesc':+ 'ローカルでのテキスト読み上げに、ご自身のPiperインストールを使用します。Piperは低遅延で完全にオフラインで動作します。',++ // Voice routing section+ 'voice.routing.title': '音声ルーティング',+ 'voice.routing.desc': '音声認識とテキスト読み上げを処理する有効なプロバイダーを選択します。',+ 'voice.routing.save': '保存',+ 'voice.routing.testOk': '動作中',+ 'voice.routing.testFailed': '失敗',+ 'voice.routing.unsaved': '未保存の変更',+ 'voice.routing.testStt': 'STTをテスト',+ 'voice.routing.testTts': 'TTSをテスト',+ 'voice.routing.elevenlabsVoice': 'ElevenLabsボイス',+ 'voice.routing.elevenlabsVoiceAria': 'ElevenLabsボイスの選択',+ 'voice.routing.elevenlabsVoiceIdAria': 'ElevenLabsボイスID(カスタム)',+ 'voice.routing.elevenlabsVoiceDesc':+ '厳選されたボイスを選択するか、ElevenLabsダッシュボードからカスタムボイスIDを貼り付けてください。',++ // External voice providers++ // Push-to-talk (PTT)+ 'pttSettings.title': 'プッシュトゥトーク',+ 'pttSettings.clearShortcut': 'クリア',+ 'pttSettings.description':+ '他のアプリを使用している間にOpenHumanと話すには、キーを押しながら話します。キーを離すと送信され、「エージェントの返信を読み上げる」がオンになっている場合、OpenHumanが返信を読み上げます。',+ 'pttSettings.shortcutLabel': 'ホットキー',+ 'pttSettings.shortcutPlaceholder': 'キーを押してください(例:F13)',+ 'pttSettings.shortcutUnsetHint':+ 'プッシュトゥトークは無効です:有効にするにはホットキーを選択してください。',+ 'pttSettings.speakRepliesLabel': 'エージェントの返信を読み上げる',+ 'pttSettings.showOverlayLabel': '押している間オーバーレイを表示',+ 'pttSettings.errorConflictsWithDictation':+ 'このショートカットはすでに音声入力に使用されています。別のキーを選択してください。',+ 'pttSettings.errorModifierOnly':+ '通常のキー(例: F13)を選択してください。修飾キーのみのショートカットはプッシュトゥトークでは機能しません。',+ 'pttSettings.errorEmpty': '割り当てるキーを選択してください。',+ 'pttSettings.errorAccessibility':+ 'このショートカットにはmacOSのアクセシビリティ権限が必要です。システム設定 → プライバシーとセキュリティ → アクセシビリティを開き、OpenHumanを有効にしてください。',+ 'pttSettings.errorShortcutInUse':+ '別のアプリがこのショートカットを既に使用しています。別のものを選択してください。',+ 'pttSettings.errorUnsupportedWayland':+ 'Waylandセッションでは、OpenHumanのグローバルショートカットはまだサポートされていません。X11セッションに切り替えるか、アプリ内の音声入力トグルを使用してください。',+ 'pttOverlay.listening': '聞き取り中…',+ 'pttOverlay.idle': '待機中',++ // Autocomplete++ // Chat++ // Composio+ 'composio.triageTitle': '統合トリガー',+ 'composio.triageDesc':+ '有効な場合、受信した各ComposioトリガーはAIトリアージステップを通過し、イベントを分類して自動アクションを開始する場合があります。トリガーごとにローカルLLMターンが1回実行されます。手動レビューを希望する場合は、グローバルまたは統合ごとに無効にしてください。環境変数',+ 'composio.disableAllTriage': 'すべてのトリガーのAIトリアージを無効にする',+ 'composio.triggersStillRecorded': 'トリガーは履歴に記録されますが、LLMターンは実行されません。',+ 'composio.disableSpecificIntegrations': '特定の統合のAIトリアージを無効にする',+ 'composio.settingsSaved': '設定を保存しました',+ 'composio.saveFailed': '保存に失敗しました。もう一度お試しください。',++ // Cron+ 'cron.scheduledJobs': 'スケジュールされたジョブ',+ 'cron.manageCronJobs': 'コアスケジューラーからcronジョブを管理します。',+ 'cron.refreshCronJobs': 'Cronジョブを更新',++ // Local Model++ // Memory+ 'memory.recall': 'リコール',++ // Webhooks++ // Provider setup+ 'providerSetup.error.defaultDetails': 'プロバイダーの設定に失敗しました。',+ 'providerSetup.error.providerFallback': 'プロバイダー',+ 'providerSetup.error.credentialsRejected':+ '{provider} が認証情報を拒否しました。APIキーを確認して再試行してください。',+ 'providerSetup.error.endpointNotRecognized':+ '{provider} がエンドポイントを認識できませんでした。ベースURLを確認して再試行してください。',+ 'providerSetup.error.providerUnavailable':+ '{provider} は現在利用できません。再試行するか、プロバイダーのステータスを確認してください。',+ 'providerSetup.error.unreachable':+ '{provider} に接続できませんでした。エンドポイントURLとネットワーク接続を確認して再試行してください。',+ 'providerSetup.error.couldNotReachWithMessage': '{provider} に接続できませんでした: {message}',+ 'providerSetup.error.technicalDetails': '技術的な詳細',++ // Notifications++ // Common (additional)+ 'common.reload': '再読み込み',+ 'common.disable': '無効化',+ 'common.enable': '有効化',++ // Chat (additional)+ 'chat.stallWarning.thinking':+ '思考中です。2分間新しい出力がありませんが、エージェントは動作を継続しています。キャンセルする場合は「停止」を押してください。',+ 'chat.stallWarning.working':+ '処理中です。1つのステップが2分以上実行され、新しい出力がありません。キャンセルする場合は「停止」を押してください。',+ 'chat.filter.tasks': 'タスク',+ 'chat.selectThread': 'スレッドを選択',+ 'chat.noThreads': 'スレッドがありません',+ 'chat.deleteThread': 'スレッドを削除',+ 'chat.deleteThreadConfirm': '"{title}" を削除してもよろしいですか?',+ 'chat.untitledThread': '無題のスレッド',+ 'chat.editThreadTitle': 'スレッドタイトルを編集',+ 'chat.hideSidebar': 'サイドバーを隠す',+ 'layout.resizeSidebar': 'サイドバーのサイズを変更',+ 'layout.showSidebar': 'サイドバーを表示',+ 'chat.newThreadShortcut': '新規スレッド (/new)',+ 'chat.new': '新規',+ 'chat.failedToLoadMessages': 'メッセージの読み込みに失敗しました',+ 'chat.thinkingIteration': '思考中... ({n})',+ 'chat.thinkingDots': '思考中...',+ 'chat.upgrade': 'アップグレード',+ 'chat.weeklyLimitHit': '含まれているサイクル予算を使い切りました。',+ 'chat.resets': 'リセット',+ 'chat.topUpToContinue': 'チャージして続行してください。',+ 'chat.budgetComplete':+ '含まれている予算を使い切りました。クレジットを追加するか、アップグレードして続行してください。',+ 'chat.topUp': 'チャージ',+ 'chat.setup': 'セットアップ',+ 'chat.switchToText': 'テキストに切り替え',+ // Chat mascot: the figure standing on the composer, and its voice stage.+ 'chat.mascot.expand': 'アシスタントに話しかける',+ 'chat.mascot.collapse': 'チャットに戻る',+ 'chat.mascot.speakReplies': '返信を読み上げる',+ 'chat.mascot.speakRepliesHint':+ 'マスコットが開いている間、返信が読み上げられます。会話を静かに保つ場合は、この設定をオフにしてください。',+ 'chat.mascot.dismiss': 'Tinyを非表示',+ 'chat.mascot.dismissTitle': 'Tinyを非表示にしますか?',+ 'chat.mascot.dismissBody':+ 'メッセージ欄を広く使いたい場合は、Tinyを非表示にできます。設定 › 外観 › チャットからいつでも再表示できます。',+ 'chat.mascot.dismissConfirm': 'Tinyを非表示',+ 'chat.mascot.dismissCancel': 'Tinyを残す',+ 'chat.turn': 'ターン',+ 'chat.turns': 'ターン',+ 'chat.openWorkerThread': 'ワーカースレッドを開く',+ 'chat.attachment.remove': '{name}を削除',+ 'chat.attachment.tooMany': '1メッセージにつき画像は最大{max}枚までです',+ 'chat.attachment.tooManyFiles': '1メッセージにつきファイルは最大{max}個までです',+ 'chat.attachment.videoNotSupported':+ 'このモデルは動画を読み取れません。OpenHuman Reasoningティアを使用して動画を添付してください。',+ 'chat.attachment.dropToAttach': 'ファイルをドロップして添付',+ 'chat.attachment.tooLarge': '画像がサイズ制限{max}を超えています',+ 'chat.attachment.unsupportedType':+ 'サポートされていないファイル形式です。画像(PNG、JPEG、WebP、GIF、BMP)またはPDF、TXT、Markdownファイルを使用してください。',+ 'chat.attachment.imageNotSupported':+ 'このモデルは画像を読み取れません。OpenHuman Reasoningティアを使用して画像を添付してください。',+ 'chat.attachment.readFailed': 'ファイルを読み取れませんでした',++ // Memory (additional)+ 'memory.searchAria': 'メモリーを検索',+ 'memory.searchPlaceholder': 'メモリーエントリを検索...',+ 'memory.sourceFilter.all': 'すべてのソース',+ 'memory.sourceFilter.email': 'メール',+ 'memory.sourceFilter.calendar': 'カレンダー',+ 'memory.sourceFilter.telegram': 'Telegram',+ 'memory.sourceFilter.aiInsight': 'AIインサイト',+ 'memory.sourceFilter.system': 'システム',+ 'memory.sourceFilter.trading': '取引',+ 'memory.sourceFilter.security': 'セキュリティ',+ 'memory.ingestionActivity': '取り込みアクティビティ',+ 'memory.events': 'イベント',+ 'memory.event': 'イベント',+ 'memory.overTheLast': '過去',+ 'memory.months': 'か月',+ 'memory.peak': 'ピーク',+ 'memory.perDay': '/日',+ 'memory.less': '少ない',+ 'memory.more': '多い',+ 'memory.on': 'オン',+ 'memory.loading': 'メモリーを読み込み中',+ 'memory.fetching': 'メモリーエントリを取得しています...',+ 'memory.analyzing': 'メモリーを分析中',+ 'memory.analyzingHint': 'メモリーを処理してインサイトを抽出しています...',+ 'memory.noMatches': '一致する項目が見つかりません',+ 'memory.noMatchesHint': '検索条件やフィルターを変更してみてください。',+ 'memory.allCaughtUp': 'すべて処理済み',+ 'memory.allCaughtUpHint': '処理すべき新しいメモリーエントリはありません。',+ 'memory.noAnalysis': '分析結果はまだありません',+ 'memory.noAnalysisHint': '分析を実行して、メモリー内のパターンを発見してください。',+ 'memory.emptyHint': '対話を開始して、最初のメモリーを作成しましょう。',++ // Mic+ 'mic.unavailable': 'マイクが利用できません',+ 'mic.permissionDenied': 'マイクの権限が拒否されました',+ 'mic.failedToStartRecorder': 'レコーダーの起動に失敗しました',+ 'mic.deviceUnavailable': '選択したマイクが利用できません。別のデバイスをお試しください。',+ 'mic.deviceInUse': 'マイクは他のアプリケーションによって使用されています。',+ 'mic.error': 'マイクエラー',+ 'mic.transcribing': '文字起こし中...',+ 'mic.retryingTranscription': '再試行中... ({attempt}/{max})',+ 'mic.tapToSend': 'タップして送信',+ 'mic.waitingForAgent': 'エージェントを待機中...',+ 'mic.tapAndSpeak': 'タップして話してください',+ 'mic.stopRecording': '録音を停止して送信',+ 'mic.startRecording': '録音を開始',+ 'mic.deviceSelector': 'マイクデバイス',+ 'mic.tapToSendCountdown': 'タップして送信 ({seconds}秒)',++ // Token+ 'token.costTitle': 'このセッションの推定コスト (USD)',+ 'token.popCacheHit': 'キャッシュヒット',++ // Navigator+ 'navigator.recent': '最近',+ 'navigator.today': '今日',+ 'navigator.thisWeek': '今週',+ 'navigator.sources': 'ソース',+ 'navigator.email': 'メール',+ 'navigator.slack': 'Slack',+ 'navigator.chat': 'チャット',+ 'navigator.documents': 'ドキュメント',+ 'navigator.people': '人物',+ 'navigator.topics': 'トピック',++ // Dreams++ // Insights+ 'insights.knownFacts': '既知の事実',+ 'insights.preferences': '設定',+ 'insights.relationships': '関係性',+ 'insights.skills': 'スキル',+ 'insights.opinions': '意見',+ 'insights.other': 'その他',+ 'insights.title': 'インサイト',+ 'insights.empty': 'インサイトはまだありません。メモリーが増えるにつれて生成されます。',+ 'insights.description': 'メモリーグラフ内の {count} 件の関係性に基づいています。',+ 'insights.items': '件',+ 'insights.more': '件',++ // Calls++ // Modal+ 'modal.dontShowAgain': '同様の提案を表示しない',++ // Reflections+++ // Backend++ // Actionable+ 'actionable.complete': '完了',+ 'actionable.dismiss': '却下',+ 'actionable.snooze': 'スヌーズ',+ 'actionable.new': '新規',++ // Stats+ 'stats.storage': 'ストレージ',+ 'stats.files': 'ファイル',+ 'stats.documents': 'ドキュメント',+ 'stats.today': '今日',+ 'stats.namespaces': '名前空間',+ 'stats.relations': '関係',+ 'stats.firstMemory': '最初のメモリー',+ 'stats.latest': '最新',+ 'stats.sessions': 'セッション',+ 'stats.tokens': 'トークン',++ // Boot Check Gate+ 'bootCheck.invalidUrl': 'ランタイム URL を入力してください。',+ 'bootCheck.urlMustStartWith': 'URL は http:// または https:// で始まる必要があります',+ 'bootCheck.validUrlRequired': '有効な URL ではないようです(例: https://core.example.com/rpc)',+ 'bootCheck.tokenRequired': '接続するには認証トークンが必要です。',+ 'bootCheck.httpPublicWarning':+ 'これは公開ホスト上の平文 HTTP URL です。トラフィックは暗号化されません。このネットワークを信頼する場合を除き、HTTPS を使用してください。',+ 'bootCheck.chooseCoreMode': 'ランタイムを選択',+ 'bootCheck.connectToCore': 'ランタイムに接続',+ 'bootCheck.desktopDescription':+ 'OpenHuman が思考するにはランタイムが必要です。どこで実行するかを選択してください。',+ 'bootCheck.webDescription':+ 'Web では、OpenHuman はあなたが管理するランタイムに接続します。以下の URL と認証トークンを入力するか、デスクトップアプリをダウンロードしてマシン上で直接実行してください。',+ 'bootCheck.preferDesktop': 'すべてを自分のデバイスで管理したいですか?',+ 'bootCheck.downloadDesktop': 'デスクトップアプリを入手',+ 'bootCheck.localRecommended': 'ローカルで実行(推奨)',+ 'bootCheck.localDescription':+ 'このコンピューターで直接実行します。高速で、データは外部に送信されず、設定も不要です。',+ 'bootCheck.cloudMode': 'クラウドで実行(複雑)',+ 'bootCheck.cloudDescription':+ '別の場所で稼働しているランタイムに接続します。このデバイスを起動したままにしなくても、24時間稼働できます。',+ 'bootCheck.coreRpcUrl': 'ランタイム URL',+ 'bootCheck.rpcUrlPlaceholder': 'https://core.example.com/rpc',+ 'bootCheck.authToken': '認証トークン',+ 'bootCheck.bearerTokenPlaceholder': 'リモートランタイムからのベアラートークン',+ 'bootCheck.storedLocally': 'このデバイス上にのみ保存されます。送信形式: ',+ 'bootCheck.testing': 'テスト中…',+ 'bootCheck.testConnection': '接続をテスト',+ 'bootCheck.connectedOk': '接続しました。準備完了です。',+ 'bootCheck.authFailed': 'トークンが認証されませんでした。確認してから、もう一度お試しください。',+ 'bootCheck.unreachablePrefix': '接続できませんでした:',+ 'bootCheck.checkingCore': 'ランタイムを起動しています…',+ 'bootCheck.cannotReach': 'ランタイムに接続できません',+ 'bootCheck.cannotReachDesc': 'ランタイムに接続できませんでした。別のランタイムを試しますか?',+ 'bootCheck.switchMode': '別のランタイムを選択',+ 'bootCheck.quit': '終了',+ 'bootCheck.legacyDetected': 'レガシーバックグラウンドランタイムを検出しました',+ 'bootCheck.legacyDescription':+ '別途インストールされたOpenHumanデーモンが、このデバイスで稼働しています。組み込みランタイムに切り替えるには、このデーモンを削除する必要があります。',+ 'bootCheck.removing': '削除中…',+ 'bootCheck.removeContinue': '削除して続行',+ 'bootCheck.localNeedsRestart': 'ローカルランタイムの再起動が必要です',+ 'bootCheck.localNeedsRestartDesc':+ 'ローカルランタイムとアプリのバージョンが異なります。再起動してバージョンを揃えてください。',+ 'bootCheck.restarting': '再起動中…',+ 'bootCheck.restartCore': 'ランタイムを再起動',+ 'bootCheck.cloudNeedsUpdate': 'クラウドランタイムの更新が必要です',+ 'bootCheck.cloudNeedsUpdateDesc':+ 'クラウドランタイムとアプリのバージョンが異なります。アップデーターを実行してバージョンを揃えてください。',+ 'bootCheck.updating': '更新中…',+ 'bootCheck.updateCloudCore': 'クラウドランタイムを更新',+ 'bootCheck.versionCheckFailed': 'ランタイムのバージョン確認に失敗しました',+ 'bootCheck.versionCheckFailedDesc':+ 'ランタイムは稼働していますが、バージョンを報告していません。古いバージョンの可能性があります。続行するには再起動または更新してください。',+ 'bootCheck.working': '処理中…',+ 'bootCheck.restartUpdateCore': 'ランタイムの再起動 / 更新',+ 'bootCheck.unexpectedError': '予期しない起動チェックエラー',+ 'bootCheck.actionFailed': '問題が発生しました。もう一度お試しください。',+ 'bootCheck.portConflictTitle': 'アプリエンジンを起動できませんでした',+ 'bootCheck.portConflictBody':+ 'OpenHumanが必要なネットワークポートを別のプロセスが使用しています。自動的に修復を試みます。',+ 'bootCheck.portConflictFixButton': '自動修復',+ 'bootCheck.portConflictFixing': '修復中…',+ 'bootCheck.portConflictFixFailed':+ '自動修復に失敗しました。コンピュータを再起動して再試行してください。',+ 'bootCheck.portConflictOwner':+ '{name} (PID {pid}) が、OpenHumanに必要なネットワークポートを使用しています。',+ 'bootCheck.portConflictGuidance':+ 'そのプログラムを終了してポートを解放するか、以下で強制終了してから再試行してください。',+ 'bootCheck.portConflictForceQuit': '{name} を強制終了',+ 'bootCheck.portConflictForceQuitting': '{name} を終了中…',+ 'bootCheck.portConflictForceQuitFailed':+ 'そのプログラムを終了できませんでした。手動で終了してから再試行する必要がある場合があります。',++ // Notifications: category labels & timestamps+ 'notifications.justNow': 'たった今',+ 'notifications.minAgo': '{n}分前',+ 'notifications.hrAgo': '{n}時間前',+ 'notifications.dayAgo': '{n}日前',+ 'notifications.category.messages': 'メッセージ',+ 'notifications.category.agents': 'エージェント',+ 'notifications.category.skills': 'スキル',+ 'notifications.category.system': 'システム',+ 'notifications.category.meetings': '会議',+ 'notifications.category.reminders': 'リマインダー',+ 'notifications.category.important': '重要',+ 'notifications.filterAll': 'すべて',+ 'notifications.filterEmpty': 'このカテゴリーのアラートはありません',++ // About / Updates: status summary phrases+ 'about.update.status.checking': '確認中...',+ 'about.update.status.available': 'v{version} が利用可能です',+ 'about.update.status.availableNoVersion': '更新が利用可能です',+ 'about.update.status.downloading': 'ダウンロード中...',+ 'about.update.status.readyToInstall': 'v{version} をインストールできます',+ 'about.update.status.readyToInstallNoVersion':+ '新しいバージョンのダウンロードが完了し、インストール準備ができました。再起動して適用してください。',+ 'about.update.status.installing': 'インストール中...',+ 'about.update.status.restarting': '再起動中...',+ 'about.update.status.upToDate': '最新バージョンを実行中です。',+ 'about.update.status.error': '更新の確認に失敗しました',+ 'about.update.status.default': '更新を確認',++ // Welcome: connection error messages+ 'welcome.continueLocallyExperimental': 'ローカルで続行 (実験的)',+ 'welcome.localSessionStarting': 'ローカルセッションを開始中...',+ 'welcome.coreConfigUnreadable':+ 'ランタイムが設定ファイルを読み取れませんでした。config.toml が別のユーザーアカウントに属しているか、ランタイムプロセスからアクセスできない可能性があります。ランタイムを再起動してください。それでも解決しない場合は、ワークスペースの所有権を修復するか、ボリュームを再作成してください。',+ 'welcome.localSessionErrorFallback': 'ローカルセッションを開始できませんでした。',+ 'welcome.gatewaySessionErrorFallback':+ 'サインインを完了できませんでした。セッションストアがタイムアウトしました (再試行後も)。OpenHuman を再起動して再試行してください。',++ // Chat: Agent chat panel description++ // Channels: active route interpolated value+ 'channels.activeRouteValue': '{channel} 経由 ({authMode})',++ // Privacy: data kind labels for What Leaves My Computer++ // Onboarding: supplementary keys++ // Composio: miscellaneous+ 'composio.statusUnavailable': 'ステータス取得不可',+ 'composio.authExpired': '認証の有効期限切れ',+ 'composio.reconnect': '再接続',+ 'composio.expiredAuthorization': '{name} の認証の有効期限が切れました',+ 'composio.expiredDescription':+ '{name} ツールを再度有効にするには再接続してください。OAuth アクセスを更新するまで、OpenHuman はこの統合を利用不可のままにします。',+ 'composio.envVarOverrides': 'が設定されている場合、この設定より優先されます。',+ 'composio.previewBadge': 'プレビュー',+ 'composio.previewTooltip':+ 'エージェント統合は近日提供予定: 接続は可能ですが、エージェントはまだこのツールキットを使用できません。',++ // Memory: day-of-week labels for heatmap+ 'memory.day.mon': '月',+ 'memory.day.wed': '水',+ 'memory.day.fri': '金',++ // Memory: ingestion status labels++ // Mic: error messages+ 'mic.noAudioCaptured': '音声が検出されませんでした',+ 'mic.noSpeechDetected': '音声検出なし',+ 'mic.lowConfidenceResult': '音声を明確に認識できませんでした。もう一度お試しください。',+ 'mic.failedToStopRecording': '録音の停止に失敗しました: {message}',+ 'mic.transcriptionFailed': '文字起こしに失敗しました: {message}',+ 'mic.voiceNotCompiled':+ '音声文字起こしはこのアプリのバージョンには含まれていません。有効にするには OpenHuman を更新してください。',++ // Reflections: kind labels++ // Local Model: usage labels++ // === i18n migration: extracted strings (auto-merged) ===+ 'app.connectionIndicator.connected': '接続済み',+ 'app.connectionIndicator.connecting': '接続中',+ 'app.connectionIndicator.coreOffline': 'コアがオフライン',+ 'app.connectionIndicator.disconnected': '切断済み',+ 'app.connectionIndicator.offline': 'オフライン',+ 'app.connectionIndicator.reconnecting': '再接続中…',+ 'app.errorFallback.componentStack': 'コンポーネントスタック',+ 'app.errorFallback.contactSupport': 'サポートに連絡',+ 'app.errorFallback.copyEventId': 'コピー',+ 'app.errorFallback.downloadLatest': '最新バージョンをダウンロード',+ 'app.errorFallback.eventIdCopied': 'コピーしました',+ 'app.errorFallback.eventIdLabel': 'エラーID',+ 'app.errorFallback.heading': '問題が発生しました',+ 'app.errorFallback.hint':+ 'アプリを再読み込みしてください。問題が解決しない場合は、最新バージョンをダウンロードしてください。',+ 'app.errorFallback.reloadApp': 'アプリを再読み込み',+ 'app.errorFallback.revealLogs': 'ログを表示',+ 'app.errorFallback.subheading': '予期しないエラーが発生しました',+ 'app.errorFallback.tryRecover': '復旧を試行',+ 'app.openhumanLink.accounts.continueWith': '{label}で続行',+ 'app.openhumanLink.accounts.done': '完了',+ 'app.openhumanLink.accounts.intro':+ 'アプリを接続して、OpenHumanにアカウントへのアクセスを許可します。',+ 'app.openhumanLink.accounts.webviewNote':+ '認証情報はこのデバイスにのみ保存され、共有されることはありません。',+ 'app.openhumanLink.billing.openDashboard': 'ダッシュボードを開く',+ 'app.openhumanLink.billing.stayOnTrial': 'トライアルを継続',+ 'app.openhumanLink.billing.trialCredit': 'サインアップクレジット',+ 'app.openhumanLink.billing.trialDesc':+ 'クレジットの提供内容は、プロモーションやアカウントの資格によって異なる場合があります。',+ 'app.openhumanLink.discord.intro': 'DiscordでOpenHumanコミュニティに参加しましょう。',+ 'app.openhumanLink.discord.openInvite': '招待リンクを開く',+ 'app.openhumanLink.discord.perk1': '新機能への早期アクセス',+ 'app.openhumanLink.discord.perk2': '他のOpenHumanユーザーと交流',+ 'app.openhumanLink.discord.perk3': 'チームへ直接フィードバックを送信',+ 'app.openhumanLink.discord.perk4': 'コミュニティからのヘルプとサポート',+ 'app.openhumanLink.discordReport.intro':+ '申し訳ありません、こちら側で問題が発生しました。これらのエラーは自動的にログに記録されるようにしていますが、Discordで詳細を共有していただくと、より迅速な修正につながります。',+ 'app.openhumanLink.discordReport.openDiscord': 'Discordを開く',+ 'app.openhumanLink.done': '完了',+ 'app.openhumanLink.notifications.desktopOnly':+ 'ネイティブ通知はデスクトップアプリでのみ利用可能です(`pnpm dev:app`を実行してください)。',+ 'app.openhumanLink.notifications.permissionOff':+ '通知権限が無効になっています。システム設定 → 通知でOpenHumanを有効にしてから、再試行してください。',+ 'app.openhumanLink.notifications.triggerFailed':+ 'OpenHumanでシステム通知をトリガーできませんでした。OSの通知設定を確認して再試行してください。',+ 'app.openhumanLink.notifications.welcomeBody':+ '対応が必要な項目がある場合、ここに通知が届きます。',+ 'app.openhumanLink.notifications.welcomeTitle': 'OpenHumanの準備が完了しました',+ 'app.openhumanLink.status.closed': '閉じる',+ 'app.openhumanLink.status.connected': '接続済み',+ 'app.openhumanLink.status.error': 'エラー',+ 'app.openhumanLink.status.loading': '読み込み中…',+ 'app.openhumanLink.status.needsSignIn': 'サインインが必要',+ 'app.openhumanLink.status.timedOut': 'タイムアウトしました',+ 'app.openhumanLink.loadingChannelSetup': 'チャネル設定を読み込み中',+ 'app.openhumanLink.maybeLater': '後で',+ 'app.openhumanLink.notifications.asking': 'OSに確認中…',+ 'app.openhumanLink.notifications.blocked': '通知がブロックされています',+ 'app.openhumanLink.notifications.blockedStep1': 'システム設定を開く',+ 'app.openhumanLink.notifications.blockedStep2': '通知 → OpenHuman に移動',+ 'app.openhumanLink.notifications.blockedStep3': '「通知を許可」を有効にする',+ 'app.openhumanLink.notifications.intro': 'OpenHuman からの通知を許可します。',+ 'app.openhumanLink.notifications.promptHint':+ 'システムから許可を求められたら「許可」をクリックしてください。',+ 'app.openhumanLink.notifications.retry': 'テスト通知を再試行',+ 'app.openhumanLink.notifications.send': 'テスト通知を送信',+ 'app.openhumanLink.notifications.sendFailed': '送信できませんでした: {error}',+ 'app.openhumanLink.notifications.sent':+ 'テスト通知を送信しました。届かない場合は、システム設定 → 通知 → OpenHuman に移動し、「通知を許可」をオンにして、バナーのスタイルを「永続的」に設定してください。',+ 'app.openhumanLink.skipForNow': '今はスキップ',+ 'app.openhumanLink.telegramUnavailable': 'Telegram は利用できません',+ 'app.openhumanLink.title.accounts': 'アプリを接続',+ 'app.openhumanLink.title.billing': '請求とクレジット',+ 'app.openhumanLink.title.discord': 'コミュニティに参加',+ 'app.openhumanLink.title.discordReport': 'このエラーを報告',+ 'app.openhumanLink.title.messaging': 'チャットチャンネルを接続',+ 'app.openhumanLink.title.notifications': '通知を許可',+ 'app.persistRehydration.body': '保存された設定を読み込んでいます…',+ 'app.persistRehydration.heading': 'データを復元しています',+ 'app.persistRehydration.resetCta': 'リセット中…',+ 'app.persistRehydration.resetting': 'リセット中…',+ 'app.routeLoading.initializing': 'OpenHuman を初期化しています...',+ 'app.update.currentlyOn': '{version}',+ 'app.update.errorFallback': '更新中に問題が発生しました。',+ 'app.update.header.default': '更新',+ 'app.update.header.error': '更新に失敗しました',+ 'app.update.header.installing': '更新をインストール中',+ 'app.update.header.readyToInstall': '更新のインストール準備完了',+ 'app.update.header.restarting': '再起動中…',+ 'app.update.later': '後で',+ 'app.update.newVersionReady': '新しいバージョンのインストール準備ができました。',+ 'app.update.progress.downloaded': '${formatBytes(downloaded)} ダウンロード済み',+ 'app.update.progress.installing': '新しいバージョンをインストールしています…',+ 'app.update.progress.restarting': 'アプリを再起動しています…',+ 'app.update.progress.working': '{percent}%',+ 'app.update.restartNote': '更新を適用するためにアプリを再起動します。',+ 'app.update.restartNow': '今すぐ再起動',+ 'app.update.versionReady': 'バージョン {newVersion} のインストール準備ができました。',+ 'channels.discord.accountLinked': 'アカウントをリンクしました',+ 'channels.discord.connect': '接続',+ 'channels.discord.linkTokenExpired':+ 'リンクトークンの有効期限が切れました。もう一度お試しください。',+ 'channels.discord.linkTokenInstruction': '{token}',+ 'channels.discord.linkTokenLabel': 'リンクトークン',+ 'channels.discord.linkTokenOnce': 'このトークンは1回のみ使用できます。',+ 'channels.discord.picker.allPermissionsOk':+ 'このチャンネルでは、ボットに必要な権限がすべて付与されています。',+ 'channels.discord.picker.botNotInServers': 'サーバーにボットがいません',+ 'channels.discord.picker.category': 'カテゴリー',+ 'channels.discord.picker.channel': 'チャンネル',+ 'channels.discord.picker.checkingPermissions': '権限を確認中',+ 'channels.discord.picker.loadingChannels': 'チャンネルを読み込み中...',+ 'channels.discord.picker.loadingServers': 'サーバーを読み込み中...',+ 'channels.discord.picker.missingPermissions': '権限が不足しています',+ 'channels.discord.picker.noChannels': 'テキストチャンネルが見つかりません',+ 'channels.discord.picker.noServers': 'サーバーが見つかりません',+ 'channels.discord.picker.selectChannel': 'チャンネルを選択',+ 'channels.discord.picker.selectServer': 'サーバーを選択',+ 'channels.discord.picker.server': 'サーバー',+ 'channels.discord.picker.serverChannelSelection': 'サーバーとチャンネルの選択',+ 'channels.discord.savedRestartRequired':+ 'チャンネルを保存しました。有効にするにはアプリを再起動してください。',+ 'channels.telegram.connect': '接続',+ 'channels.telegram.managedDmConnecting': 'Telegramアカウントに接続しています…',+ 'channels.telegram.managedDmTimeout': '接続がタイムアウトしました。もう一度お試しください。',+ 'channels.telegram.reconnect': '再接続',+ 'channels.telegram.savedRestartRequired':+ 'チャンネルを保存しました。有効にするにはアプリを再起動してください。',+ 'channels.web.alwaysAvailable': '常に利用可能',+ 'chat.approval.approve': '承認',+ 'chat.approval.alwaysAllow': '常に許可',+ 'chat.approval.alwaysAllowHint': 'このツールの確認を停止します。常に許可リストに追加します',+ 'chat.approval.deciding': '処理中…',+ 'chat.approval.deny': '拒否',+ 'chat.approval.error': '決定を記録できませんでした。もう一度お試しください。',+ 'chat.approval.fallback': 'エージェントは承認が必要なアクションを実行しようとしています。',+ 'chat.approval.title': '承認が必要です',+ 'chat.approval.tool': 'ツール:',+ 'chat.approval.expiresIn': '{time}後に期限切れ',+ 'chat.elicitation.send': '送信',+ 'chat.elicitation.decline': '拒否',+ 'chat.elicitation.needsInput': '入力が必要です',+ 'chat.elicitation.sentTo': '{server}に送信しました',+ 'chat.elicitation.declined': '拒否しました',+ 'chat.elicitation.title': '入力が必要です',+ // Flow-approval surface: chat banner for a `flow_approval_request` socket+ // event (a paused tinyflows run's gate, surfaced while the user is+ // chatting rather than inspecting the run directly).+ 'chat.flowApproval.title': 'ワークフローの承認が必要です',+ 'chat.flowApproval.fallback':+ 'ワークフローの実行で、承認が必要なアクションを実行しようとしています。',+ 'chat.flowApproval.approveAlwaysHint':+ 'このフローの今後の実行では、このチェックポイントをスキップします',+ 'chat.flowProposal.title': 'ワークフローの提案',+ 'chat.flowProposal.subtitle': '保存する前にこの自動化を確認してください。',+ 'chat.flowProposal.triggerLabel': 'トリガー',+ 'chat.flowProposal.stepsLabel': 'ステップ',+ 'chat.flowProposal.noSteps': '追加のステップはありません。',+ 'chat.flowProposal.requireApprovalHint': 'すべての送信アクションには承認が必要です。',+ 'chat.flowProposal.save': '保存して有効化',+ 'chat.flowProposal.saving': '保存中…',+ 'chat.flowProposal.openInCanvas': 'キャンバスで開く',+ 'chat.flowProposal.dismiss': '閉じる',+ 'chat.flowProposal.error': 'ワークフローを保存できませんでした。もう一度お試しください。',+ 'chat.flowProposal.enableError':+ 'ワークフローは保存されましたが、有効化できませんでした。もう一度お試しいただくか、ワークフローページから有効化してください。',+ // Terminal success state (issue B36): shown once the flow is saved and+ // enabled, in place of the editable proposal, with a link into the+ // persisted flow's own canvas.+ 'chat.flowProposal.savedConfirmation': '保存しました',+ 'chat.flowProposal.viewWorkflow': 'ワークフローを表示',+ // Plain-language labels for each `tinyflows` node kind, shown as the badge+ // next to each step in the proposal card's step list. Keep names short:+ // they render as small pill badges.+ 'chat.flowProposal.stepKind.agent': 'エージェント',+ 'chat.flowProposal.stepKind.toolCall': 'アクション',+ 'chat.flowProposal.stepKind.httpRequest': 'Web リクエスト',+ 'chat.flowProposal.stepKind.code': 'コード実行',+ 'chat.flowProposal.stepKind.condition': '条件',+ 'chat.flowProposal.stepKind.switch': 'スイッチ',+ 'chat.flowProposal.stepKind.merge': 'マージ',+ 'chat.flowProposal.stepKind.splitOut': '分割',+ 'chat.flowProposal.stepKind.transform': '変換',+ 'chat.flowProposal.stepKind.outputParser': '出力解析',+ 'chat.flowProposal.stepKind.subWorkflow': 'サブワークフロー',++ // Auth mode labels+ 'channels.authMode.managed_dm': 'OpenHuman でログイン',+ 'channels.authMode.oauth': 'OAuth サインイン',+ 'channels.authMode.bot_token': '独自の Bot トークンを使用',+ 'channels.authMode.api_key': '独自の API キーを使用',++ // Field validation+ 'channels.fieldRequired': '{field} は必須です',++ // MCP (virtual channel)+ 'channels.mcp.title': 'MCP サーバー',+ 'channels.mcp.description':+ 'AI に新しいツールを追加する Model Context Protocol サーバーを参照・管理します。',++ // Discord+ 'channels.discord.displayName': 'Discord',+ 'channels.discord.description': 'Discord を介してメッセージを送受信します。',+ 'channels.discord.authMode.bot_token.description':+ '独自の Discord Bot トークンを提供してください。',+ 'channels.discord.authMode.oauth.description':+ 'OAuth を介して OpenHuman Bot を Discord サーバーにインストールします。',+ 'channels.discord.authMode.managed_dm.description':+ 'OpenHumanボットに個人のDiscordアカウントをリンクします。',+ 'channels.discord.fields.bot_token.label': 'ボットトークン',+ 'channels.discord.fields.bot_token.placeholder': 'Discordボットのトークン',+ 'channels.discord.fields.guild_id.label': 'サーバー(ギルド)ID',+ 'channels.discord.fields.guild_id.placeholder': '任意:特定のサーバーに限定',++ // Telegram+ 'channels.telegram.displayName': 'Telegram',+ 'channels.telegram.description': 'Telegram経由でメッセージを送受信します。',+ 'channels.telegram.authMode.managed_dm.description':+ 'OpenHumanのTelegramボットに直接メッセージを送信します。',+ 'channels.telegram.authMode.bot_token.description':+ '@BotFatherから取得した独自のTelegramボットトークンを提供します。',+ 'channels.telegram.fields.bot_token.label': 'ボットトークン',+ 'channels.telegram.fields.bot_token.placeholder': '123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11',+ 'channels.telegram.fields.allowed_users.label': '許可されたユーザー',+ 'channels.telegram.fields.allowed_users.placeholder': 'カンマ区切りのTelegramユーザー名',+ 'channels.telegram.remoteControlTitle': 'リモートコントロール(Telegram)',+ 'channels.telegram.remoteControlBody':+ '許可されたTelegramチャットから /status、/sessions、/new、または /help を送信します。モデルルーティングには引き続き /model と /models を使用します。',++ // Connect help (in-app guidance so users do not have to ask the agent for the path)+ 'channels.connectHelp.title': '接続方法',+ 'channels.connectHelp.discord':+ '以下の方法を選択してください:OpenHuman経由でアカウントをリンクする、OAuthでボットをインストールする、またはDiscord開発者ポータルから独自のボットトークンを貼り付けます。',+ 'channels.connectHelp.telegram':+ '以下の方法を選択してください:管理されたOpenHumanボットにメッセージを送信してリンクするか、@BotFatherから独自のボットトークンを貼り付けます。',+ 'channels.connectHelp.slackNote':+ 'Slackをお探しですか?Slackは、ここでのメッセージングチャネルではなく、接続 → OAuthの下でアプリとして接続されます。',++ // Web+ 'channels.web.displayName': 'Web',+ 'channels.web.description': '組み込みのWeb UIを介してチャットします。',+ 'channels.web.authMode.managed_dm.description':+ '埋め込みWebチャットを使用します。設定は不要です。',+ 'channels.yuanbao.connect': '接続',+ 'channels.yuanbao.connecting': '接続中…',+ 'channels.yuanbao.fieldRequired': '{field}は必須です',+ 'channels.yuanbao.reconnect': '再接続',+ 'channels.yuanbao.savedRestartRequired':+ 'チャネルを保存しました。有効化するにはアプリを再起動してください。',+ 'channels.yuanbao.unexpectedStatus': '予期しない接続ステータス: {status}',+ 'commandPalette.ariaLabel': 'コマンドパレット',+ 'commandPalette.description': '説明',+ 'commandPalette.label': 'コマンド',+ 'commandPalette.noResults': '結果がありません',+ 'commandPalette.placeholder': 'コマンドを入力または検索…',+ 'commandPalette.searchAria': 'コマンドを検索',+ 'commandPalette.title': 'コマンドパレット',+ 'kbd.ariaLabel': 'キーボードショートカット: {shortcut}',+ 'shortcuts.title': 'キーボードショートカット',+ 'shortcuts.subtitle': 'これらのキーボードショートカットでワークフローを高速化します。',+ 'shortcuts.empty': '現在利用可能なキーボードショートカットはありません。',+ 'shortcuts.openHint': 'このリストはいつでも次で開けます:',+ 'shortcuts.group.navigation': 'ナビゲーション',+ 'shortcuts.group.chat': 'チャット',+ 'shortcuts.group.view': '表示',+ 'shortcuts.group.general': '一般',+ 'shortcuts.group.help': 'ヘルプ',+ 'shortcuts.action.home': 'ホームへ移動',+ 'shortcuts.action.chat': 'チャットへ移動',+ 'shortcuts.action.knowledge': 'ナレッジ&メモリーへ移動',+ 'shortcuts.action.connections': '接続へ移動',+ 'shortcuts.action.activity': 'アクティビティへ移動',+ 'shortcuts.action.settings': '設定を開く',+ 'shortcuts.action.newChat': '新規チャット',+ 'shortcuts.action.toggleSidebar': 'サイドバーの表示/非表示',+ 'shortcuts.action.commandPalette': 'コマンドパレット',+ 'iosMascot.connectedTo': '接続先:',+ 'iosMascot.defaultPairedLabel': 'デスクトップ',+ 'iosMascot.disconnect': '切断',+ 'iosMascot.error.generic': '問題が発生しました。もう一度お試しください。',+ 'iosMascot.error.sendFailed': '送信に失敗しました。接続を確認してください。',+ 'iosMascot.pushToTalk': '長押しで話す',+ 'iosMascot.sendMessage': 'メッセージを送信',+ 'iosMascot.thinking': '考え中...',+ 'iosMascot.typeMessage': 'メッセージを入力...',+ 'iosPair.connectedLoading': '接続完了!読み込み中...',+ 'iosPair.connecting': 'デスクトップに接続中...',+ 'iosPair.desktopLabel': 'デスクトップ',+ 'iosPair.error.camera':+ 'カメラでのスキャンに失敗しました。カメラの権限を確認して再試行してください。',+ 'iosPair.error.connectionFailed':+ '接続に失敗しました。デスクトップアプリが実行中であることを確認し、再試行してください。',+ 'iosPair.error.invalidQr':+ '無効なQRコードです。OpenHumanのペアリングコードをスキャンしていることを確認してください。',+ 'iosPair.error.unreachableDesktop':+ 'デスクトップに接続できませんでした。両方のデバイスがオンラインであることを確認し、再試行してください。',+ 'iosPair.expired': 'QRコードの有効期限が切れました。デスクトップでコードを再生成してください。',+ 'iosPair.instructions':+ 'デスクトップでOpenHumanを開き、設定 > デバイスに移動して、「スマホとペアリング」をタップしてQRコードを表示します。',+ 'iosPair.retryScan': 'スキャンを再試行',+ 'iosPair.scanQrCode': 'QRコードをスキャン',+ 'iosPair.scannerOpening': 'スキャナーを開いています...',+ 'iosPair.step.openDesktop': 'デスクトップでOpenHumanを開く',+ 'iosPair.step.openSettings': '設定 > デバイスへ移動',+ 'iosPair.step.showQr': '「スマホとペアリング」をタップしてQRコードを表示',+ 'iosPair.title': 'デスクトップとペアリング',+ 'composio.connect.additionalConfigRequired': '追加の設定が必要です',+ 'composio.connect.atlassianSubdomainHint': 'acme',+ 'composio.connect.atlassianSubdomainLabel': 'Atlassian サブドメイン',+ 'composio.connect.cancelConnection': '接続をキャンセル',+ 'composio.connect.cancelFailed': '接続をキャンセルできませんでした: {msg}',+ 'composio.connect.cancelNotConfirmed':+ 'Composio が接続の削除を確認できませんでした。もう一度お試しください。',+ 'composio.connect.cancelling': 'キャンセル中…',+ 'composio.connect.connect': '接続',+ 'composio.connect.connectedAccounts': '接続済みアカウント',+ 'composio.connect.defaultLabel': 'デフォルト',+ 'composio.connect.disconnectAccount': '削除',+ 'composio.connect.addAnotherAccount': '別のアカウントを追加',+ 'composio.connect.dynamicsOrgNameHint':+ '例: myorg.crm.dynamics.com の場合は「myorg」。完全な URL ではなく、組織名の短縮形のみを入力してください。',+ 'composio.connect.dynamicsOrgNameLabel': 'Dynamics 365 組織名',+ 'composio.connect.connectionFailed': '接続に失敗しました (ステータス: {status})。',+ 'composio.connect.disconnectFailed': '切断に失敗しました: {msg}',+ 'composio.connect.disconnecting': '切断中…',+ 'composio.connect.idleDescription': '接続する',+ 'composio.connect.idleDescriptionSuffix':+ 'アカウント。ブラウザウィンドウが開き、そこでアクセスを承認すると、このアプリが接続を自動的に検出します。',+ 'composio.connect.isConnected': 'が接続されています。',+ 'composio.connect.manage': '管理',+ 'composio.connect.needsFieldsPrefix': '接続するには',+ 'composio.connect.needsFieldsSuffix':+ '追加の情報が必要です。以下の未入力の項目を記入して、もう一度お試しください。',+ 'composio.connect.oauthComplete': 'OAuth 完了待ち…',+ 'composio.connect.oauthTimeout': 'OAuth がタイムアウトしました。もう一度お試しください。',+ 'composio.connect.permissions': '権限',+ 'composio.connect.permissionsDefault': 'デフォルトで読み取り + 書き込みが有効',+ 'composio.connect.permissionsNote': '公開できる可能性があります',+ 'composio.connect.permissionsNoteSuffix':+ 'OpenHuman のエージェント権限は、以下の読み取り、書き込み、管理のトグルで制御されます。',+ 'composio.connect.reopenBrowser': 'ブラウザを再度開く',+ 'composio.connect.requestingUrl': '接続 URL を取得中…',+ 'composio.connect.requiredFieldEmpty': 'この項目は必須です。',+ 'composio.connect.retryConnection': '接続を再試行',+ 'composio.connect.scopeLoadError': 'スコープ設定を読み込めませんでした: {msg}',+ 'composio.connect.scopeSaveError': '{key} スコープを保存できませんでした: {msg}',+ 'composio.connect.scope.read': '読み取り',+ 'composio.connect.scope.readHint': 'エージェントがこの接続からデータを読み取れるようにします。',+ 'composio.connect.scope.write': '書き込み',+ 'composio.connect.scope.writeHint':+ 'エージェントがこの接続を通じてデータを作成または変更できるようにします。',+ 'composio.connect.scope.admin': '管理',+ 'composio.connect.scope.adminHint':+ 'エージェントが設定、権限、または破壊的な操作を管理できるようにします。',+ 'composio.connect.subdomainInvalid':+ '短いサブドメインのみを入力してください(例: "acme")。完全な URL は入力しないでください。文字、数字、ハイフンのみを使用できます。',+ 'composio.connect.wabaIdHint':+ 'Meta アクセストークンを使用して、GET /me/businesses、次に GET /{business_id}/owned_whatsapp_business_accounts を実行して確認してください。',+ 'composio.connect.wabaIdLabel': 'WhatsApp Business アカウント ID(WABA ID)',+ 'composio.connect.atlassianSubdomainPlaceholder': 'your-subdomain',+ 'composio.connect.dynamicsOrgNamePlaceholder': 'myorg',+ 'composio.connect.wabaIdPlaceholder': '例: 123456789012345',+ 'composio.connect.waitingFor': '待機中:',+ 'composio.connect.waitingHint': '開いたブラウザウィンドウで接続を完了してください。',+ 'composio.triggers.heading': 'トリガー',+ 'composio.triggers.listenFrom': 'イベントの監視対象:',+ 'composio.triggers.loadError': 'トリガーを読み込めませんでした',+ 'composio.triggers.sessionExpired':+ 'OpenHuman セッションの有効期限が切れました。トリガーを読み込むために再度サインインしてください。',+ 'composio.triggers.needsConfiguration': '設定が必要',+ 'composio.triggers.noneAvailable': '現在利用可能なトリガーはありません:',+ 'conversations.composer.context.title': 'コンテキストウィンドウ',+ 'conversations.composer.context.input': '入力',+ 'conversations.composer.context.cached': 'キャッシュ済み入力',+ 'conversations.composer.context.output': '出力',+ 'conversations.composer.context.usage': 'コンテキスト使用量',+ 'conversations.composer.context.full': '{percent}% 使用済み',+ 'conversations.composer.context.reasoning': '推論',+ 'conversations.composer.context.headroom': '空き容量',+ 'conversations.composer.context.meterLabel': '{label} コンテキスト使用量',+ 'conversations.composer.context.meterValue': '{limit} 中 {used}',+ 'conversations.composer.context.loading': 'コンテキストを計測中…',+ 'conversations.composer.context.errorTitle': 'コンテキストの内訳を表示できません',+ 'conversations.composer.context.errorDetail':+ 'コアがこのスレッドのプロンプトを計測できませんでした。',+ 'conversations.composer.context.section.preamble': 'システムプロンプト',+ 'conversations.composer.context.section.tools': 'ツール',+ 'conversations.composer.context.section.toolSchemas': 'ツールスキーマ',+ 'conversations.composer.context.section.yourInput': 'ユーザー入力',+ 'conversations.composer.context.section.history': '会話履歴',+ 'conversations.composer.context.turnCost': 'このターン',+ 'conversations.composer.context.subagentCost': '{agent}',+ 'conversations.composer.command.clear': '会話をクリア',+ 'conversations.composer.command.new': '新しい会話を開始',+ 'conversations.composer.command.stop': '実行中の返信を停止',+ 'conversations.composer.command.plan': '計画モード: 実行前に手順を確認',+ 'conversations.composer.command.build': 'ビルドモード: エージェントに直接実行させる',+ 'conversations.composer.trigger.back': '戻る',+ 'conversations.composer.trigger.loading': '読み込み中…',+ 'conversations.composer.trigger.emptyCategories': '利用可能な項目がありません',+ 'conversations.composer.slash.empty': '一致するコマンドがありません',+ 'conversations.composer.mention.empty': '一致する項目がありません',+ 'conversations.composer.mention.memory': 'メモリー',+ 'conversations.composer.mention.files': 'ファイル',+ 'conversations.todos.title': 'ToDo',+ 'conversations.planReview.title': 'プランの確認',+ 'conversations.planReview.subtitle':+ '承認して実行、却下して破棄、またはフィードバックを送信して修正します。',+ 'conversations.planReview.approve': '承認して実行',+ 'conversations.planReview.reject': '却下',+ 'conversations.planReview.feedbackLabel': '変更を依頼',+ 'conversations.planReview.feedbackPlaceholder': '変更内容を記述…',+ 'conversations.planReview.sendFeedback': 'フィードバックを送信',+ 'conversations.planReview.revise': '修正',+ 'conversations.runMode.plan': 'プラン',+ 'conversations.runMode.build': 'ビルド',+ 'conversations.runMode.toggleLabel': 'プランモードとビルドモードを切り替える',+ 'conversations.goal.inlineSummary': '{objective} ({status})',+ // Thread-level goal chip (Codex-style per-thread completion contract).+ 'conversations.subagent.input': '入力',+ 'conversations.subagent.output': '出力',+ // Tool-call presentation (features/conversations/tools/toolPhrases.ts).+ 'conversations.tools.steps.one': '{count} ステップ',+ 'conversations.tools.steps.other': '{count} ステップ',+ 'conversations.tools.working': '作業中',+ 'conversations.tools.noOutput': '出力なし',+ 'conversations.tools.delegatedTo': '{agent} に委任',+ 'conversations.tools.parallelAgentsAggregating': '結果を集約中',+ 'conversations.tools.openInBrowser': 'ブラウザで開く',+ 'conversations.tools.status.running': '実行中',+ 'conversations.tools.status.done': '完了',+ 'conversations.tools.status.failed': '失敗',+ 'conversations.tools.status.cancelled': 'キャンセル済み',+ 'conversations.tools.status.awaiting': '入力待ち',+ 'conversations.tools.search.searching': '検索中',+ 'conversations.tools.search.none': '結果なし',+ 'conversations.tools.search.found.one': '{count} 件の結果が見つかりました',+ 'conversations.tools.search.found.other': '{count} 件の結果が見つかりました',+ 'conversations.tools.search.via': '{provider} 経由',+ 'conversations.tools.search.viaAfter': '{provider} 経由、{fallback} の後',+ 'conversations.tools.search.sources.one': '{count} 件のソース',+ 'conversations.tools.search.sources.other': '{count} 件のソース',+ 'conversations.tools.search.researching': 'リサーチがまだ実行中です',+ 'conversations.tools.search.balanceLow':+ 'TinyHumans の残高が不足しているため、同梱の検索機能を利用できません。チャージするか、設定で検索プロバイダーの API キーを追加してください。',+ 'conversations.tools.readFile.active': 'ファイルを読み込み中',+ 'conversations.tools.readFile.done': 'ファイルを読み込みました',+ 'conversations.tools.writeFile.active': 'ファイルを書き込み中',+ 'conversations.tools.writeFile.done': 'ファイルを書き込みました',+ 'conversations.tools.editFile.active': 'ファイルを編集中',+ 'conversations.tools.editFile.done': 'ファイルを編集しました',+ 'conversations.tools.applyEdits.active': '編集を適用中',+ 'conversations.tools.applyEdits.done': '編集を適用しました',+ 'conversations.tools.searchCode.active': 'コードを検索中',+ 'conversations.tools.searchCode.done': 'コードを検索しました',+ 'conversations.tools.findFiles.active': 'ファイルを検索中',+ 'conversations.tools.findFiles.done': 'ファイルを検索しました',+ 'conversations.tools.listFolder.active': 'フォルダを一覧表示中',+ 'conversations.tools.listFolder.done': 'フォルダを一覧表示しました',+ 'conversations.tools.exportCsv.active': 'CSV をエクスポート中',+ 'conversations.tools.exportCsv.done': 'CSV をエクスポートしました',+ 'conversations.tools.updateMemoryNotes.active': 'メモリーノートを更新中',+ 'conversations.tools.updateMemoryNotes.done': 'メモリーノートを更新しました',+ 'conversations.tools.runGit.active': 'git を実行中',+ 'conversations.tools.runGit.done': 'git を実行しました',+ 'conversations.tools.readChanges.active': '変更内容を読み込み中',+ 'conversations.tools.readChanges.done': '変更内容を読み込みました',+ 'conversations.tools.runLinter.active': 'リンターを実行中',+ 'conversations.tools.runLinter.done': 'リンターを実行しました',+ 'conversations.tools.runTests.active': 'テストを実行中',+ 'conversations.tools.runTests.done': 'テストを実行しました',+ 'conversations.tools.analyzeCode.active': 'コードを解析中',+ 'conversations.tools.analyzeCode.done': 'コードを解析しました',+ 'conversations.tools.runCommand.active': 'コマンドを実行中',+ 'conversations.tools.runCommand.done': 'コマンドを実行しました',+ 'conversations.tools.runCode.active': 'コードを実行中',+ 'conversations.tools.runCode.done': 'コードを実行しました',+ 'conversations.tools.runPackageManager.active': 'npm を実行中',+ 'conversations.tools.runPackageManager.done': 'npm を実行しました',+ 'conversations.tools.checkInstalledTools.active': 'インストール済みツールを確認中',+ 'conversations.tools.checkInstalledTools.done': 'インストール済みツールを確認しました',+ 'conversations.tools.installTool.active': 'ツールをインストール中',+ 'conversations.tools.installTool.done': 'ツールをインストールしました',+ 'conversations.tools.checkTime.active': '時刻を確認中',+ 'conversations.tools.checkTime.done': '時刻を確認しました',+ 'conversations.tools.resolveDate.active': '日付を計算中',+ 'conversations.tools.resolveDate.done': '日付を計算しました',+ 'conversations.tools.retrieveOutput.active': '完全な出力を取得中',+ 'conversations.tools.retrieveOutput.done': '完全な出力を取得しました',+ 'conversations.tools.reviewWorkspace.active': 'ワークスペースを確認中',+ 'conversations.tools.reviewWorkspace.done': 'ワークスペースを確認しました',+ 'conversations.tools.configureProxy.active': 'プロキシを設定中',+ 'conversations.tools.configureProxy.done': 'プロキシを設定しました',+ 'conversations.tools.checkUpdates.active': '更新を確認中',+ 'conversations.tools.checkUpdates.done': '更新を確認しました',+ 'conversations.tools.installUpdate.active': '更新をインストール中',+ 'conversations.tools.installUpdate.done': '更新をインストールしました',+ 'conversations.tools.sendNotification.active': '通知を送信中',+ 'conversations.tools.sendNotification.done': '通知を送信しました',+ 'conversations.tools.reviewToolUsage.active': 'ツールの使用状況を確認中',+ 'conversations.tools.reviewToolUsage.done': 'ツールの使用状況を確認しました',+ 'conversations.tools.typeKeys.active': '入力中',+ 'conversations.tools.typeKeys.done': '入力しました',+ 'conversations.tools.click.active': 'クリック中',+ 'conversations.tools.click.done': 'クリックしました',+ 'conversations.tools.searchWeb.active': 'Webを検索中',+ 'conversations.tools.searchWeb.done': 'Webを検索しました',+ 'conversations.tools.searchNews.active': 'ニュースを検索中',+ 'conversations.tools.searchNews.done': 'ニュースを検索しました',+ 'conversations.tools.searchImages.active': '画像を検索中',+ 'conversations.tools.searchImages.done': '画像を検索しました',+ 'conversations.tools.searchVideos.active': '動画を検索中',+ 'conversations.tools.searchVideos.done': '動画を検索しました',+ 'conversations.tools.findSimilarPages.active': '類似ページを検索中',+ 'conversations.tools.findSimilarPages.done': '類似ページを検索しました',+ 'conversations.tools.readPages.active': 'ページを読み込み中',+ 'conversations.tools.readPages.done': 'ページを読み込みました',+ 'conversations.tools.readWebpage.active': 'Webページを読み込み中',+ 'conversations.tools.readWebpage.done': 'Webページを読み込みました',+ 'conversations.tools.research.active': '調査中',+ 'conversations.tools.research.done': '調査しました',+ 'conversations.tools.enrichData.active': 'データを強化中',+ 'conversations.tools.enrichData.done': 'データ強化完了',+ 'conversations.tools.buildDataset.active': 'データセット構築中',+ 'conversations.tools.buildDataset.done': 'データセット構築完了',+ 'conversations.tools.askTheWeb.active': 'Web検索中',+ 'conversations.tools.askTheWeb.done': 'Web検索完了',+ 'conversations.tools.browseForYou.active': '閲覧中',+ 'conversations.tools.browseForYou.done': '閲覧完了',+ 'conversations.tools.callApi.active': 'API呼び出し中',+ 'conversations.tools.callApi.done': 'API呼び出し完了',+ 'conversations.tools.downloadFile.active': 'ファイルダウンロード中',+ 'conversations.tools.downloadFile.done': 'ファイルダウンロード完了',+ 'conversations.tools.makePaidRequest.active': '有料リクエスト送信中',+ 'conversations.tools.makePaidRequest.done': '有料リクエスト送信完了',+ 'conversations.tools.searchDocs.active': 'ドキュメント検索中',+ 'conversations.tools.searchDocs.done': 'ドキュメント検索完了',+ 'conversations.tools.readDocs.active': 'ドキュメント読み取り中',+ 'conversations.tools.readDocs.done': 'ドキュメント読み取り完了',+ 'conversations.tools.useBrowser.active': 'ブラウザ使用中',+ 'conversations.tools.useBrowser.done': 'ブラウザ使用完了',+ 'conversations.tools.openPage.active': 'ページを開いています',+ 'conversations.tools.openPage.done': 'ページを開きました',+ 'conversations.tools.navigate.active': '移動中',+ 'conversations.tools.navigate.done': '移動完了',+ 'conversations.tools.takeScreenshot.active': 'スクリーンショット撮影中',+ 'conversations.tools.takeScreenshot.done': 'スクリーンショット撮影完了',+ 'conversations.tools.scrollPage.active': 'スクロール中',+ 'conversations.tools.scrollPage.done': 'スクロール完了',+ 'conversations.tools.readPage.active': 'ページ読み取り中',+ 'conversations.tools.readPage.done': 'ページ読み取り完了',+ 'conversations.tools.analyzeImage.active': '画像解析中',+ 'conversations.tools.analyzeImage.done': '画像解析完了',+ 'conversations.tools.generateImage.active': '画像生成中',+ 'conversations.tools.generateImage.done': '画像生成完了',+ 'conversations.tools.generateVideo.active': '動画生成中',+ 'conversations.tools.generateVideo.done': '動画生成完了',+ 'conversations.tools.checkMediaModels.active': 'メディアモデル確認中',+ 'conversations.tools.checkMediaModels.done': 'メディアモデル確認完了',+ 'conversations.tools.createDocument.active': 'ドキュメント作成中',+ 'conversations.tools.createDocument.done': 'ドキュメント作成完了',+ 'conversations.tools.createPresentation.active': 'プレゼンテーション作成中',+ 'conversations.tools.createPresentation.done': 'プレゼンテーションを作成しました',+ 'conversations.tools.generatePodcast.active': 'ポッドキャストを生成中',+ 'conversations.tools.generatePodcast.done': 'ポッドキャストを生成しました',+ 'conversations.tools.emailPodcast.active': 'ポッドキャストを送信中',+ 'conversations.tools.emailPodcast.done': 'ポッドキャストを送信しました',+ 'conversations.tools.createAndEmailPodcast.active': 'ポッドキャストを作成して送信中',+ 'conversations.tools.createAndEmailPodcast.done': 'ポッドキャストを作成して送信しました',+ 'conversations.tools.recallMemories.active': 'メモリーを呼び出し中',+ 'conversations.tools.recallMemories.done': 'メモリーを呼び出しました',+ 'conversations.tools.saveToMemory.active': 'メモリーに保存中',+ 'conversations.tools.saveToMemory.done': 'メモリーに保存しました',+ 'conversations.tools.forgetMemory.active': 'メモリーを削除中',+ 'conversations.tools.forgetMemory.done': 'メモリーを削除しました',+ 'conversations.tools.searchMemory.active': 'メモリーを検索中',+ 'conversations.tools.searchMemory.done': 'メモリーを検索しました',+ 'conversations.tools.inspectMemory.active': 'メモリーを確認中',+ 'conversations.tools.inspectMemory.done': 'メモリーを確認しました',+ 'conversations.tools.exploreMemory.active': 'メモリーを探索中',+ 'conversations.tools.exploreMemory.done': 'メモリーを探索しました',+ 'conversations.tools.saveDocumentToMemory.active': 'ドキュメントをメモリーに保存中',+ 'conversations.tools.saveDocumentToMemory.done': 'ドキュメントをメモリーに保存しました',+ 'conversations.tools.updateGoals.active': '目標を更新中',+ 'conversations.tools.updateGoals.done': '目標を更新しました',+ 'conversations.tools.reviewGoals.active': '目標を確認中',+ 'conversations.tools.reviewGoals.done': '目標を確認しました',+ 'conversations.tools.savePreference.active': '設定を保存中',+ 'conversations.tools.savePreference.done': '設定を保存しました',+ 'conversations.tools.reviewLearnings.active': '学習内容をレビュー中',+ 'conversations.tools.reviewLearnings.done': '学習内容をレビューしました',+ 'conversations.tools.updateLearnings.active': '学習内容を更新中',+ 'conversations.tools.updateLearnings.done': '学習内容を更新しました',+ 'conversations.tools.delegateTask.active': 'タスクを委任中',+ 'conversations.tools.delegateTask.done': 'タスクを委任しました',+ 'conversations.tools.runAgentsInParallel.active': 'エージェントを並列実行中',+ 'conversations.tools.runAgentsInParallel.done': 'エージェントを並列実行しました',+ 'conversations.tools.messageAgent.active': 'エージェントにメッセージ送信中',+ 'conversations.tools.messageAgent.done': 'エージェントにメッセージを送信しました',+ 'conversations.tools.waitForAgent.active': 'エージェントを待機中',+ 'conversations.tools.waitForAgent.done': 'エージェントの待機が完了しました',+ 'conversations.tools.wait.active': '待機中',+ 'conversations.tools.wait.done': '待機完了',+ 'conversations.tools.closeAgent.active': 'エージェントを終了中',+ 'conversations.tools.closeAgent.done': 'エージェントを終了しました',+ 'conversations.tools.checkAgents.active': 'エージェントを確認中',+ 'conversations.tools.checkAgents.done': 'エージェントを確認しました',+ 'conversations.tools.askQuestion.active': '質問しています',+ 'conversations.tools.askQuestion.done': '質問しました',+ 'conversations.tools.prepareContext.active': 'コンテキストを準備中',+ 'conversations.tools.prepareContext.done': 'コンテキストを準備しました',+ 'conversations.tools.extractDetails.active': '詳細を抽出中',+ 'conversations.tools.extractDetails.done': '詳細を抽出しました',+ 'conversations.tools.planNextSteps.active': '次のステップを計画中',+ 'conversations.tools.planNextSteps.done': '次のステップを計画しました',+ 'conversations.tools.reviewWork.active': '作業をレビュー中',+ 'conversations.tools.reviewWork.done': '作業をレビューしました',+ 'conversations.tools.useTools.active': 'ツールを使用中',+ 'conversations.tools.useTools.done': 'ツールを使用しました',+ 'conversations.tools.checkConnectedApp.active': '接続済みアプリを確認中',+ 'conversations.tools.checkConnectedApp.done': '接続済みアプリを確認しました',+ 'conversations.tools.updateTodos.active': 'ToDoリストを更新中',+ 'conversations.tools.updateTodos.done': 'ToDoリストを更新しました',+ 'conversations.tools.requestPlanReview.active': 'プランレビューを依頼中',+ 'conversations.tools.requestPlanReview.done': 'プランレビューを依頼しました',+ 'conversations.tools.finishPlan.active': 'プランを完了中',+ 'conversations.tools.finishPlan.done': 'プランを完了しました',+ 'conversations.tools.setGoal.active': '目標を設定中',+ 'conversations.tools.setGoal.done': '目標を設定しました',+ 'conversations.tools.checkGoal.active': '目標を確認中',+ 'conversations.tools.checkGoal.done': '目標を確認しました',+ 'conversations.tools.completeGoal.active': '目標を達成中',+ 'conversations.tools.completeGoal.done': '目標を達成しました',+ 'conversations.tools.scheduleTask.active': 'タスクをスケジュール中',+ 'conversations.tools.scheduleTask.done': 'タスクをスケジュールしました',+ 'conversations.tools.checkSchedules.active': 'スケジュールを確認中',+ 'conversations.tools.checkSchedules.done': 'スケジュールを確認しました',+ 'conversations.tools.updateSchedule.active': 'スケジュール済みタスクを更新中',+ 'conversations.tools.updateSchedule.done': 'スケジュール済みタスクを更新しました',+ 'conversations.tools.removeSchedule.active': 'スケジュール済みタスクを削除中',+ 'conversations.tools.removeSchedule.done': 'スケジュール済みタスクを削除しました',+ 'conversations.tools.runScheduledTask.active': 'スケジュール済みタスクを実行中',+ 'conversations.tools.runScheduledTask.done': 'スケジュールされたタスクを実行しました',+ 'conversations.tools.checkRunHistory.active': '実行履歴を確認中',+ 'conversations.tools.checkRunHistory.done': '実行履歴を確認しました',+ 'conversations.tools.useApp.active': '{app} を使用中',+ 'conversations.tools.useApp.done': '{app} を使用しました',+ 'conversations.tools.checkAvailableApps.active': '利用可能なアプリを確認中',+ 'conversations.tools.checkAvailableApps.done': '利用可能なアプリを確認しました',+ 'conversations.tools.checkConnections.active': '接続を確認中',+ 'conversations.tools.checkConnections.done': '接続を確認しました',+ 'conversations.tools.connectApp.active': 'アプリを接続中',+ 'conversations.tools.connectApp.done': 'アプリを接続しました',+ 'conversations.tools.authorizeApp.active': 'アプリを認証中',+ 'conversations.tools.authorizeApp.done': 'アプリを認証しました',+ 'conversations.tools.findAppActions.active': 'アプリのアクションを検索中',+ 'conversations.tools.findAppActions.done': 'アプリのアクションを検索しました',+ 'conversations.tools.runAppAction.active': 'アプリのアクションを実行中',+ 'conversations.tools.runAppAction.done': 'アプリのアクションを実行しました',+ 'conversations.tools.inspectDesktop.active': 'デスクトップを確認中',+ 'conversations.tools.inspectDesktop.done': 'デスクトップを確認しました',+ 'conversations.tools.controlDesktop.active': 'デスクトップを操作中',+ 'conversations.tools.controlDesktop.done': 'デスクトップを操作しました',+ 'conversations.tools.findTools.active': 'ツールを検索中',+ 'conversations.tools.findTools.done': 'ツールを検索しました',+ 'conversations.tools.useTool.active': '{tool} を使用中',+ 'conversations.tools.useTool.done': '{tool} を使用しました',+ 'conversations.tools.unsubscribe.active': '登録解除中',+ 'conversations.tools.unsubscribe.done': '登録解除しました',+ 'conversations.tools.searchPlaces.active': '場所を検索中',+ 'conversations.tools.searchPlaces.done': '場所を検索しました',+ 'conversations.tools.lookUpPlace.active': '場所を検索中',+ 'conversations.tools.lookUpPlace.done': '場所を検索しました',+ 'conversations.tools.checkMarkets.active': '市場を確認中',+ 'conversations.tools.checkMarkets.done': '市場を確認しました',+ 'conversations.tools.placeCall.active': '通話を発信中',+ 'conversations.tools.placeCall.done': '通話を発信しました',+ 'conversations.tools.checkTaskSources.active': 'タスクソースを確認中',+ 'conversations.tools.checkTaskSources.done': 'タスクソースを確認しました',+ 'conversations.tools.updateTaskSources.active': 'タスクソースを更新中',+ 'conversations.tools.updateTaskSources.done': 'タスクソースを更新しました',+ 'conversations.tools.fetchTasks.active': 'タスクを取得中',+ 'conversations.tools.fetchTasks.done': 'タスクを取得しました',+ 'conversations.tools.checkMcpServers.active': 'MCPサーバーを確認中',+ 'conversations.tools.checkMcpServers.done': 'MCPサーバーを確認しました',+ 'conversations.tools.checkMcpTools.active': 'MCPツールを確認中',+ 'conversations.tools.checkMcpTools.done': 'MCPツールを確認しました',+ 'conversations.tools.callMcpTool.active': '{tool}を呼び出し中',+ 'conversations.tools.callMcpTool.done': '{tool}を呼び出しました',+ 'conversations.tools.searchMcpServers.active': 'MCPサーバーを検索中',+ 'conversations.tools.searchMcpServers.done': 'MCPサーバーを検索しました',+ 'conversations.tools.connectMcpServer.active': 'MCPサーバーに接続中',+ 'conversations.tools.connectMcpServer.done': 'MCPサーバーに接続しました',+ 'conversations.tools.disconnectMcpServer.active': 'MCPサーバーから切断中',+ 'conversations.tools.disconnectMcpServer.done': 'MCPサーバーから切断しました',+ 'conversations.tools.removeMcpServer.active': 'MCPサーバーを削除中',+ 'conversations.tools.removeMcpServer.done': 'MCPサーバーを削除しました',+ 'conversations.tools.uploadFile.active': 'ファイルをアップロード中',+ 'conversations.tools.uploadFile.done': 'ファイルをアップロードしました',+ 'conversations.tools.listStoredFiles.active': '保存済みファイルを一覧表示中',+ 'conversations.tools.listStoredFiles.done': '保存済みファイルを一覧表示しました',+ 'conversations.tools.createShareLink.active': '共有リンクを作成中',+ 'conversations.tools.createShareLink.done': '共有リンクを作成しました',+ 'conversations.tools.deleteFile.active': 'ファイルを削除中',+ 'conversations.tools.deleteFile.done': 'ファイルを削除しました',+ 'conversations.tools.updateFileAccess.active': 'ファイルのアクセス権を更新中',+ 'conversations.tools.updateFileAccess.done': 'ファイルのアクセス権を更新しました',+ 'conversations.tools.deploySite.active': 'サイトをデプロイ中',+ 'conversations.tools.deploySite.done': 'サイトをデプロイしました',+ 'conversations.tools.checkHosting.active': 'ホスティングを確認中',+ 'conversations.tools.checkHosting.done': 'ホスティングを確認しました',+ 'conversations.tools.updateHosting.active': 'ホスティングを更新中',+ 'conversations.tools.updateHosting.done': 'ホスティングを更新しました',+ 'conversations.tools.rollBackDeployment.active': 'デプロイをロールバック中',+ 'conversations.tools.rollBackDeployment.done': 'デプロイをロールバックしました',+ 'conversations.tools.checkWallet.active': 'ウォレットを確認中',+ 'conversations.tools.checkWallet.done': 'ウォレットを確認しました',+ 'conversations.tools.prepareTransfer.active': '送金を準備中',+ 'conversations.tools.prepareTransfer.done': '送金を準備しました',+ 'conversations.tools.checkTransaction.active': 'トランザクションを確認中',+ 'conversations.tools.checkTransaction.done': 'トランザクションを確認しました',+ 'conversations.tools.getSwapQuote.active': 'スワップ見積もりを取得中',+ 'conversations.tools.getSwapQuote.done': 'スワップ見積もりを取得しました',+ 'conversations.tools.swapTokens.active': 'トークンをスワップ中',+ 'conversations.tools.swapTokens.done': 'トークンをスワップしました',+ 'conversations.tools.getBridgeQuote.active': 'ブリッジ見積もりを取得中',+ 'conversations.tools.getBridgeQuote.done': 'ブリッジ見積もりを取得しました',+ 'conversations.tools.bridgeTokens.active': 'トークンをブリッジ中',+ 'conversations.tools.bridgeTokens.done': 'トークンをブリッジしました',+ 'conversations.tools.callDapp.active': 'アプリコントラクトを呼び出し中',+ 'conversations.tools.callDapp.done': 'アプリコントラクトを呼び出しました',+ 'conversations.tools.useSkill.active': 'スキルを使用中',+ 'conversations.tools.useSkill.done': 'スキルを使用しました',+ 'conversations.tools.searchSkills.active': 'スキルを検索中',+ 'conversations.tools.searchSkills.done': 'スキルを検索しました',+ 'conversations.tools.checkSkills.active': 'スキルを確認中',+ 'conversations.tools.checkSkills.done': 'スキルを確認しました',+ 'conversations.tools.installSkill.active': 'スキルをインストール中',+ 'conversations.tools.installSkill.done': 'スキルをインストールしました',+ 'conversations.tools.removeSkill.active': 'スキルを削除中',+ 'conversations.tools.removeSkill.done': 'スキルを削除しました',+ 'conversations.tools.createSkill.active': 'スキルを作成中',+ 'conversations.tools.createSkill.done': 'スキルを作成しました',+ 'conversations.tools.runWorkflow.active': 'ワークフローを実行中',+ 'conversations.tools.runWorkflow.done': 'ワークフローを実行しました',+ 'conversations.tools.waitForWorkflow.active': 'ワークフローの完了を待機中',+ 'conversations.tools.waitForWorkflow.done': 'ワークフローの完了を待機しました',+ 'conversations.tools.designWorkflow.active': 'ワークフローを設計中',+ 'conversations.tools.designWorkflow.done': 'ワークフローを設計しました',+ 'conversations.tools.saveWorkflow.active': 'ワークフローを保存中',+ 'conversations.tools.saveWorkflow.done': 'ワークフローを保存しました',+ 'conversations.tools.validateWorkflow.active': 'ワークフローを検証中',+ 'conversations.tools.validateWorkflow.done': 'ワークフローを検証しました',+ 'conversations.tools.testWorkflow.active': 'ワークフローをテスト中',+ 'conversations.tools.testWorkflow.done': 'ワークフローをテストしました',+ 'conversations.tools.checkWorkflows.active': 'ワークフローを確認中',+ 'conversations.tools.checkWorkflows.done': 'ワークフローを確認しました',+ 'conversations.tools.cancelWorkflow.active': 'ワークフローの実行をキャンセル中',+ 'conversations.tools.cancelWorkflow.done': 'ワークフローの実行をキャンセルしました',+ 'conversations.tools.suggestWorkflows.active': 'ワークフローを提案中',+ 'conversations.tools.suggestWorkflows.done': 'ワークフローを提案しました',+ 'conversations.tools.checkSettings.active': '設定を確認中',+ 'conversations.tools.checkSettings.done': '設定を確認しました',+ 'conversations.tools.checkSecurity.active': 'セキュリティを確認中',+ 'conversations.tools.checkSecurity.done': 'セキュリティを確認しました',+ 'conversations.tools.runDiagnostics.active': '診断を実行中',+ 'conversations.tools.runDiagnostics.done': '診断を実行しました',+ 'conversations.tools.checkUsageCosts.active': '使用コストを確認中',+ 'conversations.tools.checkUsageCosts.done': '使用コストを確認しました',+ 'conversations.tools.manageService.active': 'バックグラウンドサービスを管理中',+ 'conversations.tools.manageService.done': 'バックグラウンドサービスを管理しました',+ 'conversations.tools.readPersona.active': 'ペルソナを読み込み中',+ 'conversations.tools.readPersona.done': 'ペルソナを読み込みました',+ 'conversations.tools.updatePersona.active': 'ペルソナを更新中',+ 'conversations.tools.updatePersona.done': 'ペルソナを更新しました',+ 'conversations.tools.setUpWorkspace.active': 'ワークスペースをセットアップ中',+ 'conversations.tools.setUpWorkspace.done': 'ワークスペースをセットアップしました',+ 'conversations.tools.checkArtifacts.active': 'アーティファクトを確認中',+ 'conversations.tools.checkArtifacts.done': 'アーティファクトを確認しました',+ 'conversations.tools.deleteArtifact.active': 'アーティファクトを削除中',+ 'conversations.tools.deleteArtifact.done': 'アーティファクトを削除しました',+ 'conversations.tools.document.title': 'ドキュメント',+ 'conversations.tools.presentation.title': 'プレゼンテーション',+ 'conversations.subagent.close': '閉じる',+ 'conversations.subagent.cancel': 'タスクをキャンセル',+ 'conversations.subagent.cancelling': 'キャンセル中…',+ 'conversations.subagent.cancelFailed':+ 'タスクをキャンセルできませんでした。もう一度お試しください。',+ // Guardrail notice for a `chat_error{error_type:"guardrail"}` turn (wire-contract.md).+ 'conversations.chatError.guardrail.title': 'このリクエストは安全チェックを通過しませんでした',+ 'conversations.chatError.guardrail.explanationFallback':+ '送信前にポリシーによりこの応答がブロックされました。',+ 'conversations.chatError.guardrail.tryInstead': '代わりに試す',+ 'conversations.assistantUi.edit.ariaLabel': 'メッセージを編集',+ 'conversations.assistantUi.edit.discardedRepliesOne': '送信すると {count} 件の返信が破棄されます',+ 'conversations.assistantUi.edit.discardedRepliesOther':+ '送信すると {count} 件の返信が破棄されます',+ 'conversations.assistantUi.stoppedRun.reasonUserStop': '停止しました',+ 'conversations.assistantUi.stoppedRun.reasonSuperseded': '新しいメッセージに置き換えられました',+ // Tool-failure explanation surfaced under a failed step in "View processing" (#4254).+ 'conversations.toolFailure.whyLabel': '理由',+ 'conversations.toolFailure.nextLabel': '次の対処法',+ 'conversations.toolFailure.missingPermission.cause':+ 'OpenHuman にこの操作を行う権限がありません。',+ 'conversations.toolFailure.missingPermission.next':+ '必要な権限を付与してから、もう一度お試しください。',+ 'conversations.toolFailure.missingApp.cause':+ 'この操作に必要なアプリまたはプログラムが利用できません。',+ 'conversations.toolFailure.missingApp.next':+ 'アプリをインストールまたは開いてから、もう一度お試しください。',+ 'conversations.toolFailure.serviceUnavailable.cause':+ 'OpenHuman が必要なサービスが一時的に利用できません。',+ 'conversations.toolFailure.serviceUnavailable.next':+ 'OpenHumanはまもなく再試行します。操作は不要です。',+ 'conversations.toolFailure.badCredentials.cause':+ '保存されたサインイン情報が存在しないか、有効ではありません。',+ 'conversations.toolFailure.badCredentials.next':+ '再度サインインするか、認証情報を更新してから再試行してください。',+ 'conversations.toolFailure.blockedByPolicy.cause':+ 'このアクションは安全設定によりブロックされています。',+ 'conversations.toolFailure.blockedByPolicy.next':+ '実行する場合は、設定 → エージェントアクセスで許可してください。',+ 'conversations.toolFailure.modelConnection.cause': 'OpenHumanはAIモデルに接続できませんでした。',+ 'conversations.toolFailure.modelConnection.next':+ '接続またはモデル設定を確認してください。OpenHumanは再試行します。',+ 'conversations.toolFailure.timeout.cause':+ 'アクションの実行に時間がかかりすぎたため、停止しました。',+ 'conversations.toolFailure.timeout.next':+ 'OpenHumanは再試行します。手動で再試行することも可能です。',+ 'conversations.toolFailure.denied.cause': 'このアクションを拒否しました。',+ 'conversations.toolFailure.denied.next':+ '対応は不要です。実行されませんでした。変更した場合は再度依頼してください。',+ 'conversations.toolFailure.approvalExpired.cause':+ '承認リクエストは応答前に期限切れになりました。',+ 'conversations.toolFailure.approvalExpired.next':+ '実行するには再度依頼してください。OpenHumanは自動的に再試行しません。',+ 'conversations.toolFailure.unknown.cause': 'このアクションで問題が発生しました。',+ 'conversations.toolFailure.unknown.next':+ '再試行してください。失敗が続く場合は、設定から診断を実行してください。',+ 'conversations.toolFailure.notFound.cause':+ 'このアクションが要求した項目は存在しないか、ここで利用できません。',+ 'conversations.toolFailure.notFound.next':+ '操作は不要です。アシスタントが正しい名前を検索して再試行できます。',+ 'conversations.toolFailure.unsupported.cause': 'OpenHumanはまだこれを自動的に実行できません。',+ 'conversations.toolFailure.unsupported.next':+ '手動で実行するか、別のオプションを依頼してください。',+ 'conversations.backgroundTasks.title': 'バックグラウンドタスク',+ 'conversations.backgroundTasks.statusRunning': '実行中',+ 'conversations.backgroundTasks.close': '閉じる',+ // Section headers for the broader background-activity panel.+ 'conversations.backgroundTasks.sectionThisChat': 'このチャット内',+ 'conversations.backgroundTasks.sectionScheduled': 'スケジュールされたジョブ',+ 'conversations.backgroundTasks.sectionMemory': 'メモリー同期',+ 'conversations.backgroundTasks.inboxReady': '{count} 件準備完了',+ 'conversations.backgroundTasks.inboxInFlight': '{count} 件処理中',+ 'conversations.backgroundTasks.memoryJobTitle': 'メモリー同期',+ 'conversations.backgroundTasks.cancelJob': 'キャンセル',+ // Scheduled (cron) jobs.+ 'conversations.backgroundTasks.cronEmpty': 'スケジュールされたジョブはありません。',+ 'conversations.backgroundTasks.cronSchedCron': 'Cron {expr}',+ // Memory syncing / ingestion.+ 'conversations.backgroundTasks.memUpToDate': 'すべてのメモリーは最新です',+ 'conversations.subagent.awaitingTitle': '回答待ち',+ 'conversations.subagent.answerPlaceholder': '回答を入力',+ 'conversations.subagent.answerSend': '回答を送信',+ 'conversations.subagent.answerSent': '回答を送信しました',+ 'conversations.subagent.transcript.instruction': '指示',+ 'conversations.subagent.transcript.agent': 'エージェント',+ 'conversations.subagent.transcript.system': 'システム',+ 'conversations.tasks.taskOne': 'タスク',+ 'conversations.tasks.taskOther': 'タスク',+ 'conversations.tasks.running': '実行中',+ 'conversations.tasks.waitingForInput': '入力待ち',+ 'conversations.tasks.done': '完了',+ 'conversations.tasks.failed': '失敗',+ 'conversations.tasks.of': '/',+ 'conversations.agentTaskInsights.title': 'エージェントタスクのインサイト',+ 'conversations.agentTaskInsights.response': '応答',+ 'conversations.agentTaskInsights.processSourceTitle': 'エージェント処理ソース',+ 'conversations.agentTaskInsights.stepsHeading': 'ステップ',+ 'conversations.agentTaskInsights.sourcesHeading': 'ソース',+ 'conversations.agentTaskInsights.memoryCitationFallbackTitle': 'メモリー',+ 'conversations.memoryChips.remembered': '{n} 件記憶済み',+ 'conversations.memoryChips.idle': 'メモリー',+ 'conversations.memoryChips.forgetAriaLabel': '「{text}」を忘れる',+ 'conversations.scheduleCard.next': '次回',+ 'conversations.scheduleCard.paused': '一時停止中',+ 'conversations.scheduleCard.recentRuns': '最近の実行',+ 'conversations.scheduleCard.ok': 'OK',+ 'conversations.scheduleCard.failed': '失敗',+ 'conversations.conversationSearch.placeholder': '会話内を検索',+ 'conversations.conversationSearch.previousMatch': '前の一致',+ 'conversations.conversationSearch.nextMatch': '次の一致',+ 'conversations.agentTaskInsights.noSteps': '記録されたステップはありません',+ 'conversations.agentTaskInsights.viewProcessSource': 'エージェント処理ソース全体を表示',+ 'conversations.agentTaskInsights.done': '完了',+ 'conversations.agentTaskInsights.subagentsHeading': 'サブエージェント',+ 'daemon.serviceBlockingGate.body': 'バックグラウンドで再試行しています。通常は数秒で解決します。',+ 'daemon.serviceBlockingGate.downloadHint':+ 'この問題が解決しない場合は、最新バージョンをダウンロードしてください。',+ 'daemon.serviceBlockingGate.downloadLatest': '最新バージョンをダウンロード',+ 'daemon.serviceBlockingGate.retryCore': 'コアを再試行',+ 'daemon.serviceBlockingGate.retryFailed':+ '再試行に失敗しました。最新のアプリビルドをダウンロードして再試行してください。',+ 'daemon.serviceBlockingGate.retrying': '再試行中...',+ 'daemon.serviceBlockingGate.title': 'OpenHuman コアが利用できません',+ 'home.banners.discordSubtitle':+ 'サポートの取得、フィードバックの共有、コミュニティとの交流ができます。',+ 'home.banners.discordTitle': 'Discord に参加',+ 'home.banners.earlyBirdDismiss': '早期割引バナーを閉じる',+ 'home.banners.earlyBirdFirstSub': '初回サブスクリプション。',+ 'home.banners.earlyBirdOn': '早期割引適用中',+ 'home.banners.earlyBirdTitle': '最初の 1,000 名は 60% オフ。',+ 'home.banners.earlyBirdUseCode': 'コードを使用',+ 'home.banners.getSubscription': 'サブスクリプションを取得',+ 'home.banners.promoCreditsBody': 'プロモーションクレジットが {amount} あります。',+ 'home.banners.promoCreditsUsage': '任意の AI ワークロードに使用できます。',+ 'intelligence.memoryChunk.detail.chunk': 'チャンク',+ 'intelligence.memoryChunk.detail.copyChunkId': 'チャンク ID をコピー',+ 'intelligence.memoryChunk.detail.embeddingInfo': 'bge-m3 1024次元',+ 'intelligence.memoryChunk.detail.noEmbedding': '埋め込みなし',+ 'intelligence.memoryChunk.letterhead.from': '送信元',+ 'intelligence.memoryChunk.letterhead.to': '送信先',+ 'intelligence.memoryChunk.mentioned.chunkOne': '1 チャンク',+ 'intelligence.memoryChunk.mentioned.chunkOther': '{count} チャンク',+ 'intelligence.memoryChunk.mentioned.heading': '言 及 さ れ た',+ 'intelligence.memoryChunk.scoreBars.ariaScore': '{name} スコア {pct}%',+ 'intelligence.memoryChunk.scoreBars.atThreshold': 'しきい値 {threshold}',+ 'intelligence.memoryChunk.scoreBars.dropped': '除外済み',+ 'intelligence.memoryChunk.scoreBars.heading': '保 持 理 由',+ 'intelligence.memoryChunk.scoreBars.kept': '保持済み',+ 'intelligence.diagram.skillInstallCommand': 'npx skills add yizhiyanhua-ai/fireworks-tech-graph',+ // Worktree manager (#3376): isolated worker git worktrees+ 'worktree.label': 'ワークツリー',+ 'worktree.dirty': '未コミットの変更',+ 'worktree.clean': 'クリーン',+ 'worktree.removing': '削除中…',+ 'worktree.removeFailed': 'ワークツリーの削除に失敗しました',+ 'worktree.diffFailed': '差分の読み込みに失敗しました',+ 'worktree.diffLoading': '差分を読み込み中…',+ 'worktree.diffEmpty': 'HEAD との変更はありません。',+ 'worktree.dirtyConfirm':+ 'このワークツリーには未コミットの変更があります。削除するとその作業は破棄されますが、ワーカーブランチは保持されます。',+ 'worktree.action.open': 'フォルダを開く',+ 'worktree.action.diff': '差分',+ 'worktree.action.hideDiff': '差分を非表示',+ 'worktree.action.remove': '削除',+ 'worktree.action.removeAnyway': '破棄して削除',+ 'worktree.action.preserve': '保持',+ // Orchestration tab (#3375): multi-agent workflow runs.+ 'orchestration.tier.readOnly': '読み取り専用',+ 'orchestration.tier.standard': '標準',+ 'orchestration.tier.editCapable': '編集可能',+ 'orchestration.approval.title': 'このワークフローの実行を承認',+ 'orchestration.approval.body':+ 'これは高コストまたは高並行性の実行であり、開始前に明示的な承認が必要です:',+ 'orchestration.approval.reason.tier':+ 'エージェントは読み取り専用の調査を超える操作を実行できます。',+ 'orchestration.approval.reason.concurrency': '多数のエージェントを同時に実行します。',+ 'orchestration.approval.reason.children': '合計で多数のエージェントを生成できます。',+ 'orchestration.approval.tier': '安全ティア',+ 'orchestration.approval.concurrency': '並行実行数',+ 'orchestration.approval.maxChildren': '最大エージェント数',+ 'orchestration.approval.approve': '承認して開始',+ 'orchestration.approval.starting': '開始中…',+ 'orchestration.approval.cancel': 'キャンセル',+ 'orchestration.runStatus.pending': '保留中',+ 'orchestration.runStatus.running': '実行中',+ 'orchestration.runStatus.completed': '完了',+ 'orchestration.runStatus.failed': '失敗',+ 'orchestration.runStatus.cancelled': 'キャンセル済み',+ 'orchestration.runStatus.interrupted': '中断',+ 'orchestration.phaseStatus.pending': '保留中',+ 'orchestration.phaseStatus.running': '実行中',+ 'orchestration.phaseStatus.completed': '完了',+ 'orchestration.phaseStatus.failed': '失敗',+ 'orchestration.detail.stop': '停止',+ 'orchestration.detail.resume': '再開',+ 'orchestration.detail.agents': 'エージェント',+ 'orchestration.detail.childRefs': '子エージェント',+ 'orchestration.detail.synthesis': '最終統合',+ 'intelligence.teams.header.lead': 'リーダー',+ 'intelligence.teams.header.taskCount': '{count} 件のタスク',+ 'intelligence.teams.header.memberCount': '{count} 人のメンバー',+ 'intelligence.teams.member.active': 'アクティブ',+ 'intelligence.teams.member.pending': '保留中',+ 'intelligence.teams.member.idle': 'アイドル',+ 'intelligence.teams.member.stopped': '停止済み',+ 'intelligence.teams.activity.title': 'チームアクティビティ',+ 'intelligence.teams.activity.empty': 'メッセージはまだありません',+ 'intelligence.teams.activity.toTeam': 'チーム',+ 'intelligence.teams.member.start': '開始',+ 'intelligence.teams.composer.placeholder': 'チームメンバーにメッセージを送信…',+ 'intelligence.teams.composer.send': '送信',+ 'intelligence.teams.composer.recipient': '宛先',+ 'intelligence.teams.composer.toTeam': 'チーム全体',+ 'notifications.card.dismiss': '通知を閉じる',+ 'notifications.card.importanceTitle': '重要度: {pct}%',+ 'notifications.center.empty': '通知はまだありません',+ 'notifications.center.emptyHint': 'すべて確認済みです。',+ 'notifications.center.filterAll': 'すべて表示',+ 'notifications.center.markAllRead': 'すべて既読にする',+ 'notifications.center.title': '通知',+ 'notifications.flow.approveTitle': 'ワークフローの承認が必要です',+ 'notifications.flow.approve': '承認',+ 'notifications.flow.approving': '承認中…',+ 'notifications.flow.dismiss': '却下',+ 'notifications.flow.error': 'ワークフローを再開できませんでした。もう一度お試しください。',+ 'notifications.flow.gateCount': '{count} 件の承認ゲートで待機中',+ 'notifications.flow.approveHint': 'このチェックポイントを通過してワークフローを再開',+ 'notifications.flow.dismissHint': 'ワークフローを再開せずにこのプロンプトを非表示にする',+ 'notifications.flow.viewRun': '実行を表示',+ // Flow-approval surface: notification-center gate card for the+ // `flow-gate-approval` CoreNotification kind. Distinct from+ // `notifications.flow.*` above (that's the older `flows_resume`-based+ // pending-approval prompt); this one decides via `approval_decide`.+ 'notifications.flowGate.title': 'ワークフローの承認が必要です',+ 'notifications.flowGate.tool': 'ツール:',+ 'notifications.flowGate.approve': '1回だけ承認',+ 'notifications.flowGate.approveAlways': '常に承認',+ 'notifications.flowGate.approveAlwaysHint':+ 'このフローの今後の実行ではこのチェックポイントをスキップ',+ 'notifications.flowGate.deny': '拒否',+ 'notifications.flowGate.deciding': '処理中…',+ 'notifications.flowGate.error': '決定を記録できませんでした。もう一度お試しください。',+ 'flowRuns.inspector.title': '実行の詳細',+ 'flowRuns.inspector.startedAt': '開始日時',+ 'flowRuns.inspector.finishedAt': '完了日時',+ 'flowRuns.inspector.running': '実行中…',+ 'flowRuns.inspector.error': 'エラー',+ 'flowRuns.inspector.pendingApprovals': '保留中の承認',+ // Actionable approval gate cards (flow-approval surface: run details).+ 'flowRuns.inspector.approval.approveAlwaysHint':+ 'このフローの今後の実行ではこのチェックポイントをスキップ',+ 'flowRuns.inspector.approval.loadError': 'この実行の保留中の承認を読み込めませんでした。',+ 'flowRuns.inspector.steps': 'ステップ',+ 'flowRuns.inspector.noSteps': '記録されたステップはまだありません。',+ // Issue B20: raw JSON now lives behind this disclosure; the plain-language+ // summary above it (`flowRuns.inspector.summary.*`) is the primary view.+ 'flowRuns.inspector.output': '生出力を表示',+ 'flowRuns.inspector.port': 'ポート',+ // Issue B20: plain-language, always-visible step summary (no costUsd/+ // labelIds/markdownFormatted or flow:/run: ids: those stay behind+ // "Show raw output"). `{count}` is substituted client-side, not via ICU.+ 'flowRuns.inspector.summary.failedPrefix': '完了できませんでした:',+ 'flowRuns.inspector.summary.unknownError': '問題が発生しました',+ 'flowRuns.inspector.summary.itemsFetched': '{count} 件の項目を取得しました',+ 'flowRuns.inspector.summary.completed': 'ステップ完了',+ 'flowRuns.inspector.summary.noOutput': '出力はありません',+ // Null-resolution diagnostics: `=`-expressions in a step's config that+ // resolved to null during the run (likely a mis-wired reference).+ 'flowRuns.inspector.diagnosticsTitle': '式警告',+ 'flowRuns.inspector.diagnosticResolvedNull': 'null に解決されました',+ 'flowRuns.inspector.loading': '実行を読み込み中…',+ 'flowRuns.inspector.loadError': 'この実行を読み込めませんでした',+ // Phase 5c: "Fix with agent" opens the canvas copilot preloaded with this+ // failed run's context so the workflow builder can propose a fix.+ 'flowRuns.inspector.fixWithAgent': 'エージェントで修正',+ // Phase 6: per-item data browser (n8n-style table ⟷ JSON toggle) for a+ // step's output items, plus the input↔output pairing affordance.+ 'flowRuns.inspector.dataTable': 'テーブル',+ 'flowRuns.inspector.dataJson': 'JSON',+ 'flowRuns.inspector.dataViewLabel': '出力ビュー',+ 'flowRuns.inspector.itemCount': '{count} 件',+ 'flowRuns.inspector.noItems': '出力項目がありません',+ 'flowRuns.inspector.emptyValue': '(空)',+ 'flowRuns.inspector.binaryLabel': 'バイナリ',+ 'flowRuns.inspector.showSource': 'ソース',+ 'flowRuns.inspector.hideSource': 'ソースを非表示',+ 'flowRuns.inspector.sourceInputTitle': 'ソース入力項目',+ 'flowRuns.status.running': '実行中',+ 'flowRuns.status.completed': '完了',+ 'flowRuns.status.completed_with_warnings': '警告付きで完了',+ 'flowRuns.status.pending_approval': '承認待ち',+ 'flowRuns.status.failed': '失敗',+ 'flowRuns.status.cancelled': 'キャンセル済み',+ 'flowRuns.status.interrupted': '中断',++ // ── Workflows list page + nav tab (B5a): the `flows::` domain's+ // discoverable hub at /flows. Distinct from the legacy SKILL.md+ // "workflows.*" namespace above and from B3b's "flowRuns.*" / B4's+ // "chat.flowProposal.*" namespaces (kept apart here to avoid merge+ // conflicts with those in-flight branches).+ 'flows.page.title': 'ワークフロー',+ // Welcome landing (first destination)+ 'flows.welcome.nav': 'ようこそ',+ 'flows.welcome.main': 'ワークフロー',+ 'flows.welcome.eyebrow': 'ワークフロー',+ 'flows.welcome.title': '定型業務を自動化',+ 'flows.welcome.body':+ '繰り返し行う作業(トリアージ、フォローアップ、ダイジェストなど)を説明すると、エージェントがエンドツーエンドで実行できるワークフローに変換します。スケジュール実行またはオンデマンド実行が可能です。',+ 'flows.welcome.ctaNew': '新規ワークフロー',+ 'flows.welcome.ctaBrowse': 'ワークフローを参照',+ 'flows.welcome.featsLabel': '自動化できること',+ 'flows.welcome.feat1Title': '言葉で説明',+ 'flows.welcome.feat1Body':+ 'やりたいことを平易な言葉で伝えるだけで、ビルダーがフローを作成します。',+ 'flows.welcome.feat2Title': 'スケジュール実行',+ 'flows.welcome.feat2Body': 'タイマー、イベント、またはボタンで起動できます。',+ 'flows.welcome.feat3Title': '人間による承認',+ 'flows.welcome.feat3Body': '重要なステップは送信前に承認できます。',+ 'flows.page.description': '有効化、実行、監視ができる保存済みの自動化。',+ 'flows.page.emptyTitle': 'ワークフローがありません',+ 'flows.page.emptyDescription':+ 'キャンバスから作成すると、保存済みのワークフローがここに表示されます。',+ 'flows.page.loading': 'ワークフローを読み込み中…',+ 'flows.page.loadError': 'ワークフローを読み込めませんでした。もう一度お試しください。',+ 'flows.page.newWorkflow': '新規ワークフロー',+ 'flows.list.lastRun': '最終実行',+ 'flows.list.neverRun': '未実行',+ 'flows.list.justNow': 'たった今',+ 'flows.discoveries.title': 'ワークフローの提案',+ 'flows.discoveries.description': 'Flow Scout があなたの作業内容に基づいて提案する自動化です。',+ 'flows.allRuns.title': 'ワークフローの実行履歴',+ 'flows.allRuns.description': 'ワークスペース内のすべてのワークフロー実行履歴(新しい順)。',+ 'flows.allRuns.loading': '実行履歴を読み込み中…',+ 'flows.allRuns.empty': 'ワークフローの実行履歴はまだありません。',+ 'flows.allRuns.unknownWorkflow': '不明なワークフロー',+ 'flows.allRuns.tableTitle': '実行履歴',+ 'flows.allRuns.tableDesc': '実行履歴を開くと、該当するワークフローに移動します。',+ 'flows.allRuns.columnStatus': 'ステータス',+ 'flows.allRuns.columnWorkflow': 'ワークフロー',+ 'flows.allRuns.columnStarted': '開始日時',+ 'flows.allRuns.columnDuration': '実行時間',+ 'flows.allRuns.searchPlaceholder': 'ワークフローまたはエラーを検索…',+ 'flows.allRuns.status.running': '実行中',+ 'flows.allRuns.status.completed': '完了',+ 'flows.allRuns.status.completed_with_warnings': '警告付きで完了',+ 'flows.allRuns.status.pending_approval': '承認待ち',+ 'flows.allRuns.status.failed': '失敗',+ 'flows.allRuns.status.cancelled': 'キャンセル済み',+ 'flows.allRuns.status.interrupted': '中断',+ 'flows.list.minutesAgo': '{count}分前',+ 'flows.list.hoursAgo': '{count}時間前',+ 'flows.list.daysAgo': '{count}日前',+ 'flows.list.runNow': '実行',+ 'flows.list.running': '実行中…',+ 'flows.list.viewRuns': '実行履歴を表示',+ 'flows.list.toggleEnabled': 'ワークフローを有効化',+ 'flows.list.enabled': '有効',+ 'flows.list.paused': '一時停止',+ 'flows.list.runStarted': 'ワークフローを開始しました',+ 'flows.list.view': 'ワークフローを表示',+ 'flows.list.export': 'エクスポート',+ 'flows.list.exported': 'ワークフローをエクスポートしました',+ 'flows.list.duplicate': '複製',+ 'flows.list.duplicated': 'ワークフローを複製しました',+ 'flows.list.delete': '削除',+ 'flows.list.deleted': 'ワークフローを削除しました',+ 'flows.list.moreActions': 'その他の操作',+ 'flows.delete.title': 'ワークフローを削除しますか?',+ 'flows.delete.body': '「{name}」とその実行履歴は完全に削除されます。この操作は元に戻せません。',+ 'flows.delete.cancel': 'キャンセル',+ 'flows.delete.confirm': '削除',+ 'flows.delete.deleting': '削除中…',+ 'flows.page.import': 'インポート',+ 'flows.import.invalidFile': 'このファイルは有効なワークフローJSONではありません。',+ 'flows.import.error':+ 'このワークフローをインポートできませんでした。ファイルを確認して再試行してください。',+ 'flows.import.warningTitle': 'インポート警告',+ 'flows.runs.title': '{name}の実行履歴',+ 'flows.runs.titleFallback': 'ワークフローの実行履歴',+ 'flows.runs.loading': '実行履歴を読み込み中…',+ 'flows.runs.loadError': '実行履歴を読み込めませんでした',+ 'flows.runs.empty': '実行履歴はまだありません',+ 'flows.runs.sidebarTitle': '実行履歴',+ 'flows.runs.refresh': '実行履歴を更新',++ // ── Phase 5c: prompt-first authoring + canvas copilot ────────────────────+ // The Flows prompt bar (describe a workflow → builder agent proposes it) and+ // the canvas copilot (iterate on a draft with a diff overlay). Everything+ // here only PROPOSES: saving/enabling stays behind explicit clicks.+ 'flows.suggest.discover': '発見',+ 'flows.suggest.rediscover': '更新',+ 'flows.suggest.discovering': '自動化を検索中…',+ 'flows.suggest.empty':+ '提案はまだありません。「発見」を実行すると、Flow Scoutがあなたの作業から設定する価値のある自動化を探します。',+ 'flows.suggest.error': '検索を実行できませんでした。もう一度お試しください。',+ 'flows.suggest.whyToggle': 'なぜこれ?',+ 'flows.suggest.steps': '仕組み',+ 'flows.suggest.moreSteps': '他{count}ステップ',+ 'flows.suggest.match.high': '強い一致',+ 'flows.suggest.match.good': '良い一致',+ 'flows.suggest.match.possible': '検討の価値あり',+ 'flows.suggest.filterAll': 'すべて',+ 'flows.suggest.filterAria': 'トリガーで提案を絞り込む',+ 'flows.suggest.emptyTitle': 'まだ発見はありません',+ 'flows.suggest.scanning':+ 'Flow Scoutがメモリー、会話、接続済みアプリを確認しています。これには数分かかる場合があります。',+ 'flows.suggest.build': 'これを作成',+ 'flows.suggest.opening': '開いています…',+ 'flows.suggest.dismiss': '却下',+ 'flows.suggest.uses': '使用回数',+ 'flows.suggest.trigger.schedule': 'スケジュール',+ 'flows.suggest.trigger.app_event': 'イベント時',+ 'flows.suggest.trigger.manual': '手動実行',+ 'flows.copilot.open': 'Copilot',+ 'flows.copilot.placeholder': '変更内容をリクエスト…',+ 'flows.copilot.error': 'ワークフロービルダーに接続できませんでした。もう一度お試しください。',+ 'flows.copilot.offline': 'オフラインです。Copilotを使用するには再接続してください。',+ 'flows.copilot.emptyState':+ 'このワークフローへの変更内容を記述すると、ビルダーが更新案を提案します。',+ 'flows.copilot.proposalTitle': '提案された変更',+ 'flows.copilot.added': '{count} 件追加',+ 'flows.copilot.removed': '{count} 件削除',+ 'flows.copilot.noChanges': 'この提案にノードの変更はありません。',+ 'flows.copilot.acceptAndSave': '承認して保存',+ 'flows.copilot.saveAndEnable': '保存して有効化',+ 'flows.copilot.saving': '保存中…',+ 'flows.copilot.enabling': '有効化中…',+ 'flows.copilot.enableError':+ '保存されましたが、ワークフローを有効化できませんでした。一覧から手動で有効にしてください。',+ 'flows.copilot.reject': '却下',+ 'flows.copilot.previewHint': '提案されたドラフトを確認中: まだ保存されていません。',+ 'flows.copilot.repairDisplay': '実行に失敗しました。内容を確認し、修正を提案してください。',+ 'flows.copilot.cappedNotice':+ 'ビルダーがワークフローの完成前に反復回数の上限に達しました。続行すると、現在のドラフトから構築を再開します。',+ 'flows.copilot.continueBuilding': '構築を続行',++ // ── Workflow Canvas (issue B5b.1): the read-only graph view of a saved+ // flow at /flows/:id. `flows.nodeKind.*` labels the 13 tinyflows node+ // kinds (`tinyflows::model::NodeKind`) shown in each canvas node card.+ 'flows.canvas.title': 'ワークフロー',+ 'flows.canvas.description': 'この自動化をステップごとに構築し、保存して実行します。',+ 'flows.canvas.loading': 'ワークフローを読み込み中…',+ 'flows.canvas.loadError': 'このワークフローを読み込めませんでした。もう一度お試しください。',+ 'flows.canvas.notFound': 'このワークフローが見つかりませんでした。',+ 'flows.canvas.draftMissing':+ '開くワークフローのドラフトがありません。まずチャットから提案してください。',+ 'flows.canvas.backToList': 'ワークフロー一覧へ戻る',+ 'flows.canvas.renameLabel': 'ワークフロー名を変更',+ 'flows.canvas.sidePanelToggle': 'サイドパネル',+ // The palette tab is labelled "Manual" (build by hand) as the counterpart to+ // the AI "Copilot" tab; the key name stays `legendTab` for the node palette.+ 'flows.canvas.legendTab': 'マニュアル',+ 'flows.canvas.runTab': '実行',+ 'flows.canvas.toolbar': 'キャンバスコントロール',+ 'flows.canvas.zoomIn': '拡大',+ 'flows.canvas.zoomOut': '縮小',+ 'flows.canvas.fitView': '画面に合わせる',+ 'flows.canvas.openPanel': 'サイドパネルを開く',+ 'flows.canvas.closePanel': 'サイドパネルを閉じる',+ 'flows.nodeKind.trigger': 'トリガー',+ 'flows.nodeKind.agent': 'エージェント',+ 'flows.nodeKind.tool_call': 'ツール呼び出し',+ 'flows.nodeKind.http_request': 'HTTP リクエスト',+ 'flows.nodeKind.code': 'コード',+ 'flows.nodeKind.condition': '条件',+ 'flows.nodeKind.switch': 'スイッチ',+ 'flows.nodeKind.merge': 'マージ',+ 'flows.nodeKind.split_out': '分割',+ 'flows.nodeKind.transform': '変換',+ 'flows.nodeKind.output_parser': '出力パーサー',+ 'flows.nodeKind.sub_workflow': 'サブワークフロー',+ 'flows.nodeKind.memory': 'メモリー',+ 'flows.nodeKind.dedup': '重複排除',+ 'flows.nodeKind.loop': 'ループ',++ // ── describeNode (F-M3): the dynamic per-node card summary text shown on+ // every canvas node (`FlowNodeComponent`) and in the config drawer header.+ 'flows.nodeSummary.trigger.manual': '手動実行',+ 'flows.nodeSummary.trigger.webhook': 'Webhook 受信時に実行',+ 'flows.nodeSummary.trigger.appEventOn': '{parts} 時',+ 'flows.nodeSummary.trigger.appEvent': 'アプリイベント時に実行',+ 'flows.nodeSummary.trigger.unknownKind': 'トリガー: {kind}',+ 'flows.nodeSummary.agent.defaultModel': 'デフォルトモデル',+ 'flows.nodeSummary.agent.withPrompt': '「{prompt}」 · {model}',+ 'flows.nodeSummary.agent.default': '{model} に質問',+ 'flows.nodeSummary.toolCall.runsNative': '{name} を実行',+ 'flows.nodeSummary.toolCall.pickNative': 'OpenHuman ツールを実行 (選択してください)',+ 'flows.nodeSummary.toolCall.runs': '{slug} を実行',+ 'flows.nodeSummary.toolCall.pick': 'アプリアクションを実行 (選択してください)',+ 'flows.nodeSummary.http.withUrl': '{method} {url}',+ 'flows.nodeSummary.http.noUrl': '{method} リクエスト (URL を設定)',+ 'flows.nodeSummary.code.runs': '{lang} コードを実行',+ 'flows.nodeSummary.condition.withField': '{field} が true / false の場合',+ 'flows.nodeSummary.condition.default': 'true / false に分岐',+ 'flows.nodeSummary.switch.byExpr': '{expr} でルーティング',+ 'flows.nodeSummary.switch.byExprWithRoutes': '{expr} でルーティング ({count} ルート)',+ 'flows.nodeSummary.switch.byValue': '値でルーティング',+ 'flows.nodeSummary.switch.byValueWithRoutes': '値でルーティング ({count} ルート)',+ 'flows.nodeSummary.merge': '並列ブランチをマージ',+ 'flows.nodeSummary.splitOut.withPath': '各 {path} を分割',+ 'flows.nodeSummary.splitOut.default': 'リストを項目に分割',+ 'flows.nodeSummary.transform.default': '各項目の構造を変更',+ 'flows.nodeSummary.transform.setFieldsSingular': '各項目に {n} 個のフィールドを設定',+ 'flows.nodeSummary.transform.setFieldsPlural': '各項目に{n}個のフィールドを設定',+ 'flows.nodeSummary.outputParser': '前の出力を解析',+ 'flows.nodeSummary.subWorkflow': 'ネストされたワークフローを実行',+ 'flows.nodeSummary.memory.flavourWith': '「{flavour}」フレーバーを読み取り',+ 'flows.nodeSummary.memory.flavour': 'メモリーフレーバーを読み取り',+ 'flows.nodeSummary.memory.people': '人物メモリーを検索',+ 'flows.nodeSummary.memory.remember': 'このワークフローで値を記憶',+ 'flows.nodeSummary.memory.forget': 'このワークフローから値を削除',+ 'flows.nodeSummary.memory.searchScoped': 'メモリーを検索 ({scope})',+ 'flows.nodeSummary.memory.search': 'メモリーを検索',+ 'flows.nodeSummary.memory.recallScoped': 'メモリーを呼び出し ({scope})',+ 'flows.nodeSummary.memory.recall': 'メモリーを呼び出し',+ 'flows.nodeSummary.dedup.withKey': '{key}で既に確認済みの項目をスキップ',+ 'flows.nodeSummary.dedup.default': '既に処理済みの項目をスキップ',+ 'flows.nodeSummary.loop.upTo': '最大{max}回まで繰り返す',+ 'flows.nodeSummary.loop.whileCondition': '{condition}の間、最大{max}回まで繰り返す',++ // ── Editable Workflow Canvas (issue B5b.2 / Phase 3a): the node palette+ // and editor toolbar layered on top of the read-only canvas above.+ 'flows.palette.title': 'ノード',+ 'flows.palette.panelHint':+ 'ステップをクリックしてキャンバスに追加するか、ドラッグして配置します。',+ 'flows.palette.addNode': '{kind}ノードを追加',+ 'flows.palette.group.triggers': 'トリガー',+ 'flows.palette.group.actions': 'アクション',+ 'flows.palette.group.logic': 'ロジック',+ 'flows.palette.appAction': 'アプリアクション',+ 'flows.palette.ohTool': 'ツール',+ 'flows.editor.save': '保存',+ 'flows.editor.saving': '保存中…',+ 'flows.editor.run': '実行',+ 'flows.editor.running': '実行中…',+ 'flows.editor.runFailed': '実行を開始できませんでした',+ 'flows.editor.deleteNode': '削除',+ 'flows.editor.undo': '元に戻す',+ 'flows.editor.redo': 'やり直し',+ 'flows.editor.onboardingTitle': 'ワークフローを作成',+ 'flows.editor.onboardingBody':+ '左側のパレットからノードを追加し、カード間のドットをドラッグして接続します。',+ // ── Validation UX + draft/dirty state (issue B5b / Phase 3c–3d)+ 'flows.editor.validate': '検証',+ 'flows.editor.validating': '検証中…',+ 'flows.editor.unsaved': '未保存の変更',+ 'flows.editor.confirm.runTitle': 'ワークフローを実行しますか?',+ 'flows.editor.confirm.runBody': 'ワークフローを今すぐ実行します。',+ 'flows.editor.confirm.saveTitle': '変更を保存しますか?',+ 'flows.editor.confirm.saveBody': 'ワークフローへの変更を保存します。',+ 'flows.editor.confirm.discardTitle': '変更を破棄しますか?',+ 'flows.editor.confirm.discardBody':+ '保存されていない編集内容がすべて元に戻り、この操作は取り消せません。',+ 'flows.editor.confirm.confirm': '確定',+ 'flows.editor.confirm.cancel': 'キャンセル',+ 'flows.editor.saveBlocked': '保存する前に以下のエラーを修正してください。',+ 'flows.editor.errorsTitle': 'エラー',+ 'flows.editor.warningsTitle': '警告',+ 'flows.editor.saveFailedTitle': '保存できませんでした',+ 'flows.editor.leaveTitle': '保存せずに離れますか?',+ 'flows.editor.leaveBody':+ 'このワークフローに未保存の変更があります。今離れると、変更内容は失われます。',+ 'flows.editor.leaveStay': '留まる',+ 'flows.editor.leaveDiscard': '離れる',+ // ── Node config drawer (issue B5b / Phase 3b): per-kind config forms+ 'flows.nodeConfig.close': '設定を閉じる',+ 'flows.nodeConfig.connections.title': '接続',+ 'flows.nodeConfig.connections.inputs': '入力',+ 'flows.nodeConfig.connections.outputs': '出力',+ 'flows.nodeConfig.connections.none': 'まだ他のノードに接続されていません。',+ 'flows.nodeConfig.connections.remove': '接続を削除',+ 'flows.nodeConfig.nameLabel': '名前',+ 'flows.nodeConfig.namePlaceholder': 'ノード名',+ 'flows.nodeConfig.editForm': 'フォームで編集',+ 'flows.nodeConfig.editJson': 'JSONで編集',+ 'flows.nodeConfig.rawJsonLabel': '設定(JSON)',+ 'flows.nodeConfig.rawJsonHint': 'このノードの自由記述形式の設定です。',+ 'flows.nodeConfig.rawJsonInvalid': '無効なJSONです:解析が成功するまで変更は適用されません。',+ 'flows.nodeConfig.expressionHint':+ 'ノード入力から値を計算するには = で開始します(例:=item.url)',+ 'flows.nodeConfig.expressionBadge': '式',+ 'flows.nodeConfig.keymapKeyPlaceholder': 'キー',+ 'flows.nodeConfig.keymapValuePlaceholder': '値',+ 'flows.nodeConfig.keymapRemove': '行を削除',+ 'flows.nodeConfig.keymapAdd': '行を追加',+ 'flows.nodeConfig.credentialLabel': '認証情報',+ 'flows.nodeConfig.credentialHint':+ 'このノード用の接続済みアカウントまたは認証情報を選択してください。',+ 'flows.nodeConfig.credentialEmpty': '利用可能な接続済み認証情報がありません。',+ 'flows.nodeConfig.credentialNone': 'なし',+ 'flows.nodeConfig.trigger.kindLabel': 'トリガーの種類',+ 'flows.nodeConfig.trigger.kind_manual': '手動',+ 'flows.nodeConfig.trigger.kind_schedule': 'スケジュール',+ 'flows.nodeConfig.trigger.kind_webhook': 'Webhook',+ 'flows.nodeConfig.trigger.kind_app_event': 'アプリイベント',+ 'flows.nodeConfig.trigger.scheduleLabel': 'スケジュール',+ 'flows.nodeConfig.trigger.scheduleCronLabel': 'Cron式',+ 'flows.nodeConfig.trigger.scheduleFreqLabel': '頻度',+ 'flows.nodeConfig.trigger.scheduleFreq_minutes': 'N分ごと',+ 'flows.nodeConfig.trigger.scheduleFreq_hours': 'N時間ごと',+ 'flows.nodeConfig.trigger.scheduleFreq_daily': '毎日指定時刻',+ 'flows.nodeConfig.trigger.scheduleEvery': 'ごと',+ 'flows.nodeConfig.trigger.scheduleInterval': '間隔',+ 'flows.nodeConfig.trigger.scheduleUnit_minutes': '分',+ 'flows.nodeConfig.trigger.scheduleUnit_hours': '時間',+ 'flows.nodeConfig.trigger.scheduleAt': '時刻',+ 'flows.nodeConfig.trigger.scheduleTime': '時刻',+ 'flows.nodeConfig.trigger.scheduleDays': '曜日(任意:空欄で毎日)',+ 'flows.nodeConfig.trigger.scheduleAdvanced': '詳細(Cron式を編集)',+ 'flows.nodeConfig.trigger.scheduleSimple': '簡易スケジュールに戻る',+ // ── describeCron / describeEveryMs / describeSchedule (F-M3): the live+ // plain-language schedule summary shown in `ScheduleField` and the+ // read-only trigger-node summary for `every`/`at` schedules.+ 'flows.cron.customSchedule': 'カスタムスケジュール({expr})',+ 'flows.cron.noScheduleSet': 'スケジュール未設定',+ 'flows.cron.weekdays': '平日',+ 'flows.cron.weekends': '週末',+ 'flows.cron.everyMinute': '毎分',+ 'flows.cron.everyMinuteOnDays': '{days}の毎分',+ 'flows.cron.everyNMinutes': '{n}分ごと',+ 'flows.cron.everyNMinutesOnDays': '{days}の{n}分ごと',+ 'flows.cron.everyHour': '毎時',+ 'flows.cron.everyHourOnDays': '{days}の毎時',+ 'flows.cron.everyNHours': '{n}時間ごと',+ 'flows.cron.everyNHoursOnDays': '{days}の{n}時間ごと',+ 'flows.cron.everyDayAtTime': '毎日 {time}',+ 'flows.cron.atTimeOnDays': '{days}の {time}',+ 'flows.cron.invalidInterval': '無効な間隔',+ 'flows.cron.dailyEvery24h': '毎日(24時間ごと)',+ 'flows.cron.everyNDays': '{n}日ごと',+ 'flows.cron.everyNHoursShort': '{n}時間ごと',+ 'flows.cron.everyNMinutesShort': '{n}分ごと',+ 'flows.cron.everySecond': '毎秒',+ 'flows.cron.everyNSeconds': '{n}秒ごと',+ 'flows.cron.onceAtRaw': '{at}に1回',+ 'flows.cron.onceAt': '{at}に1回',+ 'flows.nodeConfig.trigger.toolkitLabel': 'アプリ',+ 'flows.nodeConfig.trigger.triggerSlugLabel': 'トリガー',+ 'flows.nodeConfig.trigger.pickApp': 'まず接続済みのアプリを選択してください。',+ 'flows.nodeConfig.tool.pickConnection': 'まず接続を選択してください。',+ 'flows.nodeConfig.composio.noConnections':+ '接続済みのアプリがありません。設定 → アプリで接続してから、ここで選択してください。',+ 'flows.nodeConfig.composio.selectApp': 'アプリを選択…',+ 'flows.nodeConfig.composio.select': '選択…',+ 'flows.nodeConfig.composio.loading': '読み込み中…',+ 'flows.nodeConfig.composio.custom': '手動で入力…',+ 'flows.nodeConfig.composio.customPlaceholder': 'SLUG_NAME',+ 'flows.nodeConfig.trigger.webhookHint':+ 'Webhookトリガーは保存されますが、まだ自動的にディスパッチされません。',+ 'flows.nodeConfig.http.methodLabel': 'メソッド',+ 'flows.nodeConfig.http.urlLabel': 'URL',+ 'flows.nodeConfig.http.headersLabel': 'ヘッダー',+ 'flows.nodeConfig.http.bodyLabel': 'ボディ (JSON)',+ 'flows.nodeConfig.agent.promptLabel': 'プロンプト',+ 'flows.nodeConfig.agent.promptPlaceholder': 'エージェントへの指示…',+ 'flows.nodeConfig.agent.agentRefLabel': 'エージェント',+ 'flows.nodeConfig.agent.agentRefHint':+ 'このノードを登録済みエージェントとして実行します。そのツールとガードレールが適用されます。',+ 'flows.nodeConfig.agent.agentRefInherit': 'デフォルト (ワークフロービルダー)',+ 'flows.nodeConfig.agent.modelLabel': 'モデル',+ 'flows.nodeConfig.agent.modelHint':+ '機能ティアを選択してください。ワークスペースがモデルを解決します。',+ 'flows.nodeConfig.agent.modelInherit': 'デフォルト (継承)',+ 'flows.nodeConfig.agent.modelManagedTiers': 'ワークロードロール',+ 'flows.nodeConfig.agent.modelCustom': 'カスタムモデル…',+ 'flows.nodeConfig.agent.modelCustomPlaceholder': '例: gpt-4o-mini',+ 'flows.nodeConfig.tool.slugLabel': 'アクション',+ 'flows.nodeConfig.tool.argsLabel': '引数 (JSON)',+ // Required-arg preflight rows for Composio actions (per-arg ExpressionField+ // rows above the raw JSON editor, which stays as the advanced escape hatch).+ 'flows.nodeConfig.tool.requiredMark': '必須',+ 'flows.nodeConfig.tool.requiredMissing': '必須: 未接続',+ 'flows.nodeConfig.tool.argsAdvancedLabel': 'すべての引数 (詳細)',+ // Upstream-output picker (`=nodes.<id>.item…` insert menu on expression fields).+ 'flows.nodeConfig.upstream.insert': '挿入…',+ 'flows.nodeConfig.upstream.insertLabel': '前のステップの値を挿入',+ 'flows.nodeConfig.native.toolLabel': 'ツール',+ 'flows.nodeConfig.native.toolHint':+ 'アシスタントの組み込みツールの1つ (検索、メディア、ファイルなど)。',+ 'flows.nodeConfig.native.select': 'ツールを選択…',+ 'flows.nodeConfig.native.loading': 'ツールを読み込み中…',+ 'flows.nodeConfig.condition.fieldLabel': 'フィールド',+ 'flows.nodeConfig.condition.fieldHint':+ '真偽値を判定する入力項目のキー。trueまたはfalseにルーティングされます。',+ 'flows.nodeConfig.switch.expressionLabel': '式',+ 'flows.nodeConfig.switch.hint':+ '結果値によって一致する出力ポートが選択されます。nullの場合はデフォルトにルーティングされます。',+ 'flows.nodeConfig.switch.fieldLabel': 'フィールド(フォールバック)',+ 'flows.nodeConfig.transform.setLabel': 'フィールド設定',+ 'flows.nodeConfig.transform.setHint': '各値は項目ごとに評価される式です。例: =item.name',+ 'flows.nodeConfig.code.languageLabel': '言語',+ 'flows.nodeConfig.code.language_javascript': 'JavaScript',+ 'flows.nodeConfig.code.language_python': 'Python',+ 'flows.nodeConfig.code.sourceLabel': 'ソース',+ // `memory` node (issue #5226): recall/search/flavour/people read; remember/forget write.+ 'flows.nodeConfig.memory.operationLabel': '操作',+ 'flows.nodeConfig.memory.operation_recall': '想起',+ 'flows.nodeConfig.memory.operation_search': '検索',+ 'flows.nodeConfig.memory.operation_flavour': 'フレーバー',+ 'flows.nodeConfig.memory.operation_people': '人物',+ 'flows.nodeConfig.memory.operation_remember': '記憶',+ 'flows.nodeConfig.memory.operation_forget': '忘却',+ 'flows.nodeConfig.memory.scopeLabel': 'スコープ',+ 'flows.nodeConfig.memory.scopeHint': 'このメモリーを検索する場所。',+ 'flows.nodeConfig.memory.scopeWriteHint':+ '書き込みはこのワークフロー内でのみ許可されます。個人メモリーへの書き込みはできません。',+ 'flows.nodeConfig.memory.scope_user': 'あなた(読み取り専用)',+ 'flows.nodeConfig.memory.scope_flow': 'このワークフロー',+ 'flows.nodeConfig.memory.scope_flows': 'すべてのワークフロー(読み取り専用)',+ 'flows.nodeConfig.memory.queryLabel': 'クエリ',+ 'flows.nodeConfig.memory.queryOptionalHint': '任意: 人物検索の範囲を絞り込みます。',+ 'flows.nodeConfig.memory.flavourLabel': 'フレーバー',+ 'flows.nodeConfig.memory.flavourHint': '読み取るペルソナ側面。例: コミュニケーション',+ 'flows.nodeConfig.memory.flavour_communication': 'コミュニケーション',+ 'flows.nodeConfig.memory.flavour_coding_style': 'コーディングスタイル',+ 'flows.nodeConfig.memory.flavour_stack': 'スタック',+ 'flows.nodeConfig.memory.flavour_workflow': 'ワークフロー',+ 'flows.nodeConfig.memory.flavour_environment': '環境',+ 'flows.nodeConfig.memory.flavour_directives': '指示',+ 'flows.nodeConfig.memory.flavour_anti_preferences': '非好み',+ 'flows.nodeConfig.memory.keyLabel': 'キー',+ 'flows.nodeConfig.memory.valueLabel': '値',+ 'flows.nodeConfig.memory.limitLabel': '上限',+ 'flows.nodeConfig.memory.limitHint': '結果の最大数。',+ 'flows.nodeConfig.memory.minScoreLabel': '最小スコア',+ 'flows.nodeConfig.memory.minScoreHint': '0 から 1 の関連性しきい値。',+ // `dedup` node (issue #5263): skips items already seen by a stable per-item key.+ 'flows.nodeConfig.dedup.keyLabel': 'キー',+ 'flows.nodeConfig.dedup.keyHint':+ '項目ごとの安定した ID 式。例: =item.id。既にキーが確認されている項目はスキップされます。',++ // `loop` node: a bounded loop head. Emits on `body` until its cap or+ // condition says stop, then on `done`.+ 'flows.nodeConfig.loop.maxIterationsLabel': '最大反復回数',+ 'flows.nodeConfig.loop.maxIterationsHint':+ 'ループが停止する前に本体が実行される回数。常に有限です。',+ 'flows.nodeConfig.loop.onExceededLabel': '上限に達した場合',+ 'flows.nodeConfig.loop.onExceededHint':+ '実行を失敗させるか、ループを停止して最後のパスのアイテムで完了ポートから続行します。',+ 'flows.nodeConfig.loop.onExceeded_error': '実行を失敗させる',+ 'flows.nodeConfig.loop.onExceeded_continue': '部分結果で続行',+ 'flows.nodeConfig.loop.conditionLabel': '継続条件',+ 'flows.nodeConfig.loop.conditionHint':+ '任意。この条件が真の場合にループを継続し、最初に偽となった時点で完了ポートから終了します。',++ // Phase 4a "New workflow" chooser + Phase 4c templates gallery. The chooser+ // offers scratch / template / describe; the gallery lists the curated+ // `WorkflowGraph` templates bundled under `lib/flows/templates/`.+ // ── Save+enable pre-authorization card (consolidated Approve all / Deny)+ 'flows.enableApproval.title': 'このワークフローの動作を許可しますか?',+ 'flows.enableApproval.intro':+ 'このワークフローは以下のアクションについてあなたの許可が必要です。承認はこのワークフローのみに適用されます。',+ 'flows.enableApproval.approveAll': 'すべて承認',+ 'flows.enableApproval.deny': '拒否',+ 'flows.enableApproval.enableAnyway': 'とにかく有効化',+ 'flows.enableApproval.granting': '承認中…',+ 'flows.enableApproval.error': '承認を保存できませんでした。もう一度お試しください。',+ 'flows.enableApproval.blockedHint': 'エージェントのアクセス設定によりブロックされています。',+ 'flows.enableApproval.dynamicHint':+ 'ワークフローの実行中に選択されます。必要に応じて確認を求められます。',+ 'flows.enableApproval.agentHint':+ 'このAIステップは、独自のアクションについて個別に確認を求める場合があります。',+ 'flows.enableApproval.deniedDisabled': '保存されましたが、ワークフローは無効のままです。',+ 'flows.chooser.title': 'ワークフローを作成',+ 'flows.chooser.subtitle': '開始方法を選択してください。',+ 'flows.chooser.scratchTitle': 'ゼロから開始',+ 'flows.chooser.scratchDescription': '空のキャンバスと単一の手動トリガーで開始します。',+ 'flows.chooser.templateTitle': 'テンプレートから作成',+ 'flows.chooser.templateDescription': '既製の例から開始し、カスタマイズします。',+ 'flows.chooser.creating': 'ワークフローを作成中…',+ 'flows.chooser.createError': 'ワークフローを作成できませんでした。もう一度お試しください。',+ 'flows.templates.title': 'テンプレートから開始',+ 'flows.templates.subtitle': '開始点を選択し、エディターでカスタマイズしてください。',+ 'flows.templates.use': 'テンプレートを使用',+ 'flows.templates.back': '戻る',+ 'flows.templates.empty': '利用可能なテンプレートがありません。',+ 'flows.templates.category.scheduled': 'スケジュール',+ 'flows.templates.category.triggered': 'トリガー',+ 'flows.templates.category.onDemand': 'オンデマンド',+ 'flows.templates.daily-digest.name': 'チャンネルへのデイリーダイジェスト',+ 'flows.templates.daily-digest.description':+ 'スケジュールに従い、エージェントが短い要約を作成してチャンネルに投稿します。',+ 'flows.templates.scheduled-scrape.name': 'メモリーへのスケジュールスクレイプ',+ 'flows.templates.scheduled-scrape.description':+ 'スケジュールに従ってソースを取得し、結果を整形してメモリーに保存します。',+ 'flows.templates.webhook-triage.name': 'Webhookトリアージと通知',+ 'flows.templates.webhook-triage.description':+ '受信したWebhookをエージェントがトリアージし、通知を送信します。',+ 'flows.templates.app-event-route.name': 'アプリイベントから条件付きアクションへ',+ 'flows.templates.app-event-route.description':+ '接続済みアプリのイベントでチェックを実行し、条件に一致した場合にアクションを実行します。',+ 'flows.templates.http-fetch-parse.name': 'APIの取得と解析',+ 'flows.templates.http-fetch-parse.description':+ 'HTTPエンドポイントをオンデマンドで呼び出し、レスポンスを扱いやすい形式に解析します。',+ 'flows.templates.ask-agent.name': 'エージェントに依頼',+ 'flows.templates.ask-agent.description':+ 'エージェントにタスクを引き渡すシンプルな手動トリガーです。',+ 'flows.templates.opus-sonnet-brief.name': 'リサーチブリーフ(Opusが計画、Sonnetが下書き)',+ 'flows.templates.opus-sonnet-brief.description':+ '推論用エージェントがブリーフを計画し、チャット用エージェントが下書きを作成、その後結果を整形します。',++ 'oauth.button.connecting': '接続中...',+ 'oauth.button.loopbackTimeout':+ 'サインインがタイムアウトしました:ブラウザでのOAuthリダイレクトが完了しませんでした。もう一度お試しください。',+ 'onboarding.contextGathering.buildingDesc': '接続済みアカウントからコンテキストを取得しています…',+ 'onboarding.contextGathering.buildingProfile': 'プロフィールを作成しています...',+ 'onboarding.contextGathering.continueToChat': 'チャットへ進む',+ 'onboarding.contextGathering.coreAlive':+ 'コアに到達可能:初回起動には1分ほどかかる場合があります。',+ 'onboarding.contextGathering.coreAliveProbing': 'コア接続を確認しています…',+ 'onboarding.contextGathering.coreUnreachable':+ 'コアが応答していません。続行して後で再試行できます。',+ 'onboarding.contextGathering.errorDesc':+ 'チャットは準備完了です。完全なプロフィールはバックグラウンドで構築を続けるため、今すぐ続行し、随時調整できます。',+ 'onboarding.contextGathering.stillWorkingDesc':+ '初回起動では、ローカルモデルとツールのウォームアップに30〜60秒かかる場合があります。いつでもチャットへ進めます:プロフィール構築はバックグラウンドで継続されます。',+ 'onboarding.contextGathering.stillWorkingTitle': 'プロフィールの構築を継続しています…',+ 'onboarding.contextGathering.title': 'コンテキスト収集',+ 'openhuman.team_list_teams': 'チーム一覧',+ 'overlay.ariaAttention': '注意メッセージ',+ 'overlay.ariaOrb': 'OpenHumanオーバーレイ',+ 'overlay.ariaVoiceActive': '音声入力がアクティブです',+ 'overlay.orbTitle': 'ドラッグで移動 · ダブルクリックで位置をリセット',+ 'pages.settings.account.migration': 'インポート',+ 'pages.settings.account.migrationDesc':+ '他のローカルアシスタントからメモリーとノートを引き継ぎます',+ 'pages.settings.account.privacy': 'プライバシー',+ 'pages.settings.account.privacyDesc': 'コンピュータから送信されるデータを制御します',+ 'pages.settings.account.recoveryPhrase': 'リカバリーフレーズ',+ 'pages.settings.account.recoveryPhraseDesc':+ 'アカウントのリカバリーフレーズを表示・バックアップします',+ 'pages.settings.accountSection.description': 'このデバイス上のプロフィール、プラン、セッション。',+ 'pages.settings.accountSection.title': 'アカウント',+ 'pages.settings.ai.llm': 'LLM',+ 'pages.settings.ai.llmDesc': '言語モデルプロバイダーとルーティング',+ 'pages.settings.ai.voice': '音声',+ 'pages.settings.ai.voiceDesc': '音声認識および音声合成の設定',+ 'settings.developerMenu.composio.desc':+ 'ルーティングモード、統合トリガー、トリガー履歴アーカイブ。',+ 'pages.settings.features.tools': 'ツール',+ 'pages.settings.features.toolsDesc':+ 'アシスタントが使用できる組み込みツール(シェル、ファイル、Web、ビジョン、メモリー、スケジュール)を選択します。',+ 'privacy.whatLeaves.link.label': '私のコンピュータから何が送信されますか?',+ 'rewards.community.discordDetails': 'Discord',+ 'rewards.community.rewardTokens': '+{tokens} トークン',+ 'settings.ai.addCloudProvider': 'クラウドプロバイダーを追加',+ 'settings.ai.addProvider': 'プロバイダーを追加',+ 'settings.ai.apiKeyFieldLabel': 'APIキー',+ 'settings.ai.apiKeyRequired': '続行するにはAPIキーを貼り付けてください。',+ 'settings.ai.apiKeyStoredEncrypted': 'APIキーはこのデバイス上で暗号化されて保存されます。',+ 'settings.ai.apiKeysEncrypted': 'auth-profiles.json',+ 'settings.ai.clearStoredKey': '保存されたキーをクリア',+ 'settings.ai.connectProvider': '接続',+ 'settings.ai.customRouting': 'カスタムルーティング',+ 'settings.ai.discard': '破棄',+ 'settings.ai.editProvider': '{label} を編集',+ 'settings.ai.llmProviders': 'LLMプロバイダー',+ 'settings.ai.providers.groupCloud': 'クラウド',+ 'settings.ai.providers.groupLocal': 'ローカルランタイム',+ 'settings.ai.providers.groupCli': 'CLIログイン',+ 'settings.ai.providers.cliDetail': '他のCLIが既に保持しているログイン情報を使用します',+ 'settings.ai.providers.connected': '接続済み',+ 'settings.ai.providers.managedDetail': 'OpenHumanがタスクごとにモデルを選択します',+ 'settings.ai.providers.rowActions': '{provider} のその他のアクション',+ 'settings.ai.providers.replaceKey': 'APIキーを置き換える',+ 'settings.ai.providers.custom': 'カスタム',+ 'settings.ai.providers.addProvider': 'プロバイダーを追加',+ 'settings.ai.providers.addProviderSubtitle':+ '接続するプロバイダーを選択してください。いつでも追加できます。',+ 'settings.ai.providers.placeholderCloud': 'クラウドプロバイダーを選択…',+ 'settings.ai.providers.placeholderLocal': 'ローカルランタイムを選択…',+ 'settings.ai.providers.placeholderCli': 'CLIログインを選択…',+ 'settings.ai.providers.helperCloud': 'ホスト型モデル。APIキーを提供してください。',+ 'settings.ai.providers.helperLocal':+ 'このマシンで実行されるモデル。エンドポイントを提供してください。',+ 'settings.ai.providers.helperCli':+ '他のコマンドラインツールが既に保持しているログイン情報を再利用します。',+ 'settings.ai.providers.categoryAllConnected': 'すべて接続済み',+ 'settings.ai.providers.addCustomAction': 'カスタムプロバイダーを追加',+ 'settings.ai.providers.customDetail': '独自のOpenAI互換エンドポイント',+ 'settings.ai.providers.groupConnected': '接続済み',+ 'settings.ai.providers.connectedDesc':+ 'マネージドはフォールバックとして常に有効です。ルーティングタブで各タスクに使用するプロバイダーを選択してください。',+ 'settings.ai.providers.catalogTitle': 'プロバイダーを追加',+ 'settings.ai.providers.localDetail': 'このマシンで実行',+ 'settings.ai.localOllama': 'ローカル (Ollama)',+ 'settings.ai.modelLabel': 'モデル',+ 'settings.ai.picker.title': 'プロバイダーとモデルを選択',+ 'settings.ai.picker.subtitle': '設定済みのプロバイダーと利用可能なモデルを検索します。',+ 'settings.ai.picker.useThisModel': 'このモデルを使用',+ 'settings.ai.picker.searchPlaceholder': 'モデルを検索',+ 'settings.ai.picker.providersLabel': 'プロバイダー',+ 'settings.ai.picker.modelIdPlaceholder': 'モデルIDを入力',+ 'settings.ai.picker.claudeCodeHint':+ 'Claude CodeのモデルエイリアスまたはモデルIDを使用してください。',+ 'settings.ai.noCustomProviders': 'カスタムプロバイダーはありません',+ 'settings.ai.providerLabel': 'プロバイダー',+ 'settings.ai.routing': 'ルーティング',+ // Claude Code CLI connect control + modal (ClaudeCodeStatusCard).+ 'settings.ai.claudeCode.button': 'Claude Code',+ 'settings.ai.claudeCode.inlineNotConnected':+ '未接続: ローカルのClaude Code CLI経由でチャットをルーティングします。',+ 'settings.ai.claudeCode.checkingSignIn': 'サインインを確認中…',+ 'settings.ai.claudeCode.inlineConnected': '接続済み。',+ 'settings.ai.claudeCode.signedInAs': 'サインイン済み:',+ 'settings.ai.claudeCode.subscriptionFallback': 'Claudeサブスクリプション',+ 'settings.ai.claudeCode.usingApiKeyEnv': 'ANTHROPIC_API_KEYを使用',+ 'settings.ai.claudeCode.cliNotInstalled': 'CLIがインストールされていません',+ 'settings.ai.claudeCode.signInUnknown': 'サインイン状態不明',+ 'settings.ai.claudeCode.connectedNotSignedIn': '接続済み · サインインしていません',+ 'settings.ai.claudeCode.modalTitle': 'Claude Code CLI',+ 'settings.ai.claudeCode.modalDescription':+ 'ローカルにインストールされたClaude Code CLI経由で、チャット、エージェント処理、推論ワークロードをルーティングします。APIキーは不要で、CLI自身のログイン情報を使用します。',+ 'settings.ai.claudeCode.connection': '接続',+ 'settings.ai.claudeCode.enabled': '有効',+ 'settings.ai.claudeCode.notEnabled': '無効',+ 'settings.ai.claudeCode.disconnect': '切断',+ 'settings.ai.claudeCode.disconnecting': '切断中…',+ 'settings.ai.claudeCode.enable': 'Claude Codeを有効にする',+ 'settings.ai.claudeCode.enabling': '有効化中…',+ 'settings.ai.claudeCode.authentication': '認証',+ 'settings.ai.claudeCode.recheck': '再確認',+ 'settings.ai.claudeCode.checking': '確認中…',+ 'settings.ai.claudeCode.openingTerminal': 'ターミナルを開いています…',+ 'settings.ai.claudeCode.signIn': 'Claudeでサインイン',+ 'settings.ai.claudeCode.reconnect': '再接続',+ 'settings.ai.claudeCode.loginHint':+ 'ターミナルを開いて claude auth login --claudeai を実行します。完了後、[再確認]をクリックしてください。',+ 'settings.ai.claudeCode.loginError':+ 'ログイン用ターミナルを開けませんでした。もう一度お試しください。',+ 'settings.ai.claudeCode.fullAccess': 'フルアクセス',+ 'settings.ai.claudeCode.fullAccessOn':+ 'Claude Codeはコマンドの実行、ネットワークの使用、サブエージェントの起動が可能です。',+ 'settings.ai.claudeCode.fullAccessOff':+ '編集のみ承認:ファイル編集は自動適用、コマンドとネットワークは承認制。',+ 'settings.ai.claudeCode.sandboxNoteMac':+ 'macOSでは、どちらのモードでも ~/.openhuman はサンドボックスで保護されます。',+ 'settings.ai.claudeCode.sandboxNoteOther':+ 'このプラットフォームではフルアクセスは制限なしです:ワークスペースを信頼できる場合のみ有効にしてください。',+ 'settings.ai.claudeCode.enableToCheck':+ 'サインインを確認するには Claude Code を有効にしてください。',+ 'settings.ai.claudeCode.usingApiKeyEnvDetail': '環境変数 ANTHROPIC_API_KEY を使用しています。',+ 'settings.ai.claudeCode.notFoundInstall':+ 'Claude Code CLI が見つかりません。次を実行してインストールしてください:npm install -g @anthropic-ai/claude-code',+ 'settings.ai.claudeCode.unknownDetail':+ 'サインイン状態を特定できませんでした。claude CLI が認証ステータスに対応していない可能性があります。再接続してから再確認してください。',+ 'settings.ai.claudeCode.notSignedIn': 'サインインしていません。',+ 'settings.ai.saveChanges': '変更を保存',+ 'settings.ai.saving': '保存中…',+ 'settings.ai.unsavedChange': '未保存の変更',+ 'settings.ai.unsavedChanges': '未保存の変更',+ 'settings.ai.disconnectProvider': '{label} を切断',+ 'settings.ai.connectProviderLabel': '{label} を接続',+ 'settings.ai.defaultLocalEndpoint': 'http://localhost:11434/v1',+ 'settings.ai.editEndpoint': 'エンドポイントを編集',+ 'settings.ai.endpointUrlLabel': 'エンドポイント URL',+ 'settings.ai.localRuntimeHelper':+ '{label} に到達可能な場所です。デフォルトは localhost です。共有インスタンスを使用するには、リモートホスト(例:http://10.0.0.4:11434/v1)を指定してください。',+ 'settings.ai.endpointUrlRequired': 'エンドポイント URL は必須です。',+ 'settings.ai.endpointProtocolRequired':+ 'エンドポイントは http:// または https:// で始まる必要があります。',+ 'settings.ai.getProviderApiKey': 'APIキーを取得',+ 'settings.ai.or': 'または',+ 'settings.ai.codexOauthMissingAuthUrl':+ 'Codex OAuth で認証 URL が返されませんでした。もう一度サインインしてください。',+ 'settings.ai.codexOauthMissingCallbackUrl':+ 'サインイン後、ブラウザからリダイレクト URL を貼り付けてください。',+ 'settings.ai.openRouterOauthDescription':+ 'OpenRouter でサインインし、PKCE を使用してユーザー管理の APIキーをインポートします。',+ 'settings.ai.connecting': '接続中...',+ 'settings.ai.openaiOauthTitle': 'ChatGPT でサインイン',+ 'settings.ai.openaiOauthDescription':+ 'ChatGPT アカウントでサインインして、APIキーなしで OpenAI モデルを使用します。',+ 'settings.ai.openaiOauthConnect': 'ChatGPT でサインイン',+ 'settings.ai.openaiOauthConnected': 'ChatGPT に接続済み',+ 'settings.ai.openaiOauthOpening': 'サインインを開いています…',+ 'settings.ai.openaiOauthCallbackHint':+ 'サインイン後、ブラウザから完全なリダイレクト URL を貼り付けてください(http://127.0.0.1:1455/ で始まります)。',+ 'settings.ai.openaiOauthCallbackPlaceholder':+ 'http://127.0.0.1:1455/auth/callback?code=...&state=...',+ 'settings.ai.openaiOauthFinish': 'ChatGPT サインインを完了',+ 'settings.ai.openaiOauthDisconnect': 'ChatGPT を切断',+ 'settings.ai.openaiOauthStartError':+ 'ChatGPT サインインを開始できませんでした。もう一度試すか、APIキーを使用してください。',+ 'settings.ai.openaiOauthCompleteError':+ 'ChatGPT サインインが完了しませんでした。リダイレクト URL を確認して再試行してください。',+ 'settings.ai.openaiOauthCallbackRequired':+ 'サインイン後、ブラウザからリダイレクト URL を貼り付けてください。',+ 'settings.ai.openaiOauthDisconnectError':+ 'ChatGPT を切断できませんでした。もう一度お試しください。',+ 'settings.ai.codexAuthButton': 'Codex を接続',+ 'settings.ai.backgroundLoops': 'バックグラウンドループ',+ 'settings.ai.backgroundLoopsDesc':+ 'チャットメッセージなしで実行される処理を確認し、最近のクレジット台帳行を検査します。',+ 'settings.ai.loopMap': 'ループマップ',+ 'settings.ai.routeLabel': 'ルート: {route}',+ 'settings.ai.on': 'オン',+ 'settings.ai.off': 'オフ',+ 'settings.ai.loops.composioSync.name': 'Composio同期',+ 'settings.ai.loops.cadence.twentyMin': '20分',+ 'settings.ai.loops.composioSync.route': '統合API',+ 'settings.ai.loops.composioSync.work':+ 'プロバイダー同期の期限が来ている場合、接続済みツールをポーリングします。',+ 'settings.ai.loops.composioSync.risk':+ '週に {count} 回起動します。{active} 個のアクティブな接続をスキャンします。',+ 'settings.ai.recentUsageLedger': '最近の使用状況台帳',+ 'settings.ai.recentUsageLedgerDesc':+ 'バックエンドの行には本日のアクション/時刻が表示されます。ソースタグにはバックエンドのサポートが必要です。',+ 'settings.ai.latestSpend': '最新の消費: {time} ({action}) で {amount}',+ 'settings.ai.topActions': '上位アクション',+ 'settings.ai.noSpendRows': '消費データが読み込まれていません。',+ 'settings.ai.topHours': '上位時間帯',+ 'settings.ai.noHourlySpend': '時間別の消費データはまだありません。',+ 'settings.ai.openhumanDefault': 'OpenHuman (デフォルト)',+ 'settings.ai.localModelResolved': 'Ollama · {model}',+ 'settings.ai.loadingModels': 'モデルを読み込み中...',+ 'settings.ai.enterModelIdManually': 'またはモデルIDを手動で入力:',+ 'settings.ai.selectModel': 'モデルを選択...',+ 'settings.ai.deploymentNameLabel': 'デプロイメント名',+ 'settings.ai.deploymentNamePlaceholder': 'my-gpt-deployment',+ 'settings.ai.deploymentNameHelp':+ 'Azure AI Foundryで設定したデプロイメント名を入力してください。これはモデルIDではありません。',+ 'settings.ai.deploymentNameLegacyHint':+ 'これはプロバイダーカタログのベースモデルIDと一致します。Azureはデプロイメント名でルーティングするため、これがデプロイメントに付けた名前であることを確認してください。',+ 'settings.ai.deploymentNameProviderHint':+ 'Azureエンドポイントを検出しました。このプロバイダーを選択後、モデルフィールドにデプロイメント名を設定してください。',+ 'settings.ai.chooseModelFromList': 'リストから選択',+ 'settings.ai.enterModelIdManuallyAction': 'モデルIDを手動で入力',+ 'settings.ai.enterDeploymentNameManuallyAction': 'デプロイメント名を手動で入力',+ 'settings.ai.probeFailedHint':+ 'このプロバイダーのモデルリストを読み取れませんでした。このリストはドロップダウンを埋めるためだけのものなので、プロバイダーを追加し、モデル名またはデプロイメント名を手動で入力することは可能です。',+ 'settings.ai.probeFailedAddAnyway': '検証せずに追加',+ 'settings.ai.azureV1EndpointHint':+ 'Azureではv1ベースURLを使用してください: https://YOUR-RESOURCE.openai.azure.com/openai/v1。古いリソースURLではモデル一覧が提供されず、異なる認証ヘッダーが必要です。',+ 'settings.ai.temperatureOverride': '温度のオーバーライド',+ 'settings.ai.temperatureOverrideSlider': '温度のオーバーライド(スライダー)',+ 'settings.ai.temperatureOverrideValue': '温度のオーバーライド(値)',+ 'settings.ai.temperatureOverrideDesc':+ '低いほど決定論的になります。チェックを外すとプロバイダーのデフォルト値が使用されます。',+ 'settings.ai.modelVision': 'ビジョン対応(画像入力)',+ 'settings.ai.modelVisionDesc':+ 'このモデルが画像を受け付ける場合に有効にします。有効にすると、このモデルを選択した際にチャット入力欄で画像を添付できます。',+ 'settings.ai.testFailed': 'テスト失敗',+ 'settings.ai.providerTest.authRejected':+ "キーは保存されましたが、'{slug}' に拒否されました。キー全体を貼り付けたか、プロバイダーのダッシュボードで有効な状態かを確認してください。",+ 'settings.ai.providerTest.modelNotRecognized':+ "キーは保存され承認されましたが、'{slug}' は選択されたモデルを認識しません。このプロバイダーが実際に提供するモデルIDを選択してください(デフォルトモデルはプロバイダーエントリで設定されています)。",+ 'settings.ai.providerTest.quotaOrBilling':+ "キーは保存され承認されましたが、'{slug}' はクォータまたは課金の理由でリクエストを拒否しました。プロバイダーでアカウント残高とレート制限を確認してください。",+ 'settings.ai.providerTest.endpointNotFound':+ "キーは保存されましたが、'{slug}' の設定済みエンドポイントが404を返しました。ベースURLを確認してください。OpenAI互換プロバイダーでは通常 '/v1' サフィックスが必要です(例: https://api.openai.com/v1)。",+ 'settings.ai.providerTest.timeout':+ "キーは保存されましたが、'{slug}' が時間内に応答しませんでした。エンドポイントURLとネットワークを確認し、再度テストしてください。",+ 'settings.ai.providerTest.emptyReply':+ "キーは保存されましたが、'{slug}' はテストプロンプトに対して空の応答を返しました。このプロバイダーに設定されたモデルIDを確認してください。",+ 'settings.ai.providerTest.unknown':+ "キーは保存されましたが、'{slug}' へのテスト呼び出しが失敗しました。プロバイダーのステータスページとエンドポイントURLを確認し、再度テストしてください。",+ 'settings.ai.testingModel': 'モデルをテスト中...',+ 'settings.ai.modelResponse': 'モデルの応答',+ 'settings.ai.providerWithValue': 'プロバイダー: {value}',+ 'settings.ai.noneDash': 'なし',+ 'settings.ai.promptHelloWorld': 'プロンプト: Hello world',+ 'settings.ai.startedAt': '開始: {value}',+ 'settings.ai.waitingForModelResponse': '選択したモデルからの応答を待機中...',+ 'settings.ai.response': '応答',+ 'settings.ai.testing': 'テスト中...',+ 'settings.ai.test': 'テスト',+ 'settings.ai.slugMissingError': 'スラッグを生成するにはプロバイダー名を入力してください。',+ 'settings.ai.slugInUseError': 'そのプロバイダー名はすでに使用されています。',+ 'settings.ai.slugReservedError': '別のプロバイダー名を選択してください。',+ 'settings.ai.providerNamePlaceholder': 'マイプロバイダー',+ 'settings.ai.slugLabel': 'スラッグ:',+ 'settings.ai.openAiUrlLabel': 'OpenAI URL',+ 'settings.ai.openAiUrlPlaceholder': 'https://api.openai.com/v1',+ 'settings.ai.keepExistingKeyPlaceholder': '既存のキーを保持するには空白のままにしてください',+ 'settings.ai.signInWithOpenRouter': 'OpenRouterでサインイン',+ 'settings.ai.weekBudget': '週間の予算',+ 'settings.ai.cycleRemaining': 'サイクルの残り',+ 'settings.ai.cycleTotalSpend': 'サイクルの総支出',+ 'settings.ai.avgSpendRow': '平均消費行数',+ 'settings.ai.backgroundApiReads': 'バックグラウンドAPI読み取り',+ 'settings.ai.backgroundWakeups': 'バックグラウンド起動',+ 'settings.ai.budgetMath': '予算計算',+ 'settings.ai.rowsLeft': '残り行数',+ 'settings.ai.rowsPerFullWeekBudget': '週予算あたりの行数',+ 'settings.ai.sampleBurnRate': '消費速度サンプル',+ 'settings.ai.projectedEmpty': '枯渇予測',+ 'settings.ai.apiReadsPerDollarRemaining': '残り金額あたりのAPI読み取り数',+ 'settings.ai.loopCallBudget': 'ループ呼び出し予算',+ 'settings.ai.composioSyncScans': 'Composio同期スキャン',+ 'settings.ai.totalBackgroundApiReadBudget': 'バックグラウンドAPI読み取り総予算',+ 'settings.ai.resetsAt': '{time} にリセット',+ 'settings.ai.usedAmount': '{amount} 使用済み',+ 'settings.ai.inferenceIntegrationsBreakdown': '推論 {inference} + 統合 {integrations}',+ 'settings.ai.recentSpendRowsCount': '最近の消費行 {count} 件',+ 'settings.ai.perWeek': '{count}/週',+ 'settings.ai.perHour': '{amount}/時間',+ 'settings.ai.connectionSyncBreakdown': '接続同期 {sync}',+ 'settings.ai.rowsLeftFormula': '残り / 平均行 = {remaining} / {avgRow}',+ 'settings.ai.needSpendRowsToEstimate': '推定には最近の消費行が必要です。',+ 'settings.ai.rowsPerBudgetFormula': 'サイクル予算 / 平均行 = {budget} / {avgRow}',+ 'settings.ai.burnRateSampleDetail': '{hours}時間のサンプルで {rows} 行/時間',+ 'settings.ai.needTimestampsForBurnRate':+ '推定には少なくとも2つの消費行のタイムスタンプが必要です。',+ 'settings.ai.projectedEmptyDetail': '最近の消費速度で、最終消費から {hours} 時間後',+ 'settings.ai.noProjectionWithoutSpend': '最近の時間別消費がないため、予測できません。',+ 'settings.ai.readsPerDollar': '{count} 読み取り/$',+ 'settings.ai.apiReadsFormula': '週次バックグラウンドAPI読み取り / 残り = {reads} / {remaining}',+ 'settings.ai.needUsageToEstimate': '推定には使用量レスポンスが必要です。',+ 'settings.ai.composioSyncScansDetail': 'アクティブな統合接続 {count} 件を20分ごとにスキャン',+ 'settings.ai.totalApiReadBudgetDetail':+ 'カレンダープランナーの読み取り + 定期的な統合スキャン(ユーザーが開始したチャットツールは除外)',+ 'settings.ai.routing.managed': 'マネージド',+ 'settings.ai.managedSourceLabel': 'OpenRouter',+ 'settings.ai.managedSourceDetail': 'TinyHumansが管理',+ 'settings.ai.routing.managedAlwaysOn': '常時有効',+ 'settings.ai.routing.managedDesc':+ 'OpenHumanはすべての推論をクラウドで実行し、タスクに最適なモデルを選択、コストを最適化し、最も安全なルーティングデフォルトを維持します。',+ 'settings.ai.routing.managedMsg':+ 'OpenHuman がすべてのワークロードの推論を処理し、コスト、品質、セキュリティに基づいて最適なルートを自動的に選択します。',+ 'settings.ai.routing.useYourOwn': '独自モデルを使用',+ 'settings.ai.routing.useYourOwnDesc':+ '1つのプロバイダーとモデルを選択し、すべてのワークロードをそこにルーティングします。シンプルですが、軽量および重量級の推論が同じルートを共有するため、非効率になる場合があります。',+ 'settings.ai.routing.advanced': '高度',+ 'settings.ai.routing.advancedDesc':+ 'タスクごとに異なるモデルを選択します。コスト最適化と制御の観点から最も優れたオプションです。',+ 'settings.ai.routing.customDesc':+ '細粒度のルーティングにより、最高のコスト最適化と最大の制御が可能になります。以下の行を使用して、どのワークロードを「マネージド」のままにするか、共有デフォルトを使用するか、特定のモデルに固定するかを決定してください。',+ 'settings.ai.routing.defaultModel': 'デフォルトモデル',+ 'settings.ai.routing.defaultModelDesc':+ 'マネージドチャットターンが実行されるモデルです。以下のワークロードで「マネージド」のまま使用されます。',+ 'settings.ai.routing.defaultModelUnset': '未設定',+ 'settings.ai.routing.chatAndConversations': 'チャットと会話',+ 'settings.ai.routing.columnTask': 'タスク',+ 'settings.ai.routing.columnRoute': '実行先',+ 'settings.ai.routing.selectProvider': 'プロバイダーとモデルを選択',+ 'settings.ai.routing.chooseModel': 'モデルを選択',+ 'settings.ai.routing.chatDesc':+ 'ユーザーとの直接対話、返信、推論、エージェントループ、コーディング支援中に使用されるモデル。',+ 'settings.ai.routing.backgroundTasks': 'バックグラウンドタスク',+ 'settings.ai.routing.bgTasksDesc': 'メインの会話フロー外で、要約に使用されるモデル。',+ 'settings.ai.routing.workload.chat.label': 'チャット',+ 'settings.ai.routing.workload.chat.description':+ '直接的な会話のやり取り:会話の「クイック」モード',+ 'settings.ai.routing.workload.chat.hint':+ '推奨:高速なトークン生成と低遅延を備えた安価または中程度のチャットモデル。応答性が良い場合、オープンソースのローカルモデルも適しています。',+ 'settings.ai.routing.workload.reasoning.label': '推論',+ 'settings.ai.routing.workload.reasoning.description':+ 'メインチャットエージェント、会議要約:会話の「推論」モード',+ 'settings.ai.routing.workload.reasoning.hint':+ '推奨:深い思考向けのより高価なフロンティアモデルまたは強力な推論モデル。メインチャットエージェント、会議要約、より重い回答の統合に使用されます。',+ 'settings.ai.routing.workload.agentic.label': 'エージェント',+ 'settings.ai.routing.workload.agentic.description':+ 'サブエージェントランナー、ツールループ、GIF 決定',+ 'settings.ai.routing.workload.agentic.hint':+ '推奨:強力なツール使用能力を持つ信頼性の高い指示追従モデル。中程度のフロンティアモデルが最も安全です。ツール呼び出しが安定していれば、高性能なオープンソースモデルも機能します。',+ 'settings.ai.routing.workload.coding.label': 'コーディング',+ 'settings.ai.routing.workload.coding.description': 'コード生成とリファクタリングパス',+ 'settings.ai.routing.workload.coding.hint':+ '推奨:強力な指示追従、編集品質、長いコンテキスト性能を備えたコーディング特化モデル。通常、ここにはより多くのコストをかける価値があります。',+ 'settings.ai.routing.workload.vision.label': 'ビジョン',+ 'settings.ai.routing.workload.vision.description':+ 'ビジョンサブエージェントによる画像理解:常にマルチモーダル',+ 'settings.ai.routing.workload.vision.hint':+ '推奨:画像入力を受け入れるマルチモーダルモデル。マネージドデフォルト(vision-v1)は画像対応です。ここにルーティングされるプロバイダーは常にビジョン対応として扱われます。',+ 'settings.ai.routing.workload.memory.label': 'メモリーの要約',+ 'settings.ai.routing.workload.memory.description': '会話とドキュメントの要約',+ 'settings.ai.routing.workload.memory.hint':+ '推奨:安価な要約モデル。一貫性がありコンパクトである必要がありますが、プレミアムなフロンティアレベルの推論は不要です。',+ 'settings.ai.routing.addCustomProvider': 'カスタムプロバイダーを追加',+ 'settings.billing.autoRecharge.addAmount': 'この金額を追加',+ 'settings.billing.autoRecharge.addCard': 'カードを追加',+ 'settings.billing.autoRecharge.amountHint': 'デフォルトの支払い方法に請求されます。',+ 'settings.billing.autoRecharge.defaultCard': 'デフォルトカード',+ 'settings.billing.autoRecharge.lastRechargeFailed': '前回のチャージが失敗しました',+ 'settings.billing.autoRecharge.expires': '有効期限: {date}',+ 'settings.billing.autoRecharge.noCards': 'カードがありません',+ 'settings.billing.autoRecharge.paymentMethods': '支払い方法',+ 'settings.billing.autoRecharge.rechargeInProgress': 'チャージ処理中',+ 'settings.billing.autoRecharge.spentThisWeek': '今週の使用量: ${limit}中 ${spent}',+ 'settings.billing.autoRecharge.rechargeWhen': '残高が以下を下回ったときにチャージ',+ 'settings.billing.autoRecharge.saveSettings': '設定を保存',+ 'settings.billing.autoRecharge.saving': '保存中…',+ 'settings.billing.autoRecharge.setDefault': 'デフォルトに設定',+ 'settings.billing.autoRecharge.subtitle':+ '残高が少なくなったときに自動的にクレジットをチャージします。',+ 'settings.billing.autoRecharge.title': '自動チャージを有効にする',+ 'settings.billing.autoRecharge.toggleAriaLabel': '自動チャージの切り替え',+ 'settings.billing.autoRecharge.weeklyLimit': '週間の支出上限',+ 'settings.billing.inferenceBudget.dailySpendPoint': '{date}: {amount}',+ 'settings.billing.subscription.annual': '年間',+ 'settings.billing.subscription.billedAnnually': '年間請求',+ 'settings.billing.subscription.chooseSubtitle':+ 'より多くの使用量と機能を解放するためにアップグレードしてください。',+ 'settings.billing.subscription.chooseTitle': 'プランを選択',+ 'settings.billing.subscription.cryptoDesc': '決済ゲートウェイ経由で暗号通貨で支払います。',+ 'settings.billing.subscription.cryptoQuestion': '暗号通貨で支払いますか?',+ 'settings.billing.subscription.current': '現在',+ 'settings.billing.subscription.currentPlan': '現在のプラン',+ 'settings.billing.subscription.monthly': '月額',+ 'settings.billing.subscription.paymentConfirmed': '支払い確認済み',+ 'settings.billing.subscription.perMonth': '月額',+ 'settings.billing.subscription.popular': '人気',+ 'settings.billing.subscription.save': '{pct}',+ 'settings.billing.subscription.upgrade': 'アップグレード',+ 'settings.billing.subscription.waiting': '待機中',+ 'settings.billing.subscription.waitingPayment': '支払い待ち',+ 'settings.composio.apiKeyDesc': 'Composio APIキーがこのデバイスに保存されています。',+ 'settings.composio.apiKeyExamplePlaceholder': 'ck_live_xxxxxxxxxxxxxxxx',+ 'settings.composio.apiKeyLabel': 'Composio APIキー',+ 'settings.composio.apiKeyStored': 'APIキー保存済み',+ 'settings.composio.apiKeyStoredPlaceholder': '••••••••••••••••',+ 'settings.composio.clearedToBackend': 'バックエンドモードに切り替えました',+ 'settings.composio.confirmItem1': 'app.composio.dev のアカウントと API キー',+ 'settings.composio.confirmItem2':+ '個人の Composio アカウントを通じて各統合を再リンクする必要があります',+ 'settings.composio.confirmItem3':+ '注意: Composio トリガー (リアルタイム Webhook) は 直接接続モードではまだ動作しません。同期ツール呼び出しのみがサポートされています',+ 'settings.composio.confirmNeedItems': '必要なもの:',+ 'settings.composio.confirmSwitch': '理解しました。直接接続に切り替えます',+ 'settings.composio.confirmTitle': '⚠️ 直接接続モードへの切り替え',+ 'settings.composio.confirmWarning':+ '既存の統合 (OpenHuman 経由でリンクされた Gmail、Slack、GitHub など) は表示されません。これらは OpenHuman が管理する Composio テナントに存在します。',+ 'settings.composio.intro':+ 'Composio は 250 以上の外部アプリを、エージェントが呼び出せるツールとして統合します。これらのツール呼び出しのルーティング方法を選択してください。',+ 'settings.composio.directOnlyDesc':+ 'この環境ではComposioのマネージド認証を利用できません。独自のComposio APIキーを入力するか、設定を後回しにしてください。',+ 'settings.composio.modeDirect': '直接接続(独自のAPIキーを使用)',+ 'settings.composio.modeDirectDesc':+ '呼び出しは backend.composio.dev に直接送信されます。自分の環境で管理でき、オフラインにも対応します。ツール実行は同期的に動作しますが、リアルトリガーの Webhook は 直接接続モードではまだルーティングされません (今後の対応)。',+ 'settings.composio.modeManaged': 'Managed (OpenHuman が処理)',+ 'settings.composio.modeManagedDesc':+ 'OpenHuman がバックエンド経由でツール呼び出しをプロキシします (推奨)。認証は仲介され、Composio API キーを貼り付ける必要はありません。Webhook は完全にルーティングされます。',+ 'settings.composio.routingMode': 'ルーティングモード',+ 'settings.composio.statusManaged': 'マネージド',+ 'settings.composio.statusDirect': '直接接続',+ 'settings.composio.statusNoKey': 'API キーなし',+ 'settings.composio.saveErrorNoKey':+ '保存に失敗しました。直接接続モードでは空でない API キーが必要です。',+ 'settings.composio.invalidApiKey': '無効な Composio API キーです。',+ 'settings.composio.saving': '保存中…',+ 'settings.composio.switching': '切り替え中…',+ 'settings.cron.jobs.columnJob': 'ジョブ',+ 'settings.cron.jobs.columnState': '状態',+ 'settings.cron.jobs.columnActions': 'アクション',+ 'settings.cron.jobs.searchPlaceholder': 'ジョブを検索…',+ 'settings.cron.jobs.createJob': '新しいスケジュールジョブ',+ 'settings.cron.jobs.custom': 'カスタム',+ 'settings.cron.jobs.edit': '編集',+ 'settings.cron.jobs.editJob': 'スケジュールジョブを編集',+ 'settings.cron.jobs.empty': 'コア cron ジョブが見つかりません。',+ 'settings.cron.jobs.errorCreate': 'cron ジョブの作成に失敗しました: {message}',+ 'settings.cron.jobs.errorLoadList': 'コア cron ジョブの読み込みに失敗しました: {message}',+ 'settings.cron.jobs.errorLoadRuns': '実行履歴の読み込みに失敗しました: {message}',+ 'settings.cron.jobs.errorRemove': 'コア cron ジョブの削除に失敗しました: {message}',+ 'settings.cron.jobs.errorRun': 'コア cron ジョブの実行に失敗しました: {message}',+ 'settings.cron.jobs.errorToggle': 'コア cron ジョブの更新に失敗しました: {message}',+ 'settings.cron.jobs.errorUpdate': 'cron ジョブの更新に失敗しました: {message}',+ 'settings.cron.jobs.formAtLabel': '実行時刻',+ 'settings.cron.jobs.formCancel': 'キャンセル',+ 'settings.cron.jobs.formCommand': 'シェルコマンド',+ 'settings.cron.jobs.formCommandPlaceholder': '例: curl https://example.com/health',+ 'settings.cron.jobs.formCreate': '作成',+ 'settings.cron.jobs.formCronCustom': 'カスタム式',+ 'settings.cron.jobs.formCronCustomPlaceholder': '例: */30 * * * *',+ 'settings.cron.jobs.formCronPreset': 'プリセット',+ 'settings.cron.jobs.formCronPreview': '実行: {preview}',+ 'settings.cron.jobs.formDelivery': '配信モード',+ 'settings.cron.jobs.formDeliveryNone': 'なし (出力のみ)',+ 'settings.cron.jobs.formDeliveryProactive': 'プッシュ通知 (プロアクティブ)',+ 'settings.cron.jobs.formDeleteAfterRun': '初回実行後に削除',+ 'settings.cron.jobs.formError': 'ジョブの保存に失敗しました',+ 'settings.cron.jobs.formEveryLabel': '間隔 (ミリ秒)',+ 'settings.cron.jobs.formEveryPlaceholder': '例: 3600000',+ 'settings.cron.jobs.formJobType': 'ジョブタイプ',+ 'settings.cron.jobs.formJobTypeAgent': 'エージェント (AI プロンプト)',+ 'settings.cron.jobs.formJobTypeShell': 'シェルコマンド',+ 'settings.cron.jobs.formName': 'ジョブ名',+ 'settings.cron.jobs.formNamePlaceholder': '例: daily-report, cleanup-task',+ 'settings.cron.jobs.formPrompt': 'エージェントプロンプト',+ 'settings.cron.jobs.formPromptPlaceholder': '各実行時にエージェントが実行すべき内容は?',+ 'settings.cron.jobs.formSave': '保存',+ 'settings.cron.jobs.formSaving': '保存中…',+ 'settings.cron.jobs.formScheduleAt': '一回のみ (指定時刻に実行)',+ 'settings.cron.jobs.formScheduleCron': '繰り返し (cron)',+ 'settings.cron.jobs.formScheduleEvery': '間隔 (N ms ごと)',+ 'settings.cron.jobs.formScheduleType': 'スケジュールタイプ',+ 'settings.cron.jobs.formSessionIsolated': '分離 (推奨)',+ 'settings.cron.jobs.formSessionMain': 'メインセッション',+ 'settings.cron.jobs.formSessionTarget': 'セッションターゲット',+ 'settings.cron.jobs.lastStatus': '最終ステータス',+ 'settings.cron.jobs.loading': 'cron ジョブを読み込み中...',+ 'settings.cron.jobs.loadingRuns': '実行履歴を読み込み中…',+ 'settings.cron.jobs.nextRun': '次回実行',+ 'settings.cron.jobs.pause': '一時停止',+ 'settings.cron.jobs.paused': '一時停止中',+ 'settings.cron.jobs.recentRuns': '最近の実行',+ 'settings.cron.jobs.removing': '削除中…',+ 'settings.cron.jobs.resume': '再開',+ 'settings.cron.jobs.runFinishedAt': '{time} に {status}',+ 'settings.cron.jobs.runningNow': '実行中…',+ 'settings.cron.jobs.runNow': '今すぐ実行',+ 'settings.cron.jobs.saving': '保存中…',+ 'settings.cron.jobs.schedule': 'スケジュール',+ 'settings.cron.jobs.scheduleAt': '{time} に実行',+ 'settings.cron.jobs.scheduleEvery': '{ms}ms ごとに実行',+ 'settings.cron.jobs.viewRuns': '実行履歴を表示',+ 'settings.cron.schedule.every2hours': '2時間ごと',+ 'settings.cron.schedule.every30min': '30分ごと',+ 'settings.cron.schedule.every6hours': '6時間ごと',+ 'settings.cron.schedule.everyHour': '1時間ごと',+ 'settings.cron.schedule.onceDaily': '毎日1回 (午前9時)',+ 'settings.developerMenu.skillsRunner.title': 'スキルランナー',+ 'settings.developerMenu.skillsRunner.desc':+ '同梱スキルをアドホックに実行:入力項目を埋めてバックグラウンドで自律実行を開始',+ 'settings.developerMenu.skillsRunner.panelDesc':+ '同梱ワークフローを選択し、宣言された入力項目を埋めて、発火後放置型のバックグラウンド実行を開始します。cronで定期実行するジョブを設定する場合は、以下のスケジュールセクションを使用してください。',+ 'settings.skillsRunner.skill': 'スキル',+ 'settings.skillsRunner.selectSkill': 'スキルを選択…',+ 'settings.skillsRunner.loadingSkills': 'スキルを読み込み中…',+ 'settings.skillsRunner.loadingDescription': 'スキルの入力項目を読み込み中…',+ 'settings.skillsRunner.noInputs': 'このスキルには入力項目が宣言されていません。',+ 'settings.skillsRunner.placeholder.required': '必須',+ 'settings.skillsRunner.runNow': '今すぐ実行',+ 'settings.skillsRunner.starting': '開始中…',+ 'settings.skillsRunner.started': '開始しました:実行ID:',+ 'settings.skillsRunner.logPath': 'ログ:',+ 'settings.skillsRunner.error.describe': '入力項目の読み込みに失敗しました:',+ 'settings.skillsRunner.error.missingRequired': '必須の入力項目がありません:',+ 'settings.skillsRunner.error.run': '実行の開始に失敗しました:',+ 'settings.skillsRunner.error.preflightGate': 'プリフライトゲートが失敗しました',+ 'settings.skillsRunner.error.runtimeUnavailable': 'ランタイムが利用できません',+ 'settings.skillsRunner.error.runtimeUnavailableDefault': '利用不可',+ 'settings.skillsRunner.schedule.heading': 'スケジュール (定期実行)',+ 'settings.skillsRunner.schedule.frequency': '頻度',+ 'settings.skillsRunner.schedule.save': 'スケジュールを保存',+ 'settings.skillsRunner.schedule.saving': '保存中…',+ 'settings.skillsRunner.schedule.saved': 'スケジュールを保存しました。',+ 'settings.skillsRunner.schedule.error': 'スケジュールの保存に失敗しました:',+ 'settings.skillsRunner.schedule.loadingJobs': '既存のスケジュールを読み込み中…',+ 'settings.skillsRunner.schedule.noJobs': 'このスキルにはまだ保存されたスケジュールがありません。',+ 'settings.skillsRunner.schedule.existing': 'このスキルのスケジュール済みジョブ:',+ 'settings.skillsRunner.schedule.inputsLabel': '入力項目',+ 'settings.skillsRunner.schedule.inputsNone': '入力項目なし',+ 'settings.skillsRunner.schedule.runNow': '実行',+ 'settings.skillsRunner.schedule.remove': '削除',+ 'settings.skillsRunner.schedule.history': '履歴',+ 'settings.skillsRunner.schedule.historyLoading': '履歴を読み込み中…',+ 'settings.skillsRunner.schedule.historyEmpty': 'このスケジュールの実行履歴はまだありません。',+ 'settings.skillsRunner.schedule.historyNoOutput': '出力が記録されていません。',+ 'settings.skillsRunner.schedule.active': '有効',+ 'settings.skillsRunner.recentRuns.headingForSkill': 'このスキル recent runs',+ 'settings.skillsRunner.recentRuns.headingAll': 'すべてのスキル recent runs',+ 'settings.skillsRunner.recentRuns.refresh': '更新',+ 'settings.skillsRunner.recentRuns.loading': '最近の実行を読み込み中…',+ 'settings.skillsRunner.recentRuns.empty': '最近の実行はありません。',+ 'settings.skillsRunner.viewer.loading': 'ログを読み込み中…',+ 'settings.skillsRunner.viewer.tailing': 'ライブテール',+ 'settings.skillsRunner.viewer.fetching': '取得中',+ 'settings.skillsRunner.viewer.error': 'ログの読み込みに失敗しました:',+ 'settings.skillsRunner.repoPicker.loading': 'リポジトリを読み込み中…',+ 'settings.skillsRunner.repoPicker.select': 'リポジトリを選択…',+ 'settings.skillsRunner.repoPicker.empty':+ 'リポジトリが返されませんでした。Composio 経由で GitHub を接続してリストを表示してください。',+ 'settings.skillsRunner.repoPicker.notConnected':+ 'GitHub が Composio 経由で接続されていません。まずスキル → Composio で接続してください。',+ 'settings.skillsRunner.repoPicker.privateTag': '(プライベート)',+ 'settings.skillsRunner.branchPicker.needRepo': 'まずリポジトリを選択してください…',+ 'settings.skillsRunner.branchPicker.loading': 'ブランチを読み込み中…',+ 'settings.skillsRunner.branchPicker.select': 'ブランチを選択…',+ 'settings.devWorkflow.githubRepository': 'GitHub リポジトリ',+ 'settings.devWorkflow.loadingRepositories': 'リポジトリを読み込み中...',+ 'settings.devWorkflow.selectRepository': 'リポジトリを選択',+ 'settings.devWorkflow.privateTag': '(プライベート)',+ 'settings.devWorkflow.detectingForkInfo': 'フォーク情報を検出中...',+ 'settings.devWorkflow.forkDetected': 'フォークを検出しました',+ 'settings.devWorkflow.upstream': 'アップストリーム:',+ 'settings.devWorkflow.targetBranch': 'ターゲットブランチ',+ 'settings.devWorkflow.errorNotConnected':+ 'GitHub が接続されていません。まず設定 > 詳細 > Composio で GitHub を接続してください。',+ 'settings.devWorkflow.errorNoRepositories':+ 'この GitHub アカウントのリポジトリが見つかりません。',+ 'settings.developerMenu.cronJobs.title': 'Cron ジョブ',+ 'settings.developerMenu.cronJobs.desc': 'ランタイムスキルのスケジュールジョブを表示・設定',+ 'settings.developerMenu.eventLog.title': 'イベントログ',+ 'settings.developerMenu.eventLog.desc':+ 'エージェント、ツール、システムイベントのライブカラーコード付きストリーム',+ 'settings.developerMenu.eventLog.workspaceScope': 'ワークスペーススコープ',+ 'settings.developerMenu.eventLog.workspaceScopeActive': 'このワークスペース',+ 'settings.developerMenu.eventLog.workspaceScopeAll': 'すべてのワークスペース',+ 'settings.developerMenu.eventLog.allTypes': 'すべてのタイプ',+ 'settings.developerMenu.eventLog.filterAgent': 'フィルター...',+ 'settings.developerMenu.eventLog.download': 'ダウンロード',+ 'settings.developerMenu.eventLog.events': 'イベント',+ 'settings.developerMenu.eventLog.live': 'ライブ',+ 'settings.developerMenu.eventLog.disconnected': '切断中',+ 'settings.developerMenu.eventLog.waiting': 'イベントを待機中...',+ 'settings.developerMenu.eventLog.waitingHint':+ 'エージェント、ツール、システムが動作するとイベントがここに表示されます。まだ何も発生していません。',+ 'settings.developerMenu.eventLog.notConnectedHint':+ 'コアに再接続してストリームを再開してください。',+ 'settings.developerMenu.eventLog.notConnected': 'コアに接続されていません',+ 'settings.developerMenu.eventLog.jumpToLatest': '最新へ移動',+ 'settings.developerMenu.eventLog.tableTitle': 'イベント',+ 'settings.developerMenu.eventLog.column.time': '時刻',+ 'settings.developerMenu.eventLog.column.domain': 'タイプ',+ 'settings.developerMenu.eventLog.column.agent': 'エージェント',+ 'settings.developerMenu.eventLog.column.event': 'イベント',+ 'settings.developerMenu.eventLog.badge.tool': 'TOOL',+ 'settings.developerMenu.eventLog.badge.agent': 'AGENT',+ 'settings.developerMenu.eventLog.badge.info': 'INFO',+ 'settings.developerMenu.eventLog.badge.mem': 'MEM',+ 'settings.developerMenu.eventLog.badge.chan': 'CHAN',+ 'settings.developerMenu.eventLog.badge.cron': 'CRON',+ 'settings.developerMenu.eventLog.badge.hook': 'HOOK',+ 'settings.developerMenu.eventLog.badge.warn': 'WARN',+ 'settings.developerMenu.eventLog.badge.skill': 'SKILL',+ 'settings.developerMenu.eventLog.badge.comp': 'COMP',+ 'settings.developerMenu.eventLog.badge.mcp': 'MCP',+ 'settings.developerMenu.composioRouting.desc':+ 'Composio API キーを持ち込み、呼び出しを backend.composio.dev に直接ルーティングします',+ 'settings.developerMenu.mcpServer.title': 'MCP サーバー',+ 'settings.developerMenu.mcpServer.desc':+ '外部 MCP クライアントが OpenHuman に接続するように設定します',+ // Tools & Capabilities group: autocomplete and voice debug (doc § Tools & Capabilities)+ 'settings.mcpServer.toolsSectionTitle': '利用可能なツール',+ 'settings.mcpServer.toolsSectionDesc':+ 'openhuman-core mcp 実行時に MCP stdio サーバー経由で公開されるツール',+ 'settings.mcpServer.configSectionTitle': 'クライアント設定',+ 'settings.mcpServer.configSectionDesc':+ 'MCP クライアントを選択して、正しい設定スニペットを生成します',+ 'settings.mcpServer.copySnippet': 'クリップボードにコピー',+ 'settings.mcpServer.copied': 'コピーしました!',+ 'settings.mcpServer.openConfigFile': '設定ファイルを開く',+ 'settings.mcpServer.binaryPathNotFound':+ 'OpenHuman バイナリが見つかりません。ソースから実行している場合は、次のコマンドでビルドしてください: cargo build --bin openhuman-core',+ 'settings.mcpServer.openConfigError': '設定ファイルを開けませんでした',+ 'settings.mcpServer.clientClaudeDesktop': 'Claude Desktop',+ 'settings.mcpServer.clientCursor': 'Cursor',+ 'settings.mcpServer.clientCodex': 'Codex',+ 'settings.mcpServer.clientZed': 'Zed',+ 'settings.mcpServer.configFilePath': '設定ファイル',+ 'settings.mcpServer.clientSelectorAriaLabel': 'MCPクライアントの選択',+ 'settings.mcpServer.tools.listTools': '利用可能なすべてのMCPツールを一覧表示',+ 'settings.mcpServer.tools.toolInstructions': 'ツールの使用手順を取得',+ 'settings.mcpServer.tools.listSubagents': '利用可能なサブエージェントを一覧表示',+ 'settings.mcpServer.tools.runSubagent': 'プロンプトでサブエージェントを実行',+ 'settings.mcpServer.tools.memorySearch': 'セマンティッククエリでメモリーを検索',+ 'settings.mcpServer.tools.memoryRecall': 'IDで特定のメモリーを呼び出し',+ 'settings.mcpServer.tools.treeReadChunk': 'メモリーツリーのチャンクを読み取り',+ 'settings.mcpServer.tools.treeBrowse': 'メモリーツリーの構造を閲覧',+ 'settings.mcpServer.tools.treeTopEntities': 'メモリーツリーから主要なエンティティを取得',+ 'settings.mcpServer.tools.treeListSources': 'メモリーツリーのソースを一覧表示',+ 'settings.appearance.menuDesc': '文字サイズ、角丸、境界線',+ 'settings.agentAccess.title': 'エージェントOSアクセス',+ 'settings.agentAccess.menuDesc':+ 'エージェントの読み取り/書き込み範囲とシェル使用の有無を制御します。',+ 'settings.agentAccess.loadError': 'アクセス設定の読み込みに失敗しました',+ 'settings.agentAccess.saveError': 'アクセス設定の保存に失敗しました',+ 'settings.agentAccess.saved': '保存しました:次のメッセージから適用されます。',+ 'settings.agentAccess.loading': '読み込み中…',+ 'settings.agentAccess.defaultTag': '(デフォルト)',+ 'settings.agentAccess.fullWarning':+ '⚠ フルアクセスは、サンドボックス化されず、アカウントの全権限でコマンドを実行します。このマシン上のエージェントを信頼できる場合のみ有効にしてください。認証情報およびシステムディレクトリは引き続きブロックされ、破壊的・ネットワーク・インストール操作は承認を求められます。',+ 'settings.agentAccess.confine.label': 'ワークスペースに制限',+ 'settings.agentAccess.confine.desc':+ '選択されたアクセスモードに関係なく、エージェントをワークスペースディレクトリ(および許可されたフォルダー)に制限します。オフの場合、常にブロックされる認証情報およびシステムディレクトリを除き、ユーザーがアクセス可能なすべての場所に到達できます。',+ 'settings.agentAccess.autoApproveAll.label': 'すべての操作を自動承認',+ 'settings.agentAccess.autoApproveAll.desc':+ '有効にすると、エージェントは事前に承認を求めずに、すべての対象操作を実行します。これにはファイル書き込み、シェルコマンド、ネットワークリクエスト、その他の副作用が含まれます。認証情報およびシステムディレクトリは引き続きブロックされ、信頼できないまたはラベルのない呼び出し元の操作は拒否されます。',+ 'settings.agentAccess.timeout.label': '操作タイムアウト',+ 'settings.agentAccess.timeout.desc':+ '単一のツールまたは操作がキャンセルされるまでの実行時間です。大規模なローカルモデルが応答完了前に中断される場合は、この値を増やしてください。',+ 'settings.agentAccess.timeout.unit': '秒',+ 'settings.agentAccess.timeout.invalid': '許容範囲内の整数秒を入力してください',+ 'settings.agentAccess.timeout.envOverride':+ 'OPENHUMAN_TOOL_TIMEOUT_SECS 環境変数がこの設定を上書きしているため、解除されるまでここでの変更は反映されません。',+ 'settings.agentAccess.group.approvals': '承認',+ 'settings.agentAccess.group.fileSystem': 'ファイルシステム',+ 'settings.agentAccess.group.limits': '制限',+ 'settings.agentAccess.toolFormat.label': 'ツール呼び出し形式',+ 'settings.agentAccess.toolFormat.desc':+ 'エージェントがモデルにツール呼び出しを記述する方法です。JSONはモデル間で最も信頼性が高く、コードスタイル形式は実験的で一部のモデルで誤読される可能性があります。新しい会話に適用されます。',+ 'settings.agentAccess.toolFormat.option.auto': 'JSON(推奨)',+ 'settings.agentAccess.toolFormat.option.native': 'ネイティブ JSON(プロバイダー構造化呼び出し)',+ 'settings.agentAccess.toolFormat.option.xml': 'タグ内の JSON',+ 'settings.agentAccess.toolFormat.option.pformat': 'P-Format(実験的)',+ 'settings.agentAccess.toolFormat.option.python': 'Python(実験的)',+ 'settings.agentAccess.toolFormat.option.typescript': 'TypeScript(実験的)',+ 'settings.agentAccess.toolFormat.envOverride':+ 'OPENHUMAN_TOOL_DISPATCHER 環境変数がこの設定を上書きしているため、解除するまでここでの変更は反映されません。',+ 'settings.agentAccess.grantedFolders': '許可されたフォルダー',+ 'settings.agentAccess.filesFolder.label': 'ファイル保存フォルダー',+ 'settings.agentAccess.filesFolder.desc':+ 'エージェントが作成したスライド、ドキュメント、画像、動画などのファイルの保存先です。変更は新規ファイルにのみ適用され、既存のファイルは元の場所に留まります。',+ 'settings.agentAccess.filesFolder.save': '保存',+ 'settings.agentAccess.filesFolder.reset': 'デフォルトに戻す',+ 'settings.agentAccess.filesFolder.saved': 'ファイル保存フォルダーを更新しました',+ 'settings.agentAccess.filesFolder.loadError': 'ファイル保存フォルダーを読み込めませんでした。',+ 'settings.agentAccess.filesFolder.open': 'フォルダーを表示',+ 'settings.agentAccess.filesFolder.openError': 'ファイル保存フォルダーを開けませんでした。',+ 'settings.agentAccess.alwaysAllow': '常に許可するツール',+ 'settings.agentAccess.alwaysAllowDesc':+ 'チャットで「常に許可」を選択したツールは、確認なしで実行されます。削除すると、再度確認が表示されます。',+ 'settings.agentAccess.alwaysAllowNone': '常に許可されているツールはありません。',+ 'settings.agentAccess.grantedDesc':+ 'ワークスペース以外で、エージェントが読み書きできるフォルダーです。認証情報ストア(~/.ssh、~/.gnupg、~/.aws、キーチェーン)やシステムディレクトリ(/etc、/System、C:\\Windows など)は、許可フォルダー内であっても常にブロックされます。',+ 'settings.agentAccess.noneGranted': '許可されたフォルダーはありません。',+ 'settings.agentAccess.readWrite': '読み取り + 書き込み',+ 'settings.agentAccess.readOnly': '読み取り専用',+ 'settings.agentAccess.remove': '削除',+ 'settings.agentAccess.pathPlaceholder': '絶対パス',+ 'settings.agentAccess.accessLevelLabel': 'アクセスレベル',+ 'settings.agentAccess.add': '追加',+ 'settings.agentAccess.saving': '保存中…',+ 'settings.agentAccess.actionSandbox': 'アクションサンドボックス',+ 'settings.agentAccess.readWriteAccess': '読み取り + 書き込み',+ 'settings.agentAccess.actionSandboxDesc':+ 'シェル、ファイル、git ツールのデフォルトの作業ディレクトリです。',+ 'settings.agentAccess.actionDir.edit': '編集',+ 'settings.agentAccess.actionDir.save': '保存',+ 'settings.agentAccess.actionDir.cancel': 'キャンセル',+ 'settings.agentAccess.actionDir.placeholder': '絶対パス(例: /Users/you/Projects)',+ 'settings.agentAccess.actionDir.envLocked':+ 'OPENHUMAN_ACTION_DIR によって設定されています。環境変数を変更して上書きしてください。',+ 'settings.agentAccess.actionDir.saved': 'アクションディレクトリを更新しました。',+ 'settings.agentAccess.approvalHistory': '承認履歴',+ 'settings.agentAccess.approvalHistoryDesc':+ 'エージェントが要求した過去の「承認 / 拒否」の判断を確認します。',+ 'settings.agentAccess.viewApprovalHistory': '承認履歴を表示',++ // ── Permissions panel (layman split from Agent Access, Deferred-3) ────────+ 'settings.permissions.accessMode': 'アシスタントに何ができますか?',+ 'settings.permissions.accessModeDesc':+ 'アシスタントがコンピュータ上でアクションを実行する際の自由度を選択します。',+ 'settings.permissions.preset.readonly.title': '閲覧のみ',+ 'settings.permissions.preset.readonly.desc':+ 'アシスタントはファイルの読み取りや探索を行えますが、状態を変更する書き込み、編集、実行は行いません。',+ 'settings.permissions.preset.supervised.title': '事前に確認する',+ 'settings.permissions.preset.supervised.desc':+ '新規ファイルの作成は自由に行えますが、編集、コマンド実行、ネットワークアクセスの前に必ず承認を求めます。',+ 'settings.permissions.preset.full.title': '完全制御',+ 'settings.permissions.preset.full.desc':+ 'アカウントの全権限で実行されます。破壊的なコマンド、ネットワークアクセス、インストールは引き続き承認が必要です。',+ 'settings.permissions.folders': '作業可能なフォルダー',+ 'settings.permissions.foldersDesc':+ 'アシスタントが読み書きするデフォルトのフォルダーです。詳細設定でフォルダーを追加できます。',++ // ── Sandbox execution backend ─────────────────────────────────────+ 'settings.meetings.title': '会議',+ 'settings.meetings.menuDesc': '会議アシスタントの自動参加、要約、文字起こし',+ 'settings.sandbox.title': 'サンドボックス実行',+ 'settings.sandbox.menuDesc':+ 'エージェントツールの分離用にサンドボックスバックエンドを設定します。',+ 'settings.sandbox.loading': '読み込み中…',+ 'settings.sandbox.loadError': 'サンドボックス設定の読み込みに失敗しました。',+ 'settings.sandbox.saveError': 'サンドボックス設定の保存に失敗しました。',+ 'settings.sandbox.saved': '保存しました:新しいエージェントセッションに適用されます。',+ 'settings.sandbox.saving': '保存中…',+ 'settings.sandbox.dockerStatus': 'Docker',+ 'settings.sandbox.available': '利用可能',+ 'settings.sandbox.unavailable': '利用不可',+ 'settings.sandbox.detectedBackend': 'OSバックエンド',+ 'settings.sandbox.enableLabel': 'サンドボックス実行を有効にする',+ 'settings.sandbox.enableDesc': 'エージェントツールを分離されたサンドボックス環境内で実行します。',+ 'settings.sandbox.backendLabel': 'バックエンド',+ 'settings.sandbox.backendDesc': 'サンドボックス実行に使用する分離バックエンドを選択します。',+ 'settings.sandbox.backend.landlock': 'Landlock (Linux)',+ 'settings.sandbox.backend.firejail': 'Firejail (Linux)',+ 'settings.sandbox.backend.bubblewrap': 'Bubblewrap (Linux)',+ 'settings.sandbox.backendName.auto': '自動',+ 'settings.sandbox.backendName.docker': 'Docker',+ 'settings.sandbox.backendName.landlock': 'Landlock',+ 'settings.sandbox.backendName.firejail': 'Firejail',+ 'settings.sandbox.backendName.bubblewrap': 'Bubblewrap',+ 'settings.sandbox.backendName.none': 'なし',+ 'settings.sandbox.backendHint.auto': '最適なバックエンドを使用',+ 'settings.sandbox.backendHint.docker': 'コンテナ内でツールを実行',+ 'settings.sandbox.backendHint.landlock': 'カーネルファイルアクセスルール',+ 'settings.sandbox.backendHint.firejail': '名前空間プロセスジェイル',+ 'settings.sandbox.backendHint.bubblewrap': '軽量ユーザー名前空間',+ 'settings.sandbox.backendHint.none': 'ツールを直接実行(分離なし)',+ 'settings.sandbox.linuxTag': 'Linux',+ 'settings.sandbox.dockerImageDesc': 'ツールが実行されるコンテナイメージ',+ 'settings.sandbox.limitBlankHint': '無制限の場合は空白のままにします',+ 'settings.sandbox.dockerSettings': 'Docker 設定',+ 'settings.sandbox.dockerImage': 'イメージ',+ 'settings.sandbox.dockerImagePlaceholder': 'alpine:3.20',+ 'settings.sandbox.memoryLimit': 'メモリ制限',+ 'settings.sandbox.memoryUnit': 'MB',+ 'settings.sandbox.cpuLimit': 'CPU 制限',+ 'settings.sandbox.cpuUnit': 'コア',+ 'settings.sandbox.envPassthrough': '環境変数の透過',+ 'settings.sandbox.envPassthroughDesc': 'サンドボックスに転送される環境変数。',+ 'settings.sandbox.noEnvVars': '環境変数は設定されていません。',++ 'settings.approvalHistory.title': '承認履歴',+ 'settings.approvalHistory.tableTitle': '決定事項',+ 'settings.approvalHistory.tableDesc': 'すべての承認または拒否と、対象ツールおよび実行内容。',+ 'settings.approvalHistory.subtitle': '最近のツール承認決定事項(新しい順)。',+ 'settings.approvalHistory.refresh': '更新',+ 'settings.approvalHistory.loading': '承認履歴を読み込み中…',+ 'settings.approvalHistory.retry': '再試行',+ 'settings.approvalHistory.emptyState': '承認決定事項はまだ記録されていません。',+ 'settings.approvalHistory.errorGeneric':+ '承認履歴を読み込めませんでした。もう一度お試しください。',+ 'settings.approvalHistory.decision.approveOnce': '1回のみ承認',+ 'settings.approvalHistory.decision.approveAlways': '常に許可',+ 'settings.approvalHistory.decision.approveAlwaysFlow': '常に許可(フロー)',+ 'settings.approvalHistory.decision.deny': '拒否',+ 'settings.approvalHistory.column.time': '時刻',+ 'settings.approvalHistory.column.tool': 'ツール / アクション',+ 'settings.approvalHistory.column.decision': '決定',+ 'settings.approvalHistory.searchPlaceholder': 'ツールまたはアクションを検索…',+ 'settings.approvalHistory.filterDecision': '決定',+ 'settings.approvalHistory.filterDecisionAriaLabel': '決定で絞り込み',+ 'settings.approvalHistory.tableAriaLabel': '承認履歴',+ 'settings.theme.title': 'テーマスタジオ',+ 'settings.theme.menuDesc':+ '色とフォントを完全にカスタマイズするか、プリセットテーマを選択します。',+ 'settings.theme.presetsHeading': 'テーマ',+ 'settings.theme.variantLight': 'ライト',+ 'settings.theme.variantDark': 'ダーク',+ 'settings.theme.variantAuto': '自動',+ 'settings.theme.variantAria': 'テーマバリアント',+ 'settings.theme.backdropHeading': '背景',+ 'settings.theme.backdrop.mesh': 'メッシュ',+ 'settings.theme.backdrop.solid': '単色',+ 'settings.theme.backdrop.image': '画像',+ 'settings.theme.backdropImageUrl': '背景画像 URL',+ 'settings.theme.backdropHint':+ 'メッシュはアニメーション付きグラデーションを表示します。単色はフラットな背景を使用します。画像では独自の背景を設定できます。',+ 'settings.theme.customBadge': 'カスタム',+ 'settings.theme.autoForkHint':+ 'プリセットを編集すると、変更内容は新しいカスタムテーマとして自動的に保存されます。',+ 'settings.theme.importedName': 'インポートしたテーマ',+ 'settings.theme.contrastWarn':+ 'テキストと背景のコントラストが低いため、このテーマは読みにくい可能性があります。',+ 'settings.theme.group.surfaces': 'サーフェス',+ 'settings.theme.group.text': 'テキスト',+ 'settings.theme.group.borders': '境界線',+ 'settings.theme.group.accents': 'アクセントカラー',+ 'settings.theme.showShades': 'すべてのアクセントシェードを表示',+ 'settings.theme.hideShades': 'すべてのアクセントシェードを非表示',+ 'settings.theme.fontsHeading': 'フォント',+ 'settings.theme.fontRole.title': 'タイトル',+ 'settings.theme.fontRole.heading': '見出し',+ 'settings.theme.fontRole.body': '本文',+ 'settings.theme.fontRole.mono': '等幅フォント',+ 'settings.theme.fontRole.serif': 'セリフフォント',+ 'settings.theme.fontCurrent': '現在',+ 'settings.theme.actions': 'テーマの管理',+ 'settings.theme.reset': 'オーバーライドをリセット',+ 'settings.theme.delete': 'テーマを削除',+ 'settings.theme.export': 'JSON をコピー',+ 'settings.theme.copied': 'コピーしました!',+ 'settings.theme.import': 'テーマをインポート',+ 'settings.theme.importHint':+ 'エクスポートしたテーマの JSON を貼り付けて、カスタムテーマとして追加します。',+ 'settings.theme.importApply': 'インポート',+ 'settings.theme.importError': 'そのテーマの JSON を解析できませんでした。',+ 'settings.appearance.title': '外観',+ 'settings.appearance.fontSizeHeading': 'フォントサイズ',+ 'settings.appearance.fontSizeAria': 'フォントサイズ',+ 'settings.appearance.fontSizeSmall': '小',+ 'settings.appearance.fontSizeSmallDesc':+ 'コンパクトなテキスト:画面により多くの情報を表示できます。',+ 'settings.appearance.fontSizeMedium': '中',+ 'settings.appearance.fontSizeMediumDesc': 'デフォルトのバランスの取れたサイズです。',+ 'settings.appearance.fontSizeLarge': '大',+ 'settings.appearance.fontSizeLargeDesc': '文字を大きくして読みやすくします。',+ 'settings.appearance.fontSizeXLarge': '特大',+ 'settings.appearance.fontSizeXLargeDesc': '最大限の可読性を実現する、最も大きな文字サイズです。',+ 'settings.appearance.fontSizeHelperText':+ 'システムフォント設定に関係なく、アプリ全体(チャット、設定、パネル)の文字サイズを調整します。',+ 'settings.appearance.fontSizeCustomLabel': 'カスタムサイズ',+ 'settings.appearance.fontSizeCustomAria': 'ピクセル単位のフォントサイズ',+ 'settings.appearance.fontSizeCustomSliderAria': 'ピクセル単位のフォントサイズスライダー',+ 'settings.appearance.fontSizeUnit': 'px',+ 'settings.appearance.chatHeading': 'チャット',+ 'settings.appearance.showChatMascot': 'メッセージボックスにTinyを表示',+ 'settings.mascot.active': 'アクティブ',+ 'settings.mascot.characterDesc': 'OpenHumanキャラクターを選択してください。',+ 'settings.mascot.characterDraft': '下書き',+ 'settings.mascot.characterHeading': 'キャラクター',+ 'settings.mascot.customGifError':+ 'HTTPS、file://、またはローカル画像URL(PNG、GIF、JPEG、WebP、BMP)を入力するか、ファイルをアップロードしてください。',+ 'settings.mascot.customGifHeading': 'カスタム画像アバター',+ 'settings.mascot.customGifLabel': 'カスタム画像アバターURL',+ 'settings.mascot.customGifPlaceholder': 'https://example.com/avatar.png',+ 'settings.mascot.customGifUpload': '画像をアップロード',+ 'settings.mascot.customGifInvalidType':+ 'サポートされていないファイル形式です。PNG、GIF、JPEG、WebP、BMP画像をアップロードしてください。',+ 'settings.mascot.customGifTooLarge':+ '画像サイズが大きすぎます。1.5 MB以下のファイルをアップロードしてください。',+ 'settings.mascot.customGifReadError':+ '画像を読み込めませんでした。別のファイルをお試しください。',+ 'settings.mascot.characterPreview': 'プレビュー',+ 'settings.mascot.characterStates': '状態',+ 'settings.mascot.characterVisemes': 'ビセーム',+ 'settings.mascot.colorAria': 'OpenHumanカラー',+ 'settings.mascot.colorDesc': 'キャラクターの色テーマを選択してください。',+ 'settings.mascot.colorHeading': '色',+ 'settings.mascot.colorBlack': 'ブラック',+ 'settings.mascot.colorBurgundy': 'バーガンディ',+ 'settings.mascot.colorCustom': 'カスタム',+ 'settings.mascot.colorNavy': 'ネイビー',+ 'settings.mascot.primaryColor': 'プライマリカラー',+ 'settings.mascot.secondaryColor': 'セカンダリカラー',+ 'settings.mascot.colorYellow': 'イエロー',+ 'settings.mascot.libraryUnavailable': 'OpenHumanライブラリが利用できません',+ 'settings.mascot.loadingLibrary': 'OpenHumanライブラリを読み込み中…',+ 'settings.mascot.localDefault': 'ローカルOpenHuman(デフォルト)',+ 'settings.mascot.noCharacters': '利用可能なOpenHumanキャラクターがありません',+ 'settings.mascot.noColorVariants': 'カラーバリアントなし',+ 'settings.mascot.secondaryHeading': 'ミーティングデュオ(2体目のマスコット)',+ 'settings.mascot.secondaryDesc':+ 'ミーティング用に2体目のマスコットを追加します。2体設定すると、一緒に表示され、交互に話します。1体のみ使用する場合は「なし」のままにしてください。',+ 'settings.mascot.secondaryNone': 'なし(単一マスコット)',+ 'settings.mascot.perMascotVoiceHeading': 'マスコットごとの音声',+ 'settings.mascot.primaryVoiceLabel': '1体目のマスコットの音声',+ 'settings.mascot.secondaryVoiceLabel': '2体目のマスコットの音声',+ 'settings.mascot.voice.current': '現在',+ 'settings.mascot.voice.customDesc':+ '音声IDは api.elevenlabs.io/v1/voices または ElevenLabs ダッシュボードで確認できます。IDのみ保存され、APIキーはバックエンドに保持されます。',+ 'settings.mascot.voice.customHeading': 'カスタム音声ID',+ 'settings.mascot.voice.customOption': 'その他(音声IDを貼り付け)…',+ 'settings.mascot.voice.customPlaceholder': '例: 21m00Tcm4TlvDq8ikWAM',+ 'settings.mascot.voice.desc':+ 'マスコットが音声応答に使用する ElevenLabs の音声を選択します。性別で絞り込み、推奨リストから選択、カスタムIDを貼り付け、またはインターフェース言語に一致する音声をアプリに自動選択させることができます。',+ 'settings.mascot.voice.genderFemale': '女性',+ 'settings.mascot.voice.genderHeading': '音声の性別',+ 'settings.mascot.voice.genderMale': '男性',+ 'settings.mascot.voice.heading': '音声',+ 'settings.mascot.voice.presetHeading': '音声プリセット',+ 'settings.mascot.voice.preview': '音声プレビュー',+ 'settings.mascot.voice.previewError': '音声プレビューに失敗しました',+ 'settings.mascot.voice.previewText': 'こんにちは、アシスタントです。これは音声プレビューです。',+ 'settings.mascot.voice.previewing': 'プレビュー中…',+ 'settings.mascot.voice.reset': 'デフォルトにリセット',+ 'settings.mascot.voice.useLocaleDefault': 'アプリ言語に合わせる',+ 'settings.mascot.voice.useLocaleDefaultDesc':+ '現在のインターフェース言語に合わせた音声を自動選択します。',+ 'settings.persona.identityHeading': 'アイデンティティ',+ 'settings.persona.characterHeading': 'キャラクター',+ 'settings.persona.characterDesc':+ 'アシスタントの思考や話し方を定義します。すべての会話で指示として使用されます。',+ 'settings.persona.unsavedChanges': '未保存の変更があります',+ 'settings.persona.discard': '破棄',+ 'settings.persona.saveChanges': '変更を保存',+ 'settings.persona.identityDesc':+ 'アシスタントの表示名と短い説明です。アプリ内に表示されますが、アシスタントの推論方法には影響しません。',+ 'settings.persona.displayNameLabel': '表示名',+ 'settings.persona.displayNamePlaceholder': '例: Nova',+ 'settings.persona.descriptionLabel': '説明',+ 'settings.persona.descriptionPlaceholder': '例: チーム向けの冷静で簡潔なアシスタント',+ 'settings.persona.soul.editorLabel': 'SOUL.md の内容',+ 'settings.persona.soul.reset': 'デフォルトにリセット',+ 'settings.persona.soul.usingDefault': '同梱のデフォルトを使用しています',+ 'settings.persona.soul.saveError': 'SOUL.md を保存できませんでした',+ 'settings.persona.soul.resetError': 'SOUL.md をリセットできませんでした',+ 'settings.persona.builder.modeLabel': 'ペルソナ編集モード',+ 'settings.persona.builder.modeGuided': 'ガイド付き',+ 'settings.persona.builder.modeAdvanced': '詳細',+ 'settings.persona.builder.intro':+ 'いくつかの項目に入力すると、ペルソナに自動で書き込まれます。Markdown の記述は不要です。',+ 'settings.persona.builder.personalityLabel': '性格',+ 'settings.persona.builder.personalityHelp': 'キャラクターと価値観: 振る舞いや優先事項。',+ 'settings.persona.builder.personalityPlaceholder':+ '例: 温かく、好奇心旺盛で率直。不確実性に対して正直。',+ 'settings.persona.builder.voiceLabel': 'コミュニケーションスタイル',+ 'settings.persona.builder.voiceHelp': '回答の表現方法: 長さ、トーン、フォーマット。',+ 'settings.persona.builder.voicePlaceholder': '例: 結論から述べ、簡潔にし、私のトーンに合わせる。',+ 'settings.persona.builder.aboutLabel': 'あなたについて',+ 'settings.persona.builder.aboutHelp':+ '考慮すべきあなたに関するコンテキスト: 仕事、好み、タイムゾーンなど。',+ 'settings.persona.builder.aboutPlaceholder':+ '例: 小さなデザインスタジオを経営しており、平易な言葉を好む。',+ 'settings.persona.builder.preservedNote':+ '手動で記述した他のセクションは保持されます: 完全なペルソナを表示するには「詳細」に切り替えてください。',+ 'settings.persona.builder.securityNote': 'アシスタントに許可する操作を選択しますか?',+ 'settings.persona.builder.securityLink': 'エージェントアクセスを開く',+ 'settings.persona.templates.heading': 'テンプレートから開始',+ 'settings.persona.templates.custom.label': 'カスタム',+ 'settings.persona.templates.custom.desc': '独自の組み合わせ: 以下の項目を編集',+ 'settings.persona.templates.desc':+ '開始点を選択してください: 「性格」と「コミュニケーションスタイル」に入力されます。後からすべて編集できます。',+ 'settings.persona.templates.doctor.label': '臨床アシスタント',+ 'settings.persona.templates.doctor.desc': '慎重で、出典を引用し、不確実性を指摘',+ 'settings.persona.templates.researcher.label': 'リサーチアシスタント',+ 'settings.persona.templates.researcher.desc': '厳密で、構造化されており、証拠を重視',+ 'settings.persona.templates.executive.label': 'エグゼクティブアシスタント',+ 'settings.persona.templates.executive.desc': '簡潔で、決断力があり、行動志向',+ 'settings.persona.templates.teacher.label': '教師',+ 'settings.persona.templates.teacher.desc': '忍耐強く、ステップバイステップで説明',+ 'settings.persona.templates.student.label': '学習パートナー',+ 'settings.persona.templates.student.desc': '励まし、クイズ形式、平易な言葉',+ 'settings.persona.templates.family.label': 'ファミリーアシスタント',+ 'settings.persona.templates.family.desc': '温かく、フレンドリーで、全世代に安全',+ 'skills.card.moreActions': 'その他の操作',+ 'skills.channelIcon.discord': 'Discord',+ 'skills.channelIcon.imessage': 'iMessage',+ 'skills.channelIcon.telegram': 'Telegram',+ 'skills.channelIcon.web': 'Web',+ 'skills.channelIcon.yuanbao': 'Yuanbao',+ 'skills.create.allowedTools': '許可されたツール',+ 'skills.create.allowedToolsHelp': 'SKILL.md のフロントマターに以下のようにレンダリングされます',+ 'skills.create.allowedToolsPlaceholder': 'node_exec, fetch',+ 'skills.create.author': '作成者',+ 'skills.create.authorPlaceholder': 'あなたの名前',+ 'skills.create.commaSeparated': '(カンマ区切り)',+ 'skills.create.createBtn': 'スキルを作成',+ 'skills.create.createError': 'スキルを作成できませんでした',+ 'skills.create.creating': '作成中…',+ 'skills.create.description': '説明',+ 'skills.create.descriptionPlaceholder': 'このワークフローは何を行いますか?',+ 'skills.create.optional': '(任意)',+ 'skills.create.whenToUse': '使用タイミング',+ 'skills.create.whenToUsePlaceholder': '例:ユーザーが受信箱のトリアージを依頼したとき',+ 'skills.create.whenToUseHelp':+ 'エージェントがこのワークフローを実行するか判断するために一致させるトリガーです。空欄の場合は説明を再利用します。',+ 'skills.create.inputs.heading': '入力',+ 'skills.create.inputs.help':+ 'ワークフローが必要とするパラメータを宣言します。入力の追加は任意ですが、追加した各入力には説明が必要です。説明はエージェントと実行フォームに表示されます。必須としてマークしない限り、入力は任意です。',+ 'skills.create.inputs.add': '入力を追加',+ 'skills.create.inputs.row.name': '入力名',+ 'skills.create.inputs.row.namePlaceholder': '例:repo',+ 'skills.create.inputs.row.nameError':+ '英字、数字、アンダースコア、ハイフンのみ使用可能です。先頭は英字である必要があります。',+ 'skills.create.inputs.row.description': '入力の説明',+ 'skills.create.inputs.row.descriptionPlaceholder': 'このフィールドには何を入力しますか?',+ 'skills.create.inputs.row.descriptionError': '各入力には説明が必要です。',+ 'skills.create.inputs.row.type': 'タイプ',+ 'skills.create.inputs.row.required': '必須',+ 'skills.create.inputs.row.remove': '入力を削除',+ 'skills.create.inputs.type.string': 'テキスト',+ 'skills.create.inputs.type.integer': '数値',+ 'skills.create.inputs.type.boolean': 'はい / いいえ',+ 'skills.create.license': 'ライセンス',+ 'skills.create.licensePlaceholder': 'MIT',+ 'skills.create.name': '名前',+ 'skills.create.namePlaceholder': '例: 取引ジャーナル',+ 'skills.create.scope': 'スコープ',+ 'skills.create.scopeProjectHint': '/.openhuman/skills/',+ 'skills.create.scopeUserHint':+ '~/.openhuman/skills/<slug>/SKILL.md に書き込まれます: すべてのワークスペースで利用可能です。',+ 'skills.create.slugLabel': 'スラッグ',+ 'skills.create.subtitle': 'SKILL.md',+ 'skills.create.tags': 'タグ',+ 'skills.create.tagsPlaceholder': '取引, 調査',+ 'skills.create.title': '新規スキル',+ 'skills.detail.author': '作成者',+ 'skills.detail.license': 'ライセンス',+ 'skills.detail.description': '説明',+ 'skills.run.title': 'ワークフロー',+ 'skills.detail.source': 'ソース URL',+ 'skills.detail.tags': 'タグ',+ 'skills.detail.version': 'バージョン',+ 'skills.install.errors.alreadyInstalledHint':+ 'このスラッグのスキルはワークスペースに既に存在します。先に削除するか、frontmatter の `metadata.id` / `name` を変更してください。',+ 'skills.install.errors.alreadyInstalledTitle': 'スキルは既にインストールされています',+ 'skills.install.errors.fetchFailedHint':+ 'リクエストが正常に完了しませんでした。URL が到達可能な公開ファイルを指していること、およびホストが 2xx レスポンスを返したことを確認してください。',+ 'skills.install.errors.fetchFailedTitle': '取得に失敗しました',+ 'skills.install.errors.fetchTimedOutHint':+ 'リモートホストが時間内に応答しませんでした。再試行するか、タイムアウト値(1〜600 秒)を引き上げてください。',+ 'skills.install.errors.fetchTimedOutTitle': '取得がタイムアウトしました',+ 'skills.install.errors.fetchTooLargeHint':+ 'SKILL.md は 1 MiB 未満である必要があります。バンドルされたリソースをインライン化する代わりに、`references/` または `scripts/` ファイルに分割してください。',+ 'skills.install.errors.fetchTooLargeTitle': 'SKILL.md が大きすぎます',+ 'skills.install.errors.genericHint':+ 'バックエンドがエラーを返しました。生メッセージは以下に表示されています。',+ 'skills.install.errors.genericTitle': 'スキルをインストールできませんでした',+ 'skills.install.errors.invalidSkillHint':+ 'frontmatter は有効な YAML であり、空でない `name` と `description` フィールドを含み、`---` で終了する必要があります。',+ 'skills.install.errors.invalidSkillTitle': 'SKILL.md を解析できませんでした',+ 'skills.install.errors.invalidUrlHint':+ '公開 HTTPS URL のみが許可されています。プライベート、ループバック、メタデータホストはブロックされています。',+ 'skills.install.errors.invalidUrlTitle': 'URL が拒否されました',+ 'skills.install.errors.unsupportedUrlHint':+ '直接の `.md` リンクのみが機能します。GitHub の場合は、ファイルへのリンク(github.com/owner/repo/blob/.../SKILL.md)を使用してください。ツリーやリポジトリのルートはインストールされません。',+ 'skills.install.errors.unsupportedUrlTitle': 'URL 形式がサポートされていません',+ 'skills.install.errors.writeFailedHint':+ 'ワークスペースのスキルディレクトリが書き込み可能ではありませんでした。`<workspace>/.openhuman/skills/` のファイルシステム権限を確認してください。',+ 'skills.install.errors.writeFailedTitle': 'SKILL.md を書き込めませんでした',+ 'skills.install.fetchLog': 'ログを取得',+ 'skills.install.fetchingPrefix': '取得中',+ 'skills.install.fetchingSuffix': '設定したタイムアウトまでかかる場合があります。',+ 'skills.install.installBtn': 'スキルをインストール',+ 'skills.install.installComplete': 'インストール完了',+ 'skills.install.installing': 'インストール中…',+ 'skills.install.parseWarnings': '解析警告',+ 'skills.install.rawError': '生エラー',+ 'skills.install.subtitleMiddle': 'HTTPS経由で取得し、以下にインストールします',+ 'skills.install.subtitlePrefix': '単一の',+ 'skills.install.subtitleSuffix':+ 'HTTPSのみ対応。プライベートおよびループバックホストはブロックされます。',+ 'skills.install.successDiscovered': '{count} 件の新しいスキルを発見しました。',+ 'skills.install.successNoNewIds':+ 'スキルはインストールされましたが、新しいスキルIDは検出されませんでした。カタログに同じスラッグのスキルが既に存在する可能性があります。',+ 'skills.install.timeoutHint': '(秒、任意)',+ 'skills.install.timeoutHelp':+ 'デフォルトは60秒です。1〜600の範囲外の値はサーバー側で調整されます。',+ 'skills.install.timeoutInvalid': '1から600の整数を入力してください。',+ 'skills.install.timeoutLabel': 'タイムアウト',+ 'skills.install.timeoutPlaceholder': '60',+ 'skills.install.title': 'URLからスキルをインストール',+ 'skills.install.urlHelpMiddle': 'ファイル。',+ 'skills.install.urlHelpPrefix': 'への直接リンク',+ 'skills.install.urlHelpSuffix': 'URLは自動的に書き換えられます',+ 'skills.install.urlInvalidPrefix': 'URLは正しい形式の',+ 'skills.install.urlInvalidSuffix': 'リンクである必要があります。',+ 'skills.install.urlLabel': 'スキルURL',+ 'skills.install.urlPlaceholder': 'https://raw.githubusercontent.com/owner/repo/main/SKILL.md',+ 'skills.meetingBots.platforms.gmeet': 'Google Meet',+ 'skills.meetingBots.platforms.teams': 'Microsoft Teams',+ 'skills.meetingBots.wakePhraseHint': 'Hey OpenHuman',+ 'skills.search.placeholder': 'スキルを検索…',+ 'skills.setup.voice.activation': 'アクティベーション',+ 'skills.setup.voice.activeDescPrefix': 'Fn',+ 'skills.setup.voice.activeDescSuffix': 'Fn',+ 'skills.setup.voice.activeTitle': 'ボイスインテリジェンスが有効です',+ 'skills.setup.voice.customizeSettings': '設定をカスタマイズ',+ 'skills.setup.voice.downloadSttBtn': '音声設定を開く',+ 'skills.setup.voice.enableDesc': 'マイクを使用してハンズフリーでテキストを入力します。',+ 'skills.setup.voice.hotkey': 'ホットキー',+ 'skills.setup.voice.startBtn': '起動中...',+ 'skills.setup.voice.startError': '音声サーバーの起動に失敗しました',+ 'skills.setup.voice.starting': '起動中...',+ 'skills.setup.voice.stepEnable': '音声サーバーを起動',+ 'skills.setup.voice.stepSetup': '音声認識の設定が必要です',+ 'skills.setup.voice.stepSuccess': '準備完了',+ 'skills.setup.voice.sttNotReady': '音声認識モデルの準備ができていません',+ 'skills.setup.voice.sttNotReadyDesc':+ 'Voice Intelligence は動作する音声認識エンジンが必要です。設定 › 音声 で選択してください。',+ 'skills.setup.voice.sttReady': '音声認識モデルの準備が完了しました',+ 'skills.setup.voice.sttReturnHint':+ '音声設定で音声認識エンジンを構成し、ここに戻って音声を開始してください。',+ 'skills.setup.voice.title': '音声インテリジェンス',+ 'skills.uninstall.couldNotUninstall': 'アンインストールできませんでした',+ 'skills.uninstall.description':+ 'これにより、スキルディレクトリとそのすべてのバンドルリソースが完全に削除されます。エージェントは次のターンからこれを認識しなくなります。',+ 'skills.uninstall.title': 'アンインストール',+ 'skills.uninstall.uninstallBtn': 'アンインストール',+ 'skills.uninstall.uninstalling': 'アンインストール中…',+ 'upsell.global.limitMessage':+ '続行するにはプランをアップグレードするか、クレジットをチャージしてください',+ 'upsell.global.limitTitle': '使用制限に達しました',+ 'upsell.global.nearLimitMessage':+ '使用制限の {pct}% を使用しました。制限を引き上げるにはアップグレードしてください。',+ 'upsell.global.nearLimitTitle': '使用制限に近づいています',+ 'walkthrough.steps.startChat.title': 'チャットから開始',+ 'walkthrough.steps.startChat.content':+ 'チャットはあなたの出発点です。新しいウィンドウは、セットアップ後に表示されたのと同じ挨拶とクイックアクションで開きます。',+ 'walkthrough.steps.sayHello.title': '挨拶する',+ 'walkthrough.steps.sayHello.content':+ 'ここをタップして、いつでも AI アシスタントとの会話を開始してください。',+ 'walkthrough.steps.meetAi.title': 'AI と出会う',+ 'walkthrough.steps.meetAi.content':+ 'ここでは会話が展開されます。質問をしたり、要約を取得したり、ブレインストーミングを行ったりできます。すべて検索可能です。',+ 'walkthrough.steps.connectWorld.title': '世界を接続する',+ 'walkthrough.steps.connectWorld.content':+ 'Gmail、Slack、WhatsApp など - 各接続がアシスタントにスーパーパワーを与えます。',+ 'walkthrough.steps.messagingApps.title': '普段使っている場所でチャット',+ 'walkthrough.steps.messagingApps.content':+ 'WhatsApp、Telegram、Slack、Discord - メッセージングアプリを接続して、アシスタントがどこからでもあなたに連絡できるようにします。',+ 'walkthrough.steps.settings.title': '自分好みにカスタマイズ',+ 'walkthrough.steps.settings.content':+ '設定、プライバシー、通知 - すべてここにあります。このページからいつでもこのツアーを再開できます。',+ 'walkthrough.steps.chatTab.title': 'チャットに戻る',+ 'walkthrough.steps.chatTab.content':+ '会話に戻りたいときは、いつでもチャットタブを使用してください。',+ 'walkthrough.steps.connectionsTab.title': '接続を管理',+ 'walkthrough.steps.connectionsTab.content':+ 'サービスを追加または調整したいときは、メインナビゲーションから常に接続にアクセスできます。',+ 'walkthrough.steps.allSet.title': '準備完了です!',+ 'walkthrough.steps.allSet.content':+ 'アシスタントからウェルカムノートが届きました - ここはチャット、質問、ブレインストーミングのためのあなたのスペースです。楽しんでください!',+ 'walkthrough.tooltip.letsGo': '始めましょう!',+ 'walkthrough.tooltip.next': '次へ →',+ 'walkthrough.tooltip.skip': 'ツアーをスキップ',+ 'walkthrough.tooltip.stepCounter': '{total}中{n}',+ 'webhooks.tunnels.active': 'アクティブ',+ 'webhooks.tunnels.createFailed': 'トンネルの作成に失敗しました',+ 'webhooks.tunnels.creating': '作成中...',+ 'webhooks.tunnels.deleteFailed': 'トンネルの削除に失敗しました',+ 'webhooks.tunnels.descriptionPlaceholder': '説明 (任意)',+ 'webhooks.tunnels.echo': 'エコー',+ 'webhooks.tunnels.empty': 'トンネルが設定されていません',+ 'webhooks.tunnels.enableEcho': 'エコーを有効化',+ 'webhooks.tunnels.inactive': '非アクティブ',+ 'webhooks.tunnels.namePlaceholder': 'トンネル名 (例: telegram-bot)',+ 'webhooks.tunnels.newTunnel': '新しいトンネル',+ 'webhooks.tunnels.removeEcho': 'エコーを削除',+ 'webhooks.tunnels.title': 'Webhookトンネル',+ 'webhooks.tunnels.toggleFailed': 'エコーの切り替えに失敗しました',+ 'composio.integrationSlugsHelp': 'カンマ区切りの統合スラッグ、例:',+ 'composio.integrationSlugsExample': 'gmail, slack',+ 'composio.integrationSlugsCaseInsensitive': '大文字と小文字は区別されません。',+ 'composio.integrationSlugsPlaceholder': 'gmail, slack, ...',+ 'composio.triggers.loading': '読み込み中…',+ 'chat.backToThread': '{title}に戻る',+ 'chat.parentThread': '親スレッド',+ 'settings.composio.loading': '読み込み中…',+ 'skills.uninstall.confirmTitle': '{name}をアンインストールしますか?',+ 'intelligence.memoryChunk.detail.copiedHint': 'コピーしました',+ // Developer options menu items (#2225)+ 'memory.sourceFilterAria': 'ソースで絞り込み',+ // Settings > Account > Wallet Balances+ 'pages.settings.account.walletBalances': 'ウォレット残高',+ 'pages.settings.account.walletBalancesDesc': 'ローカルウォレットのマルチチェーン残高を表示',+ // Wallet tabbed view (Connections → Wallet)+ 'wallet.tabs.balance': 'ウォレット残高',+ 'wallet.tabs.recovery': '復元',+ 'wallet.ariaLabel': 'ウォレットビュー',+ // WalletBalancesPanel strings+ 'walletBalances.tableTitle': '残高',+ 'walletBalances.searchPlaceholder': 'トークン、ネットワーク、アドレスを検索…',+ 'walletBalances.earlyAlphaNotice':+ '早期アルファ版: ウォレット残高機能はテスト中です。リリース間隔で金額やネットワークサポートが変更される場合があります。',+ 'walletBalances.allNetworks': 'すべてのネットワーク',+ 'walletBalances.manageTokens': 'トークンの管理',+ 'walletBalances.noFilterMatches': 'フィルターに一致する残高がありません',+ 'walletBalances.colToken': 'トークン',+ 'walletBalances.colAddress': 'アドレス',+ 'walletBalances.colBalance': '残高',+ 'walletBalances.colActions': '操作',+ 'walletBalances.refresh': '更新',+ 'walletBalances.loading': '残高を読み込み中…',+ 'walletBalances.retry': '再試行',+ 'walletBalances.emptyState':+ 'ウォレットアカウントがありません。リカバリーフレーズでウォレットを設定してください。',+ 'walletBalances.copyAddress': 'アドレスをコピー',+ 'walletBalances.providerMissing': 'プロバイダーが利用できません',+ 'walletBalances.rawBalance': '生データ: {raw}',+ 'walletBalances.errorGeneric':+ 'ウォレット残高を読み込めません。リカバリーフレーズでウォレットを設定して再試行してください。',+ 'walletBalances.setupHint':+ 'リカバリーフレーズがまだ設定されていません。設定してウォレットを有効化し、リアルタイムの残高を確認してください。',+ 'walletBalances.setupCta': 'リカバリーフレーズを設定',+ 'walletBalances.notSetUp': '未設定',+ 'walletBalances.send': '送金',+ 'walletBalances.receive': '受取',+ // Receive modal+ 'walletReceive.scanHint':+ 'このコードをスキャンするか、以下のアドレスをコピーして資金を受け取ってください。',+ 'walletReceive.addressLabel': '{network} アドレス',+ 'walletReceive.onlyChainWarning':+ 'このアドレスには {network} の資産のみを送金してください。他のネットワークの資産を送金すると、永久に失われる可能性があります。',+ // Send modal+ 'walletSend.recipient': '宛先アドレス',+ 'walletSend.recipientRequired': '宛先アドレスを入力してください',+ 'walletSend.amount': '金額',+ 'walletSend.invalidAmount': '有効な金額を入力してください',+ 'walletSend.review': '確認',+ 'walletSend.preparing': '準備中…',+ 'walletSend.confirmHint':+ '以下の詳細を確認してください。署名はローカルで実行され、確認するまでブロードキャストされません。',+ 'walletSend.estimatedFee': '推定ネットワーク手数料',+ 'walletSend.confirmSend': '確認して送金',+ 'walletSend.sending': '送信中…',+ 'walletSend.sent': 'トランザクションを送信しました',+ 'walletSend.txHash': 'トランザクションハッシュ',+ 'walletSend.viewExplorer': 'エクスプローラーで表示',+ 'walletSend.done': '完了',+ 'walletSend.genericError': '送金を完了できませんでした。もう一度お試しください。',+ // Task sources (#task-sources)+ 'settings.taskSources.name': '名前(任意)',+ // Task sources provider labels (#task-sources)++ // Scheduled-workflow card controls (ScheduledCronCard on the workflow+ // runner page). The standalone scheduled-workflows dashboard was phased+ // out; only these per-card labels remain in use.+ 'skills.dashboard.enable': 'スケジュール済みワークフローを有効化',+ 'skills.dashboard.disable': 'スケジュール済みワークフローを無効化',+ 'skills.dashboard.lastRun': '前回の実行',+ 'skills.dashboard.nextRun': '次回の実行',+ 'skills.dashboard.cardOpenRunner': 'ランナーで開く',++ // ── Agent Workflows ──────────────────────────────────────────────────────+ 'workflows.subtitle':+ '再利用・実行可能な手順:目標と、その達成に必要なステップ。作成、URLからのインストール、またはワークフローを開いて実行できます。',+ 'workflows.createNew': '新しいワークフロー',+ 'workflows.delete': 'ワークフローを削除',+ 'workflows.deleteError': 'ワークフローの削除に失敗しました',+ 'workflows.empty.title': 'ワークフローはまだありません',+ 'workflows.empty.body':+ 'ワークフローを作成して、タスクのライフサイクルフェーズに対するルールやスクリプトを定義します。',+ 'workflows.create.title': '新しいワークフロー',+ 'workflows.create.subtitle': 'エージェント用のライフサイクルに紐付いたルールセットを定義します。',+ 'workflows.create.optional': '(任意)',+ 'workflows.create.createBtn': 'ワークフローを作成',+ 'workflows.create.creating': '作成中…',+ 'workflows.create.createError': 'ワークフローを作成できませんでした',+ 'workflows.phase.toolScope.allow': '許可',++ // Chat: agent-generated artifacts (#2779)+ 'chat.artifact.ready': '準備完了',+ 'chat.artifact.failed': '生成に失敗しました',+ 'chat.artifact.download': 'ダウンロード',+ 'chat.artifact.downloading': 'ダウンロード中…',+ 'chat.artifact.download_failed': 'ダウンロードに失敗しました: {reason}',+ 'chat.artifact.retry': '再試行',+ 'chat.artifact.reveal': 'フォルダに表示',++ // Chat: files panel (#3024)+ 'chat.files.chip.aria.one': 'このチャット内のファイル {count} 件',+ 'chat.files.chip.aria.other': 'このチャット内のファイル {count} 件',+ 'chat.files.panel.aria': 'このチャット内のファイル',+ 'chat.files.panel.title': 'ファイル ({count})',+ 'chat.files.panel.empty': 'ファイルはまだありません。エージェントに生成を依頼してください。',+ 'chat.files.panel.close': 'ファイルパネルを閉じる',+ 'chat.files.delete.aria': '{title} を削除',+ 'chat.files.delete.confirm': 'このファイルを削除しますか?',+ 'chat.files.delete.cancel': 'キャンセル',+ 'chat.files.delete.action': '削除',+ 'chat.files.delete.failed': 'ファイルを削除できませんでした。もう一度お試しください。',+ // Error labels for download/delete outcomes (#3024). Keyed off+ // `ArtifactErrorCode` returned by artifactDownloadService.+ 'chat.files.error.not_desktop': 'ダウンロードはデスクトップアプリでのみ利用可能です。',+ 'chat.files.error.missing_artifact_id': 'アーティファクト ID がありません。',+ 'chat.files.error.missing_artifact_path': 'コアの応答にアーティファクトのパスがありません。',+ 'chat.files.error.resolve_failed':+ 'アーティファクトを解決できませんでした。もう一度お試しください。',+ 'chat.files.error.download_failed': 'ダウンロードに失敗しました。もう一度お試しください。',+ 'chat.files.error.delete_failed': 'ファイルを削除できませんでした。もう一度お試しください。',+ 'chat.files.error.reveal_failed':+ 'ファイルを表示できませんでした。OpenHuman の外部で移動または削除された可能性があります。',++ // First-run initialization (harness_init)+ 'harnessInit.title': 'セットアップ中',+ 'announcement.gotIt': '了解',+ 'harnessInit.subtitle': 'OpenHuman は初回起動時に必要なコンポーネントを準備しています。',+ 'harnessInit.stepPython': 'Python ランタイム',+ 'harnessInit.stepNode': 'Node.js ランタイム',+ 'harnessInit.statePending': '待機中',+ 'harnessInit.stateRunning': 'インストール中…',+ 'harnessInit.stateDone': '準備完了',+ 'harnessInit.stateSkipped': 'スキップ済み',+ 'harnessInit.stateFailed': '失敗',+ 'harnessInit.failedMessage':+ '一部のセットアップ手順が完了しませんでした。再試行するか、続行できます。OpenHuman は組み込みのフォールバックを使用します。',+ 'harnessInit.retry': '再試行',+ 'harnessInit.continueAnyway': '続行',+ 'harnessInit.runInBackground': 'バックグラウンドで実行',+ 'harnessInit.backgroundHint': 'この処理が完了するまで OpenHuman を引き続き使用できます。',++ // Keyring consent & security+ 'keyring.consent.title': '安全なストレージが利用できません',+ 'keyring.consent.description':+ 'オペレーティングシステムのキーチェーンにアクセスできません。OpenHuman は、代わりにローカルの暗号化ストレージを使用してシークレットを保存するために権限が必要です。',+ 'keyring.consent.reasonPrefix': '理由:',+ 'keyring.consent.showDetails': 'これは何を意味しますか?',+ 'keyring.consent.hideDetails': '詳細を隠す',+ 'keyring.consent.tradeoffTitle': 'セキュリティ上のトレードオフ',+ 'keyring.consent.tradeoffBody':+ 'ローカル暗号化ストレージでは、データと同じ場所に保存されたマスターキーを使用して、ディスク上のシークレットが暗号化されます。これは、ハードウェアベースの保護を使用する OS キーチェーンよりもセキュリティが低くなります。バックアップやファイル同期に暗号化データが含まれる場合があります。',+ 'keyring.consent.consentButton': 'ローカル暗号化ストレージを使用',+ 'keyring.consent.retryButton': 'OS キーチェーンを再試行',+ 'keyring.consent.declineButton': 'スキップ',+ 'keyring.consent.retrying': '再試行中…',+ 'keyring.consent.error': '設定を保存できませんでした。もう一度お試しください。',+ 'keyring.consent.retryFailed': 'キーチェーンはまだ利用できません。',+ 'keyring.settings.storageMode': 'シークレットストレージモード',+ 'keyring.settings.mode.osKeychain': 'OS キーチェーン',+ 'keyring.settings.mode.encryptedFile': 'ローカル暗号化',+ 'keyring.settings.mode.localEncryptedFile': '暗号化ファイル',+ 'keyring.settings.mode.localPlaintextFile': '非暗号化ファイル',+ 'keyring.settings.mode.consentPending': '未設定',+ 'keyring.settings.mode.declined': '拒否済み',+ 'keyring.settings.availability': 'キーチェーンの利用可否',+ 'keyring.settings.available': 'OS キーチェーンが利用可能です',+ 'keyring.settings.unavailable': 'OS キーチェーンが利用できません',+ 'keyring.settings.backend': 'バックエンド',+ 'keyring.settings.retryButton': 'キーチェーン検出を再試行',+ 'keyring.settings.retryFailed': '再試行に失敗しました。キーチェーンはまだ利用できません。',+ 'keyring.settings.consentTitle': 'ストレージの同意',+ 'keyring.settings.consentDescription':+ 'OSキーチェーンが利用できない場合のシークレットの保存方法を選択してください。',+ 'keyring.settings.grantConsent': 'ローカル暗号化ストレージを許可',+ 'keyring.settings.revokeConsent': 'ローカルストレージを拒否',+ 'pages.settings.account.security': 'セキュリティ',+ 'pages.settings.account.securityDesc': 'シークレットの保存モードとキーチェーンの状態',+ 'settings.keychain.title': 'キーチェーン',++ // Chat: agent-generated artifacts (#2779)+ // Chat composer toolbar+ 'composer.attachFile': 'ファイルを添付',+ 'composer.modelSelector': 'モデル',+ 'composer.reasoning.label': '思考レベル',+ 'composer.reasoning.default': '思考: 自動',+ 'composer.reasoning.none': '思考: オフ',+ 'composer.reasoning.low': '思考: 低',+ 'composer.reasoning.medium': '思考: 中',+ 'composer.reasoning.high': '思考: 高',+ 'composer.reasoning.xhigh': '思考: 最大',+ 'composer.settings.model': 'モデル',+ 'composer.settings.temperature': '温度',+ 'composer.settings.chooseModel': '別のモデルを選択…',+ 'composer.settings.loadingModels': 'モデルを読み込み中…',+ 'composer.voiceMode': '音声モード',+ 'composer.humanMode': 'ヒューマンモード',+ // Sync budget dialog++ // Sync confirm dialog+ 'syncConfirm.title': '同期の確認',+ 'syncConfirm.message':+ 'この同期では約{items}件のアイテムを処理します(約{tokens}トークン、推定費用 ${cost})。',+ 'syncConfirm.budgetNote': '予算上限: ${max}',+ 'syncConfirm.proceed': '続行',+ 'syncConfirm.cancel': 'キャンセル',+ 'syncConfirm.estimating': '費用を推定中...',++ // Monthly cost badge++ // Security banner (approval-gate host-aware boot state)+ 'security.approvalGateDisabled.title': '承認ゲートが無効です',+ 'security.approvalGateDisabled.body':+ '環境変数に OPENHUMAN_APPROVAL_GATE=0 が設定されています。外部への影響を伴うツールは、確認なしで実行されます。',+ 'security.approvalGateOverrideIgnored.title': 'オーバーライドがブロックされました',+ 'security.approvalGateOverrideIgnored.body':+ 'OPENHUMAN_APPROVAL_GATE=0 のオーバーライドが検出されましたが無視されました: デスクトップアプリでは承認ゲートが常に有効に保たれます。',++ // Run queue+ 'notch.ready': '準備完了',+ 'notch.listening': '聞き取り中…',++ // Code block chrome+ 'codeBlock.copy': 'コピー',+ 'codeBlock.copied': 'コピーしました!',++ // User-actionable runtime errors (#3931)+ 'userErrors.dismiss': '閉じる',+ 'userErrors.action.openConnections': '接続を開く',+ 'userErrors.integrationDegraded.title': '接続の状態が最新ではありません',+ 'userErrors.integrationDegraded.body':+ '接続された統合がエラーを返しているため、アプリに表示されている接続状態が最新でない可能性があります。',+ 'userErrors.action.openBilling': '請求を開く',+ 'userErrors.action.openProviderSettings': 'プロバイダー設定',+ 'userErrors.budgetExceeded.title': '管理対象の予算に到達しました',+ 'userErrors.budgetExceeded.body':+ '管理対象のAI予算を使い切りました。予算を追加するか、プランを変更して続行してください。',+ 'userErrors.insufficientCredits.title': 'プロバイダーのクレジットが必要です',+ 'userErrors.insufficientCredits.body':+ 'AIプロバイダーのクレジットが不足しています。チャージするか、APIキーを更新して続行してください。',+ 'userErrors.apiKeyMissing.title': 'APIキーが必要です',+ 'userErrors.apiKeyMissing.body':+ 'AIプロバイダーにAPIキーが設定されていません。プロバイダー設定で追加して続行してください。',+ 'userErrors.localModelUnavailable.title': 'ローカルモデルが利用できません',+ 'userErrors.localModelUnavailable.body':+ '設定されたエンドポイントでOllamaに接続できないか、必要なモデルがインストールされていません。Ollamaを起動してそのエンドポイントでモデルを取得するか、このワークロードをクラウドプロバイダーに切り替えてください。',+ 'userErrors.replyDeliveryFailed.title': '返信を表示できませんでした',+ 'userErrors.replyDeliveryFailed.body':+ 'エージェントはこのターンを完了しましたが、返信を保存または読み取ることができませんでした。もう一度質問して繰り返してもらってください。',+ 'userErrors.scope.chat': 'チャット',+ 'userErrors.scope.cron': 'スケジュールジョブ',+ 'userErrors.scope.workspace': 'ワークスペース',+ 'userErrors.scope.memory': 'メモリー',++ // Memory embedding budget banners (#5324)+ 'notifications.configRecovered.title': '設定ファイルが復元されました',+ 'notifications.configRecovered.body':+ '設定ファイルを読み取れなかったため、バックアップから復元するか、デフォルトにリセットしました。読み取れなかったファイルは、必要に応じて使用できるよう「.corrupted」サフィックスを付けて保持されています。',+ 'chat.sources.usedCount': '{n}件のソースを使用しました',++ // i18n react-audit sweep: assistant-ui attachment/image/tool-fallback/timing/quote+ 'attachment.previewAlt': '添付ファイルプレビュー',+ 'attachment.imagePreviewTitle': '画像添付ファイルプレビュー',+ 'attachment.addAria': '添付ファイルを追加',+ 'elements.artifactCard.wordsOne': '{count}語',+ 'elements.artifactCard.wordsOther': '{count}語',+ 'elements.conversationMap.ariaLabel': '会話マップ',+ 'elements.image.zoomAria': 'クリックして画像を拡大',+ 'elements.image.closeZoomAria': '拡大した画像を閉じる',+ 'elements.image.generating': '画像を生成中…',+ 'elements.image.generateFailed': '画像を生成できませんでした',+ 'elements.image.regenerateAria': '画像を再生成',+ 'elements.image.downloadAria': '画像をダウンロード',+ 'toolFallback.result': '結果:',+ 'messageTiming.ariaLabel': 'メッセージタイミング',+ 'messageTiming.firstToken': '最初のトークン',+ 'messageTiming.total': '合計',+ 'messageTiming.speed': '速度',+ 'messageTiming.tokensPerSecond': '{value} トークン/秒',+ 'messageTiming.chunks': 'チャンク',+ 'quote.label': '引用',+ 'quote.dismiss': '引用を閉じる',++ // i18n react-audit sweep: assistant-ui thread / thread-list / dialog / sheet+ 'assistantUi.threadList.searchThreads': 'スレッドを検索',+ 'assistantUi.threadList.noThreadsFound': 'スレッドが見つかりません',+ 'assistantUi.threadList.newThread': '新しいスレッド',+ 'assistantUi.threadList.loadingThreads': 'スレッドを読み込み中',+ 'assistantUi.threadList.renameThread': 'スレッド名を変更',+ 'assistantUi.threadList.moreOptions': 'その他のオプション',+ 'assistantUi.threadList.rename': '名前を変更',+ 'assistantUi.threadList.archive': 'アーカイブ',+ 'assistantUi.thread.loadingConversation': '会話を読み込み中',+ 'assistantUi.thread.messageInputLabel': 'メッセージ入力',+ 'assistantUi.thread.voiceInput': '音声入力',+ 'assistantUi.thread.startVoiceInput': '音声入力を開始',+ 'assistantUi.thread.stopDictation': '音声入力を停止',+ 'assistantUi.thread.stopVoiceInput': '音声入力を停止',+ 'assistantUi.thread.exportAsMarkdown': 'Markdownとしてエクスポート',++ // i18n react-audit sweep: intelligence panels + ai routing+ 'settings.ai.routing.providerAndModelLabel': 'プロバイダーとモデル',+ 'settings.ai.routing.changeAction': '変更',++ // i18n react-audit sweep: settings/wallet modals + web callback page+ 'settings.tokenUsage.tokensAndCost': '{tokens} トークン · {cost}',+ 'wallet.selectNetwork.title': 'ネットワークを選択',+ 'walletSend.recipientInputPlaceholder': 'アドレスを入力または貼り付け',+ 'webCallback.title': 'サインインを完了しています',+ 'webCallback.description': 'OpenHumanがコールバックを処理しており、自動的に続行されます。',++ // Chat failure copy: localized render of chat_error.message, keyed by chat_error.copy_key+ 'chat_error.codex_session_expired':+ 'Codex セッションの有効期限が切れました。設定 → 接続 で再接続してください。',+ 'chat_error.session_expired':+ 'OpenHumanのセッションの有効期限が切れました。続行するには再度サインインしてください。',+ 'chat_error.action_budget':+ 'OpenHumanの1時間あたりのアクション上限に達しました。これはローカルの安全制限であり、AIプロバイダーの制限ではありません。制限は徐々に緩和されます。このスレッドでのチャットは継続できますが、ツールを多用する処理は予算が回復するまで一時停止します。',+ 'chat_error.max_iterations':+ 'エージェントが1回のターンで実行可能なツールステップの最大数に達しましたが、処理を完了できませんでした。これは通常、ツールの実行が失敗し続けていることを意味します(多くの場合、Web取得のレート制限が原因です)。根本的な制限が解消されたら、このスレッドで同じ質問を再試行してください。',+ 'chat_error.turn_timeout':+ 'このターンは時間予算を超過して完了しなかったため、ハングアップを防ぐために停止されました。これは通常、ツール呼び出しまたは委任されたサブエージェントが停止したことを意味します。このスレッドで質問を再試行してください。',+ 'chat_error.empty_response':+ 'モデルが空の応答を返しました。再試行してください。問題が解決しない場合は、別のモデルを試すか、[接続] → [APIキー] → [LLM]で設定を確認してください。',+ 'chat_error.chat_template_rejected':+ 'このモデルのチャットテンプレートがリクエストを拒否しました。モデル、温度設定、APIキーが原因ではありません。ネイティブなツール呼び出しに対応していないローカルモデルは、独自のチャットテンプレートを通じて駆動されますが、一部のテンプレートはツールステップのメッセージ形式を拒否することがあります。履歴をリセットするために新しいチャットを開始するか、[接続] → [APIキー] → [LLM]でネイティブなツールサポートを持つモデルを選択してください。',+ 'chat_error.rate_limited':+ 'AIプロバイダーがリクエストをレート制限しています。これは一時的な上流側の制限であり、スレッドレベルのブロックではありません。このスレッドで再試行できます。',+ 'chat_error.rate_limited_billing':+ 'AIプロバイダーが課金またはプランの問題(クレジット不足、プラン上限、モデルの利用不可など)によりリクエストを拒否しています。再試行しても解決しません。[設定]を開いてチャージするか、プランをアップグレードするか、別のモデルを選択してください。',+ 'chat_error.managed_rate_limited':+ 'AIプロバイダーがリクエストをレート制限しています。このスレッドで再試行できます。',+ 'chat_error.timeout': 'リクエストがタイムアウトしました。接続を確認して再試行してください。',+ 'chat_error.auth_error':+ 'AIプロバイダーとの認証に問題があります。設定でAPIキーを確認してください。',+ 'chat_error.budget_exhausted':+ 'クレジットが不足しているため、マネージド(クラウド)モデルを実行できません。クレジットをチャージするか、プランを選択して続行してください。または、Ollamaなどのローカルモデルを有効にしている場合は、[接続] → [APIキー] → [LLM]でルーティングを「自分のモデルを使用」に切り替えてください。',+ 'chat_error.managed_budget_exhausted':+ 'クレジットが不足しています。チャージするか、[設定]で「自分のモデルを使用」に切り替えてください。',+ 'chat_error.provider_unavailable':+ 'AIプロバイダーが一時的に利用できません。しばらくしてから再試行してください。',+ 'chat_error.managed_unavailable':+ 'AIサービスが一時的に利用できません。通知済みです。しばらくしてから再試行してください。',+ 'chat_error.payload_too_large':+ 'メッセージまたは添付ファイルがこのモデルにとって大きすぎます。短縮するか、添付ファイルを削除するか、新しいスレッドを開始してください。',+ 'chat_error.context_overflow': '会話が長すぎます。新しいチャットを開始してください。',+ 'chat_error.model_config_rejected':+ 'AIプロバイダーがリクエストのモデルまたは温度設定を拒否しました。[設定] → [LLM]でモデルとルーティングを確認してください。',+ 'chat_error.model_unavailable':+ '選択したモデルがプロバイダーで利用できません。モデル設定を確認してください。',+ 'chat_error.capability_unsupported':+ 'このモデルは画像を処理できません。添付ファイルを削除するか、[接続] → [APIキー] → [LLM]でビジョン対応のモデルに切り替えてください。',+ 'chat_error.malformed_history':+ 'この会話で一時的な不具合が発生しました。解消済みです。メッセージを再送信してください。',+ 'chat_error.request_rejected':+ 'AIプロバイダーがリクエストを拒否しました。これは通常、モデルまたはパラメータの非互換性が原因です。[接続] → [APIキー] → [LLM]で別のモデルを試してください。',+ 'chat_error.managed_request_rejected':+ 'リクエストが拒否されました。これは通常、モデルまたはパラメータの不一致が原因です。[接続] → [APIキー] → [LLM]で別のモデルを試してください。',+ 'chat_error.managed_malformed_request':+ 'このメッセージで問題が発生しました。言い回しを変更するか、問題が解決しない場合は新しいスレッドを開始してください。',+ 'chat_error.network':+ '応答中にAIサービスへの接続が切断されました。これは通常、スリープ/ウェイクアップまたはネットワーク変更が原因です。再試行してください。',+ 'chat_error.inference': '問題が発生しました。再試行してください。',+ 'chat_error.managed_internal': '問題が発生しました。通知済みです。再試行してください。',+ 'chat_error.retryHint.immediately': 'すぐに再試行できます。',+ 'chat_error.retryHint.oneSecond': '1秒後に再試行してください。',+ 'chat_error.retryHint.seconds': '{n}秒後に再試行してください。',+ 'chat_error.retryHint.aboutMinute': '約1分後に再試行してください。',+ 'chat_error.retryHint.aboutMinutes': '約{n}分後に再試行してください。',++ // Memory v2 page (Connections → Memory): engine, ask, learnings,+ // conversations, documents and context chips.+ 'memoryPage.tabs.engine': 'エンジン',+ 'memoryPage.tabs.ask': '質問',+ 'memoryPage.tabs.learnings': '学習内容',+ 'memoryPage.tabs.conversations': '会話',+ 'memoryPage.header.engine': 'メモリーの保存と質問への回答に使うエンジンを選びます。',+ 'memoryPage.header.ask': 'メモリーに質問して、回答の出典を確認できます。',+ 'memoryPage.header.learnings': 'エージェントにいつも覚えておいてほしい事実や好み、手順です。',+ 'memoryPage.header.conversations': 'チャットをメモリーに保存するタイミングを設定します。',+ 'memoryPage.loading': 'メモリーを読み込み中…',+ 'memoryPage.loadMore': 'さらに読み込む',+ 'memoryPage.explorer.facet.namespace': 'メモリーノード',+ 'memoryPage.explorer.namespace.root': '共有(ルート)',+ 'memoryPage.backfill.title': '過去の会話',+ 'memoryPage.backfill.description':+ '自動保存を有効にする前のチャットは、同期するまでメモリーに保存されません。',+ 'memoryPage.backfill.pending':+ '{threads}件のチャット({turns}ターン)がまだメモリーに保存されていません。',+ 'memoryPage.backfill.upToDate': '過去の会話はすべてメモリーに保存されています。',+ 'memoryPage.backfill.action': '過去の会話を同期',+ 'memoryPage.backfill.resume': '同期を再開',+ 'memoryPage.backfill.running': '過去の会話を同期中',+ 'memoryPage.backfill.progress':+ '{total}件中{done}件のチャットを同期済み · {turns}ターンを保存済み',+ 'memoryPage.backfill.done': '{threads}件のチャットから{turns}ターンを保存しました。',+ 'memoryPage.backfill.failed': '同期が途中で停止しました。',+ 'memoryPage.backfill.consentTitle': '過去の会話を同期しますか?',+ 'memoryPage.backfill.consentBody':+ '過去のチャットをメモリーエンジンにアップロードし、他の会話と同じように保存します。ツールの引数は含まれません。次回の同期では、新しい内容だけを送信します。',+ 'memoryPage.backfill.consentConfirm': '今すぐ同期',+ 'memoryPage.tabs.explorer': 'エクスプローラー',+ 'memoryPage.header.explorer':+ 'メモリーの内容をソース、フォルダ、スレッド、タグ別に確認できます。',+ 'memoryPage.explorer.pathLabel': 'エクスプローラーのパス',+ 'memoryPage.explorer.root': 'すべてのメモリー',+ 'memoryPage.explorer.groupTitle': 'グループ化',+ 'memoryPage.explorer.groupDescription': '選んだ分類ごとに件数を表示します。',+ 'memoryPage.explorer.groupBy': 'グループ化の基準',+ 'memoryPage.explorer.total': 'この場所の項目: {count}件',+ 'memoryPage.explorer.noValues': '{facet}が設定された項目はありません。',+ 'memoryPage.explorer.missing': '{count}件の項目でこの値が未設定です。',+ 'memoryPage.explorer.moreBuckets': 'ほか{count}個の値は表示されていません。',+ 'memoryPage.explorer.truncated': 'メモリーの量が多いため、一部の項目だけを集計しています。',+ 'memoryPage.explorer.itemsTitle': 'この場所の項目',+ 'memoryPage.explorer.empty': 'ここには何も保存されていません。',+ 'memoryPage.explorer.open': '開く',+ 'memoryPage.explorer.itemTitle': '保存された項目',+ 'memoryPage.explorer.itemMissing': 'この項目はメモリーにありません。',+ 'memoryPage.explorer.forget': 'メモリーから削除',+ 'memoryPage.explorer.meta.commit': 'コミット',+ 'memoryPage.explorer.meta.turns': 'ターン数',+ 'memoryPage.explorer.meta.observedAt': '観測日時',+ 'memoryPage.explorer.source.conversation': '会話',+ 'memoryPage.explorer.source.agent': 'エージェント',+ 'memoryPage.explorer.source.import': 'インポート',+ 'memoryPage.explorer.facet.kind': '種類',+ 'memoryPage.explorer.facet.source': 'ソース',+ 'memoryPage.explorer.facet.sourceId': 'ソースID',+ 'memoryPage.explorer.facet.workspace': 'ワークスペース',+ 'memoryPage.explorer.facet.folder': 'フォルダ',+ 'memoryPage.explorer.facet.file': 'ファイル',+ 'memoryPage.explorer.facet.language': '言語',+ 'memoryPage.explorer.facet.repo': 'リポジトリ',+ 'memoryPage.explorer.facet.url': 'リンク',+ 'memoryPage.explorer.facet.thread': 'スレッド',+ 'memoryPage.explorer.facet.agent': 'エージェント',+ 'memoryPage.explorer.facet.toolCall': 'ツール',+ 'memoryPage.explorer.facet.tag': 'タグ',+ 'memoryPage.score': 'スコア',+ 'memoryPage.kind.document': 'ドキュメント',+ 'memoryPage.kind.conversation': '会話',+ 'memoryPage.kind.learning': '学習内容',+ 'memoryPage.meta.file': 'ファイル',+ 'memoryPage.meta.folder': 'フォルダ',+ 'memoryPage.meta.repo': 'リポジトリ',+ 'memoryPage.meta.thread': 'スレッド',+ 'memoryPage.meta.url': 'リンク',+ 'memoryPage.off.title': 'メモリーはオフです',+ 'memoryPage.off.description':+ 'メモリーを使うにはエンジンを選んでください。TinyHumansにサインインするか、お使いのCortexDBに接続できます。',+ 'memoryPage.off.action': 'エンジンを選択',+ 'memoryPage.engine.listTitle': 'メモリーエンジン',+ 'memoryPage.engine.listDescription':+ '一度に使えるエンジンは1つです。メモリーのすべての内容を保存し、質問に答えます。',+ 'memoryPage.engine.offExplanation':+ '現在使えるメモリーエンジンがないため、保存や呼び出しができません。TinyHumansにサインインするか、接続先URLとAPIキーを入力してお使いのCortexDBに接続してください。',+ 'memoryPage.engine.statusDegraded': 'メモリーの一部の機能が低下しています',+ 'memoryPage.engine.statusDown': 'メモリーエンジンに接続できません',+ 'memoryPage.engine.statusOff': 'オフ',+ 'memoryPage.engine.active': '有効',+ 'memoryPage.engine.use': '使用',+ 'memoryPage.engine.connect': '接続',+ 'memoryPage.engine.endpoint': '接続先URL',+ 'memoryPage.engine.apiKey': 'APIキー',+ 'memoryPage.engine.keySavedPlaceholder': '保存済み。変更するには新しいキーを入力',+ 'memoryPage.engine.keySavedHint':+ 'キーは保存済みです。変更しない場合は空欄のままにしてください。',+ 'memoryPage.ask.questionLabel': '質問',+ 'memoryPage.ask.queryLabel': '検索内容',+ 'memoryPage.ask.placeholder': 'リリース計画について何を決めましたか?',+ 'memoryPage.ask.rawToggle': '検索結果をそのまま表示',+ 'memoryPage.ask.modeLabel': '検索モード',+ 'memoryPage.ask.modeKeyword': 'キーワード',+ 'memoryPage.ask.modeVector': '意味検索',+ 'memoryPage.ask.modeHybrid': 'ハイブリッド',+ 'memoryPage.ask.ask': '質問',+ 'memoryPage.ask.search': '検索',+ 'memoryPage.ask.thinking': 'メモリーを検索中…',+ 'memoryPage.ask.answerTitle': '回答',+ 'memoryPage.ask.noAnswer': 'その質問への回答はまだありません。',+ 'memoryPage.ask.citations': '出典',+ 'memoryPage.ask.rawTitle': '結果',+ 'memoryPage.ask.noHits': '検索に一致する内容がメモリーにありません。',+ 'memoryPage.learnings.addTitle': 'エージェントに教える',+ 'memoryPage.learnings.addDescription':+ 'エージェントにいつも覚えておいてほしいことを入力してください。',+ 'memoryPage.learnings.textLabel': '学習内容',+ 'memoryPage.learnings.placeholder': 'コード例を含む短い回答が好みです。',+ 'memoryPage.learnings.kindLabel': '種類',+ 'memoryPage.learnings.kindPreference': '好み',+ 'memoryPage.learnings.kindFact': '事実',+ 'memoryPage.learnings.kindProcedure': '手順',+ 'memoryPage.learnings.kindCorrection': '訂正',+ 'memoryPage.learnings.kindOther': 'その他',+ 'memoryPage.learnings.add': '学習内容を追加',+ 'memoryPage.learnings.listTitle': '学習内容',+ 'memoryPage.learnings.empty':+ '学習内容はまだありません。上の欄から追加できます。エージェントも作業中に追加します。',+ 'memoryPage.learnings.delete': '学習内容を削除',+ 'memoryPage.conversations.turns': '{count}ターン',+ 'memoryPage.documents.listDescription': 'これらのソースを同期し、その内容をもとに回答します。',+ 'memoryPage.documents.add': 'ソースを追加',+ 'memoryPage.documents.syncAll': 'すべて同期',+ 'memoryPage.documents.sync': '同期',+ 'memoryPage.documents.remove': '削除',+ 'memoryPage.documents.empty':+ 'ソースはまだありません。フォルダ、ファイル、リンク、GitHubリポジトリ、RSSフィード、Composioアプリを追加してください。',+ 'memoryPage.documents.items': '{count}件',+ 'memoryPage.documents.lastSync': '最終同期: {when}',+ 'memoryPage.documents.neverSynced': '未同期',+ 'memoryPage.documents.every': '{mins}分ごと',+ 'memoryPage.documents.addTitle': 'ソースを追加',+ 'memoryPage.documents.addSubtitle':+ '追加するとすぐに同期します。その後は選んだスケジュールで同期します。',+ 'memoryPage.documents.kindLabel': '種類',+ 'memoryPage.documents.targetLabel': '場所',+ 'memoryPage.documents.labelLabel': '名前(任意)',+ 'memoryPage.documents.scheduleLabel': '同期間隔(分、任意)',+ 'memoryPage.documents.schedulePlaceholder': '標準のスケジュール',+ 'memoryPage.documents.scheduleHelp': '空欄にすると、標準のスケジュールで同期します。',+ 'memoryPage.documents.removeTitle': 'ソースを削除しますか?',+ 'memoryPage.documents.removeBody': '{name}の同期を停止します。',+ 'memoryPage.documents.forgetItems': 'このソースからメモリーに保存した内容もすべて削除する',+ 'memoryPage.sourceKind.folder': 'フォルダ',+ 'memoryPage.sourceKind.file': 'ファイル',+ 'memoryPage.sourceKind.link': 'リンク',+ 'memoryPage.sourceKind.github': 'GitHubリポジトリ',+ 'memoryPage.sourceKind.rss': 'RSSフィード',+ 'memoryPage.sourceKind.composio': 'Composioアプリ',+ 'memoryPage.sourceTarget.folder': '/path/to/folder',+ 'memoryPage.sourceTarget.file': '/path/to/file.md',+ 'memoryPage.sourceTarget.link': 'https://example.com/page',+ 'memoryPage.sourceTarget.github': 'owner/repo',+ 'memoryPage.sourceTarget.rss': 'https://example.com/feed.xml',+ 'memoryPage.sourceTarget.composio': 'Composioアプリ(例: notion)',+ 'memoryPage.sourceStatus.idle': '待機中',+ 'memoryPage.sourceStatus.syncing': '同期中',+ 'memoryPage.sourceStatus.error': 'エラー',+ 'memoryPage.tabs.brain': 'ブレイン',+ 'memoryPage.tabs.background': 'バックグラウンド',+ 'memoryPage.tabs.settings': '設定',+ 'memoryPage.header.brain': 'すべてのエージェントが共有するドキュメントを、ソース別に整理します。',+ 'memoryPage.header.background':+ 'メモリーがバックグラウンドで行う信念の生成とドキュメントのインポート。',+ 'memoryPage.header.settings': '各ターンに追加するメモリーの内容と量を設定します。',+ 'memoryPage.ask.viewLabel': '質問モード',+ 'memoryPage.ask.viewAnswer': '回答',+ 'memoryPage.ask.viewPack': 'パックのプレビュー',+ 'memoryPage.pack.queryLabel': 'メッセージ(任意)',+ 'memoryPage.pack.queryPlaceholder': '今日は何に取り組みましょうか?',+ 'memoryPage.pack.queryHelp':+ 'メッセージを入力すると、その返信に使われるメモリーを確認できます。空欄の場合は、新しい会話の開始時に使われるメモリーを表示します。',+ 'memoryPage.pack.agentLabel': 'エージェント',+ 'memoryPage.pack.agentDefault': '現在のエージェント',+ 'memoryPage.pack.preview': 'プレビュー',+ 'memoryPage.pack.building': 'メモリーパックを作成中…',+ 'memoryPage.pack.turnTitle': 'このメッセージに使うメモリー',+ 'memoryPage.pack.sessionTitle': '新しいセッションに使うメモリー',+ 'memoryPage.pack.scope': 'エージェント {agent} · ルート {root} · エンジン {engine}',+ 'memoryPage.pack.tokens': '{tokens}トークン',+ 'memoryPage.pack.tokensOfBudget': '上限{budget}トークン中{tokens}トークン',+ 'memoryPage.pack.empty': 'このパックに含まれるメモリーはありません。',+ 'memoryPage.pack.sections': 'セクション',+ 'memoryPage.pack.hits': '{count}件の検索結果',+ 'memoryPage.pack.skipped': '除外',+ 'memoryPage.learnings.builtBelief': '生成した信念',+ 'memoryPage.conversations.logTitle': '会話ログ',+ 'memoryPage.conversations.logDescription':+ 'すべての会話の各ターンをその都度メモリーに保存し、エージェントが後から参照できるようにします。',+ 'memoryPage.conversations.logTurns': '各ターンを記録',+ 'memoryPage.conversations.agentsTitle': 'エージェント',+ 'memoryPage.conversations.agentsDescription':+ '会話が保存されているエージェントです。開くと保存内容を確認できます。',+ 'memoryPage.conversations.agentsEmpty': '会話はまだ保存されていません。',+ 'memoryPage.conversations.itemsEmpty': 'このエージェントの会話はまだ保存されていません。',+ 'memoryPage.brain.sourcesTitle': 'ブレイン',+ 'memoryPage.brain.sourcesDescription': '共有ブレインのドキュメントをソース別に表示します。',+ 'memoryPage.brain.addDocument': 'ドキュメントを追加',+ 'memoryPage.brain.empty':+ 'ブレインは空です。ドキュメントを追加するか、下のソースを同期してください。',+ 'memoryPage.brain.documents': '{count}件のドキュメント',+ 'memoryPage.brain.unfiled': '{count}件のドキュメントにソースの種類が設定されていません。',+ 'memoryPage.brain.forgetSource': 'ソースのドキュメントを削除',+ 'memoryPage.brain.forgetTitle': 'このソースのドキュメントを削除しますか?',+ 'memoryPage.brain.forgetBody':+ '{source}のドキュメントをすべてブレインから削除します。この操作は元に戻せません。',+ 'memoryPage.brain.forgotten': '{source}のドキュメントを{count}件削除しました。',+ 'memoryPage.brain.source.pdf': 'PDF',+ 'memoryPage.brain.source.markdown': 'Markdown',+ 'memoryPage.brain.source.notion': 'Notion',+ 'memoryPage.brain.source.github': 'GitHub',+ 'memoryPage.brain.source.web': 'Webページ',+ 'memoryPage.brain.searchTitle': 'ブレインを検索',+ 'memoryPage.brain.searchDescription': 'ドキュメントの内容を検索します。',+ 'memoryPage.brain.searchLabel': 'ブレインを検索',+ 'memoryPage.brain.searchPlaceholder': '四半期の計画メモ',+ 'memoryPage.brain.searchSource': 'ソースの種類',+ 'memoryPage.brain.allSources': 'すべてのソース',+ 'memoryPage.brain.searchEmpty': '検索に一致するドキュメントはブレインにありません。',+ 'memoryPage.brain.ingestTitle': 'ドキュメントを追加',+ 'memoryPage.brain.ingestSubtitle':+ 'ブレインに追加した内容は、すべてのエージェントが参照できます。',+ 'memoryPage.brain.ingest': 'ブレインに追加',+ 'memoryPage.brain.ingestFrom': '追加元',+ 'memoryPage.brain.ingestFromText': 'テキスト',+ 'memoryPage.brain.ingestFromPath': 'このデバイス上のファイル',+ 'memoryPage.brain.textLabel': 'ドキュメントのテキスト',+ 'memoryPage.brain.pathLabel': 'ファイルパス',+ 'memoryPage.brain.titleLabel': 'タイトル(任意)',+ 'memoryPage.brain.sourceLabel': 'ソースの種類(任意)',+ 'memoryPage.brain.sourcePlaceholder': '例: pdf、markdown、notion',+ 'memoryPage.brain.ingestDone': '{source}としてブレインに追加しました。',+ 'memoryPage.brain.ingestReplayed': 'このドキュメントは既にブレインにあります。',+ 'memoryPage.brain.syncedTitle': '同期するソース',+ 'memoryPage.background.pendingTitle': '実行待ち',+ 'memoryPage.background.pendingDescription':+ 'これらのジョブはメモリーが自動で実行します。待たずに実行することもできます。',+ 'memoryPage.background.pendingEmpty': '実行待ちのジョブはありません。',+ 'memoryPage.background.refresh': '更新',+ 'memoryPage.background.runAll': 'すべて今すぐ実行',+ 'memoryPage.background.run': '今すぐ実行',+ 'memoryPage.background.queued': '登録日時: {when}',+ 'memoryPage.background.attempts': '試行回数: {count}回',+ 'memoryPage.background.historyTitle': '最近の実行',+ 'memoryPage.background.historyEmpty': 'まだジョブを実行していません。',+ 'memoryPage.background.built': '{count}件の信念を生成',+ 'memoryPage.background.stored': '{count}件を保存',+ 'memoryPage.background.ran': '{count}件のジョブを実行しました。',+ 'memoryPage.background.job.buildBeliefs': '信念を生成',+ 'memoryPage.background.job.ingestBrain': 'ブレインに追加',+ 'memoryPage.background.outcome.done': '完了',+ 'memoryPage.background.outcome.started': '開始',+ 'memoryPage.background.outcome.scheduled': '実行予定',+ 'memoryPage.background.outcome.skipped': 'スキップ',+ 'memoryPage.background.outcome.failed': '失敗',+ 'memoryPage.settings.recallTitle': '各ターンに使うメモリー',+ 'memoryPage.settings.recallDescription':+ '返信の前に、関連する情報をメモリーから追加します。ここで追加する量を設定します。',+ 'memoryPage.settings.recallEnabled': '各ターンにメモリーを追加',+ 'memoryPage.settings.budget': 'サイズ上限',+ 'memoryPage.settings.budgetHelp': '1ターンに追加するメモリーの上限です。',+ 'memoryPage.settings.tokens': 'トークン',+ 'memoryPage.settings.learningsLimit': '学習内容',+ 'memoryPage.settings.brainLimit': 'ブレインのドキュメント',+ 'memoryPage.settings.historyLimit': '過去の会話',+ 'memoryPage.settings.teamLimit': 'チームのメモリー',+ 'memoryPage.settings.limitHelp':+ '1ターンに追加するこの種類の項目数の上限です。0にすると追加しません。',+ 'memoryPage.settings.buildBeliefsEvery': '信念を生成する間隔',+ 'memoryPage.settings.buildBeliefsHelp':+ 'このターン数ごとに学習内容から信念を生成します。0にすると無効になります。',+ 'memoryPage.settings.turns': 'ターン',+ 'memoryPage.settings.preTurnTimeout': 'メモリーを待つ時間',+ 'memoryPage.settings.preTurnTimeoutHelp': 'メモリーを使わずに返信を始めるまでの待ち時間です。',+ 'memoryPage.settings.ms': 'ms',+ 'memoryPage.settings.identityTitle': 'メモリーの保存先',+ 'memoryPage.settings.identityDescription':+ 'すべてのエージェントが共有するルートと、このアプリが使うエージェントです。',+ 'memoryPage.settings.root': 'ルート',+ 'memoryPage.settings.agentId': 'エージェント',+ 'memoryPage.settings.hostBound':+ 'OpenHumanを動かすアプリが設定するため、ここでは変更できません。',+ 'memoryPage.import.title': '以前のメモリーが見つかりました',+ 'memoryPage.import.counts':+ 'このデバイスには、以前のメモリーのドキュメント{documents}件、会話{conversations}件、学習内容{learnings}件が保存されています。',+ 'memoryPage.import.action': '以前のメモリーをインポート',+ 'memoryPage.import.consentTitle': '以前のメモリーをインポートしますか?',+ 'memoryPage.import.consentBody':+ '以前のメモリーはこのデバイスにだけ保存されています。インポートすると、選択中のメモリーエンジン({engine})にアップロードします。確認するまでアップロードしません。',+ 'memoryPage.import.consentConfirm': 'アップロードしてインポート',+ 'memoryPage.import.running': '以前のメモリーをインポート中…',+ 'memoryPage.import.done': '以前のメモリーをインポートしました',+ 'memoryPage.import.failed': 'インポートできませんでした',+ 'memoryPage.import.progress': '{total}件中{imported}件をインポート済み',+ // First-run and memory controls added upstream.+ 'welcome.hero.subtitle': 'メモリー、音声、Web検索を備えた、あなたのAI。',+ 'welcome.th.title': 'TinyHumansで続ける',+ 'welcome.th.promise': '1つのアカウントですべて使えます。設定は不要です。',+ 'welcome.th.featureInference': '推論',+ 'welcome.th.featureSearch': 'Web検索',+ 'welcome.th.featureVoice': '音声',+ 'welcome.th.featureMemory': 'メモリー',+ 'welcome.th.featureEmbeddings': '埋め込み',+ 'welcome.th.featureBilling': '請求',+ 'welcome.th.credit': '最初に使える5ドル分のクレジット',+ 'welcome.th.cta': 'TinyHumansで続ける',+ 'welcome.th.providers': 'Google、GitHub、Xでサインイン',+ 'welcome.self.title': '自分で設定する',+ 'welcome.self.promise': 'お持ちのAPIキーと接続先を使います。',+ 'welcome.self.listLabel': '設定する項目:',+ 'welcome.self.step1': '推論',+ 'welcome.self.step2': 'Web検索',+ 'welcome.self.step3': 'メモリー',+ 'welcome.self.time': '約3分で設定できます。後から設定画面で変更できます。',+ 'welcome.self.cta': '自分で設定する',+ 'welcome.serverPrompt': 'すでにサーバーでOpenHumanを実行していますか?',+ 'welcome.serverCta': 'サーバーに接続',+ 'welcome.handoff.title': 'ブラウザーでサインインを完了してください',+ 'welcome.handoff.body': 'tinyhumans.aiを開きました。サインインが終わったら戻ってください。',+ 'welcome.handoff.reopen': 'ページをもう一度開く',+ 'welcome.handoff.failedTitle': 'サインイン後にアプリへ戻れませんでした',+ 'welcome.handoff.failedBody': 'ブラウザーがOpenHumanへの移動をブロックした可能性があります。',+ 'welcome.handoff.retry': '再試行',+ 'welcome.handoff.fallbackSelf': '代わりに自分で設定する',+ 'memory.error.insufficientCredits':+ 'クレジットが足りないため、メモリーを使えません。補充すると再び使えます。保存済みの内容は失われていません。',+ 'memory.error.unavailable':+ '現在、メモリーに接続できません。保存済みの内容は失われていません。少し待ってから再試行してください。',+ 'memory.outOfCredits.title': 'クレジット不足',+ 'memory.outOfCredits.action': 'チャージする',+ 'onboarding.custom.search.skipForNow': '今はスキップ',+ 'onboarding.custom.search.ready': 'Web検索の準備ができました。',+ 'onboarding.custom.search.notReady':+ 'OpenHumanでWeb検索を使うには、下のプロバイダーを追加してください。',+ 'onboarding.custom.localDefaultDisabledReason':+ 'マネージド設定にはOpenHumanアカウントが必要です。ローカルセッションでは、各サービスを自分で設定します。',+ 'onboarding.custom.unsavedChanges': '変更を保存してから続けてください。',+ 'chat_error.local_session_managed_unavailable':+ '現在のローカルオフラインプロファイルにはOpenHumanアカウントがないため、マネージド(クラウド)モデルを実行できません。マネージドモデルを使うにはサインインしてください。お持ちのモデルを使う場合は、接続 → APIキー → LLMで「独自のモデルを使う」に切り替え、プロバイダーを追加してください。',+ 'memoryPage.engine.badgeDegraded': '一部機能が低下',+ 'memoryPage.engine.badgeDown': '接続できません',+ 'memoryPage.engine.connecting': '接続中…',+ 'memoryPage.engine.save': '保存',+ 'memoryPage.engine.builtin.title': '標準のCortexDB',+ 'memoryPage.engine.builtin.detail': 'TinyHumansアカウントに含まれます',+ 'memoryPage.engine.builtin.signInRequired': 'サインインして使用',+ 'memoryPage.engine.builtin.description':+ 'TinyHumansが提供するCortexDBです。アカウントに含まれているため、サインインするだけで使えます。設定は不要です。',+ 'memoryPage.engine.builtin.enrichmentNote':+ '新しいメモリーはすぐに保存されます。そこから抽出した事実や考察は、その後数分かけて反映されます。',+ 'memoryPage.engine.builtin.signInHint':+ '標準のCortexDBを使うには、TinyHumansアカウントにサインインしてください。',+ 'memoryPage.engine.apiKeyOption.title': 'APIキーでCortexDBを使用',+ 'memoryPage.engine.apiKeyOption.description':+ 'お持ちのCortexDBアカウントを使います。キーはこのコンピューターに安全に保存され、設定ファイルには書き込まれません。',+ 'memoryPage.engine.selfHost.title': 'CortexDBを自分でホスト',+ 'memoryPage.engine.selfHost.detail': 'このコンピューター上のCortexDBサーバー',+ 'memoryPage.engine.selfHost.step1':+ '次のガイドに従って、このコンピューターでCortexDBサーバーを実行してください:',+ 'memoryPage.engine.selfHost.docsLink': 'CortexDBのセルフホストガイド',+ 'memoryPage.engine.selfHost.step2':+ 'APIキー(CORTEX_API_KEY)を指定してサーバーを起動してください。アプリはそのキーで接続します。',+ 'memoryPage.engine.selfHost.step3':+ '下にサーバーのローカルアドレスとキーを入力して接続してください。',+ 'memoryPage.engine.selfHost.notLocal':+ 'セルフホストでは、このコンピューターのアドレスだけを使えます。例:http://localhost:3141。',+ 'memoryPage.learnings.deriving':+ 'まだ表示する内容はありません。最近の会話から考察を生成しています。次のバックグラウンド処理が終わると、ここに表示されます。',+ 'memoryPage.import.resume': 'インポートを再開',+};++export default messages;diff --git a/app/src/lib/i18n/ko.ts b/app/src/lib/i18n/ko.tsindex a37f07a78f..5daa5dfdf6 100644--- a/app/src/lib/i18n/ko.ts+++ b/app/src/lib/i18n/ko.ts@@ -429,6 +429,35 @@ const messages: TranslationMap = {'welcome.privacyPolicy': '개인정보 보호정책에 동의하게 됩니다.','welcome.termsOutro': '.','welcome.connect': '테스트',+ 'welcome.hero.subtitle': '기억과 음성, 그리고 웹 전체를 갖춘 나만의 AI.',+ 'welcome.th.title': 'TinyHumans로 계속하기',+ 'welcome.th.promise': '계정 하나. 모든 것이 포함. 설정할 것은 없습니다.',+ 'welcome.th.featureInference': '추론',+ 'welcome.th.featureSearch': '웹 검색',+ 'welcome.th.featureVoice': '음성',+ 'welcome.th.featureMemory': '메모리',+ 'welcome.th.featureEmbeddings': '임베딩',+ 'welcome.th.featureBilling': '결제',+ 'welcome.th.credit': '시작 크레딧 $5',+ 'welcome.th.cta': 'TinyHumans로 계속하기',+ 'welcome.th.providers': 'Google, GitHub 또는 X로 로그인',+ 'welcome.self.title': '직접 설정하기',+ 'welcome.self.promise': '직접 가진 API 키와 엔드포인트를 사용하세요.',+ 'welcome.self.listLabel': '설정할 항목:',+ 'welcome.self.step1': '추론',+ 'welcome.self.step2': '웹 검색',+ 'welcome.self.step3': '메모리',+ 'welcome.self.time': '약 3분 걸립니다. 나중에 설정에서 언제든 바꿀 수 있습니다.',+ 'welcome.self.cta': '직접 설정하기',+ 'welcome.serverPrompt': '이미 서버에서 OpenHuman을 실행 중이신가요?',+ 'welcome.serverCta': '서버에 연결하기.',+ 'welcome.handoff.title': '브라우저에서 로그인을 마무리하는 중',+ 'welcome.handoff.body': 'tinyhumans.ai를 열었습니다. 완료되면 돌아오세요.',+ 'welcome.handoff.reopen': '페이지 다시 열기',+ 'welcome.handoff.failedTitle': '로그인이 돌아오지 않았습니다',+ 'welcome.handoff.failedBody': '브라우저가 OpenHuman으로의 복귀를 차단했을 수 있습니다.',+ 'welcome.handoff.retry': '다시 시도',+ 'welcome.handoff.fallbackSelf': '대신 직접 설정하기','home.askAssistant': '어시스턴트에게 무엇이든 물어보세요...','home.statusOk': '어시스턴트가 준비되어 있어요. 아래에 무언가 입력해 시작하세요.','home.statusBackendOnly':@@ -658,6 +687,12 @@ const messages: TranslationMap = {'memory.search': '메모리 검색...','memory.noResults': '메모리를 찾을 수 없습니다','memory.empty': '아직 메모리가 없습니다. 메모리는 상호작용하면서 자동으로 생성됩니다.',+ 'memory.error.insufficientCredits':+ '메모리를 사용할 수 없습니다: 계정의 크레딧이 모두 소진되었습니다. 충전하면 복구되며, 저장된 내용은 사라지지 않았습니다.',+ 'memory.error.unavailable':+ '지금은 메모리에 연결할 수 없습니다. 저장된 내용은 사라지지 않았습니다. 잠시 후 다시 시도하세요.',+ 'memory.outOfCredits.title': '크레딧 소진',+ 'memory.outOfCredits.action': '충전하기','memory.tab.memory': '메모리','memory.tab.agents': '라이브러리','memory.analyzeNow': '지금 분석',@@ -739,9 +774,9 @@ const messages: TranslationMap = {'onboarding.custom.configureLater':'온보딩 후에 이 설정을 마칠 수 있습니다. 완료되면 해당 설정 페이지로 이동합니다.','onboarding.custom.openSettings': '설정에서 열기',- 'onboarding.custom.inference.title': '추론(텍스트)',+ 'onboarding.custom.inference.title': '모델 제공자를 선택하세요','onboarding.custom.inference.subtitle':- '어떤 언어 모델이 질문에 답하고 에이전트를 실행해야 하나요?',+ 'OpenHuman이 생각하려면 모델이 필요합니다. 이미 사용 중인 제공자의 키를 추가하거나, 로컬에서 실행 중인 모델을 지정하세요.','onboarding.custom.inference.defaultDesc':'OpenHuman은 모든 작업을 적절한 기본 모델로 라우팅합니다. 키도 필요 없고 설정도 필요 없습니다.','onboarding.custom.inference.configureDesc':@@ -760,12 +795,16 @@ const messages: TranslationMap = {'OpenHuman은 관리형 Composio 워크스페이스를 실행합니다. 나중에 각 서비스를 한 번의 클릭으로 연결할 수 있습니다.','onboarding.custom.oauth.configureDesc':'직접 Composio 계정 또는 API 키를 가져오세요. 설정 › 연결에서 구성할 수 있습니다.',- 'onboarding.custom.search.title': '웹 검색',- 'onboarding.custom.search.subtitle': 'OpenHuman이 사용자를 대신해 웹을 검색하는 방식입니다.',+ 'onboarding.custom.search.title': 'OpenHuman이 웹을 검색하게 하세요',+ 'onboarding.custom.search.subtitle': '이 기능이 없으면 OpenHuman은 학습된 내용만 알고 있습니다.','onboarding.custom.search.defaultDesc':'웹 검색은 바로 작동합니다. Exa와 Gemini가 TinyHumans에 포함되어 있어 API 키가 필요 없습니다.','onboarding.custom.search.configureDesc':'Exa와 Gemini가 포함되어 있습니다. 설정 › 도구에서 본인 API 키로 검색 제공자를 더 추가하세요.',+ 'onboarding.custom.search.skipForNow': '나중에 하기',+ 'onboarding.custom.search.ready': '웹 검색이 준비되었습니다.',+ 'onboarding.custom.search.notReady':+ 'OpenHuman이 웹을 검색할 수 있도록 아래에 제공자를 추가하세요.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'OpenHuman이 시맨틱 메모리 검색을 위한 벡터 임베딩을 생성하는 방식입니다.',@@ -1612,61 +1651,60 @@ const messages: TranslationMap = {'stats.latest': '최신','stats.sessions': '세션','stats.tokens': '토큰',- 'bootCheck.invalidUrl': '런타임 URL을 입력해 주세요.',+ 'bootCheck.invalidUrl': '주소를 입력하세요.','bootCheck.urlMustStartWith': 'URL은 http:// 또는 https://로 시작해야 합니다','bootCheck.validUrlRequired': '유효한 URL처럼 보이지 않습니다(예: https://core.example.com/rpc)','bootCheck.tokenRequired': '연결하려면 인증 토큰이 필요합니다.','bootCheck.httpPublicWarning':'공개 호스트의 일반 HTTP URL입니다: 트래픽이 암호화되지 않습니다. 이 네트워크를 신뢰하지 않는다면 HTTPS를 사용하세요.',- 'bootCheck.chooseCoreMode': '런타임 선택',- 'bootCheck.connectToCore': '런타임에 연결',+ 'bootCheck.chooseCoreMode': 'OpenHuman을 어디에서 실행할까요?',+ 'bootCheck.connectToCore': 'OpenHuman에 연결','bootCheck.desktopDescription':- 'OpenHuman은 생각하기 위한 런타임이 필요합니다. 어디에서 실행할지 선택하세요.',+ '이 컴퓨터에서 OpenHuman을 시작하지 못했습니다. 실행할 위치를 선택하세요.','bootCheck.webDescription':- '웹에서 OpenHuman은 사용자가 제어하는 런타임에 연결됩니다. 아래에 URL과 인증 토큰을 입력하거나, 데스크톱 앱을 받아 이 컴퓨터에서 바로 실행하세요.',+ '웹에서 OpenHuman은 직접 관리하는 서버에 연결합니다. 아래에 서버 주소와 토큰을 입력하거나, 데스크톱 앱을 받아 내 컴퓨터에서 바로 실행하세요.','bootCheck.preferDesktop': '모든 것을 자신의 기기에 보관하고 싶으신가요?','bootCheck.downloadDesktop': '데스크톱 앱 받기',- 'bootCheck.localRecommended': '로컬에서 실행(추천)',- 'bootCheck.localDescription':- '이 컴퓨터에서 바로 실행됩니다. 가장 빠르고, 완전히 비공개이며, 설정할 것이 없습니다.',- 'bootCheck.cloudMode': '클라우드에서 실행(복잡)',+ 'bootCheck.localRecommended': '이 컴퓨터에서',+ 'bootCheck.localDescription': '가장 빠르고 완전히 비공개이며, 설정할 것이 없습니다.',+ 'bootCheck.cloudMode': '내가 운영하는 서버에서','bootCheck.cloudDescription':- '다른 곳에서 호스팅 중인 런타임에 연결합니다. 24×7 온라인 상태를 유지하므로 이 기기를 계속 켜둘 필요가 없습니다.',- 'bootCheck.coreRpcUrl': '런타임 URL',+ '24시간 온라인 상태를 유지하므로 이 컴퓨터을 계속 켜 둘 필요가 없습니다.',+ 'bootCheck.coreRpcUrl': '주소','bootCheck.rpcUrlPlaceholder': 'https://core.example.com/rpc',- 'bootCheck.authToken': '인증 토큰',- 'bootCheck.bearerTokenPlaceholder': '원격 런타임의 bearer 토큰',+ 'bootCheck.authToken': '토큰',+ 'bootCheck.bearerTokenPlaceholder': '서버에서 받은 토큰','bootCheck.storedLocally': '이 기기에만 보관됩니다. 다음으로 전송됨: ','bootCheck.testing': '테스트 중…','bootCheck.testConnection': '연결 테스트','bootCheck.connectedOk': '연결되었습니다. 사용할 준비가 되었습니다.','bootCheck.authFailed': '해당 토큰이 작동하지 않았습니다. 다시 확인하고 시도하세요.','bootCheck.unreachablePrefix': '연결할 수 없습니다:',- 'bootCheck.checkingCore': '런타임을 깨우는 중…',- 'bootCheck.cannotReach': '런타임에 연결할 수 없습니다',- 'bootCheck.cannotReachDesc': '런타임에 연결할 수 없습니다. 다른 런타임을 시도하시겠습니까?',- 'bootCheck.switchMode': '다른 런타임 선택',+ 'bootCheck.checkingCore': 'OpenHuman을 시작하는 중…',+ 'bootCheck.cannotReach': '연결할 수 없습니다',+ 'bootCheck.cannotReachDesc': '연결하지 못했습니다. 다른 곳에서 시도해 볼까요?',+ 'bootCheck.switchMode': '실행 위치 변경','bootCheck.quit': '종료',- 'bootCheck.legacyDetected': '레거시 백그라운드 런타임 감지됨',+ 'bootCheck.legacyDetected': '오래된 백그라운드 서비스를 발견했습니다','bootCheck.legacyDescription':- '별도로 설치된 OpenHuman 데몬이 이 기기에서 이미 실행 중입니다. 내장 런타임이 대신 실행되기 전에 이를 정리해야 합니다.',+ '별도로 설치된 OpenHuman 데몬이 이 기기에서 이미 실행 중입니다. 내장 버전이 대신하려면 먼저 이를 제거해야 합니다.','bootCheck.removing': '제거 중…','bootCheck.removeContinue': '제거하고 계속',- 'bootCheck.localNeedsRestart': '로컬 런타임을 다시 시작해야 함',+ 'bootCheck.localNeedsRestart': 'OpenHuman을 다시 시작해야 합니다','bootCheck.localNeedsRestartDesc':- '로컬 런타임의 버전이 이 앱과 다릅니다. 빠르게 다시 시작하면 다시 동기화됩니다.',+ '이 컴퓨터의 OpenHuman 버전이 이 앱과 다릅니다. 잠깐 다시 시작하면 다시 맞춰집니다.','bootCheck.restarting': '다시 시작 중…',- 'bootCheck.restartCore': '런타임 다시 시작',- 'bootCheck.cloudNeedsUpdate': '클라우드 런타임 업데이트 필요',+ 'bootCheck.restartCore': '다시 시작',+ 'bootCheck.cloudNeedsUpdate': '서버를 업데이트해야 합니다','bootCheck.cloudNeedsUpdateDesc':- '클라우드 런타임의 버전이 이 앱과 다릅니다. 업데이트 프로그램을 실행하여 다시 동기화하세요.',+ '서버 버전이 이 앱과 다릅니다. 업데이트를 실행해 다시 맞추세요.','bootCheck.updating': '업데이트 중…',- 'bootCheck.updateCloudCore': '클라우드 런타임 업데이트',- 'bootCheck.versionCheckFailed': '런타임 버전 확인 실패',+ 'bootCheck.updateCloudCore': '서버 업데이트',+ 'bootCheck.versionCheckFailed': '버전 확인 실패','bootCheck.versionCheckFailedDesc':- '런타임이 실행 중이지만 버전을 보고하지 않습니다. 오래된 버전일 수 있습니다. 계속하려면 다시 시작하거나 업데이트하세요.',+ '서버는 실행 중이지만 버전을 알려 주지 않습니다. 오래된 버전일 수 있습니다. 계속하려면 다시 시작하거나 업데이트하세요.','bootCheck.working': '작업 중…',- 'bootCheck.restartUpdateCore': '런타임 다시 시작 / 업데이트',+ 'bootCheck.restartUpdateCore': '다시 시작 / 업데이트','bootCheck.unexpectedError': '예상치 못한 부트 체크 오류','bootCheck.actionFailed': '문제가 발생했습니다. 다시 시도해 주세요.','bootCheck.portConflictTitle': '앱 엔진을 시작할 수 없습니다',@@ -3409,6 +3447,8 @@ const messages: TranslationMap = {'기존 통합(Gmail, Slack, GitHub 등 OpenHuman을 통해 연결된 통합)은 표시되지 않습니다: OpenHuman 관리형 Composio 테넌트에 있습니다.','settings.composio.intro':'Composio는 에이전트가 호출할 수 있는 도구로 250개 이상의 외부 앱을 통합합니다. 이러한 도구 호출이 라우팅되는 방식을 선택하세요.',+ 'settings.composio.directOnlyDesc':+ '이 환경에서는 Composio 관리형 인증을 사용할 수 없습니다. 자신의 Composio API 키를 입력하거나 이 단계는 나중에 설정하세요.','settings.composio.modeDirect': 'Direct(직접 API 키 사용)','settings.composio.modeDirectDesc':'호출이 backend.composio.dev로 직접 이동합니다. 독립적이고 오프라인 친화적입니다. 도구 실행은 동기식으로 작동하지만, 실시간 트리거 웹훅은 아직 Direct 모드에서 라우팅되지 않습니다(후속 이슈).',@@ -4330,15 +4370,18 @@ const messages: TranslationMap = {// Monthly cost badge- 'onboarding.custom.vault.title': '메모리 및 볼트 설정',+ 'onboarding.custom.vault.title': 'OpenHuman에게 기억을 주세요','onboarding.custom.vault.subtitle':- '메모리 노트가 기록되는 위치, 소스 데이터를 읽는 방법, 볼트 파이프라인이 정상인지 확인하세요.',+ '말씀하신 내용이 저장되는 곳으로, 대화가 바뀌어도 이어집니다.','onboarding.custom.vault.defaultDesc':'OpenHuman 관리형 메모리 기본값을 사용합니다. 볼트 경로와 동기화 상태는 나중에 검토할 수 있습니다.','onboarding.custom.vault.configureDesc':'볼트 소유권을 검토하고 상태 검사를 실행하며 메모리 컨트롤을 지금 조정하세요.','onboarding.custom.vault.localDisabledReason':'관리형 설정은 OpenHuman 로그인이 필요하며 로컬 모드에서는 사용할 수 없습니다.',+ 'onboarding.custom.localDefaultDisabledReason':+ '관리형 설정에는 OpenHuman 계정이 필요합니다. 로컬 세션에서는 각 서비스를 직접 설정해야 합니다.',+ 'onboarding.custom.unsavedChanges': '계속하기 전에 변경 사항을 저장하세요.','onboarding.custom.vault.exitError': '온보딩을 완료할 수 없습니다. 다시 시도해 주세요.','skills.create.whenToUse': '사용 시점','skills.create.whenToUsePlaceholder': '예: 사용자가 받은 편지함 정리를 요청할 때',@@ -4798,6 +4841,8 @@ const messages: TranslationMap = {'chat_error.codex_session_expired':'Codex 세션이 만료되었습니다. 설정 → 통합에서 다시 연결해 주세요.','chat_error.session_expired': 'OpenHuman 세션이 만료되었습니다. 계속하려면 다시 로그인해 주세요.',+ 'chat_error.local_session_managed_unavailable':+ '로컬 오프라인 프로필을 사용 중이며 연결된 OpenHuman 계정이 없어 관리형(클라우드) 모델을 실행할 수 없습니다. 관리형 모델을 사용하려면 로그인하거나, 연결 → API 키 → LLM에서 라우팅을 "자체 모델 사용"(으)로 바꾸고 직접 사용할 제공업체를 추가하세요.','chat_error.action_budget':'OpenHuman의 시간당 작업 한도에 도달했습니다. 이는 AI 제공업체가 아니라 로컬 안전 한도입니다. 한도는 서서히 회복되므로 이 스레드에서 계속 대화할 수 있으며, 도구를 많이 쓰는 단계는 한도가 채워지는 대로 재개됩니다.','chat_error.max_iterations':@@ -4932,29 +4977,48 @@ const messages: TranslationMap = {'memoryPage.meta.url': '링크','memoryPage.off.title': '메모리가 꺼져 있습니다','memoryPage.off.description':- '기억을 시작하려면 메모리 엔진을 선택하세요. 로그인해서 TinyHumans 메모리를 사용하거나 직접 운영하는 CortexDB를 연결하세요.',+ 'CortexDB를 연결해 기억을 시작하세요. 로그인해 내장 CortexDB를 사용하거나, 자신의 API 키 또는 이 컴퓨터의 서버로 연결하세요.','memoryPage.off.action': '엔진 선택',- 'memoryPage.engine.listTitle': '메모리 엔진',+ 'memoryPage.engine.listTitle': 'CortexDB 메모리','memoryPage.engine.listDescription':- '한 번에 하나의 엔진만 활성화됩니다. 엔진은 메모리가 보관하는 모든 것을 저장하고 이에 대한 질문에 답합니다.',- 'memoryPage.engine.loadError': '메모리 엔진을 불러오지 못했습니다',+ '메모리는 CortexDB에서 실행됩니다. 이 앱이 연결하는 방식을 선택하세요. 한 번에 하나의 연결만 활성화됩니다.','memoryPage.engine.offExplanation':- '현재 사용할 수 있는 메모리 엔진이 없어서 아무것도 저장되거나 불러와지지 않습니다. 로그인해서 TinyHumans 메모리를 사용하거나, 엔드포인트와 API 키로 직접 운영하는 CortexDB를 연결하세요.',+ '지금은 사용할 수 있는 메모리 연결이 없어 아무것도 저장하거나 불러오지 않습니다. 로그인해 내장 CortexDB를 사용하거나, API 키로 또는 이 컴퓨터에서 CortexDB를 연결하세요.','memoryPage.engine.statusDegraded': '메모리 성능이 저하되었습니다','memoryPage.engine.statusDown': '메모리 엔진에 연결할 수 없습니다','memoryPage.engine.statusOff': '꺼짐','memoryPage.engine.active': '사용 중','memoryPage.engine.use': '사용',- 'memoryPage.engine.edit': '편집',- 'memoryPage.engine.signInRequired': '로그인 필요',- 'memoryPage.engine.hostedDetail': 'TinyHumans에서 호스팅',- 'memoryPage.engine.selfHostedDetail': '직접 운영하는 엔드포인트와 API 키',- 'memoryPage.engine.connectTitle': '{engine} 연결','memoryPage.engine.connect': '연결','memoryPage.engine.endpoint': '엔드포인트','memoryPage.engine.apiKey': 'API 키','memoryPage.engine.keySavedPlaceholder': '저장됨. 바꾸려면 새 키를 입력하세요','memoryPage.engine.keySavedHint': '이미 키가 저장되어 있습니다. 유지하려면 비워 두세요.',+ 'memoryPage.engine.badgeDegraded': '성능 저하',+ 'memoryPage.engine.badgeDown': '연결할 수 없음',+ 'memoryPage.engine.connecting': '연결 중…',+ 'memoryPage.engine.save': '저장',+ 'memoryPage.engine.builtin.title': '내장 CortexDB',+ 'memoryPage.engine.builtin.detail': 'TinyHumans 계정에 포함',+ 'memoryPage.engine.builtin.signInRequired': '로그인 후 사용',+ 'memoryPage.engine.builtin.description':+ 'TinyHumans가 호스팅하며 계정에 포함된 CortexDB입니다. 로그인하면 사용할 수 있으며 설정할 것이 없습니다.',+ 'memoryPage.engine.builtin.enrichmentNote':+ '새 기억은 바로 저장됩니다. 여기서 도출된 사실과 신념은 이후 몇 분에 걸쳐 채워집니다.',+ 'memoryPage.engine.builtin.signInHint':+ '내장 CortexDB를 사용하려면 TinyHumans 계정에 로그인하세요.',+ 'memoryPage.engine.apiKeyOption.title': 'API 키로 CortexDB 사용',+ 'memoryPage.engine.apiKeyOption.description':+ '자신의 CortexDB 계정을 사용합니다. 키는 이 컴퓨터에 안전하게 저장되며 설정 파일에는 저장되지 않습니다.',+ 'memoryPage.engine.selfHost.title': 'CortexDB 직접 호스팅',+ 'memoryPage.engine.selfHost.detail': '이 컴퓨터의 CortexDB 서버',+ 'memoryPage.engine.selfHost.step1': '안내서에 따라 이 컴퓨터에서 CortexDB 서버를 실행하세요:',+ 'memoryPage.engine.selfHost.docsLink': 'CortexDB 셀프 호스팅 안내서',+ 'memoryPage.engine.selfHost.step2':+ 'API 키(CORTEX_API_KEY)로 서버를 시작하세요. 앱은 그 키로 연결합니다.',+ 'memoryPage.engine.selfHost.step3': '아래에 서버의 로컬 주소와 키를 입력한 다음 연결하세요.',+ 'memoryPage.engine.selfHost.notLocal':+ '직접 호스팅은 로컬에서만 가능합니다. 이 컴퓨터의 주소(예: http://localhost:3141)를 사용하세요.','memoryPage.ask.questionLabel': '질문','memoryPage.ask.queryLabel': '검색어','memoryPage.ask.placeholder': '출시 계획에 대해 무엇을 결정했나요?',@@ -4985,6 +5049,8 @@ const messages: TranslationMap = {'memoryPage.learnings.listTitle': '학습 내용','memoryPage.learnings.empty':'아직 학습 내용이 없습니다. 위에서 추가하거나, 에이전트가 함께 일하면서 직접 추가합니다.',+ 'memoryPage.learnings.deriving':+ '아직 아무것도 없습니다. 메모리가 최근 대화에서 신념을 만드는 중이며, 다음 백그라운드 실행 후 여기에 표시됩니다.','memoryPage.learnings.delete': '학습 내용 삭제','memoryPage.conversations.turns': '{count}턴','memoryPage.documents.listDescription':@@ -5158,6 +5224,7 @@ const messages: TranslationMap = {'memoryPage.import.running': '이전 메모리를 가져오는 중…','memoryPage.import.done': '이전 메모리를 가져왔습니다','memoryPage.import.failed': '가져오기에 실패했습니다',+ 'memoryPage.import.resume': '가져오기 재개','memoryPage.import.progress': '{total}개 중 {imported}개 항목을 가져왔습니다',// Live voice agents'voice.live.mute': '마이크 음소거',diff --git a/app/src/lib/i18n/pl.ts b/app/src/lib/i18n/pl.tsindex efbb67dced..d222f61f31 100644--- a/app/src/lib/i18n/pl.ts+++ b/app/src/lib/i18n/pl.ts@@ -444,6 +444,35 @@ const messages: TranslationMap = {'welcome.privacyPolicy': 'Politykę prywatności','welcome.termsOutro': '.','welcome.connect': 'Testuj',+ 'welcome.hero.subtitle': 'Twoja AI z pamięcią, głosem i całym internetem.',+ 'welcome.th.title': 'Kontynuuj z TinyHumans',+ 'welcome.th.promise': 'Jedno konto. Wszystko w cenie. Nic do konfigurowania.',+ 'welcome.th.featureInference': 'Wnioskowanie',+ 'welcome.th.featureSearch': 'Wyszukiwanie w sieci',+ 'welcome.th.featureVoice': 'Głos',+ 'welcome.th.featureMemory': 'Pamięć',+ 'welcome.th.featureEmbeddings': 'Embeddingi',+ 'welcome.th.featureBilling': 'Rozliczenia',+ 'welcome.th.credit': '5 $ kredytu na start',+ 'welcome.th.cta': 'Kontynuuj z TinyHumans',+ 'welcome.th.providers': 'Zaloguj się przez Google, GitHub lub X',+ 'welcome.self.title': 'Skonfiguruję to sam',+ 'welcome.self.promise': 'Użyj własnych kluczy API i punktów końcowych.',+ 'welcome.self.listLabel': 'Skonfigurujesz:',+ 'welcome.self.step1': 'Wnioskowanie',+ 'welcome.self.step2': 'Wyszukiwanie w sieci',+ 'welcome.self.step3': 'Pamięć',+ 'welcome.self.time': 'Około 3 minut. Wszystko możesz zmienić później w Ustawieniach.',+ 'welcome.self.cta': 'Skonfiguruję to sam',+ 'welcome.serverPrompt': 'Masz już OpenHuman uruchomiony na serwerze?',+ 'welcome.serverCta': 'Połącz się z nim.',+ 'welcome.handoff.title': 'Kończenie logowania w przeglądarce',+ 'welcome.handoff.body': 'Otworzyliśmy tinyhumans.ai. Wróć, gdy skończysz.',+ 'welcome.handoff.reopen': 'Otwórz stronę ponownie',+ 'welcome.handoff.failedTitle': 'Logowanie nie wróciło',+ 'welcome.handoff.failedBody': 'Przeglądarka mogła zablokować powrót do OpenHuman.',+ 'welcome.handoff.retry': 'Spróbuj ponownie',+ 'welcome.handoff.fallbackSelf': 'Wolę skonfigurować to sam','home.askAssistant': 'Zapytaj asystenta o cokolwiek...','home.statusOk': 'Twój asystent jest gotowy, gdy tylko zechcesz. Napisz coś poniżej, aby zacząć.','home.statusBackendOnly':@@ -680,6 +709,12 @@ const messages: TranslationMap = {'memory.noResults': 'Nie znaleziono wspomnień','memory.empty':'Brak wspomnień. Wspomnienia powstają automatycznie podczas korzystania z aplikacji.',+ 'memory.error.insufficientCredits':+ 'Pamięć jest niedostępna: na koncie skończyły się kredyty. Doładuj konto, aby ją przywrócić; nic z zapisanych danych nie zostało utracone.',+ 'memory.error.unavailable':+ 'Nie można teraz połączyć się z pamięcią. Nic z zapisanych danych nie zostało utracone; spróbuj ponownie za chwilę.',+ 'memory.outOfCredits.title': 'Brak kredytów',+ 'memory.outOfCredits.action': 'Doładuj','memory.tab.memory': 'Pamięć','memory.tab.agents': 'Biblioteka','memory.analyzeNow': 'Analizuj teraz',@@ -765,9 +800,9 @@ const messages: TranslationMap = {'onboarding.custom.configureLater':'Możesz dokończyć konfigurację po wprowadzeniu. Przeniesiemy Cię na odpowiednią stronę Ustawień, kiedy skończysz.','onboarding.custom.openSettings': 'Otwórz w Ustawieniach',- 'onboarding.custom.inference.title': 'Inferencja (tekst)',+ 'onboarding.custom.inference.title': 'Wybierz dostawcę modelu','onboarding.custom.inference.subtitle':- 'Który model językowy ma odpowiadać na pytania i uruchamiać agentów?',+ 'OpenHuman potrzebuje modelu, żeby myśleć. Dodaj klucz do dostawcy, z którego już korzystasz, albo wskaż model działający lokalnie.','onboarding.custom.inference.defaultDesc':'OpenHuman domyślnie kieruje obciążenia przez zarządzany backend. Bez kluczy, bez konfiguracji.','onboarding.custom.inference.configureDesc':@@ -785,12 +820,16 @@ const messages: TranslationMap = {'OpenHuman pośredniczy w OAuth i wywołaniach narzędzi przez zarządzaną przestrzeń Composio.','onboarding.custom.oauth.configureDesc':'Przynieś własne konto / klucz API Composio. Skonfiguruj w Ustawieniach › Połączenia.',- 'onboarding.custom.search.title': 'Wyszukiwanie w sieci',- 'onboarding.custom.search.subtitle': 'Jak OpenHuman wyszukuje w sieci w Twoim imieniu.',+ 'onboarding.custom.search.title': 'Pozwól OpenHuman przeszukiwać internet',+ 'onboarding.custom.search.subtitle': 'Bez tego OpenHuman wie tylko to, na czym go wytrenowano.','onboarding.custom.search.defaultDesc':'Wyszukiwanie w sieci działa od razu: Exa i Gemini są wliczone w TinyHumans, bez klucza API.','onboarding.custom.search.configureDesc':'Exa i Gemini są wliczone. Dodaj kolejnych dostawców wyszukiwania z własnym kluczem API w Ustawienia › Narzędzia.',+ 'onboarding.custom.search.skipForNow': 'Pomiń na razie',+ 'onboarding.custom.search.ready': 'Wyszukiwanie w sieci jest gotowe.',+ 'onboarding.custom.search.notReady':+ 'Dodaj poniżej dostawcę, aby OpenHuman mógł wyszukiwać w sieci.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'Jak OpenHuman generuje wektory embeddings na potrzeby wyszukiwania semantycznego.',@@ -1644,62 +1683,61 @@ const messages: TranslationMap = {'stats.latest': 'Ostatnie','stats.sessions': 'Sesje','stats.tokens': 'tokenów',- 'bootCheck.invalidUrl': 'Wprowadź adres URL środowiska.',+ 'bootCheck.invalidUrl': 'Wpisz adres.','bootCheck.urlMustStartWith': 'Adres musi zaczynać się od http:// lub https://','bootCheck.validUrlRequired':'To nie wygląda na prawidłowy adres URL (spróbuj https://core.example.com/rpc)','bootCheck.tokenRequired': 'Aby się połączyć, potrzebujemy tokenu uwierzytelniania.','bootCheck.httpPublicWarning':'To zwykły adres HTTP na publicznym hoście: ruch nie będzie szyfrowany. Użyj HTTPS, chyba że ufasz tej sieci.',- 'bootCheck.chooseCoreMode': 'Wybierz środowisko',- 'bootCheck.connectToCore': 'Połącz się ze swoim środowiskiem',+ 'bootCheck.chooseCoreMode': 'Gdzie ma działać OpenHuman?',+ 'bootCheck.connectToCore': 'Połącz z OpenHuman','bootCheck.desktopDescription':- 'OpenHuman potrzebuje środowiska do działania. Wybierz, gdzie ma się znajdować.',+ 'Nie udało się uruchomić OpenHuman na tym komputerze. Wybierz, gdzie ma działać.','bootCheck.webDescription':- 'W przeglądarce OpenHuman łączy się ze środowiskiem, którym zarządzasz. Wpisz jego URL i token poniżej lub pobierz aplikację desktopową, aby uruchomić środowisko bezpośrednio na komputerze.',+ 'W przeglądarce OpenHuman łączy się z serwerem, który kontrolujesz. Wpisz poniżej jego adres i token albo pobierz aplikację na komputer, aby uruchomić go bezpośrednio u siebie.','bootCheck.preferDesktop': 'Wolisz wszystko trzymać na własnym urządzeniu?','bootCheck.downloadDesktop': 'Pobierz aplikację desktopową',- 'bootCheck.localRecommended': 'Uruchom lokalnie (zalecane)',- 'bootCheck.localDescription':- 'Działa bezpośrednio na Twoim komputerze. Najszybsze, w pełni prywatne, bez konfiguracji.',- 'bootCheck.cloudMode': 'Uruchom w chmurze (zaawansowane)',+ 'bootCheck.localRecommended': 'Na tym komputerze',+ 'bootCheck.localDescription': 'Najszybciej, w pełni prywatnie, bez konfiguracji.',+ 'bootCheck.cloudMode': 'Na serwerze, który sam prowadzę','bootCheck.cloudDescription':- 'Połącz się ze środowiskiem hostowanym w innym miejscu. Działa 24×7, więc nie musisz trzymać tego urządzenia włączonego.',- 'bootCheck.coreRpcUrl': 'URL środowiska',+ 'Jest online przez całą dobę, więc nie musisz zostawiać włączonego tego komputera.',+ 'bootCheck.coreRpcUrl': 'Adres','bootCheck.rpcUrlPlaceholder': 'https://core.example.com/rpc',- 'bootCheck.authToken': 'Token uwierzytelniania',- 'bootCheck.bearerTokenPlaceholder': 'Token bearer ze zdalnego środowiska',+ 'bootCheck.authToken': 'Token',+ 'bootCheck.bearerTokenPlaceholder': 'Token z Twojego serwera','bootCheck.storedLocally': 'Przechowywany wyłącznie na tym urządzeniu. Wysyłany jako ','bootCheck.testing': 'Testowanie…','bootCheck.testConnection': 'Testuj połączenie','bootCheck.connectedOk': 'Połączono. Możesz działać.','bootCheck.authFailed': 'Ten token nie zadziałał. Sprawdź go i spróbuj ponownie.','bootCheck.unreachablePrefix': 'Nie udało się połączyć:',- 'bootCheck.checkingCore': 'Budzenie środowiska…',- 'bootCheck.cannotReach': 'Nie można połączyć się ze środowiskiem',- 'bootCheck.cannotReachDesc': 'Nie udało się połączyć z Twoim środowiskiem. Spróbować innego?',- 'bootCheck.switchMode': 'Wybierz inne środowisko',+ 'bootCheck.checkingCore': 'Uruchamianie OpenHuman…',+ 'bootCheck.cannotReach': 'Nie można się połączyć',+ 'bootCheck.cannotReachDesc': 'Nie udało się połączyć. Chcesz spróbować gdzie indziej?',+ 'bootCheck.switchMode': 'Zmień, gdzie działa','bootCheck.quit': 'Zakończ',- 'bootCheck.legacyDetected': 'Wykryto starsze środowisko w tle',+ 'bootCheck.legacyDetected': 'Znaleziono starą usługę w tle','bootCheck.legacyDescription':- 'Osobno zainstalowany daemon OpenHuman już działa na tym urządzeniu. Musimy go usunąć, zanim wbudowane środowisko przejmie kontrolę.',+ 'Na tym urządzeniu działa już osobno zainstalowany demon OpenHuman. Musimy go usunąć, zanim wbudowany będzie mógł go zastąpić.','bootCheck.removing': 'Usuwanie…','bootCheck.removeContinue': 'Usuń i kontynuuj',- 'bootCheck.localNeedsRestart': 'Lokalne środowisko wymaga restartu',+ 'bootCheck.localNeedsRestart': 'OpenHuman wymaga ponownego uruchomienia','bootCheck.localNeedsRestartDesc':- 'Twoje lokalne środowisko jest w innej wersji niż ta aplikacja. Szybki restart przywróci zgodność.',+ 'OpenHuman na tym komputerze ma inną wersję niż ta aplikacja. Szybki restart ponownie je zsynchronizuje.','bootCheck.restarting': 'Restartowanie…',- 'bootCheck.restartCore': 'Zrestartuj środowisko',- 'bootCheck.cloudNeedsUpdate': 'Środowisko chmurowe wymaga aktualizacji',+ 'bootCheck.restartCore': 'Uruchom ponownie',+ 'bootCheck.cloudNeedsUpdate': 'Twój serwer wymaga aktualizacji','bootCheck.cloudNeedsUpdateDesc':- 'Twoje środowisko chmurowe jest w innej wersji niż ta aplikacja. Uruchom aktualizację, aby przywrócić zgodność.',+ 'Twój serwer ma inną wersję niż ta aplikacja. Uruchom aktualizację, aby je ponownie zsynchronizować.','bootCheck.updating': 'Aktualizowanie…',- 'bootCheck.updateCloudCore': 'Zaktualizuj środowisko chmurowe',- 'bootCheck.versionCheckFailed': 'Sprawdzenie wersji środowiska nie powiodło się',+ 'bootCheck.updateCloudCore': 'Zaktualizuj serwer',+ 'bootCheck.versionCheckFailed': 'Sprawdzenie wersji nie powiodło się','bootCheck.versionCheckFailedDesc':- 'Środowisko działa, ale nie raportuje wersji. Może być nieaktualne. Zrestartuj lub zaktualizuj, aby kontynuować.',+ 'Twój serwer działa, ale nie zgłasza swojej wersji. Może być nieaktualny. Uruchom go ponownie lub zaktualizuj, aby kontynuować.','bootCheck.working': 'Pracuję…',- 'bootCheck.restartUpdateCore': 'Zrestartuj / zaktualizuj środowisko',+ 'bootCheck.restartUpdateCore': 'Uruchom ponownie / Zaktualizuj','bootCheck.unexpectedError': 'Nieoczekiwany błąd sprawdzania uruchamiania','bootCheck.actionFailed': 'Coś poszło nie tak. Spróbuj ponownie.','bootCheck.portConflictTitle': 'Nie udało się uruchomić silnika aplikacji',@@ -3480,6 +3518,8 @@ const messages: TranslationMap = {'Twoje istniejące integracje (Gmail, Slack, GitHub itp. połączone przez OpenHuman) nie będą widoczne: żyją w tenant Composio zarządzanym przez OpenHuman.','settings.composio.intro':'Composio integruje 250+ zewnętrznych aplikacji jako narzędzia, z których może korzystać Twój agent. Wybierz, jak kierować te wywołania.',+ 'settings.composio.directOnlyDesc':+ 'Zarządzane uwierzytelnianie Composio jest tutaj niedostępne. Wprowadź własny klucz API Composio lub na razie pomiń ten krok.','settings.composio.modeDirect': 'Bezpośredni (przynieś własny klucz API)','settings.composio.modeDirectDesc':'Wywołania trafiają bezpośrednio do backend.composio.dev. Suwerennie / przyjazne offline. Wywołania narzędzi działają synchronicznie; webhooks wyzwalaczy w czasie rzeczywistym nie są jeszcze trasowane w trybie bezpośrednim.',@@ -4422,15 +4462,18 @@ const messages: TranslationMap = {// Monthly cost badge- 'onboarding.custom.vault.title': 'Konfiguracja pamięci i skarbca',+ 'onboarding.custom.vault.title': 'Daj OpenHuman pamięć','onboarding.custom.vault.subtitle':- 'Potwierdź, gdzie zapisywane są notatki pamięci, jak odczytywane są dane źródłowe i czy potok skarbca działa poprawnie.',+ 'Miejsce, w którym zapisuje się to, co mu mówisz, żeby przechodziło między czatami.','onboarding.custom.vault.defaultDesc':'Użyj domyślnych ustawień pamięci zarządzanej przez OpenHuman. Ścieżkę skarbca i stan synchronizacji można sprawdzić później.','onboarding.custom.vault.configureDesc':'Sprawdź właściciela skarbca, uruchom kontrole stanu i dostosuj teraz ustawienia pamięci.','onboarding.custom.vault.localDisabledReason':'Konfiguracja zarządzana wymaga logowania do OpenHuman i jest niedostępna w trybie lokalnym.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'Konfiguracja zarządzana wymaga konta OpenHuman. W sesji lokalnej każdą usługę konfigurujesz samodzielnie.',+ 'onboarding.custom.unsavedChanges': 'Zapisz zmiany, zanim przejdziesz dalej.','onboarding.custom.vault.exitError': 'Nie udało się zakończyć wdrożenia. Spróbuj ponownie.','skills.create.whenToUse': 'Kiedy używać','skills.create.whenToUsePlaceholder':@@ -4910,6 +4953,8 @@ const messages: TranslationMap = {'Twoja sesja Codex wygasła. Połącz ją ponownie w Ustawienia → Integracje.','chat_error.session_expired':'Twoja sesja OpenHuman wygasła. Zaloguj się ponownie, aby kontynuować.',+ 'chat_error.local_session_managed_unavailable':+ 'Korzystasz z lokalnego profilu offline, za którym nie stoi żadne konto OpenHuman, więc zarządzany model (w chmurze) nie może zostać uruchomiony. Zaloguj się, aby używać modeli zarządzanych, albo przełącz routing na „Użyj własnych modeli” w Połączenia → Klucze API → LLM i dodaj własnego dostawcę.','chat_error.action_budget':'Osiągnięto godzinny limit akcji OpenHuman. To lokalny limit bezpieczeństwa, a nie limit Twojego dostawcy AI. Limit odnawia się stopniowo; możesz dalej rozmawiać w tym wątku, a kroki intensywnie korzystające z narzędzi wznowią się w miarę odnawiania limitu.','chat_error.max_iterations':@@ -5045,29 +5090,50 @@ const messages: TranslationMap = {'memoryPage.meta.url': 'Link','memoryPage.off.title': 'Pamięć jest wyłączona','memoryPage.off.description':- 'Wybierz silnik pamięci, aby zacząć zapamiętywać. Zaloguj się, aby korzystać z pamięci TinyHumans, lub podłącz własną bazę CortexDB.',+ 'Połącz CortexDB, aby zacząć zapamiętywać. Zaloguj się, aby używać wbudowanego CortexDB, albo połącz się własnym kluczem API lub z serwerem na tym komputerze.','memoryPage.off.action': 'Wybierz silnik',- 'memoryPage.engine.listTitle': 'Silniki pamięci',+ 'memoryPage.engine.listTitle': 'Pamięć CortexDB','memoryPage.engine.listDescription':- 'Aktywny jest jeden silnik naraz. Przechowuje wszystko, co zapamiętuje pamięć, i odpowiada na pytania o to.',- 'memoryPage.engine.loadError': 'Nie udało się wczytać silników pamięci',+ 'Pamięć działa na CortexDB. Wybierz, jak ta aplikacja się z nim łączy. Naraz aktywne jest tylko jedno połączenie.','memoryPage.engine.offExplanation':- 'Żaden silnik pamięci nie jest teraz dostępny, więc nic nie jest zapisywane ani przywoływane. Zaloguj się, aby korzystać z pamięci TinyHumans, lub podłącz własną bazę CortexDB, podając endpoint i klucz API.',+ 'Żadne połączenie z pamięcią nie jest teraz dostępne, więc nic nie jest zapisywane ani przywoływane. Zaloguj się, aby używać wbudowanego CortexDB, albo połącz CortexDB swoim kluczem API lub na tym komputerze.','memoryPage.engine.statusDegraded': 'Pamięć działa z ograniczeniami','memoryPage.engine.statusDown': 'Silnik pamięci jest nieosiągalny','memoryPage.engine.statusOff': 'Wyłączona','memoryPage.engine.active': 'Aktywny','memoryPage.engine.use': 'Użyj',- 'memoryPage.engine.edit': 'Edytuj',- 'memoryPage.engine.signInRequired': 'Wymagane logowanie',- 'memoryPage.engine.hostedDetail': 'Hostowany przez TinyHumans',- 'memoryPage.engine.selfHostedDetail': 'Twój własny endpoint i klucz API',- 'memoryPage.engine.connectTitle': 'Połącz {engine}','memoryPage.engine.connect': 'Połącz','memoryPage.engine.endpoint': 'Endpoint','memoryPage.engine.apiKey': 'Klucz API','memoryPage.engine.keySavedPlaceholder': 'Zapisano. Wpisz nowy klucz, aby go zastąpić','memoryPage.engine.keySavedHint': 'Klucz jest już zapisany. Zostaw puste, aby go zachować.',+ 'memoryPage.engine.badgeDegraded': 'Ograniczona',+ 'memoryPage.engine.badgeDown': 'Niedostępna',+ 'memoryPage.engine.connecting': 'Łączenie…',+ 'memoryPage.engine.save': 'Zapisz',+ 'memoryPage.engine.builtin.title': 'Wbudowane CortexDB',+ 'memoryPage.engine.builtin.detail': 'W ramach konta TinyHumans',+ 'memoryPage.engine.builtin.signInRequired': 'Zaloguj się, aby używać',+ 'memoryPage.engine.builtin.description':+ 'CortexDB hostowane przez TinyHumans i zawarte w Twoim koncie. Zaloguj się, aby z niego korzystać; nie trzeba nic konfigurować.',+ 'memoryPage.engine.builtin.enrichmentNote':+ 'Nowe wspomnienia są zapisywane od razu. Fakty i przekonania z nich wyciągnięte uzupełniają się w ciągu kolejnych minut.',+ 'memoryPage.engine.builtin.signInHint':+ 'Zaloguj się na konto TinyHumans, aby używać wbudowanego CortexDB.',+ 'memoryPage.engine.apiKeyOption.title': 'CortexDB z Twoim kluczem API',+ 'memoryPage.engine.apiKeyOption.description':+ 'Użyj własnego konta CortexDB. Klucz jest bezpiecznie przechowywany na tym komputerze, nigdy w pliku konfiguracyjnym.',+ 'memoryPage.engine.selfHost.title': 'Hostuj CortexDB samodzielnie',+ 'memoryPage.engine.selfHost.detail': 'Serwer CortexDB na tym komputerze',+ 'memoryPage.engine.selfHost.step1':+ 'Uruchom serwer CortexDB na tym komputerze według przewodnika:',+ 'memoryPage.engine.selfHost.docsLink': 'Przewodnik po samodzielnym hostowaniu CortexDB',+ 'memoryPage.engine.selfHost.step2':+ 'Uruchom serwer z kluczem API (CORTEX_API_KEY). Aplikacja łączy się tym kluczem.',+ 'memoryPage.engine.selfHost.step3':+ 'Wpisz poniżej lokalny adres serwera i klucz, a następnie połącz.',+ 'memoryPage.engine.selfHost.notLocal':+ 'Samodzielne hostowanie działa tylko lokalnie. Użyj adresu na tym komputerze, np. http://localhost:3141.','memoryPage.ask.questionLabel': 'Twoje pytanie','memoryPage.ask.queryLabel': 'Zapytanie wyszukiwania','memoryPage.ask.placeholder': 'Co ustaliliśmy w sprawie planu premiery?',@@ -5098,6 +5164,8 @@ const messages: TranslationMap = {'memoryPage.learnings.listTitle': 'Wnioski','memoryPage.learnings.empty':'Brak wniosków. Dodaj pierwszy powyżej albo agent będzie je dodawać w trakcie pracy z Tobą.',+ 'memoryPage.learnings.deriving':+ 'Na razie nic tu nie ma. Pamięć wciąż buduje przekonania z Twoich ostatnich rozmów; pojawią się tutaj po następnym uruchomieniu w tle.','memoryPage.learnings.delete': 'Usuń wniosek','memoryPage.conversations.turns': 'Wymian: {count}','memoryPage.documents.listDescription':@@ -5275,6 +5343,7 @@ const messages: TranslationMap = {'memoryPage.import.running': 'Importowanie poprzedniej pamięci…','memoryPage.import.done': 'Zaimportowano poprzednią pamięć','memoryPage.import.failed': 'Import nie powiódł się',+ 'memoryPage.import.resume': 'Wznów import','memoryPage.import.progress': 'Zaimportowano {imported} z {total} elementów',// Live voice agents'voice.live.mute': 'Wycisz mikrofon',diff --git a/app/src/lib/i18n/pt.ts b/app/src/lib/i18n/pt.tsindex 113eae6c2f..e876d441b4 100644--- a/app/src/lib/i18n/pt.ts+++ b/app/src/lib/i18n/pt.ts@@ -444,6 +444,35 @@ const messages: TranslationMap = {'welcome.privacyPolicy': 'Política de Privacidade','welcome.termsOutro': '.','welcome.connect': 'Testar',+ 'welcome.hero.subtitle': 'Sua IA, com memória, voz e a web inteira.',+ 'welcome.th.title': 'Continuar com TinyHumans',+ 'welcome.th.promise': 'Uma conta. Tudo incluído. Nada para configurar.',+ 'welcome.th.featureInference': 'Inferência',+ 'welcome.th.featureSearch': 'Pesquisa na web',+ 'welcome.th.featureVoice': 'Voz',+ 'welcome.th.featureMemory': 'Memória',+ 'welcome.th.featureEmbeddings': 'Embeddings',+ 'welcome.th.featureBilling': 'Cobrança',+ 'welcome.th.credit': 'US$ 5 de crédito para começar',+ 'welcome.th.cta': 'Continuar com TinyHumans',+ 'welcome.th.providers': 'Entre com Google, GitHub ou X',+ 'welcome.self.title': 'Configurar por conta própria',+ 'welcome.self.promise': 'Traga suas próprias chaves de API e endpoints.',+ 'welcome.self.listLabel': 'Você vai configurar:',+ 'welcome.self.step1': 'Inferência',+ 'welcome.self.step2': 'Pesquisa na web',+ 'welcome.self.step3': 'Memória',+ 'welcome.self.time': 'Cerca de 3 minutos. Altere qualquer coisa depois em Configurações.',+ 'welcome.self.cta': 'Configurar por conta própria',+ 'welcome.serverPrompt': 'Já executa o OpenHuman em um servidor?',+ 'welcome.serverCta': 'Conecte-se a ele.',+ 'welcome.handoff.title': 'Concluindo o login no seu navegador',+ 'welcome.handoff.body': 'Abrimos o tinyhumans.ai. Volte quando terminar.',+ 'welcome.handoff.reopen': 'Abrir a página novamente',+ 'welcome.handoff.failedTitle': 'O login não voltou',+ 'welcome.handoff.failedBody': 'O navegador pode ter bloqueado o retorno ao OpenHuman.',+ 'welcome.handoff.retry': 'Tentar novamente',+ 'welcome.handoff.fallbackSelf': 'Configurar por conta própria mesmo assim','home.askAssistant': 'Pergunte qualquer coisa ao seu assistente...','home.statusOk':'Seu assistente está pronto quando você estiver. Escreva algo abaixo para começar.',@@ -681,6 +710,12 @@ const messages: TranslationMap = {'memory.noResults': 'Nenhuma memória encontrada','memory.empty':'Nenhuma memória ainda. As memórias são criadas automaticamente conforme você interage.',+ 'memory.error.insufficientCredits':+ 'A memória está indisponível: sua conta ficou sem créditos. Recarregue para restaurá-la; nada do que foi guardado se perdeu.',+ 'memory.error.unavailable':+ 'Não é possível acessar a memória agora. Nada do que foi guardado se perdeu; tente novamente em instantes.',+ 'memory.outOfCredits.title': 'Sem créditos',+ 'memory.outOfCredits.action': 'Recarregar','memory.tab.memory': 'Memória','memory.tab.agents': 'Biblioteca','memory.analyzeNow': 'Analisar Agora',@@ -765,9 +800,9 @@ const messages: TranslationMap = {'onboarding.custom.configureLater':'Você pode terminar de configurar isso após o onboarding. Vamos te levar à página de Configurações correspondente quando terminar.','onboarding.custom.openSettings': 'Abrir nas Configurações',- 'onboarding.custom.inference.title': 'Inferência (Texto)',+ 'onboarding.custom.inference.title': 'Escolha um provedor de modelo','onboarding.custom.inference.subtitle':- 'Qual modelo de linguagem deve responder suas perguntas e executar seus agentes?',+ 'O OpenHuman precisa de um modelo para pensar. Adicione uma chave de um provedor que você já usa, ou aponte para um que esteja rodando localmente.','onboarding.custom.inference.defaultDesc':'O OpenHuman direciona cada carga de trabalho para um modelo padrão adequado. Sem chaves, sem configuração.','onboarding.custom.inference.configureDesc':@@ -785,12 +820,17 @@ const messages: TranslationMap = {'O OpenHuman usa um espaço de trabalho Composio gerenciado. Um clique para conectar cada serviço depois.','onboarding.custom.oauth.configureDesc':'Traga sua própria conta Composio / chave de API. Configure em Configurações › Conexões.',- 'onboarding.custom.search.title': 'Pesquisa na Web',- 'onboarding.custom.search.subtitle': 'Como o OpenHuman pesquisa na web em seu nome.',+ 'onboarding.custom.search.title': 'Deixe o OpenHuman pesquisar na web',+ 'onboarding.custom.search.subtitle':+ 'Sem isso, o OpenHuman só sabe o que aprendeu no treinamento.','onboarding.custom.search.defaultDesc':'A pesquisa na web funciona de imediato: Exa e Gemini estão incluídos no TinyHumans, sem chave de API.','onboarding.custom.search.configureDesc':'Exa e Gemini estão incluídos. Adicione mais provedores de pesquisa com sua própria chave de API em Configurações › Ferramentas.',+ 'onboarding.custom.search.skipForNow': 'Pular por enquanto',+ 'onboarding.custom.search.ready': 'A pesquisa na web está pronta.',+ 'onboarding.custom.search.notReady':+ 'Adicione um provedor abaixo para que o OpenHuman possa pesquisar na web.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'Como o OpenHuman gera embeddings vetoriais para busca semântica na memória.',@@ -1654,63 +1694,61 @@ const messages: TranslationMap = {'stats.latest': 'Mais Recente','stats.sessions': 'Sessões','stats.tokens': 'tokens',- 'bootCheck.invalidUrl': 'Por favor, insira uma URL de runtime.',+ 'bootCheck.invalidUrl': 'Digite um endereço.','bootCheck.urlMustStartWith': 'A URL precisa começar com http:// ou https://','bootCheck.validUrlRequired':'Isso não parece uma URL válida (tente https://core.example.com/rpc)','bootCheck.tokenRequired': 'Vamos precisar de um token de autenticação para conectar.','bootCheck.httpPublicWarning':'Este é um URL HTTP comum em um host público: o tráfego não será criptografado. Use HTTPS a menos que você confie nesta rede.',- 'bootCheck.chooseCoreMode': 'Selecionar um Runtime',- 'bootCheck.connectToCore': 'Conectar ao Seu Runtime',+ 'bootCheck.chooseCoreMode': 'Onde o OpenHuman deve ser executado?',+ 'bootCheck.connectToCore': 'Conectar ao OpenHuman','bootCheck.desktopDescription':- 'O OpenHuman precisa de um runtime para pensar. Escolha onde ele deve ficar.',+ 'O OpenHuman não conseguiu iniciar neste computador. Escolha onde ele deve ser executado.','bootCheck.webDescription':- 'Na web, o OpenHuman conecta-se a um runtime que você controla. Insira o URL e o token de autenticação abaixo, ou baixe o app desktop para rodar um na sua máquina.',+ 'Na web, o OpenHuman se conecta a um servidor que você controla. Informe abaixo o endereço e o token dele, ou baixe o app para desktop para executá-lo diretamente no seu computador.','bootCheck.preferDesktop': 'Prefere manter tudo no seu próprio dispositivo?','bootCheck.downloadDesktop': 'Baixar o App Desktop',- 'bootCheck.localRecommended': 'Rodar Localmente (Recomendado)',- 'bootCheck.localDescription':- 'Roda aqui no seu computador. Mais rápido, totalmente privado, sem nada para configurar.',- 'bootCheck.cloudMode': 'Rodar na Nuvem (Complexo)',+ 'bootCheck.localRecommended': 'Neste computador',+ 'bootCheck.localDescription': 'O mais rápido, totalmente privado, sem nada para configurar.',+ 'bootCheck.cloudMode': 'Em um servidor que eu hospedo','bootCheck.cloudDescription':- 'Conecte a um runtime que você hospeda em outro lugar. Fica online 24×7 para que você não precise manter este dispositivo ligado.',- 'bootCheck.coreRpcUrl': 'URL do Runtime',+ 'Fica online 24 horas por dia, então você não precisa manter este computador ligado.',+ 'bootCheck.coreRpcUrl': 'Endereço','bootCheck.rpcUrlPlaceholder': 'https://core.example.com/rpc',- 'bootCheck.authToken': 'Token de Autenticação',- 'bootCheck.bearerTokenPlaceholder': 'O token bearer do seu runtime remoto',+ 'bootCheck.authToken': 'Token',+ 'bootCheck.bearerTokenPlaceholder': 'O token do seu servidor','bootCheck.storedLocally': 'Mantido apenas neste dispositivo. Enviado como ','bootCheck.testing': 'Testando…','bootCheck.testConnection': 'Testar Conexão','bootCheck.connectedOk': 'Conectado. Tudo pronto.','bootCheck.authFailed': 'Esse token não funcionou. Verifique-o e tente novamente.','bootCheck.unreachablePrefix': 'Não foi possível alcançar:',- 'bootCheck.checkingCore': 'Ativando seu runtime…',- 'bootCheck.cannotReach': 'Não Consigo Alcançar o Runtime',- 'bootCheck.cannotReachDesc':- 'Não foi possível conectar ao seu runtime. Deseja tentar um diferente?',- 'bootCheck.switchMode': 'Escolher um Runtime Diferente',+ 'bootCheck.checkingCore': 'Iniciando o OpenHuman…',+ 'bootCheck.cannotReach': 'Não foi possível conectar',+ 'bootCheck.cannotReachDesc': 'Não conseguimos nos conectar. Quer tentar em outro lugar?',+ 'bootCheck.switchMode': 'Mudar onde ele é executado','bootCheck.quit': 'Sair',- 'bootCheck.legacyDetected': 'Runtime de Segundo Plano Legado Detectado',+ 'bootCheck.legacyDetected': 'Serviço antigo em segundo plano encontrado','bootCheck.legacyDescription':- 'Um daemon OpenHuman instalado separadamente já está rodando neste dispositivo. Precisamos removê-lo antes que o runtime integrado possa assumir.',+ 'Um daemon do OpenHuman instalado separadamente já está em execução neste dispositivo. Precisamos removê-lo antes que o integrado possa assumir.','bootCheck.removing': 'Removendo…','bootCheck.removeContinue': 'Remover e Continuar',- 'bootCheck.localNeedsRestart': 'O Runtime Local Precisa de uma Reinicialização',+ 'bootCheck.localNeedsRestart': 'O OpenHuman precisa ser reiniciado','bootCheck.localNeedsRestartDesc':- 'Seu runtime local está em uma versão diferente deste app. Uma reinicialização rápida vai sincronizá-los.',+ 'O OpenHuman neste computador está em uma versão diferente da deste app. Uma reinicialização rápida os deixará sincronizados novamente.','bootCheck.restarting': 'Reiniciando…',- 'bootCheck.restartCore': 'Reiniciar Runtime',- 'bootCheck.cloudNeedsUpdate': 'O Runtime na Nuvem Precisa de uma Atualização',+ 'bootCheck.restartCore': 'Reiniciar',+ 'bootCheck.cloudNeedsUpdate': 'Seu servidor precisa de uma atualização','bootCheck.cloudNeedsUpdateDesc':- 'Seu runtime na nuvem está em uma versão diferente deste app. Execute o atualizador para sincronizá-los.',+ 'Seu servidor está em uma versão diferente da deste app. Execute o atualizador para sincronizá-los novamente.','bootCheck.updating': 'Atualizando…',- 'bootCheck.updateCloudCore': 'Atualizar Runtime na Nuvem',- 'bootCheck.versionCheckFailed': 'Verificação de Versão do Runtime Falhou',+ 'bootCheck.updateCloudCore': 'Atualizar servidor',+ 'bootCheck.versionCheckFailed': 'Falha na verificação de versão','bootCheck.versionCheckFailedDesc':- 'Seu runtime está ativo, mas não está reportando sua versão. Pode estar desatualizado. Reinicie ou atualize-o para continuar.',+ 'Seu servidor está ativo, mas não informa a versão. Ele pode estar desatualizado. Reinicie ou atualize para continuar.','bootCheck.working': 'Trabalhando…',- 'bootCheck.restartUpdateCore': 'Reiniciar / Atualizar Runtime',+ 'bootCheck.restartUpdateCore': 'Reiniciar / Atualizar','bootCheck.unexpectedError': 'Erro Inesperado na Verificação de Inicialização','bootCheck.actionFailed': 'Algo deu errado. Por favor, tente novamente.','bootCheck.portConflictTitle': 'Não foi possível iniciar o motor do aplicativo',@@ -3479,6 +3517,8 @@ const messages: TranslationMap = {'Suas integrações existentes (Gmail, Slack, GitHub, etc. conectadas via OpenHuman) não ficarão visíveis: elas vivem no tenant do Composio gerenciado pelo OpenHuman.','settings.composio.intro':'O Composio integra mais de 250 apps externos como ferramentas que seu agente pode chamar. Escolha como essas chamadas são roteadas.',+ 'settings.composio.directOnlyDesc':+ 'A autenticação gerenciada do Composio não está disponível aqui. Insira sua própria chave de API do Composio ou pule esta etapa por enquanto.','settings.composio.modeDirect': 'Direto (traga sua própria chave de API)','settings.composio.modeDirectDesc':'As chamadas vão direto para backend.composio.dev. Soberano / amigável para offline. A execução de ferramentas funciona de forma síncrona; webhooks de gatilhos em tempo real ainda não são roteados no modo direto (issue de acompanhamento).',@@ -4422,15 +4462,18 @@ const messages: TranslationMap = {// Onboarding: Custom > Vault'onboarding.custom.stepperVault': 'Vault',- 'onboarding.custom.vault.title': 'Configuração de Memória e Vault',+ 'onboarding.custom.vault.title': 'Dê uma memória ao OpenHuman','onboarding.custom.vault.subtitle':- 'Confirme onde as notas de memória são gravadas, como os dados de origem são lidos e se o pipeline do vault está saudável.',+ 'Onde o que você conta a ele fica guardado, para acompanhar você entre conversas.','onboarding.custom.vault.defaultDesc':'Use os padrões de memória gerenciados pelo OpenHuman. O caminho do vault e a integridade da sincronização ainda podem ser revisados depois.','onboarding.custom.vault.configureDesc':'Revise a propriedade do vault, execute verificações de integridade e ajuste os controles de memória agora.','onboarding.custom.vault.localDisabledReason':'A configuração gerenciada requer login no OpenHuman e não está disponível no modo local.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'A configuração gerenciada requer uma conta OpenHuman. Em uma sessão local, você configura cada serviço por conta própria.',+ 'onboarding.custom.unsavedChanges': 'Salve suas alterações antes de continuar.','onboarding.custom.vault.exitError':'Não foi possível concluir o processo de integração. Por favor, tente novamente.',@@ -4910,6 +4953,8 @@ const messages: TranslationMap = {'chat_error.codex_session_expired':'Sua sessão do Codex expirou. Reconecte-a em Configurações → Integrações.','chat_error.session_expired': 'Sua sessão do OpenHuman expirou. Entre novamente para continuar.',+ 'chat_error.local_session_managed_unavailable':+ 'Você está no perfil local offline, que não tem uma conta OpenHuman por trás, então o modelo gerenciado (na nuvem) não pode ser executado. Entre na sua conta para usar os modelos gerenciados ou mude o roteamento para "Use seus próprios modelos" em Conexões → Chaves de API → LLM e adicione seu próprio provedor.','chat_error.action_budget':'Você atingiu o limite de ações por hora do OpenHuman. É um teto de segurança local, não do seu provedor de IA. A janela se recupera aos poucos; você pode continuar conversando neste tópico e as etapas que usam muitas ferramentas voltarão conforme o limite for reposto.','chat_error.max_iterations':@@ -5046,29 +5091,50 @@ const messages: TranslationMap = {'memoryPage.meta.url': 'Link','memoryPage.off.title': 'A memória está desativada','memoryPage.off.description':- 'Escolha um mecanismo de memória para começar a lembrar. Entre para usar a memória da TinyHumans ou conecte seu próprio CortexDB.',+ 'Conecte o CortexDB para começar a lembrar. Entre para usar o CortexDB integrado ou conecte com sua própria chave de API ou um servidor neste computador.','memoryPage.off.action': 'Escolher um mecanismo',- 'memoryPage.engine.listTitle': 'Mecanismos de memória',+ 'memoryPage.engine.listTitle': 'Memória CortexDB','memoryPage.engine.listDescription':- 'Um mecanismo fica ativo por vez. Ele armazena tudo o que a memória guarda e responde às perguntas sobre isso.',- 'memoryPage.engine.loadError': 'Não foi possível carregar os mecanismos de memória',+ 'A memória funciona com o CortexDB. Escolha como este app se conecta a ele. Só uma conexão fica ativa por vez.','memoryPage.engine.offExplanation':- 'Nenhum mecanismo de memória está disponível no momento, então nada é armazenado nem recuperado. Entre para usar a memória da TinyHumans ou conecte seu próprio CortexDB com um endpoint e uma chave de API.',+ 'Nenhuma conexão de memória está utilizável agora, então nada é salvo ou recuperado. Entre para usar o CortexDB integrado ou conecte o CortexDB com sua chave de API ou neste computador.','memoryPage.engine.statusDegraded': 'A memória está degradada','memoryPage.engine.statusDown': 'O mecanismo de memória está inacessível','memoryPage.engine.statusOff': 'Desativado','memoryPage.engine.active': 'Ativo','memoryPage.engine.use': 'Usar',- 'memoryPage.engine.edit': 'Editar',- 'memoryPage.engine.signInRequired': 'Login necessário',- 'memoryPage.engine.hostedDetail': 'Hospedado pela TinyHumans',- 'memoryPage.engine.selfHostedDetail': 'Seu próprio endpoint e chave de API',- 'memoryPage.engine.connectTitle': 'Conectar {engine}','memoryPage.engine.connect': 'Conectar','memoryPage.engine.endpoint': 'Endpoint','memoryPage.engine.apiKey': 'Chave de API','memoryPage.engine.keySavedPlaceholder': 'Salva. Digite uma nova chave para substituí-la','memoryPage.engine.keySavedHint': 'Já há uma chave salva. Deixe em branco para mantê-la.',+ 'memoryPage.engine.badgeDegraded': 'Degradado',+ 'memoryPage.engine.badgeDown': 'Inacessível',+ 'memoryPage.engine.connecting': 'Conectando…',+ 'memoryPage.engine.save': 'Salvar',+ 'memoryPage.engine.builtin.title': 'CortexDB integrado',+ 'memoryPage.engine.builtin.detail': 'Incluído na sua conta TinyHumans',+ 'memoryPage.engine.builtin.signInRequired': 'Entre para usar',+ 'memoryPage.engine.builtin.description':+ 'CortexDB hospedado pela TinyHumans e incluído na sua conta. Entre para usar; não há nada para configurar.',+ 'memoryPage.engine.builtin.enrichmentNote':+ 'Novas memórias são salvas na hora. Os fatos e crenças extraídos delas são preenchidos nos minutos seguintes.',+ 'memoryPage.engine.builtin.signInHint':+ 'Entre na sua conta TinyHumans para usar o CortexDB integrado.',+ 'memoryPage.engine.apiKeyOption.title': 'CortexDB com sua chave de API',+ 'memoryPage.engine.apiKeyOption.description':+ 'Use sua própria conta do CortexDB. A chave fica guardada com segurança neste computador, nunca no arquivo de configuração.',+ 'memoryPage.engine.selfHost.title': 'Hospedar o CortexDB você mesmo',+ 'memoryPage.engine.selfHost.detail': 'Um servidor CortexDB neste computador',+ 'memoryPage.engine.selfHost.step1':+ 'Execute um servidor CortexDB neste computador seguindo o guia:',+ 'memoryPage.engine.selfHost.docsLink': 'Guia de auto-hospedagem do CortexDB',+ 'memoryPage.engine.selfHost.step2':+ 'Inicie o servidor com uma chave de API (CORTEX_API_KEY). O app se conecta com essa chave.',+ 'memoryPage.engine.selfHost.step3':+ 'Informe abaixo o endereço local do servidor e a chave e conecte.',+ 'memoryPage.engine.selfHost.notLocal':+ 'A auto-hospedagem é apenas local. Use um endereço deste computador, como http://localhost:3141.','memoryPage.ask.questionLabel': 'Sua pergunta','memoryPage.ask.queryLabel': 'Consulta de busca','memoryPage.ask.placeholder': 'O que decidimos sobre o plano de lançamento?',@@ -5099,6 +5165,8 @@ const messages: TranslationMap = {'memoryPage.learnings.listTitle': 'Aprendizados','memoryPage.learnings.empty':'Nenhum aprendizado ainda. Adicione um acima, ou seu agente os adicionará conforme trabalha com você.',+ 'memoryPage.learnings.deriving':+ 'Nada aqui ainda. A memória ainda está construindo crenças a partir das suas conversas recentes; elas aparecerão aqui após a próxima execução em segundo plano.','memoryPage.learnings.delete': 'Excluir aprendizado','memoryPage.conversations.turns': '{count} turnos','memoryPage.documents.listDescription':@@ -5276,6 +5344,7 @@ const messages: TranslationMap = {'memoryPage.import.running': 'Importando memória anterior…','memoryPage.import.done': 'Memória anterior importada','memoryPage.import.failed': 'Falha na importação',+ 'memoryPage.import.resume': 'Retomar importação','memoryPage.import.progress': '{imported} de {total} itens importados',// Live voice agents'voice.live.mute': 'Silenciar microfone',diff --git a/app/src/lib/i18n/ru.ts b/app/src/lib/i18n/ru.tsindex b82644ee50..cb00f9879f 100644--- a/app/src/lib/i18n/ru.ts+++ b/app/src/lib/i18n/ru.ts@@ -441,6 +441,35 @@ const messages: TranslationMap = {'welcome.privacyPolicy': 'Политикой конфиденциальности.','welcome.termsOutro': '.','welcome.connect': 'Проверить',+ 'welcome.hero.subtitle': 'Ваш ИИ с памятью, голосом и всем интернетом.',+ 'welcome.th.title': 'Продолжить с TinyHumans',+ 'welcome.th.promise': 'Один аккаунт. Всё включено. Ничего настраивать не нужно.',+ 'welcome.th.featureInference': 'Инференс',+ 'welcome.th.featureSearch': 'Поиск в интернете',+ 'welcome.th.featureVoice': 'Голос',+ 'welcome.th.featureMemory': 'Память',+ 'welcome.th.featureEmbeddings': 'Эмбеддинги',+ 'welcome.th.featureBilling': 'Оплата',+ 'welcome.th.credit': '5 $ кредита для начала',+ 'welcome.th.cta': 'Продолжить с TinyHumans',+ 'welcome.th.providers': 'Войдите через Google, GitHub или X',+ 'welcome.self.title': 'Настрою сам',+ 'welcome.self.promise': 'Используйте собственные API-ключи и конечные точки.',+ 'welcome.self.listLabel': 'Вы настроите:',+ 'welcome.self.step1': 'Инференс',+ 'welcome.self.step2': 'Поиск в интернете',+ 'welcome.self.step3': 'Память',+ 'welcome.self.time': 'Около 3 минут. Всё можно изменить позже в Настройках.',+ 'welcome.self.cta': 'Настрою сам',+ 'welcome.serverPrompt': 'Уже запустили OpenHuman на сервере?',+ 'welcome.serverCta': 'Подключитесь к нему.',+ 'welcome.handoff.title': 'Завершаем вход в вашем браузере',+ 'welcome.handoff.body': 'Мы открыли tinyhumans.ai. Вернитесь, когда закончите.',+ 'welcome.handoff.reopen': 'Открыть страницу снова',+ 'welcome.handoff.failedTitle': 'Вход не вернулся',+ 'welcome.handoff.failedBody': 'Возможно, браузер заблокировал возврат в OpenHuman.',+ 'welcome.handoff.retry': 'Повторить',+ 'welcome.handoff.fallbackSelf': 'Лучше настрою сам','home.askAssistant': 'Спроси ассистента о чём угодно...','home.statusOk':'Ваш ассистент готов, когда вы будете готовы. Напишите что-нибудь ниже, чтобы начать.',@@ -675,6 +704,12 @@ const messages: TranslationMap = {'memory.search': 'Поиск воспоминаний...','memory.noResults': 'Воспоминания не найдены','memory.empty': 'Воспоминаний пока нет. Они создаются автоматически в процессе общения.',+ 'memory.error.insufficientCredits':+ 'Память недоступна: на счёте закончились кредиты. Пополните баланс, чтобы восстановить её; ничего из сохранённого не потеряно.',+ 'memory.error.unavailable':+ 'Сейчас не удаётся связаться с памятью. Ничего из сохранённого не потеряно; повторите попытку чуть позже.',+ 'memory.outOfCredits.title': 'Кредиты закончились',+ 'memory.outOfCredits.action': 'Пополнить','memory.tab.memory': 'Память','memory.tab.agents': 'Библиотека','memory.analyzeNow': 'Анализировать сейчас',@@ -758,9 +793,9 @@ const messages: TranslationMap = {'onboarding.custom.configureLater':'Можно завершить настройку после онбординга. Мы откроем нужную страницу настроек.','onboarding.custom.openSettings': 'Открыть в настройках',- 'onboarding.custom.inference.title': 'Инференс (текст)',+ 'onboarding.custom.inference.title': 'Выберите поставщика моделей','onboarding.custom.inference.subtitle':- 'Какая языковая модель будет отвечать на вопросы и запускать агентов?',+ 'OpenHuman нужна модель, чтобы думать. Добавьте ключ поставщика, которым вы уже пользуетесь, или укажите модель, работающую локально.','onboarding.custom.inference.defaultDesc':'OpenHuman автоматически выбирает подходящую модель. Без ключей и настроек.','onboarding.custom.inference.configureDesc':@@ -777,12 +812,16 @@ const messages: TranslationMap = {'OpenHuman использует управляемое рабочее пространство Composio. Один клик для подключения каждого сервиса.','onboarding.custom.oauth.configureDesc':'Используй свой аккаунт Composio / API-ключ. Настрой в Настройки › Подключения.',- 'onboarding.custom.search.title': 'Поиск в интернете',- 'onboarding.custom.search.subtitle': 'Как OpenHuman ищет информацию в интернете.',+ 'onboarding.custom.search.title': 'Позвольте OpenHuman искать в интернете',+ 'onboarding.custom.search.subtitle': 'Без этого OpenHuman знает только то, чему его обучили.','onboarding.custom.search.defaultDesc':'Веб-поиск работает сразу: Exa и Gemini включены в TinyHumans, API-ключ не нужен.','onboarding.custom.search.configureDesc':'Exa и Gemini уже включены. Добавьте других поисковых провайдеров со своим API-ключом в Настройки › Инструменты.',+ 'onboarding.custom.search.skipForNow': 'Пропустить пока',+ 'onboarding.custom.search.ready': 'Веб-поиск готов.',+ 'onboarding.custom.search.notReady':+ 'Добавьте провайдера ниже, чтобы OpenHuman мог искать в интернете.','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle':'Как OpenHuman создаёт векторные эмбеддинги для семантического поиска в памяти.',@@ -873,7 +912,7 @@ const messages: TranslationMap = {'settings.costDashboard.title': 'Панель затрат','settings.costDashboard.sevenDayCost': '7-дневная ежедневная стоимость','settings.costDashboard.sevenDayTokens': '7-дневное использование токена',- 'settings.costDashboard.totalSpend': 'всего 7 дней',+ 'settings.costDashboard.totalSpend': 'всего 7 дней','settings.costDashboard.monthlyPace': 'Ежемесячный темп','settings.costDashboard.modelBreakdown': 'Разбивка по моделям','settings.costDashboard.model': 'Модель',@@ -884,8 +923,8 @@ const messages: TranslationMap = {'settings.costDashboard.percentOfTotal': '% от общего количества','settings.costDashboard.inputTokens': 'Вход','settings.costDashboard.outputTokens': 'Выход',- 'settings.costDashboard.noData': 'За последние 7 дней стоимость еще не зафиксирована.',- 'settings.costDashboard.noModels': 'Никакой активности модели за последние 7 дней.',+ 'settings.costDashboard.noData': 'За последние 7 дней стоимость еще не зафиксирована.',+ 'settings.costDashboard.noModels': 'Никакой активности модели за последние 7 дней.','settings.costDashboard.loading': 'Загрузка сводки расходов…','settings.costDashboard.disabledHint':'Панель затрат отключена в конфигурации. Установите [cost.dashboard] Enabled = True в config.toml, чтобы повторно включить.',@@ -906,7 +945,7 @@ const messages: TranslationMap = {'settings.costDashboard.refresh': 'Обновить','settings.costDashboard.utcNote': 'Дни, разбитые по UTC','settings.costDashboard.stackedNote': 'Вход + выход сложены',- 'settings.costDashboard.modelBreakdownHint': 'Совокупно за последние 7 дней.',+ 'settings.costDashboard.modelBreakdownHint': 'Совокупно за последние 7 дней.','settings.costDashboard.usageLog': 'Журнал использования','settings.costDashboard.usageLogHint':'Новые записи за последние {days} дней, не более {limit} строк.',@@ -1637,62 +1676,61 @@ const messages: TranslationMap = {'stats.latest': 'Последнее','stats.sessions': 'Сессии','stats.tokens': 'токенов',- 'bootCheck.invalidUrl': 'Введи URL среды выполнения.',+ 'bootCheck.invalidUrl': 'Введите адрес.','bootCheck.urlMustStartWith': 'URL должен начинаться с http:// или https://','bootCheck.validUrlRequired':'Похоже, это не корректный URL (попробуй https://core.example.com/rpc)','bootCheck.tokenRequired': 'Для подключения нужен токен авторизации.','bootCheck.httpPublicWarning':'Это обычный HTTP-адрес на публичном хосте: трафик не будет зашифрован. Используйте HTTPS, если вы не доверяете этой сети.',- 'bootCheck.chooseCoreMode': 'Выбрать среду выполнения',- 'bootCheck.connectToCore': 'Подключиться к среде выполнения',+ 'bootCheck.chooseCoreMode': 'Где запускать OpenHuman?',+ 'bootCheck.connectToCore': 'Подключение к OpenHuman','bootCheck.desktopDescription':- 'OpenHuman нужна среда выполнения для работы. Выбери, где она должна находиться.',+ 'OpenHuman не удалось запустить на этом компьютере. Выберите, где он должен работать.','bootCheck.webDescription':- 'В браузере OpenHuman подключается к среде выполнения под твоим управлением. Введи URL и токен авторизации, или скачай настольное приложение для локального запуска.',+ 'В вебе OpenHuman подключается к серверу, которым управляете вы. Введите ниже его адрес и токен или скачайте приложение для компьютера, чтобы запустить его прямо у себя.','bootCheck.preferDesktop': 'Хочешь держать всё на своём устройстве?','bootCheck.downloadDesktop': 'Скачать настольное приложение',- 'bootCheck.localRecommended': 'Запустить локально (рекомендуется)',- 'bootCheck.localDescription':- 'Работает прямо на твоём компьютере. Быстро, полностью приватно, ничего настраивать не нужно.',- 'bootCheck.cloudMode': 'Запустить в облаке (сложно)',+ 'bootCheck.localRecommended': 'На этом компьютере',+ 'bootCheck.localDescription': 'Быстрее всего, полностью приватно, ничего настраивать не нужно.',+ 'bootCheck.cloudMode': 'На моём сервере','bootCheck.cloudDescription':- 'Подключись к среде выполнения, которую ты размещаешь в другом месте. Работает 24×7, не нужно держать это устройство включённым.',- 'bootCheck.coreRpcUrl': 'URL среды выполнения',+ 'Работает круглосуточно, так что этот компьютер не нужно держать включённым.',+ 'bootCheck.coreRpcUrl': 'Адрес','bootCheck.rpcUrlPlaceholder': 'https://core.example.com/rpc',- 'bootCheck.authToken': 'Токен авторизации',- 'bootCheck.bearerTokenPlaceholder': 'Bearer-токен от твоей удалённой среды выполнения',+ 'bootCheck.authToken': 'Токен',+ 'bootCheck.bearerTokenPlaceholder': 'Токен с вашего сервера','bootCheck.storedLocally': 'Хранится только на этом устройстве. Отправляется как ','bootCheck.testing': 'Проверка…','bootCheck.testConnection': 'Проверить соединение','bootCheck.connectedOk': 'Подключено. Всё готово.','bootCheck.authFailed': 'Токен не подошёл. Проверь его и попробуй снова.','bootCheck.unreachablePrefix': 'Не удалось достучаться:',- 'bootCheck.checkingCore': 'Пробуждение среды выполнения…',- 'bootCheck.cannotReach': 'Нет доступа к среде выполнения',- 'bootCheck.cannotReachDesc': 'Не удалось подключиться к среде выполнения. Попробовать другую?',- 'bootCheck.switchMode': 'Выбрать другую среду',+ 'bootCheck.checkingCore': 'Запускаем OpenHuman…',+ 'bootCheck.cannotReach': 'Не удаётся подключиться',+ 'bootCheck.cannotReachDesc': 'Нам не удалось подключиться. Попробовать другой вариант?',+ 'bootCheck.switchMode': 'Изменить, где он работает','bootCheck.quit': 'Выйти',- 'bootCheck.legacyDetected': 'Обнаружена устаревшая фоновая среда',+ 'bootCheck.legacyDetected': 'Найдена старая фоновая служба','bootCheck.legacyDescription':- 'На этом устройстве уже запущен отдельно установленный демон OpenHuman. Нужно его убрать, прежде чем встроенная среда сможет взять управление.',+ 'На этом устройстве уже работает отдельно установленный демон OpenHuman. Его нужно удалить, прежде чем встроенный сможет начать работу.','bootCheck.removing': 'Удаление…','bootCheck.removeContinue': 'Удалить и продолжить',- 'bootCheck.localNeedsRestart': 'Требуется перезапуск локальной среды',+ 'bootCheck.localNeedsRestart': 'OpenHuman нужно перезапустить','bootCheck.localNeedsRestartDesc':- 'Локальная среда выполнения и приложение используют разные версии. Быстрый перезапуск синхронизирует их.',+ 'Версия OpenHuman на этом компьютере отличается от версии этого приложения. Быстрый перезапуск снова их синхронизирует.','bootCheck.restarting': 'Перезапуск…',- 'bootCheck.restartCore': 'Перезапустить среду',- 'bootCheck.cloudNeedsUpdate': 'Требуется обновление облачной среды',+ 'bootCheck.restartCore': 'Перезапустить',+ 'bootCheck.cloudNeedsUpdate': 'Вашему серверу нужно обновление','bootCheck.cloudNeedsUpdateDesc':- 'Облачная среда и приложение используют разные версии. Запусти обновление для синхронизации.',+ 'Версия вашего сервера отличается от версии этого приложения. Запустите обновление, чтобы снова их синхронизировать.','bootCheck.updating': 'Обновление…',- 'bootCheck.updateCloudCore': 'Обновить облачную среду',- 'bootCheck.versionCheckFailed': 'Проверка версии среды не удалась',+ 'bootCheck.updateCloudCore': 'Обновить сервер',+ 'bootCheck.versionCheckFailed': 'Не удалось проверить версию','bootCheck.versionCheckFailedDesc':- 'Среда работает, но не сообщает свою версию. Возможно, она устарела. Перезапусти или обнови её для продолжения.',+ 'Ваш сервер работает, но не сообщает свою версию. Возможно, она устарела. Перезапустите или обновите его, чтобы продолжить.','bootCheck.working': 'Работаю…',- 'bootCheck.restartUpdateCore': 'Перезапустить / обновить среду',+ 'bootCheck.restartUpdateCore': 'Перезапустить / Обновить','bootCheck.unexpectedError': 'Неожиданная ошибка при загрузке','bootCheck.actionFailed': 'Что-то пошло не так. Попробуй ещё раз.','bootCheck.portConflictTitle': 'Не удалось запустить движок приложения',@@ -3464,6 +3502,8 @@ const messages: TranslationMap = {'Ваши существующие интеграции (Gmail, Slack, GitHub и т. д., привязанные через OpenHuman) не будут видны: они находятся в управляемом OpenHuman тенанте Composio.','settings.composio.intro':'Composio интегрирует 250+ внешних приложений как инструменты, которые может вызывать ваш агент. Выберите способ маршрутизации этих вызовов.',+ 'settings.composio.directOnlyDesc':+ 'Управляемая аутентификация Composio здесь недоступна. Введите свой ключ API Composio или пока пропустите этот шаг.','settings.composio.modeDirect': 'Прямой (собственный API-ключ)','settings.composio.modeDirectDesc':'Вызовы идут напрямую на backend.composio.dev. Суверенно и подходит для офлайн. Выполнение инструментов работает синхронно; вебхуки триггеров в реальном времени пока не маршрутизируются в прямом режиме (см. отдельную задачу).',@@ -4408,15 +4448,18 @@ const messages: TranslationMap = {// Monthly cost badge- 'onboarding.custom.vault.title': 'Настройка памяти и хранилища',+ 'onboarding.custom.vault.title': 'Дайте OpenHuman память','onboarding.custom.vault.subtitle':- 'Подтвердите, куда записываются заметки памяти, как считываются исходные данные и исправно ли работает конвейер хранилища.',+ 'Место, где хранится то, что вы ему рассказываете, чтобы это сохранялось между чатами.','onboarding.custom.vault.defaultDesc':'Использовать настройки памяти по умолчанию, управляемые OpenHuman. Путь к хранилищу и состояние синхронизации можно проверить позже.','onboarding.custom.vault.configureDesc':'Проверьте владельца хранилища, выполните проверки состояния и настройте параметры памяти прямо сейчас.','onboarding.custom.vault.localDisabledReason':'Управляемая настройка требует входа в OpenHuman и недоступна в локальном режиме.',+ 'onboarding.custom.localDefaultDisabledReason':+ 'Управляемая настройка требует аккаунта OpenHuman. В локальной сессии вы настраиваете каждый сервис самостоятельно.',+ 'onboarding.custom.unsavedChanges': 'Сохраните изменения, прежде чем продолжить.','onboarding.custom.vault.exitError':'Не удалось завершить настройку. Пожалуйста, попробуйте ещё раз.','skills.create.whenToUse': 'Когда использовать',@@ -4893,6 +4936,8 @@ const messages: TranslationMap = {'Срок действия вашей сессии Codex истёк. Подключите её заново в разделе Настройки → Интеграции.','chat_error.session_expired':'Срок действия вашей сессии OpenHuman истёк. Войдите снова, чтобы продолжить.',+ 'chat_error.local_session_managed_unavailable':+ 'Вы используете локальный автономный профиль, за которым нет аккаунта OpenHuman, поэтому управляемую (облачную) модель запустить нельзя. Войдите, чтобы использовать управляемые модели, или переключите маршрутизацию на «Используйте свои собственные модели» в разделе Подключения → API-ключи → LLM и добавьте своего провайдера.','chat_error.action_budget':'Вы достигли почасового лимита действий OpenHuman. Это локальное ограничение безопасности, а не лимит вашего ИИ-провайдера. Лимит восстанавливается постепенно: вы можете продолжать общаться в этой теме, а шаги с активным использованием инструментов возобновятся по мере восстановления лимита.','chat_error.max_iterations':@@ -5028,29 +5073,50 @@ const messages: TranslationMap = {'memoryPage.meta.url': 'Ссылка','memoryPage.off.title': 'Память выключена','memoryPage.off.description':- 'Выберите движок памяти, чтобы начать запоминать. Войдите, чтобы использовать память TinyHumans, или подключите собственный CortexDB.',+ 'Подключите CortexDB, чтобы начать запоминать. Войдите, чтобы использовать встроенную CortexDB, или подключитесь со своим API-ключом или к серверу на этом компьютере.','memoryPage.off.action': 'Выбрать движок',- 'memoryPage.engine.listTitle': 'Движки памяти',+ 'memoryPage.engine.listTitle': 'Память CortexDB','memoryPage.engine.listDescription':- 'Одновременно активен один движок. Он хранит всё, что запоминает память, и отвечает на вопросы о нём.',- 'memoryPage.engine.loadError': 'Не удалось загрузить движки памяти',+ 'Память работает на CortexDB. Выберите, как это приложение к ней подключается. Одновременно активно только одно подключение.','memoryPage.engine.offExplanation':- 'Сейчас нет доступного движка памяти, поэтому ничего не сохраняется и не вспоминается. Войдите, чтобы использовать память TinyHumans, или подключите собственный CortexDB, указав endpoint и API-ключ.',+ 'Сейчас нет доступного подключения к памяти, поэтому ничего не сохраняется и не извлекается. Войдите, чтобы использовать встроенную CortexDB, или подключите CortexDB со своим API-ключом или на этом компьютере.','memoryPage.engine.statusDegraded': 'Память работает со сбоями','memoryPage.engine.statusDown': 'Движок памяти недоступен','memoryPage.engine.statusOff': 'Выкл.','memoryPage.engine.active': 'Активен','memoryPage.engine.use': 'Использовать',- 'memoryPage.engine.edit': 'Изменить',- 'memoryPage.engine.signInRequired': 'Требуется вход',- 'memoryPage.engine.hostedDetail': 'Размещён в TinyHumans',- 'memoryPage.engine.selfHostedDetail': 'Ваш собственный endpoint и API-ключ',- 'memoryPage.engine.connectTitle': 'Подключить {engine}','memoryPage.engine.connect': 'Подключить','memoryPage.engine.endpoint': 'Endpoint','memoryPage.engine.apiKey': 'API-ключ','memoryPage.engine.keySavedPlaceholder': 'Сохранён. Введите новый ключ, чтобы заменить его','memoryPage.engine.keySavedHint': 'Ключ уже сохранён. Оставьте поле пустым, чтобы сохранить его.',+ 'memoryPage.engine.badgeDegraded': 'Работает с перебоями',+ 'memoryPage.engine.badgeDown': 'Недоступна',+ 'memoryPage.engine.connecting': 'Подключение…',+ 'memoryPage.engine.save': 'Сохранить',+ 'memoryPage.engine.builtin.title': 'Встроенная CortexDB',+ 'memoryPage.engine.builtin.detail': 'Входит в ваш аккаунт TinyHumans',+ 'memoryPage.engine.builtin.signInRequired': 'Войдите, чтобы использовать',+ 'memoryPage.engine.builtin.description':+ 'CortexDB, размещённая TinyHumans и входящая в ваш аккаунт. Войдите, чтобы пользоваться ею; настраивать ничего не нужно.',+ 'memoryPage.engine.builtin.enrichmentNote':+ 'Новые воспоминания сохраняются сразу. Факты и убеждения, извлечённые из них, появляются в течение следующих минут.',+ 'memoryPage.engine.builtin.signInHint':+ 'Войдите в аккаунт TinyHumans, чтобы использовать встроенную CortexDB.',+ 'memoryPage.engine.apiKeyOption.title': 'CortexDB с вашим API-ключом',+ 'memoryPage.engine.apiKeyOption.description':+ 'Используйте свой аккаунт CortexDB. Ключ надёжно хранится на этом компьютере и никогда не попадает в файл конфигурации.',+ 'memoryPage.engine.selfHost.title': 'Собственный сервер CortexDB',+ 'memoryPage.engine.selfHost.detail': 'Сервер CortexDB на этом компьютере',+ 'memoryPage.engine.selfHost.step1':+ 'Запустите сервер CortexDB на этом компьютере по руководству:',+ 'memoryPage.engine.selfHost.docsLink': 'Руководство по самостоятельному размещению CortexDB',+ 'memoryPage.engine.selfHost.step2':+ 'Запустите сервер с API-ключом (CORTEX_API_KEY). Приложение подключается с этим ключом.',+ 'memoryPage.engine.selfHost.step3':+ 'Введите ниже локальный адрес сервера и ключ, затем подключитесь.',+ 'memoryPage.engine.selfHost.notLocal':+ 'Собственный сервер поддерживается только локально. Используйте адрес на этом компьютере, например http://localhost:3141.','memoryPage.ask.questionLabel': 'Ваш вопрос','memoryPage.ask.queryLabel': 'Поисковый запрос','memoryPage.ask.placeholder': 'Что мы решили насчёт плана запуска?',@@ -5081,6 +5147,8 @@ const messages: TranslationMap = {'memoryPage.learnings.listTitle': 'Знания','memoryPage.learnings.empty':'Пока нет знаний. Добавьте их выше, или агент будет добавлять их сам по ходу работы с вами.',+ 'memoryPage.learnings.deriving':+ 'Пока здесь пусто. Память ещё формирует убеждения из ваших недавних разговоров; они появятся здесь после следующего фонового запуска.','memoryPage.learnings.delete': 'Удалить знание','memoryPage.conversations.turns': 'Реплик: {count}','memoryPage.documents.listDescription':@@ -5256,6 +5324,7 @@ const messages: TranslationMap = {'memoryPage.import.running': 'Импорт прежней памяти…','memoryPage.import.done': 'Прежняя память импортирована','memoryPage.import.failed': 'Не удалось выполнить импорт',+ 'memoryPage.import.resume': 'Возобновить импорт','memoryPage.import.progress': 'Импортировано {imported} из {total}',// Live voice agents'voice.live.mute': 'Выключить микрофон',diff --git a/app/src/lib/i18n/types.ts b/app/src/lib/i18n/types.tsindex ac6c1d0834..18c8082124 100644--- a/app/src/lib/i18n/types.ts+++ b/app/src/lib/i18n/types.ts@@ -11,6 +11,7 @@ export type Locale =| 'ru'| 'id'| 'it'+ | 'ja'| 'ko'| 'pl'| 'tr';diff --git a/app/src/lib/i18n/zh-CN.ts b/app/src/lib/i18n/zh-CN.tsindex 0445617622..d76836e65b 100644--- a/app/src/lib/i18n/zh-CN.ts+++ b/app/src/lib/i18n/zh-CN.ts@@ -395,6 +395,35 @@ const messages: TranslationMap = {'welcome.privacyPolicy': '隐私政策','welcome.termsOutro': '.','welcome.connect': '连接',+ 'welcome.hero.subtitle': '你的 AI,拥有记忆、语音和整个网络。',+ 'welcome.th.title': '使用 TinyHumans 继续',+ 'welcome.th.promise': '一个账户。一切俱全。无需任何配置。',+ 'welcome.th.featureInference': '推理',+ 'welcome.th.featureSearch': '网页搜索',+ 'welcome.th.featureVoice': '语音',+ 'welcome.th.featureMemory': '记忆',+ 'welcome.th.featureEmbeddings': '嵌入',+ 'welcome.th.featureBilling': '计费',+ 'welcome.th.credit': '起步赠送 $5 额度',+ 'welcome.th.cta': '使用 TinyHumans 继续',+ 'welcome.th.providers': '使用 Google、GitHub 或 X 登录',+ 'welcome.self.title': '自己设置',+ 'welcome.self.promise': '使用你自己的 API 密钥和端点。',+ 'welcome.self.listLabel': '你将设置:',+ 'welcome.self.step1': '推理',+ 'welcome.self.step2': '网页搜索',+ 'welcome.self.step3': '记忆',+ 'welcome.self.time': '大约 3 分钟。之后可随时在设置中更改。',+ 'welcome.self.cta': '自己设置',+ 'welcome.serverPrompt': '已经在服务器上运行 OpenHuman?',+ 'welcome.serverCta': '连接到它。',+ 'welcome.handoff.title': '正在浏览器中完成登录',+ 'welcome.handoff.body': '我们已打开 tinyhumans.ai,完成后请回来。',+ 'welcome.handoff.reopen': '重新打开页面',+ 'welcome.handoff.failedTitle': '登录未能返回',+ 'welcome.handoff.failedBody': '浏览器可能阻止了返回 OpenHuman。',+ 'welcome.handoff.retry': '重试',+ 'welcome.handoff.fallbackSelf': '改为自己设置','home.askAssistant': '向你的助手提问...','home.statusOk': '你的助手已准备就绪。在下方输入内容即可开始。','home.statusBackendOnly': '正在重新连接后端…你的智能体很快将再次可用。',@@ -611,6 +640,11 @@ const messages: TranslationMap = {'memory.search': '搜索记忆...','memory.noResults': '未找到记忆','memory.empty': '暂无记忆。记忆将在你交互时自动创建。',+ 'memory.error.insufficientCredits':+ '记忆不可用:你的账户额度已用完。充值即可恢复,已存储的内容不会丢失。',+ 'memory.error.unavailable': '暂时无法连接记忆服务。已存储的内容不会丢失,请稍后重试。',+ 'memory.outOfCredits.title': '额度已用完',+ 'memory.outOfCredits.action': '充值','memory.tab.memory': '记忆','memory.tab.agents': '资料库','memory.analyzeNow': '立即分析',@@ -687,8 +721,9 @@ const messages: TranslationMap = {'onboarding.custom.configureLater':'你可以在入门流程结束后继续配置。完成后,我们会带你前往对应的设置页面。','onboarding.custom.openSettings': '在设置中打开',- 'onboarding.custom.inference.title': '推理(文本)',- 'onboarding.custom.inference.subtitle': '哪个语言模型应该回答你的问题并运行你的智能体?',+ 'onboarding.custom.inference.title': '选择模型提供商',+ 'onboarding.custom.inference.subtitle':+ 'OpenHuman 需要一个模型来思考。添加你已在使用的提供商的密钥,或指向本地运行的模型。','onboarding.custom.inference.defaultDesc':'OpenHuman 会为每种工作负载路由到合适的默认模型。无需密钥,无需设置。','onboarding.custom.inference.configureDesc':@@ -704,12 +739,15 @@ const messages: TranslationMap = {'OpenHuman 使用托管的 Composio 工作区。之后每个服务都可一键连接。','onboarding.custom.oauth.configureDesc':'使用你自己的 Composio 账户或 API 密钥。在设置 › 连接中配置。',- 'onboarding.custom.search.title': '网页搜索',- 'onboarding.custom.search.subtitle': 'OpenHuman 如何代表你搜索网页。',+ 'onboarding.custom.search.title': '让 OpenHuman 搜索网络',+ 'onboarding.custom.search.subtitle': '没有它,OpenHuman 只知道训练时学到的内容。','onboarding.custom.search.defaultDesc':'网页搜索开箱即用:Exa 和 Gemini 已包含在 TinyHumans 中,无需 API 密钥。','onboarding.custom.search.configureDesc':'已包含 Exa 和 Gemini。可在 设置 › 工具 中使用你自己的 API 密钥添加更多搜索提供商。',+ 'onboarding.custom.search.skipForNow': '暂时跳过',+ 'onboarding.custom.search.ready': '网络搜索已就绪。',+ 'onboarding.custom.search.notReady': '请在下方添加提供商,以便 OpenHuman 搜索网络。','onboarding.custom.embeddings.title': 'Embeddings','onboarding.custom.embeddings.subtitle': 'OpenHuman 生成向量嵌入以实现语义记忆搜索的方式。','onboarding.custom.embeddings.defaultDesc': 'OpenHuman 使用托管嵌入服务,无需 API 密钥。',@@ -1509,57 +1547,58 @@ const messages: TranslationMap = {'stats.latest': '最新','stats.sessions': '会话数','stats.tokens': '个令牌',- 'bootCheck.invalidUrl': '请输入核心 URL。',+ 'bootCheck.invalidUrl': '请输入地址。','bootCheck.urlMustStartWith': 'URL 必须以 http:// 或 https:// 开头','bootCheck.validUrlRequired': '请输入有效的 URL(例如 https://core.example.com/rpc)','bootCheck.tokenRequired': '请输入核心认证令牌。','bootCheck.httpPublicWarning':'这是公网主机上的纯 HTTP 地址:流量不会被加密。除非你信任该网络,否则请使用 HTTPS。',- 'bootCheck.chooseCoreMode': '选择核心模式',- 'bootCheck.connectToCore': '连接到你的核心',- 'bootCheck.desktopDescription': 'OpenHuman 需要一个运行中的核心才能工作。请选择连接方式。',+ 'bootCheck.chooseCoreMode': '要在哪里运行 OpenHuman?',+ 'bootCheck.connectToCore': '连接到 OpenHuman',+ 'bootCheck.desktopDescription': 'OpenHuman 无法在这台电脑 上启动。请选择运行的位置。','bootCheck.webDescription':- '网页版 OpenHuman 连接到由你控制的远程核心。请输入其 URL 和认证令牌,或安装桌面版在本地运行核心。',+ '在网页端,OpenHuman 会连接到由你掌控的服务器。请在下方填入其地址和令牌,或下载桌面应用,直接在你的电脑上运行。','bootCheck.preferDesktop': '更希望在自己的设备上运行一切?','bootCheck.downloadDesktop': '下载桌面应用',- 'bootCheck.localRecommended': '本地(推荐)',- 'bootCheck.localDescription': '嵌入式核心在本设备上运行:最快,无需配置。',- 'bootCheck.cloudMode': '云端',- 'bootCheck.cloudDescription': '连接到自定义 URL 处的远程核心。',- 'bootCheck.coreRpcUrl': '核心 RPC URL',+ 'bootCheck.localRecommended': '在这台电脑 上',+ 'bootCheck.localDescription': '速度最快、完全私密,无需任何设置。',+ 'bootCheck.cloudMode': '在我自己的服务器上',+ 'bootCheck.cloudDescription': '全天候保持在线,无需让这台电脑 一直开着。',+ 'bootCheck.coreRpcUrl': '地址','bootCheck.rpcUrlPlaceholder': 'https://core.example.com/rpc',- 'bootCheck.authToken': '认证令牌',- 'bootCheck.bearerTokenPlaceholder': '远程核心上配置的 Bearer 令牌',+ 'bootCheck.authToken': '令牌',+ 'bootCheck.bearerTokenPlaceholder': '来自你的服务器的令牌','bootCheck.storedLocally': '仅存储在本设备上。远程核心必需:桌面版每次 RPC 都会以 ','bootCheck.testing': '测试中…','bootCheck.testConnection': '测试连接','bootCheck.connectedOk': '已连接 ✓','bootCheck.authFailed': '认证失败:请检查令牌(收到 401/403)。','bootCheck.unreachablePrefix': '无法连接:',- 'bootCheck.checkingCore': '正在检查核心…',- 'bootCheck.cannotReach': '无法连接到核心',- 'bootCheck.cannotReachDesc': '核心进程无法访问。请尝试切换到其他模式。',- 'bootCheck.switchMode': '切换模式',+ 'bootCheck.checkingCore': '正在启动 OpenHuman…',+ 'bootCheck.cannotReach': '无法连接',+ 'bootCheck.cannotReachDesc': '我们无法连接。要换个地方试试吗?',+ 'bootCheck.switchMode': '更改运行位置','bootCheck.quit': '退出',- 'bootCheck.legacyDetected': '检测到旧版后台核心',+ 'bootCheck.legacyDetected': '发现旧的后台服务','bootCheck.legacyDescription':- '此设备上正在运行一个单独安装的 OpenHuman 守护进程。必须先将其移除,嵌入式核心才能接管。',+ '此设备上已有单独安装的 OpenHuman 守护进程正在运行。我们需要先将其清除,内置版本才能接管。','bootCheck.removing': '正在移除…','bootCheck.removeContinue': '移除并继续',- 'bootCheck.localNeedsRestart': '本地核心需要重启',- 'bootCheck.localNeedsRestartDesc': '本地核心版本与此应用构建版本不匹配。重启后将加载正确的版本。',+ 'bootCheck.localNeedsRestart': 'OpenHuman 需要重启',+ 'bootCheck.localNeedsRestartDesc':+ '这台电脑 上的 OpenHuman 与此应用版本不同。快速重启即可让它们重新保持同步。','bootCheck.restarting': '正在重启…',- 'bootCheck.restartCore': '重启核心',- 'bootCheck.cloudNeedsUpdate': '云端核心需要更新',+ 'bootCheck.restartCore': '重启',+ 'bootCheck.cloudNeedsUpdate': '你的服务器需要更新','bootCheck.cloudNeedsUpdateDesc':- '云端核心版本与此应用构建版本不匹配。请运行核心更新程序来解决此差异。',+ '你的服务器与此应用版本不同。运行更新程序即可让它们重新保持同步。','bootCheck.updating': '正在更新…',- 'bootCheck.updateCloudCore': '更新云端核心',- 'bootCheck.versionCheckFailed': '核心版本检查失败',+ 'bootCheck.updateCloudCore': '更新服务器',+ 'bootCheck.versionCheckFailed': '版本检查失败','bootCheck.versionCheckFailedDesc':- '核心正在运行但未暴露版本接口。它可能已过时。请重启或更新核心以继续。',+ '你的服务器已在运行,但没有报告其版本,可能已过期。请重启或更新后继续。','bootCheck.working': '正在执行…',- 'bootCheck.restartUpdateCore': '重启 / 更新核心',+ 'bootCheck.restartUpdateCore': '重启 / 更新','bootCheck.unexpectedError': '意外的启动检查错误','bootCheck.actionFailed': '操作失败:请重试。','bootCheck.portConflictTitle': '无法启动应用引擎',@@ -3238,6 +3277,8 @@ const messages: TranslationMap = {'你现有的集成(通过 OpenHuman 关联的 Gmail、Slack、GitHub 等)将不可见:它们存放在 OpenHuman 托管的 Composio 租户中。','settings.composio.intro':'Composio 集成了 250+ 外部应用作为智能体可调用的工具。请选择这些工具调用的路由方式。',+ 'settings.composio.directOnlyDesc':+ '此处无法使用 Composio 托管认证。请输入你自己的 Composio API 密钥,或暂时跳过此步骤。','settings.composio.modeDirect': '直连(自带 API 密钥)','settings.composio.modeDirectDesc':'调用直接发送到 backend.composio.dev。自主可控 / 适合离线场景。工具同步执行;实时触发器 Webhook 目前在直连模式下尚未路由(后续问题)。',@@ -4127,13 +4168,15 @@ const messages: TranslationMap = {// Monthly cost badge// Onboarding: Custom > Vault- 'onboarding.custom.vault.title': '记忆与保险库设置',- 'onboarding.custom.vault.subtitle':- '确认记忆笔记的写入位置、源数据的读取方式,以及保险库管道是否正常运行。',+ 'onboarding.custom.vault.title': '给 OpenHuman 一份记忆',+ 'onboarding.custom.vault.subtitle': '你告诉它的内容存放在这里,以便在不同对话之间延续。','onboarding.custom.vault.defaultDesc':'使用 OpenHuman 托管的记忆默认设置。保险库路径和同步健康状态仍可稍后查看。','onboarding.custom.vault.configureDesc': '立即查看保险库所有权、运行健康检查并调整记忆控制。','onboarding.custom.vault.localDisabledReason': '托管设置需要登录 OpenHuman,在本地模式下不可用。',+ 'onboarding.custom.localDefaultDisabledReason':+ '托管设置需要 OpenHuman 账户。在本地会话中,你需要自行配置每项服务。',+ 'onboarding.custom.unsavedChanges': '继续之前请先保存更改。','onboarding.custom.vault.exitError': '无法完成引导流程,请重试。',// Memory Data@@ -4580,6 +4623,8 @@ const messages: TranslationMap = {// Chat failure copy: localized render of chat_error.message, keyed by chat_error.copy_key'chat_error.codex_session_expired': '你的 Codex 会话已过期。请在 设置 → 集成 中重新连接。','chat_error.session_expired': '你的 OpenHuman 会话已过期。请重新登录以继续。',+ 'chat_error.local_session_managed_unavailable':+ '你正在使用本地离线配置,其背后没有 OpenHuman 账号,因此无法运行托管(云端)模型。请登录以使用托管模型,或在 连接 → API 密钥 → 语言模型 中将路由切换为“使用您自己的模型”并添加你自己的提供方。','chat_error.action_budget':'你已达到 OpenHuman 的每小时操作上限。这是本地安全限制,并非来自你的 AI 提供商。额度会逐步恢复;你可以继续在此对话中聊天,大量使用工具的步骤会随着额度恢复而继续。','chat_error.max_iterations':@@ -4704,29 +4749,47 @@ const messages: TranslationMap = {'memoryPage.meta.url': '链接','memoryPage.off.title': '记忆已关闭','memoryPage.off.description':- '选择一个记忆引擎以开始记忆。登录后可使用 TinyHumans 记忆,或连接你自己的 CortexDB。',+ '连接 CortexDB 以开始记忆。登录以使用内置 CortexDB,或使用你自己的 API 密钥或本机上的服务器进行连接。','memoryPage.off.action': '选择引擎',- 'memoryPage.engine.listTitle': '记忆引擎',+ 'memoryPage.engine.listTitle': 'CortexDB 记忆','memoryPage.engine.listDescription':- '同一时间只有一个引擎处于启用状态。它存储记忆保存的所有内容,并回答相关问题。',- 'memoryPage.engine.loadError': '无法加载记忆引擎',+ '记忆运行在 CortexDB 上。选择此应用连接它的方式。同一时间只有一个连接处于活动状态。','memoryPage.engine.offExplanation':- '当前没有可用的记忆引擎,因此不会存储或回忆任何内容。登录后可使用 TinyHumans 记忆,或通过端点和 API 密钥连接你自己的 CortexDB。',+ '目前没有可用的记忆连接,因此不会存储或召回任何内容。登录以使用内置 CortexDB,或使用你的 API 密钥或在本机连接 CortexDB。','memoryPage.engine.statusDegraded': '记忆服务性能下降','memoryPage.engine.statusDown': '无法连接记忆引擎','memoryPage.engine.statusOff': '已关闭','memoryPage.engine.active': '使用中','memoryPage.engine.use': '使用',- 'memoryPage.engine.edit': '编辑',- 'memoryPage.engine.signInRequired': '需要登录',- 'memoryPage.engine.hostedDetail': '由 TinyHumans 托管',- 'memoryPage.engine.selfHostedDetail': '你自己的端点和 API 密钥',- 'memoryPage.engine.connectTitle': '连接 {engine}','memoryPage.engine.connect': '连接','memoryPage.engine.endpoint': '端点','memoryPage.engine.apiKey': 'API 密钥','memoryPage.engine.keySavedPlaceholder': '已保存。输入新密钥可替换','memoryPage.engine.keySavedHint': '密钥已保存。留空则保持不变。',+ 'memoryPage.engine.badgeDegraded': '性能下降',+ 'memoryPage.engine.badgeDown': '无法访问',+ 'memoryPage.engine.connecting': '正在连接…',+ 'memoryPage.engine.save': '保存',+ 'memoryPage.engine.builtin.title': '内置 CortexDB',+ 'memoryPage.engine.builtin.detail': '包含在你的 TinyHumans 账户中',+ 'memoryPage.engine.builtin.signInRequired': '登录后使用',+ 'memoryPage.engine.builtin.description':+ '由 TinyHumans 托管、包含在你账户中的 CortexDB。登录即可使用,无需任何设置。',+ 'memoryPage.engine.builtin.enrichmentNote':+ '新的记忆会立即保存。从中提炼的事实和信念会在接下来的几分钟内补充完成。',+ 'memoryPage.engine.builtin.signInHint': '登录你的 TinyHumans 账户以使用内置 CortexDB。',+ 'memoryPage.engine.apiKeyOption.title': '使用你的 API 密钥连接 CortexDB',+ 'memoryPage.engine.apiKeyOption.description':+ '使用你自己的 CortexDB 账户。密钥安全地存储在本机上,绝不会写入配置文件。',+ 'memoryPage.engine.selfHost.title': '自托管 CortexDB',+ 'memoryPage.engine.selfHost.detail': '本机上的 CortexDB 服务器',+ 'memoryPage.engine.selfHost.step1': '按照指南在本机上运行 CortexDB 服务器:',+ 'memoryPage.engine.selfHost.docsLink': 'CortexDB 自托管指南',+ 'memoryPage.engine.selfHost.step2':+ '使用 API 密钥(CORTEX_API_KEY)启动服务器。应用将使用该密钥连接。',+ 'memoryPage.engine.selfHost.step3': '在下方输入服务器的本地地址和密钥,然后连接。',+ 'memoryPage.engine.selfHost.notLocal':+ '自托管仅支持本机。请使用本机上的地址,例如 http://localhost:3141。','memoryPage.ask.questionLabel': '你的问题','memoryPage.ask.queryLabel': '搜索查询','memoryPage.ask.placeholder': '我们对发布计划做了什么决定?',@@ -4757,6 +4820,8 @@ const messages: TranslationMap = {'memoryPage.learnings.listTitle': '学习内容','memoryPage.learnings.empty':'还没有学习内容。请在上方添加,或者让你的智能体在与你协作的过程中自动添加。',+ 'memoryPage.learnings.deriving':+ '这里还没有内容。记忆仍在根据你最近的对话构建信念,下一次后台运行后会显示在这里。','memoryPage.learnings.delete': '删除学习内容','memoryPage.conversations.turns': '{count} 轮','memoryPage.documents.listDescription': '记忆会保持这些内容同步,并根据其中的内容作答。',@@ -4922,6 +4987,7 @@ const messages: TranslationMap = {'memoryPage.import.running': '正在导入旧版记忆…','memoryPage.import.done': '旧版记忆已导入','memoryPage.import.failed': '导入失败',+ 'memoryPage.import.resume': '继续导入','memoryPage.import.progress': '已导入 {imported} / {total} 项',// Live voice agents'voice.live.mute': '静音麦克风',diff --git a/app/src/pages/Memory.tsx b/app/src/pages/Memory.tsxindex 59cfbfee63..ca1c266109 100644--- a/app/src/pages/Memory.tsx+++ b/app/src/pages/Memory.tsx@@ -70,7 +70,7 @@ export default function Memory() {setLoadError(null);} else {log('engine_get failed: %o', state.reason);- setLoadError(memoryErrorMessage(state.reason));+ setLoadError(memoryErrorMessage(state.reason, t));// Treat an unreadable engine as off so the page still has a chip to show.setEngine({ engine: null, has_key: false, status: 'off', fetch_modes: [] });}@@ -79,7 +79,7 @@ export default function Memory() {return () => {cancelled = true;};- }, [authUserId, reloadKey]);+ }, [authUserId, reloadKey, t]);const params = useMemo(() => new URLSearchParams(location.search), [location.search]);const rawChip = params.get('brain');diff --git a/app/src/pages/Welcome.tsx b/app/src/pages/Welcome.tsxindex 085313eaea..116184619f 100644--- a/app/src/pages/Welcome.tsx+++ b/app/src/pages/Welcome.tsx@@ -1,16 +1,21 @@import createDebug from 'debug';-import { useState } from 'react';+import { useEffect, useState } from 'react';import { useNavigate } from 'react-router-dom';+import LanguageSelect from '../components/LanguageSelect';import OAuthProviderButton from '../components/oauth/OAuthProviderButton';import { oauthProviderConfigs } from '../components/oauth/providerConfigs';-import Button from '../components/ui/Button';+import { Alert, AlertDescription, Button, Card } from '../components/ui';import { useT } from '../lib/i18n/I18nContext';import { useCoreState } from '../providers/CoreStateProvider';import { clearBackendUrlCache } from '../services/backendUrl';import { clearCoreRpcTokenCache, clearCoreRpcUrlCache } from '../services/coreRpcClient';import { resetCoreMode } from '../store/coreModeSlice';-import { useDeepLinkAuthState } from '../store/deepLinkAuthState';+import {+ endAwaitingAuthCallback,+ getDeepLinkAuthState,+ useDeepLinkAuthState,+} from '../store/deepLinkAuthState';import { useAppDispatch, useAppSelector } from '../store/hooks';import { resolveTheme, setThemeMode, type ThemeMode } from '../store/themeSlice';import { clearAllAppData } from '../utils/clearAllAppData';@@ -25,12 +30,30 @@ import { openUrl } from '../utils/openUrl';const log = createDebug('app:welcome');+/** The sign-in buttons, shared by the TinyHumans card and the hand-off panel. */+const ProviderButtons = () => (+ <div className="flex flex-wrap items-center justify-center gap-3">+ {oauthProviderConfigs+ .filter(provider => provider.showOnWelcome)+ .map(provider => (+ <OAuthProviderButton key={provider.id} provider={provider} className="rounded-full!" />+ ))}+ </div>+);++/**+ * How long a regained focus waits for a deep link before concluding there+ * isn't one. The callback is delivered after the OS focus event, so this has+ * to outlast that gap; it only ever delays *giving up*, never a success.+ */+const CALLBACK_GRACE_MS = 1_500;+const Welcome = () => {const { t } = useT();const navigate = useNavigate();const dispatch = useAppDispatch();const { storeSessionToken } = useCoreState();- const { isProcessing, errorMessage, errorMessageKey, requiresAppDataReset } =+ const { isProcessing, awaitingCallback, errorMessage, errorMessageKey, requiresAppDataReset } =useDeepLinkAuthState();// Deep-link auth runs outside React and cannot translate its own copy, so it// hands over a key for the failures whose copy is localized. Everything else@@ -93,74 +116,149 @@ const Welcome = () => {}};+ // Coming back to the app without a callback means the user cancelled, closed+ // the tab, or the redirect failed. End the wait so they get the cards back+ // instead of a spinner that only the 5-minute timeout would clear.+ //+ // The check cannot be synchronous. On a *successful* sign-in the OS focus+ // event arrives BEFORE the deep link does (see the same race documented at+ // `OAuthProviderButton`'s `skipDuringDeepLink`), so reading `isProcessing`+ // the instant focus fires would say "no callback" during a perfectly good+ // round-trip and flash the cards back mid-sign-in. Give the callback a grace+ // window to land, then decide.+ useEffect(() => {+ if (!awaitingCallback) return;+ let graceTimer: ReturnType<typeof setTimeout> | null = null;+ const onFocus = () => {+ if (graceTimer !== null) return;+ graceTimer = setTimeout(() => {+ graceTimer = null;+ const state = getDeepLinkAuthState();+ // Redeeming a callback, or something already ended the wait: leave it.+ if (state.isProcessing || !state.awaitingCallback) return;+ endAwaitingAuthCallback();+ }, CALLBACK_GRACE_MS);+ };+ window.addEventListener('focus', onFocus);+ return () => {+ if (graceTimer !== null) clearTimeout(graceTimer);+ window.removeEventListener('focus', onFocus);+ };+ }, [awaitingCallback]);+const toggleTheme = () => {dispatch(setThemeMode(isDark ? 'light' : 'dark'));};+ const features = [+ 'welcome.th.featureInference',+ 'welcome.th.featureSearch',+ 'welcome.th.featureVoice',+ 'welcome.th.featureMemory',+ 'welcome.th.featureEmbeddings',+ 'welcome.th.featureBilling',+ ] as const;+ const steps = ['welcome.self.step1', 'welcome.self.step2', 'welcome.self.step3'] as const;++ const legalLink = (href: string, label: string) => (+ <a+ href={href}+ target="_blank"+ rel="noreferrer"+ onClick={event => {+ event.preventDefault();+ void openUrl(href);+ }}+ className="font-medium text-content-secondary underline underline-offset-2 hover:text-content">+ {label}+ </a>+ );+return (<div className="min-h-full flex flex-col items-center justify-center p-4">- <div className="max-w-md w-full">- <div className="bg-surface rounded-2xl shadow-soft border border-line p-8 animate-fade-up">- <div className="flex items-center justify-between mb-4">- <div className="w-9" aria-hidden="true" />- <div className="w-9" aria-hidden="true" />- <Button- iconOnly- variant="tertiary"- onClick={toggleTheme}- aria-label={isDark ? t('home.themeToggle.toLight') : t('home.themeToggle.toDark')}- title={isDark ? t('home.themeToggle.toLight') : t('home.themeToggle.toDark')}- className="rounded-full">- {isDark ? (- <svg- className="w-5 h-5"- fill="none"- stroke="currentColor"- strokeWidth={2}- viewBox="0 0 24 24"- aria-hidden="true">- <circle cx="12" cy="12" r="4" />- <path- strokeLinecap="round"- d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"- />- </svg>- ) : (- <svg- className="w-5 h-5"- fill="none"- stroke="currentColor"- strokeWidth={2}- viewBox="0 0 24 24"- aria-hidden="true">- <path- strokeLinecap="round"- strokeLinejoin="round"- d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z"- />- </svg>- )}- </Button>- </div>- <div className="flex justify-center mb-6">+ <div className="w-full max-w-3xl animate-fade-up">+ <div className="flex items-center justify-end gap-2">+ {/* Language sits with the other presentation control rather than on+ the boot-check panel, which is now a failure-only fallback most+ people never see. */}+ <LanguageSelect id="welcome-language" ariaLabel={t('settings.language')} />+ <Button+ iconOnly+ variant="tertiary"+ onClick={toggleTheme}+ aria-label={isDark ? t('home.themeToggle.toLight') : t('home.themeToggle.toDark')}+ title={isDark ? t('home.themeToggle.toLight') : t('home.themeToggle.toDark')}+ className="rounded-full">+ {isDark ? (+ <svg+ className="w-5 h-5"+ fill="none"+ stroke="currentColor"+ strokeWidth={2}+ viewBox="0 0 24 24"+ aria-hidden="true">+ <circle cx="12" cy="12" r="4" />+ <path+ strokeLinecap="round"+ d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"+ />+ </svg>+ ) : (+ <svg+ className="w-5 h-5"+ fill="none"+ stroke="currentColor"+ strokeWidth={2}+ viewBox="0 0 24 24"+ aria-hidden="true">+ <path+ strokeLinecap="round"+ strokeLinejoin="round"+ d="M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79Z"+ />+ </svg>+ )}+ </Button>+ </div>++ <div className="flex flex-col items-center text-center">+ <div className="flex items-center gap-3"><imgsrc={isDark ? '/brand/OpenhumanLogo-white.svg' : '/brand/OpenhumanLogo-Black.svg'}alt={t('welcome.logoAlt')}- className="h-20 w-20"+ className="h-12 w-12"/>+ <span className="text-xl font-bold text-content">OpenHuman</span></div>-- <h1 className="text-2xl font-bold text-content text-center mb-2">{t('welcome.title')}</h1>-- <p className="text-sm text-content-muted text-center mb-6 leading-relaxed">- {t('welcome.subtitle')}+ <h1 className="mt-4 text-2xl font-bold text-content">{t('welcome.title')}</h1>+ <p className="mt-2 text-sm leading-relaxed text-content-muted">+ {t('welcome.hero.subtitle')}</p>+ </div>- {deepLinkError ? (- <div- role="alert"- className="mb-5 rounded-lg border border-red-200 bg-red-50 px-3 py-2 text-sm text-red-700">- <p>{deepLinkError}</p>+ {deepLinkError ? (+ <Alert variant="destructive" className="mt-6">+ <AlertDescription>+ <p className="font-medium">{t('welcome.handoff.failedTitle')}</p>+ <p className="mt-1">{deepLinkError}</p>+ {/* Sign-in that never comes back is a dead end unless the screen+ offers somewhere to go. Both doors: try the browser again, or+ take the self-hosted path instead. */}+ {!requiresAppDataReset ? (+ <div className="mt-3 flex flex-wrap gap-2">+ {/* No provider buttons here: the TinyHumans card below shows+ them permanently now, so repeating them put two Google+ buttons on screen. Retrying is clicking one of those. */}+ <Button+ variant="secondary"+ size="sm"+ onClick={() => void handleLocalLogin()}+ disabled={isLocalSigningIn}+ data-testid="welcome-handoff-fallback-self">+ {t('welcome.handoff.fallbackSelf')}+ </Button>+ </div>+ ) : null}{requiresAppDataReset ? (<div className="mt-3 space-y-2"><Button@@ -179,95 +277,178 @@ const Welcome = () => {t('welcome.clearAppDataAndRestart'))}</Button>- <p className="text-[11px] leading-4 text-red-600/80">- {t('welcome.clearAppDataWarning')}- </p>+ <p className="text-[11px] leading-4">{t('welcome.clearAppDataWarning')}</p>{resetError ? (- <p className="text-[11px] leading-4 font-medium text-red-700">{resetError}</p>+ <p className="text-[11px] leading-4 font-medium">{resetError}</p>) : null}</div>) : null}- </div>- ) : null}+ </AlertDescription>+ </Alert>+ ) : null}- {isProcessing ? (+ {/* `isProcessing` alone is wrong here: it covers an auth STEP, and the+ launch step ends the instant the browser opens — so the hand-off+ appeared for about a second and then dropped the user back to the+ sign-in buttons while they were still in the browser.+ `awaitingCallback` is the actual wait. */}+ {isProcessing || awaitingCallback ? (+ /* Screen B — the browser hand-off. Sign-in leaves the app entirely,+ so the window the user comes back to has to say where they are and+ give them a way out. A bare spinner said neither. */+ <Card padded divided={false} className="mt-8 shadow-soft" data-testid="welcome-handoff"><divrole="status"aria-live="polite"aria-atomic="true"- className="mb-5 flex flex-col items-center justify-center gap-3 py-2">- <div className="h-6 w-6 animate-spin rounded-full border-2 border-line-strong border-t-primary-500" />- <p className="text-sm font-medium text-content-secondary">{t('welcome.signingIn')}</p>- </div>- ) : (- <>- {/* Real OAuth: click → system browser → backend → deep link back to app. */}- <div className="flex items-center justify-center gap-3">- {oauthProviderConfigs- .filter(provider => provider.showOnWelcome)- .map(provider => (- <OAuthProviderButton- key={provider.id}- provider={provider}- className="rounded-full! px-4! py-2!"- />- ))}+ className="flex flex-col items-center gap-4 py-4 text-center">+ <div className="h-7 w-7 animate-spin rounded-full border-2 border-line-strong border-t-primary-500" />+ <div>+ <p className="text-base font-semibold text-content">{t('welcome.handoff.title')}</p>+ <p className="mt-1 text-sm text-content-muted">{t('welcome.handoff.body')}</p></div>- <p className="mt-5 text-center text-[11px] leading-5 text-content-muted dark:text-content-faint">- {t('welcome.termsIntro')}{' '}- <a- href={TERMS_OF_USE_URL}- target="_blank"- rel="noreferrer"- onClick={event => {- event.preventDefault();- void openUrl(TERMS_OF_USE_URL);- }}- className="font-medium text-content-secondary underline underline-offset-2 hover:text-content">- {t('welcome.termsOfUse')}- </a>{' '}- {t('welcome.termsJoiner')}{' '}- <a- href={PRIVACY_POLICY_URL}- target="_blank"- rel="noreferrer"- onClick={event => {- event.preventDefault();- void openUrl(PRIVACY_POLICY_URL);- }}- className="font-medium text-content-secondary underline underline-offset-2 hover:text-content">- {t('welcome.privacyPolicy')}- </a>- {t('welcome.termsOutro')}- </p>- </>- )}- </div>+ {/* No sign-in buttons here. By this point a provider has been+ picked and the browser is open; repeating the row just asks+ the same question twice. If the browser never comes back, the+ 90s timeout swaps this panel for the failure state, which is+ where the way out belongs. */}+ </div>+ </Card>+ ) : (+ <>+ {/* Equal columns. The two paths are a genuine either/or, so neither+ card is sized to argue for itself; the TinyHumans one leads by+ being first and denser. Stacks to one column at phone width. */}+ <div className="mt-8 grid grid-cols-1 items-stretch gap-4 sm:grid-cols-2">+ <Card+ data-testid="welcome-card-tinyhumans"+ padded+ divided={false}+ className="flex flex-col shadow-soft">+ <div className="flex h-full flex-col gap-4">+ <div>+ <h2 className="text-lg font-semibold text-content">{t('welcome.th.title')}</h2>+ <p className="mt-1 text-sm text-content-muted">{t('welcome.th.promise')}</p>+ </div>+ <ul className="grid grid-cols-2 gap-x-4 gap-y-2 text-sm text-content-secondary">+ {features.map(key => (+ <li key={key} className="flex items-center gap-2">+ <span+ aria-hidden="true"+ className="h-2 w-2 shrink-0 rotate-45 rounded-[2px] bg-primary-500"+ />+ {t(key)}+ </li>+ ))}+ </ul>+ {/* A quiet highlight, not a second button. `bg-primary-50`+ alone rendered near-white in dark mode, because the accent+ ramps are identical in both themes and only the shade+ chosen changes — so the dark shade has to be picked+ explicitly. */}+ <div className="rounded-lg border border-primary-200 bg-primary-50 px-3 py-1.5 text-center text-xs font-medium text-primary-700 dark:border-primary-500/30 dark:bg-primary-500/10 dark:text-primary-300">+ {t('welcome.th.credit')}+ </div>+ <div className="mt-auto space-y-3">+ {/* TODO: replace this inline provider reveal with a single `openUrl` to a+ tinyhumans.ai login page that returns+ `openhuman://auth?token=...&state=...`. That hosted single-login page+ does not exist yet, so for now the CTA reveals the three existing+ OAuth provider buttons (google, github, twitter). */}+ {/* The providers are the action, so they are on screen.+ A "Continue with TinyHumans" button used to sit here and+ reveal them on click, which was a tap that bought the+ user nothing.- <div className="mt-4 px-2 space-y-2">- <Button- variant="secondary"- size="md"- onClick={handleSelectRuntime}- className="w-full py-3">- {t('welcome.selectRuntime')}- </Button>- <Button- variant="secondary"- size="md"- onClick={handleLocalLogin}- disabled={isLocalSigningIn}- className="w-full py-3">- {isLocalSigningIn- ? t('welcome.localSessionStarting')- : t('welcome.continueLocallyExperimental')}- </Button>- {localLoginError ? (- <p className="text-[11px] leading-4 text-center font-medium text-red-700">- {localLoginError}+ WHEN THE HOSTED LOGIN LANDS: put that single button back+ in place of this row and have it `openUrl` to the+ tinyhumans.ai login page with `redirectUri` +`state`;+ the page returns `openhuman://auth?token=…&state=…`,+ which `desktopDeepLinkListener` already redeems through+ `loginWithToken` → `POST /auth/login-token/consume`.+ Every piece of that exists except the page itself, which+ is why provider selection is still in the app. */}+ <p className="text-center text-xs text-content-muted">+ {t('welcome.th.providers')}+ </p>+ <div data-testid="welcome-cta-tinyhumans">+ <ProviderButtons />+ </div>+ </div>+ </div>+ </Card>++ <Card+ data-testid="welcome-card-self"+ padded+ divided={false}+ className="flex flex-col shadow-soft">+ <div className="flex h-full flex-col gap-4">+ <div>+ <h2 className="text-lg font-semibold text-content">+ {t('welcome.self.title')}+ </h2>+ <p className="mt-1 text-sm text-content-muted">{t('welcome.self.promise')}</p>+ </div>+ <div>+ <p className="text-sm font-medium text-content-secondary">+ {t('welcome.self.listLabel')}+ </p>+ <ol className="mt-2 space-y-2 text-sm text-content-secondary">+ {steps.map((key, index) => (+ <li key={key} className="flex items-center gap-3">+ <span+ aria-hidden="true"+ className="flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-surface-muted text-xs font-semibold text-content-secondary">+ {index + 1}+ </span>+ {t(key)}+ </li>+ ))}+ </ol>+ </div>+ <p className="text-xs text-content-muted">{t('welcome.self.time')}</p>+ <div className="mt-auto space-y-2">+ <Button+ data-testid="welcome-cta-self"+ variant="secondary"+ size="md"+ onClick={handleLocalLogin}+ disabled={isLocalSigningIn}+ className="w-full py-3">+ {isLocalSigningIn ? t('welcome.localSessionStarting') : t('welcome.self.cta')}+ </Button>+ {localLoginError ? (+ <p+ role="alert"+ className="text-center text-[11px] leading-4 font-medium text-coral-600">+ {localLoginError}+ </p>+ ) : null}+ </div>+ </div>+ </Card>+ </div>++ {/* A door for the few, not a third option: sits below both cards. */}+ <p className="mt-6 text-center text-sm text-content-muted">+ {t('welcome.serverPrompt')}{' '}+ <button+ type="button"+ data-testid="welcome-server-link"+ onClick={handleSelectRuntime}+ className="font-medium text-primary-600 underline underline-offset-2 hover:text-primary-700">+ {t('welcome.serverCta')}+ </button></p>- ) : null}- </div>++ <p className="mt-4 text-center text-[11px] leading-5 text-content-muted dark:text-content-faint">+ {t('welcome.termsIntro')} {legalLink(TERMS_OF_USE_URL, t('welcome.termsOfUse'))}{' '}+ {t('welcome.termsJoiner')} {legalLink(PRIVACY_POLICY_URL, t('welcome.privacyPolicy'))}+ {t('welcome.termsOutro')}+ </p>+ </>+ )}</div></div>);diff --git a/app/src/pages/__tests__/Conversations.render.test.tsx b/app/src/pages/__tests__/Conversations.render.test.tsxindex 92b40dd42a..79d10c6c59 100644--- a/app/src/pages/__tests__/Conversations.render.test.tsx+++ b/app/src/pages/__tests__/Conversations.render.test.tsx@@ -921,13 +921,15 @@ describe('Conversations — smoke render (#1123 welcome-lock removal)', () => {expect.objectContaining({ content: 'hello cloud', sender: 'user', type: 'text' }));});- expect(chatSend).toHaveBeenCalledWith({- threadId: thread.id,- message: 'hello cloud',- model: 'hint:chat',- locale: 'en',- reasoningEffort: 'default',- });+ expect(chatSend).toHaveBeenCalledWith(+ expect.objectContaining({+ threadId: thread.id,+ message: 'hello cloud',+ locale: 'en',+ reasoningEffort: 'default',+ })+ );+ expect(vi.mocked(chatSend).mock.calls[0][0]).not.toHaveProperty('model');});it('auto-sends a dictation transcript (autoSend) straight to chat without the composer', async () => {@@ -945,13 +947,15 @@ describe('Conversations — smoke render (#1123 welcome-lock removal)', () => {});await waitFor(() => {- expect(chatSend).toHaveBeenCalledWith({- threadId: thread.id,- message: 'play highway to hell',- model: 'hint:chat',- locale: 'en',- reasoningEffort: 'default',- });+ expect(chatSend).toHaveBeenCalledWith(+ expect.objectContaining({+ threadId: thread.id,+ message: 'play highway to hell',+ locale: 'en',+ reasoningEffort: 'default',+ })+ );+ expect(vi.mocked(chatSend).mock.calls[0][0]).not.toHaveProperty('model');});});@@ -997,13 +1001,15 @@ describe('Conversations — smoke render (#1123 welcome-lock removal)', () => {expect(chatSend).toHaveBeenCalledTimes(1);});expect(threadApi.appendMessage).toHaveBeenCalledTimes(1);- expect(chatSend).toHaveBeenCalledWith({- threadId: thread.id,- message: 'slow backend',- model: 'hint:chat',- locale: 'en',- reasoningEffort: 'default',- });+ expect(chatSend).toHaveBeenCalledWith(+ expect.objectContaining({+ threadId: thread.id,+ message: 'slow backend',+ locale: 'en',+ reasoningEffort: 'default',+ })+ );+ expect(vi.mocked(chatSend).mock.calls[0][0]).not.toHaveProperty('model');// The send cleared the composer; with an empty composer mid-send the Send// button morphs into the Stop button, so there is no Send affordance left// to fire a duplicate send.@@ -1352,6 +1358,80 @@ describe('Conversations — smoke render (#1123 welcome-lock removal)', () => {expect(threadApi.appendMessage).not.toHaveBeenCalled();});+ it('re-issues a Stop pressed before the core had registered the turn', async () => {+ // The send RPC is still in flight, so the core has no turn yet and the+ // first cancel finds nothing. Once the RPC returns the turn exists, and the+ // Stop must be sent again rather than letting the turn run to completion.+ let resolveSend: (() => void) | undefined;+ vi.mocked(chatSend).mockImplementationOnce(+ () =>+ new Promise<string | undefined>(resolve => {+ resolveSend = () => resolve('req-late');+ })+ );+ vi.mocked(chatCancel)+ .mockResolvedValueOnce({ accepted: true, turnCancelled: false })+ .mockResolvedValueOnce({ accepted: true, turnCancelled: true });+ const { textarea, thread } = await renderSelectedConversation();++ await act(async () => {+ setComposerText(textarea, 'stop me early');+ });+ await act(async () => {+ fireEvent.click(screen.getByRole('button', { name: 'Send message' }));+ });+ const stopButton = await screen.findByRole('button', { name: 'Stop generating' });+ await act(async () => {+ fireEvent.click(stopButton);+ });+ await act(async () => {+ await Promise.resolve();+ });+ expect(chatCancel).toHaveBeenCalledTimes(1);++ await act(async () => {+ resolveSend?.();+ await Promise.resolve();+ });++ expect(chatCancel).toHaveBeenCalledTimes(2);+ expect(chatCancel).toHaveBeenNthCalledWith(2, thread.id);+ });++ it.each([+ ['the cancel event never arrives', { accepted: true, turnCancelled: true }],+ ['the cancel RPC fails', { accepted: false, turnCancelled: false }],+ ])('settles the running state after a Stop when %s', async (_label, outcome) => {+ vi.mocked(chatCancel).mockResolvedValueOnce(outcome);+ const { thread, store } = await renderStreamingConversation({+ streamingContent: 'half a thought',+ });+ const stopButton = await screen.findByRole('button', { name: 'Stop generating' });++ vi.useFakeTimers();+ try {+ await act(async () => {+ fireEvent.click(stopButton);+ await Promise.resolve();+ });+ // Still waiting on the core's confirmation.+ expect(store.getState().chatRuntime.inferenceTurnLifecycleByThread[thread.id]).toBe(+ 'streaming'+ );++ await act(async () => {+ vi.advanceTimersByTime(5_000);+ });+ } finally {+ vi.useRealTimers();+ }++ expect(chatCancel).toHaveBeenCalledWith(thread.id);+ expect(store.getState().chatRuntime.inferenceTurnLifecycleByThread[thread.id]).toBeUndefined();+ expect(store.getState().thread.activeThreadIds[thread.id]).toBeUndefined();+ expect(screen.queryByRole('button', { name: 'Stop generating' })).toBeNull();+ });+it('does not locally persist a partial across repeated Stop clicks (#4862)', async () => {const { thread } = await renderStreamingConversation({ streamingContent: 'half a thought' });@@ -2101,13 +2181,15 @@ describe('Conversations — smoke render (#1123 welcome-lock removal)', () => {});await waitFor(() => {- expect(chatSend).toHaveBeenCalledWith({- threadId: thread.id,- message: 'enter send',- model: 'hint:chat',- locale: 'en',- reasoningEffort: 'default',- });+ expect(chatSend).toHaveBeenCalledWith(+ expect.objectContaining({+ threadId: thread.id,+ message: 'enter send',+ locale: 'en',+ reasoningEffort: 'default',+ })+ );+ expect(vi.mocked(chatSend).mock.calls[0][0]).not.toHaveProperty('model');});});@@ -2176,13 +2258,15 @@ describe('Conversations — smoke render (#1123 welcome-lock removal)', () => {});await waitFor(() => {- expect(chatSend).toHaveBeenCalledWith({- threadId: thread.id,- message: '안녕',- model: 'hint:chat',- locale: 'en',- reasoningEffort: 'default',- });+ expect(chatSend).toHaveBeenCalledWith(+ expect.objectContaining({+ threadId: thread.id,+ message: '안녕',+ locale: 'en',+ reasoningEffort: 'default',+ })+ );+ expect(vi.mocked(chatSend).mock.calls[0][0]).not.toHaveProperty('model');});});diff --git a/app/src/pages/__tests__/Welcome.test.tsx b/app/src/pages/__tests__/Welcome.test.tsxindex d712c45c14..f4a86b2d8b 100644--- a/app/src/pages/__tests__/Welcome.test.tsx+++ b/app/src/pages/__tests__/Welcome.test.tsx@@ -1,9 +1,14 @@import { fireEvent, screen, waitFor } from '@testing-library/react';+import { act } from 'react';import { beforeEach, describe, expect, it, vi } from 'vitest';import { clearBackendUrlCache } from '../../services/backendUrl';import { clearCoreRpcTokenCache, clearCoreRpcUrlCache } from '../../services/coreRpcClient';-import { useDeepLinkAuthState } from '../../store/deepLinkAuthState';+import {+ endAwaitingAuthCallback,+ getDeepLinkAuthState,+ useDeepLinkAuthState,+} from '../../store/deepLinkAuthState';import { renderWithProviders } from '../../test/test-utils';import {clearStoredCoreMode,@@ -54,7 +59,11 @@ vi.mock('../../components/oauth/providerConfigs', () => ({],}));-vi.mock('../../store/deepLinkAuthState', () => ({ useDeepLinkAuthState: vi.fn() }));+vi.mock('../../store/deepLinkAuthState', () => ({+ useDeepLinkAuthState: vi.fn(),+ getDeepLinkAuthState: vi.fn(),+ endAwaitingAuthCallback: vi.fn(),+}));const mockNavigate = vi.fn();vi.mock('react-router-dom', async () => {@@ -106,6 +115,51 @@ vi.mock('../../utils/configPersistence', () => ({normalizeRpcUrl: vi.fn((url: string) => url.trim().replace(/\/+$/, '')),}));+/**+ * The provider buttons are rendered unconditionally now, so there is nothing+ * to reveal. Kept as a no-op so the call sites below still read as "the+ * providers are available at this point" rather than being silently deleted.+ */+function revealProviders() {+ expect(screen.getByTestId('welcome-cta-tinyhumans')).toBeInTheDocument();+}++describe('Welcome — two-card layout', () => {+ beforeEach(() => {+ vi.mocked(useDeepLinkAuthState).mockReturnValue({+ isProcessing: false,+ awaitingCallback: false,+ errorMessage: null,+ errorMessageKey: null,+ requiresAppDataReset: false,+ });+ });++ it('renders both cards with their CTAs and the server link', () => {+ renderWithProviders(<Welcome />);++ expect(screen.getByTestId('welcome-card-tinyhumans')).toBeInTheDocument();+ expect(screen.getByTestId('welcome-card-self')).toBeInTheDocument();+ // The TinyHumans card's action IS the provider row — there is no+ // intermediate button to click through.+ expect(screen.getByTestId('welcome-cta-tinyhumans')).toBeInTheDocument();+ expect(screen.getByTestId('welcome-cta-self')).toHaveTextContent('Set it up myself');+ expect(screen.getByTestId('welcome-server-link')).toHaveTextContent('Connect to it.');+ });++ it('shows the sign-in providers immediately, with no reveal step', () => {+ // A "Continue with TinyHumans" button used to gate these. It revealed the+ // buttons and did nothing else, so it was a tap that bought nothing.+ renderWithProviders(<Welcome />);++ expect(screen.getByRole('button', { name: 'google' })).toBeInTheDocument();+ expect(screen.getByRole('button', { name: 'github' })).toBeInTheDocument();+ expect(screen.getByRole('button', { name: 'twitter' })).toBeInTheDocument();+ // `showOnWelcome: false` still keeps discord out.+ expect(screen.queryByRole('button', { name: 'discord' })).not.toBeInTheDocument();+ });+});+describe('Welcome auth entrypoint', () => {beforeEach(() => {oauthButtonSpy.mockReset();@@ -113,6 +167,7 @@ describe('Welcome auth entrypoint', () => {vi.mocked(openUrl).mockClear();vi.mocked(useDeepLinkAuthState).mockReturnValue({isProcessing: false,+ awaitingCallback: false,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,@@ -121,6 +176,7 @@ describe('Welcome auth entrypoint', () => {it('renders only the OAuth buttons when auth is idle', () => {renderWithProviders(<Welcome />);+ revealProviders();expect(screen.queryByLabelText('Email address')).not.toBeInTheDocument();expect(screen.queryByRole('button', { name: 'Continue with email' })).not.toBeInTheDocument();@@ -148,6 +204,7 @@ describe('Welcome auth entrypoint', () => {it('delegates OAuth clicks to OAuthProviderButton without an override', () => {renderWithProviders(<Welcome />);+ revealProviders();fireEvent.click(screen.getByRole('button', { name: 'google' }));fireEvent.click(screen.getByRole('button', { name: 'github' }));@@ -162,19 +219,174 @@ describe('Welcome auth entrypoint', () => {it('shows the deep-link processing state when auth is already in progress', () => {vi.mocked(useDeepLinkAuthState).mockReturnValue({isProcessing: true,+ awaitingCallback: false,+ errorMessage: null,+ errorMessageKey: null,+ requiresAppDataReset: false,+ });++ renderWithProviders(<Welcome />);++ expect(screen.getByTestId('welcome-handoff')).toBeInTheDocument();+ expect(screen.getByRole('status')).toHaveTextContent('Finishing sign-in in your browser');+ // No sign-in buttons on the hand-off: a provider has already been picked+ // and the browser is open, so repeating the row asks the same question+ // twice. The 90s timeout's failure state is where the way out lives.+ expect(screen.queryByTestId('welcome-handoff-reopen')).not.toBeInTheDocument();+ expect(screen.queryByRole('button', { name: 'google' })).not.toBeInTheDocument();+ // The two cards are replaced by the hand-off screen while auth is in flight.+ expect(screen.queryByTestId('welcome-card-tinyhumans')).not.toBeInTheDocument();+ });++ it('shows the hand-off panel while awaiting the browser callback, even though no auth step is running', () => {+ vi.mocked(useDeepLinkAuthState).mockReturnValue({+ isProcessing: false,+ awaitingCallback: true,+ errorMessage: null,+ errorMessageKey: null,+ requiresAppDataReset: false,+ });++ renderWithProviders(<Welcome />);++ expect(screen.getByTestId('welcome-handoff')).toBeInTheDocument();+ expect(screen.getByRole('status')).toHaveTextContent('Finishing sign-in in your browser');+ expect(screen.queryByTestId('welcome-card-tinyhumans')).not.toBeInTheDocument();+ expect(screen.queryByRole('button', { name: 'google' })).not.toBeInTheDocument();+ });++ it('ends the wait when the window regains focus with no callback (cancelled browser flow)', () => {+ vi.mocked(useDeepLinkAuthState).mockReturnValue({+ isProcessing: false,+ awaitingCallback: true,+ errorMessage: null,+ errorMessageKey: null,+ requiresAppDataReset: false,+ });+ vi.mocked(getDeepLinkAuthState).mockReturnValue({+ isProcessing: false,+ awaitingCallback: true,+ errorMessage: null,+ errorMessageKey: null,+ requiresAppDataReset: false,+ });+ vi.mocked(endAwaitingAuthCallback).mockClear();++ vi.useFakeTimers();+ renderWithProviders(<Welcome />);+ act(() => {+ window.dispatchEvent(new FocusEvent('focus'));+ });++ // The grace window has to elapse first: a successful callback arrives+ // after the focus event, so ending the wait on focus alone would cut a+ // good sign-in short.+ expect(endAwaitingAuthCallback).not.toHaveBeenCalled();+ act(() => {+ vi.advanceTimersByTime(1_500);+ });+ expect(endAwaitingAuthCallback).toHaveBeenCalledTimes(1);+ vi.useRealTimers();+ });++ it('keeps the hand-off when the callback lands during the grace window', () => {+ vi.mocked(useDeepLinkAuthState).mockReturnValue({+ isProcessing: false,+ awaitingCallback: true,+ errorMessage: null,+ errorMessageKey: null,+ requiresAppDataReset: false,+ });+ // The real ordering: focus fires while the store still says no auth step+ // is running, and the deep link lands a moment later. Reading the store+ // the instant focus arrives therefore says "cancelled" during a perfectly+ // good sign-in, which is why the decision is deferred.+ let storeProcessing = false;+ vi.mocked(getDeepLinkAuthState).mockImplementation(() => ({+ isProcessing: storeProcessing,+ awaitingCallback: true,+ errorMessage: null,+ errorMessageKey: null,+ requiresAppDataReset: false,+ }));+ vi.mocked(endAwaitingAuthCallback).mockClear();++ vi.useFakeTimers();+ renderWithProviders(<Welcome />);+ act(() => {+ window.dispatchEvent(new FocusEvent('focus'));+ });+ // The callback arrives inside the grace window.+ act(() => {+ vi.advanceTimersByTime(500);+ });+ storeProcessing = true;+ act(() => {+ vi.advanceTimersByTime(1_000);+ });++ expect(endAwaitingAuthCallback).not.toHaveBeenCalled();+ expect(screen.getByTestId('welcome-handoff')).toBeInTheDocument();+ vi.useRealTimers();+ });++ it('keeps waiting on focus when a callback is already being redeemed', () => {+ const redeeming = {+ isProcessing: true,+ awaitingCallback: true,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,+ };+ vi.mocked(useDeepLinkAuthState).mockReturnValue(redeeming);+ vi.mocked(getDeepLinkAuthState).mockReturnValue(redeeming);+ vi.mocked(endAwaitingAuthCallback).mockClear();++ vi.useFakeTimers();+ renderWithProviders(<Welcome />);+ act(() => {+ window.dispatchEvent(new FocusEvent('focus'));+ });+ act(() => {+ vi.advanceTimersByTime(1_500);+ });++ expect(endAwaitingAuthCallback).not.toHaveBeenCalled();+ vi.useRealTimers();+ });++ it('offers retry and a self-hosted fallback when the browser hand-off fails', async () => {+ vi.mocked(useDeepLinkAuthState).mockReturnValue({+ isProcessing: false,+ awaitingCallback: false,+ errorMessage: 'OAuth failed',+ errorMessageKey: null,+ requiresAppDataReset: false,});renderWithProviders(<Welcome />);- expect(screen.getByRole('status')).toHaveTextContent('Signing you in...');+ expect(screen.getByRole('alert')).toHaveTextContent("Sign-in didn't come back");+ // Retrying means clicking a provider again, and the card keeps them on+ // screen — the alert deliberately does not repeat them, which would put+ // two Google buttons in the document.+ expect(screen.getAllByRole('button', { name: 'google' })).toHaveLength(1);++ // The retry itself: clicking the provider starts a sign-in again.+ oauthButtonSpy.mockClear();+ fireEvent.click(screen.getByRole('button', { name: 'google' }));+ expect(oauthButtonSpy).toHaveBeenCalledTimes(1);+ expect(oauthButtonSpy).toHaveBeenCalledWith('google');++ fireEvent.click(screen.getByTestId('welcome-handoff-fallback-self'));+ await waitFor(() => expect(mockStoreSessionToken).toHaveBeenCalledTimes(1));+ expect(mockNavigate).toHaveBeenCalledWith('/onboarding/custom/inference', { replace: true });});it('renders deep-link auth errors', () => {vi.mocked(useDeepLinkAuthState).mockReturnValue({isProcessing: false,+ awaitingCallback: false,errorMessage: 'OAuth failed',errorMessageKey: null,requiresAppDataReset: false,@@ -194,6 +406,7 @@ describe('Welcome — decryption-failure recovery action', () => {mockClearAllAppData.mockReset().mockResolvedValue(undefined);vi.mocked(useDeepLinkAuthState).mockReturnValue({isProcessing: false,+ awaitingCallback: false,errorMessage: "Sign-in failed because OpenHuman couldn't decrypt locally stored data.",errorMessageKey: null,requiresAppDataReset: true,@@ -242,10 +455,11 @@ describe('Welcome — decryption-failure recovery action', () => {});});-describe('Welcome — Select runtime button', () => {+describe('Welcome — server link (Connect to it.)', () => {beforeEach(() => {vi.mocked(useDeepLinkAuthState).mockReturnValue({isProcessing: false,+ awaitingCallback: false,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,@@ -258,10 +472,10 @@ describe('Welcome — Select runtime button', () => {vi.mocked(clearStoredCoreMode).mockReset();});- it('renders the "Select a Runtime" button below the card', () => {+ it('renders the "Connect to it." link below the cards', () => {renderWithProviders(<Welcome />);- expect(screen.getByRole('button', { name: 'Select a Runtime' })).toBeInTheDocument();+ expect(screen.getByTestId('welcome-server-link')).toBeInTheDocument();});it('does not render the legacy "Configure RPC URL (Advanced)" toggle', () => {@@ -272,12 +486,12 @@ describe('Welcome — Select runtime button', () => {).not.toBeInTheDocument();});- it('clicking "Select a Runtime" clears persisted core-mode state and resets caches', () => {+ it('clicking "Connect to it." clears persisted core-mode state and resets caches', () => {const { store } = renderWithProviders(<Welcome />, {preloadedState: { coreMode: { mode: { kind: 'cloud', url: 'http://x', token: 't' } } },});- fireEvent.click(screen.getByRole('button', { name: 'Select a Runtime' }));+ fireEvent.click(screen.getByTestId('welcome-server-link'));expect(storeRpcUrl).toHaveBeenCalledWith('');expect(clearStoredCoreToken).toHaveBeenCalledTimes(1);@@ -296,6 +510,7 @@ describe('Welcome — OAuth buttons presence', () => {beforeEach(() => {vi.mocked(useDeepLinkAuthState).mockReturnValue({isProcessing: false,+ awaitingCallback: false,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,@@ -304,6 +519,7 @@ describe('Welcome — OAuth buttons presence', () => {it('renders all providers with showOnWelcome=true', () => {renderWithProviders(<Welcome />);+ revealProviders();expect(screen.getByRole('button', { name: 'google' })).toBeInTheDocument();expect(screen.getByRole('button', { name: 'github' })).toBeInTheDocument();@@ -312,19 +528,29 @@ describe('Welcome — OAuth buttons presence', () => {it('does not render providers with showOnWelcome=false', () => {renderWithProviders(<Welcome />);+ revealProviders();expect(screen.queryByRole('button', { name: 'discord' })).not.toBeInTheDocument();});- it('hides OAuth buttons while auth is processing', () => {+ it('swaps the cards for the hand-off panel while auth is processing', () => {vi.mocked(useDeepLinkAuthState).mockReturnValue({isProcessing: true,+ awaitingCallback: false,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,});renderWithProviders(<Welcome />);+ // The two choice cards give way to the hand-off panel...+ expect(screen.queryByTestId('welcome-card-tinyhumans')).not.toBeInTheDocument();+ expect(screen.getByTestId('welcome-handoff')).toBeInTheDocument();++ // ...and carries no sign-in buttons of its own. A provider has already+ // been chosen and the browser is open; the row would just repeat the+ // question. Recovery lives in the 90s failure state, not here.+ expect(screen.queryByTestId('welcome-handoff-reopen')).not.toBeInTheDocument();expect(screen.queryByRole('button', { name: 'google' })).not.toBeInTheDocument();});});@@ -335,37 +561,40 @@ describe('Welcome — local login', () => {mockNavigate.mockReset();vi.mocked(useDeepLinkAuthState).mockReturnValue({isProcessing: false,+ awaitingCallback: false,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,});});- it('renders the "Continue locally" button regardless of runtime mode', () => {+ it('renders the "Set it up myself" button regardless of runtime mode', () => {renderWithProviders(<Welcome />);- expect(screen.getByRole('button', { name: /Continue locally/i })).toBeInTheDocument();+ expect(screen.getByTestId('welcome-cta-self')).toBeInTheDocument();});- it('renders the "Continue locally" button in cloud mode too', () => {+ it('renders the "Set it up myself" button in cloud mode too', () => {renderWithProviders(<Welcome />, {preloadedState: { coreMode: { mode: { kind: 'cloud', url: 'http://x', token: 't' } } },});- expect(screen.getByRole('button', { name: /Continue locally/i })).toBeInTheDocument();+ expect(screen.getByTestId('welcome-cta-self')).toBeInTheDocument();});- it('calls storeSessionToken with a local session token and navigates to /home', async () => {+ it('"Set it up myself" starts a local session and goes to the custom wizard', async () => {renderWithProviders(<Welcome />);- const localBtn = screen.getByRole('button', { name: /Continue locally/i });+ const localBtn = screen.getByTestId('welcome-cta-self');fireEvent.click(localBtn);await waitFor(() => {expect(mockStoreSessionToken).toHaveBeenCalledTimes(1);});const [tokenArg, userArg] = mockStoreSessionToken.mock.calls[0];- expect(tokenArg).toContain('local');+ // A local session token is a 3-part JWT whose signature segment is "local".+ expect(tokenArg.split('.')).toHaveLength(3);+ expect(tokenArg.split('.')[2]).toBe('local');expect(userArg).toEqual(expect.objectContaining({ id: 'local' }));expect(mockNavigate).toHaveBeenCalledWith('/onboarding/custom/inference', { replace: true });});@@ -375,7 +604,7 @@ describe('Welcome — local login', () => {renderWithProviders(<Welcome />);- const localBtn = screen.getByRole('button', { name: /Continue locally/i });+ const localBtn = screen.getByTestId('welcome-cta-self');fireEvent.click(localBtn);await waitFor(() => {@@ -397,7 +626,7 @@ describe('Welcome — local login', () => {);renderWithProviders(<Welcome />);- fireEvent.click(screen.getByRole('button', { name: /Continue locally/i }));+ fireEvent.click(screen.getByTestId('welcome-cta-self'));await waitFor(() => {expect(screen.getByText(/could not read its configuration file/i)).toBeInTheDocument();diff --git a/app/src/pages/onboarding/Onboarding.tsx b/app/src/pages/onboarding/Onboarding.tsxindex 517585f6cf..eea562742e 100644--- a/app/src/pages/onboarding/Onboarding.tsx+++ b/app/src/pages/onboarding/Onboarding.tsx@@ -1,29 +1,33 @@import { Navigate, Route, Routes } from 'react-router-dom';import OnboardingLayout from './OnboardingLayout';-import CustomEmbeddingsPage from './pages/CustomEmbeddingsPage';import CustomInferencePage from './pages/CustomInferencePage';-import CustomOAuthPage from './pages/CustomOAuthPage';import CustomSearchPage from './pages/CustomSearchPage';-import CustomVoicePage from './pages/CustomVoicePage';-import RuntimeChoicePage from './pages/RuntimeChoicePage';import VaultSetupStep from './pages/VaultSetupStep';import WelcomePage from './pages/WelcomePage';/*** Routed onboarding flow.*- * welcome → runtime-choice- * ├── cloud → /chat- * └── custom → /custom/inference → voice → oauth → search → embeddings → vault → /chat+ * welcome ─┬─ TinyHumans session → completeAndExit → /chat+ * └─ local session → /custom/inference → search → vault → /chat+ *+ * `runtime-choice` is gone: the identity question is asked once on the+ * Welcome screen (`pages/Welcome.tsx`) as two cards, so asking it again three+ * screens later was the same question twice. Its page and step files stay on+ * disk, unrouted.** Each custom step asks Default (let OpenHuman manage it) vs Configure* (let me pick). Default is a one-click pick; Configure renders inline* controls (or a deep-link callout to Settings, for domains not yet- * embedded). Gmail/Composio (`/onboarding/skills`) and Composio-driven- * context gathering (`/onboarding/context`) are gone from the default- * flow; their step + page files remain on disk in case we want to revive- * them later.+ * embedded). A local session skips the choice entirely and always configures.+ *+ * Voice, OAuth and embeddings are retired: six steps before a first message+ * was a forced tour of Settings, and all three stay reachable from Settings.+ * Their page files are kept unrouted so reviving a step is a route entry+ * rather than a rewrite. (An older note here claimed the same for the+ * Gmail/Composio and context steps, but those files are gone — the claim was+ * stale, so treat keeping these as a choice to confirm, not a convention.)*/const Onboarding = () => {return (@@ -31,12 +35,8 @@ const Onboarding = () => {<Route element={<OnboardingLayout />}><Route index element={<Navigate to="welcome" replace />} /><Route path="welcome" element={<WelcomePage />} />- <Route path="runtime-choice" element={<RuntimeChoicePage />} /><Route path="custom/inference" element={<CustomInferencePage />} />- <Route path="custom/voice" element={<CustomVoicePage />} />- <Route path="custom/oauth" element={<CustomOAuthPage />} /><Route path="custom/search" element={<CustomSearchPage />} />- <Route path="custom/embeddings" element={<CustomEmbeddingsPage />} /><Route path="custom/vault" element={<VaultSetupStep />} /><Route path="*" element={<Navigate to="welcome" replace />} /></Route>diff --git a/app/src/pages/onboarding/OnboardingLayout.tsx b/app/src/pages/onboarding/OnboardingLayout.tsxindex 1c45fdc48d..0c5595cea4 100644--- a/app/src/pages/onboarding/OnboardingLayout.tsx+++ b/app/src/pages/onboarding/OnboardingLayout.tsx@@ -1,9 +1,10 @@-import { useCallback, useMemo, useState } from 'react';+import { useCallback, useEffect, useMemo, useRef, useState } from 'react';import { Outlet, useNavigate } from 'react-router-dom';import { setWalkthroughPending } from '../../components/walkthrough/AppWalkthrough';import { useCoreState } from '../../providers/CoreStateProvider';import { trackEvent } from '../../services/analytics';+import { userScopedStorage } from '../../store/userScopedStorage';import { getDefaultEnabledTools, getEnabledRustToolNames } from '../../utils/toolDefinitions';import BetaBanner from './components/BetaBanner';import { OnboardingContext, type OnboardingDraft } from './OnboardingContext';@@ -13,11 +14,46 @@ import { OnboardingContext, type OnboardingDraft } from './OnboardingContext';* completion side-effects (persist `onboarding_completed`, notify backend,* navigate to /chat). Individual steps render through `<Outlet />`.*/+/** Where the in-progress draft is parked between reloads. */+const DRAFT_STORAGE_KEY = 'onboarding_draft';+const OnboardingLayout = () => {const navigate = useNavigate();const { setOnboardingCompletedFlag, setOnboardingTasks, snapshot } = useCoreState();const [draft, setDraftState] = useState<OnboardingDraft>({ connectedSources: [] });+ // The draft used to live only in React state, so a reload mid-wizard lost+ // every choice and the gate sent the user back to step one. It is per-user+ // state, so it goes through `userScopedStorage` rather than raw localStorage.+ const draftLoaded = useRef(false);++ useEffect(() => {+ let cancelled = false;+ void userScopedStorage+ .getItem(DRAFT_STORAGE_KEY)+ .then(raw => {+ if (cancelled || !raw) return;+ const parsed = JSON.parse(raw) as OnboardingDraft;+ if (parsed && Array.isArray(parsed.connectedSources)) {+ setDraftState(parsed);+ }+ })+ .catch(e => console.debug('[onboarding:layout] no resumable draft', e))+ .finally(() => {+ if (!cancelled) draftLoaded.current = true;+ });+ return () => {+ cancelled = true;+ };+ }, []);++ // Only persist after the restore has settled, so an empty initial state+ // cannot overwrite a saved draft before it is read back.+ useEffect(() => {+ if (!draftLoaded.current) return;+ void userScopedStorage.setItem(DRAFT_STORAGE_KEY, JSON.stringify(draft));+ }, [draft]);+const setDraft = useCallback((updater: (prev: OnboardingDraft) => OnboardingDraft) => setDraftState(updater),[]@@ -57,6 +93,8 @@ const OnboardingLayout = () => {try {await setOnboardingCompletedFlag(true);} catch (e) {+ // Rethrown so the calling step can offer a retry. The draft stays in+ // storage, so a retry — or a reload — resumes instead of starting over.console.error('[onboarding] Failed to persist onboarding_completed', e);throw e;}@@ -73,6 +111,17 @@ const OnboardingLayout = () => {console.warn('[onboarding:layout] could not set walkthrough pending flag; continuing', e);}+ // The run is finished; drop the resumable draft so a later visit to+ // onboarding does not inherit stale choices. Deliberately NOT awaited:+ // `userScopedStorage` blocks on the boot-time `primeActiveUserId()`, so+ // awaiting it would put a storage handshake on the critical path to /chat+ // and hang the final step if that prime never happened. A stale draft is+ // harmless — the onboarding gate will not route back here once+ // `onboarding_completed` is set — so cleanup is best-effort.+ void userScopedStorage+ .removeItem(DRAFT_STORAGE_KEY)+ .catch(e => console.warn('[onboarding:layout] could not clear the saved draft', e));+navigate('/chat', { replace: true });}, [draft.connectedSources, navigate, setOnboardingCompletedFlag, setOnboardingTasks, snapshot]);diff --git a/app/src/pages/onboarding/__tests__/OnboardingLayout.test.tsx b/app/src/pages/onboarding/__tests__/OnboardingLayout.test.tsxindex ed30d303de..ff8b6d3180 100644--- a/app/src/pages/onboarding/__tests__/OnboardingLayout.test.tsx+++ b/app/src/pages/onboarding/__tests__/OnboardingLayout.test.tsx@@ -15,8 +15,13 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';import socketReducer from '../../../store/socketSlice';import threadReducer from '../../../store/threadSlice';+import { primeActiveUserId } from '../../../store/userScopedStorage';import { useOnboardingContext } from '../OnboardingContext';+// The layout parks its draft in userScopedStorage, whose reads and writes wait+// on the boot-time prime that main.tsx performs in the real app.+primeActiveUserId('test-user');+// ── Module-level mocks ─────────────────────────────────────────────────────// [#1123] Mock setWalkthroughPending to allow per-test override (e.g. throw),@@ -174,6 +179,17 @@ describe('OnboardingLayout — Joyride walkthrough integration (#1123)', () => {expect(mockCreateNewThreadArg).not.toHaveBeenCalled();});+ it('clears the persisted onboarding draft on completion', async () => {+ localStorage.setItem('test-user:onboarding_draft', JSON.stringify({ connectedSources: [] }));+ await setupLayout();++ await act(async () => {+ fireEvent.click(screen.getByTestId('complete-btn'));+ });++ expect(localStorage.getItem('test-user:onboarding_draft')).toBeNull();+ });+it('calls setOnboardingCompletedFlag(true) during completeAndExit', async () => {const { mockSetOnboardingCompletedFlag } = await setupLayout();diff --git a/app/src/pages/onboarding/components/BetaBanner.tsx b/app/src/pages/onboarding/components/BetaBanner.tsxindex c728d5cd5a..25a165b58b 100644--- a/app/src/pages/onboarding/components/BetaBanner.tsx+++ b/app/src/pages/onboarding/components/BetaBanner.tsx@@ -1,5 +1,6 @@import { useState } from 'react';+import { Alert, AlertDescription, Button, CloseIcon } from '../../../components/ui';import { useT } from '../../../lib/i18n/I18nContext';import { DISCORD_INVITE_URL } from '../../../utils/links';@@ -27,40 +28,27 @@ const BetaBanner = () => {};return (- <div className="mb-4 flex items-start gap-3 rounded-xl border border-amber-200 dark:border-amber-500/30 bg-amber-50 dark:bg-amber-500/10 px-4 py-3">- {/* Message */}- <p className="flex-1 text-xs leading-relaxed text-content-secondary">+ <Alert variant="warning" role={undefined} className="mb-4 items-start">+ <AlertDescription className="flex-1 text-xs">{t('misc.beta')}{' '}<ahref={DISCORD_INVITE_URL}target="_blank"rel="noopener noreferrer"- className="font-medium text-amber-800 dark:text-amber-300 underline underline-offset-2 hover:text-amber-900 dark:hover:text-amber-200">+ className="font-medium underline underline-offset-2 hover:opacity-80">{t('misc.betaFeedback')}</a>- </p>-- {/* Dismiss */}- <button- type="button"+ </AlertDescription>+ <Button+ variant="tertiary"+ size="xs"+ iconOnlyaria-label={t('common.dismiss')}onClick={handleDismiss}- className="mt-0.5 shrink-0 text-content-faint hover:text-content-secondary dark:text-content-secondary transition-colors">- <svg- className="h-3.5 w-3.5"- fill="none"- stroke="currentColor"- viewBox="0 0 24 24"- aria-hidden="true">- <path- strokeLinecap="round"- strokeLinejoin="round"- strokeWidth={2}- d="M6 18L18 6M6 6l12 12"- />- </svg>- </button>- </div>+ className="shrink-0">+ <CloseIcon className="h-3.5 w-3.5" aria-hidden="true" />+ </Button>+ </Alert>);};diff --git a/app/src/pages/onboarding/components/OnboardingNextButton.tsx b/app/src/pages/onboarding/components/OnboardingNextButton.tsxindex 2999152f6a..f3e333ef06 100644--- a/app/src/pages/onboarding/components/OnboardingNextButton.tsx+++ b/app/src/pages/onboarding/components/OnboardingNextButton.tsx@@ -1,3 +1,4 @@+import { Button } from '../../../components/ui';import { useT } from '../../../lib/i18n/I18nContext';interface OnboardingNextButtonProps {@@ -19,17 +20,18 @@ const OnboardingNextButton = ({const effectiveLabel = label ?? t('common.continue');const effectiveLoadingLabel = loadingLabel ?? effectiveLabel;return (- <button- type="button"+ <Button+ variant="primary"+ size="lg"data-testid="onboarding-next-button"aria-label={effectiveLabel}aria-live="polite"aria-busy={loading}onClick={onClick}disabled={disabled || loading}- className="w-full py-2.5 bg-primary-500 hover:bg-primary-600 active:bg-primary-700 text-content-inverted text-sm font-medium rounded-xl transition-colors disabled:opacity-50 disabled:cursor-not-allowed focus:outline-hidden focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 dark:focus:ring-offset-neutral-900">+ className="w-full">{loading ? effectiveLoadingLabel : effectiveLabel}- </button>+ </Button>);};diff --git a/app/src/pages/onboarding/components/WizardStepper.tsx b/app/src/pages/onboarding/components/WizardStepper.tsxindex a4ed388e0e..9af11aff9b 100644--- a/app/src/pages/onboarding/components/WizardStepper.tsx+++ b/app/src/pages/onboarding/components/WizardStepper.tsx@@ -1,3 +1,4 @@+import { Stepper } from '../../../components/ui';import { useT } from '../../../lib/i18n/I18nContext';interface WizardStepperProps {@@ -8,83 +9,18 @@ interface WizardStepperProps {}/**- * Horizontal step indicator rendered above the body of each custom-wizard- * step. Renders a dot per step, connected by lines, with three visual- * states: completed (filled sage with a check), active (filled primary),- * and upcoming (outlined stone).+ * Thin wrapper over the shared `Stepper` primitive that supplies the+ * onboarding copy and the E2E test id.*/const WizardStepper = ({ labels, activeIndex }: WizardStepperProps) => {const { t } = useT();return (- <ol- role="list"- aria-label={t('onboarding.custom.progressAriaLabel')}- className="flex w-full items-start justify-between"- data-testid="onboarding-wizard-stepper">- {labels.map((label, idx) => {- const completed = idx < activeIndex;- const active = idx === activeIndex;- const isLast = idx === labels.length - 1;-- const dotClasses = completed- ? 'bg-sage-500 border-sage-500 text-content-inverted'- : active- ? 'bg-primary-500 border-primary-500 text-content-inverted'- : 'bg-surface border-line-strong text-content-faint';-- const labelClasses = completed- ? 'text-sage-700 dark:text-sage-300'- : active- ? 'text-content font-semibold'- : 'text-content-faint';-- const connectorClasses = completed ? 'bg-sage-500' : 'bg-surface-strong';-- return (- <li- key={label}- aria-current={active ? 'step' : undefined}- className="relative flex flex-1 flex-col items-center">- <div className="flex w-full items-center">- {/* Left spacer / connector */}- <div- aria-hidden- className={`h-0.5 flex-1 ${idx === 0 ? 'opacity-0' : connectorClasses}`}- />- <div- className={`flex h-6 w-6 flex-none items-center justify-center rounded-full border-2 text-[10px] font-semibold ${dotClasses}`}>- {completed ? (- <svg- viewBox="0 0 12 12"- className="h-3 w-3"- fill="none"- aria-hidden- xmlns="http://www.w3.org/2000/svg">- <path- d="M2 6.5L5 9.5L10 3.5"- stroke="currentColor"- strokeWidth="1.75"- strokeLinecap="round"- strokeLinejoin="round"- />- </svg>- ) : (- idx + 1- )}- </div>- {/* Right connector */}- <div- aria-hidden- className={`h-0.5 flex-1 ${isLast ? 'opacity-0' : connectorClasses}`}- />- </div>- <span className={`mt-2 text-[11px] leading-tight text-center ${labelClasses}`}>- {label}- </span>- </li>- );- })}- </ol>+ <Stepper+ labels={labels}+ activeIndex={activeIndex}+ ariaLabel={t('onboarding.custom.progressAriaLabel')}+ data-testid="onboarding-wizard-stepper"+ />);};diff --git a/app/src/pages/onboarding/customWizardSteps.ts b/app/src/pages/onboarding/customWizardSteps.tsindex bff7fc5dea..23b0850f2e 100644--- a/app/src/pages/onboarding/customWizardSteps.ts+++ b/app/src/pages/onboarding/customWizardSteps.ts@@ -1,16 +1,14 @@import type { CustomStepKey } from './OnboardingContext';/** Ordered list of custom-wizard steps. Index drives the step counter UI and- * the back/continue navigation. */-export const CUSTOM_WIZARD_STEPS: CustomStepKey[] = [- 'inference',- 'voice',- 'oauth',- 'search',- 'embeddings',- 'vault',- // 'memory',-];+ * the back/continue navigation.+ *+ * Cut from six steps to three. Voice, OAuth and embeddings were a forced+ * linear tour of Settings standing between a self-hosting user and their+ * first message; all three remain configurable from Settings, and their step+ * page files stay on disk (same convention as the retired Gmail/Composio+ * steps — see the comment in `Onboarding.tsx`). */+export const CUSTOM_WIZARD_STEPS: CustomStepKey[] = ['inference', 'search', 'vault'];export const CUSTOM_WIZARD_ROUTES: Record<CustomStepKey, string> = {inference: '/onboarding/custom/inference',@@ -21,3 +19,24 @@ export const CUSTOM_WIZARD_ROUTES: Record<CustomStepKey, string> = {memory: '/onboarding/custom/memory',vault: '/onboarding/custom/vault',};++/**+ * The stepper label for each step key.+ *+ * This map exists so the stepper cannot disagree with `CUSTOM_WIZARD_STEPS`+ * about which label belongs to which step. It replaces a hand-ordered label+ * array that was sliced to the step count: when the wizard was cut to three+ * steps that slice silently rendered "Inference / Voice / OAuth" — the first+ * three labels of the old six-step order — instead of the three steps+ * actually on screen. Keying labels off the step itself removes the ordering+ * as something anyone has to keep in sync.+ */+export const STEP_LABEL_KEYS: Record<CustomStepKey, string> = {+ inference: 'onboarding.custom.stepperInference',+ voice: 'onboarding.custom.stepperVoice',+ oauth: 'onboarding.custom.stepperOAuth',+ search: 'onboarding.custom.stepperSearch',+ embeddings: 'onboarding.custom.stepperEmbeddings',+ memory: 'onboarding.custom.stepperMemory',+ vault: 'onboarding.custom.stepperVault',+};diff --git a/app/src/pages/onboarding/pages/CustomEmbeddingsPage.tsx b/app/src/pages/onboarding/pages/CustomEmbeddingsPage.tsxindex 27335484b5..90b3a6eb96 100644--- a/app/src/pages/onboarding/pages/CustomEmbeddingsPage.tsx+++ b/app/src/pages/onboarding/pages/CustomEmbeddingsPage.tsx@@ -1,3 +1,12 @@+/**+ * Retired onboarding step — kept on disk, not routed.+ *+ * The custom wizard was cut to inference → search → vault; voice, OAuth and+ * embeddings are all still configurable from Settings, so the step was the+ * only thing removed. The file stays so reviving the step is a route entry+ * rather than a rewrite. Note `pnpm knip` lists this as an unused file;+ * knip is not a CI gate, and deleting it is a reviewer's call.+ */import EmbeddingsPanel from '../../../components/settings/panels/EmbeddingsPanel';import CustomWizardConfigPage from './CustomWizardConfigPage';diff --git a/app/src/pages/onboarding/pages/CustomInferencePage.test.tsx b/app/src/pages/onboarding/pages/CustomInferencePage.test.tsxindex cea4639fe7..8b5b762937 100644--- a/app/src/pages/onboarding/pages/CustomInferencePage.test.tsx+++ b/app/src/pages/onboarding/pages/CustomInferencePage.test.tsx@@ -6,6 +6,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';import { I18nProvider } from '../../../lib/i18n/I18nContext';import type { Locale } from '../../../lib/i18n/types';+import { CoreStateContext } from '../../../providers/coreStateContext';import localeReducer from '../../../store/localeSlice';import CustomInferencePage from './CustomInferencePage';@@ -19,7 +20,12 @@ vi.mock('react-router-dom', async importOriginal => {});vi.mock('../../../components/settings/panels/AIPanel', () => ({- default: () => <div data-testid="ai-panel">AI Panel</div>,+ default: ({ onDirtyChange }: { onDirtyChange?: (dirty: boolean) => void }) => (+ <div data-testid="ai-panel">+ <button onClick={() => onDirtyChange?.(true)}>make-dirty</button>+ <button onClick={() => onDirtyChange?.(false)}>make-clean</button>+ </div>+ ),}));vi.mock('../../../providers/CoreStateProvider', () => ({@@ -46,9 +52,12 @@ function renderPage() {return render(<Provider store={store}><MemoryRouter>- <I18nProvider>- <CustomInferencePage />- </I18nProvider>+ <CoreStateContext.Provider+ value={{ snapshot: { sessionToken: 'header.payload.local' } } as never}>+ <I18nProvider>+ <CustomInferencePage />+ </I18nProvider>+ </CoreStateContext.Provider></MemoryRouter></Provider>);@@ -61,7 +70,7 @@ describe('CustomInferencePage', () => {clearSessionMock.mockClear();});- it('forces configure mode and hides the default/configure chooser for local sessions', () => {+ it('renders the configuration panel directly with no default/configure chooser', () => {renderPage();expect(screen.getByTestId('ai-panel')).toBeInTheDocument();@@ -107,4 +116,25 @@ describe('CustomInferencePage', () => {await Promise.resolve();expect(navigateMock).not.toHaveBeenCalled();});++ it('blocks Continue and shows the hint while the AI panel reports unsaved edits', () => {+ renderPage();++ const next = screen.getByTestId('onboarding-next-button');+ expect(next).toBeEnabled();+ expect(screen.queryByTestId('onboarding-continue-hint')).not.toBeInTheDocument();++ fireEvent.click(screen.getByText('make-dirty'));+ expect(next).toBeDisabled();+ expect(screen.getByTestId('onboarding-continue-hint')).toHaveTextContent(+ 'Save your changes before continuing.'+ );++ fireEvent.click(next);+ expect(navigateMock).not.toHaveBeenCalled();++ fireEvent.click(screen.getByText('make-clean'));+ expect(next).toBeEnabled();+ expect(screen.queryByTestId('onboarding-continue-hint')).not.toBeInTheDocument();+ });});diff --git a/app/src/pages/onboarding/pages/CustomInferencePage.tsx b/app/src/pages/onboarding/pages/CustomInferencePage.tsxindex 35ec944108..14e1148016 100644--- a/app/src/pages/onboarding/pages/CustomInferencePage.tsx+++ b/app/src/pages/onboarding/pages/CustomInferencePage.tsx@@ -1,12 +1,33 @@+import { useState } from 'react';+import AIPanel from '../../../components/settings/panels/AIPanel';+import { useT } from '../../../lib/i18n/I18nContext';import CustomWizardConfigPage from './CustomWizardConfigPage';-const CustomInferencePage = () => (- <CustomWizardConfigPage- stepKey="inference"- backRoute="/"- configureContent={<AIPanel embedded />}- />-);+/**+ * Step 1 — pick a model provider.+ *+ * `hideTabChrome` collapses the panel to its providers view. Without it the+ * wizard inherited the full Settings surface: provider/routing chip tabs, and+ * a full-height scroll region inside a card that has no fixed height.+ *+ * The panel keeps its own `SaveBar`, so the step tracks the panel's dirty+ * state and blocks Continue while edits are pending. Continue used to navigate+ * away and drop them with no warning.+ */+const CustomInferencePage = () => {+ const { t } = useT();+ const [dirty, setDirty] = useState(false);++ return (+ <CustomWizardConfigPage+ stepKey="inference"+ backRoute="/"+ continueDisabled={dirty}+ continueHint={dirty ? t('onboarding.custom.unsavedChanges') : undefined}+ configureContent={<AIPanel embedded hideTabChrome onDirtyChange={setDirty} />}+ />+ );+};export default CustomInferencePage;diff --git a/app/src/pages/onboarding/pages/CustomOAuthPage.tsx b/app/src/pages/onboarding/pages/CustomOAuthPage.tsxindex 8c2e24600b..30f8505da7 100644--- a/app/src/pages/onboarding/pages/CustomOAuthPage.tsx+++ b/app/src/pages/onboarding/pages/CustomOAuthPage.tsx@@ -1,3 +1,12 @@+/**+ * Retired onboarding step — kept on disk, not routed.+ *+ * The custom wizard was cut to inference → search → vault; voice, OAuth and+ * embeddings are all still configurable from Settings, so the step was the+ * only thing removed. The file stays so reviving the step is a route entry+ * rather than a rewrite. Note `pnpm knip` lists this as an unused file;+ * knip is not a CI gate, and deleting it is a reviewer's call.+ */import ComposioPanel from '../../../components/settings/panels/ComposioPanel';import CustomWizardConfigPage from './CustomWizardConfigPage';diff --git a/app/src/pages/onboarding/pages/CustomSearchPage.test.tsx b/app/src/pages/onboarding/pages/CustomSearchPage.test.tsxindex 0b786654b8..dfef03ec0f 100644--- a/app/src/pages/onboarding/pages/CustomSearchPage.test.tsx+++ b/app/src/pages/onboarding/pages/CustomSearchPage.test.tsx@@ -1,11 +1,12 @@import { configureStore } from '@reduxjs/toolkit';-import { render, screen } from '@testing-library/react';+import { fireEvent, render, screen } from '@testing-library/react';import { Provider } from 'react-redux';import { MemoryRouter } from 'react-router-dom';import { beforeEach, describe, expect, it, vi } from 'vitest';import { I18nProvider } from '../../../lib/i18n/I18nContext';import type { Locale } from '../../../lib/i18n/types';+import { CoreStateContext } from '../../../providers/coreStateContext';import localeReducer from '../../../store/localeSlice';import CustomSearchPage from './CustomSearchPage';@@ -42,9 +43,12 @@ function renderPage() {return render(<Provider store={store}><MemoryRouter>- <I18nProvider>- <CustomSearchPage />- </I18nProvider>+ <CoreStateContext.Provider+ value={{ snapshot: { sessionToken: 'header.payload.local' } } as never}>+ <I18nProvider>+ <CustomSearchPage />+ </I18nProvider>+ </CoreStateContext.Provider></MemoryRouter></Provider>);@@ -56,11 +60,19 @@ describe('CustomSearchPage', () => {setDraftMock.mockReset();});- it('forces configure mode and hides the default/configure chooser for local sessions', () => {+ it('renders the configuration panel directly with no default/configure chooser', () => {renderPage();expect(screen.getByTestId('search-panel')).toBeInTheDocument();expect(screen.queryByTestId('onboarding-custom-search-step-default')).not.toBeInTheDocument();expect(screen.queryByTestId('onboarding-custom-search-step-configure')).not.toBeInTheDocument();});++ it('skip navigates to the vault step without requiring a key', () => {+ renderPage();++ fireEvent.click(screen.getByTestId('onboarding-search-skip'));++ expect(navigateMock).toHaveBeenCalledWith('/onboarding/custom/vault');+ });});diff --git a/app/src/pages/onboarding/pages/CustomSearchPage.tsx b/app/src/pages/onboarding/pages/CustomSearchPage.tsxindex c27ef7c22d..8f99d0bc6d 100644--- a/app/src/pages/onboarding/pages/CustomSearchPage.tsx+++ b/app/src/pages/onboarding/pages/CustomSearchPage.tsx@@ -1,8 +1,47 @@+import { useNavigate } from 'react-router-dom';+import SearchPanel from '../../../components/settings/panels/SearchPanel';+import { Button } from '../../../components/ui';+import { useT } from '../../../lib/i18n/I18nContext';+import { trackEvent } from '../../../services/analytics';+import { CUSTOM_WIZARD_ROUTES, CUSTOM_WIZARD_STEPS } from '../customWizardSteps';import CustomWizardConfigPage from './CustomWizardConfigPage';-const CustomSearchPage = () => (- <CustomWizardConfigPage stepKey="search" configureContent={<SearchPanel embedded />} />-);+const STEP_KEY = 'search' as const;++/**+ * Step 2 — web search.+ *+ * The only genuinely optional step of the three: without a key the agent still+ * works, it just cannot read the web. Forcing a key here is how people abandon+ * setup, so the step offers an explicit skip rather than a dead Continue.+ */+const CustomSearchPage = () => {+ const { t } = useT();+ const navigate = useNavigate();+ const stepIndex = CUSTOM_WIZARD_STEPS.indexOf(STEP_KEY);++ const handleSkip = () => {+ trackEvent('onboarding_step_complete', { step_name: `custom_${STEP_KEY}`, choice: 'skipped' });+ navigate(CUSTOM_WIZARD_ROUTES[CUSTOM_WIZARD_STEPS[stepIndex + 1]]);+ };++ return (+ <CustomWizardConfigPage+ stepKey={STEP_KEY}+ configureContent={<SearchPanel embedded hideTabChrome />}+ secondaryAction={+ <Button+ variant="tertiary"+ size="sm"+ onClick={handleSkip}+ analyticsId="onboarding-search-skip"+ data-testid="onboarding-search-skip">+ {t('onboarding.custom.search.skipForNow')}+ </Button>+ }+ />+ );+};export default CustomSearchPage;diff --git a/app/src/pages/onboarding/pages/CustomVoicePage.tsx b/app/src/pages/onboarding/pages/CustomVoicePage.tsxindex 199fe7da17..90a0c16b61 100644--- a/app/src/pages/onboarding/pages/CustomVoicePage.tsx+++ b/app/src/pages/onboarding/pages/CustomVoicePage.tsx@@ -1,3 +1,12 @@+/**+ * Retired onboarding step — kept on disk, not routed.+ *+ * The custom wizard was cut to inference → search → vault; voice, OAuth and+ * embeddings are all still configurable from Settings, so the step was the+ * only thing removed. The file stays so reviving the step is a route entry+ * rather than a rewrite. Note `pnpm knip` lists this as an unused file;+ * knip is not a CI gate, and deleting it is a reviewer's call.+ */import VoicePanel from '../../../components/settings/panels/VoicePanel';import CustomWizardConfigPage from './CustomWizardConfigPage';diff --git a/app/src/pages/onboarding/pages/CustomWizardConfigPage.tsx b/app/src/pages/onboarding/pages/CustomWizardConfigPage.tsxindex fc704360cf..0872383e75 100644--- a/app/src/pages/onboarding/pages/CustomWizardConfigPage.tsx+++ b/app/src/pages/onboarding/pages/CustomWizardConfigPage.tsx@@ -1,60 +1,43 @@import createDebug from 'debug';-import { type ReactNode, useEffect, useState } from 'react';+import { type ReactNode } from 'react';import { useNavigate } from 'react-router-dom';import { useT } from '../../../lib/i18n/I18nContext';import { useCoreState } from '../../../providers/CoreStateProvider';import { trackEvent } from '../../../services/analytics';-import { isLocalSessionToken } from '../../../utils/localSession';import { CUSTOM_WIZARD_ROUTES, CUSTOM_WIZARD_STEPS } from '../customWizardSteps';-import {- type CustomStepChoice,- type CustomStepKey,- useOnboardingContext,-} from '../OnboardingContext';+import { type CustomStepKey, useOnboardingContext } from '../OnboardingContext';import CustomWizardStep from '../steps/CustomWizardStep';const log = createDebug('app:onboarding:custom');const describeError = (err: unknown): string => (err instanceof Error ? err.message : String(err));-const LOCAL_DEFAULT_DISABLED_REASON =- 'Managed setup requires OpenHuman sign-in and is unavailable in local mode.';-interface CustomWizardConfigPageProps {stepKey: CustomStepKey;configureContent: ReactNode;backRoute?: string;+ /** Block Continue while the embedded panel holds unsaved edits. */+ continueDisabled?: boolean;+ /** Shown under the footer to explain why Continue is blocked. */+ continueHint?: string;+ /** Rendered under the footer — the search step's "Skip for now". */+ secondaryAction?: ReactNode;}export default function CustomWizardConfigPage({stepKey,configureContent,backRoute,+ continueDisabled,+ continueHint,+ secondaryAction,}: CustomWizardConfigPageProps) {const { t } = useT();const navigate = useNavigate();- const { snapshot, clearSession } = useCoreState();- const { draft, setDraft, completeAndExit } = useOnboardingContext();- const isLocalSession = isLocalSessionToken(snapshot.sessionToken);+ const { clearSession } = useCoreState();+ const { completeAndExit } = useOnboardingContext();const stepIndex = CUSTOM_WIZARD_STEPS.indexOf(stepKey);- const [choice, setChoice] = useState<CustomStepChoice | null>(- draft.customChoices?.[stepKey] ?? (isLocalSession ? 'configure' : null)- );-- useEffect(() => {- if (!isLocalSession) return;- setChoice('configure');- setDraft(prev => ({- ...prev,- customChoices: { ...prev.customChoices, [stepKey]: 'configure' },- }));- }, [isLocalSession, setDraft, stepKey]);-- const persistChoice = (next: CustomStepChoice) => {- setChoice(next);- setDraft(prev => ({ ...prev, customChoices: { ...prev.customChoices, [stepKey]: next } }));- };const isLast = stepIndex === CUSTOM_WIZARD_STEPS.length - 1;const isFirst = stepIndex === 0;@@ -84,20 +67,13 @@ export default function CustomWizardConfigPage({stepCount={CUSTOM_WIZARD_STEPS.length}title={t(`${namespace}.title`)}subtitle={t(`${namespace}.subtitle`)}- defaultDescription={t(`${namespace}.defaultDesc`)}- configureDescription={t(`${namespace}.configureDesc`)}configureContent={configureContent}- defaultDisabled={isLocalSession}- defaultDisabledReason={isLocalSession ? LOCAL_DEFAULT_DISABLED_REASON : undefined}- hideChoiceCards={isLocalSession}- choice={choice}- onChoiceChange={persistChoice}+ continueDisabled={continueDisabled}+ continueHint={continueHint}+ secondaryAction={secondaryAction}onBack={() => void handleBack()}onContinue={async () => {- trackEvent('onboarding_step_complete', {- step_name: `custom_${stepKey}`,- choice: choice ?? 'default',- });+ trackEvent('onboarding_step_complete', { step_name: `custom_${stepKey}` });if (isLast) {try {await completeAndExit();diff --git a/app/src/pages/onboarding/pages/RuntimeChoicePage.tsx b/app/src/pages/onboarding/pages/RuntimeChoicePage.tsxindex be457e3381..21f9750ff3 100644--- a/app/src/pages/onboarding/pages/RuntimeChoicePage.tsx+++ b/app/src/pages/onboarding/pages/RuntimeChoicePage.tsx@@ -1,6 +1,7 @@import { useEffect, useState } from 'react';import { useNavigate } from 'react-router-dom';+import { Alert, AlertDescription } from '../../../components/ui';import { useT } from '../../../lib/i18n/I18nContext';import { useCoreState } from '../../../providers/CoreStateProvider';import { trackEvent } from '../../../services/analytics';@@ -49,11 +50,12 @@ const RuntimeChoicePage = () => {}}/>{exitError ? (- <div- className="mt-3 rounded-xl border border-coral-200 dark:border-coral-500/30 bg-coral-50 dark:bg-coral-500/10 px-4 py-3 text-sm text-coral-700 dark:text-coral-300"+ <Alert+ variant="destructive"+ className="mt-3"data-testid="onboarding-runtime-choice-exit-error">- {t('onboarding.runtimeChoice.exitError')}- </div>+ <AlertDescription>{t('onboarding.runtimeChoice.exitError')}</AlertDescription>+ </Alert>) : null}</>);diff --git a/app/src/pages/onboarding/pages/VaultSetupStep.test.tsx b/app/src/pages/onboarding/pages/VaultSetupStep.test.tsxindex d76f7ce050..bd996566fe 100644--- a/app/src/pages/onboarding/pages/VaultSetupStep.test.tsx+++ b/app/src/pages/onboarding/pages/VaultSetupStep.test.tsx@@ -1,11 +1,12 @@import { configureStore } from '@reduxjs/toolkit';-import { render, screen } from '@testing-library/react';+import { fireEvent, render, screen, waitFor } from '@testing-library/react';import { Provider } from 'react-redux';import { MemoryRouter } from 'react-router-dom';import { beforeEach, describe, expect, it, vi } from 'vitest';import { I18nProvider } from '../../../lib/i18n/I18nContext';import type { Locale } from '../../../lib/i18n/types';+import { CoreStateContext } from '../../../providers/coreStateContext';import localeReducer from '../../../store/localeSlice';import VaultSetupStep from './VaultSetupStep';@@ -45,9 +46,11 @@ function renderPage() {return render(<Provider store={store}><MemoryRouter>- <I18nProvider>- <VaultSetupStep />- </I18nProvider>+ <CoreStateContext.Provider value={{ snapshot: { sessionToken } } as never}>+ <I18nProvider>+ <VaultSetupStep />+ </I18nProvider>+ </CoreStateContext.Provider></MemoryRouter></Provider>);@@ -61,7 +64,7 @@ describe('VaultSetupStep', () => {sessionToken = 'header.payload.local';});- it('forces configure mode and hides chooser cards for local sessions', () => {+ it('renders the memory engine setup directly with no default/configure chooser', () => {renderPage();expect(screen.getByTestId('memory-engine-setup')).toBeInTheDocument();@@ -69,11 +72,20 @@ describe('VaultSetupStep', () => {expect(screen.queryByTestId('onboarding-custom-vault-step-configure')).not.toBeInTheDocument();});- it('shows default/configure chooser cards for managed sessions', () => {+ it('does the same for managed sessions (the choice fork no longer depends on session)', () => {sessionToken = 'header.payload.remote';renderPage();- expect(screen.getByTestId('onboarding-custom-vault-step-default')).toBeInTheDocument();- expect(screen.getByTestId('onboarding-custom-vault-step-configure')).toBeInTheDocument();+ expect(screen.getByTestId('memory-engine-setup')).toBeInTheDocument();+ expect(screen.queryByTestId('onboarding-custom-vault-step-default')).not.toBeInTheDocument();+ });++ it('finishes setup via completeAndExit on Continue', async () => {+ completeAndExitMock.mockResolvedValue(undefined);+ renderPage();++ fireEvent.click(screen.getByTestId('onboarding-next-button'));++ await waitFor(() => expect(completeAndExitMock).toHaveBeenCalledTimes(1));});});diff --git a/app/src/pages/onboarding/pages/VaultSetupStep.tsx b/app/src/pages/onboarding/pages/VaultSetupStep.tsxindex 7ae8b0eb0b..7589e2204e 100644--- a/app/src/pages/onboarding/pages/VaultSetupStep.tsx+++ b/app/src/pages/onboarding/pages/VaultSetupStep.tsx@@ -1,49 +1,30 @@-import { useCallback, useMemo, useRef, useState } from 'react';+import { useMemo, useState } from 'react';import { useNavigate } from 'react-router-dom';import MemoryEngineSetup from '../../../components/memory/MemoryEngineSetup';+import { Alert, AlertDescription } from '../../../components/ui';import { useT } from '../../../lib/i18n/I18nContext';-import { useCoreState } from '../../../providers/CoreStateProvider';import { trackEvent } from '../../../services/analytics';-import { isLocalSessionToken } from '../../../utils/localSession';import { CUSTOM_WIZARD_ROUTES, CUSTOM_WIZARD_STEPS } from '../customWizardSteps';-import { type CustomStepChoice, useOnboardingContext } from '../OnboardingContext';+import { useOnboardingContext } from '../OnboardingContext';import CustomWizardStep from '../steps/CustomWizardStep';const STEP_KEY = 'vault' as const;+/**+ * Step 3 — where OpenHuman keeps what it learns.+ *+ * The Default/Configure fork that used to sit above this is gone: it asked+ * again what the runtime choice already answered, and "Default" branched to+ * nothing. The engine picker is the step.+ */export default function VaultSetupStep() {const { t } = useT();const navigate = useNavigate();- const { snapshot } = useCoreState();- const { draft, setDraft, completeAndExit } = useOnboardingContext();+ const { completeAndExit } = useOnboardingContext();const stepIndex = CUSTOM_WIZARD_STEPS.indexOf(STEP_KEY);- const isLocalSession = isLocalSessionToken(snapshot.sessionToken);-- const appliedLocalRef = useRef(false);- const initialChoice = isLocalSession ? 'configure' : (draft.customChoices?.[STEP_KEY] ?? null);- const [choice, setChoice] = useState<CustomStepChoice | null>(initialChoice);const [exitError, setExitError] = useState<string | null>(null);- if (isLocalSession && !appliedLocalRef.current) {- appliedLocalRef.current = true;- if (choice !== 'configure') {- setChoice('configure');- }- setDraft(prev => ({- ...prev,- customChoices: { ...prev.customChoices, [STEP_KEY]: 'configure' },- }));- }-- const persistChoice = useCallback(- (next: CustomStepChoice) => {- setChoice(next);- setDraft(prev => ({ ...prev, customChoices: { ...prev.customChoices, [STEP_KEY]: next } }));- },- [setDraft]- );-const configureContent = useMemo(() => <MemoryEngineSetup />, []);return (@@ -54,23 +35,11 @@ export default function VaultSetupStep() {stepCount={CUSTOM_WIZARD_STEPS.length}title={t('onboarding.custom.vault.title')}subtitle={t('onboarding.custom.vault.subtitle')}- defaultDescription={t('onboarding.custom.vault.defaultDesc')}- configureDescription={t('onboarding.custom.vault.configureDesc')}configureContent={configureContent}- defaultDisabled={isLocalSession}- defaultDisabledReason={- isLocalSession ? t('onboarding.custom.vault.localDisabledReason') : undefined- }- hideChoiceCards={isLocalSession}- choice={choice}- onChoiceChange={persistChoice}onBack={() => navigate(CUSTOM_WIZARD_ROUTES[CUSTOM_WIZARD_STEPS[stepIndex - 1]])}onContinue={async () => {setExitError(null);- trackEvent('onboarding_step_complete', {- step_name: 'custom_vault',- choice: choice ?? 'default',- });+ trackEvent('onboarding_step_complete', { step_name: 'custom_vault' });try {await completeAndExit();} catch (err) {@@ -82,11 +51,9 @@ export default function VaultSetupStep() {continueLabel={t('onboarding.custom.finish')}/>{exitError ? (- <div- className="mt-3 rounded-xl border border-coral-200 dark:border-coral-500/30 bg-coral-50 dark:bg-coral-500/10 px-4 py-3 text-sm text-coral-700 dark:text-coral-300"- data-testid="onboarding-vault-exit-error">- {t('onboarding.custom.vault.exitError')}- </div>+ <Alert variant="destructive" className="mt-3" data-testid="onboarding-vault-exit-error">+ <AlertDescription>{t('onboarding.custom.vault.exitError')}</AlertDescription>+ </Alert>) : null}</>);diff --git a/app/src/pages/onboarding/pages/WelcomePage.tsx b/app/src/pages/onboarding/pages/WelcomePage.tsxindex b0ba5fe3e0..410bbe5e85 100644--- a/app/src/pages/onboarding/pages/WelcomePage.tsx+++ b/app/src/pages/onboarding/pages/WelcomePage.tsx@@ -1,34 +1,83 @@-import { useEffect } from 'react';+import { useCallback, useEffect, useRef, useState } from 'react';import { useNavigate } from 'react-router-dom';-import { useCoreState } from '../../../providers/CoreStateProvider';+import { Alert, AlertDescription, Button } from '../../../components/ui';+import { useIsLocalSession } from '../../../hooks/useLocalSession';+import { useT } from '../../../lib/i18n/I18nContext';import { trackEvent } from '../../../services/analytics';-import { isLocalSessionToken } from '../../../utils/localSession';-import WelcomeStep from '../steps/WelcomeStep';+import { useOnboardingContext } from '../OnboardingContext';+/**+ * The onboarding entry point, which now routes rather than asks.+ *+ * The identity question moved to the Welcome screen (`pages/Welcome.tsx`),+ * where it is asked once as two cards. By the time anyone reaches here it is+ * already answered, so this page only honours the answer:+ *+ * TinyHumans session -> nothing is left to configure. TinyHumans supplies+ * inference, voice, search, memory and embeddings, so onboarding is marked+ * complete and the user lands in chat.+ * local session -> the three self-hosted steps.+ *+ * The old welcome -> runtime-choice pair asked the same question a second+ * time, three screens after the first.+ */const WelcomePage = () => {+ const { t } = useT();const navigate = useNavigate();- const { snapshot } = useCoreState();- const isLocalSession = isLocalSessionToken(snapshot.sessionToken);+ const isLocalSession = useIsLocalSession();+ const { completeAndExit } = useOnboardingContext();+ const [exitError, setExitError] = useState<string | null>(null);+ const [retrying, setRetrying] = useState(false);+ const handled = useRef(false);++ const finishManaged = useCallback(async () => {+ setExitError(null);+ setRetrying(true);+ try {+ await completeAndExit();+ } catch (err) {+ console.error('[onboarding:welcome] completeAndExit failed', err);+ setExitError(err instanceof Error ? err.message : String(err));+ } finally {+ setRetrying(false);+ }+ }, [completeAndExit]);useEffect(() => {+ if (handled.current) return;+ handled.current = true;trackEvent('onboarding_start');+if (isLocalSession) {navigate('/onboarding/custom/inference', { replace: true });+ return;}- }, [isLocalSession, navigate]);- if (isLocalSession) {- return null;- }+ trackEvent('onboarding_step_complete', { step_name: 'managed' });+ void finishManaged();+ }, [isLocalSession, navigate, finishManaged]);++ if (!exitError) return null;+ // The flag write is the only thing between a managed user and chat, so a+ // failure needs a control. Resetting a ref does not re-render, so the effect+ // alone could never retry -- this page would have been a dead end.return (- <WelcomeStep- onNext={() => {- trackEvent('onboarding_step_complete', { step_name: 'welcome' });- navigate('/onboarding/runtime-choice');- }}- />+ <Alert variant="destructive" data-testid="onboarding-welcome-exit-error">+ <AlertDescription>+ <p>{t('onboarding.custom.vault.exitError')}</p>+ <Button+ variant="secondary"+ size="sm"+ className="mt-3"+ disabled={retrying}+ onClick={() => void finishManaged()}+ data-testid="onboarding-welcome-retry">+ {t('welcome.handoff.retry')}+ </Button>+ </AlertDescription>+ </Alert>);};diff --git a/app/src/pages/onboarding/steps/CustomWizardStep.tsx b/app/src/pages/onboarding/steps/CustomWizardStep.tsxindex 3903eb49c8..4b967e5dca 100644--- a/app/src/pages/onboarding/steps/CustomWizardStep.tsx+++ b/app/src/pages/onboarding/steps/CustomWizardStep.tsx@@ -1,63 +1,26 @@import { type ReactNode, useState } from 'react';-import Button from '../../../components/ui/Button';+import { Button, Card } from '../../../components/ui';import { useT } from '../../../lib/i18n/I18nContext';import OnboardingNextButton from '../components/OnboardingNextButton';import WizardStepper from '../components/WizardStepper';-import type { CustomStepChoice } from '../OnboardingContext';--interface ChoiceCardProps {- selected: boolean;- onClick: () => void;- accent: 'sage' | 'primary';- title: string;- description: string;- testId: string;- disabled?: boolean;-}--const ChoiceCard = ({- selected,- onClick,- accent,- title,- description,- testId,- disabled = false,-}: ChoiceCardProps) => {- const selectedClasses =- accent === 'sage'- ? 'border-sage-500! bg-sage-50 dark:bg-sage-500/10 shadow-xs'- : 'border-primary-500! bg-primary-50 dark:bg-primary-500/15 shadow-xs';- return (- <button- type="button"- onClick={onClick}- disabled={disabled}- aria-pressed={selected}- data-testid={testId}- className={`flex h-full w-full flex-col rounded-2xl border-2 p-5 text-left transition-colors focus:outline-hidden disabled:cursor-not-allowed disabled:opacity-60 ${- selected- ? selectedClasses- : 'border-line! bg-surface hover:border-line-strong! dark:hover:border-line-strong! hover:bg-surface-hover'- }`}>- <h3 className="text-base font-semibold text-content">{title}</h3>- <p className="mt-1 text-xs text-content-secondary leading-relaxed">{description}</p>- </button>- );-};+import { CUSTOM_WIZARD_STEPS, STEP_LABEL_KEYS } from '../customWizardSteps';interface CustomWizardStepProps {stepIndex: number;stepCount: number;title: string;subtitle: string;- defaultDescription: string;- configureDescription: string;- /** Inline content rendered below the choice cards when 'configure' is picked. */+ /**+ * The step's configuration surface, rendered directly.+ *+ * There used to be a Default/Configure fork above this. It asked the same+ * question the runtime choice already answered — a user reaches these steps+ * precisely by saying they want to configure things themselves — and+ * "Default" branched to nothing: no code ever read the recorded choice+ * except the analytics tag. The step is the configuration now.+ */configureContent?: ReactNode;- choice: CustomStepChoice | null;- onChoiceChange: (choice: CustomStepChoice) => void;onBack: () => void;onContinue: () => void | Promise<void>;/** Continue label override (used for the final "Finish setup" step). */@@ -68,9 +31,10 @@ interface CustomWizardStepProps {continueLoading?: boolean;continueLoadingLabel?: string;testId?: string;- defaultDisabled?: boolean;- defaultDisabledReason?: string;- hideChoiceCards?: boolean;+ /** Explains a blocked Continue (e.g. the panel has unsaved edits). */+ continueHint?: string;+ /** Rendered beneath the footer — the search step's "Skip for now". */+ secondaryAction?: ReactNode;}const CustomWizardStep = ({@@ -78,11 +42,7 @@ const CustomWizardStep = ({stepCount,title,subtitle,- defaultDescription,- configureDescription,configureContent,- choice,- onChoiceChange,onBack,onContinue,continueLabel,@@ -90,15 +50,14 @@ const CustomWizardStep = ({continueLoading,continueLoadingLabel,testId,- defaultDisabled = false,- defaultDisabledReason,- hideChoiceCards = false,+ continueHint,+ secondaryAction,}: CustomWizardStepProps) => {const { t } = useT();const [isContinuing, setIsContinuing] = useState(false);const handleContinue = async () => {- if (isContinuing || choice === null || continueDisabled) return;+ if (isContinuing || continueDisabled) return;try {setIsContinuing(true);await onContinue();@@ -107,76 +66,67 @@ const CustomWizardStep = ({}};- const stepperLabels = [- t('onboarding.custom.stepperInference'),- t('onboarding.custom.stepperVoice'),- t('onboarding.custom.stepperOAuth'),- t('onboarding.custom.stepperSearch'),- t('onboarding.custom.stepperEmbeddings'),- t('onboarding.custom.stepperVault'),- t('onboarding.custom.stepperMemory'),- ].slice(0, stepCount);+ // Derived from the step list itself rather than a parallel hand-ordered+ // array, which could be — and was — sliced into labels belonging to steps+ // that are no longer rendered. See STEP_LABEL_KEYS.+ const stepperLabels = CUSTOM_WIZARD_STEPS.map(key => t(STEP_LABEL_KEYS[key]));++ const rootTestId = testId ?? 'onboarding-custom-wizard-step';return (- <div- data-testid={testId ?? 'onboarding-custom-wizard-step'}- className="rounded-2xl bg-surface p-10 shadow-soft animate-fade-up">+ <Card+ padded+ divided={false}+ data-testid={rootTestId}+ className="animate-fade-up p-6 shadow-soft sm:p-8"><WizardStepper labels={stepperLabels} activeIndex={stepIndex} />- <h1 className="mt-8 text-2xl font-title text-content leading-tight">{title}</h1>+ <p+ className="mt-8 text-[11px] font-medium uppercase tracking-wide text-content-faint"+ data-testid="onboarding-step-counter">+ {t('onboarding.custom.stepCounter')+ .replace('{n}', String(stepIndex + 1))+ .replace('{total}', String(stepCount))}+ </p>+ <h1 className="mt-1 text-2xl font-title text-content leading-tight">{title}</h1><p className="mt-2 text-sm text-content-muted leading-relaxed">{subtitle}</p>- {!hideChoiceCards ? (- <>- <div className="mt-6 grid grid-cols-1 gap-3 sm:grid-cols-2 sm:items-stretch">- <ChoiceCard- testId={`${testId ?? 'onboarding-custom-wizard-step'}-default`}- accent="sage"- selected={choice === 'default'}- onClick={() => onChoiceChange('default')}- disabled={defaultDisabled}- title={t('onboarding.custom.defaultTitle')}- description={defaultDescription || t('onboarding.custom.defaultSubtitle')}- />- <ChoiceCard- testId={`${testId ?? 'onboarding-custom-wizard-step'}-configure`}- accent="primary"- selected={choice === 'configure'}- onClick={() => onChoiceChange('configure')}- title={t('onboarding.custom.configureTitle')}- description={configureDescription || t('onboarding.custom.configureSubtitle')}- />- </div>-- {defaultDisabled && defaultDisabledReason ? (- <p className="mt-3 text-xs text-content-muted leading-relaxed">- {defaultDisabledReason}- </p>- ) : null}- </>- ) : null}+ {/* No wrapper card here: the embedded panels are themselves `Card`s, and+ nesting one in another produced a card-in-a-card. */}+ {configureContent ? <div className="mt-6">{configureContent}</div> : null}- {(choice === 'configure' || hideChoiceCards) && configureContent ? (- <div className="mt-6 rounded-2xl border border-line bg-surface-muted p-5">- {configureContent}- </div>- ) : null}-- <div className="mt-8 flex items-center gap-3">- <Button variant="secondary" onClick={onBack}>+ {/* Back and Continue carry equal width. Continue used to sit in a+ `flex-1` wrapper beside an intrinsically-sized Back, so the primary+ action ran the width of the card while Back shrank to its label —+ a hierarchy nobody chose. */}+ <div className="mt-8 flex items-stretch gap-3">+ {/* `size="lg"` matches OnboardingNextButton, which is also lg. Left at+ the default md, Back rendered h-9 next to a h-11 Continue — equal+ width but visibly unequal height. */}+ <Button variant="secondary" size="lg" onClick={onBack} className="flex-1 basis-0">{t('onboarding.custom.back')}</Button>- <div className="flex-1">+ <div className="flex-1 basis-0"><OnboardingNextButtonlabel={continueLabel ?? t('onboarding.custom.continue')}onClick={() => void handleContinue()}- disabled={choice === null || continueDisabled || isContinuing}+ disabled={continueDisabled || isContinuing}loading={continueLoading || isContinuing}loadingLabel={continueLoadingLabel}/></div></div>- </div>++ {continueHint ? (+ <p+ className="mt-3 text-center text-xs text-amber-700 dark:text-amber-300"+ data-testid="onboarding-continue-hint">+ {continueHint}+ </p>+ ) : null}++ {secondaryAction ? <div className="mt-3 flex justify-center">{secondaryAction}</div> : null}+ </Card>);};diff --git a/app/src/pages/onboarding/steps/WelcomeStep.tsx b/app/src/pages/onboarding/steps/WelcomeStep.tsxindex 0d7bf7b0e0..73260de5f0 100644--- a/app/src/pages/onboarding/steps/WelcomeStep.tsx+++ b/app/src/pages/onboarding/steps/WelcomeStep.tsx@@ -1,3 +1,4 @@+import { Card } from '../../../components/ui';import WhatLeavesLink from '../../../features/privacy/WhatLeavesLink';import { useT } from '../../../lib/i18n/I18nContext';import OnboardingNextButton from '../components/OnboardingNextButton';@@ -9,9 +10,11 @@ interface WelcomeStepProps {const WelcomeStep = ({ onNext }: WelcomeStepProps) => {const { t } = useT();return (- <div+ <Card+ padded+ divided={false}data-testid="onboarding-welcome-step"- className="rounded-2xl bg-surface p-10 shadow-soft animate-fade-up">+ className="animate-fade-up p-6 shadow-soft sm:p-8"><div className="flex flex-col items-center text-center"><img src="/logo.png" alt="OpenHuman" className="w-20 h-20 rounded-2xl mb-5" /><h1 className="text-3xl font-title text-content mb-3 leading-tight">@@ -27,7 +30,7 @@ const WelcomeStep = ({ onNext }: WelcomeStepProps) => {<div className="mt-4 flex justify-center"><WhatLeavesLink /></div>- </div>+ </Card>);};diff --git a/app/src/pages/onboarding/steps/__tests__/CustomWizardStep.test.tsx b/app/src/pages/onboarding/steps/__tests__/CustomWizardStep.test.tsxnew file mode 100644index 0000000000..5e9af44d70--- /dev/null+++ b/app/src/pages/onboarding/steps/__tests__/CustomWizardStep.test.tsx@@ -0,0 +1,106 @@+import { configureStore } from '@reduxjs/toolkit';+import { fireEvent, render, screen, within } from '@testing-library/react';+import type { ComponentProps } from 'react';+import { Provider } from 'react-redux';+import { describe, expect, it, vi } from 'vitest';++import { I18nProvider } from '../../../../lib/i18n/I18nContext';+import type { Locale } from '../../../../lib/i18n/types';+import localeReducer from '../../../../store/localeSlice';+import { CUSTOM_WIZARD_STEPS } from '../../customWizardSteps';+import CustomWizardStep from '../CustomWizardStep';++function renderStep(+ stepIndex: number,+ extra: Partial<ComponentProps<typeof CustomWizardStep>> = {}+) {+ const store = configureStore({+ reducer: { locale: localeReducer },+ preloadedState: { locale: { current: 'en' as Locale } },+ });+ return render(+ <Provider store={store}>+ <I18nProvider>+ <CustomWizardStep+ stepIndex={stepIndex}+ stepCount={CUSTOM_WIZARD_STEPS.length}+ title="Title"+ subtitle="Subtitle"+ onBack={vi.fn()}+ onContinue={vi.fn()}+ {...extra}+ />+ </I18nProvider>+ </Provider>+ );+}++describe('CustomWizardStep stepper', () => {+ it('labels the three steps Inference, Search and Vault in order', () => {+ renderStep(0);++ const items = within(screen.getByTestId('onboarding-wizard-stepper')).getAllByRole('listitem');+ // Regression guard: a hand-ordered label array sliced to the step count+ // rendered "Inference / Voice / OAuth" here.+ expect(items.map(li => li.textContent?.replace(/^\d+/, '').trim())).toEqual([+ 'Inference',+ 'Search',+ 'Vault',+ ]);+ expect(screen.queryByText('Voice')).not.toBeInTheDocument();+ expect(screen.queryByText('OAuth')).not.toBeInTheDocument();+ });++ it('marks the active step and shows the n-of-total counter', () => {+ renderStep(1);++ const items = within(screen.getByTestId('onboarding-wizard-stepper')).getAllByRole('listitem');+ expect(items[1]).toHaveAttribute('aria-current', 'step');+ expect(items[0]).not.toHaveAttribute('aria-current');+ expect(screen.getByTestId('onboarding-step-counter')).toHaveTextContent('2');+ expect(screen.getByTestId('onboarding-step-counter')).toHaveTextContent('3');+ });+});++describe('CustomWizardStep content', () => {+ // The Default/Configure fork was removed: it re-asked what the runtime choice+ // already answered, and nothing ever read the recorded choice except an+ // analytics tag. The step now always renders its configuration surface.+ it('renders configureContent without any choice being made', () => {+ renderStep(0, { configureContent: <div data-testid="panel">Panel</div> });++ expect(screen.getByTestId('panel')).toBeInTheDocument();+ expect(screen.queryByTestId('onboarding-custom-wizard-step-default')).not.toBeInTheDocument();+ expect(screen.queryByTestId('onboarding-custom-wizard-step-configure')).not.toBeInTheDocument();+ });++ it('enables Continue without a choice and gates it only on continueDisabled', () => {+ const onContinue = vi.fn();+ const { rerender } = renderStep(0, { onContinue });+ const next = screen.getByTestId('onboarding-next-button');+ expect(next).toBeEnabled();+ fireEvent.click(next);+ expect(onContinue).toHaveBeenCalledTimes(1);++ rerender(+ <Provider+ store={configureStore({+ reducer: { locale: localeReducer },+ preloadedState: { locale: { current: 'en' as Locale } },+ })}>+ <I18nProvider>+ <CustomWizardStep+ stepIndex={0}+ stepCount={CUSTOM_WIZARD_STEPS.length}+ title="Title"+ subtitle="Subtitle"+ onBack={vi.fn()}+ onContinue={onContinue}+ continueDisabled+ />+ </I18nProvider>+ </Provider>+ );+ expect(screen.getByTestId('onboarding-next-button')).toBeDisabled();+ });+});diff --git a/app/src/providers/CoreStateProvider.tsx b/app/src/providers/CoreStateProvider.tsxindex 845ebad2fe..4870616095 100644--- a/app/src/providers/CoreStateProvider.tsx+++ b/app/src/providers/CoreStateProvider.tsx@@ -33,6 +33,7 @@ import { store } from '../store';import { resetUserScopedState } from '../store/resetActions';import { loadThreads, resetThreadCachesPreservingSelection } from '../store/threadSlice';import { getActiveUserId, setActiveUserId } from '../store/userScopedStorage';+import { markIdentityFlipSeed } from '../utils/bootstrapActiveUser';import { isLocalSessionToken } from '../utils/localSession';import {getSessionToken,@@ -210,6 +211,10 @@ async function handleIdentityFlip(opts: { reason: string; nextUserId: string }):const { reason, nextUserId } = opts;log('identity flip restart reason=%s nextUserId=%s', reason, `****${nextUserId.slice(-4)}`);setActiveUserId(nextUserId);+ // Survive the relaunch. In local core mode the next boot primes from the+ // core's `active_user.toml`, which still names the previous user and would+ // undo the line above -- restarting again, forever (#4545).+ markIdentityFlipSeed(nextUserId);store.dispatch(resetUserScopedState());socketService.disconnect();await restartApp();diff --git a/app/src/providers/__tests__/CoreStateProvider.identityFlip.test.tsx b/app/src/providers/__tests__/CoreStateProvider.identityFlip.test.tsxindex 50cae67d34..0dca980ca2 100644--- a/app/src/providers/__tests__/CoreStateProvider.identityFlip.test.tsx+++ b/app/src/providers/__tests__/CoreStateProvider.identityFlip.test.tsx@@ -11,6 +11,7 @@ import { socketService } from '../../services/socketService';import { store } from '../../store';import { addAccount } from '../../store/accountsSlice';import { resetUserScopedState } from '../../store/resetActions';+import { consumeIdentityFlipSeed } from '../../utils/bootstrapActiveUser';import CoreStateProvider, { useCoreState } from '../CoreStateProvider';vi.mock('../../services/coreStateApi');@@ -108,6 +109,8 @@ describe('CoreStateProvider — identity flip cleanup (#900)', () => {resetCoreStateStore();store.dispatch(resetUserScopedState());userScopedStorage.setActiveUserId(null);+ // Drop any flip marker a previous case left in localStorage.+ consumeIdentityFlipSeed();});it('cold bootstrap on a fresh device (seed=null, nextId=A): sets activeUserId without restart (#3107)', async () => {@@ -343,4 +346,40 @@ describe('CoreStateProvider — identity flip cleanup (#900)', () => {setActiveSpy.mockRestore();disconnectSpy.mockRestore();});++ it('records the identity-flip seed for the NEXT user before restartApp runs (#4545 loop guard)', async () => {+ userScopedStorage.setActiveUserId('A');+ fetchSnapshot.mockResolvedValue(makeSnapshot({ userId: 'A', sessionToken: 'tokA' }));+ const disconnectSpy = vi.spyOn(socketService, 'disconnect').mockImplementation(() => {});++ let ctx: CoreStateContextValue | undefined;+ render(+ <CoreStateProvider>+ <Consumer captureCtx={c => (ctx = c)} />+ </CoreStateProvider>+ );+ await act(async () => {+ await ctx!.refresh();+ });+ // Warm launch on A writes no marker.+ expect(consumeIdentityFlipSeed()).toBeNull();++ // The relaunched process reads the marker on boot, so what matters is+ // what is in storage at the moment the restart is requested.+ let seedAtRestart: string | null = null;+ restartApp.mockImplementation(async () => {+ seedAtRestart = consumeIdentityFlipSeed();+ });++ fetchSnapshot.mockResolvedValue(makeSnapshot({ userId: 'B', sessionToken: 'tokB' }));+ await act(async () => {+ await ctx!.refresh();+ await Promise.resolve();+ });++ expect(restartApp).toHaveBeenCalledTimes(1);+ expect(seedAtRestart).toBe('B');++ disconnectSpy.mockRestore();+ });});diff --git a/app/src/services/__tests__/chatService.test.ts b/app/src/services/__tests__/chatService.test.tsindex 729b9ee1a7..7c8b574520 100644--- a/app/src/services/__tests__/chatService.test.ts+++ b/app/src/services/__tests__/chatService.test.ts@@ -1,6 +1,12 @@import { beforeEach, describe, expect, it, vi } from 'vitest';-import { chatCancel, chatClearQueue, chatSend, subscribeChatEvents } from '../chatService';+import {+ chatCancel,+ chatClearQueue,+ chatSend,+ NO_SOCKET_CANCEL_CLIENT_ID,+ subscribeChatEvents,+} from '../chatService';import { socketService } from '../socketService';const mockCallCoreRpc = vi.fn();@@ -487,9 +493,16 @@ describe('chatService.chatCancel', () => {expect(await chatCancel('thread-9')).toEqual({ accepted: false, turnCancelled: false });});- it('is not accepted without a socket id', async () => {+ it('still sends the cancel when the socket has no id', async () => {+ // A dropped or reconnecting socket is when a turn most often looks stuck;+ // the Stop must still reach the core over RPC.vi.mocked(socketService.getSocket).mockReturnValue(null as never);- expect(await chatCancel('thread-9')).toEqual({ accepted: false, turnCancelled: false });- expect(mockCallCoreRpc).not.toHaveBeenCalled();+ mockCallCoreRpc.mockResolvedValue({ result: { cancelled: true, request_id: 'req-2' } });++ expect(await chatCancel('thread-9')).toEqual({ accepted: true, turnCancelled: true });+ expect(mockCallCoreRpc).toHaveBeenCalledWith({+ method: 'openhuman.channel_web_cancel',+ params: { client_id: NO_SOCKET_CANCEL_CLIENT_ID, thread_id: 'thread-9' },+ });});});diff --git a/app/src/services/__tests__/rpcMethods.test.ts b/app/src/services/__tests__/rpcMethods.test.tsindex 939ff8233b..70701baf7c 100644--- a/app/src/services/__tests__/rpcMethods.test.ts+++ b/app/src/services/__tests__/rpcMethods.test.ts@@ -4,6 +4,53 @@ import { describe, expect, test } from 'vitest';import { CORE_RPC_METHODS, LEGACY_METHOD_ALIASES, normalizeRpcMethod } from '../rpcMethods';+// Controller identity comes from the namespace/function fields on one literal.+// Matching adjacent fields also keeps declarations in separate blocks apart.+function schemaMethodPairs(source: string): Set<string> {+ const pairs = source.matchAll(+ /\b(?:Channel)?ControllerSchema\s*\{\s*namespace:\s*"([a-z0-9_]+)"\s*,\s*function:\s*"([a-z0-9_]+)"/g+ );+ return new Set(Array.from(pairs, ([, namespace, fn]) => `openhuman.${namespace}_${fn}`));+}++describe('schema method pairing', () => {+ test('keeps shared function names scoped to their controller namespace', () => {+ const methods = schemaMethodPairs(`+ ControllerSchema { namespace: "config", function: "update", description: "config" }+ ControllerSchema { namespace: "health", function: "get", description: "health" }+ `);+ expect(methods.has('openhuman.config_update')).toBe(true);+ expect(methods.has('openhuman.health_get')).toBe(true);+ expect(methods.has('openhuman.config_get')).toBe(false);+ });++ test('detects a removed controller while the namespace and function still exist', () => {+ const declaration =+ 'ControllerSchema { namespace: "config", function: "get", description: "read" }';+ const source = `${declaration}+ ControllerSchema { namespace: "config", function: "update", description: "write" }+ ChannelControllerSchema { namespace: "channels", function: "get", description: "channel" }+ `;+ expect(schemaMethodPairs(source).has(CORE_RPC_METHODS.configGet)).toBe(true);+ const removed = source.replace(declaration, '');+ expect(removed).toContain('namespace: "config"');+ expect(removed).toContain('function: "get"');+ expect(schemaMethodPairs(removed).has(CORE_RPC_METHODS.configGet)).toBe(false);+ });++ test('reads multiline and channel schema literals and ignores unrelated fields', () => {+ const methods = schemaMethodPairs(`+ ChannelControllerSchema {+ namespace: "channels",+ function: "list",+ description: "List channels",+ }+ FieldSchema { namespace: "config", function: "get" }+ `);+ expect([...methods]).toEqual(['openhuman.channels_list']);+ });+});+describe('rpcMethods catalog', () => {describe('normalizeRpcMethod', () => {test('resolves all legacy aliases to their canonical core method', () => {@@ -130,9 +177,8 @@ describe('rpcMethods catalog', () => {// inference/schemas.rs → schemas_part_01.rs, …), and each split silently// moved the `function: "…"` literals this guard greps out of the file it// was reading. Sweeping the siblings makes the corpus follow the splits.- // Over-inclusion is harmless — the guard only searches for substrings —- // and `readFileSync` still throws if a listed base file moves entirely,- // which is the loud failure we want.+ // Each namespace/function pair is read from a single controller literal.+ // `readFileSync` throws if a listed base file moves entirely.const readRustTree = (dir: string): string[] =>fs.readdirSync(dir, { withFileTypes: true }).flatMap(entry => {const entryPath = path.join(dir, entry.name);@@ -192,32 +238,16 @@ describe('rpcMethods catalog', () => {),].join('\n');+ const registeredMethods = schemaMethodPairs(schemaSources);for (const method of Object.values(CORE_RPC_METHODS)) {// core.* methods (e.g. core.ping) are special dispatch methods, not in the schema catalog.if (!method.startsWith('openhuman.')) continue;const methodRoot = method.slice('openhuman.'.length);// Memory v2 methods have their own guard below.if (methodRoot.startsWith('memory_')) continue;- const namespace = methodRoot.startsWith('auth_')- ? 'auth'- : methodRoot.startsWith('inference_')- ? 'inference'- : methodRoot.startsWith('embeddings_')- ? 'embeddings'- : methodRoot.startsWith('providers_')- ? 'providers'- : methodRoot.startsWith('mcp_clients_')- ? 'mcp_clients'- : methodRoot.startsWith('health_')- ? 'health'- : methodRoot.startsWith('channels_')- ? 'channels'- : methodRoot.startsWith('tool_registry_')- ? 'tool_registry'- : 'config';- const fnName = methodRoot.slice(`${namespace}_`.length);- expect(schemaSources).toContain(`namespace: "${namespace}"`);- expect(schemaSources).toContain(`function: "${fnName}"`);+ expect(registeredMethods, `${method} must have a complete controller declaration`).toContain(+ method+ );}});// Memory v2 (docs/specs/memory-v2.md): every `openhuman.memory_*` method thediff --git a/app/src/services/api/memoryApi.test.ts b/app/src/services/api/memoryApi.test.tsindex 6cecbd4c5d..c0f8a8b42d 100644--- a/app/src/services/api/memoryApi.test.ts+++ b/app/src/services/api/memoryApi.test.ts@@ -179,6 +179,10 @@ describe('memoryErrorCode', () => {it('falls back to a code prefix on the message', () => {expect(memoryErrorCode(new Error('UNAUTHORIZED: bad key'))).toBe('UNAUTHORIZED');+ expect(memoryErrorCode({ message: 'x', data: { code: 'INSUFFICIENT_CREDITS' } })).toBe(+ 'INSUFFICIENT_CREDITS'+ );+ expect(memoryErrorCode(new Error('UNAVAILABLE: timed out'))).toBe('UNAVAILABLE');});it('returns null for an unrelated error', () => {@@ -195,6 +199,23 @@ describe('helpers', () => {expect(memoryErrorMessage('c')).toBe('c');});+ it('memoryErrorMessage explains an account-wide refusal when given a translator', () => {+ const t = (key: string) => `t:${key}`;+ const credits = {+ message: 'insufficient credits: [USER_INSUFFICIENT_CREDITS] memory API recall (HTTP 402)',+ data: { code: 'INSUFFICIENT_CREDITS' },+ };+ expect(memoryErrorMessage(credits, t)).toBe('t:memory.error.insufficientCredits');+ expect(memoryErrorMessage({ message: 'x', data: { code: 'UNAVAILABLE' } }, t)).toBe(+ 't:memory.error.unavailable'+ );+ // A rejected key and an engine fault keep their own message, and without+ // `t` nothing changes.+ expect(memoryErrorMessage(new Error('UNAUTHORIZED: bad key'), t)).toBe('UNAUTHORIZED: bad key');+ expect(memoryErrorMessage({ message: 'boom', data: { code: 'ENGINE' } }, t)).toBe('boom');+ expect(memoryErrorMessage(credits)).toBe(credits.message);+ });+it('isMemoryOn needs an engine that is not off', () => {expect(isMemoryOn(null)).toBe(false);expect(isMemoryOn({ engine: null, has_key: false, status: 'off', fetch_modes: [] })).toBe(diff --git a/app/src/services/api/memoryApi.ts b/app/src/services/api/memoryApi.tsindex dedc59e522..12cf9895ac 100644--- a/app/src/services/api/memoryApi.ts+++ b/app/src/services/api/memoryApi.ts@@ -522,6 +522,8 @@ export type MemoryErrorCode =| 'UNSUPPORTED'| 'INVALID_REQUEST'| 'UNAUTHORIZED'+ | 'INSUFFICIENT_CREDITS'+ | 'UNAVAILABLE'| 'ENGINE';const MEMORY_ERROR_CODES: readonly MemoryErrorCode[] = [@@ -529,6 +531,8 @@ const MEMORY_ERROR_CODES: readonly MemoryErrorCode[] = ['UNSUPPORTED','INVALID_REQUEST','UNAUTHORIZED',+ 'INSUFFICIENT_CREDITS',+ 'UNAVAILABLE','ENGINE',];@@ -587,21 +591,60 @@ export function memoryErrorCode(err: unknown): MemoryErrorCode | null {}const message = (err as { message?: unknown }).message;if (typeof message === 'string') {- const match = /^\s*(MEMORY_OFF|UNSUPPORTED|INVALID_REQUEST|UNAUTHORIZED|ENGINE)\b/.exec(- message- );+ const match =+ /^\s*(MEMORY_OFF|UNSUPPORTED|INVALID_REQUEST|UNAUTHORIZED|INSUFFICIENT_CREDITS|UNAVAILABLE|ENGINE)\b/.exec(+ message+ );if (match) return match[1] as MemoryErrorCode;}return null;}-/** Human-readable text of any thrown value. */-export function memoryErrorMessage(err: unknown): string {+/**+ * The account-wide refusals whose raw message is engine detail, each told+ * apart from an engine fault and from an empty memory: out of credits means+ * "top up", unreachable means "try again". `UNAUTHORIZED` keeps its own+ * message, which names the rejected key or session.+ */+const REFUSAL_KEYS: Partial<Record<MemoryErrorCode, string>> = {+ INSUFFICIENT_CREDITS: 'memory.error.insufficientCredits',+ UNAVAILABLE: 'memory.error.unavailable',+};++/**+ * Human-readable text of any thrown value. Given `t`, an account-wide refusal+ * reads as its translated explanation instead of the engine's raw message.+ */+export function memoryErrorMessage(+ err: unknown,+ t?: (key: string, fallback?: string) => string+): string {+ const code = memoryErrorCode(err);+ const key = code ? REFUSAL_KEYS[code] : undefined;+ if (t && key) return t(key);if (err instanceof Error) return err.message;if (err && typeof err === 'object' && 'message' in err) return String(err.message);return String(err);}+/**+ * True when `message` is the out-of-credits explanation `memoryErrorMessage`+ * produced (with `t`). That translated text is returned for+ * `INSUFFICIENT_CREDITS` and for nothing else, so the views that keep only the+ * message can still offer a top-up instead of an error.+ *+ * Known edge: a message produced in one language no longer matches after the+ * user switches language, so that stale message falls back to the error alert+ * (it still explains the top-up). The next failed action re-derives it.+ */+export function isOutOfCreditsMessage(+ message: string | null,+ t: (key: string, fallback?: string) => string+): boolean {+ const key = REFUSAL_KEYS.INSUFFICIENT_CREDITS;+ return message !== null && key !== undefined && message === t(key);+}+/** True when the engine state means memory is usable (an engine is set and not off). */export function isMemoryOn(state: EngineState | null | undefined): boolean {return Boolean(state && state.engine && state.status !== 'off');diff --git a/app/src/services/chatService.ts b/app/src/services/chatService.tsindex 93016eb1e0..2f6f2f2139 100644--- a/app/src/services/chatService.ts+++ b/app/src/services/chatService.ts@@ -1659,6 +1659,9 @@ export async function chatSend(params: ChatSendParams): Promise<string | undefinreturn typeof requestId === 'string' ? requestId : undefined;}+/** `client_id` sent with a Stop issued while the socket has no id. */+export const NO_SOCKET_CANCEL_CLIENT_ID = 'web-cancel-no-socket';+/** Result of a Stop request. */export interface ChatCancelOutcome {/** The core received and processed the cancel. */@@ -1683,11 +1686,14 @@ export interface ChatCancelOutcome {* callers.*/export async function chatCancel(threadId: string, requestId?: string): Promise<ChatCancelOutcome> {- const socket = socketService.getSocket();- const clientId = socket?.id;- if (!clientId) {- chatLog('chat_cancel: no socket id thread=%s — cancel not sent', threadId);- return { accepted: false, turnCancelled: false };+ // The cancel itself is an HTTP RPC; the client id only routes the+ // `chat_cancelled` event that follows (which also goes to the thread room).+ // A socket that is down or mid-reconnect — exactly when a turn is most+ // likely to look stuck — must not swallow the Stop, so fall back to a+ // placeholder id rather than refusing to send.+ const clientId = socketService.getSocket()?.id || NO_SOCKET_CANCEL_CLIENT_ID;+ if (clientId === NO_SOCKET_CANCEL_CLIENT_ID) {+ chatLog('chat_cancel: no socket id thread=%s — sending cancel without one', threadId);}try {diff --git a/app/src/store/__tests__/deepLinkAuthState.test.ts b/app/src/store/__tests__/deepLinkAuthState.test.tsindex 3a639b0302..d9e5b4aeff 100644--- a/app/src/store/__tests__/deepLinkAuthState.test.ts+++ b/app/src/store/__tests__/deepLinkAuthState.test.ts@@ -2,8 +2,10 @@ import { act, renderHook } from '@testing-library/react';import { afterEach, describe, expect, it, vi } from 'vitest';import {+ beginAwaitingAuthCallback,beginDeepLinkAuthProcessing,completeDeepLinkAuthProcessing,+ endAwaitingAuthCallback,failDeepLinkAuthProcessing,getDeepLinkAuthState,subscribeDeepLinkAuthState,@@ -15,6 +17,11 @@ import {* before each test's assertions. The ad-hoc store persists across tests.*/afterEach(() => {+ // `beginAwaitingAuthCallback` arms a module-level 300s timer and+ // `completeDeepLinkAuthProcessing` deliberately leaves it (and the flag)+ // alone, so drop both here or they leak into the next test.+ endAwaitingAuthCallback();+ vi.useRealTimers();completeDeepLinkAuthProcessing();});@@ -23,6 +30,7 @@ describe('deepLinkAuthState transitions', () => {completeDeepLinkAuthProcessing();expect(getDeepLinkAuthState()).toEqual({isProcessing: false,+ awaitingCallback: false,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,@@ -36,6 +44,7 @@ describe('deepLinkAuthState transitions', () => {beginDeepLinkAuthProcessing();expect(getDeepLinkAuthState()).toEqual({isProcessing: true,+ awaitingCallback: false,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,@@ -47,6 +56,7 @@ describe('deepLinkAuthState transitions', () => {completeDeepLinkAuthProcessing();expect(getDeepLinkAuthState()).toEqual({isProcessing: false,+ awaitingCallback: false,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,@@ -58,6 +68,7 @@ describe('deepLinkAuthState transitions', () => {failDeepLinkAuthProcessing('token expired');expect(getDeepLinkAuthState()).toEqual({isProcessing: false,+ awaitingCallback: false,errorMessage: 'token expired',errorMessageKey: null,requiresAppDataReset: false,@@ -68,6 +79,7 @@ describe('deepLinkAuthState transitions', () => {failDeepLinkAuthProcessing('cannot decrypt', { requiresAppDataReset: true });expect(getDeepLinkAuthState()).toEqual({isProcessing: false,+ awaitingCallback: false,errorMessage: 'cannot decrypt',errorMessageKey: null,requiresAppDataReset: true,@@ -81,6 +93,7 @@ describe('deepLinkAuthState transitions', () => {failDeepLinkAuthProcessing('', { messageKey: 'welcome.coreConfigUnreadable' });expect(getDeepLinkAuthState()).toEqual({isProcessing: false,+ awaitingCallback: false,errorMessage: '',errorMessageKey: 'welcome.coreConfigUnreadable',requiresAppDataReset: false,@@ -152,6 +165,7 @@ describe('useDeepLinkAuthState hook', () => {const { result } = renderHook(() => useDeepLinkAuthState());expect(result.current).toEqual({isProcessing: false,+ awaitingCallback: false,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,@@ -162,6 +176,7 @@ describe('useDeepLinkAuthState hook', () => {});expect(result.current).toEqual({isProcessing: true,+ awaitingCallback: false,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,@@ -172,9 +187,62 @@ describe('useDeepLinkAuthState hook', () => {});expect(result.current).toEqual({isProcessing: false,+ awaitingCallback: false,errorMessage: 'denied',errorMessageKey: null,requiresAppDataReset: false,});});});++describe('awaitingCallback', () => {+ // This flag exists because `isProcessing` ends the moment the browser opens,+ // which made the hand-off screen vanish while the user was still in it.+ it('spans the browser round-trip and is cleared by the arriving callback', () => {+ beginAwaitingAuthCallback();+ expect(getDeepLinkAuthState().awaitingCallback).toBe(true);++ // The launch step finishing must NOT end the wait.+ completeDeepLinkAuthProcessing();+ expect(getDeepLinkAuthState().awaitingCallback).toBe(true);++ // Redeeming an arriving deep link does.+ beginDeepLinkAuthProcessing();+ expect(getDeepLinkAuthState().awaitingCallback).toBe(false);+ });++ it('is cleared by a failure and by an explicit end', () => {+ beginAwaitingAuthCallback();+ failDeepLinkAuthProcessing('nope');+ expect(getDeepLinkAuthState().awaitingCallback).toBe(false);++ beginAwaitingAuthCallback();+ endAwaitingAuthCallback();+ expect(getDeepLinkAuthState().awaitingCallback).toBe(false);+ });++ it('ending when not waiting is a no-op', () => {+ completeDeepLinkAuthProcessing();+ expect(getDeepLinkAuthState().awaitingCallback).toBe(false);+ endAwaitingAuthCallback();+ expect(getDeepLinkAuthState().awaitingCallback).toBe(false);+ });++ it('gives up by itself after 300s, with no component mounted to do it', () => {+ vi.useFakeTimers();+ beginAwaitingAuthCallback();++ vi.advanceTimersByTime(299_999);+ expect(getDeepLinkAuthState().awaitingCallback).toBe(true);++ vi.advanceTimersByTime(1);+ expect(getDeepLinkAuthState().awaitingCallback).toBe(false);+ });++ it('a callback arriving cancels the pending timeout', () => {+ vi.useFakeTimers();+ beginAwaitingAuthCallback();+ beginDeepLinkAuthProcessing();+ expect(vi.getTimerCount()).toBe(0);+ });+});diff --git a/app/src/store/deepLinkAuthState.ts b/app/src/store/deepLinkAuthState.tsindex 77d5551377..7133b839d8 100644--- a/app/src/store/deepLinkAuthState.ts+++ b/app/src/store/deepLinkAuthState.ts@@ -1,7 +1,19 @@import { useSyncExternalStore } from 'react';interface DeepLinkAuthState {+ /**+ * An auth STEP is executing. True twice per sign-in and briefly each time:+ * once while the login URL is being prepared and the browser opened, and+ * again while an arriving deep link is redeemed. It is NOT "waiting for the+ * user to finish in the browser" — `awaitingCallback` is.+ */isProcessing: boolean;+ /**+ * The user has been handed to the system browser and the callback has not+ * come back yet. Spans the whole time the app is idle waiting on another+ * window, which is exactly the window a hand-off screen must cover.+ */+ awaitingCallback: boolean;errorMessage: string | null;// i18n key to render INSTEAD of `errorMessage`, for failures whose copy is// translated. This module is reached from non-React code (the deep-link@@ -19,6 +31,7 @@ interface DeepLinkAuthState {const initialState: DeepLinkAuthState = {isProcessing: false,+ awaitingCallback: false,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,@@ -48,8 +61,11 @@ export const subscribeDeepLinkAuthState = (listener: () => void): (() => void) =};export const beginDeepLinkAuthProcessing = (): void => {+ clearAwaitTimer();setDeepLinkAuthState({isProcessing: true,+ // A callback that has arrived is no longer awaited.+ awaitingCallback: false,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,@@ -59,6 +75,7 @@ export const beginDeepLinkAuthProcessing = (): void => {export const completeDeepLinkAuthProcessing = (): void => {setDeepLinkAuthState({isProcessing: false,+ awaitingCallback: deepLinkAuthState.awaitingCallback,errorMessage: null,errorMessageKey: null,requiresAppDataReset: false,@@ -69,13 +86,56 @@ export const failDeepLinkAuthProcessing = (message: string,options: { requiresAppDataReset?: boolean; messageKey?: string } = {}): void => {+ clearAwaitTimer();setDeepLinkAuthState({isProcessing: false,+ awaitingCallback: false,errorMessage: message,errorMessageKey: options.messageKey ?? null,requiresAppDataReset: Boolean(options.requiresAppDataReset),});};+/**+ * How long to hold the hand-off before giving up on the browser.+ *+ * Matches the loopback listener's own lifetime: past this point no callback+ * can arrive, so continuing to show a spinner is a lie.+ */+const AWAIT_CALLBACK_TIMEOUT_MS = 300_000;+let awaitTimer: ReturnType<typeof setTimeout> | null = null;++const clearAwaitTimer = (): void => {+ if (awaitTimer === null) return;+ clearTimeout(awaitTimer);+ awaitTimer = null;+};++/**+ * The browser is open and we are waiting on it. Called right after `openUrl`+ * succeeds, because `completeDeepLinkAuthProcessing()` fires immediately after+ * that and would otherwise drop the UI back to the sign-in screen while the+ * user is still in the browser.+ */+export const beginAwaitingAuthCallback = (): void => {+ clearAwaitTimer();+ // The timer lives here, not in the component that started the sign-in: the+ // hand-off screen unmounts that component, which would take the only way of+ // ever clearing this flag with it and strand the user on a spinner with no+ // control. Module scope outlives any mount.+ awaitTimer = setTimeout(() => {+ awaitTimer = null;+ endAwaitingAuthCallback();+ }, AWAIT_CALLBACK_TIMEOUT_MS);+ setDeepLinkAuthState({ ...deepLinkAuthState, awaitingCallback: true });+};++/** Stop waiting — the callback arrived, failed, or the user gave up. */+export const endAwaitingAuthCallback = (): void => {+ clearAwaitTimer();+ if (!deepLinkAuthState.awaitingCallback) return;+ setDeepLinkAuthState({ ...deepLinkAuthState, awaitingCallback: false });+};+export const useDeepLinkAuthState = (): DeepLinkAuthState =>useSyncExternalStore(subscribeDeepLinkAuthState, getDeepLinkAuthState, getDeepLinkAuthState);diff --git a/app/src/store/localeSlice.test.ts b/app/src/store/localeSlice.test.tsindex fcf85e9517..a65b0821cf 100644--- a/app/src/store/localeSlice.test.ts+++ b/app/src/store/localeSlice.test.ts@@ -39,3 +39,30 @@ describe('localeSlice', () => {expect(reducer(undefined, { type: '@@INIT' }).current).toBe('tr');});});++describe('Japanese locale detection', () => {+ afterEach(() => {+ vi.unstubAllGlobals();+ });++ it.each(['ja', 'ja-JP', 'JA-jp'])('detects browser language %s', async language => {+ vi.stubGlobal('navigator', { language });+ const reducer = await loadReducer();++ expect(reducer(undefined, { type: '@@INIT' }).current).toBe('ja');+ });++ it.each(['', 'unsupported'])('keeps the English fallback for %s', async language => {+ vi.stubGlobal('navigator', { language });+ const reducer = await loadReducer();++ expect(reducer(undefined, { type: '@@INIT' }).current).toBe('en');+ });++ it('keeps the English fallback without the browser API', async () => {+ vi.stubGlobal('navigator', undefined);+ const reducer = await loadReducer();++ expect(reducer(undefined, { type: '@@INIT' }).current).toBe('en');+ });+});diff --git a/app/src/store/localeSlice.ts b/app/src/store/localeSlice.tsindex e7e8905bc0..e95e7ed1c3 100644--- a/app/src/store/localeSlice.ts+++ b/app/src/store/localeSlice.ts@@ -9,6 +9,7 @@ const PREFIX_TO_LOCALE: Array<[string, Locale]> = [['zh', 'zh-CN'],['hi', 'hi'],['es', 'es'],+ ['ja', 'ja'],['ko', 'ko'],['ar', 'ar'],['fr', 'fr'],diff --git a/app/src/store/userScopedStorage.ts b/app/src/store/userScopedStorage.tsindex 15d0ab7160..b4368e5a93 100644--- a/app/src/store/userScopedStorage.ts+++ b/app/src/store/userScopedStorage.ts@@ -135,6 +135,39 @@ export function setActiveUserId(id: string | null): void {}}+/**+ * The id an identity flip is restarting *into*.+ *+ * This is a sibling of `ACTIVE_USER_KEY` and lives here for the same reason:+ * it is read during bootstrap to *decide* the active user, so it cannot be+ * namespaced by one. A scoped marker would be written under the outgoing+ * user's namespace and looked for under the incoming one, which is the #4545+ * restart loop it exists to break. It lives in this module rather than at the+ * call site so every unscoped identity key stays in the module that owns the+ * scope.+ */+const IDENTITY_FLIP_SEED_KEY = 'OPENHUMAN_IDENTITY_FLIP_SEED';++/** Record the id the flip is restarting into. */+export function markIdentityFlipSeed(userId: string): void {+ try {+ localStorage.setItem(IDENTITY_FLIP_SEED_KEY, userId);+ } catch {+ // Storage unavailable: the loop guard is best-effort, not load-bearing.+ }+}++/** Read and clear the marker. Returns null when no flip is pending. */+export function consumeIdentityFlipSeed(): string | null {+ try {+ const id = localStorage.getItem(IDENTITY_FLIP_SEED_KEY);+ if (id) localStorage.removeItem(IDENTITY_FLIP_SEED_KEY);+ return id && id.trim() ? id : null;+ } catch {+ return null;+ }+}+/*** One-shot migration for users upgrading from the pre-#900 build, where* persist blobs lived at unscoped keys (`persist:accounts`, etc.). On thediff --git a/app/src/utils/__tests__/bootstrapActiveUser.test.ts b/app/src/utils/__tests__/bootstrapActiveUser.test.tsindex 08c8bc5596..0ae36479cd 100644--- a/app/src/utils/__tests__/bootstrapActiveUser.test.ts+++ b/app/src/utils/__tests__/bootstrapActiveUser.test.ts@@ -14,7 +14,12 @@*/import { describe, expect, test, vi } from 'vitest';-import { resolveActiveUserBootstrap, shouldSkipLocalActiveUserRead } from '../bootstrapActiveUser';+import {+ consumeIdentityFlipSeed,+ markIdentityFlipSeed,+ resolveActiveUserBootstrap,+ shouldSkipLocalActiveUserRead,+} from '../bootstrapActiveUser';describe('shouldSkipLocalActiveUserRead', () => {test('cloud mode skips the local read', () => {@@ -122,3 +127,76 @@ describe('gateway mode is a remote core, not a local one', () => {expect(getActiveUserIdFromCore).not.toHaveBeenCalled();});});++describe('identity-flip seed marker (#4545, local-core variant)', () => {+ // The loop this guards: sign in with TinyHumans after using "Continue+ // Locally". `handleIdentityFlip` corrects the seed and restarts, but a LOCAL+ // core re-primes from `active_user.toml`, which still names the local user.+ // The next refresh sees the same mismatch and restarts again, forever.+ it('prefers a pending flip seed over the core file, and consumes it once', async () => {+ const getActiveUserIdFromCore = vi.fn().mockResolvedValue('local-stale-user');+ const consumeIdentityFlipSeed = vi+ .fn()+ .mockReturnValueOnce('tinyhumans-user')+ .mockReturnValue(null);++ const first = await resolveActiveUserBootstrap({+ isStandaloneNativeWindow: false,+ coreMode: 'local',+ getActiveUserIdFromCore,+ consumeIdentityFlipSeed,+ });+ expect(first).toBe('tinyhumans-user');+ // The stale file is never consulted while a flip is pending.+ expect(getActiveUserIdFromCore).not.toHaveBeenCalled();++ // Second boot: the marker is spent, so the normal source takes over.+ const second = await resolveActiveUserBootstrap({+ isStandaloneNativeWindow: false,+ coreMode: 'local',+ getActiveUserIdFromCore,+ consumeIdentityFlipSeed,+ });+ expect(second).toBe('local-stale-user');+ expect(getActiveUserIdFromCore).toHaveBeenCalledTimes(1);+ });++ it('leaves cloud mode on its existing path when no flip is pending', async () => {+ const getActiveUserIdFromCore = vi.fn().mockResolvedValue('should-not-be-read');+ const resolved = await resolveActiveUserBootstrap({+ isStandaloneNativeWindow: false,+ coreMode: 'cloud',+ getActiveUserIdFromCore,+ consumeIdentityFlipSeed: () => null,+ });+ expect(resolved).toBeNull();+ expect(getActiveUserIdFromCore).not.toHaveBeenCalled();+ });+});++describe('consumeIdentityFlipSeed storage failures', () => {+ // Private windows, cleared site data and quota errors all make localStorage+ // throw. The loop guard is best-effort: it must degrade to "no flip pending"+ // rather than take the boot path down with it.+ it('returns null when reading localStorage throws', () => {+ const getItem = vi.spyOn(Storage.prototype, 'getItem').mockImplementation(() => {+ throw new Error('SecurityError');+ });+ try {+ expect(consumeIdentityFlipSeed()).toBeNull();+ } finally {+ getItem.mockRestore();+ }+ });++ it('round-trips a marker and clears it so the next boot sees nothing', () => {+ markIdentityFlipSeed('user-abc');+ expect(consumeIdentityFlipSeed()).toBe('user-abc');+ expect(consumeIdentityFlipSeed()).toBeNull();+ });++ it('treats a blank marker as no flip pending', () => {+ markIdentityFlipSeed(' ');+ expect(consumeIdentityFlipSeed()).toBeNull();+ });+});diff --git a/app/src/utils/__tests__/desktopDeepLinkListener.test.ts b/app/src/utils/__tests__/desktopDeepLinkListener.test.tsindex ffcff2d6db..254992ff4f 100644--- a/app/src/utils/__tests__/desktopDeepLinkListener.test.ts+++ b/app/src/utils/__tests__/desktopDeepLinkListener.test.ts@@ -187,6 +187,7 @@ describe('desktopDeepLinkListener', () => {expect(windowControls.setFocus).toHaveBeenCalledTimes(1);expect(getDeepLinkAuthState()).toEqual({isProcessing: false,+ awaitingCallback: false,// Literal copy, not a key: only the localized failures carry one.errorMessageKey: null,errorMessage:diff --git a/app/src/utils/bootstrapActiveUser.ts b/app/src/utils/bootstrapActiveUser.tsindex 069d4cd412..32fa69e790 100644--- a/app/src/utils/bootstrapActiveUser.ts+++ b/app/src/utils/bootstrapActiveUser.ts@@ -1,3 +1,5 @@+import { consumeIdentityFlipSeed, markIdentityFlipSeed } from '../store/userScopedStorage';+/*** Decide which async source seeds `userScopedStorage`'s active-user id at* boot, before `primeActiveUserId(...)` runs.@@ -21,6 +23,12 @@* `userScopedStorage.ts::primeActiveUserId` and the "cloud-mode reload* survival" test.*/+// The marker itself lives with `OPENHUMAN_ACTIVE_USER_ID` in+// `userScopedStorage.ts`: both are unscoped by necessity because they are read+// to *decide* the active user. Re-exported here because this is where the+// bootstrap reads it.+export { consumeIdentityFlipSeed, markIdentityFlipSeed };+/** Every core mode the picker and the gateway section can persist. */type StoredCoreMode = 'local' | 'cloud' | 'gateway' | null;@@ -28,6 +36,8 @@ interface BootstrapContext {isStandaloneNativeWindow: boolean;coreMode: StoredCoreMode;getActiveUserIdFromCore: () => Promise<string | null>;+ /** Injectable for tests; defaults to the module-level reader. */+ consumeIdentityFlipSeed?: () => string | null;}export function shouldSkipLocalActiveUserRead(opts: {@@ -43,6 +53,17 @@ export function shouldSkipLocalActiveUserRead(opts: {}export function resolveActiveUserBootstrap(ctx: BootstrapContext): Promise<string | null> {+ // A pending flip outranks every other source: it is the id this process was+ // restarted in order to adopt.+ // `?? consumeIdentityFlipSeed()` would fall through to the module reader+ // whenever an injected one returned null, so a test that deliberately says+ // "no flip pending" still hit real storage.+ const readFlipSeed = ctx.consumeIdentityFlipSeed ?? consumeIdentityFlipSeed;+ const flipped = readFlipSeed();+ if (flipped) {+ return Promise.resolve<string | null>(flipped);+ }+if (shouldSkipLocalActiveUserRead({isStandaloneNativeWindow: ctx.isStandaloneNativeWindow,diff --git a/app/test/e2e/helpers/element-helpers.ts b/app/test/e2e/helpers/element-helpers.tsindex 600446c722..da658e1f63 100644--- a/app/test/e2e/helpers/element-helpers.ts+++ b/app/test/e2e/helpers/element-helpers.ts@@ -1,7 +1,7 @@/*** Cross-platform WebView element helpers for E2E tests.*- * Two backends are supported:+ * Desktop backends and the Playwright web harness are supported:** ## Appium Mac2 (macOS)* The mac2 driver exposes WKWebView content through the macOS accessibility@@ -17,6 +17,7 @@* - `browser.execute()` runs JS inside the WebView* - `browser.getPageSource()` returns HTML (not accessibility XML)*/+import type { Page } from '@playwright/test';import type { ChainablePromiseElement } from 'webdriverio';import { isTauriDriver } from './platform';@@ -694,3 +695,35 @@ export async function dumpAccessibilityTree(): Promise<string> {return `[dumpAccessibilityTree] Failed: ${err}`;}}++// Playwright web-lane adapter. Keep platform locator types and locale-storage+// decoding here so web specs use the same shared element-helper boundary.+export type BrowserPage = Page;++export function browserElements(page: BrowserPage) {+ const language = (name: string) => page.getByRole('combobox', { name, exact: true });+ return {+ language,+ selectLanguage: (name: string, value: string | { label: string }) =>+ language(name).selectOption(value),+ document: page.locator('html'),+ chatTab: page.locator('[data-walkthrough="tab-chat"]'),+ text: (value: string) => page.getByText(value, { exact: true }),+ };+}++export async function persistedBrowserLocale(page: BrowserPage): Promise<string | null> {+ return page.evaluate(() => {+ const raw = localStorage.getItem('persist:locale');+ if (!raw) return null;+ try {+ // Redux Persist JSON-encodes each reducer property inside its outer JSON.+ const persisted = JSON.parse(raw) as { current?: string };+ if (!persisted.current) return null;+ const locale = JSON.parse(persisted.current);+ return typeof locale === 'string' ? locale : null;+ } catch {+ return null;+ }+ });+}diff --git a/app/test/e2e/specs/chip-tabs-keyboard.spec.ts b/app/test/e2e/specs/chip-tabs-keyboard.spec.tsnew file mode 100644index 0000000000..6726399be3--- /dev/null+++ b/app/test/e2e/specs/chip-tabs-keyboard.spec.ts@@ -0,0 +1,59 @@+import { browser, expect } from '@wdio/globals';++import { waitForApp } from '../helpers/app-helpers';+import { waitForTestId } from '../helpers/element-helpers';+import { resetApp } from '../helpers/reset-app';+import { navigateViaHash } from '../helpers/shared-flows';+import { startMockServer, stopMockServer } from '../mock-server';++type Tab = 'providers' | 'routing' | 'websites';+const TABS: Tab[] = ['providers', 'routing', 'websites'];++async function expectSelectedAndFocused(selected: Tab): Promise<void> {+ for (const tab of TABS) {+ const element = await waitForTestId(`search-tab-${tab}`);+ await expect(element).toHaveAttribute('aria-selected', String(tab === selected));+ if (tab === selected) await expect(element).toBeFocused();+ }+}++// Registered by app/scripts/e2e-run-all-flows.sh in the navigation suite.+describe('ChipTabs keyboard traversal', () => {+ before(async () => {+ await startMockServer();+ await waitForApp();+ await resetApp('e2e-chip-tabs-keyboard');+ });++ after(async () => {+ await stopMockServer();+ });++ it('enters on the active tab and selects with arrows, Home, End and wrapping', async () => {+ await navigateViaHash('/settings/search');+ await waitForTestId('search-settings-panel');+ // Start in the middle so each jump changes the controlled selection.+ const middle = await waitForTestId('search-tab-routing');+ await middle.click();+ await expectSelectedAndFocused('routing');++ // Leave the row, then enter with a real Tab event. This exercises entry+ // focus in Radix's roving group before the arrow-key assertions.+ await browser.keys(['Shift', 'Tab']);+ await expect(middle).not.toBeFocused();+ await browser.keys('Tab');+ await expectSelectedAndFocused('routing');++ for (const [key, selected] of [+ ['ArrowRight', 'websites'],+ ['ArrowLeft', 'routing'],+ ['Home', 'providers'],+ ['End', 'websites'],+ ['ArrowRight', 'providers'],+ ['ArrowLeft', 'websites'],+ ] as const) {+ await browser.keys(key);+ await expectSelectedAndFocused(selected);+ }+ });+});diff --git a/app/test/e2e/specs/japanese-locale.browser.ts b/app/test/e2e/specs/japanese-locale.browser.tsnew file mode 100644index 0000000000..dff5ca5653--- /dev/null+++ b/app/test/e2e/specs/japanese-locale.browser.ts@@ -0,0 +1,170 @@+import { expect, test } from '@playwright/test';++import {+ bootAuthenticatedPage,+ callCoreRpc,+ dismissWalkthroughIfPresent,+ waitForAppReady,+} from '../../playwright/helpers/core-rpc';+import {+ browserElements,+ type BrowserPage,+ persistedBrowserLocale,+} from '../helpers/element-helpers';++async function settings(page: BrowserPage, user: string) {+ await bootAuthenticatedPage(page, user, '/settings/account');+ await dismissWalkthroughIfPresent(page);+}++async function localSettings(page: BrowserPage, user: string) {+ await bootAuthenticatedPage(page, user, '/settings/account');+ await callCoreRpc('openhuman.auth_store_session', {+ token: 'header.payload.local',+ userId: 'local',+ user: { _id: 'local', id: 'local', name: 'Local User', email: '[email protected]' },+ });+ await page.reload();+ await waitForAppReady(page);+ await dismissWalkthroughIfPresent(page);+}++async function expectJapanese(page: BrowserPage) {+ await expect(browserElements(page).language('言語')).toHaveValue('ja');+ await expect(browserElements(page).document).toHaveAttribute('lang', 'ja');+ await expect(browserElements(page).document).toHaveAttribute('dir', 'ltr');+ await expect(browserElements(page).chatTab).toContainText('チャット');+}++test.describe('Japanese UI locale', () => {+ test.describe.configure({ timeout: 180_000 });++ test('selects Japanese through Settings, restores it after reload, and switches back', async ({+ page,+ }) => {+ await settings(page, 'pw-japanese-switch');+ await browserElements(page).selectLanguage('Language', { label: '🇯🇵 日本語' });+ await expectJapanese(page);+ // Wait for redux-persist to write, rather than dispatching or seeding a locale.+ await expect.poll(() => persistedBrowserLocale(page)).toBe('ja');+ await page.reload();+ await expectJapanese(page);+ await browserElements(page).selectLanguage('言語', 'en');+ await expect(browserElements(page).language('Language')).toHaveValue('en');+ await expect(browserElements(page).document).toHaveAttribute('lang', 'en');+ await expect(browserElements(page).chatTab).toContainText('Chat');+ await expect.poll(() => persistedBrowserLocale(page)).toBe('en');+ await page.reload();+ await expect(browserElements(page).language('Language')).toHaveValue('en');+ });++ test('detects ja-JP on a fresh browser and preserves a manual English override', async ({+ browser,+ baseURL,+ }) => {+ const context = await browser.newContext({+ baseURL,+ locale: 'ja-JP',+ viewport: { width: 1280, height: 720 },+ });+ const page = await context.newPage();+ try {+ await settings(page, 'pw-japanese-detect');+ expect(await page.evaluate(() => navigator.language)).toBe('ja-JP');+ await expectJapanese(page);+ await expect(browserElements(page).language('言語')).toBeInViewport();+ await browserElements(page).selectLanguage('言語', 'en');+ await expect.poll(() => persistedBrowserLocale(page)).toBe('en');+ await page.reload();+ await expect(browserElements(page).language('Language')).toHaveValue('en');+ expect(await page.evaluate(() => navigator.language)).toBe('ja-JP');+ } finally {+ await context.close();+ }+ });++ test('renders Japanese memory counts and model attribution at the default viewport', async ({+ page,+ }) => {+ const fixtures: Record<string, unknown> = {+ 'openhuman.memory_engine_get': {+ result: { engine: 'tinycortex', has_key: true, status: 'ready', fetch_modes: [] },+ logs: [],+ },+ 'openhuman.memory_engines_list': { result: { engines: [] }, logs: [] },+ 'openhuman.memory_explore': {+ result: {+ facet: 'kind',+ buckets: [{ value: 'document', count: 7 }],+ total: 7,+ missing: 0,+ more_buckets: 0,+ truncated: false,+ },+ logs: [],+ },+ 'openhuman.memory_items_list': { result: { items: [] }, logs: [] },+ 'openhuman.tokenjuice_savings_stats': {+ result: {+ attributionModel: 'Qwen3.8-Flash-Next',+ total: {+ events: 3,+ originalTokens: 1000,+ compactedTokens: 500,+ tokensSaved: 500,+ costSavedUsd: 0,+ },+ byModel: {},+ byCompressor: {},+ cache: { entries: 0, bytes: 0 },+ },+ logs: [],+ },+ };+ // Only data-dependent read results are fixtures; authentication, locale+ // persistence and navigation still run through the shared Core harness.+ await page.route('**/rpc', async route => {+ const request = route.request().postDataJSON();+ if (request && Object.prototype.hasOwnProperty.call(fixtures, request.method)) {+ await route.fulfill({+ json: { jsonrpc: '2.0', id: request.id, result: fixtures[request.method] },+ });+ } else {+ await route.continue();+ }+ });+ await page.setViewportSize({ width: 1280, height: 720 });+ await settings(page, 'pw-japanese-interpolation');+ await browserElements(page).selectLanguage('Language', 'ja');+ await expect.poll(() => persistedBrowserLocale(page)).toBe('ja');+ await page.goto('/#/connections?tab=brain&brain=explorer');+ const count = browserElements(page).text('この場所の項目: 7件');+ await expect(count).toBeVisible();+ await count.scrollIntoViewIfNeeded();+ await expect(count).toBeInViewport();+ expect(await count.evaluate(element => element.scrollWidth <= element.clientWidth)).toBe(true);+ await page.goto('/#/connections?tab=usage#tokens');+ const attribution = browserElements(page).text('Qwen3.8-Flash-Next のコストで計算');+ await expect(attribution).toBeVisible();+ await attribution.scrollIntoViewIfNeeded();+ await expect(attribution).toBeInViewport();+ expect(await attribution.evaluate(element => element.scrollWidth <= element.clientWidth)).toBe(+ true+ );+ await expect(browserElements(page).text('3 回の圧縮で')).toBeVisible();+ });++ test('renders the Japanese Composio direct-only explanation for a local session', async ({+ page,+ }) => {+ await localSettings(page, 'pw-japanese-composio-local');+ await browserElements(page).selectLanguage('Language', 'ja');+ await expect.poll(() => persistedBrowserLocale(page)).toBe('ja');+ await page.goto('/#/connections?tab=composio-key');+ await expect(+ browserElements(page).text(+ 'この環境ではComposioのマネージド認証を利用できません。独自のComposio APIキーを入力するか、設定を後回しにしてください。'+ )+ ).toBeVisible();+ });+});diff --git a/app/test/e2e/specs/onboarding-modes.spec.ts b/app/test/e2e/specs/onboarding-modes.spec.tsindex f6e230cacd..edf75d4657 100644--- a/app/test/e2e/specs/onboarding-modes.spec.ts+++ b/app/test/e2e/specs/onboarding-modes.spec.ts@@ -7,25 +7,25 @@* (Cloud) → /home. `onboarding_completed = true` lands in* `${OPENHUMAN_WORKSPACE}/config.toml` immediately.*- * - Phase B — Advanced/Custom path (Default on every wizard step):+ * - Phase B — Advanced/Custom path:* reset onboarding flag → Welcome → Runtime choice (Custom) →- * Inference (Default) → Voice (Default) → OAuth (Default) →- * Search (Default) → Embeddings (Default) → Finish.- * Asserts all five custom wizard step containers render with the- * expected `data-testid`s (i.e. *all settings are reachable*).+ * Inference → Search → Vault (Finish).+ * The custom wizard is exactly three steps; Voice, OAuth and Embeddings+ * are no longer part of it (they stay configurable from Settings).+ * Asserts each of the three step containers renders with the expected+ * `data-testid`, that the stepper shows Inference / Search / Vault and+ * that the retired steps are never mounted.*- * - Phase C — Advanced/Custom path with Configure on the Voice step:- * pick Configure, the embedded VoicePanel renders. Flip the STT- * provider selector and assert `config.toml` updates- * `local_ai.stt_provider` within a few seconds (i.e. advanced voice- * provider settings apply immediately to persisted config).+ * - Phase C — Advanced/Custom path using "Skip for now" on the optional+ * Search step: Inference → Search (skip, no key configured) →+ * Vault (Finish), and `onboarding_completed = true` lands in config.toml.** Auth is the bypass deep-link path. The mock API server runs on the same* port the dist bundle was built against (see `app/scripts/e2e-run-session.sh`).* No real network is touched.*/import { waitForAppReady, waitForAuthBootstrap } from '../helpers/app-helpers';-import { readBool, readConfigToml, readSectionString, topLevelValue } from '../helpers/config-toml';+import { readBool, readConfigToml, topLevelValue } from '../helpers/config-toml';import { callOpenhumanRpc } from '../helpers/core-rpc';import { triggerAuthDeepLinkBypass } from '../helpers/deep-link-helpers';import { waitForWebView, waitForWindowVisible } from '../helpers/element-helpers';@@ -171,6 +171,16 @@ async function waitForCustomSelection(timeout = 5_000): Promise<boolean> {return false;}+/** Rendered stepper labels of the custom wizard, in DOM order. */+async function stepperLabels(): Promise<string[]> {+ return browser.execute(() => {+ const items = document.querySelectorAll('[data-testid="onboarding-wizard-stepper"] > li');+ return Array.from(items).map(li =>+ (li.querySelector('span:last-child')?.textContent ?? '').trim()+ );+ });+}+async function advanceFromWelcomeToCustomInference(phase: string): Promise<void> {const reachedChoiceOrInference = await browser.waitUntil(@@ -333,56 +343,37 @@ describe('Onboarding modes — Simple (Cloud) vs Advanced (Custom)', function ()// Phase B — Advanced (Custom), Default on every step// ───────────────────────────────────────────────────────────────────────- it('advanced/custom path: walks all wizard steps with Default choice', async function () {+ it('advanced/custom path: walks the three wizard steps with Default choice', async function () {// resetOnboardingFlagAndReload includes waitForWindowVisible(25_000), needs extra budget.this.timeout(90_000);await resetOnboardingFlagAndReload();await advanceFromWelcomeToCustomInference('Phase B');- // Step 2 — Custom Inference (Default).- expect(await clickTestId('onboarding-custom-inference-step-default')).toBe(true);+ // Step 1 of 3 — Custom Inference. The stepper must list exactly+ // the three live steps, in order.+ expect(await testIdExists('onboarding-custom-inference-step', 10_000)).toBe(true);+ expect(await stepperLabels()).toEqual(['Inference', 'Search', 'Vault']);await pause(400);await clickOnboardingNext();- // Step 3 — Custom Voice (Default).- expect(await testIdExists('onboarding-custom-voice-step', 10_000)).toBe(true);- expect(await clickTestId('onboarding-custom-voice-step-default')).toBe(true);- await pause(400);- await clickOnboardingNext();-- // Step 4 — Custom OAuth (Default).- expect(await testIdExists('onboarding-custom-oauth-step', 10_000)).toBe(true);- expect(await clickTestId('onboarding-custom-oauth-step-default')).toBe(true);- await pause(400);- await clickOnboardingNext();-- // Step 5 — Custom Search (Default).+ // Step 2 of 3 — Custom Search.expect(await testIdExists('onboarding-custom-search-step', 10_000)).toBe(true);- expect(await clickTestId('onboarding-custom-search-step-default')).toBe(true);+ expect(await stepperLabels()).toEqual(['Inference', 'Search', 'Vault']);await pause(400);await clickOnboardingNext();- // Step 6 — Custom Embeddings (Default).- expect(await testIdExists('onboarding-custom-embeddings-step', 10_000)).toBe(true);- expect(await clickTestId('onboarding-custom-embeddings-step-default')).toBe(true);- await pause(400);- await clickOnboardingNext();-- // Step 7 — Custom Vault. Final step → Finish. VaultSetupStep hides the- // choice cards and auto-selects "configure" only for LOCAL sessions- // (`defaultDisabled={isLocalSession}`); the E2E logs in via the cloud-auth- // deep link, so the session is non-local — the choice cards ARE shown with- // an enabled default, and the Finish button stays disabled (`choice === null`)- // until one is picked. Select the default when the card is present; a local- // session (cards hidden) just advances.+ // Step 3 of 3 — Custom Vault. Final step → Finish. There is no+ // Default/Configure fork any more, so Continue is enabled straight away.expect(await testIdExists('onboarding-custom-vault-step', 10_000)).toBe(true);- if (await testIdExists('onboarding-custom-vault-step-default', 2_000)) {- await clickTestId('onboarding-custom-vault-step-default');- }await pause(400);await clickOnboardingNext();+ // The retired steps must never have been part of the flow.+ expect(await testIdExists('onboarding-custom-voice-step', 500)).toBe(false);+ expect(await testIdExists('onboarding-custom-oauth-step', 500)).toBe(false);+ expect(await testIdExists('onboarding-custom-embeddings-step', 500)).toBe(false);+const landed = await waitForHome(20_000);if (!landed) stepLog(`current hash after custom finish: ${await currentHash()}`);expect(landed).toBe(true);@@ -399,120 +390,39 @@ describe('Onboarding modes — Simple (Cloud) vs Advanced (Custom)', function ()});// ───────────────────────────────────────────────────────────────────────- // Phase C — Advanced (Custom), Configure on Voice mutates config.toml+ // Phase C — Advanced (Custom), skip the optional Search step// ───────────────────────────────────────────────────────────────────────- it('advanced/custom path: Configure on Voice updates local_ai.stt_provider in config.toml', async function () {+ it('advanced/custom path: Skip for now on Search advances to Vault and completes onboarding', async function () {// resetOnboardingFlagAndReload includes waitForWindowVisible(25_000), needs extra budget.this.timeout(90_000);await resetOnboardingFlagAndReload();- // Welcome → Runtime choice (Custom) → Inference (Default).+ // Welcome → Runtime choice (Custom) → Inference.await advanceFromWelcomeToCustomInference('Phase C');- expect(await clickTestId('onboarding-custom-inference-step-default')).toBe(true);await pause(400);await clickOnboardingNext();- // Voice step → Configure → embedded VoicePanel renders. The auto-start- // checkbox + Save button only render when local STT assets (Whisper) are- // installed (`disabled = !sttReady` gates that block). In the CI- // container we don't ship those assets, so we drive the always-visible- // provider selectors instead — flipping the STT provider fires- // `voice_set_providers`, which writes `config.local_ai.stt_provider`- // to `config.toml` via `config.save()`.- expect(await testIdExists('onboarding-custom-voice-step', 10_000)).toBe(true);- expect(await clickTestId('onboarding-custom-voice-step-configure')).toBe(true);- expect(await testIdExists('voice-providers-section', 10_000)).toBe(true);- expect(await testIdExists('stt-provider-select', 10_000)).toBe(true);-- const before = readSectionString(readConfigToml(), 'local_ai', 'stt_provider');-- // Flip to a genuinely SELECTABLE provider. Local STT providers- // (whisper/piper) render as `<option disabled>` in the CI container (no- // local assets), so a synthetic change to them reverts and never persists —- // asserting `stt_provider === 'whisper'` can never pass here. Pick an- // enabled option whose value differs from the current selection and read- // back the value the control actually committed to.- const want = await browser.execute(() => {- const el = document.querySelector<HTMLSelectElement>('[data-testid="stt-provider-select"]');- if (!el) return null;- const current = el.value;- const candidate = Array.from(el.options).find(- o => !o.disabled && o.value && o.value !== current- );- if (!candidate) return null;- const setter = Object.getOwnPropertyDescriptor(- window.HTMLSelectElement.prototype,- 'value'- )?.set;- if (setter) setter.call(el, candidate.value);- else el.value = candidate.value;- el.dispatchEvent(new Event('change', { bubbles: true }));- // A disabled option would revert; an enabled one sticks.- return el.value === candidate.value ? candidate.value : null;- });-- if (!want) {- stepLog(- 'No alternate selectable STT provider in this environment — skipping the provider-flip persistence assertion'- );- return;- }- stepLog(`stt_provider before=${before ?? '<unset>'} → want=${want}`);-- // Voice Routing was decoupled into staged edit + explicit Save: the select's- // onChange only stages `sttProvider` (VoicePanel `onSttProviderChange`);- // persistence to config.toml happens on the always-rendered Save button- // (`save-voice-routing`, enabled once there are routing changes). Click it so- // the staged provider actually writes through.- expect(await clickTestId('save-voice-routing')).toBe(true);-- // Poll config.toml for the new value.- let onDisk: string | null = null;- const deadline = Date.now() + 10_000;- while (Date.now() < deadline) {- onDisk = readSectionString(readConfigToml(), 'local_ai', 'stt_provider');- if (onDisk === want) break;- await pause(500);- }- if (onDisk !== want) {- stepLog(- `local_ai.stt_provider expected=${want} got=${onDisk ?? '<unset>'}; config.toml:\n` +- readConfigToml()- );- }- expect(onDisk).toBe(want);-- // Continue out of the wizard so the spec leaves the app on /home.- await clickOnboardingNext();- expect(await testIdExists('onboarding-custom-oauth-step', 10_000)).toBe(true);- expect(await clickTestId('onboarding-custom-oauth-step-default')).toBe(true);- await pause(400);- await clickOnboardingNext();-- // Step 5 — Custom Search (Default).+ // Search is the one genuinely optional step: the skip control moves on+ // without a key configured, straight to the Vault step.expect(await testIdExists('onboarding-custom-search-step', 10_000)).toBe(true);- expect(await clickTestId('onboarding-custom-search-step-default')).toBe(true);- await pause(400);- await clickOnboardingNext();-- // Step 6 — Custom Embeddings (Default).- expect(await testIdExists('onboarding-custom-embeddings-step', 10_000)).toBe(true);- expect(await clickTestId('onboarding-custom-embeddings-step-default')).toBe(true);- await pause(400);- await clickOnboardingNext();+ expect(await testIdExists('onboarding-search-skip', 5_000)).toBe(true);+ expect(await clickTestId('onboarding-search-skip')).toBe(true);- // Step 7 — Custom Vault. Final step → Finish. Choice cards are hidden/auto-- // configured only for LOCAL sessions; the E2E's cloud-auth session shows the- // cards with an enabled default that must be picked before Finish enables.expect(await testIdExists('onboarding-custom-vault-step', 10_000)).toBe(true);- if (await testIdExists('onboarding-custom-vault-step-default', 2_000)) {- await clickTestId('onboarding-custom-vault-step-default');- }await pause(400);await clickOnboardingNext();expect(await waitForHome(20_000)).toBe(true);++ let value: boolean | null = null;+ const deadline = Date.now() + 8_000;+ while (Date.now() < deadline) {+ value = readBool(topLevelValue(readConfigToml(), 'onboarding_completed'));+ if (value === true) break;+ await pause(400);+ }+ expect(value).toBe(true);});});diff --git a/app/test/playwright/helpers/chat-composer.ts b/app/test/playwright/helpers/chat-composer.tsnew file mode 100644index 0000000000..4a3a7c9fc5--- /dev/null+++ b/app/test/playwright/helpers/chat-composer.ts@@ -0,0 +1,24 @@+import { expect, type Locator } from '@playwright/test';++/** Read either the Lexical surface or a textarea composer. */+export function composerText(input: Locator): Promise<string> {+ return input.evaluate(node => {+ const field = node as HTMLTextAreaElement;+ return typeof field.value === 'string' ? field.value : (node.textContent ?? '');+ });+}++/** Clear the restored draft through the same keyboard events a user sends. */+export async function clearChatComposer(input: Locator): Promise<void> {+ await input.click();+ await input.press('ControlOrMeta+a');+ await input.press('Delete');+ await expect.poll(() => composerText(input), { timeout: 15_000 }).toBe('');+}++/** Start a test with exactly its prompt, including when a draft was restored. */+export async function replaceChatComposerText(input: Locator, text: string): Promise<void> {+ await clearChatComposer(input);+ await input.pressSequentially(text);+ await expect.poll(() => composerText(input), { timeout: 15_000 }).toBe(text);+}diff --git a/app/test/playwright/helpers/core-rpc.ts b/app/test/playwright/helpers/core-rpc.tsindex e07f667294..005fa02a06 100644--- a/app/test/playwright/helpers/core-rpc.ts+++ b/app/test/playwright/helpers/core-rpc.ts@@ -240,16 +240,10 @@ export async function waitForAppReady(page: Page): Promise<void> {.toBeGreaterThan(20);await expect.poll(async () =>- page.evaluate(() => {- const candidates = Array.from(document.querySelectorAll('h2, button, p, div, span'));- return candidates.some(node => {- const text = node.textContent?.trim() ?? '';- if (!/Select a Runtime|Connect to Your Runtime/.test(text)) return false;- const el = node as HTMLElement;- const rect = el.getBoundingClientRect();- return rect.width > 0 && rect.height > 0;- });- })+ // Keyed off a test id, not the picker's heading. Matching the copy meant+ // that renaming it left this wait matching nothing, so it resolved+ // immediately and every spec raced the boot gate.+ page.evaluate(() => document.querySelector('[data-testid="boot-check-picker"]') !== null)).toBe(false);}diff --git a/app/test/playwright/specs/chat-composer-caret.spec.ts b/app/test/playwright/specs/chat-composer-caret.spec.tsindex a8dfbd8b03..0d3e3f474b 100644--- a/app/test/playwright/specs/chat-composer-caret.spec.ts+++ b/app/test/playwright/specs/chat-composer-caret.spec.ts@@ -63,6 +63,7 @@*/import { expect, type Locator, type Page, test } from '@playwright/test';+import { clearChatComposer, composerText, replaceChatComposerText } from '../helpers/chat-composer';import {bootAuthenticatedPage,dismissWalkthroughIfPresent,@@ -87,14 +88,10 @@ async function openChat(page: Page): Promise<Locator> {await dismissWalkthroughIfPresent(page);const input = page.getByTestId('chat-message-input');await expect(input).toBeVisible();+ await clearChatComposer(input);return input;}-/** Composer text. `textContent`, because the element is a contenteditable div. */-function composerText(input: Locator): Promise<string> {- return input.evaluate(node => node.textContent ?? '');-}-/*** Caret offset in characters from the start of the composer.*@@ -124,24 +121,6 @@ async function placeCaret(page: Page, input: Locator, index: number): Promise<voawait page.waitForTimeout(100);}-/**- * Put exactly `text` in the composer, starting from empty.- *- * The clear is load-bearing: `Conversations` persists the draft per thread- * through redux-persist, so a second test booting as the same user can open- * with the previous test's text already in the composer. Typing on top of that- * silently produced a different string and the polls below just timed out —- * which reads as a hang, not as a data problem.- */-async function seed(page: Page, input: Locator, text: string): Promise<void> {- await input.click();- await page.keyboard.press('ControlOrMeta+a');- await page.keyboard.press('Delete');- await expect.poll(() => composerText(input), { timeout: 15_000 }).toBe('');- await page.keyboard.type(text);- await expect.poll(() => composerText(input), { timeout: 15_000 }).toBe(text);-}-test.describe('Chat composer — caret on mid-string edits', () => {test.beforeEach(async () => {await resetMock();@@ -154,7 +133,7 @@ test.describe('Chat composer — caret on mid-string edits', () => {*/test('moving the caret without editing keeps it where it was put', async ({ page }) => {const input = await openChat(page);- await seed(page, input, 'hello world');+ await replaceChatComposerText(input, 'hello world');await placeCaret(page, input, 5);expect(await caretOffset(input)).toBe(5);@@ -220,7 +199,7 @@ test.describe('Chat composer — caret on mid-string edits', () => {*/test('typing mid-string leaves the caret after the inserted character', async ({ page }) => {const input = await openChat(page);- await seed(page, input, 'hello world');+ await replaceChatComposerText(input, 'hello world');await placeCaret(page, input, 5);expect(@@ -248,7 +227,7 @@ test.describe('Chat composer — caret on mid-string edits', () => {page,}) => {const input = await openChat(page);- await seed(page, input, 'hello world');+ await replaceChatComposerText(input, 'hello world');await placeCaret(page, input, 5);await page.keyboard.type('A');@@ -282,7 +261,7 @@ test.describe('Chat composer — caret on mid-string edits', () => {page,}) => {const input = await openChat(page);- await seed(page, input, 'hello world');+ await replaceChatComposerText(input, 'hello world');await placeCaret(page, input, 5);await page.keyboard.press('Backspace');@@ -306,7 +285,7 @@ test.describe('Chat composer — caret on mid-string edits', () => {*/test('Shift+Enter inserts a newline mid-string without sending', async ({ page }) => {const input = await openChat(page);- await seed(page, input, 'hello world');+ await replaceChatComposerText(input, 'hello world');await placeCaret(page, input, 5);await page.keyboard.press('Shift+Enter');diff --git a/app/test/playwright/specs/chat-composer-edit-and-clipboard.spec.ts b/app/test/playwright/specs/chat-composer-edit-and-clipboard.spec.tsindex c111798128..96470b1183 100644--- a/app/test/playwright/specs/chat-composer-edit-and-clipboard.spec.ts+++ b/app/test/playwright/specs/chat-composer-edit-and-clipboard.spec.ts@@ -34,6 +34,7 @@*/import { expect, type Locator, type Page, test } from '@playwright/test';+import { clearChatComposer, replaceChatComposerText } from '../helpers/chat-composer';import {bootAuthenticatedPage,dismissWalkthroughIfPresent,@@ -67,6 +68,7 @@ async function openChat(page: Page): Promise<Locator> {await dismissWalkthroughIfPresent(page);const input = page.getByTestId('chat-message-input');await expect(input).toBeVisible();+ await clearChatComposer(input);return input;}@@ -113,15 +115,6 @@ function caretOf(el: Locator): Promise<number> {});}-async function clearAndType(page: Page, el: Locator, text: string): Promise<void> {- await el.click();- await page.keyboard.press('ControlOrMeta+a');- await page.keyboard.press('Delete');- await expect.poll(() => textOf(el), { timeout: 15_000 }).toBe('');- await page.keyboard.type(text);- await expect.poll(() => textOf(el), { timeout: 15_000 }).toBe(text);-}-async function placeCaret(page: Page, el: Locator, index: number): Promise<void> {await el.click();await page.keyboard.press('Home');@@ -177,7 +170,7 @@ test.describe('Composer — clipboard, history, and the edit composer', () => {// Put "ABC" on the clipboard by typing then cutting — no clipboard// permissions needed, and it exercises the surface a user would.- await clearAndType(page, input, 'ABC');+ await replaceChatComposerText(input, 'ABC');await page.keyboard.press('ControlOrMeta+a');await page.keyboard.press('ControlOrMeta+x');await expect.poll(() => textOf(input), { timeout: 15_000 }).toBe('');@@ -200,7 +193,7 @@ test.describe('Composer — clipboard, history, and the edit composer', () => {test('undo after a mid-string insertion restores the previous text', async ({ page }) => {const input = await openChat(page);- await clearAndType(page, input, 'hello world');+ await replaceChatComposerText(input, 'hello world');await placeCaret(page, input, 5);await page.keyboard.type('X');@@ -215,7 +208,7 @@ test.describe('Composer — clipboard, history, and the edit composer', () => {test('redo after undo re-applies the insertion', async ({ page }) => {const input = await openChat(page);- await clearAndType(page, input, 'hello world');+ await replaceChatComposerText(input, 'hello world');await placeCaret(page, input, 5);await page.keyboard.type('X');diff --git a/app/test/playwright/specs/chat-composer-helper.spec.ts b/app/test/playwright/specs/chat-composer-helper.spec.tsnew file mode 100644index 0000000000..2828b76f8b--- /dev/null+++ b/app/test/playwright/specs/chat-composer-helper.spec.ts@@ -0,0 +1,37 @@+import { expect, test } from '@playwright/test';++import { clearChatComposer, composerText, replaceChatComposerText } from '../helpers/chat-composer';++// Exercise the keyboard helper in Chromium with restored text in both surfaces.+// The product specs below use the same helper against the shipped composer.+test.describe('Composer draft isolation helper', () => {+ for (const surface of ['textarea', 'contenteditable'] as const) {+ test(`replaces a restored ${surface} draft and a second prompt`, async ({ page }) => {+ await page.setContent(+ surface === 'textarea'+ ? '<textarea data-testid="composer">draft from the previous test</textarea>'+ : '<div contenteditable="true" data-testid="composer">draft from the previous test</div>'+ );+ const input = page.getByTestId('composer');+ expect(await composerText(input)).toBe('draft from the previous test');++ await replaceChatComposerText(input, 'first prompt');+ expect(await composerText(input)).toBe('first prompt');+ await replaceChatComposerText(input, 'second prompt');+ expect(await composerText(input)).toBe('second prompt');++ await clearChatComposer(input);+ expect(await composerText(input)).toBe('');+ });+ }++ test('clears a multiline restored draft before an empty prompt', async ({ page }) => {+ await page.setContent(+ '<div contenteditable="true" data-testid="composer"><p>old</p><p>draft</p></div>'+ );+ const input = page.getByTestId('composer');+ await replaceChatComposerText(input, '');+ expect(await composerText(input)).toBe('');+ await expect(input).toBeFocused();+ });+});diff --git a/app/test/playwright/specs/chat-composer-primary-slot.spec.ts b/app/test/playwright/specs/chat-composer-primary-slot.spec.tsindex 566946f570..38963983c7 100644--- a/app/test/playwright/specs/chat-composer-primary-slot.spec.ts+++ b/app/test/playwright/specs/chat-composer-primary-slot.spec.ts@@ -40,6 +40,7 @@*/import { expect, type Locator, type Page, test } from '@playwright/test';+import { clearChatComposer } from '../helpers/chat-composer';import { bootAuthenticatedPage, dismissWalkthroughIfPresent } from '../helpers/core-rpc';const MOCK_ADMIN_BASE = `http://127.0.0.1:${process.env.E2E_MOCK_PORT || '18473'}`;@@ -81,6 +82,7 @@ async function openChat(page: Page): Promise<void> {await bootAuthenticatedPage(page, USER_ID, '/chat');await dismissWalkthroughIfPresent(page);await expect(page.getByTestId('chat-message-input')).toBeVisible({ timeout: 30_000 });+ await clearChatComposer(composer(page));}const composer = (page: Page): Locator => page.getByTestId('chat-message-input');@@ -95,9 +97,7 @@ async function typeIntoComposer(page: Page, text: string): Promise<void> {}async function clearComposer(page: Page): Promise<void> {- await composer(page).click();- await page.keyboard.press('ControlOrMeta+a');- await page.keyboard.press('Backspace');+ await clearChatComposer(composer(page));}async function beginStreamingTurn(page: Page, prompt: string): Promise<void> {diff --git a/app/test/playwright/specs/japanese-locale.spec.ts b/app/test/playwright/specs/japanese-locale.spec.tsnew file mode 100644index 0000000000..26d744a77c--- /dev/null+++ b/app/test/playwright/specs/japanese-locale.spec.ts@@ -0,0 +1,2 @@+// The shared browser E2E suite lives beside the desktop flows.+import '../../e2e/specs/japanese-locale.browser';diff --git a/app/test/playwright/specs/logout-relogin-onboarding.spec.ts b/app/test/playwright/specs/logout-relogin-onboarding.spec.tsindex 9292fc35e6..854115cb95 100644--- a/app/test/playwright/specs/logout-relogin-onboarding.spec.ts+++ b/app/test/playwright/specs/logout-relogin-onboarding.spec.ts@@ -1,11 +1,6 @@import { expect, type Page, test } from '@playwright/test';-import {- bootRuntimeReadyGuestPage,- callCoreRpc,- dismissWalkthroughIfPresent,- waitForAppReady,-} from '../helpers/core-rpc';+import { bootRuntimeReadyGuestPage, callCoreRpc, waitForAppReady } from '../helpers/core-rpc';const MOCK_ADMIN_BASE = `http://127.0.0.1:${process.env.E2E_MOCK_PORT || '18473'}`;@@ -17,18 +12,27 @@ async function resetMock(): Promise<void> {});}-async function clickOnboardingNext(page: Page): Promise<void> {- await page.getByTestId('onboarding-next-button').click();+async function readOnboardingCompleted(): Promise<boolean> {+ const completed = await callCoreRpc<boolean | { result?: boolean }>(+ 'openhuman.config_get_onboarding_completed',+ {}+ );+ const value = typeof completed === 'boolean' ? completed : completed?.result;+ // Require a real boolean so a response-shape change fails loudly instead of+ // being read as "not completed".+ expect(typeof value).toBe('boolean');+ return value as boolean;}-async function waitForOnboardingRoute(page: Page): Promise<void> {- await expect- .poll(async () => page.evaluate(() => window.location.hash))- .toMatch(/^#\/onboarding\/welcome/);- await expect(page.getByTestId('onboarding-layout')).toBeVisible();-}--async function signInToOnboarding(page: Page, userId: string): Promise<void> {+/**+ * Store a real (non-local) TinyHumans session with `onboarding_completed=false`+ * and open the onboarding entry route.+ *+ * `/onboarding/welcome` no longer renders anything interactive: for a real+ * session it marks onboarding complete and routes to `/chat`, so there is no+ * onboarding screen to wait for. Callers assert the landing instead.+ */+async function signInThroughOnboarding(page: Page, userId: string): Promise<void> {const payload = Buffer.from(JSON.stringify({ sub: userId, userId, exp: Math.floor(Date.now() / 1000) + 3600 })).toString('base64url');@@ -37,27 +41,15 @@ async function signInToOnboarding(page: Page, userId: string): Promise<void> {await callCoreRpc('openhuman.config_set_onboarding_completed', { value: false });await page.goto('/#/onboarding/welcome');await waitForAppReady(page);- await waitForOnboardingRoute(page);}-async function completeCloudOnboarding(page: Page): Promise<void> {- await expect(page.getByTestId('onboarding-welcome-step')).toBeVisible();- await clickOnboardingNext(page);- await expect(page.getByTestId('onboarding-runtime-choice-step')).toBeVisible();- await page.getByTestId('onboarding-runtime-choice-cloud').click();- await clickOnboardingNext(page);- const reachedHome = await expect- .poll(async () => page.evaluate(() => window.location.hash), { timeout: 15_000 })- .toMatch(/^#\/(home|chat)/)- .then(- () => true,- () => false- );- if (!reachedHome) {- await callCoreRpc('openhuman.config_set_onboarding_completed', { value: true });- await page.goto('/#/home');- await waitForAppReady(page);- }+async function expectLandedInChat(page: Page): Promise<void> {+ await expect+ .poll(async () => page.evaluate(() => window.location.hash), { timeout: 20_000 })+ .toMatch(/^#\/chat/);+ await expect.poll(readOnboardingCompleted, { timeout: 20_000 }).toBe(true);+ // Nothing of the onboarding stepper may linger once the user is in the app.+ await expect(page.getByTestId('onboarding-layout')).toHaveCount(0);}async function logoutViaSettings(page: Page): Promise<void> {@@ -87,22 +79,26 @@ test.describe('Logout -> re-login onboarding overlay', () => {await bootRuntimeReadyGuestPage(page);});- test('re-login after logout returns to the first onboarding step with clean state', async ({+ test('re-login after logout re-runs onboarding from clean state and lands in chat', async ({page,}) => {- await signInToOnboarding(page, 'pw-logout-relogin-user');- await completeCloudOnboarding(page);+ // First login: onboarding resolves on its own for a TinyHumans session.+ await signInThroughOnboarding(page, 'pw-logout-relogin-user');+ await expectLandedInChat(page);++ // Logout drops the session and shows the signed-out Welcome screen, not a+ // stale onboarding or chat surface.await logoutViaSettings(page);+ await expect(page.getByTestId('welcome-cta-tinyhumans')).toBeVisible({ timeout: 20_000 });+ await expect(page.getByTestId('onboarding-layout')).toHaveCount(0);+ // Re-login with onboarding reset: the flow must run again from the start+ // (not be skipped by leftover state from the first session, and not wedge+ // on a screen) and end in chat with the flag set again.await callCoreRpc('openhuman.config_set_onboarding_completed', { value: false });+ expect(await readOnboardingCompleted()).toBe(false);- await signInToOnboarding(page, 'pw-logout-relogin-user');-- await expect(page.getByTestId('onboarding-welcome-step')).toBeVisible();- await expect(page.getByText("Hi. I'm OpenHuman.")).toBeVisible();- await expect(page.getByRole('button', { name: 'Get Started' })).toBeVisible();- await expect- .poll(async () => page.evaluate(() => window.location.hash))- .toMatch(/^#\/onboarding\/welcome/);+ await signInThroughOnboarding(page, 'pw-logout-relogin-user');+ await expectLandedInChat(page);});});diff --git a/app/test/playwright/specs/memory-v2.spec.ts b/app/test/playwright/specs/memory-v2.spec.tsindex 7cac9c8ed8..0ccc7ef087 100644--- a/app/test/playwright/specs/memory-v2.spec.ts+++ b/app/test/playwright/specs/memory-v2.spec.ts@@ -2,6 +2,8 @@ import { expect, type Page, type Request, type Route, test } from '@playwright/timport {bootAuthenticatedPage,+ bootRuntimeReadyGuestPage,+ callCoreRpc,dismissWalkthroughIfPresent,waitForAppReady,} from '../helpers/core-rpc';@@ -58,8 +60,27 @@ interface FakeOptions {engineOn: boolean;/** `memory_import_scan` finds v1 data to import. */importFound?: boolean;+ /** An earlier import stopped with this error (e.g. credits ran out) after 7 of 20 items. */+ importStoppedWith?: string;+ /**+ * Methods (without `openhuman.`) answered with a JSON-RPC error instead,+ * shaped like the core's memory error (`data.code` / `data.kind`).+ */+ failWith?: Record<string, RpcFailure>;}+interface RpcFailure {+ code: string;+ message: string;+}++/** The core's refusal for an exhausted credit balance (memory/error.rs). */+const OUT_OF_CREDITS: RpcFailure = {+ code: 'INSUFFICIENT_CREDITS',+ message:+ 'insufficient credits: [USER_INSUFFICIENT_CREDITS] memory API recall: the account has insufficient credits (HTTP 402)',+};+interface RpcCall {method: string;params: Record<string, unknown>;@@ -95,7 +116,9 @@ async function installMemoryFake(page: Page, opts: FakeOptions): Promise<MemoryF];const sources: Array<Record<string, unknown>> = [];let nextId = 1;- let importState = { phase: 'idle', imported: 0, total: 0, error: null as string | null };+ let importState = opts.importStoppedWith+ ? { phase: 'error', imported: 7, total: 20, error: opts.importStoppedWith as string | null }+ : { phase: 'idle', imported: 0, total: 0, error: null as string | null };const policy = {log_conversations: true,@@ -135,9 +158,12 @@ async function installMemoryFake(page: Page, opts: FakeOptions): Promise<MemoryFcase 'memory_engine_get':return engineState();case 'memory_engine_set':+ // Echo what was set, so the tab marks the option it maps to as active+ // (a loopback endpoint is Self-host, none is the API-key option).return {engine: params.engine,- has_key: false,+ ...(params.endpoint ? { endpoint: params.endpoint } : {}),+ has_key: Boolean(params.api_key),status: 'ok',fetch_modes: ['keyword', 'vector'],};@@ -263,7 +289,8 @@ async function installMemoryFake(page: Page, opts: FakeOptions): Promise<MemoryF? { found: true, counts: { documents: 12, conversations: 3, learnings: 5 } }: { found: false, counts: null };case 'memory_import_start':- importState = { phase: 'running', imported: 0, total: 20, error: null };+ // A restart resumes from the persisted progress.+ importState = { phase: 'running', imported: importState.imported, total: 20, error: null };return { state: importState };case 'memory_import_status': {const current = importState;@@ -294,6 +321,24 @@ async function installMemoryFake(page: Page, opts: FakeOptions): Promise<MemoryF}const method = full.slice('openhuman.'.length);const params = body.params ?? {};+ const failure = opts.failWith?.[method];+ if (failure) {+ calls.push({ method, params });+ await route.fulfill({+ status: 200,+ contentType: 'application/json',+ body: JSON.stringify({+ jsonrpc: '2.0',+ id: body.id,+ error: {+ code: -32000,+ message: failure.message,+ data: { code: failure.code, kind: failure.code },+ },+ }),+ });+ return;+ }const result = handle(method, params);if (result === undefined) {// Not part of the v2 surface: let the real core answer it.@@ -315,8 +360,15 @@ async function installMemoryFake(page: Page, opts: FakeOptions): Promise<MemoryF}async function openMemory(page: Page, query = '') {- await page.goto(`${MEMORY_URL}${query}`);+ const url = `${MEMORY_URL}${query}`;+ await page.goto(url);await waitForAppReady(page);+ // The shell can restore its persisted chat route once it is ready (the race+ // bootAuthenticatedPage also handles); reapply the Memory route if it did.+ if (!(await page.evaluate(() => window.location.hash)).startsWith('#/connections')) {+ await page.goto(url);+ await waitForAppReady(page);+ }await dismissWalkthroughIfPresent(page);await expect(page.getByTestId('memory-page')).toBeVisible({ timeout: 30_000 });}@@ -337,13 +389,14 @@ test.describe('Memory v2 — engine active', () => {});await expect(page.getByTestId('memory-ask-tab')).toBeVisible();- // Engine chip lists both engines from memory_engines_list.+ // Engine chip: the three CortexDB options, Built-in (tinyhumans) active.await page.getByTestId('brain-tab-engine').click();await expect.poll(() => hash(page)).toContain('brain=engine');await expect(page.getByTestId('memory-engines')).toBeVisible();- await expect(page.getByTestId('memory-engine-tinyhumans')).toBeVisible();- await expect(page.getByTestId('memory-engine-cortexdb')).toBeVisible();- await expect(page.getByTestId('memory-engine-tinyhumans-active')).toBeVisible();+ await expect(page.getByTestId('memory-engine-builtin')).toBeVisible();+ await expect(page.getByTestId('memory-engine-apikey')).toBeVisible();+ await expect(page.getByTestId('memory-engine-selfhost')).toBeVisible();+ await expect(page.getByTestId('memory-engine-builtin-active')).toBeVisible();// 2. Ask: the recall answer and its citation render.await page.getByTestId('brain-tab-ask').click();@@ -433,6 +486,41 @@ test.describe('Memory v2 — engine active', () => {await expect(page.getByTestId('memory-import-done')).toBeVisible({ timeout: 15_000 });});+ test('a stopped import resumes only after consent', async ({ page }) => {+ const stopped =+ 'not enough credits to import your memory; top up, then resume the import to continue where it stopped';+ const fake = await installMemoryFake(page, {+ engineOn: true,+ importFound: true,+ importStoppedWith: stopped,+ });+ await bootAuthenticatedPage(page, 'pw-memory-v2-import-resume');+ await openMemory(page, '&brain=ask');++ // The stopped import shows its reason and a Resume control, not the fresh offer.+ const failed = page.getByTestId('memory-import-error');+ await expect(failed).toBeVisible({ timeout: 20_000 });+ await expect(failed).toContainText('not enough credits');+ await expect(page.getByTestId('memory-import-open')).toHaveCount(0);++ // Resume asks again; nothing restarts until the user confirms.+ await page.getByTestId('memory-import-resume').click();+ const consent = page.getByTestId('memory-import-consent');+ await expect(consent).toBeVisible();+ expect(fake.paramsOf('memory_import_start')).toEqual([]);++ await page.getByTestId('memory-import-confirm').click();+ await expect(consent).toBeHidden();+ expect(fake.paramsOf('memory_import_start')).toEqual([{ consent: true }]);++ // It picks up from the stored progress and finishes.+ await expect(+ page.getByTestId('memory-import-running').or(page.getByTestId('memory-import-done'))+ ).toBeVisible();+ await expect(page.getByTestId('memory-import-done')).toBeVisible({ timeout: 15_000 });+ await expect(page.getByTestId('memory-import-resume')).toHaveCount(0);+ });+test('legacy Brain and settings links land on their v2 chips', async ({ page }) => {await installMemoryFake(page, { engineOn: true });await bootAuthenticatedPage(page, 'pw-memory-v2-legacy');@@ -480,3 +568,164 @@ test.describe('Memory v2 — memory off', () => {expect(fake.paramsOf('memory_sources_list')).toEqual([]);});});++/**+ * A session token as the core stores it. The `local` signature marks the+ * offline "Set it up myself" session (`isLocalSessionToken`), which has no+ * TinyHumans account, so Built-in memory must not be selectable for it.+ */+function sessionToken(userId: string, signature: string): string {+ const payload = Buffer.from(+ JSON.stringify({ sub: userId, userId, exp: Math.floor(Date.now() / 1000) + 3600 })+ ).toString('base64url');+ return `eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.${payload}.${signature}`;+}++test.describe('Memory v2 — Engine tab connect flows', () => {+ test('Built-in connects with one click when signed in', async ({ page }) => {+ const fake = await installMemoryFake(page, { engineOn: false });+ await bootAuthenticatedPage(page, 'pw-memory-engine-builtin');+ // Stay on Engine: with no `?brain=` the page moves to Ask once memory is on.+ await openMemory(page, '&brain=engine');++ // Nothing connected: Built-in is open and selectable.+ const use = page.getByTestId('memory-engine-builtin-use');+ await expect(use).toBeEnabled({ timeout: 20_000 });+ await use.click();+ await expect.poll(() => fake.paramsOf('memory_engine_set')).toEqual([{ engine: 'tinyhumans' }]);+ await expect(page.getByTestId('memory-engine-builtin-active')).toHaveText('Active');+ });++ test('API key connects CortexDB cloud with only a key', async ({ page }) => {+ const fake = await installMemoryFake(page, { engineOn: false });+ await bootAuthenticatedPage(page, 'pw-memory-engine-apikey');+ // Stay on Engine: with no `?brain=` the page moves to Ask once memory is on.+ await openMemory(page, '&brain=engine');++ await page.getByTestId('memory-engine-apikey-trigger').click();+ await expect(page.getByTestId('memory-engine-apikey-trigger')).toContainText(+ 'https://api-v1.cortexdb.ai'+ );+ const submit = page.getByTestId('memory-engine-apikey-submit');+ await expect(submit).toBeDisabled(); // a key is required+ await page.getByTestId('memory-engine-apikey-key').fill('pw-cortex-key');+ await submit.click();+ // A blank endpoint clears any custom one, so the managed API is used.+ await expect+ .poll(() => fake.paramsOf('memory_engine_set'))+ .toEqual([{ engine: 'cortexdb', endpoint: '', api_key: 'pw-cortex-key' }]);+ await expect(page.getByTestId('memory-engine-apikey-active')).toHaveText('Active');+ });++ test('Self-host refuses a non-local endpoint and connects a local one', async ({ page }) => {+ const fake = await installMemoryFake(page, { engineOn: false });+ await bootAuthenticatedPage(page, 'pw-memory-engine-selfhost');+ // Stay on Engine: with no `?brain=` the page moves to Ask once memory is on.+ await openMemory(page, '&brain=engine');++ await page.getByTestId('memory-engine-selfhost-trigger').click();+ await expect(page.getByTestId('memory-engine-selfhost-docs')).toBeVisible();+ await page.getByTestId('memory-engine-selfhost-key').fill('pw-local-key');++ // Not on this computer: refused before any RPC.+ await page.getByTestId('memory-engine-selfhost-endpoint').fill('http://192.168.1.10:3141');+ await expect(page.getByTestId('memory-engine-selfhost-endpoint-error')).toContainText(+ 'Self-hosting is local only'+ );+ await expect(page.getByTestId('memory-engine-selfhost-submit')).toBeDisabled();+ expect(fake.paramsOf('memory_engine_set')).toEqual([]);++ // Loopback: accepted and sent with the key.+ await page.getByTestId('memory-engine-selfhost-endpoint').fill('http://localhost:3141');+ await expect(page.getByTestId('memory-engine-selfhost-endpoint-error')).toHaveCount(0);+ await page.getByTestId('memory-engine-selfhost-submit').click();+ await expect+ .poll(() => fake.paramsOf('memory_engine_set'))+ .toEqual([+ { engine: 'cortexdb', endpoint: 'http://localhost:3141', api_key: 'pw-local-key' },+ ]);+ await expect(page.getByTestId('memory-engine-selfhost-active')).toHaveText('Active');+ });++ test('Built-in is not selectable without a TinyHumans account', async ({ page }) => {+ const fake = await installMemoryFake(page, { engineOn: false });+ // A "Set it up myself" (local) session that finished onboarding.+ await bootRuntimeReadyGuestPage(page);+ // The core requires the local user payload, as Welcome's "Set it up+ // myself" stores it (utils/localSession.ts LOCAL_SESSION_USER).+ await callCoreRpc('openhuman.auth_store_session', {+ token: sessionToken('local', 'local'),+ user: { _id: 'local', id: 'local', name: 'Local User', email: '[email protected]' },+ });+ await callCoreRpc('openhuman.config_set_onboarding_completed', { value: true });+ await page.goto(`${MEMORY_URL}&brain=engine`);+ await page.reload();+ await waitForAppReady(page);+ // The shell restores its persisted chat route once ready; reapply the+ // Memory route afterwards, as bootAuthenticatedPage does.+ await page.goto(`${MEMORY_URL}&brain=engine`);+ await waitForAppReady(page);+ await dismissWalkthroughIfPresent(page);+ await expect(page.getByTestId('memory-page')).toBeVisible({ timeout: 30_000 });++ await expect(page.getByTestId('memory-engine-builtin-trigger')).toContainText(+ 'Sign in to use',+ { timeout: 20_000 }+ );+ await expect(page.getByTestId('memory-engine-builtin-sign-in')).toBeVisible();+ await expect(page.getByTestId('memory-engine-builtin-use')).toBeDisabled();+ expect(fake.paramsOf('memory_engine_set')).toEqual([]);+ });+});++test.describe('Memory v2 — out of credits', () => {+ test('a recall out of credits prompts a top-up that lands on billing', async ({ page }) => {+ const fake = await installMemoryFake(page, {+ engineOn: true,+ failWith: { memory_recall: OUT_OF_CREDITS },+ });+ await bootAuthenticatedPage(page, 'pw-memory-v2-credits-ask');+ await openMemory(page);++ await page.getByTestId('brain-tab-ask').click();+ await page.getByTestId('memory-ask-input').fill('When does Atlas migrate?');+ await page.getByTestId('memory-ask-submit').click();++ // A prompt, not an error: warning variant, the top-up explanation, no raw 402.+ const prompt = page.getByTestId('memory-ask-error');+ await expect(prompt).toHaveAttribute('data-kind', 'out-of-credits', { timeout: 20_000 });+ await expect(prompt).toHaveAttribute('data-variant', 'warning');+ await expect(prompt).toContainText('Out of credits');+ await expect(prompt).toContainText('nothing stored has been lost');+ await expect(prompt).not.toContainText('HTTP 402');+ expect(fake.paramsOf('memory_recall')).toEqual([{ question: 'When does Atlas migrate?' }]);++ // Top up goes to the billing page.+ await page.getByTestId('memory-top-up').click();+ await expect.poll(() => hash(page)).toContain('#/settings/account');+ });++ test('the Explorer keeps Try again beside Top up', async ({ page }) => {+ const fake = await installMemoryFake(page, {+ engineOn: true,+ failWith: { memory_explore: OUT_OF_CREDITS },+ });+ await bootAuthenticatedPage(page, 'pw-memory-v2-credits-explorer');+ await openMemory(page, '&brain=explorer');++ const prompt = page.getByTestId('memory-explorer-error');+ await expect(prompt).toHaveAttribute('data-kind', 'out-of-credits', { timeout: 20_000 });+ await expect(prompt.getByTestId('memory-top-up')).toBeVisible();+ const retry = prompt.getByRole('button', { name: 'Try again' });+ await expect(retry).toBeVisible();++ // Try again re-runs the load (it fails again here: still out of credits).+ const before = fake.paramsOf('memory_explore').length;+ await retry.click();+ await expect.poll(() => fake.paramsOf('memory_explore').length).toBeGreaterThan(before);+ await expect(page.getByTestId('memory-explorer-error')).toHaveAttribute(+ 'data-kind',+ 'out-of-credits'+ );+ });+});diff --git a/app/test/playwright/specs/onboarding-config-functional.spec.ts b/app/test/playwright/specs/onboarding-config-functional.spec.tsindex fc206572d7..c7883e301c 100644--- a/app/test/playwright/specs/onboarding-config-functional.spec.ts+++ b/app/test/playwright/specs/onboarding-config-functional.spec.ts@@ -17,17 +17,8 @@ async function resetOnboarding(userId: string): Promise<void> {});}-async function chooseConfigure(page: Page): Promise<void> {- const configure = page.getByRole('button', { name: /Configure/ }).first();- if (await configure.isVisible().catch(() => false)) {- await configure.click();- }-}-test.describe('Onboarding custom configuration flow', () => {- test('advanced path supports configure choices and back navigation through final setup', async ({- page,- }) => {+ test('advanced path supports back navigation through final setup', async ({ page }) => {await resetOnboarding('pw-onboarding-config');await seedBrowserCoreMode(page);await page.goto('/#/onboarding/welcome');@@ -41,36 +32,20 @@ test.describe('Onboarding custom configuration flow', () => {await page.getByTestId('onboarding-next-button').click();await expect(page.getByTestId('onboarding-custom-inference-step')).toBeVisible();- await chooseConfigure(page);await page.getByTestId('onboarding-next-button').click();- await expect(page.getByTestId('onboarding-custom-voice-step')).toBeVisible();- await chooseConfigure(page);+ await expect(page.getByTestId('onboarding-custom-search-step')).toBeVisible();await page.getByRole('button', { name: /Back/ }).click();await expect(page.getByTestId('onboarding-custom-inference-step')).toBeVisible();await page.getByTestId('onboarding-next-button').click();- for (const id of [- 'onboarding-custom-voice-step',- 'onboarding-custom-oauth-step',- 'onboarding-custom-search-step',- 'onboarding-custom-embeddings-step',- ]) {- await expect(page.getByTestId(id)).toBeVisible({ timeout: 20_000 });- const configure = page.getByRole('button', { name: /Configure/ });- if (- await configure- .first()- .isVisible()- .catch(() => false)- ) {- await configure.first().click();- }- await page.getByTestId('onboarding-next-button').click();- }+ await expect(page.getByTestId('onboarding-custom-search-step')).toBeVisible({+ timeout: 20_000,+ });+ // Search is optional: skipping goes straight to the final step.+ await page.getByTestId('onboarding-search-skip').click();await expect(page.getByTestId('onboarding-custom-vault-step')).toBeVisible({ timeout: 20_000 });- await chooseConfigure(page);await expect(page.getByTestId('onboarding-next-button')).toBeEnabled();});});diff --git a/app/test/playwright/specs/onboarding-modes.spec.ts b/app/test/playwright/specs/onboarding-modes.spec.tsindex 8eb04deab4..124133aac1 100644--- a/app/test/playwright/specs/onboarding-modes.spec.ts+++ b/app/test/playwright/specs/onboarding-modes.spec.ts@@ -93,7 +93,7 @@ test.describe('Onboarding modes', () => {await expectOnboardingCompleted();});- test('advanced custom path walks every custom wizard step and finishes on home', async ({+ test('advanced custom path walks the three custom wizard steps and finishes on home', async ({page,}) => {await bootIntoOnboarding(page, 'pw-onboarding-custom');@@ -108,29 +108,17 @@ test.describe('Onboarding modes', () => {expect(await clickTestId(page, 'onboarding-next-button')).toBe(true);await expect(page.getByTestId('onboarding-custom-inference-step')).toBeVisible();- expect(await clickTestId(page, 'onboarding-custom-inference-step-default')).toBe(true);- expect(await clickTestId(page, 'onboarding-next-button')).toBe(true);-- await expect(page.getByTestId('onboarding-custom-voice-step')).toBeVisible();- expect(await clickTestId(page, 'onboarding-custom-voice-step-default')).toBe(true);- expect(await clickTestId(page, 'onboarding-next-button')).toBe(true);-- await expect(page.getByTestId('onboarding-custom-oauth-step')).toBeVisible();- expect(await clickTestId(page, 'onboarding-custom-oauth-step-default')).toBe(true);expect(await clickTestId(page, 'onboarding-next-button')).toBe(true);await expect(page.getByTestId('onboarding-custom-search-step')).toBeVisible();- expect(await clickTestId(page, 'onboarding-custom-search-step-default')).toBe(true);expect(await clickTestId(page, 'onboarding-next-button')).toBe(true);- const embeddingsVisible = await page- .getByTestId('onboarding-custom-embeddings-step')- .isVisible()- .catch(() => false);- if (embeddingsVisible) {- expect(await clickTestId(page, 'onboarding-custom-embeddings-step-default')).toBe(true);- expect(await clickTestId(page, 'onboarding-next-button')).toBe(true);+ await expect(page.getByTestId('onboarding-custom-vault-step')).toBeVisible();+ // Voice, OAuth and embeddings are no longer wizard steps.+ for (const retired of ['voice', 'oauth', 'embeddings']) {+ await expect(page.getByTestId(`onboarding-custom-${retired}-step`)).toHaveCount(0);}+ expect(await clickTestId(page, 'onboarding-next-button')).toBe(true);await ensureHomeOrForceComplete(page);await expectOnboardingCompleted();diff --git a/app/test/playwright/specs/onboarding-required-step-gate.spec.ts b/app/test/playwright/specs/onboarding-required-step-gate.spec.tsindex 7706498467..30908ec8c1 100644--- a/app/test/playwright/specs/onboarding-required-step-gate.spec.ts+++ b/app/test/playwright/specs/onboarding-required-step-gate.spec.ts@@ -1,39 +1,35 @@import { expect, type Page, test } from '@playwright/test';-import { bootAuthenticatedPage, callCoreRpc, waitForAppReady } from '../helpers/core-rpc';+import { bootRuntimeReadyGuestPage, callCoreRpc, waitForAppReady } from '../helpers/core-rpc';/**- * The runtime-choice step: what it actually guarantees.+ * Onboarding cannot be bypassed while `onboarding_completed` is false.*- * This spec started from the wrong premise and the browser corrected it, which- * is worth recording. `RuntimeChoiceStep.tsx:161` reads- * `disabled={selected === null}`, so the step looks like a required-choice gate- * with no coverage. It is not one: `:101` is- * `useState<AiMode | null>('cloud')`, so **cloud is pre-selected on arrival**- * and `selected` is never null through the UI. The `disabled` prop and the- * `onClick={() => selected && onNext(selected)}` guard beside it are both dead- * defensive code.+ * This file used to pin the `/onboarding/runtime-choice` step (cloud+ * pre-selected, Continue enabled, options mutually exclusive). That step is+ * gone: the identity question is asked once on the Welcome screen, and+ * `/onboarding/welcome` now only routes. What the old spec was really+ * protecting is that the app-shell onboarding gate (`App.tsx`,+ * `[onboarding-gate]`) holds a user in onboarding until it is genuinely done,+ * and that the required steps are passed through rather than skipped. That is+ * what is asserted here:*- * The first run of this file asserted `toBeDisabled()` and failed with- * `locator resolved to <button … aria-label="Continue with Simple"> unexpected- * value "enabled"`. Those two tests were removed rather than reframed — a gate- * that cannot engage is not a contract worth pinning, and asserting the dead- * branch would have been a test that could never fail for the reason it named.+ * - local session: every in-app route bounces to the first of the three+ * custom steps, the steps run inference -> search -> vault in order, and+ * `onboarding_completed` stays false until the last one is finished.+ * - TinyHumans session: nothing is left to configure, so the gate resolves+ * itself (welcome marks onboarding complete and routes to chat) instead of+ * leaving the user on a dead screen.+ * - the retired runtime-choice route cannot be reached.*- * What IS worth pinning, and is covered here: the step is immediately- * actionable (a user can continue without hunting for a selection), the- * Continue label names the choice they are about to commit to, and the two- * options are mutually exclusive. `onboarding-modes.spec.ts` walks both happy- * paths and `onboarding-config-functional.spec.ts` covers back navigation;- * neither asserts any of the above.+ * `onboarding-modes.spec.ts` walks the happy paths through to completion.*/const MOCK_ADMIN_BASE = `http://127.0.0.1:${process.env.E2E_MOCK_PORT || '18473'}`;async function resetMock(): Promise<void> {// Deliberately NOT swallowed. A failed reset leaves shared mock state from a- // previous test, and onboarding then runs against a fixture nobody chose —- // which surfaces as an unrelated assertion failure further down.+ // previous test, which surfaces as an unrelated assertion failure later.const response = await fetch(`${MOCK_ADMIN_BASE}/__admin/reset`, {method: 'POST',headers: { 'Content-Type': 'application/json' },@@ -44,107 +40,131 @@ async function resetMock(): Promise<void> {}}-async function bootIntoOnboarding(page: Page, userId: string): Promise<void> {+const hash = (page: Page) => page.evaluate(() => window.location.hash);++function sessionToken(userId: string, signature: string): string {+ const payload = Buffer.from(+ JSON.stringify({ sub: userId, userId, exp: Math.floor(Date.now() / 1000) + 3600 })+ ).toString('base64url');+ return `eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.${payload}.${signature}`;+}++/**+ * Store a session, reset `onboarding_completed=false` and reload the app so its+ * core snapshot reflects both. The "local" signature is what marks the offline+ * "Set it up myself" session (`isLocalSessionToken`); any other is TinyHumans.+ */+async function bootWithSession(+ page: Page,+ userId: string,+ kind: 'local' | 'tinyhumans',+ startHash: string+): Promise<void> {await resetMock();- await bootAuthenticatedPage(page, userId, '/home');+ await bootRuntimeReadyGuestPage(page);+ await callCoreRpc('openhuman.auth_store_session', {+ token: sessionToken(userId, kind === 'local' ? 'local' : 'sig'),+ });await callCoreRpc('openhuman.config_set_onboarding_completed', { value: false });- await page.goto('/#/onboarding/welcome');+ await page.goto(`/#${startHash}`);+ await page.reload();await waitForAppReady(page);- await expect- .poll(async () => page.evaluate(() => window.location.hash), { timeout: 20_000 })- .toMatch(/^#\/onboarding/);}-async function reachRuntimeChoice(page: Page, userId: string): Promise<void> {- await bootIntoOnboarding(page, userId);- await expect(page.getByTestId('onboarding-welcome-step')).toBeVisible({ timeout: 20_000 });- await page.getByTestId('onboarding-next-button').click();- await expect(page.getByTestId('onboarding-runtime-choice-step')).toBeVisible({ timeout: 20_000 });+async function readOnboardingCompleted(): Promise<boolean> {+ const completed = await callCoreRpc<boolean | { result?: boolean }>(+ 'openhuman.config_get_onboarding_completed',+ {}+ );+ const value = typeof completed === 'boolean' ? completed : completed?.result;+ // `Boolean(completed?.result)` alone would turn a malformed response into+ // `false` and quietly satisfy a "still incomplete" assertion. Require a real+ // boolean so a shape change fails loudly.+ expect(typeof value).toBe('boolean');+ return value as boolean;}const nextButton = (page: Page) => page.getByTestId('onboarding-next-button');-test.describe('Onboarding — the runtime choice is a required step', () => {- test('arrives with cloud pre-selected and immediately actionable', async ({ page }) => {- // The default is what makes the step passable in one click. If it ever- // regressed to `null`, Continue would be permanently disabled and the flow- // would dead-end here — which is the failure the dead `disabled` prop was- // presumably written against.- await reachRuntimeChoice(page, 'pw-onboarding-default-cloud');-- await expect(page.getByTestId('onboarding-runtime-choice-cloud')).toHaveAttribute(- 'aria-pressed',- 'true'- );- await expect(nextButton(page)).toBeEnabled();- await expect(nextButton(page)).toContainText(/simple|cloud/i);+async function expectOnFirstCustomStep(page: Page): Promise<void> {+ await expect+ .poll(() => hash(page), { timeout: 20_000 })+ .toMatch(/^#\/onboarding\/custom\/inference/);+ await expect(page.getByTestId('onboarding-custom-inference-step')).toBeVisible({+ timeout: 20_000,});+}- test('re-selecting cloud keeps Continue enabled and named for it', async ({ page }) => {- await reachRuntimeChoice(page, 'pw-onboarding-gate-cloud');+test.describe('Onboarding — cannot be bypassed while incomplete', () => {+ for (const target of ['/chat', '/settings', '/human']) {+ test(`local session: ${target} bounces to the first custom step`, async ({ page }) => {+ await bootWithSession(page, 'pw-gate-local-bounce', 'local', target);- await page.getByTestId('onboarding-runtime-choice-cloud').click();+ await expectOnFirstCustomStep(page);+ expect(await readOnboardingCompleted()).toBe(false);+ });+ }- await expect(page.getByTestId('onboarding-runtime-choice-cloud')).toHaveAttribute(- 'aria-pressed',- 'true'- );- await expect(nextButton(page)).toBeEnabled();- await expect(nextButton(page)).toContainText(/simple|cloud/i);+ test('local session: the three custom steps run in order and do not complete onboarding early', async ({+ page,+ }) => {+ await bootWithSession(page, 'pw-gate-local-steps', 'local', '/onboarding/welcome');++ await expectOnFirstCustomStep(page);+ expect(await readOnboardingCompleted()).toBe(false);++ await nextButton(page).click();+ await expect(page.getByTestId('onboarding-custom-search-step')).toBeVisible({+ timeout: 20_000,+ });+ await expect(page.getByTestId('onboarding-custom-inference-step')).toHaveCount(0);+ expect(await readOnboardingCompleted()).toBe(false);++ await nextButton(page).click();+ await expect(page.getByTestId('onboarding-custom-vault-step')).toBeVisible({ timeout: 20_000 });+ // Still in onboarding on the final step, until it is finished.+ expect(await hash(page)).toMatch(/^#\/onboarding\/custom\/vault/);+ expect(await readOnboardingCompleted()).toBe(false);++ // Voice, OAuth and embeddings are retired as wizard steps.+ for (const retired of ['voice', 'oauth', 'embeddings']) {+ await expect(page.getByTestId(`onboarding-custom-${retired}-step`)).toHaveCount(0);+ }});- test('choosing custom enables Continue and names the other choice', async ({ page }) => {- await reachRuntimeChoice(page, 'pw-onboarding-gate-custom');+ test('local session: Back returns to the previous required step', async ({ page }) => {+ await bootWithSession(page, 'pw-gate-local-back', 'local', '/onboarding/welcome');- await page.getByTestId('onboarding-runtime-choice-custom').click();+ await expectOnFirstCustomStep(page);+ await nextButton(page).click();+ await expect(page.getByTestId('onboarding-custom-search-step')).toBeVisible({+ timeout: 20_000,+ });- await expect(page.getByTestId('onboarding-runtime-choice-custom')).toHaveAttribute(- 'aria-pressed',- 'true'- );- await expect(nextButton(page)).toBeEnabled();- await expect(nextButton(page)).toContainText(/custom/i);+ await page.getByRole('button', { name: /Back/ }).click();+ await expect(page.getByTestId('onboarding-custom-inference-step')).toBeVisible({+ timeout: 20_000,+ });+ expect(await readOnboardingCompleted()).toBe(false);});- test('the two runtime options are mutually exclusive', async ({ page }) => {- // Two options both reading `aria-pressed="true"` would leave the user- // unable to tell what they are about to configure.- await reachRuntimeChoice(page, 'pw-onboarding-gate-exclusive');-- await page.getByTestId('onboarding-runtime-choice-cloud').click();- await expect(page.getByTestId('onboarding-runtime-choice-cloud')).toHaveAttribute(- 'aria-pressed',- 'true'- );-- await page.getByTestId('onboarding-runtime-choice-custom').click();-- await expect(page.getByTestId('onboarding-runtime-choice-custom')).toHaveAttribute(- 'aria-pressed',- 'true'- );- await expect(page.getByTestId('onboarding-runtime-choice-cloud')).toHaveAttribute(- 'aria-pressed',- 'false'- );+ test('the retired runtime-choice route is unreachable and falls through to the gate', async ({+ page,+ }) => {+ await bootWithSession(page, 'pw-gate-retired-route', 'local', '/onboarding/runtime-choice');++ await expectOnFirstCustomStep(page);+ await expect(page.getByTestId('onboarding-runtime-choice-step')).toHaveCount(0);+ expect(await readOnboardingCompleted()).toBe(false);});- test('onboarding is not marked complete while the flow is still gated', async ({ page }) => {- // The gate is only meaningful if the user is genuinely still in onboarding.- // If `onboarding_completed` were already true, a reload would drop them- // into the app and the disabled button would be protecting nothing.- await reachRuntimeChoice(page, 'pw-onboarding-gate-incomplete');-- const completed = await callCoreRpc<boolean | { result?: boolean }>(- 'openhuman.config_get_onboarding_completed',- {}- );- // `Boolean(completed?.result)` alone would turn a malformed response — one- // with no `result` at all — into `false` and quietly satisfy the assertion.- // Require an actual boolean first, so a shape change fails loudly here- // instead of being read as "onboarding is incomplete".- const value = typeof completed === 'boolean' ? completed : completed?.result;- expect(typeof value).toBe('boolean');- expect(value).toBe(false);+ test('TinyHumans session: the gate resolves itself and lands in chat', async ({ page }) => {+ // Nothing is left to configure for a managed session, so a user held at the+ // gate must not be stranded on a screen that needs input.+ await bootWithSession(page, 'pw-gate-tinyhumans', 'tinyhumans', '/settings');++ await expect.poll(() => hash(page), { timeout: 20_000 }).toMatch(/^#\/chat/);+ await expect.poll(readOnboardingCompleted, { timeout: 20_000 }).toBe(true);+ await expect(page.getByTestId('onboarding-layout')).toHaveCount(0);});});diff --git a/app/test/playwright/specs/zz-onboarding-screens.spec.ts b/app/test/playwright/specs/zz-onboarding-screens.spec.tsnew file mode 100644index 0000000000..eb7417945a--- /dev/null+++ b/app/test/playwright/specs/zz-onboarding-screens.spec.ts@@ -0,0 +1,96 @@+/**+ * Screenshot capture of every onboarding screen, light and dark.+ *+ * Not an assertion suite — it walks the flow and writes a PNG per screen so a+ * human can eyeball the restyle. Named `zz-` so it runs last.+ */+import { type Page, test } from '@playwright/test';++import { bootAuthenticatedPage, callCoreRpc, waitForAppReady } from '../helpers/core-rpc';++/**+ * A local ("Continue Locally") session token: three segments whose last is+ * literally `local`. See app/src/utils/localSession.ts.+ *+ * The capture has to use one. An authenticated managed session now completes+ * onboarding on sight -- `WelcomePage` calls completeAndExit() and the gate+ * routes to /chat -- so the three self-hosted steps are only reachable from a+ * local session.+ */+function localSessionToken(): string {+ const enc = (o: object) =>+ Buffer.from(JSON.stringify(o)).toString('base64url').replace(/=+$/, '');+ const now = Math.floor(Date.now() / 1000);+ return [+ enc({ alg: 'none', typ: 'JWT' }),+ enc({ sub: 'local', user_id: 'local', iat: now, exp: now + 31536000 }),+ 'local',+ ].join('.');+}++const OUT = 'test-results/onboarding-screens';++async function bootIntoOnboarding(page: Page, userId: string): Promise<void> {+ await bootAuthenticatedPage(page, userId, '/home');+ await callCoreRpc('openhuman.config_set_onboarding_completed', { value: false });+ const token = localSessionToken();+ await page.evaluate(t => {+ window.localStorage.setItem('openhuman_session_token', t);+ }, token);+ await page.goto('/#/onboarding/custom/inference');+ await waitForAppReady(page);+}++async function go(page: Page, hash: string, stepTestId?: string): Promise<void> {+ await page.goto(`/#${hash}`);+ await waitForAppReady(page);+ if (stepTestId) {+ await page.getByTestId(stepTestId).waitFor({ state: 'visible', timeout: 30_000 });+ }+}++async function setTheme(page: Page, dark: boolean): Promise<void> {+ await page.evaluate(d => {+ document.documentElement.classList.toggle('dark', d);+ }, dark);+ await page.waitForTimeout(250);+}++async function shoot(page: Page, name: string): Promise<void> {+ await page.waitForTimeout(400);+ await page.screenshot({ path: `${OUT}/${name}.png`, fullPage: true });+}++test.describe('Onboarding screens', () => {+ test('captures every screen in light and dark', async ({ page }) => {+ test.setTimeout(180_000);+ await bootIntoOnboarding(page, 'screens-user');++ for (const dark of [false, true]) {+ const mode = dark ? 'dark' : 'light';++ await go(page, '/onboarding/custom/inference', 'onboarding-custom-inference-step');+ await setTheme(page, dark);+ await shoot(page, `01-inference-${mode}`);+ await shoot(page, `02-inference-detail-${mode}`);++ await go(page, '/onboarding/custom/search', 'onboarding-custom-search-step');+ await setTheme(page, dark);+ await shoot(page, `03-search-${mode}`);+ await shoot(page, `04-search-detail-${mode}`);++ await go(page, '/onboarding/custom/vault', 'onboarding-custom-vault-step');+ await setTheme(page, dark);+ await shoot(page, `05-vault-${mode}`);+ await shoot(page, `06-vault-detail-${mode}`);+ }++ // Narrow viewport — the p-10 -> p-6 sm:p-8 change targeted row wrapping.+ await page.setViewportSize({ width: 400, height: 900 });+ await go(page, '/onboarding/custom/inference', 'onboarding-custom-inference-step');+ await setTheme(page, false);+ await shoot(page, '07-inference-narrow-400px');+ await go(page, '/onboarding/custom/search', 'onboarding-custom-search-step');+ await shoot(page, '08-search-narrow-400px');+ });+});diff --git a/crates/openhuman-app/Cargo.lock b/crates/openhuman-app/Cargo.lockindex 6307a5eaa2..50fb9f77c0 100644--- a/crates/openhuman-app/Cargo.lock+++ b/crates/openhuman-app/Cargo.lock@@ -17,6 +17,15 @@ version = "2.0.1"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"+[[package]]+name = "adobe-cmap-parser"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ae8abfa9a4688de8fc9f42b3f013b6fffec18ed8a554f5f113577e0b9b3212a3"+dependencies = [+ "pom",+]+[[package]]name = "aead"version = "0.5.2"@@ -360,6 +369,16 @@ dependencies = ["system-deps",]+[[package]]+name = "atoi_simd"+version = "0.18.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f3cdb3708a128e559a30fb830e8a77a5022ee6902806925c216658652b452a44"+dependencies = [+ "debug_unsafe",+ "rustversion",+]+[[package]]name = "atomic-waker"version = "1.1.2"@@ -557,6 +576,15 @@ dependencies = ["hybrid-array",]+[[package]]+name = "block-padding"+version = "0.3.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93"+dependencies = [+ "generic-array",+]+[[package]]name = "block2"version = "0.5.1"@@ -667,6 +695,23 @@ dependencies = ["system-deps",]+[[package]]+name = "calamine"+version = "0.36.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5fa68281b1a76b54a62156474adb06bb380a67e07dd60656e3217152b42183f3"+dependencies = [+ "atoi_simd",+ "byteorder",+ "codepage",+ "encoding_rs",+ "fast-float2",+ "log",+ "quick-xml 0.41.0",+ "serde",+ "zip 8.6.0",+]+[[package]]name = "camino"version = "1.2.6"@@ -709,6 +754,15 @@ dependencies = ["toml 0.9.12+spec-1.1.0",]+[[package]]+name = "cbc"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6"+dependencies = [+ "cipher",+]+[[package]]name = "cc"version = "1.4.7"@@ -736,6 +790,12 @@ dependencies = ["uuid",]+[[package]]+name = "cff-parser"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c5810ca1a2b5870df2aab1c03e11c40c361ba51d6e3e361e56310f1cb3b4e087"+[[package]]name = "cfg-expr"version = "0.15.8"@@ -858,6 +918,15 @@ dependencies = ["objc",]+[[package]]+name = "codepage"+version = "0.1.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bdff162541cd8b79de82e2edcc7eff3a8c2a6dc3d75152636028f96d93de3b26"+dependencies = [+ "encoding_rs",+]+[[package]]name = "combine"version = "4.6.8"@@ -1051,6 +1120,12 @@ dependencies = ["libc",]+[[package]]+name = "core_detect"+version = "1.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7f8f80099a98041a3d1622845c271458a2d73e688351bf3cb999266764b81d48"+[[package]]name = "coreaudio-rs"version = "0.14.2"@@ -1310,6 +1385,12 @@ version = "0.3.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376"+[[package]]+name = "debug_unsafe"+version = "0.1.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7eed2c4702fa172d1ce21078faa7c5203e69f5394d48cc436d25928394a867a2"+[[package]]name = "debugid"version = "0.8.0"@@ -1626,6 +1707,15 @@ version = "1.0.20"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"+[[package]]+name = "ecb"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1a8bfa975b1aec2145850fcaa1c6fe269a16578c44705a532ae3edc92b8881c7"+dependencies = [+ "cipher",+]+[[package]]name = "either"version = "1.18.0"@@ -1668,6 +1758,20 @@ version = "1.2.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7"+[[package]]+name = "encoding_rs"+version = "0.8.42"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8e985e0451871ad22fb8d2b6b076e2028a502a0d3950998c2c5c0a4f9b5d9679"+dependencies = [+ "cfg-if",+ "core_detect",+ "multiversion_no_op",+ "rustversion",+ "scopeguard",+ "simdutf8",+]+[[package]]name = "endi"version = "1.1.1"@@ -1774,6 +1878,15 @@ version = "3.4.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "0b5343afd4a8365a643ac588dab4cf234a190c7f6c88c9f6dd6ffe00837661b7"+[[package]]+name = "euclid"+version = "0.20.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2bb7ef65b3777a325d1eeefefab5b6d4959da54747e33bd6258e789640f307ad"+dependencies = [+ "num-traits",+]+[[package]]name = "event-listener"version = "2.5.3"@@ -1812,6 +1925,12 @@ version = "0.1.9"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"+[[package]]+name = "fast-float2"+version = "0.2.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c6e8948ce679d00a02a94739ea185595dca7118ed04feb991127e443bd3d761f"+[[package]]name = "fastrand"version = "2.5.0"@@ -2900,6 +3019,7 @@ version = "0.1.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01"dependencies = [+ "block-padding","generic-array",]@@ -3394,6 +3514,33 @@ version = "0.4.34"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"+[[package]]+name = "lopdf"+version = "0.42.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "25aab26d99567469098e64a02f42679f8965c6401263eefa31d8f2dcc37a221c"+dependencies = [+ "aes",+ "bitflags 2.13.2",+ "cbc",+ "ecb",+ "encoding_rs",+ "flate2",+ "getrandom 0.4.3",+ "indexmap 2.14.2",+ "itoa",+ "log",+ "md-5",+ "nom 8.0.0",+ "rand 0.10.2",+ "rangemap",+ "sha2 0.10.9",+ "stringprep",+ "thiserror 2.0.20",+ "ttf-parser",+ "weezl",+]+[[package]]name = "lru-slab"version = "0.1.3"@@ -3470,6 +3617,16 @@ version = "0.8.4"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3"+[[package]]+name = "md-5"+version = "0.10.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"+dependencies = [+ "cfg-if",+ "digest 0.10.7",+]+[[package]]name = "memchr"version = "2.8.3"@@ -3584,6 +3741,12 @@ dependencies = ["windows-sys 0.60.2",]+[[package]]+name = "multiversion_no_op"+version = "1.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "743fb55ba31b18fb1ecef6bdc9aa2743314978ac084044301a7eee33fb99a20d"+[[package]]name = "native-tls"version = "0.2.18"@@ -4236,7 +4399,7 @@ dependencies = [[[package]]name = "openhuman"-version = "0.64.10"+version = "0.64.12"dependencies = ["aes-gcm","aho-corasick",@@ -4352,7 +4515,7 @@ dependencies = [[[package]]name = "openhuman-app"-version = "0.64.10"+version = "0.64.12"dependencies = ["anyhow","async-trait",@@ -4401,7 +4564,7 @@ dependencies = [[[package]]name = "openhuman-embed"-version = "0.64.10"+version = "0.64.12"dependencies = ["anyhow","async-trait",@@ -4422,7 +4585,7 @@ dependencies = [[[package]]name = "openhuman-rpc"-version = "0.64.10"+version = "0.64.12"dependencies = ["anyhow","axum",@@ -4451,7 +4614,7 @@ dependencies = [[[package]]name = "openhuman-tinyhumans"-version = "0.64.10"+version = "0.64.12"dependencies = ["aes-gcm","anyhow",@@ -4653,6 +4816,23 @@ dependencies = ["subtle",]+[[package]]+name = "pdf-extract"+version = "0.12.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e5c4820f5811e424ce037d08493ac87752ecc54339e0f1e40c3d17da93278861"+dependencies = [+ "adobe-cmap-parser",+ "cff-parser",+ "encoding_rs",+ "euclid",+ "log",+ "lopdf",+ "postscript",+ "type1-encoding-parser",+ "unicode-normalization",+]+[[package]]name = "percent-encoding"version = "2.3.2"@@ -4897,6 +5077,12 @@ dependencies = ["universal-hash",]+[[package]]+name = "pom"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "60f6ce597ecdcc9a098e7fddacb1065093a3d66446fa16c675e7e71d1b5c28e6"+[[package]]name = "portable-atomic"version = "1.15.0"@@ -4912,6 +5098,12 @@ dependencies = ["portable-atomic",]+[[package]]+name = "postscript"+version = "0.14.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "78451badbdaebaf17f053fd9152b3ffb33b516104eacb45e7864aaa9c712f306"+[[package]]name = "potential_utf"version = "0.1.6"@@ -5045,6 +5237,7 @@ version = "0.41.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1"dependencies = [+ "encoding_rs","memchr",]@@ -5231,6 +5424,12 @@ dependencies = ["rand_core 0.10.1",]+[[package]]+name = "rangemap"+version = "1.8.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a611d15b50743feb4c76b7d03edcb0e64f399c26961e4efe6975bc398be6aa3d"+[[package]]name = "raw-window-handle"version = "0.6.2"@@ -6421,6 +6620,17 @@ dependencies = ["quote",]+[[package]]+name = "stringprep"+version = "0.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7b4df3d392d81bd458a8a621b8bffbd2302a12ffe288a9d931670948749463b1"+dependencies = [+ "unicode-bidi",+ "unicode-normalization",+ "unicode-properties",+]+[[package]]name = "strsim"version = "0.11.1"@@ -7814,42 +8024,46 @@ dependencies = [[[package]]name = "tinymemory-api"-version = "1.23.1"+version = "1.23.4"dependencies = ["async-trait","chrono","serde","serde_json",- "sha2 0.10.9",+ "sha2 0.11.0","thiserror 2.0.20",][[package]]name = "tinymemory-integrations"-version = "1.23.1"+version = "1.23.4"dependencies = ["async-trait",+ "calamine","chrono","futures","log",+ "pdf-extract",+ "quick-xml 0.41.0","regex","reqwest 0.12.28","rusqlite","schemars 1.2.2","serde","serde_json",- "sha2 0.10.9",+ "sha2 0.11.0","thiserror 2.0.20","tinymemory-api","tinymemory-tools","tokio","tracing","walkdir",+ "zip 8.6.0",][[package]]name = "tinymemory-tools"-version = "1.23.1"+version = "1.23.4"dependencies = ["chrono","futures",@@ -8429,6 +8643,12 @@ version = "0.2.5"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"+[[package]]+name = "ttf-parser"+version = "0.25.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d2df906b07856748fa3f6e0ad0cbaa047052d4a7dd609e231c4f72cee8c36f31"+[[package]]name = "tungstenite"version = "0.24.0"@@ -8466,12 +8686,27 @@ dependencies = ["thiserror 2.0.20",]+[[package]]+name = "type1-encoding-parser"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fa10c302f5a53b7ad27fd42a3996e23d096ba39b5b8dd6d9e683a05b01bee749"+dependencies = [+ "pom",+]+[[package]]name = "typed-arena"version = "2.0.2"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a"+[[package]]+name = "typed-path"+version = "0.12.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e"+[[package]]name = "typeid"version = "1.0.3"@@ -8551,12 +8786,33 @@ version = "2.9.0"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142"+[[package]]+name = "unicode-bidi"+version = "0.3.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5c1cb5db39152898a79168971543b1cb5020dff7fe43c8dc468b0885f5e29df5"+[[package]]name = "unicode-ident"version = "1.0.26"source = "registry+https://github.com/rust-lang/crates.io-index"checksum = "d245f478577f809a851594d02313b640fb437e0bb33866753cff937863096954"+[[package]]+name = "unicode-normalization"+version = "0.1.25"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5fd4f6878c9cb28d874b009da9e8d183b5abc80117c40bbd187a1fde336be6e8"+dependencies = [+ "tinyvec",+]++[[package]]+name = "unicode-properties"+version = "0.1.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d"+[[package]]name = "unicode-segmentation"version = "1.13.3"@@ -10131,6 +10387,20 @@ dependencies = ["memchr",]+[[package]]+name = "zip"+version = "8.6.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2d04a6b5381502aa6087c94c669499eb1602eb9c5e8198e534de571f7154809b"+dependencies = [+ "crc32fast",+ "flate2",+ "indexmap 2.14.2",+ "memchr",+ "typed-path",+ "zopfli",+]+[[package]]name = "zlib-rs"version = "0.6.8"diff --git a/crates/openhuman-app/Cargo.toml b/crates/openhuman-app/Cargo.tomlindex 101bfde4d9..2ab10edf3c 100644--- a/crates/openhuman-app/Cargo.toml+++ b/crates/openhuman-app/Cargo.toml@@ -6,7 +6,7 @@[package]name = "openhuman-app"-version = "0.64.10"+version = "0.64.12"description = "OpenHuman - AI-powered Super Assistant"authors = ["OpenHuman"]edition = "2021"diff --git a/crates/openhuman-app/tauri.conf.json b/crates/openhuman-app/tauri.conf.jsonindex 85edc42db5..6071066dee 100644--- a/crates/openhuman-app/tauri.conf.json+++ b/crates/openhuman-app/tauri.conf.json@@ -1,7 +1,7 @@{"$schema": "https://schema.tauri.app/config/2","productName": "OpenHuman",- "version": "0.64.10",+ "version": "0.64.12","identifier": "com.openhuman.app","build": {"beforeDevCommand": "pnpm --dir ../app run dev",diff --git a/crates/openhuman-cli/Cargo.toml b/crates/openhuman-cli/Cargo.tomlindex ba9c6054fc..24c80d722b 100644--- a/crates/openhuman-cli/Cargo.toml+++ b/crates/openhuman-cli/Cargo.toml@@ -195,6 +195,10 @@ path = "../../tests/composio_list_tools_stack_overflow_regression.rs"name = "cwd_jail_e2e"path = "../../tests/cwd_jail_e2e.rs"+[[test]]+name = "windows_sandbox_env_e2e"+path = "../../tests/windows_sandbox_env_e2e.rs"+[[test]]name = "inference_provider_e2e"path = "../../tests/inference_provider_e2e.rs"diff --git a/crates/openhuman-core/Cargo.toml b/crates/openhuman-core/Cargo.tomlindex ccfbf858f6..1a5c1b41be 100644--- a/crates/openhuman-core/Cargo.toml+++ b/crates/openhuman-core/Cargo.toml@@ -749,7 +749,10 @@ inference = ["tinycomputer-accessibility/microphone-probe"]# reference instead of extracted text# (`agent::multimodal::extract_pdf_text`). Slim / headless builds opt out via# `--no-default-features --features "<explicit list without documents>"`.-documents = ["modules", "dep:tinydocs-bus"]+# `tinymemory-integrations/documents-office`: memory's brain and file sources+# read PDF, DOCX, PPTX and XLSX (memory::convert). Kept behind `documents` so+# the parsers stay off the always-on path (kernel floor).+documents = ["modules", "dep:tinydocs-bus", "tinymemory-integrations/documents-office"]# Hosting: the `hosting_*` agent tools that put a workspace on a real hosting# provider — a site, a managed database wired into it, its environment, its# domains, its deployments and the traffic they served. Default-OFF,diff --git a/crates/openhuman-core/src/agent/bus.rs b/crates/openhuman-core/src/agent/bus.rsindex d60e256c88..000d4242f9 100644--- a/crates/openhuman-core/src/agent/bus.rs+++ b/crates/openhuman-core/src/agent/bus.rs@@ -351,6 +351,8 @@ async fn handle_agent_run_turn_on_large_stack(let (tx, rx) = tokio::sync::oneshot::channel();let handle = std::thread::Builder::new().name("agent-run-turn-test".to_string())+ // Match the CI test runtime's stack: LLVM instrumentation expands+ // this full-pipeline future beyond the production worker's stack..stack_size(crate::core::runtime::AGENT_WORKER_STACK_BYTES).spawn(move || {let runtime = tokio::runtime::Builder::new_current_thread()diff --git a/crates/openhuman-core/src/agent/platform_shell.rs b/crates/openhuman-core/src/agent/platform_shell.rsindex 82981648e8..36e804b87e 100644--- a/crates/openhuman-core/src/agent/platform_shell.rs+++ b/crates/openhuman-core/src/agent/platform_shell.rs@@ -29,6 +29,109 @@use std::path::Path;+/// Environment variables a Windows child process needs before it can run at+/// all, beyond the functional allow-list each launcher already forwards.+///+/// Every sanitized spawn path in the core calls `env_clear()` and re-forwards+/// only what it names, so this list is what makes a cleared Windows environment+/// bootable. These are forwarded from the parent environment, never synthesised+/// or hard-coded: a name the parent does not have is simply not set.+///+/// Measured consequences of omitting them (Windows 11, `SystemRoot` absent from+/// an otherwise-valid child environment):+///+/// - `node.exe` aborts during startup with+/// `Assertion failed: ncrypto::CSPRNG(nullptr, 0)` (exit 134), because the+/// OS random provider cannot initialise without a system directory.+/// - `powershell.exe` exits with `Internal Windows PowerShell error. Loading+/// managed Windows PowerShell failed with error 8009001d.`+/// - `cmd.exe` leaves `%SystemRoot%`/`%TEMP%`/`%USERPROFILE%` unexpanded. It+/// does *not* repair them for its own children, so a wrapper shell cannot+/// rescue a stripped environment.+///+/// `COMSPEC` and `PATHEXT` are here because `cmd.exe` needs `PATHEXT` to resolve+/// the `.cmd`/`.bat` shims that npm, npx and the Git toolchain are installed+/// as; `TEMP`/`TMP`/`USERPROFILE`/`APPDATA`/`LOCALAPPDATA` because tooling+/// writes scratch and reads config from them; the `ProgramFiles*` trio because+/// installers and SDK locators probe them.+///+/// Single source of truth: keep every launcher's allow-list a superset of this+/// (enforced by the launcher unit tests), and add a launcher to those tests+/// rather than inventing a sixth list.+pub const WINDOWS_PROCESS_ENV_VARS: &[&str] = &[+ "SystemRoot",+ "WINDIR",+ "COMSPEC",+ "PATHEXT",+ "TEMP",+ "TMP",+ "USERPROFILE",+ "APPDATA",+ "LOCALAPPDATA",+ "ProgramFiles",+ "ProgramFiles(x86)",+ "ProgramW6432",+];++/// Assert that a launcher's environment allow-list covers every Windows+/// process-bootstrap variable.+///+/// Each launcher guards its own list with this, so a new launcher cannot+/// silently ship a `env_clear()` that produces an unbootable Windows child.+/// The failure this prevents is not a clean error: the child aborts inside the+/// OS crypto provider (`node` → `ncrypto::CSPRNG` assertion, `powershell` →+/// `8009001d`), and the harness reports it as a mysterious exit code rather+/// than a missing environment variable.+#[track_caller]+pub fn assert_forwards_windows_bootstrap(allowlist: &[&str], launcher: &str) {+ for var in WINDOWS_PROCESS_ENV_VARS {+ assert!(+ allowlist.contains(var),+ "{launcher} clears the child environment but does not forward \+ `{var}`; a Windows child spawned without it aborts during crypto \+ init. Add it to the allow-list."+ );+ }+}++/// Add Windows bootstrap variables to a host child. Keep these out of the+/// sandbox policy because that policy is also forwarded into Linux containers.+#[cfg(windows)]+pub fn forward_windows_bootstrap_env(cmd: &mut tokio::process::Command) -> anyhow::Result<()> {+ for var in WINDOWS_PROCESS_ENV_VARS {+ if let Ok(val) = std::env::var(var) {+ if val.is_empty() {+ anyhow::bail!("Windows bootstrap environment variable {var} is empty");+ }+ cmd.env(var, val);+ }+ }+ Ok(())+}++#[cfg(not(windows))]+pub fn forward_windows_bootstrap_env(_cmd: &mut tokio::process::Command) -> anyhow::Result<()> {+ Ok(())+}++#[cfg(windows)]+pub fn forward_windows_bootstrap_env_std(cmd: &mut std::process::Command) -> anyhow::Result<()> {+ for var in WINDOWS_PROCESS_ENV_VARS {+ if let Ok(val) = std::env::var(var) {+ if val.is_empty() {+ anyhow::bail!("Windows bootstrap environment variable {var} is empty");+ }+ cmd.env(var, val);+ }+ }+ Ok(())+}++#[cfg(not(windows))]+pub fn forward_windows_bootstrap_env_std(_cmd: &mut std::process::Command) -> anyhow::Result<()> {+ Ok(())+}+/// Whether the Unix arm prefixes `set -o pipefail`.#[derive(Clone, Copy, PartialEq, Eq)]enum PipeFail {diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory.rs b/crates/openhuman-core/src/agent/session_host/builder/factory.rsindex aa503584ed..8cc233720b 100644--- a/crates/openhuman-core/src/agent/session_host/builder/factory.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/factory.rs@@ -833,14 +833,12 @@ impl OpenHumanSessionHost {definitions,security_policy: security,post_turn_hooks: agent.post_turn_hooks.clone(),- // The caller's own definition, when this session was built from- // one rather than from a registry id. `AgentSpec::into_core`- // re-stamps the built-in orchestrator under the caller's id, so- // ids like `harness`/`alpha`/`beta` reach hosted resolution as- // names no registry holds; without handing the definition over- // here the lookup misses and the turn is rejected as a policy- // failure before any provider call (#6404/#6392/#6393).- session_definition: session_definition.clone().map(Arc::new),+ session_definition: session_definition.clone().map(|definition| {+ Arc::new(super::host_tools::add_permanent_tools(+ definition,+ &agent.permanent_tool_names,+ ))+ }),})});if agent.hosted_base.is_none() {diff --git a/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs b/crates/openhuman-core/src/agent/session_host/builder/host_tools.rsindex 2485b164db..79afe4e63c 100644--- a/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs@@ -196,6 +196,16 @@ pub(super) struct MergedHostTurnTools {pub scope_additions: HashSet<String>,}+pub(super) fn add_permanent_tools(+ mut definition: crate::agent::harness::definition::AgentDefinition,+ permanent: &HashSet<String>,+) -> crate::agent::harness::definition::AgentDefinition {+ definition.extra_tools.extend(permanent.iter().cloned());+ definition.extra_tools.sort();+ definition.extra_tools.dedup();+ definition+}+pub(super) fn scope_def(definition: Option<&crate::agent::harness::definition::AgentDefinition>,host_tools: &MergedHostTurnTools,diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session/permanent.rs b/crates/openhuman-core/src/agent/session_host/runtime_session/permanent.rsindex 7c071ecc36..166d6e552f 100644--- a/crates/openhuman-core/src/agent/session_host/runtime_session/permanent.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime_session/permanent.rs@@ -27,6 +27,10 @@ pub(super) fn refresh_visibility(}let permanent = surface.permanent_tool_names.clone();surface.visible_tool_names.extend(permanent.iter().cloned());+ let mut seen = std::collections::HashSet::new();+ surface+ .visible_tool_names+ .retain(|name| seen.insert(name.clone()));surface.deferred_tool_names.retain(|name| !permanent.contains(name));diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack_tests.rsindex 98bd7443c6..a327583cbe 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/memory_pack_tests.rs@@ -27,6 +27,7 @@ fn pack() -> TurnPack {refs: vec!["id-1".into()],engine: "reference".into(),citations: Vec::new(),+ refusal: None,}}@@ -67,3 +68,119 @@ async fn a_turn_without_a_pack_is_left_alone() {assert_eq!(request.messages.len(), 1);assert!(ctx.data.child().memory_turn.is_none());}++// ── prompt-cache stability across turns (#6718, #7023) ──────────────────────+//+// A provider caches the longest prefix two requests share. The pack is+// recalled per turn, so it differs every turn; what must never happen is the+// pack rewriting what came before it, or one turn's pack surviving into the+// next turn's history.++fn pack_saying(fact: &str) -> TurnPack {+ TurnPack {+ markdown: format!("# Memory\n\n## Learnings\n- {fact}"),+ ..pack()+ }+}++async fn request_for(+ history: &[Message],+ pack: TurnPack,+ profile: Option<tinyinference_llm::model::ModelProfile>,+) -> ModelRequest {+ let mut ctx = context(Some(pack));+ ctx.model_profile = profile;+ let mut request = ModelRequest::new(history.to_vec());+ MemoryPackMiddleware+ .before_model(&mut ctx, &(), &mut request)+ .await+ .unwrap();+ request+}++/// Messages two requests share from the start: what a prefix cache can reuse.+fn shared_prefix(a: &[Message], b: &[Message]) -> usize {+ a.iter().zip(b).take_while(|(x, y)| x == y).count()+}++fn two_turns() -> (Vec<Message>, Vec<Message>) {+ let turn_one = vec![+ Message::system("You are helpful."),+ Message::user("How far is Porto from Lisbon?"),+ ];+ let mut turn_two = turn_one.clone();+ turn_two.push(Message::assistant("About 310 km."));+ turn_two.push(Message::user("And by train?"));+ (turn_one, turn_two)+}++#[tokio::test]+async fn a_new_turn_reuses_the_whole_previous_transcript_as_cached_prefix() {+ let (turn_one, turn_two) = two_turns();+ let first = request_for(+ &turn_one,+ pack_saying("The user prefers metric units"),+ None,+ )+ .await;+ let second = request_for(&turn_two, pack_saying("The user travels by rail"), None).await;++ // Turn two's request starts with turn two's transcript, byte for byte.+ assert_eq!(&second.messages[..turn_two.len()], &turn_two[..]);+ // The cache hit covers every message turn one sent before its pack.+ assert_eq!(+ shared_prefix(&first.messages, &second.messages),+ turn_one.len()+ );+ // Only the tail differs, and turn one's pack is nowhere in turn two.+ assert_eq!(second.messages.len(), turn_two.len() + 1);+ let sent: String = second.messages.iter().map(Message::text).collect();+ assert!(+ !sent.contains("metric units"),+ "turn one's pack leaked: {sent}"+ );+ assert!(sent.contains("travels by rail"));+}++#[tokio::test]+async fn on_a_hoisting_model_only_the_previous_tail_message_falls_out_of_the_cache() {+ let hoisting = Some(tinyinference_llm::model::ModelProfile {+ hoists_system_messages: true,+ ..Default::default()+ });+ let (turn_one, turn_two) = two_turns();+ let first = request_for(+ &turn_one,+ pack_saying("The user prefers metric units"),+ hoisting.clone(),+ )+ .await;+ let second = request_for(&turn_two, pack_saying("The user travels by rail"), hoisting).await;++ // No system message is added: a hoisted one would rewrite the head (#6962).+ assert_eq!(first.messages.len(), turn_one.len());+ assert_eq!(second.messages.len(), turn_two.len());+ // The pack rides the tail user turn; everything before the tail is the+ // transcript untouched, so the head stays cached.+ assert_eq!(+ &second.messages[..turn_two.len() - 1],+ &turn_two[..turn_two.len() - 1]+ );+ assert!(second+ .messages+ .last()+ .unwrap()+ .text()+ .contains("travels by rail"));+ // Turn one's tail carried turn one's pack, so the shared prefix stops just+ // before it: one user message, never the whole history.+ assert_eq!(+ shared_prefix(&first.messages, &second.messages),+ turn_one.len() - 1+ );+ let sent: String = second.messages.iter().map(Message::text).collect();+ assert!(+ !sent.contains("metric units"),+ "turn one's pack leaked: {sent}"+ );+}diff --git a/crates/openhuman-core/src/config/schema/computer.rs b/crates/openhuman-core/src/config/schema/computer.rsindex 76ce224ecf..683c1e31a6 100644--- a/crates/openhuman-core/src/config/schema/computer.rs+++ b/crates/openhuman-core/src/config/schema/computer.rs@@ -45,6 +45,11 @@ pub struct ComputerConfig {/// How many times one task may be rescued; `0` turns rescue off and/// `None` keeps the module's default (5, also its maximum).pub max_rescues: Option<u32>,+ /// Record every decision of a browser task and keep each task's full+ /// report, and trace desktop commands, under `<workspace>/state/computer/`.+ /// Off by default: reports hold page text. `OPENHUMAN_COMPUTER_TRACE=1`+ /// turns it on for one run without editing the config.+ pub trace: bool,}#[cfg(test)]diff --git a/crates/openhuman-core/src/flows/bus/run_digest.rs b/crates/openhuman-core/src/flows/bus/run_digest.rsindex 2b6af4686c..43575604df 100644--- a/crates/openhuman-core/src/flows/bus/run_digest.rs+++ b/crates/openhuman-core/src/flows/bus/run_digest.rs@@ -96,6 +96,9 @@ impl FlowRunDigestSubscriber {let digest = render_run_digest(&flow_name, &run);let mut meta = flow_meta(flow_id, &[FLOW_RUN_DIGEST_TAG.to_string()]);meta.observed_at = Some(chrono::Utc::now());+ // A machine-written run summary: searchable, but no facts or+ // beliefs about the user are derived from it.+ meta.derive = Some(false);match crate::memory::ops::store_item(&self.config, StoreItem::document(digest, meta)).await{Ok(receipt) => {diff --git a/crates/openhuman-core/src/flows/bus_subscriber_tests.rs b/crates/openhuman-core/src/flows/bus_subscriber_tests.rsindex 0e94f42966..472cf4eca5 100644--- a/crates/openhuman-core/src/flows/bus_subscriber_tests.rs+++ b/crates/openhuman-core/src/flows/bus_subscriber_tests.rs@@ -361,6 +361,11 @@ async fn digest_writes_run_digest_entry_for_completed_run() {let entry = &digests[0];assert_eq!(entry.meta.source.kind, tinymemory_api::SourceKind::Agent);assert!(entry.meta.tags.contains(&crate::flows::flow_tag("f-ok")));+ assert_eq!(+ entry.meta.derive,+ Some(false),+ "nothing derived from a digest"+ );assert!(entry.text.contains("f-ok"));assert!(entry.text.contains("completed"));assert!(entry.text.contains("n1"));diff --git a/crates/openhuman-core/src/flows/memory_tools.rs b/crates/openhuman-core/src/flows/memory_tools.rsindex 382a57001a..a0d85d9b96 100644--- a/crates/openhuman-core/src/flows/memory_tools.rs+++ b/crates/openhuman-core/src/flows/memory_tools.rs@@ -175,6 +175,10 @@ pub async fn remember_keyed(},).await?;+ // A flow's own key/value state: searchable, but nothing is derived from+ // it as memory about the user.+ let mut meta = flow_meta(flow_id, &[key_tag]);+ meta.derive = Some(false);let view = crate::memory::ops::learn(config,LearnParams {@@ -183,7 +187,7 @@ pub async fn remember_keyed(confidence: None,meta: None,},- Some(flow_meta(flow_id, &[key_tag])),+ Some(meta),).await?;tracing::debug!(diff --git a/crates/openhuman-core/src/flows/memory_tools_tests.rs b/crates/openhuman-core/src/flows/memory_tools_tests.rsindex 2e6dcdd621..45efe73c75 100644--- a/crates/openhuman-core/src/flows/memory_tools_tests.rs+++ b/crates/openhuman-core/src/flows/memory_tools_tests.rs@@ -88,6 +88,11 @@ async fn remember_keyed_replaces_the_previous_value() {assert_eq!(items.len(), 1);assert!(items[0].text.contains("second"));assert_eq!(flow_key_of(&items[0].meta), Some("k"));+ assert_eq!(+ items[0].meta.derive,+ Some(false),+ "nothing derived from flow state"+ );}#[tokio::test]diff --git a/crates/openhuman-core/src/inference/failure_copy/table.rs b/crates/openhuman-core/src/inference/failure_copy/table.rsindex 69a818a4c5..4b2754e151 100644--- a/crates/openhuman-core/src/inference/failure_copy/table.rs+++ b/crates/openhuman-core/src/inference/failure_copy/table.rs@@ -32,6 +32,7 @@ pub(crate) struct FailureCopy {pub(crate) enum FailureClass {CodexSessionExpired,SessionExpired,+ LocalSessionManagedUnavailable,ActionBudget,MaxIterations,TurnTimeout,@@ -92,6 +93,21 @@ pub(crate) fn failure_copy(class: FailureClass) -> &'static FailureCopy {"Your OpenHuman session has expired. \Please sign in again to continue."),+ // The offline local profile is a working sign-in with no TinyHumans+ // account behind it, so the managed model cannot run for it — but+ // nothing about it has expired (#6932). `auth_error`/`config` because+ // the fix is a setting the user owns; emphatically NOT+ // `session_expired`, whose wire token signs the user out.+ LocalSessionManagedUnavailable => row!(+ "chat_error.local_session_managed_unavailable",+ "auth_error",+ "config",+ false,+ "You're on the local offline profile, which has no OpenHuman account behind \+ it, so the managed (cloud) model can't run. Sign in to use managed models, \+ or switch routing to \"Use Your Own Models\" in Connections → API keys → LLM \+ and add your own provider."+ ),ActionBudget => row!("chat_error.action_budget","action_budget_exceeded",diff --git a/crates/openhuman-core/src/inference/provider/factory/managed_backend.rs b/crates/openhuman-core/src/inference/provider/factory/managed_backend.rsindex dd0a4c4050..352aea1879 100644--- a/crates/openhuman-core/src/inference/provider/factory/managed_backend.rs+++ b/crates/openhuman-core/src/inference/provider/factory/managed_backend.rs@@ -46,6 +46,10 @@ pub(super) fn resolve_managed_backend_with_model_override(config: &Config,model_override: Option<&str>,) -> anyhow::Result<(OpenHumanBackendModel, String)> {+ // Managed construction shares the same privacy gate as local and BYOK+ // factories, before constructing a client or announcing any egress.+ enforce_local_only_inference(role, PROVIDER_OPENHUMAN)?;+// Every managed role runs on one concrete model: the pinned default, else// `MODEL_MANAGED_DEFAULT`. Roles still matter — they picked the *route*// that led here — but there are no per-role tier endpoints any more.diff --git a/crates/openhuman-core/src/inference/provider/factory/routing.rs b/crates/openhuman-core/src/inference/provider/factory/routing.rsindex 5af847d5c3..d8034b69e9 100644--- a/crates/openhuman-core/src/inference/provider/factory/routing.rs+++ b/crates/openhuman-core/src/inference/provider/factory/routing.rs@@ -85,6 +85,22 @@ pub fn provider_for_role(role: &str, config: &Config) -> String {// route now stands alone and an unset one falls through to the managed// backend, the same as every other workload.+ // #6938: the Chat UI model picker records its selection in+ // `config.default_model` (the web-chat turn path stores the per-turn+ // `model_override` there — see `build_session_agent`), but role+ // resolution never consulted it, so a picked BYOK/local model still+ // fell through to the managed backend and 401'd as "session expired".+ // When the default names an explicit provider route, honour it here+ // instead of the managed fallback.+ if let Some(route) = default_model_route_for_role(role, config) {+ log::info!(+ "[providers][default-model-route] role={} route={}",+ role,+ route+ );+ return route;+ }+let resolved = resolve_primary_cloud_provider_string(config);// #5146 §2.1: the fallback itself is correct and stays — background@@ -113,6 +129,57 @@ pub fn provider_for_role(role: &str, config: &Config) -> String {}}+/// #6938: the provider route named by `config.default_model`, if it names an+/// explicit provider rather than a model for the managed backend.+///+/// The Chat UI model picker (both the composer's per-turn pick, stored in+/// `default_model` by `build_session_agent`, and a hand-set `default_model`+/// in `config.toml`) records selections like `my-openai:gpt-4o` there, but+/// role resolution never consulted it — the turn fell through to the managed+/// backend regardless. Only the chat-tier roles consult the default: a+/// chat-model pick says nothing about which model should do vision or+/// summarization, so the background specialist roles keep their managed+/// fallback.+///+/// Returns `None` (managed fallback unchanged) for everything that is not an+/// explicit route: tier hints (`hint:chat`), the AI settings row's managed+/// catalog pin (`openrouter/<author>/<slug>[:tag]` — a model name for the+/// managed backend, see `DefaultModelRow.tsx`), bare model ids, and slugs+/// that name no configured provider. The one bare provider name that is+/// honoured is `claude_agent_sdk`: unlike local runtimes and cloud slugs,+/// which need a `:model` part to construct, the SDK falls back to+/// `config.claude_agent_sdk.default_model` (see+/// `claude_agent_sdk_model_from_string`).+fn default_model_route_for_role(role: &str, config: &Config) -> Option<String> {+ match role {+ "chat" | "reasoning" | "agentic" | "coding" | "burst" => {}+ _ => return None,+ }+ let dm = config.default_model.as_deref()?.trim();+ if dm.is_empty() || dm.starts_with("hint:") || dm.starts_with("openrouter/") {+ return None;+ }+ // Bare `claude_agent_sdk` is the only bare provider name honoured here:+ // the SDK resolves its model from `config.claude_agent_sdk.default_model`+ // (see `claude_agent_sdk_model_from_string`), while bare local runtimes+ // (`ollama`, ...) and bare cloud slugs carry no `:model` part and fail+ // at construction — they keep the managed fallback rather than erroring+ // (tinysweeper review on #6996; CodeRabbit review on #6996).+ if !dm.contains(':') {+ return (dm == CLAUDE_AGENT_SDK_PROVIDER).then(|| dm.to_string());+ }+ let (slug, rest) = dm.split_once(':')?;+ let slug = slug.trim();+ if slug.is_empty() || slug == PROVIDER_OPENHUMAN || rest.trim().is_empty() {+ return None;+ }+ let known = config.cloud_providers.iter().any(|e| e.slug == slug)+ || tinyinference_local::profile::is_local_provider_string(dm)+ || dm.starts_with(tinyagents_harness::providers::claude_code::PROVIDER_PREFIX)+ || dm.starts_with(CLAUDE_AGENT_SDK_PREFIX);+ known.then(|| dm.to_string())+}+/// #3767: Whether the OpenHuman managed-credits gate should be bypassed for a/// single workload role.///@@ -203,3 +270,7 @@ pub(super) fn split_model_and_temperature(raw: &str) -> (String, Option<f64>) {}(trimmed.to_string(), None)}++#[cfg(test)]+#[path = "routing_tests.rs"]+mod routing_tests;diff --git a/crates/openhuman-core/src/inference/provider/factory/routing_tests.rs b/crates/openhuman-core/src/inference/provider/factory/routing_tests.rsnew file mode 100644index 0000000000..109b68a11d--- /dev/null+++ b/crates/openhuman-core/src/inference/provider/factory/routing_tests.rs@@ -0,0 +1,250 @@+use super::*;+use crate::config::schema::cloud_providers::{AuthStyle, CloudProviderCreds};+use crate::config::Config;+use crate::inference::provider::factory::resolves_to_managed_backend;++fn byok_openai_compatible_entry() -> CloudProviderCreds {+ CloudProviderCreds {+ id: "p_my-openai".to_string(),+ slug: "my-openai".to_string(),+ label: "My OpenAI".to_string(),+ endpoint: "https://inference.example.com/v1".to_string(),+ auth_style: AuthStyle::Bearer,+ ..Default::default()+ }+}++fn config_with_byok_provider() -> Config {+ let mut config = Config::default();+ config.cloud_providers = vec![byok_openai_compatible_entry()];+ config+}++/// #6938: the Chat UI model picker records its selection in+/// `config.default_model` (the web-chat turn path stores the per-turn+/// `model_override` there), but role resolution never consulted it — every+/// turn with an unset `chat_provider` silently fell back to the managed+/// backend and 401'd as "session expired" on local-only profiles.+#[test]+fn default_model_with_explicit_provider_routes_chat_instead_of_managed() {+ let mut config = config_with_byok_provider();+ config.default_model = Some("my-openai:gpt-4o".to_string());++ assert_eq!(+ provider_for_role("chat", &config),+ "my-openai:gpt-4o",+ "a picked provider in default_model must route the chat turn"+ );+ assert!(+ !resolves_to_managed_backend("chat", &config),+ "the chat turn must not resolve to the managed backend when a provider was picked"+ );+}++/// The default-model route covers the chat-tier roles, whose turns the+/// picker is meant to influence.+#[test]+fn default_model_route_applies_to_chat_tier_roles() {+ let mut config = config_with_byok_provider();+ config.default_model = Some("my-openai:gpt-4o".to_string());++ for role in ["chat", "reasoning", "agentic", "coding"] {+ assert_eq!(+ provider_for_role(role, &config),+ "my-openai:gpt-4o",+ "`{role}` must honour the picked provider in default_model"+ );+ }+}++/// A chat-model pick says nothing about which model should do vision or+/// summarization — the background specialist roles keep their managed+/// fallback.+#[test]+fn default_model_route_does_not_touch_background_roles() {+ let mut config = config_with_byok_provider();+ config.default_model = Some("my-openai:gpt-4o".to_string());++ for role in [+ "vision",+ "memory",+ "summarization",+ "embeddings",+ "learning",+ ] {+ assert_eq!(+ provider_for_role(role, &config),+ "openhuman",+ "`{role}` must keep the managed fallback despite the default_model pick"+ );+ }+}++/// Everything `default_model` can hold that is *not* an explicit provider+/// route must keep the managed fallback: tier hints, the AI settings row's+/// managed catalog pin (`openrouter/...`), bare model ids, unknown slugs,+/// and the managed provider itself.+#[test]+fn default_model_without_explicit_provider_keeps_managed_fallback() {+ let mut config = config_with_byok_provider();+ for default_model in [+ "hint:chat",+ "openrouter/deepseek/deepseek-v3",+ "openrouter/deepseek/deepseek-v3:free",+ "gpt-4o",+ "",+ "nosuchprovider:some-model",+ "openhuman:some-model",+ "my-openai:",+ ":gpt-4o",+ ] {+ config.default_model = Some(default_model.to_string());+ assert_eq!(+ provider_for_role("chat", &config),+ "openhuman",+ "default_model={default_model:?} must not reroute the chat turn"+ );+ assert!(+ resolves_to_managed_backend("chat", &config),+ "default_model={default_model:?} must keep the managed backend"+ );+ }+}++/// A local runtime pick (`ollama:...`) routes the chat turn locally instead+/// of the managed backend — same mechanism, no cloud provider involved.+#[test]+fn default_model_with_local_provider_routes_chat_locally() {+ let mut config = Config::default();+ config.default_model = Some("ollama:llama3".to_string());++ assert_eq!(+ provider_for_role("chat", &config),+ "ollama:llama3",+ "a picked local model must route the chat turn locally"+ );+ assert!(+ !resolves_to_managed_backend("chat", &config),+ "a picked local model must not resolve to the managed backend"+ );+}++/// An explicitly configured role route still wins over the default model —+/// the #6109 "each route stands alone" invariant is preserved.+#[test]+fn explicit_role_route_still_wins_over_default_model() {+ let mut config = config_with_byok_provider();+ config.chat_provider = Some("anthropic:claude-x".to_string());+ config.default_model = Some("my-openai:gpt-4o".to_string());++ assert_eq!(+ provider_for_role("chat", &config),+ "anthropic:claude-x",+ "the explicitly configured chat_provider must win over default_model"+ );+}++/// The #6109 regression in the other direction: a configured sibling route+/// is used for its own role while the default model covers the unset ones —+/// no cross-contamination either way.+#[test]+fn default_model_does_not_disturb_configured_sibling_routes() {+ let mut config = config_with_byok_provider();+ config.coding_provider = Some("my-openai:codestral".to_string());+ config.default_model = Some("my-openai:gpt-4o".to_string());++ assert_eq!(+ provider_for_role("coding", &config),+ "my-openai:codestral",+ "the configured coding route must be honoured as-is"+ );+ assert_eq!(+ provider_for_role("chat", &config),+ "my-openai:gpt-4o",+ "the unset chat route falls back to the default_model pick, not the sibling's route"+ );+ assert_eq!(+ provider_for_role("reasoning", &config),+ "my-openai:gpt-4o",+ "the unset reasoning route falls back to the default_model pick, not the sibling's route"+ );+}++/// tinysweeper review on #6996: a bare `claude_agent_sdk` default names the+/// provider with no `:model` part. The old `split_once(':')?` rejected it+/// before the explicit `CLAUDE_AGENT_SDK_PROVIDER` check could run, silently+/// falling back to the managed backend.+#[test]+fn default_model_with_bare_claude_agent_sdk_routes_chat() {+ let mut config = Config::default();+ config.default_model = Some("claude_agent_sdk".to_string());++ assert_eq!(+ provider_for_role("chat", &config),+ "claude_agent_sdk",+ "a bare claude_agent_sdk pick must route the chat turn"+ );+ assert!(+ !resolves_to_managed_backend("chat", &config),+ "a bare claude_agent_sdk pick must not resolve to the managed backend"+ );+}++/// Bare local provider names (`ollama` with no `:model` part) keep the managed+/// fallback: the local runtime constructor rejects an empty model+/// (`empty_model_err` in `local_runtime.rs`), so routing there would only+/// trade the managed backend for a build-time error (CodeRabbit review on+/// #6996).+#[test]+fn default_model_with_bare_local_provider_keeps_managed_fallback() {+ let mut config = Config::default();+ config.default_model = Some("ollama".to_string());++ assert_eq!(+ provider_for_role("chat", &config),+ "openhuman",+ "a bare ollama pick has no model id and must keep the managed fallback"+ );+ assert!(+ resolves_to_managed_backend("chat", &config),+ "a bare ollama pick must resolve to the managed backend"+ );+}++/// A bare cloud slug (`my-openai` with no `:model` part) is not constructible+/// either — the cloud-slug path requires the `<slug>:<model>` form — so it+/// keeps the managed fallback as well.+#[test]+fn default_model_with_bare_cloud_slug_keeps_managed_fallback() {+ let mut config = config_with_byok_provider();+ config.default_model = Some("my-openai".to_string());++ assert_eq!(+ provider_for_role("chat", &config),+ "openhuman",+ "a bare cloud slug has no model id and must keep the managed fallback"+ );+ assert!(+ resolves_to_managed_backend("chat", &config),+ "a bare cloud slug must resolve to the managed backend"+ );+}++/// Bare `openai` is deliberately NOT rerouted: the `openai` slug names the+/// cloud provider elsewhere in the factory, so it keeps the managed fallback+/// rather than being misread as a local runtime.+#[test]+fn default_model_with_bare_openai_keeps_managed_fallback() {+ let mut config = Config::default();+ config.default_model = Some("openai".to_string());++ assert_eq!(+ provider_for_role("chat", &config),+ "openhuman",+ "bare openai must keep the managed fallback"+ );+ assert!(+ resolves_to_managed_backend("chat", &config),+ "bare openai must resolve to the managed backend"+ );+}diff --git a/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rs b/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rsindex f904ab8be0..6ac7324903 100644--- a/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rs+++ b/crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rs@@ -58,6 +58,28 @@ fn enforce_local_only_inference_errors_on_external_when_local_only() {.to_string().contains("Local-only privacy mode"));+ // Both the default factory and a thread-attached managed picker route must+ // hit the managed resolver's privacy gate before any backend client exists.+ for route in ["openhuman", "openrouter/author/picked-model:free"] {+ let result = if route == "openhuman" {+ create_chat_model_from_string("chat", route, &Config::default(), 0.0)+ } else {+ managed_backend::make_openhuman_backend_model_for_thread(+ "chat",+ &Config::default(),+ route,+ true,+ Some("privacy-test-thread"),+ )+ .map(|(model, _)| model)+ };+ let error = match result {+ Err(error) => error,+ Ok(_) => panic!("managed inference must be refused in LocalOnly mode"),+ };+ assert!(error.to_string().contains("Local-only privacy mode"));+ }+// Local provider passes.enforce_local_only_inference("chat", "ollama:llama3").expect("local provider must be permitted in LocalOnly mode");diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rsindex 1de0f259af..d7b2caeefa 100644--- a/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model.rs@@ -170,9 +170,7 @@ impl OpenHumanBackendModel {}fn resolve_bearer(&self) -> anyhow::Result<String> {- use crate::security::credentials::session_support::{- classify_session_token, SessionTokenCheck,- };+ use crate::security::credentials::session_support::classify_session_token;// A stored API key (library runtime) is the bearer outright: the// OpenAI-compatible managed endpoint accepts it as `Bearer <key>`,@@ -217,23 +215,8 @@ impl OpenHumanBackendModel {// stored token and let the 401 come back — but an expired session can// also surface upstream as a misleading "model unavailable", which is a// core symptom of #5503 (all tiers "die" over a long session). Failing- // fast as `session_expired` routes the user to re-auth instead. Offline- // / local sessions (`is_local_session_token`) and `exp`-less tokens- // carry no recorded expiry, so `classify_session_token` returns `Live`- // for them — their behaviour is unchanged and the post-call 401 net- // still covers a server-side revocation.- match classify_session_token(profile.as_ref(), chrono::Utc::now()) {- SessionTokenCheck::Live(token) => Ok(token),- SessionTokenCheck::Expired => {- maybe_publish_local_session_expiry();- anyhow::bail!(- "SESSION_EXPIRED: backend session token expired locally — re-authentication required"- )- }- SessionTokenCheck::Absent => {- anyhow::bail!("No backend session: store a JWT via auth (app-session)")- }- }+ // fast as `session_expired` routes the user to re-auth instead.+ managed_bearer(classify_session_token(profile.as_ref(), chrono::Utc::now()))}/// The managed OpenAI-compatible endpoint, from the installed backend@@ -511,6 +494,45 @@ fn with_thread_id(request: ModelRequest, thread_id: Option<&str>) -> ModelRequesrequest.with_provider_options(options)}+/// The bearer a classified app-session token yields for managed inference.+///+/// Separate from [`OpenHumanBackendModel::resolve_bearer`] so the decision is+/// testable without an on-disk auth profile.+///+/// `exp`-less tokens carry no recorded expiry, so `classify_session_token`+/// reports them `Live`; the offline local session is one of those, and it+/// authenticates no TinyHumans account. Sending it anyway earned a backend+/// `401 "Invalid token"`, which published `SessionExpired` and told a user who+/// was signed in locally that their session had expired (#6932). Refusing here+/// mirrors the arm `resolve_backend_credential` already applies to every+/// backend REST caller, and keeps the local credential intact.+fn managed_bearer(+ check: crate::security::credentials::session_support::SessionTokenCheck,+) -> anyhow::Result<String> {+ use crate::security::credentials::session_support::{+ is_local_session_token, SessionTokenCheck, LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE,+ };++ match check {+ SessionTokenCheck::Live(token) if is_local_session_token(&token) => {+ log::debug!(+ "[providers][openhuman-backend] refusing managed inference for the offline local session"+ );+ anyhow::bail!(LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE)+ }+ SessionTokenCheck::Live(token) => Ok(token),+ SessionTokenCheck::Expired => {+ maybe_publish_local_session_expiry();+ anyhow::bail!(+ "SESSION_EXPIRED: backend session token expired locally — re-authentication required"+ )+ }+ SessionTokenCheck::Absent => {+ anyhow::bail!("No backend session: store a JWT via auth (app-session)")+ }+ }+}+/// Publish a `SessionExpired` event when the local `exp` precheck in/// [`resolve_bearer`](OpenHumanBackendModel::resolve_bearer) rejects an expired/// managed session token before a request is ever sent — mirroringdiff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_auth_tests.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_auth_tests.rsnew file mode 100644index 0000000000..e3d4332286--- /dev/null+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_auth_tests.rs@@ -0,0 +1,46 @@+use super::*;++// #6932: the offline local profile is a valid sign-in with no TinyHumans+// account behind it. `classify_session_token` reports its `exp`-less token+// `Live`, so managed inference used to send it, collect a backend+// `401 "Invalid token"` and surface that as an expired session.+#[test]+fn the_offline_local_session_cannot_authenticate_managed_inference() {+ use crate::security::credentials::session_support::{+ SessionTokenCheck, LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE,+ };++ let error = managed_bearer(SessionTokenCheck::Live("header.payload.local".to_string()))+ .expect_err("a local session has no managed bearer");++ assert_eq!(+ error.to_string(),+ LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE+ );+}++#[test]+fn the_refusal_does_not_read_as_an_expired_session() {+ use crate::security::credentials::session_support::SessionTokenCheck;++ let error = managed_bearer(SessionTokenCheck::Live("header.payload.local".to_string()))+ .expect_err("a local session has no managed bearer");++ // The whole point of the fix: this must not reach the sign-out path that+ // the backend's 401 envelope used to trigger.+ assert!(!crate::core::observability::is_session_expired_message(+ &error.to_string()+ ));+}++#[test]+fn a_signed_in_session_still_authenticates_managed_inference() {+ use crate::security::credentials::session_support::SessionTokenCheck;++ let bearer = managed_bearer(SessionTokenCheck::Live(+ "header.payload.signature".to_string(),+ ))+ .expect("a hosted session is the bearer");++ assert_eq!(bearer, "header.payload.signature");+}diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_offline_session_tests.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_offline_session_tests.rsnew file mode 100644index 0000000000..2aa9f0bf26--- /dev/null+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_offline_session_tests.rs@@ -0,0 +1,42 @@+use super::*;++// #6932: an offline local profile is a valid sign-in, but it cannot+// authenticate managed inference.+#[test]+fn the_offline_local_session_cannot_authenticate_managed_inference() {+ use crate::security::credentials::session_support::{+ SessionTokenCheck, LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE,+ };++ let error = managed_bearer(SessionTokenCheck::Live("header.payload.local".to_string()))+ .expect_err("a local session has no managed bearer");++ assert_eq!(+ error.to_string(),+ LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE+ );+}++#[test]+fn the_refusal_does_not_read_as_an_expired_session() {+ use crate::security::credentials::session_support::SessionTokenCheck;++ let error = managed_bearer(SessionTokenCheck::Live("header.payload.local".to_string()))+ .expect_err("a local session has no managed bearer");++ assert!(!crate::core::observability::is_session_expired_message(+ &error.to_string()+ ));+}++#[test]+fn a_signed_in_session_still_authenticates_managed_inference() {+ use crate::security::credentials::session_support::SessionTokenCheck;++ let bearer = managed_bearer(SessionTokenCheck::Live(+ "header.payload.signature".to_string(),+ ))+ .expect("a hosted session is the bearer");++ assert_eq!(bearer, "header.payload.signature");+}diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_reasoning_tests.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_reasoning_tests.rsnew file mode 100644index 0000000000..67de5318fc--- /dev/null+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_reasoning_tests.rs@@ -0,0 +1,159 @@+//! The reasoning-off hint and request reasoning on the managed wire.++use super::*;++#[test]+fn reasoning_hint_becomes_disabled_reasoning_on_the_managed_wire() {+ let request = apply_reasoning_hint(without_reasoning(ModelRequest::new(vec![Message::user(+ "hi",+ )])));+ assert_eq!(+ request.provider_options["reasoning"],+ serde_json::json!({ "enabled": false })+ );+}++#[test]+fn no_hint_leaves_provider_options_untouched() {+ let request = apply_reasoning_hint(ModelRequest::new(vec![Message::user("hi")]));+ assert!(request.provider_options.get("reasoning").is_none());+}++#[test]+fn request_reasoning_effort_becomes_the_managed_reasoning_object() {+ use tinyinference_llm::model::{ReasoningConfig, ReasoningEffort};+ let request = apply_reasoning_hint(+ ModelRequest::new(vec![Message::user("hi")])+ .with_reasoning(ReasoningConfig::effort(ReasoningEffort::High)),+ );+ assert_eq!(+ request.provider_options["reasoning"],+ serde_json::json!({ "effort": "high" })+ );+ assert!(+ request.reasoning.is_none(),+ "the neutral field is consumed so the transport sends no second `reasoning_effort`"+ );+}++#[test]+fn request_reasoning_none_disables_reasoning_on_the_managed_wire() {+ use tinyinference_llm::model::{ReasoningConfig, ReasoningEffort};+ let request = apply_reasoning_hint(+ ModelRequest::new(vec![Message::user("hi")])+ .with_reasoning(ReasoningConfig::effort(ReasoningEffort::None)),+ );+ assert_eq!(+ request.provider_options["reasoning"],+ serde_json::json!({ "enabled": false })+ );+}++#[test]+fn request_reasoning_budget_becomes_max_tokens() {+ use tinyinference_llm::model::{ReasoningConfig, ReasoningEffort};+ let request = apply_reasoning_hint(+ ModelRequest::new(vec![Message::user("hi")]).with_reasoning(ReasoningConfig {+ effort: Some(ReasoningEffort::High),+ budget_tokens: Some(8_000),+ summary: None,+ }),+ );+ assert_eq!(+ request.provider_options["reasoning"],+ serde_json::json!({ "max_tokens": 8000 })+ );+}++#[test]+fn suggestion_off_hint_wins_over_request_reasoning() {+ use tinyinference_llm::model::{ReasoningConfig, ReasoningEffort};+ let request = apply_reasoning_hint(+ without_reasoning(ModelRequest::new(vec![Message::user("hi")]))+ .with_reasoning(ReasoningConfig::effort(ReasoningEffort::Low)),+ );+ assert_eq!(+ request.provider_options["reasoning"],+ serde_json::json!({ "enabled": false })+ );+}++#[test]+fn explicit_reasoning_option_wins_over_the_hint() {+ let request = without_reasoning(ModelRequest::new(vec![Message::user("hi")]))+ .with_provider_options(serde_json::json!({ "reasoning": { "effort": "high" } }));+ let request = apply_reasoning_hint(request);+ assert_eq!(+ request.provider_options["reasoning"],+ serde_json::json!({ "effort": "high" })+ );+}++/// Captures the JSON body of every chat-completions request it receives.+async fn spawn_capturing_chat_server() -> (String, std::sync::Arc<std::sync::Mutex<Vec<Value>>>) {+ let bodies = std::sync::Arc::new(std::sync::Mutex::new(Vec::new()));+ let seen = bodies.clone();+ let listener = tokio::net::TcpListener::bind("127.0.0.1:0")+ .await+ .expect("bind");+ let addr = listener.local_addr().expect("local_addr").to_string();+ let app = axum::Router::new().route(+ "/openai/v1/chat/completions",+ axum::routing::post(move |axum::Json(body): axum::Json<Value>| {+ let seen = seen.clone();+ async move {+ seen.lock().unwrap().push(body);+ axum::Json(serde_json::json!({+ "id": "chatcmpl-capture",+ "object": "chat.completion",+ "created": 1,+ "model": "reasoning-v1",+ "choices": [{+ "index": 0,+ "message": { "role": "assistant", "content": "[]" },+ "finish_reason": "stop"+ }],+ "usage": { "prompt_tokens": 1, "completion_tokens": 1, "total_tokens": 2 }+ }))+ }+ }),+ );+ tokio::spawn(async move {+ axum::serve(listener, app).await.expect("serve");+ });+ (addr, bodies)+}++#[tokio::test]+async fn managed_call_sends_reasoning_disabled_only_when_hinted() {+ let tmp = tempfile::TempDir::new().unwrap();+ seed_app_session(tmp.path());+ let (addr, bodies) = spawn_capturing_chat_server().await;+ let backend = backend_pointed_at(&addr, tmp.path());++ backend+ .invoke(+ &(),+ without_reasoning(ModelRequest::new(vec![Message::user("suggest")])),+ )+ .await+ .expect("hinted call");+ backend+ .invoke(&(), ModelRequest::new(vec![Message::user("chat")]))+ .await+ .expect("plain call");++ let bodies = bodies.lock().unwrap();+ assert_eq!(bodies.len(), 2);+ assert_eq!(+ bodies[0]["reasoning"],+ serde_json::json!({ "enabled": false })+ );+ assert!(+ bodies[1].get("reasoning").is_none(),+ "an unhinted call must not change reasoning: {}",+ bodies[1]+ );+ // The hint itself never reaches the wire.+ assert!(!bodies[0].to_string().contains("openhuman_reasoning_off"));+}diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rsindex f80160e373..6049879da9 100644--- a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs@@ -360,163 +360,8 @@ async fn probe_readiness_fails_open_on_timeout_or_5xx() {);}-// ── reasoning-off hint ───────────────────────────────────────────────────--#[test]-fn reasoning_hint_becomes_disabled_reasoning_on_the_managed_wire() {- let request = apply_reasoning_hint(without_reasoning(ModelRequest::new(vec![Message::user(- "hi",- )])));- assert_eq!(- request.provider_options["reasoning"],- serde_json::json!({ "enabled": false })- );-}--#[test]-fn no_hint_leaves_provider_options_untouched() {- let request = apply_reasoning_hint(ModelRequest::new(vec![Message::user("hi")]));- assert!(request.provider_options.get("reasoning").is_none());-}--#[test]-fn request_reasoning_effort_becomes_the_managed_reasoning_object() {- use tinyinference_llm::model::{ReasoningConfig, ReasoningEffort};- let request = apply_reasoning_hint(- ModelRequest::new(vec![Message::user("hi")])- .with_reasoning(ReasoningConfig::effort(ReasoningEffort::High)),- );- assert_eq!(- request.provider_options["reasoning"],- serde_json::json!({ "effort": "high" })- );- assert!(- request.reasoning.is_none(),- "the neutral field is consumed so the transport sends no second `reasoning_effort`"- );-}--#[test]-fn request_reasoning_none_disables_reasoning_on_the_managed_wire() {- use tinyinference_llm::model::{ReasoningConfig, ReasoningEffort};- let request = apply_reasoning_hint(- ModelRequest::new(vec![Message::user("hi")])- .with_reasoning(ReasoningConfig::effort(ReasoningEffort::None)),- );- assert_eq!(- request.provider_options["reasoning"],- serde_json::json!({ "enabled": false })- );-}--#[test]-fn request_reasoning_budget_becomes_max_tokens() {- use tinyinference_llm::model::{ReasoningConfig, ReasoningEffort};- let request = apply_reasoning_hint(- ModelRequest::new(vec![Message::user("hi")]).with_reasoning(ReasoningConfig {- effort: Some(ReasoningEffort::High),- budget_tokens: Some(8_000),- summary: None,- }),- );- assert_eq!(- request.provider_options["reasoning"],- serde_json::json!({ "max_tokens": 8000 })- );-}--#[test]-fn suggestion_off_hint_wins_over_request_reasoning() {- use tinyinference_llm::model::{ReasoningConfig, ReasoningEffort};- let request = apply_reasoning_hint(- without_reasoning(ModelRequest::new(vec![Message::user("hi")]))- .with_reasoning(ReasoningConfig::effort(ReasoningEffort::Low)),- );- assert_eq!(- request.provider_options["reasoning"],- serde_json::json!({ "enabled": false })- );-}--#[test]-fn explicit_reasoning_option_wins_over_the_hint() {- let request = without_reasoning(ModelRequest::new(vec![Message::user("hi")]))- .with_provider_options(serde_json::json!({ "reasoning": { "effort": "high" } }));- let request = apply_reasoning_hint(request);- assert_eq!(- request.provider_options["reasoning"],- serde_json::json!({ "effort": "high" })- );-}--/// Captures the JSON body of every chat-completions request it receives.-async fn spawn_capturing_chat_server() -> (String, std::sync::Arc<std::sync::Mutex<Vec<Value>>>) {- let bodies = std::sync::Arc::new(std::sync::Mutex::new(Vec::new()));- let seen = bodies.clone();- let listener = tokio::net::TcpListener::bind("127.0.0.1:0")- .await- .expect("bind");- let addr = listener.local_addr().expect("local_addr").to_string();- let app = axum::Router::new().route(- "/openai/v1/chat/completions",- axum::routing::post(move |axum::Json(body): axum::Json<Value>| {- let seen = seen.clone();- async move {- seen.lock().unwrap().push(body);- axum::Json(serde_json::json!({- "id": "chatcmpl-capture",- "object": "chat.completion",- "created": 1,- "model": "reasoning-v1",- "choices": [{- "index": 0,- "message": { "role": "assistant", "content": "[]" },- "finish_reason": "stop"- }],- "usage": { "prompt_tokens": 1, "completion_tokens": 1, "total_tokens": 2 }- }))- }- }),- );- tokio::spawn(async move {- axum::serve(listener, app).await.expect("serve");- });- (addr, bodies)-}--#[tokio::test]-async fn managed_call_sends_reasoning_disabled_only_when_hinted() {- let tmp = tempfile::TempDir::new().unwrap();- seed_app_session(tmp.path());- let (addr, bodies) = spawn_capturing_chat_server().await;- let backend = backend_pointed_at(&addr, tmp.path());-- backend- .invoke(- &(),- without_reasoning(ModelRequest::new(vec![Message::user("suggest")])),- )- .await- .expect("hinted call");- backend- .invoke(&(), ModelRequest::new(vec![Message::user("chat")]))- .await- .expect("plain call");-- let bodies = bodies.lock().unwrap();- assert_eq!(bodies.len(), 2);- assert_eq!(- bodies[0]["reasoning"],- serde_json::json!({ "enabled": false })- );- assert!(- bodies[1].get("reasoning").is_none(),- "an unhinted call must not change reasoning: {}",- bodies[1]- );- // The hint itself never reaches the wire.- assert!(!bodies[0].to_string().contains("openhuman_reasoning_off"));-}+#[path = "openhuman_backend_model_reasoning_tests.rs"]+mod reasoning_tests;// ── shared pooled client (time to first token) ──────────────────────────@@ -584,16 +429,8 @@ async fn consecutive_managed_calls_reuse_one_connection() {);}-// ── resolve_bearer local-expiry precheck (#5503, part e) ───────────────-#[test]fn resolve_bearer_fast_fails_session_expired_on_expired_token() {- // An app-session JWT whose recorded `exp` is in the past must fail the- // precheck as a `SESSION_EXPIRED` sentinel BEFORE any request is built —- // so the web-chat classifier routes it to `session_expired` (actionable- // re-auth) instead of a doomed request that can surface as a misleading- // "model unavailable" (#5503). No backend is stood up: a correct- // precheck never reaches the network.let tmp = tempfile::TempDir::new().unwrap();let past = (chrono::Utc::now() - chrono::Duration::hours(1)).to_rfc3339();seed_app_session_with_expiry(tmp.path(), &past);@@ -615,8 +452,6 @@ fn resolve_bearer_fast_fails_session_expired_on_expired_token() {#[test]fn resolve_bearer_returns_token_when_expiry_in_future() {- // A recorded `exp` comfortably in the future resolves normally — the- // precheck only rejects the past-expiry case.let tmp = tempfile::TempDir::new().unwrap();let future = (chrono::Utc::now() + chrono::Duration::hours(1)).to_rfc3339();seed_app_session_with_expiry(tmp.path(), &future);@@ -628,8 +463,6 @@ fn resolve_bearer_returns_token_when_expiry_in_future() {assert_eq!(token, "test.session.jwt");}-// ── managed-bearer transport safety for a stored API key (CWE-319) ─────-fn backend_with_api_key(api_url: &str, dir: &std::path::Path) -> OpenHumanBackendModel {crate::security::credentials::api_key::store_api_key_in(dir, false, "th_test_key").expect("seed api key");@@ -685,8 +518,6 @@ fn resolve_bearer_rejects_foreign_https_for_api_key() {#[test]fn resolve_bearer_sends_a_stored_api_key_over_plain_loopback() {- // Plain HTTP to loopback stays allowed — the same local-testing- // allowance `openhuman_embed::turn::is_safe_endpoint_for_bearer` makes.let tmp = tempfile::TempDir::new().unwrap();let backend = backend_with_api_key("http://127.0.0.1:9999", tmp.path());@@ -698,10 +529,6 @@ fn resolve_bearer_sends_a_stored_api_key_over_plain_loopback() {#[test]fn resolve_bearer_returns_token_for_exp_less_offline_session() {- // Offline / local sessions record no `exp`, so the precheck falls- // through to presence-only and their behaviour is unchanged (the- // post-call 401 net still covers a server-side revocation). Guards the- // #5503 precheck against breaking the offline path.let tmp = tempfile::TempDir::new().unwrap();seed_app_session(tmp.path());let backend = backend_pointed_at("127.0.0.1:9", tmp.path());@@ -711,5 +538,10 @@ fn resolve_bearer_returns_token_for_exp_less_offline_session() {.expect("an exp-less offline session must resolve (presence-only)");assert_eq!(token, "test.session.jwt");}+#[path = "openhuman_backend_model_auth_tests.rs"]+mod auth_tests;#[path = "openhuman_backend_model_endpoint_tests.rs"]mod endpoint_tests;++#[path = "openhuman_backend_model_offline_session_tests.rs"]+mod offline_session_tests;diff --git a/crates/openhuman-core/src/lib.rs b/crates/openhuman-core/src/lib.rsindex b540aba55c..929054a663 100644--- a/crates/openhuman-core/src/lib.rs+++ b/crates/openhuman-core/src/lib.rs@@ -112,6 +112,6 @@ pub use core::types::HostKind;pub fn run_core_from_args(args: &[String]) -> anyhow::Result<()> {core::cli::load_dotenv_for_cli()?;platform::service::apply_startup_restart_delay_from_env();- security::keyring::init_master_key();+ security::keyring::init_master_key().map_err(anyhow::Error::msg)?;core::cli::run_from_cli_args(args)}diff --git a/crates/openhuman-core/src/memory/brain.rs b/crates/openhuman-core/src/memory/brain.rsindex 563113e10a..5c023e4800 100644--- a/crates/openhuman-core/src/memory/brain.rs+++ b/crates/openhuman-core/src/memory/brain.rs@@ -12,7 +12,7 @@use serde::{Deserialize, Serialize};use tinymemory_api::{ExploreRequest, Facet, Hit, Namespace, StoreItem, WriteOptions};-use tinymemory_integrations::documents::{NativeConverter, RawDocument};+use tinymemory_integrations::documents::RawDocument;use tinymemory_tools::{Brain, BrainSource, MemoryLayout};use crate::config::schema::MemorySourceKind;@@ -230,11 +230,14 @@ pub async fn ingest(config: &Config, params: BrainIngestParams) -> MemoryResult<}let mut meta = tinymemory_api::MemoryMeta::default();meta.file_path = Some(path.display().to_string());- tinymemory_integrations::brain::brain_document(&NativeConverter, &raw, source, meta)- .await- .map_err(|error| {- MemoryError::invalid(format!("cannot convert the file: {error}"))- })?+ tinymemory_integrations::brain::brain_document(+ super::convert::converter(),+ &raw,+ source,+ meta,+ )+ .await+ .map_err(|error| MemoryError::invalid(format!("cannot convert the file: {error}")))?}(None, Some(text)) => {tinymemory_tools::BrainDocument::new(source.unwrap_or(BrainSource::Markdown), text)@@ -248,7 +251,12 @@ pub async fn ingest(config: &Config, params: BrainIngestParams) -> MemoryResult<let ingested = brain(config)?.ingest_with(document, WriteOptions::accepted()).await?;- jobs::enqueue(config, layout(config).root(), vec![ingested.job]).await;+ jobs::enqueue(+ config,+ layout(config).root(),+ ingested.job.into_iter().collect(),+ )+ .await;tracing::debug!(source = %filed, replayed = ingested.receipt.replayed, "[memory:brain] ingested");Ok(BrainIngestView {id: ingested.receipt.id.to_string(),diff --git a/crates/openhuman-core/src/memory/brain_tests.rs b/crates/openhuman-core/src/memory/brain_tests.rsindex 2feb4cd42a..6a50eb6c02 100644--- a/crates/openhuman-core/src/memory/brain_tests.rs+++ b/crates/openhuman-core/src/memory/brain_tests.rs@@ -205,3 +205,35 @@ async fn a_file_is_converted_and_filed_by_its_format() {let docs = stored(&engine, MetaFilter::kinds([ItemKind::Document])).await;assert_eq!(docs[0].meta.namespace.to_string(), "source:markdown");}++#[tokio::test]+async fn an_ingest_queues_a_belief_build_only_for_an_engine_that_waits_for_one() {+ use std::sync::Arc;+ use tinymemory_api::conformance::ReferenceEngine;+ use tinymemory_api::Consolidation;++ for (consolidation, queued) in [(Consolidation::OnDemand, 1), (Consolidation::Automatic, 0)] {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ crate::memory::engine::install_test_engine(+ &config.workspace_dir,+ Arc::new(ReferenceEngine::new().with_consolidation(consolidation)),+ );+ ingest(+ &config,+ BrainIngestParams {+ path: None,+ text: Some("Refunds are issued within 14 days.".into()),+ source: Some("notion".into()),+ title: None,+ },+ )+ .await+ .unwrap();+ let pending = crate::memory::lifecycle::jobs::snapshot(&config)+ .await+ .pending+ .len();+ assert_eq!(pending, queued, "{consolidation:?}");+ }+}diff --git a/crates/openhuman-core/src/memory/bus.rs b/crates/openhuman-core/src/memory/bus.rsindex 5a7a8b6111..4048f496ce 100644--- a/crates/openhuman-core/src/memory/bus.rs+++ b/crates/openhuman-core/src/memory/bus.rs@@ -5,7 +5,8 @@//!//! - `memory_sources_sync` starts the due source syncs;//! - `memory_background` runs the queued belief builds and deferred ingests-//! (`lifecycle::jobs`).+//! (`lifecycle::jobs`), after resuming a v1 import the app quit in the+//! middle of (`import::resume_interrupted`).//!//! Turns are not ingested from the bus: the session host calls the lifecycle//! hooks itself, under the session's own config (`lifecycle::hooks`).@@ -68,7 +69,10 @@ pub async fn run_system_job(config: &crate::config::Config, job: &str) {"[memory:bus] due source syncs started");}- BACKGROUND_JOB => super::lifecycle::jobs::run_due(config).await,+ BACKGROUND_JOB => {+ super::import::resume_interrupted(config).await;+ super::lifecycle::jobs::run_due(config).await;+ }_ => {}}}diff --git a/crates/openhuman-core/src/memory/convert.rs b/crates/openhuman-core/src/memory/convert.rsnew file mode 100644index 0000000000..557cfb68e9--- /dev/null+++ b/crates/openhuman-core/src/memory/convert.rs@@ -0,0 +1,77 @@+//! The document converter memory files with: PDF, DOCX, PPTX and XLSX through+//! TinyMemory's `OfficeConverter` (with the `documents` feature, which the+//! shipped product enables), then its `NativeConverter` for text, markdown,+//! HTML and code. Without `documents` the chain is native only, and an office+//! file is refused as before; the parsers stay off the always-on path.+//!+//! Brain ingest (`memory_brain_ingest` with a `path`) and file-backed sources+//! (folder, file) both convert through [`converter`], so a PDF filed by hand+//! and a PDF in a synced folder read the same. Without the office converter+//! both refused office formats with "the native converter does not handle+//! pdf" (#6718).+//!+//! Office parsing is CPU-bound and synchronous, so it runs on Tokio's+//! blocking pool rather than on a runtime worker (`OfficeConverter`'s own+//! async `convert` would parse inline). Size is capped upstream by+//! `MAX_DOCUMENT_BYTES`.++use std::sync::LazyLock;++use tinymemory_integrations::documents::ConverterChain;+#[cfg(feature = "documents")]+use {+ async_trait::async_trait,+ tinymemory_integrations::documents::{+ ConvertedDocument, DocumentConverter, DocumentFormat, Error, OfficeConverter, RawDocument,+ Result,+ },+};++/// [`OfficeConverter`] on the blocking pool.+#[cfg(feature = "documents")]+struct BlockingOffice;++#[cfg(feature = "documents")]+#[async_trait]+impl DocumentConverter for BlockingOffice {+ fn name(&self) -> &str {+ OfficeConverter.name()+ }++ fn supports(&self, format: DocumentFormat) -> bool {+ OfficeConverter.supports(format)+ }++ async fn convert(&self, document: &RawDocument) -> Result<ConvertedDocument> {+ let document = document.clone();+ tokio::task::spawn_blocking(move || OfficeConverter.convert_blocking(&document))+ .await+ .map_err(task_failed)?+ }+}++/// The error for a conversion task that never finished (it panicked or was+/// cancelled): a converter failure, never a crash of the caller.+#[cfg(feature = "documents")]+fn task_failed(error: impl std::fmt::Display) -> Error {+ Error::Converter {+ converter: "office".to_string(),+ message: format!("the conversion task did not finish: {error}"),+ }+}++static CHAIN: LazyLock<ConverterChain> = LazyLock::new(|| {+ let chain = ConverterChain::default();+ #[cfg(feature = "documents")]+ let chain = chain.prepend(Box::new(BlockingOffice));+ chain+});++/// The converter every memory write of a file goes through.+pub(crate) fn converter() -> &'static ConverterChain {+ &CHAIN+}++#[cfg(test)]+#[path = "convert_tests.rs"]+mod tests;diff --git a/crates/openhuman-core/src/memory/convert_tests.rs b/crates/openhuman-core/src/memory/convert_tests.rsnew file mode 100644index 0000000000..4f24435de9--- /dev/null+++ b/crates/openhuman-core/src/memory/convert_tests.rs@@ -0,0 +1,136 @@+use super::*;++use tinymemory_integrations::documents::{DocumentConverter, Error, RawDocument};+#[cfg(feature = "documents")]+use {+ crate::memory::brain::{ingest, BrainIngestParams},+ crate::memory::test_fixtures::{bind_reference, config_in, stored},+ tinymemory_api::{ItemKind, MetaFilter},+};++/// A one-page PDF whose only text is `text` (Helvetica, no compression).+fn pdf_saying(text: &str) -> Vec<u8> {+ let stream = format!("BT /F1 12 Tf 72 720 Td ({text}) Tj ET");+ let objects = [+ "<< /Type /Catalog /Pages 2 0 R >>".to_string(),+ "<< /Type /Pages /Kids [3 0 R] /Count 1 >>".to_string(),+ "<< /Type /Page /Parent 2 0 R /MediaBox [0 0 612 792] /Contents 4 0 R \+ /Resources << /Font << /F1 5 0 R >> >> >>"+ .to_string(),+ format!(+ "<< /Length {} >>\nstream\n{stream}\nendstream",+ stream.len()+ ),+ "<< /Type /Font /Subtype /Type1 /BaseFont /Helvetica >>".to_string(),+ ];+ let mut out = String::from("%PDF-1.4\n");+ let mut offsets = Vec::new();+ for (i, object) in objects.iter().enumerate() {+ offsets.push(out.len());+ out.push_str(&format!("{} 0 obj\n{object}\nendobj\n", i + 1));+ }+ let xref = out.len();+ out.push_str(&format!(+ "xref\n0 {}\n0000000000 65535 f \n",+ objects.len() + 1+ ));+ for offset in offsets {+ out.push_str(&format!("{offset:010} 00000 n \n"));+ }+ out.push_str(&format!(+ "trailer\n<< /Size {} /Root 1 0 R >>\nstartxref\n{xref}\n%%EOF\n",+ objects.len() + 1+ ));+ out.into_bytes()+}++#[cfg(feature = "documents")]+#[tokio::test]+async fn a_pdf_converts_to_its_text() {+ let raw = RawDocument::new(pdf_saying("The vendor code is PV-7023")).with_filename("brief.pdf");+ let converted = converter()+ .convert(&raw)+ .await+ .expect("the office converter reads pdf");+ assert!(+ converted.markdown.contains("PV-7023"),+ "{}",+ converted.markdown+ );+}++#[tokio::test]+async fn markdown_still_goes_through_the_native_converter() {+ let raw = RawDocument::new(b"# Note\n\nPlain markdown.".to_vec()).with_filename("note.md");+ let converted = converter()+ .convert(&raw)+ .await+ .expect("native handles markdown");+ assert!(converted.markdown.contains("Plain markdown."));+}++#[tokio::test]+async fn an_unknown_binary_is_still_refused_with_a_clear_error() {+ let raw = RawDocument::new(vec![0u8, 1, 2, 3, 255]).with_filename("blob.bin");+ let error = converter().convert(&raw).await.unwrap_err();+ assert!(matches!(error, Error::UnsupportedFormat(_)), "{error}");+}++#[cfg(feature = "documents")]+#[tokio::test]+async fn brain_ingest_files_a_pdf_by_path() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ let engine = bind_reference(&config);+ let path = tmp.path().join("brief.pdf");+ std::fs::write(&path, pdf_saying("The vendor code is PV-7023")).unwrap();++ let view = ingest(+ &config,+ BrainIngestParams {+ path: Some(path.display().to_string()),+ text: None,+ source: None,+ title: None,+ },+ )+ .await+ .expect("a pdf is ingested, not refused");+ assert_eq!(view.source, "pdf");++ let docs = stored(&engine, MetaFilter::kinds([ItemKind::Document])).await;+ assert_eq!(docs.len(), 1);+ assert!(docs[0].text.contains("PV-7023"), "{}", docs[0].text);+}++/// Without `documents` the office parsers are not linked: a PDF is refused+/// as unsupported, never mis-read as text.+#[cfg(not(feature = "documents"))]+#[tokio::test]+async fn without_the_documents_feature_a_pdf_is_refused_cleanly() {+ let raw = RawDocument::new(pdf_saying("The vendor code is PV-7023")).with_filename("brief.pdf");+ let error = converter().convert(&raw).await.unwrap_err();+ assert!(matches!(error, Error::UnsupportedFormat(_)), "{error}");+}++#[cfg(feature = "documents")]+#[test]+fn the_office_converter_names_itself_and_claims_only_office_formats() {+ use tinymemory_integrations::documents::DocumentFormat;+ assert_eq!(BlockingOffice.name(), "office");+ assert!(BlockingOffice.supports(DocumentFormat::Pdf));+ assert!(BlockingOffice.supports(DocumentFormat::Docx));+ assert!(!BlockingOffice.supports(DocumentFormat::Markdown));+}++#[cfg(feature = "documents")]+#[test]+fn a_conversion_task_that_dies_is_a_converter_error_not_a_crash() {+ match task_failed("task panicked") {+ Error::Converter { converter, message } => {+ assert_eq!(converter, "office");+ assert!(message.contains("task panicked"), "{message}");+ }+ other => panic!("expected a converter error, got {other:?}"),+ }+}diff --git a/crates/openhuman-core/src/memory/engine.rs b/crates/openhuman-core/src/memory/engine.rsindex e0820c358a..e4c81646b1 100644--- a/crates/openhuman-core/src/memory/engine.rs+++ b/crates/openhuman-core/src/memory/engine.rs@@ -254,6 +254,7 @@ fn resolve_tinyhumans(config: &Config) -> Binding {EngineSettings {endpoint: Some(endpoint),headers,+ ..EngineSettings::default()},fingerprint,EngineCredential::Dynamic(source),diff --git a/crates/openhuman-core/src/memory/error.rs b/crates/openhuman-core/src/memory/error.rsindex aaf623472d..eb25f4ba99 100644--- a/crates/openhuman-core/src/memory/error.rs+++ b/crates/openhuman-core/src/memory/error.rs@@ -1,8 +1,11 @@//! The memory RPC error taxonomy.//!-//! Every `openhuman.memory_*` failure carries one of five stable codes in its+//! Every `openhuman.memory_*` failure carries one of seven stable codes in its//! structured error `data.code` (and `data.kind`): `MEMORY_OFF`,-//! `UNSUPPORTED`, `INVALID_REQUEST`, `UNAUTHORIZED` or `ENGINE`. Messages never+//! `UNSUPPORTED`, `INVALID_REQUEST`, `UNAUTHORIZED`, `INSUFFICIENT_CREDITS`,+//! `UNAVAILABLE` or `ENGINE`. The two account-wide refusals are split out of+//! `ENGINE` so a caller can tell "top up" and "try again later" apart from an+//! engine fault, and neither from an empty memory (#6718). Messages never//! carry a credential: engine errors are already sanitised by TinyMemory, and//! the host adds only ids and reasons.@@ -18,6 +21,10 @@ pub const UNSUPPORTED: &str = "UNSUPPORTED";pub const INVALID_REQUEST: &str = "INVALID_REQUEST";/// `data.code` when the engine rejected the credential.pub const UNAUTHORIZED: &str = "UNAUTHORIZED";+/// `data.code` when the hosted engine refused for an exhausted credit balance.+pub const INSUFFICIENT_CREDITS: &str = "INSUFFICIENT_CREDITS";+/// `data.code` when the engine could not be reached or is overloaded.+pub const UNAVAILABLE: &str = "UNAVAILABLE";/// `data.code` for the engine's own failure.pub const ENGINE: &str = "ENGINE";@@ -36,6 +43,12 @@ pub enum MemoryError {/// The engine rejected the credential.#[error("unauthorized: {0}")]Unauthorized(String),+ /// The hosted engine refused: the account is out of credits.+ #[error("insufficient credits: {0}")]+ InsufficientCredits(String),+ /// The engine could not be reached, timed out or is overloaded.+ #[error("unavailable: {0}")]+ Unavailable(String),/// The engine (or the host around it) failed.#[error("engine error: {0}")]Engine(String),@@ -50,6 +63,8 @@ impl MemoryError {Self::Unsupported(_) => UNSUPPORTED,Self::InvalidRequest(_) => INVALID_REQUEST,Self::Unauthorized(_) => UNAUTHORIZED,+ Self::InsufficientCredits(_) => INSUFFICIENT_CREDITS,+ Self::Unavailable(_) => UNAVAILABLE,Self::Engine(_) => ENGINE,}}@@ -59,6 +74,21 @@ impl MemoryError {Self::InvalidRequest(message.into())}+ /// Whether this refuses every request on the account, not just this one:+ /// memory off, a rejected credential, no credits, or no engine to reach.+ /// A loop over items stops on these instead of skipping every item, and+ /// a queued job is not charged an attempt for them.+ #[must_use]+ pub fn is_account_wide(&self) -> bool {+ matches!(+ self,+ Self::Off(_)+ | Self::Unauthorized(_)+ | Self::InsufficientCredits(_)+ | Self::Unavailable(_)+ )+ }+/// The structured JSON-RPC error. Everything except an engine failure is/// an expected user-visible state, so the boundary does not report it.#[must_use]@@ -74,18 +104,45 @@ impl MemoryError {impl From<tinymemory_api::Error> for MemoryError {fn from(error: tinymemory_api::Error) -> Self {use tinymemory_api::Error as E;+ // A 402 arrives as `Engine` with the backend's code on its message.+ let credits = tinymemory_integrations::cortex::is_insufficient_credits(&error);match error {E::Unsupported(message) => Self::Unsupported(message),E::InvalidRequest(message) | E::NotFound(message) => Self::InvalidRequest(message),E::Unauthorized(message) => Self::Unauthorized(message),E::Config(message) => Self::InvalidRequest(message),- E::Conflict(message) | E::Unavailable(message) | E::Engine(message) => {- Self::Engine(message)- }+ E::Unavailable(message) => Self::Unavailable(message),+ E::Engine(message) if credits => Self::InsufficientCredits(message),+ E::Conflict(message) | E::Engine(message) => Self::Engine(message),}}}+impl MemoryError {+ /// The account-wide refusal behind a recall section's skip reason, if it+ /// was one.+ ///+ /// TinyMemory's holistic recall does not fail when a section's read+ /// fails: it skips the section and keeps the engine error's text as the+ /// reason. That text is `tinymemory_api::Error`'s `Display`, so the+ /// variant can be read back from its tag (`unauthorized: `,+ /// `unavailable: `, `engine error: [USER_INSUFFICIENT_CREDITS] …`).+ #[must_use]+ pub fn refusal_from_skip_reason(reason: &str) -> Option<Self> {+ use tinymemory_api::Error as E;+ let error = if let Some(message) = reason.strip_prefix("unauthorized: ") {+ E::Unauthorized(message.to_string())+ } else if let Some(message) = reason.strip_prefix("unavailable: ") {+ E::Unavailable(message.to_string())+ } else if let Some(message) = reason.strip_prefix("engine error: ") {+ E::Engine(message.to_string())+ } else {+ return None;+ };+ Some(Self::from(error)).filter(Self::is_account_wide)+ }+}+impl From<MemoryError> for String {fn from(error: MemoryError) -> Self {error.to_structured().encode()diff --git a/crates/openhuman-core/src/memory/error_tests.rs b/crates/openhuman-core/src/memory/error_tests.rsindex 99c66e2dc2..d436759d26 100644--- a/crates/openhuman-core/src/memory/error_tests.rs+++ b/crates/openhuman-core/src/memory/error_tests.rs@@ -7,6 +7,11 @@ fn every_variant_has_its_stable_code() {assert_eq!(MemoryError::invalid("x").code(), INVALID_REQUEST);assert_eq!(MemoryError::Unauthorized("x".into()).code(), UNAUTHORIZED);assert_eq!(MemoryError::Engine("x".into()).code(), ENGINE);+ assert_eq!(+ MemoryError::InsufficientCredits("x".into()).code(),+ INSUFFICIENT_CREDITS+ );+ assert_eq!(MemoryError::Unavailable("x".into()).code(), UNAVAILABLE);}#[test]@@ -31,7 +36,7 @@ fn tinymemory_errors_map_onto_the_taxonomy() {(E::Config("a".into()), INVALID_REQUEST),(E::Unauthorized("a".into()), UNAUTHORIZED),(E::Conflict("a".into()), ENGINE),- (E::Unavailable("a".into()), ENGINE),+ (E::Unavailable("a".into()), UNAVAILABLE),(E::Engine("a".into()), ENGINE),];for (error, code) in cases {@@ -45,3 +50,40 @@ fn into_string_encodes_the_structured_error() {assert!(encoded.contains(INVALID_REQUEST), "{encoded}");assert!(encoded.contains("bad"), "{encoded}");}++#[test]+fn account_wide_refusals_get_their_own_codes() {+ use tinymemory_api::Error as E;+ let credits = MemoryError::from(E::Engine(+ "[USER_INSUFFICIENT_CREDITS] memory API recall on h: the account has insufficient \+ credits (HTTP 402)"+ .into(),+ ));+ assert_eq!(credits.code(), INSUFFICIENT_CREDITS);+ assert!(credits.is_account_wide());+ assert!(credits.to_structured().expected_user_state);++ let down = MemoryError::from(E::Unavailable("timed out".into()));+ assert_eq!(down.code(), UNAVAILABLE);+ assert!(down.is_account_wide());++ // Another backend code on an engine failure stays an engine failure.+ let other = MemoryError::from(E::Engine("[HTTP_500] boom".into()));+ assert_eq!(other.code(), ENGINE);+ assert!(!other.is_account_wide());+ assert!(!MemoryError::invalid("bad").is_account_wide());+}++#[test]+fn a_skip_reason_reads_back_only_account_wide_refusals() {+ let code = |reason: &str| MemoryError::refusal_from_skip_reason(reason).map(|e| e.code());+ assert_eq!(+ code("engine error: [USER_INSUFFICIENT_CREDITS] memory API fetch (HTTP 402)"),+ Some(INSUFFICIENT_CREDITS)+ );+ assert_eq!(code("unavailable: connection refused"), Some(UNAVAILABLE));+ assert_eq!(code("unauthorized: key rejected"), Some(UNAUTHORIZED));+ assert_eq!(code("engine error: index corrupt"), None);+ assert_eq!(code("invalid request: bad filter"), None);+ assert_eq!(code("empty"), None);+}diff --git a/crates/openhuman-core/src/memory/guard.rs b/crates/openhuman-core/src/memory/guard.rsindex 935332b805..d6ab7f9d1b 100644--- a/crates/openhuman-core/src/memory/guard.rs+++ b/crates/openhuman-core/src/memory/guard.rs@@ -7,27 +7,68 @@//! write through TinyMemory's own types (`AgentMemory::pre_turn` ///! `post_turn`, `Brain::ingest`, background ingests) as well as the host's.//! Reads pass through untouched.+//!+//! The same wrapper times every engine call: one `[memory:timing]` debug+//! line with the op, engine, `elapsed_ms`, outcome (`ok` or the error code)+//! and a result count, never user content (tinyhumansai/backend#1405).+use std::future::Future;use std::sync::Arc;+use std::time::Instant;use async_trait::async_trait;use tinymemory_api::{BeliefsRequest, ConsolidateReceipt, ConsolidateRequest, EngineDescriptor, EngineHealth,ExplorePage, ExploreRequest, FetchPage, FetchRequest, ForgetReport, ForgetTarget, GetRequest,Hit, ListPage, ListRequest, MemoryEngine, RecallAnswer, RecallRequest, Result, StoreItem,- StoreReceipt, WriteOptions,+ StoreReceipt, WaitFor, WriteOptions,};-/// `inner` with every stored item scrubbed first.+use super::error::MemoryError;++/// `inner` with every stored item scrubbed first, and every call timed.pub struct ScrubbingEngine {inner: Arc<dyn MemoryEngine>,+ id: String,}impl ScrubbingEngine {/// Guards `inner`.#[must_use]pub fn wrap(inner: Arc<dyn MemoryEngine>) -> Arc<dyn MemoryEngine> {- Arc::new(Self { inner })+ let id = inner.descriptor().id.to_string();+ Arc::new(Self { inner, id })+ }++ /// Runs `call` and logs its timing; `count` sizes a success.+ async fn timed<T>(+ &self,+ op: &'static str,+ call: impl Future<Output = Result<T>>,+ count: impl FnOnce(&T) -> usize,+ ) -> Result<T> {+ let started = Instant::now();+ let result = call.await;+ let elapsed_ms = started.elapsed().as_millis() as u64;+ let outcome = outcome(&result);+ let count = result.as_ref().map_or(0, count);+ tracing::debug!(+ op,+ engine = %self.id,+ elapsed_ms,+ outcome,+ count,+ "[memory:timing]"+ );+ result+ }+}++/// `ok`, or the stable code of the error a call failed with.+fn outcome<T>(result: &Result<T>) -> &'static str {+ match result {+ Ok(_) => "ok",+ Err(error) => MemoryError::from(error.clone()).code(),}}@@ -55,53 +96,88 @@ impl MemoryEngine for ScrubbingEngine {}async fn health(&self) -> EngineHealth {- self.inner.health().await+ let started = Instant::now();+ let health = self.inner.health().await;+ let outcome = match &health {+ EngineHealth::Ok => "ok",+ EngineHealth::Degraded(_) => "degraded",+ EngineHealth::Down(_) => "down",+ };+ tracing::debug!(+ op = "health",+ engine = %self.id,+ elapsed_ms = started.elapsed().as_millis() as u64,+ outcome,+ "[memory:timing]"+ );+ health}async fn recall(&self, req: RecallRequest) -> Result<RecallAnswer> {- self.inner.recall(req).await+ self.timed("recall", self.inner.recall(req), |answer| {+ answer.citations.len()+ })+ .await}async fn fetch(&self, req: FetchRequest) -> Result<FetchPage> {- self.inner.fetch(req).await+ self.timed("fetch", self.inner.fetch(req), |page| page.hits.len())+ .await}async fn store(&self, item: StoreItem) -> Result<StoreReceipt> {- self.inner.store(scrub(item)).await+ self.timed("store", self.inner.store(scrub(item)), |_| 1)+ .await}async fn store_with(&self, item: StoreItem, options: WriteOptions) -> Result<StoreReceipt> {- self.inner.store_with(scrub(item), options).await+ let op = match options.wait {+ WaitFor::Accepted => "store_accepted",+ WaitFor::Visible => "store",+ };+ self.timed(op, self.inner.store_with(scrub(item), options), |_| 1)+ .await}async fn store_many(&self, items: Vec<StoreItem>) -> Result<Vec<StoreReceipt>> {- self.inner- .store_many(items.into_iter().map(scrub).collect())+ let items = items.into_iter().map(scrub).collect();+ self.timed("store_many", self.inner.store_many(items), Vec::len).await}async fn forget(&self, target: ForgetTarget) -> Result<ForgetReport> {- self.inner.forget(target).await+ self.timed("forget", self.inner.forget(target), |report| {+ report.forgotten+ })+ .await}async fn list(&self, req: ListRequest) -> Result<ListPage> {- self.inner.list(req).await+ self.timed("list", self.inner.list(req), |page| page.items.len())+ .await}async fn explore(&self, req: ExploreRequest) -> Result<ExplorePage> {- self.inner.explore(req).await+ self.timed("explore", self.inner.explore(req), |page| {+ page.buckets.len()+ })+ .await}async fn get(&self, req: GetRequest) -> Result<Vec<Hit>> {- self.inner.get(req).await+ self.timed("get", self.inner.get(req), Vec::len).await}async fn consolidate(&self, req: ConsolidateRequest) -> Result<ConsolidateReceipt> {- self.inner.consolidate(req).await+ self.timed("consolidate", self.inner.consolidate(req), |receipt| {+ receipt.jobs.len()+ })+ .await}async fn beliefs(&self, req: BeliefsRequest) -> Result<Vec<Hit>> {- self.inner.beliefs(req).await+ self.timed("beliefs", self.inner.beliefs(req), Vec::len)+ .await}}diff --git a/crates/openhuman-core/src/memory/guard_tests.rs b/crates/openhuman-core/src/memory/guard_tests.rsindex 331b41cac3..c7c2fb861b 100644--- a/crates/openhuman-core/src/memory/guard_tests.rs+++ b/crates/openhuman-core/src/memory/guard_tests.rs@@ -45,3 +45,90 @@ async fn every_write_path_is_scrubbed() {);assert_eq!(guarded.descriptor().id, reference.descriptor().id);}++#[test]+fn a_timed_call_reports_ok_or_the_error_code() {+ assert_eq!(outcome(&Ok::<(), _>(())), "ok");+ let refused: Result<()> = Err(tinymemory_api::Error::Unauthorized("bad key".into()));+ assert_eq!(outcome(&refused), "UNAUTHORIZED");+}++#[tokio::test]+async fn every_read_passes_through_the_timer_unchanged() {+ let reference = Arc::new(ReferenceEngine::new());+ let guarded = ScrubbingEngine::wrap(reference.clone());+ let id = guarded+ .store(StoreItem::document("oolong tea", MemoryMeta::default()))+ .await+ .unwrap()+ .id;+ let reach = tinymemory_api::Reach::subtree(tinymemory_api::Namespace::ROOT);++ assert_eq!(guarded.health().await, reference.health().await);+ assert_eq!(+ guarded+ .recall(RecallRequest::new("oolong", 5))+ .await+ .unwrap(),+ reference+ .recall(RecallRequest::new("oolong", 5))+ .await+ .unwrap()+ );+ let fetch = || FetchRequest::new("oolong", tinymemory_api::FetchMode::Keyword, 5);+ assert_eq!(+ guarded.fetch(fetch()).await.unwrap(),+ reference.fetch(fetch()).await.unwrap()+ );+ let get = || GetRequest {+ ids: vec![id.clone()],+ reach: None,+ };+ assert_eq!(guarded.get(get()).await.unwrap().len(), 1);+ let explore = || ExploreRequest::new(tinymemory_api::Facet::Kind, 5);+ assert_eq!(+ guarded.explore(explore()).await.ok(),+ reference.explore(explore()).await.ok()+ );+ assert_eq!(+ guarded+ .consolidate(ConsolidateRequest::new(reach.clone()))+ .await+ .ok(),+ reference+ .consolidate(ConsolidateRequest::new(reach.clone()))+ .await+ .ok()+ );+ assert_eq!(+ guarded+ .beliefs(BeliefsRequest::new(reach.clone(), 5))+ .await+ .ok(),+ reference.beliefs(BeliefsRequest::new(reach, 5)).await.ok()+ );+ assert_eq!(+ guarded+ .forget(ForgetTarget::Ids(vec![id]))+ .await+ .unwrap()+ .forgotten,+ 1+ );+}++#[test]+fn scrubbing_keeps_the_page_breaks_a_document_is_chunked_by() {+ let body = format!("Page one key={SECRET}\u{c}Page two.\u{c}Page three.");+ let scrubbed = scrub(StoreItem::document(body, MemoryMeta::default()));+ let StoreItem::Document {+ body: tinymemory_api::DocumentBody::Text(text),+ ..+ } = scrubbed+ else {+ panic!("a document");+ };+ assert!(!text.contains(SECRET), "{text}");+ assert_eq!(text.matches('\u{c}').count(), 2, "{text:?}");+ assert!(text.ends_with("\u{c}Page two.\u{c}Page three."), "{text:?}");+}diff --git a/crates/openhuman-core/src/memory/import.rs b/crates/openhuman-core/src/memory/import.rsindex a6f7b1f5cb..8ca67607e3 100644--- a/crates/openhuman-core/src/memory/import.rs+++ b/crates/openhuman-core/src/memory/import.rs@@ -8,21 +8,24 @@//! the resumable [`Checkpoint`]. Progress and the checkpoint persist in//! `<workspace>/memory/import_state.json`, so a restarted import resumes where//! the last one stopped (an item stored but not yet checkpointed is re-sent,-//! and the engine treats it as a replay).+//! and the engine treats it as a replay). An import the app quit in the middle+//! of resumes on its own ([`resume_interrupted`]); one stopped by a failure+//! that is not about a single item (credits exhausted, signed out, engine+//! unreachable) waits for the user to start it again.use std::collections::HashSet;use std::path::{Path, PathBuf};-use std::sync::{LazyLock, Mutex};+use std::sync::{Arc, LazyLock, Mutex};use serde::{Deserialize, Serialize};use tinymemory_api::ItemKind;+use tinymemory_integrations::cortex::is_insufficient_credits;use tinymemory_integrations::import::{Checkpoint, ImportedItem, LegacyWorkspace};use crate::config::Config;use super::engine::{self, BoundEngine};use super::error::{MemoryError, MemoryResult};-use super::ops::{store_many_on, store_on};use super::types::{ImportCounts, ImportPhase, ImportScanView, ImportState};/// Items stored between two checkpoint writes.@@ -38,54 +41,88 @@ struct BatchOutcome {stored: u64,/// The checkpoint after the last item handled, stored or skipped.checkpoint: Option<Checkpoint>,- /// Why the import must stop (memory off, credential rejected).+ /// Why the import must stop (credential rejected, credits exhausted,+ /// engine unreachable).fatal: Option<String>,}-fn is_fatal(error: &MemoryError) -> bool {- matches!(error, MemoryError::Unauthorized(_) | MemoryError::Off(_))+/// Whether a store failure is about the item (skip it and go on) rather than+/// the engine or the account (stop, so a resume retries from here).+///+/// Only a refusal of the item itself is skippable: malformed or too large+/// (`InvalidRequest`), not storable here (`Unsupported`, `NotFound`), or a+/// replay key already bound to a different body (`Conflict`). Everything else+/// would fail the next item the same way: a rejected credential, an exhausted+/// credit balance (an `Engine` error), an unreachable or overloaded engine+/// (`Unavailable`). Skipping those would advance the checkpoint past items+/// that were never stored and finish `Done` with nothing imported.+fn skips_item(error: &tinymemory_api::Error) -> bool {+ use tinymemory_api::Error as E;+ matches!(+ error,+ E::InvalidRequest(_) | E::Unsupported(_) | E::NotFound(_) | E::Conflict(_)+ )}-/// Stores `batch` in one bulk call. If the engine refuses the batch for a-/// reason that is not fatal (one unstorable item), the items are stored one-/// at a time instead so only the bad ones are skipped.+/// The message an import stopped by `error` reports.+fn fatal_message(error: tinymemory_api::Error) -> String {+ if is_insufficient_credits(&error) {+ return "not enough credits to import your memory; top up, then resume the import to \+ continue where it stopped"+ .to_string();+ }+ MemoryError::from(error).to_string()+}++/// Stores `batch` in one bulk call. If the engine refuses the batch because+/// of an item (see [`skips_item`]), the items are stored one at a time instead+/// so only the bad ones are skipped. Any other failure stops the import+/// without advancing the checkpoint past what was stored.async fn store_batch(bound: &BoundEngine, batch: Vec<ImportedItem>) -> BatchOutcome {let Some(last) = batch.last() else {return BatchOutcome::default();};let last_checkpoint = last.checkpoint.clone();let items: Vec<_> = batch.iter().map(|imported| imported.item.clone()).collect();- match store_many_on(bound, items).await {+ match bound.engine.store_many(items).await {Ok(receipts) => {+ tracing::debug!(+ engine = %bound.id,+ count = receipts.len(),+ "[memory:import] batch stored"+ );return BatchOutcome {stored: receipts.len() as u64,checkpoint: Some(last_checkpoint),fatal: None,};}- Err(error) if is_fatal(&error) => {+ Err(error) if !skips_item(&error) => {return BatchOutcome {- fatal: Some(error.to_string()),+ fatal: Some(fatal_message(error)),..BatchOutcome::default()};}Err(error) => {tracing::debug!(- code = error.code(),+ code = MemoryError::from(error).code(),"[memory:import] batch refused; storing one by one");}}let mut outcome = BatchOutcome::default();for imported in batch {- match store_on(bound, imported.item).await {+ match bound.engine.store(imported.item).await {Ok(_) => outcome.stored += 1,- Err(error) if is_fatal(&error) => {- outcome.fatal = Some(error.to_string());+ Err(error) if !skips_item(&error) => {+ outcome.fatal = Some(fatal_message(error));return outcome;}Err(error) => {- tracing::debug!(code = error.code(), "[memory:import] item skipped");+ tracing::debug!(+ code = MemoryError::from(error).code(),+ "[memory:import] item skipped"+ );}}outcome.checkpoint = Some(imported.checkpoint);@@ -178,13 +215,101 @@ pub fn status(config: &Config) -> ImportState {.contains(&config.workspace_dir);if state.phase == ImportPhase::Running && !running {state.phase = ImportPhase::Error;- state.error = Some("the import was interrupted; start it again to resume".to_string());+ state.error = Some(+ "the import was interrupted; it resumes on its own within a few minutes, or resume \+ it now"+ .to_string(),+ );}state}+/// Whether background work is paused right now. An automatic resume asks+/// before it starts and again before every batch it stores.+pub(crate) type PauseCheck = Arc<dyn Fn() -> bool + Send + Sync>;++/// The scheduler's pause, which includes being signed out.+fn scheduler_paused() -> bool {+ matches!(+ crate::cron::scheduler_gate::current_policy(),+ crate::cron::scheduler_gate::Policy::Paused { .. }+ )+}++/// Resumes an import the app quit in the middle of, if there is one, under+/// the scheduler's pause ([`resume_interrupted_with`]). Called from memory's+/// background job.+pub async fn resume_interrupted(config: &Config) -> bool {+ resume_interrupted_with(config, Arc::new(scheduler_paused)).await+}++/// Resumes an interrupted import unless `paused` says background work is+/// paused.+///+/// Only a `Running` state with no live run counts: the user consented when+/// it started, and quitting the app is not a decision to stop. Nothing+/// resumes while background work is paused (which includes being signed+/// out), and a resumed run asks `paused` again before every batch, so a pause+/// that lands after the check stops it at the next batch. Either way the state+/// stays `Running` with its checkpoint, so a later tick resumes it. An import+/// that stopped on an error (credits exhausted, engine unreachable) stays+/// stopped until the user starts it again, and so does one whose automatic+/// resume could not start: that failure is persisted as `Error`, so a+/// failure that would recur does not loop. Returns whether a run was+/// started.+pub(crate) async fn resume_interrupted_with(config: &Config, paused: PauseCheck) -> bool {+ if read_file(&config.workspace_dir).state.phase != ImportPhase::Running {+ return false;+ }+ let live = RUNNING+ .lock()+ .unwrap_or_else(std::sync::PoisonError::into_inner)+ .contains(&config.workspace_dir);+ if live {+ return false;+ }+ if paused() {+ tracing::debug!("[memory:import] background paused; interrupted import left for later");+ return false;+ }+ match start_with(config, true, Some(paused)).await {+ Ok(state) => {+ tracing::info!(+ imported = state.imported,+ total = state.total,+ "[memory:import] resuming an interrupted import"+ );+ true+ }+ Err(error) => {+ tracing::warn!(+ code = error.code(),+ "[memory:import] interrupted import could not resume; stopped"+ );+ // Re-read so only the phase and reason change: the progress and+ // the checkpoint stay exactly as persisted, and the user's Resume+ // continues from there.+ let mut file = read_file(&config.workspace_dir);+ file.state.phase = ImportPhase::Error;+ file.state.error = Some(format!("the import could not resume: {error}"));+ write_file(&config.workspace_dir, &file);+ false+ }+ }+}+/// `memory_import_start`: requires `consent`, memory on, and a legacy store.pub async fn start(config: &Config, consent: bool) -> MemoryResult<ImportState> {+ start_with(config, consent, None).await+}++/// [`start`], with the pause an automatic resume honors (`None` for an import+/// the user started, which runs to the end).+async fn start_with(+ config: &Config,+ consent: bool,+ paused: Option<PauseCheck>,+) -> MemoryResult<ImportState> {if !consent {return Err(MemoryError::invalid("importing uploads local memory to the selected engine; pass consent: true",@@ -222,7 +347,7 @@ pub async fn start(config: &Config, consent: bool) -> MemoryResult<ImportState>let state = file.state.clone();tracing::info!(total = state.total, "[memory:import] import started");tokio::spawn(async move {- run(&workspace_dir, &bound, file).await;+ run(&workspace_dir, &bound, file, paused).await;RUNNING.lock().unwrap_or_else(std::sync::PoisonError::into_inner)@@ -231,7 +356,12 @@ pub async fn start(config: &Config, consent: bool) -> MemoryResult<ImportState>Ok(state)}-async fn run(workspace_dir: &Path, bound: &BoundEngine, mut file: ImportFile) {+async fn run(+ workspace_dir: &Path,+ bound: &BoundEngine,+ mut file: ImportFile,+ paused: Option<PauseCheck>,+) {let (tx, mut rx) = tokio::sync::mpsc::channel::<Result<ImportedItem, String>>(16);let reader_dir = workspace_dir.to_path_buf();let checkpoint = file.checkpoint.clone();@@ -253,6 +383,7 @@ async fn run(workspace_dir: &Path, bound: &BoundEngine, mut file: ImportFile) {});let mut since_checkpoint = 0u64;let mut failure = None;+ let mut pausing = false;let mut batch: Vec<ImportedItem> = Vec::with_capacity(STORE_BATCH);let mut reading = true;while reading || !batch.is_empty() {@@ -271,6 +402,10 @@ async fn run(workspace_dir: &Path, bound: &BoundEngine, mut file: ImportFile) {None => reading = false,}}+ if paused.as_ref().is_some_and(|paused| paused()) {+ pausing = true;+ break;+ }let outcome = store_batch(bound, std::mem::take(&mut batch)).await;file.state.imported += outcome.stored;if let Some(checkpoint) = outcome.checkpoint {@@ -288,6 +423,15 @@ async fn run(workspace_dir: &Path, bound: &BoundEngine, mut file: ImportFile) {}drop(rx);let _ = reader.await;+ if pausing {+ // Left `Running` with its checkpoint: the next unpaused tick resumes it.+ tracing::info!(+ imported = file.state.imported,+ "[memory:import] background paused; import left to resume"+ );+ write_file(workspace_dir, &file);+ return;+ }match failure {Some(error) => {tracing::warn!(diff --git a/crates/openhuman-core/src/memory/import_tests.rs b/crates/openhuman-core/src/memory/import_tests.rsindex e35f2b09fb..a575536708 100644--- a/crates/openhuman-core/src/memory/import_tests.rs+++ b/crates/openhuman-core/src/memory/import_tests.rs@@ -1,6 +1,8 @@use super::*;use crate::memory::error::{INVALID_REQUEST, MEMORY_OFF};use crate::memory::test_fixtures::{bind_reference, config_in, stored};+use std::sync::Arc;+use rusqlite::{params, Connection};use tinymemory_api::MetaFilter;@@ -209,7 +211,11 @@ fn a_running_state_with_no_live_import_reads_as_interrupted() {let state = status(&config);assert_eq!(state.phase, ImportPhase::Error);assert_eq!(state.imported, 3);- assert!(state.error.as_deref().unwrap().contains("start it again"));+ assert!(state+ .error+ .as_deref()+ .unwrap()+ .contains("resumes on its own"));}#[tokio::test]@@ -245,3 +251,345 @@ fn a_corrupt_import_file_reads_as_idle() {std::fs::write(file_path(tmp.path()), "garbage").unwrap();assert_eq!(read_file(tmp.path()).state, ImportState::default());}++/// A reference engine that refuses a write with whatever `refuse` returns for+/// its item, and stores it otherwise.+struct FailingEngine {+ inner: Arc<tinymemory_api::conformance::ReferenceEngine>,+ refuse: fn(&tinymemory_api::StoreItem) -> Option<tinymemory_api::Error>,+}++#[async_trait::async_trait]+impl tinymemory_api::MemoryEngine for FailingEngine {+ fn descriptor(&self) -> &tinymemory_api::EngineDescriptor {+ self.inner.descriptor()+ }+ async fn health(&self) -> tinymemory_api::EngineHealth {+ self.inner.health().await+ }+ async fn recall(+ &self,+ req: tinymemory_api::RecallRequest,+ ) -> tinymemory_api::Result<tinymemory_api::RecallAnswer> {+ self.inner.recall(req).await+ }+ async fn fetch(+ &self,+ req: tinymemory_api::FetchRequest,+ ) -> tinymemory_api::Result<tinymemory_api::FetchPage> {+ self.inner.fetch(req).await+ }+ async fn store(+ &self,+ item: tinymemory_api::StoreItem,+ ) -> tinymemory_api::Result<tinymemory_api::StoreReceipt> {+ if let Some(error) = (self.refuse)(&item) {+ return Err(error);+ }+ self.inner.store(item).await+ }+ async fn forget(+ &self,+ target: tinymemory_api::ForgetTarget,+ ) -> tinymemory_api::Result<tinymemory_api::ForgetReport> {+ self.inner.forget(target).await+ }+ async fn list(+ &self,+ req: tinymemory_api::ListRequest,+ ) -> tinymemory_api::Result<tinymemory_api::ListPage> {+ self.inner.list(req).await+ }+}++/// Binds a [`FailingEngine`] and returns the engine behind it.+fn bind_failing(+ config: &Config,+ refuse: fn(&tinymemory_api::StoreItem) -> Option<tinymemory_api::Error>,+) -> Arc<tinymemory_api::conformance::ReferenceEngine> {+ let inner = Arc::new(tinymemory_api::conformance::ReferenceEngine::new());+ crate::memory::engine::install_test_engine(+ &config.workspace_dir,+ Arc::new(FailingEngine {+ inner: inner.clone(),+ refuse,+ }),+ );+ inner+}++fn out_of_credits(_: &tinymemory_api::StoreItem) -> Option<tinymemory_api::Error> {+ Some(tinymemory_api::Error::Engine(+ "[USER_INSUFFICIENT_CREDITS] insufficient credits (HTTP 402)".into(),+ ))+}++#[tokio::test]+async fn exhausted_credits_stop_the_import_instead_of_skipping_everything() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ legacy_workspace(&config.workspace_dir);+ let engine = bind_failing(&config, out_of_credits);++ start(&config, true).await.unwrap();+ let state = wait_until_settled(&config).await;+ assert_eq!(state.phase, ImportPhase::Error, "{state:?}");+ assert_eq!(state.imported, 0);+ assert!(+ state+ .error+ .as_deref()+ .unwrap()+ .contains("not enough credits"),+ "{state:?}"+ );+ assert!(stored(&engine, MetaFilter::default()).await.is_empty());+ assert_eq!(+ read_file(&config.workspace_dir).checkpoint,+ Checkpoint::default(),+ "the checkpoint does not move past items that were never stored"+ );+}++#[tokio::test]+async fn an_unreachable_engine_stops_the_import_and_a_retry_resumes_it() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ legacy_workspace(&config.workspace_dir);+ bind_failing(&config, |_| {+ Some(tinymemory_api::Error::Unavailable(+ "connection refused".into(),+ ))+ });++ start(&config, true).await.unwrap();+ let state = wait_until_settled(&config).await;+ assert_eq!(state.phase, ImportPhase::Error, "{state:?}");+ assert_eq!(state.imported, 0);++ // The engine is back: starting again imports everything, nothing skipped.+ let engine = bind_reference(&config);+ start(&config, true).await.unwrap();+ let done = wait_until_settled(&config).await;+ assert_eq!(done.phase, ImportPhase::Done, "{done:?}");+ assert_eq!(stored(&engine, MetaFilter::default()).await.len(), 5);+}++#[tokio::test]+async fn an_item_the_engine_refuses_is_skipped_and_the_rest_imported() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ legacy_workspace(&config.workspace_dir);+ // Refuses the "Ideas" document (d2) as malformed, stores the rest.+ let engine = bind_failing(&config, |item| {+ matches!(item, tinymemory_api::StoreItem::Document { title: Some(title), .. } if title == "Ideas")+ .then(|| tinymemory_api::Error::InvalidRequest("item too large".into()))+ });++ start(&config, true).await.unwrap();+ let done = wait_until_settled(&config).await;+ assert_eq!(done.phase, ImportPhase::Done, "{done:?}");+ assert_eq!(done.imported, 4);+ let items = stored(&engine, MetaFilter::default()).await;+ assert_eq!(items.len(), 4);+ assert!(!items.iter().any(|item| item.text.contains("oolong")));+}++#[tokio::test]+async fn an_import_the_app_quit_during_resumes_on_its_own() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ legacy_workspace(&config.workspace_dir);+ let engine = bind_reference(&config);+ // The app quit while the import was running, after d1 was stored.+ write_file(+ &config.workspace_dir,+ &ImportFile {+ state: ImportState {+ phase: ImportPhase::Running,+ imported: 1,+ total: 5,+ error: None,+ },+ checkpoint: Checkpoint {+ documents: Some("d1".into()),+ ..Checkpoint::default()+ },+ },+ );++ assert!(resume_interrupted(&config).await);+ let done = wait_until_settled(&config).await;+ assert_eq!(done.phase, ImportPhase::Done, "{done:?}");+ assert_eq!(done.imported, 5);+ assert_eq!(stored(&engine, MetaFilter::default()).await.len(), 4);+}++#[tokio::test]+async fn a_stopped_or_finished_import_is_not_resumed_on_its_own() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ legacy_workspace(&config.workspace_dir);+ let engine = bind_reference(&config);+ assert!(!resume_interrupted(&config).await, "never started");++ for phase in [ImportPhase::Error, ImportPhase::Done] {+ write_file(+ &config.workspace_dir,+ &ImportFile {+ state: ImportState {+ phase,+ imported: 0,+ total: 5,+ error: None,+ },+ checkpoint: Checkpoint::default(),+ },+ );+ assert!(!resume_interrupted(&config).await, "{phase:?}");+ }+ assert!(stored(&engine, MetaFilter::default()).await.is_empty());+}++/// A persisted `Running` import with no live run: what the app leaves behind+/// when it quits mid-import after storing d1.+fn quit_mid_import(config: &Config) {+ write_file(+ &config.workspace_dir,+ &ImportFile {+ state: ImportState {+ phase: ImportPhase::Running,+ imported: 1,+ total: 5,+ error: None,+ },+ checkpoint: Checkpoint {+ documents: Some("d1".into()),+ ..Checkpoint::default()+ },+ },+ );+}++#[tokio::test]+async fn the_background_job_resumes_an_interrupted_import() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ legacy_workspace(&config.workspace_dir);+ let engine = bind_reference(&config);+ quit_mid_import(&config);++ crate::memory::bus::run_system_job(&config, crate::memory::lifecycle::jobs::BACKGROUND_JOB)+ .await;+ let done = wait_until_settled(&config).await;+ assert_eq!(done.phase, ImportPhase::Done, "{done:?}");+ assert_eq!(stored(&engine, MetaFilter::default()).await.len(), 4);+}++#[tokio::test]+async fn nothing_resumes_while_background_work_is_paused() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ legacy_workspace(&config.workspace_dir);+ let engine = bind_reference(&config);+ quit_mid_import(&config);++ assert!(!resume_interrupted_with(&config, always(true)).await);+ assert!(stored(&engine, MetaFilter::default()).await.is_empty());+ assert_eq!(+ read_file(&config.workspace_dir).state.phase,+ ImportPhase::Running,+ "left resumable for a later, unpaused tick"+ );++ assert!(resume_interrupted_with(&config, always(false)).await);+ assert_eq!(wait_until_settled(&config).await.phase, ImportPhase::Done);+}++/// A pause check that always answers `paused`.+fn always(paused: bool) -> PauseCheck {+ Arc::new(move || paused)+}++/// Waits until no import run is live for `config`'s workspace.+async fn wait_until_no_live_run(config: &Config) {+ for _ in 0..400 {+ let live = RUNNING.lock().unwrap().contains(&config.workspace_dir);+ if !live {+ return;+ }+ tokio::time::sleep(std::time::Duration::from_millis(25)).await;+ }+ panic!("the import run never ended");+}++#[tokio::test]+async fn a_pause_that_lands_after_the_check_stops_the_run_at_the_next_batch() {+ use std::sync::atomic::{AtomicUsize, Ordering};+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ legacy_workspace(&config.workspace_dir);+ let engine = bind_reference(&config);+ quit_mid_import(&config);++ // Not paused when the resume checks, paused by the time the run asks.+ let asked = Arc::new(AtomicUsize::new(0));+ let counter = asked.clone();+ let paused: PauseCheck = Arc::new(move || counter.fetch_add(1, Ordering::SeqCst) > 0);++ assert!(resume_interrupted_with(&config, paused).await);+ wait_until_no_live_run(&config).await;+ assert!(asked.load(Ordering::SeqCst) >= 2, "the run asked again");+ assert!(+ stored(&engine, MetaFilter::default()).await.is_empty(),+ "nothing uploaded once paused"+ );+ let file = read_file(&config.workspace_dir);+ assert_eq!(file.state.phase, ImportPhase::Running, "left resumable");+ assert_eq!(file.checkpoint.documents.as_deref(), Some("d1"));++ // Unpaused, the next tick finishes it from the checkpoint.+ assert!(resume_interrupted_with(&config, always(false)).await);+ assert_eq!(wait_until_settled(&config).await.phase, ImportPhase::Done);+ assert_eq!(stored(&engine, MetaFilter::default()).await.len(), 4);+}++#[tokio::test]+async fn an_automatic_resume_that_cannot_start_is_stopped_not_retried() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ legacy_workspace(&config.workspace_dir);+ // No engine bound: memory is off, so `start` fails before any run.+ quit_mid_import(&config);++ assert!(!resume_interrupted_with(&config, always(false)).await);+ let state = read_file(&config.workspace_dir).state;+ assert_eq!(state.phase, ImportPhase::Error);+ assert_eq!(state.imported, 1, "progress is kept");+ assert!(+ state.error.as_deref().unwrap().contains("could not resume"),+ "{state:?}"+ );+ // The next tick does not try again; the user resumes it.+ assert!(!resume_interrupted_with(&config, always(false)).await);+ assert_eq!(+ read_file(&config.workspace_dir)+ .checkpoint+ .documents+ .as_deref(),+ Some("d1"),+ "the checkpoint read back from disk survives the failure"+ );++ // And the user's Resume continues from that checkpoint, not the start.+ let engine = bind_reference(&config);+ start(&config, true).await.unwrap();+ let done = wait_until_settled(&config).await;+ assert_eq!(done.phase, ImportPhase::Done, "{done:?}");+ assert_eq!(done.imported, 5);+ assert_eq!(+ stored(&engine, MetaFilter::default()).await.len(),+ 4,+ "d1 is not re-sent"+ );+}diff --git a/crates/openhuman-core/src/memory/lifecycle/hooks.rs b/crates/openhuman-core/src/memory/lifecycle/hooks.rsindex 7e35324740..0eda796191 100644--- a/crates/openhuman-core/src/memory/lifecycle/hooks.rs+++ b/crates/openhuman-core/src/memory/lifecycle/hooks.rs@@ -20,6 +20,7 @@ use tinymemory_tools::{Compaction, ContextPack, PostTurn, PreTurn, SessionStart}use crate::config::Config;use crate::memory::engine;+use crate::memory::error::MemoryError;use crate::memory::scope::ResolvedIdentity;use super::{agent_memory_on, jobs, log_only};@@ -52,6 +53,11 @@ pub struct TurnPack {/// The cited items, for the chat's memory chips.#[serde(skip)]pub citations: Vec<crate::memory::types::TurnCitation>,+ /// Set when nothing was recalled because the engine refused the whole+ /// account (a `MemoryError` code such as `INSUFFICIENT_CREDITS`): the+ /// block is then a notice saying so, not recalled memory.+ #[serde(skip_serializing_if = "Option::is_none")]+ pub refusal: Option<&'static str>,}impl TurnPack {@@ -89,6 +95,7 @@ impl TurnPack {refs: refs.collect(),engine: next.engine,citations: cited,+ refusal: None,});}}@@ -96,6 +103,34 @@ impl TurnPack {pack}+ /// The notice a turn is given when its recall was refused outright, so+ /// the model does not read an empty pack as "nothing is stored" and tell+ /// the user so (#6718). `None` for a failure that is not account-wide.+ fn refused(error: &MemoryError, engine: String) -> Option<Self> {+ let why = match error {+ MemoryError::InsufficientCredits(_) => {+ "the account is out of credits; topping up restores it"+ }+ MemoryError::Unauthorized(_) => "the memory engine rejected the sign-in or API key",+ MemoryError::Unavailable(_) => "the memory engine could not be reached",+ _ => return None,+ };+ let markdown = format!(+ "# Memory\n\nMemory could not be read for this turn: {why}. Nothing was \+ recalled, which does not mean nothing is stored. If the user refers to \+ something they told you before, say that memory is unavailable right now \+ and why, instead of saying you do not know it."+ );+ Some(Self {+ tokens: tinymemory_tools::recall::estimate_tokens(&markdown),+ markdown,+ refs: Vec::new(),+ engine,+ citations: Vec::new(),+ refusal: Some(error.code()),+ })+ }+/// The block as the model sees it.#[must_use]pub fn injection(&self) -> String {@@ -140,7 +175,10 @@ pub struct PreTurnInput {/// Logs the user turn and recalls the pack it is given, within/// `[memory.recall] pre_turn_timeout_ms`. `None` when memory is off, the/// identity has neither logging nor recall, nothing relevant is stored, or-/// the engine is slow or failing — the turn runs either way.+/// the engine is slow or failing — the turn runs either way. When nothing was+/// recalled because the engine refused the account (no credits, a rejected+/// credential, unreachable), the pack is a short notice saying so instead+/// ([`TurnPack::refusal`]).////// The work is spawned, so a timed-out log still completes in the/// background; only its pack is dropped.@@ -160,6 +198,7 @@ pub async fn pre_turn(return None;}};+ let engine_id = bound.engine.descriptor().id.to_string();let memory = match agent_memory_on(bound.engine, config, identity) {Ok(memory) => memory,Err(error) => {@@ -180,7 +219,7 @@ pub async fn pre_turn(let task = tokio::spawn(async move {let session = async {if recall && input.resumed_after_compaction {- memory+ let opened = memory.start_session(SessionStart {thread_id: Some(input.thread_id.clone()),focus: None,@@ -188,8 +227,9 @@ pub async fn pre_turn(.await.map_err(|error| {tracing::debug!(%error, "[memory:hooks] start_session failed");- })- .ok()+ MemoryError::from(error)+ });+ Some(opened)} else {None}@@ -208,27 +248,35 @@ pub async fn pre_turn("[memory:hooks] user turn not logged");}- Some(context.pack)+ Ok(context.pack)}Err(error) => {tracing::warn!(%error, "[memory:hooks] pre_turn refused");- None+ Err(MemoryError::from(error))}}} else {- memory- .recall(&input.user_text)- .await- .map_err(|error| tracing::warn!(%error, "[memory:hooks] recall failed"))- .ok()+ memory.recall(&input.user_text).await.map_err(|error| {+ tracing::warn!(%error, "[memory:hooks] recall failed");+ MemoryError::from(error)+ })}};let (session, turn) = futures::join!(session, turn);- if recall {- TurnPack::from_packs(session.into_iter().chain(turn))- } else {- None+ if !recall {+ return None;}+ let outcomes: Vec<_> = session.into_iter().chain([turn]).collect();+ let refusal = refusal_of(&outcomes);+ TurnPack::from_packs(outcomes.into_iter().filter_map(Result::ok)).or_else(|| {+ let error = refusal?;+ tracing::warn!(+ code = error.code(),+ %error,+ "[memory:hooks] recall refused; the turn is told memory is unavailable"+ );+ TurnPack::refused(&error, engine_id)+ })});let timeout = Duration::from_millis(config.memory.recall.pre_turn_timeout_ms.max(1));let pack = match tokio::time::timeout(timeout, task).await {@@ -261,6 +309,25 @@ pub async fn pre_turn(pack}+/// The account-wide refusal behind a recall that came back empty, if any:+/// the first refusing error, else the first refusing skipped section.+fn refusal_of(outcomes: &[Result<ContextPack, MemoryError>]) -> Option<MemoryError> {+ let failed = outcomes.iter().find_map(|outcome| {+ outcome+ .as_ref()+ .err()+ .filter(|error| error.is_account_wide())+ .cloned()+ });+ failed.or_else(|| {+ outcomes+ .iter()+ .filter_map(|outcome| outcome.as_ref().ok())+ .flat_map(|pack| pack.skipped.iter())+ .find_map(|skipped| MemoryError::refusal_from_skip_reason(&skipped.reason))+ })+}+/// A tool call the reply made, with a one-line result.#[derive(Debug, Clone, PartialEq, Eq)]pub struct ToolCallSummary {@@ -345,13 +412,17 @@ pub async fn post_turn(config: &Config, identity: &ResolvedIdentity, input: Postid: call.id.clone(),}).collect();- match memory.post_turn(post).await {+ let started = std::time::Instant::now();+ let posted = memory.post_turn(post).await;+ let elapsed_ms = started.elapsed().as_millis() as u64;+ match posted {Ok(report) => {tracing::debug!(thread_id = %input.thread_id,agent_id = %identity.agent_id,turn = input.turn_index,jobs = report.jobs.len(),+ elapsed_ms,"[memory:hooks] reply logged");jobs::enqueue(config, identity.root(), report.jobs).await;@@ -360,6 +431,7 @@ pub async fn post_turn(config: &Config, identity: &ResolvedIdentity, input: Posttracing::warn!(thread_id = %input.thread_id,%error,+ elapsed_ms,"[memory:hooks] reply not logged");}diff --git a/crates/openhuman-core/src/memory/lifecycle/hooks_tests.rs b/crates/openhuman-core/src/memory/lifecycle/hooks_tests.rsindex 6630a6bbb0..05f9a2c567 100644--- a/crates/openhuman-core/src/memory/lifecycle/hooks_tests.rs+++ b/crates/openhuman-core/src/memory/lifecycle/hooks_tests.rs@@ -217,3 +217,173 @@ async fn compaction_recalls_from_the_dropped_turns() {.await.is_none());}++#[tokio::test]+async fn an_out_of_credits_recall_tells_the_turn_memory_is_unavailable() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ crate::memory::test_fixtures::RefusingEngine::out_of_credits().bind(&config);+ let identity = MemoryIdentity::agent("orchestrator").resolve(&config);++ let pack = pre_turn(&config, &identity, input("t", 0, "what colour do I like?"))+ .await+ .expect("a refused recall still gives the turn a notice");++ assert_eq!(+ pack.refusal,+ Some(crate::memory::error::INSUFFICIENT_CREDITS)+ );+ assert!(+ pack.markdown.contains("out of credits"),+ "{}",+ pack.markdown+ );+ assert!(pack.markdown.contains("does not mean nothing is stored"));+ assert!(pack.refs.is_empty() && pack.citations.is_empty());+ assert!(pack.tokens > 0);+}++#[tokio::test]+async fn an_unreachable_engine_is_named_as_unreachable() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ crate::memory::test_fixtures::RefusingEngine::with(tinymemory_api::Error::Unavailable(+ "connection refused".into(),+ ))+ .bind(&config);+ let identity = MemoryIdentity::agent("orchestrator").resolve(&config);++ let pack = pre_turn(&config, &identity, input("t", 0, "hello"))+ .await+ .expect("notice");++ assert_eq!(pack.refusal, Some(crate::memory::error::UNAVAILABLE));+ assert!(+ pack.markdown.contains("could not be reached"),+ "{}",+ pack.markdown+ );+}++#[tokio::test]+async fn an_engine_fault_that_is_not_account_wide_injects_nothing() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ crate::memory::test_fixtures::RefusingEngine::with(tinymemory_api::Error::Engine(+ "index corrupt".into(),+ ))+ .bind(&config);+ let identity = MemoryIdentity::agent("orchestrator").resolve(&config);++ assert!(pre_turn(&config, &identity, input("t", 0, "hello"))+ .await+ .is_none());+}++#[test]+fn a_refusal_is_read_back_from_a_skipped_section() {+ let outcomes = vec![Ok(ContextPack {+ markdown: String::new(),+ tokens: 0,+ refs: Vec::new(),+ sections: Vec::new(),+ skipped: vec![+ tinymemory_tools::recall::SkippedSection {+ heading: "Learnings".into(),+ reason: "empty".into(),+ },+ tinymemory_tools::recall::SkippedSection {+ heading: "History".into(),+ reason: "unauthorized: [UNAUTHORIZED] memory API fetch (HTTP 401)".into(),+ },+ ],+ engine: "tinyhumans".into(),+ })];+ let refusal = refusal_of(&outcomes).expect("refusal");+ assert_eq!(refusal.code(), crate::memory::error::UNAUTHORIZED);++ let quiet = vec![Ok(ContextPack {+ markdown: String::new(),+ tokens: 0,+ refs: Vec::new(),+ sections: Vec::new(),+ skipped: Vec::new(),+ engine: "tinyhumans".into(),+ })];+ assert!(refusal_of(&quiet).is_none());+}++// ── the pack's token budget against a large store (#6718, #7023) ────────────++async fn fill_with_learnings(engine: &tinymemory_api::conformance::ReferenceEngine, count: usize) {+ for i in 0..count {+ engine+ .store(StoreItem::learning(+ format!(+ "Project note {i}: the Lisbon office ships release {i} on a Thursday, \+ reviewed by team {} with a rollback window of {} hours.",+ i % 17,+ i % 9 + 1+ ),+ LearningKind::Fact,+ 0.8,+ MemoryMeta::default(),+ ))+ .await+ .unwrap();+ }+}++fn budget(config: &crate::config::Config) -> usize {+ config.memory.recall.budget_tokens as usize+}++/// Lines that appear more than once in a rendered pack (headings aside).+fn repeated_lines(markdown: &str) -> Vec<String> {+ let mut seen = std::collections::HashSet::new();+ markdown+ .lines()+ .map(str::trim)+ .filter(|line| line.starts_with("- "))+ .filter(|line| !seen.insert(line.to_string()))+ .map(str::to_string)+ .collect()+}++#[tokio::test]+async fn a_turn_pack_stays_within_its_budget_against_a_large_store() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ let engine = bind_reference(&config);+ fill_with_learnings(&engine, 1500).await;+ let identity = MemoryIdentity::agent("orchestrator").resolve(&config);++ let pack = pre_turn(+ &config,+ &identity,+ input("t-large", 0, "when does the Lisbon release ship?"),+ )+ .await+ .expect("a pack");+ eprintln!(+ "large store: 1500 learnings -> pack {} tokens (budget {}), {} refs",+ pack.tokens,+ budget(&config),+ pack.refs.len()+ );+ // The budget check only means something if real learnings were recalled.+ assert!(+ pack.refusal.is_none(),+ "not a refusal notice: {}",+ pack.markdown+ );+ assert!(!pack.refs.is_empty(), "the pack recalled something");+ assert!(pack.markdown.contains("Project note"), "{}", pack.markdown);+ assert!(+ pack.tokens <= budget(&config),+ "{} > {}",+ pack.tokens,+ budget(&config)+ );+ assert!(repeated_lines(&pack.markdown).is_empty());+}diff --git a/crates/openhuman-core/src/memory/lifecycle/jobs.rs b/crates/openhuman-core/src/memory/lifecycle/jobs.rsindex f37efa2b0c..4521a6be6f 100644--- a/crates/openhuman-core/src/memory/lifecycle/jobs.rs+++ b/crates/openhuman-core/src/memory/lifecycle/jobs.rs@@ -184,7 +184,9 @@ pub enum Selection {}/// Runs the selected jobs. Returns the runs it recorded. A job that fails is-/// kept with its error and retried on a later run, up to a few attempts.+/// kept with its error and retried on a later run, up to a few attempts; an+/// account-wide refusal does not count as one. The run that gives up says so+/// in its reason.pub async fn run(config: &Config, selection: Selection) -> MemoryResult<Vec<JobRun>> {let bound = engine::resolve(config).engine()?;let _guard = LOCK.lock().await;@@ -266,19 +268,31 @@ pub async fn run(config: &Config, selection: Selection) -> MemoryResult<Vec<JobR);}Err(error) => {- queued.attempts += 1;+ // A refusal of the whole account (no credits, a rejected+ // credential, an unreachable engine) says nothing about the+ // job, so it keeps its attempts and waits: dropping it would+ // leave a permanent gap in the beliefs (#6718).+ let account_wide = MemoryError::from(error.clone()).is_account_wide();+ if !account_wide {+ queued.attempts += 1;+ }queued.last_error = Some(error.to_string());record.outcome = "failed".to_string();- record.reason = Some(error.to_string());tracing::warn!(id = %queued.id,job = %name,attempts = queued.attempts,+ account_wide,%error,"[memory:jobs] run failed");if queued.attempts < MAX_ATTEMPTS {+ record.reason = Some(error.to_string());queue.pending.push(queued);+ } else {+ record.reason = Some(format!(+ "dropped after {MAX_ATTEMPTS} failed attempts: {error}"+ ));}}}diff --git a/crates/openhuman-core/src/memory/lifecycle/jobs_tests.rs b/crates/openhuman-core/src/memory/lifecycle/jobs_tests.rsindex 3292545baa..f5759a63e6 100644--- a/crates/openhuman-core/src/memory/lifecycle/jobs_tests.rs+++ b/crates/openhuman-core/src/memory/lifecycle/jobs_tests.rs@@ -89,3 +89,47 @@ async fn a_run_needs_an_engine() {run_due(&config).await;assert_eq!(snapshot(&config).await.pending.len(), 1);}++#[tokio::test]+async fn an_account_wide_refusal_never_uses_up_a_jobs_attempts() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ crate::memory::test_fixtures::RefusingEngine::out_of_credits().bind(&config);+ enqueue(&config, &Namespace::ROOT, vec![build("a")]).await;++ for _ in 0..MAX_ATTEMPTS + 2 {+ let runs = run(&config, Selection::All).await.unwrap();+ assert_eq!(runs[0].outcome, "failed");+ }++ let queue = snapshot(&config).await;+ assert_eq!(queue.pending.len(), 1, "the job waits for credits");+ assert_eq!(queue.pending[0].attempts, 0);+ assert!(queue.pending[0]+ .last_error+ .as_deref()+ .is_some_and(|error| error.contains("USER_INSUFFICIENT_CREDITS")));+}++#[tokio::test]+async fn a_job_that_keeps_failing_is_dropped_and_says_so() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ crate::memory::test_fixtures::RefusingEngine::with(tinymemory_api::Error::Engine(+ "index corrupt".into(),+ ))+ .bind(&config);+ enqueue(&config, &Namespace::ROOT, vec![build("a")]).await;++ let mut last = Vec::new();+ for _ in 0..MAX_ATTEMPTS {+ last = run(&config, Selection::All).await.unwrap();+ }++ assert!(snapshot(&config).await.pending.is_empty());+ let reason = last[0].reason.as_deref().unwrap_or_default();+ assert!(+ reason.starts_with(&format!("dropped after {MAX_ATTEMPTS} failed attempts")),+ "{reason}"+ );+}diff --git a/crates/openhuman-core/src/memory/mod.rs b/crates/openhuman-core/src/memory/mod.rsindex e3674d68df..cdf7932183 100644--- a/crates/openhuman-core/src/memory/mod.rs+++ b/crates/openhuman-core/src/memory/mod.rs@@ -23,6 +23,7 @@ pub mod backfill;pub mod brain;pub mod bus;pub mod channels;+pub(crate) mod convert;pub mod engine;pub mod error;pub mod explore;diff --git a/crates/openhuman-core/src/memory/ops.rs b/crates/openhuman-core/src/memory/ops.rsindex dc0fa88649..3f24819428 100644--- a/crates/openhuman-core/src/memory/ops.rs+++ b/crates/openhuman-core/src/memory/ops.rs@@ -9,7 +9,7 @@use chrono::Utc;use tinymemory_api::{FetchRequest, ForgetTarget, ItemId, LearningKind, ListRequest, MemoryMeta, RecallRequest,- StoreItem, StoreReceipt,+ StoreItem, StoreReceipt, WriteOptions,};use crate::config::Config;@@ -246,7 +246,8 @@ fn merge_meta(meta: &mut MemoryMeta, host: MemoryMeta) {turns,agent_id,tool_call,- observed_at+ observed_at,+ derive);meta.source = host.source;// The host's node is authoritative: a caller cannot write into another@@ -259,14 +260,27 @@ fn merge_meta(meta: &mut MemoryMeta, host: MemoryMeta) {}}-/// `memory_learn`.+/// `memory_learn`: returns once the learning is readable.pub async fn learn(config: &Config,params: LearnParams,host_meta: Option<MemoryMeta>,+) -> MemoryResult<LearnView> {+ learn_with(config, params, host_meta, WriteOptions::visible()).await+}++/// [`learn`], returning as soon as `options` allows. The agent's `memory`+/// tool passes [`WriteOptions::accepted`] so a turn never waits on the+/// engine indexing the learning.+pub async fn learn_with(+ config: &Config,+ params: LearnParams,+ host_meta: Option<MemoryMeta>,+ options: WriteOptions,) -> MemoryResult<LearnView> {let item = learning_item(params, host_meta)?;- let receipt = store_item(config, item).await?;+ let bound = bound(config)?;+ let receipt = store_on_with(&bound, item, options).await?;Ok(LearnView { id: receipt.id.0 })}@@ -278,11 +292,21 @@ pub async fn store_item(config: &Config, item: StoreItem) -> MemoryResult<StoreR/// Stores `item` on `bound`; the bound engine scrubs it ([`super::guard`]).pub async fn store_on(bound: &BoundEngine, item: StoreItem) -> MemoryResult<StoreReceipt> {+ store_on_with(bound, item, WriteOptions::visible()).await+}++/// [`store_on`], returning as soon as `options` allows.+pub async fn store_on_with(+ bound: &BoundEngine,+ item: StoreItem,+ options: WriteOptions,+) -> MemoryResult<StoreReceipt> {let kind = item.kind();- let receipt = bound.engine.store(item).await?;+ let receipt = bound.engine.store_with(item, options).await?;tracing::debug!(engine = %bound.id,kind = kind.as_str(),+ wait = ?options.wait,replayed = receipt.replayed,"[memory:ops] item stored");diff --git a/crates/openhuman-core/src/memory/sources/sync.rs b/crates/openhuman-core/src/memory/sources/sync.rsindex b10649dd0b..15cdc91e6d 100644--- a/crates/openhuman-core/src/memory/sources/sync.rs+++ b/crates/openhuman-core/src/memory/sources/sync.rs@@ -11,7 +11,6 @@ use std::path::PathBuf;use std::sync::{LazyLock, Mutex};use chrono::{DateTime, Utc};-use tinymemory_integrations::documents::NativeConverter;use tinymemory_integrations::sources::readers::reader_for_request;use tinymemory_integrations::sources::{collect_items, MemorySourceEntry, SourceKind};@@ -82,7 +81,7 @@ pub async fn sync_one(config: &Config, source: &MemorySourceConfig) -> MemoryResreader.as_ref(),&entry,&config.action_dir,- &NativeConverter,+ crate::memory::convert::converter(),).await.map_err(|error| MemoryError::Engine(format!("reading the source failed: {error}")))?;@@ -124,15 +123,22 @@ pub(crate) async fn store_all(stored += 1;touched.insert(brain_source);}- Err(error @ (MemoryError::Unauthorized(_) | MemoryError::Off(_))) => return Err(error),+ // Out of credits or unreachable refuses every item, so stop+ // rather than fail each one in turn.+ Err(error) if error.is_account_wide() => return Err(error),Err(error) => {tracing::debug!(id = %source_id, code = error.code(), "[memory:sources] item store failed");last_error = Some(error);}}}+ // An engine that rebuilds beliefs on its own needs no build job, as+ // `Brain::ingest` hands back none for it.+ let automatic =+ bound.engine.descriptor().consolidation == tinymemory_api::Consolidation::Automatic;let jobs = touched.iter()+ .filter(|_| !automatic).filter_map(|source| layout.brain(source).ok()).map(|node| tinymemory_tools::BackgroundJob::BuildBeliefs {request: tinymemory_api::ConsolidateRequest::new(tinymemory_api::Reach::exact(node))diff --git a/crates/openhuman-core/src/memory/sources/sync_tests.rs b/crates/openhuman-core/src/memory/sources/sync_tests.rsindex df3349cae4..5b49cf9b8f 100644--- a/crates/openhuman-core/src/memory/sources/sync_tests.rs+++ b/crates/openhuman-core/src/memory/sources/sync_tests.rs@@ -309,3 +309,41 @@ fn reset_interrupted_marks_syncing_sources_idle() {state::remove(ws, "never-there");assert!(!state::load(ws).contains_key("a"));}++#[tokio::test]+async fn a_sync_queues_a_belief_build_only_for_an_engine_that_waits_for_one() {+ use std::sync::Arc;+ use tinymemory_api::conformance::ReferenceEngine;+ use tinymemory_api::Consolidation;++ let note = || {+ tinymemory_api::StoreItem::document(+ "Quarterly planning notes",+ tinymemory_api::MemoryMeta::default(),+ )+ };+ for (consolidation, queued) in [(Consolidation::OnDemand, 1), (Consolidation::Automatic, 0)] {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ let bound = engine::BoundEngine {+ engine: Arc::new(ReferenceEngine::new().with_consolidation(consolidation)),+ id: "reference".into(),+ endpoint: "memory://reference".into(),+ };+ let stored = store_all(+ &config,+ &bound,+ vec![note()],+ (MemorySourceKind::Folder, "/n", "src"),+ &tinymemory_tools::MemoryLayout::default(),+ )+ .await+ .unwrap();+ assert_eq!(stored, 1);+ let pending = crate::memory::lifecycle::jobs::snapshot(&config)+ .await+ .pending+ .len();+ assert_eq!(pending, queued, "{consolidation:?}");+ }+}diff --git a/crates/openhuman-core/src/memory/test_fixtures.rs b/crates/openhuman-core/src/memory/test_fixtures.rsindex 09826aa94d..8d11cde461 100644--- a/crates/openhuman-core/src/memory/test_fixtures.rs+++ b/crates/openhuman-core/src/memory/test_fixtures.rs@@ -44,3 +44,85 @@ pub(crate) async fn stored(.expect("list").items}++/// An engine that refuses every operation with one error, the way the hosted+/// engine refuses a whole account (no credits, a rejected key, an outage).+/// It describes itself as the reference engine.+pub(crate) struct RefusingEngine {+ inner: ReferenceEngine,+ error: tinymemory_api::Error,+}++impl RefusingEngine {+ /// The hosted engine's refusal for an exhausted credit balance (HTTP 402).+ pub(crate) fn out_of_credits() -> Self {+ Self::with(tinymemory_api::Error::Engine(+ "[USER_INSUFFICIENT_CREDITS] memory API fetch on api.example: the account has \+ insufficient credits (HTTP 402)"+ .into(),+ ))+ }++ /// Refuses every operation with `error`.+ pub(crate) fn with(error: tinymemory_api::Error) -> Self {+ Self {+ inner: ReferenceEngine::new(),+ error,+ }+ }++ /// Binds a refusing engine to `config`'s workspace.+ pub(crate) fn bind(self, config: &Config) {+ crate::memory::engine::install_test_engine(&config.workspace_dir, Arc::new(self));+ }+}++#[async_trait::async_trait]+impl MemoryEngine for RefusingEngine {+ fn descriptor(&self) -> &tinymemory_api::EngineDescriptor {+ self.inner.descriptor()+ }++ async fn health(&self) -> tinymemory_api::EngineHealth {+ self.inner.health().await+ }++ async fn recall(+ &self,+ _req: tinymemory_api::RecallRequest,+ ) -> tinymemory_api::Result<tinymemory_api::RecallAnswer> {+ Err(self.error.clone())+ }++ async fn fetch(+ &self,+ _req: tinymemory_api::FetchRequest,+ ) -> tinymemory_api::Result<tinymemory_api::FetchPage> {+ Err(self.error.clone())+ }++ async fn store(+ &self,+ _item: tinymemory_api::StoreItem,+ ) -> tinymemory_api::Result<tinymemory_api::StoreReceipt> {+ Err(self.error.clone())+ }++ async fn forget(+ &self,+ _target: tinymemory_api::ForgetTarget,+ ) -> tinymemory_api::Result<tinymemory_api::ForgetReport> {+ Err(self.error.clone())+ }++ async fn list(&self, _req: ListRequest) -> tinymemory_api::Result<tinymemory_api::ListPage> {+ Err(self.error.clone())+ }++ async fn consolidate(+ &self,+ _req: tinymemory_api::ConsolidateRequest,+ ) -> tinymemory_api::Result<tinymemory_api::ConsolidateReceipt> {+ Err(self.error.clone())+ }+}diff --git a/crates/openhuman-core/src/memory/tools.rs b/crates/openhuman-core/src/memory/tools.rsindex 4336ee72ec..2c87d67d1b 100644--- a/crates/openhuman-core/src/memory/tools.rs+++ b/crates/openhuman-core/src/memory/tools.rs@@ -186,6 +186,10 @@ impl CallFacts {}}+/// What a `learn` result tells the model: the write was accepted, and+/// recall may not find it for a moment.+pub const LEARN_STATUS: &str = "saved; searchable in recall shortly";+fn arg_str(args: &Value, key: &str) -> Option<String> {args.get(key).and_then(Value::as_str)@@ -238,17 +242,24 @@ pub async fn run_action(config: &Config, args: &Value, facts: &CallFacts) -> TooOk(mut params) => {params.meta = None;let kind = params.kind.unwrap_or(tinymemory_api::LearningKind::Fact);- ops::learn(config, params, Some(facts.learn_meta()))- .await- .map(|view| {- BUS.publish(DomainEvent::MemoryStored {- key: view.id.clone(),- category: kind.as_str().to_string(),- namespace: "learnings".to_string(),- });- json!(view)- })- .map_err(render_error)+ // Accepted, not visible: indexing can take minutes on a+ // hosted engine and the turn must not wait for it.+ ops::learn_with(+ config,+ params,+ Some(facts.learn_meta()),+ tinymemory_api::WriteOptions::accepted(),+ )+ .await+ .map(|view| {+ BUS.publish(DomainEvent::MemoryStored {+ key: view.id.clone(),+ category: kind.as_str().to_string(),+ namespace: "learnings".to_string(),+ });+ json!({"id": view.id, "status": LEARN_STATUS})+ })+ .map_err(render_error)}Err(error) => Err(error),},diff --git a/crates/openhuman-core/src/memory/tools_tests.rs b/crates/openhuman-core/src/memory/tools_tests.rsindex f560f9f340..5c494ef8a1 100644--- a/crates/openhuman-core/src/memory/tools_tests.rs+++ b/crates/openhuman-core/src/memory/tools_tests.rs@@ -426,3 +426,131 @@ async fn learnings_are_shared_under_a_root_and_a_team_root_is_kept_apart() {.iter().all(|hit| hit.meta.namespace != Namespace::agent("nobody")));}++/// The reference engine, recording how far each single store waited.+struct WaitRecorder {+ inner: tinymemory_api::conformance::ReferenceEngine,+ waits: std::sync::Mutex<Vec<tinymemory_api::WaitFor>>,+}++#[async_trait]+impl tinymemory_api::MemoryEngine for WaitRecorder {+ fn descriptor(&self) -> &tinymemory_api::EngineDescriptor {+ self.inner.descriptor()+ }+ async fn health(&self) -> tinymemory_api::EngineHealth {+ self.inner.health().await+ }+ async fn recall(+ &self,+ req: tinymemory_api::RecallRequest,+ ) -> tinymemory_api::Result<tinymemory_api::RecallAnswer> {+ self.inner.recall(req).await+ }+ async fn fetch(+ &self,+ req: tinymemory_api::FetchRequest,+ ) -> tinymemory_api::Result<tinymemory_api::FetchPage> {+ self.inner.fetch(req).await+ }+ async fn store(+ &self,+ item: tinymemory_api::StoreItem,+ ) -> tinymemory_api::Result<tinymemory_api::StoreReceipt> {+ self.store_with(item, tinymemory_api::WriteOptions::visible())+ .await+ }+ async fn store_with(+ &self,+ item: tinymemory_api::StoreItem,+ options: tinymemory_api::WriteOptions,+ ) -> tinymemory_api::Result<tinymemory_api::StoreReceipt> {+ self.waits.lock().unwrap().push(options.wait);+ self.inner.store(item).await+ }+ async fn forget(+ &self,+ target: tinymemory_api::ForgetTarget,+ ) -> tinymemory_api::Result<tinymemory_api::ForgetReport> {+ self.inner.forget(target).await+ }+ async fn list(+ &self,+ req: tinymemory_api::ListRequest,+ ) -> tinymemory_api::Result<tinymemory_api::ListPage> {+ self.inner.list(req).await+ }+ async fn consolidate(+ &self,+ req: tinymemory_api::ConsolidateRequest,+ ) -> tinymemory_api::Result<tinymemory_api::ConsolidateReceipt> {+ self.inner.consolidate(req).await+ }+}++#[tokio::test]+async fn learn_returns_on_accept_and_says_recall_may_lag() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ let engine = Arc::new(WaitRecorder {+ inner: tinymemory_api::conformance::ReferenceEngine::new(),+ waits: std::sync::Mutex::new(Vec::new()),+ });+ crate::memory::engine::install_test_engine(&config.workspace_dir, engine.clone());++ let learned = run_action(+ &config,+ &json!({"action": "learn", "text": "The user drinks oolong"}),+ &facts(),+ )+ .await;++ assert!(!learned.is_error, "{}", text(&learned));+ // A turn must never wait on the engine indexing a learning.+ assert_eq!(+ *engine.waits.lock().unwrap(),+ vec![tinymemory_api::WaitFor::Accepted]+ );+ let view = serde_json::from_str::<Value>(&text(&learned)).unwrap();+ assert!(!view["id"].as_str().unwrap().is_empty(), "{view}");+ assert_eq!(view["status"], LEARN_STATUS);++ // The RPC path still reads its own write.+ crate::memory::ops::learn(+ &config,+ LearnParams {+ text: "The user drinks puerh".into(),+ kind: None,+ confidence: None,+ meta: None,+ },+ None,+ )+ .await+ .unwrap();+ assert_eq!(+ engine.waits.lock().unwrap().last(),+ Some(&tinymemory_api::WaitFor::Visible)+ );+}++#[tokio::test]+async fn a_failed_learn_is_reported_to_the_model() {+ let tmp = tempfile::tempdir().unwrap();+ let config = config_in(&tmp);+ crate::memory::test_fixtures::RefusingEngine::out_of_credits().bind(&config);++ let learned = run_action(+ &config,+ &json!({"action": "learn", "text": "The user drinks oolong"}),+ &facts(),+ )+ .await;++ assert!(learned.is_error, "{}", text(&learned));+ assert!(+ text(&learned).contains("INSUFFICIENT_CREDITS"),+ "{}",+ text(&learned)+ );+}diff --git a/crates/openhuman-core/src/modules/browser.rs b/crates/openhuman-core/src/modules/browser.rsindex 0786aa4189..3bc18bc3d3 100644--- a/crates/openhuman-core/src/modules/browser.rs+++ b/crates/openhuman-core/src/modules/browser.rs@@ -20,6 +20,21 @@ use crate::config::Config;pub const MODULE_ID: &str = super::desktop::MODULE_ID;+/// What the agent is told when TinyComputer finds no Chrome. The module looks+/// in its own cache, the standard install locations, and the Puppeteer and+/// Playwright caches, so a Chrome kept anywhere else (`~/Applications`, the+/// Desktop) needs its path set. Left without this, an agent tried to install+/// a browser itself (`npx agent-browser install`, then `sudo`).+pub(crate) const CHROME_NOT_FOUND_HINT: &str = "Chrome was not found. Ask the user to set \+ the full path to the Chrome program under Connections > Computer Control > Browser > \+ Chrome path (for example /Applications/Google Chrome.app/Contents/MacOS/Google Chrome), \+ then try again. Do not install or download a browser yourself.";++/// Whether a module error or task failure says Chrome could not be found.+pub(crate) fn chrome_not_found(text: &str) -> bool {+ text.to_ascii_lowercase().contains("chrome not found")+}+#[derive(Debug, thiserror::Error)]pub enum BrowserCallError {#[error("TinyComputer browser unavailable: {0}")]@@ -55,10 +70,12 @@ impl BrowserCallError {.and_then(serde_json::Value::as_str).map(|name| name.rsplit('.').next().unwrap_or(name).to_owned()).unwrap_or_else(|| error.code.clone());- Self::Bus {- name,- message: error.message.clone(),- }+ let message = if chrome_not_found(&error.message) {+ format!("{} {CHROME_NOT_FOUND_HINT}", error.message)+ } else {+ error.message.clone()+ };+ Self::Bus { name, message }}}diff --git a/crates/openhuman-core/src/modules/browser_task.rs b/crates/openhuman-core/src/modules/browser_task.rsindex 0a89a6854d..0eae2e4b99 100644--- a/crates/openhuman-core/src/modules/browser_task.rs+++ b/crates/openhuman-core/src/modules/browser_task.rs@@ -67,6 +67,7 @@ pub fn start_request(config: &Config, task: &BrowserTask) -> StartTaskRequest {max_rescues: config.computer.max_rescues,..TaskBudget::default()},+ trace: super::computer_config::tracing_enabled(config),..StartTaskRequest::default()}}@@ -89,7 +90,7 @@ pub async fn start(config: &Config, task: &BrowserTask) -> Result<TaskView, Stri"[browser-task] starting");let view: TaskView = call(config, methods::START_TASK, request, true).await?;- follow(config, view).await+ settle(config, view).await}/// Answer a paused task and follow it again.@@ -100,7 +101,7 @@ pub async fn start(config: &Config, task: &BrowserTask) -> Result<TaskView, Stripub async fn resume(config: &Config, request: ContinueTaskRequest) -> Result<TaskView, String> {tracing::debug!(task = %request.id, approve = ?request.approve, "[browser-task] continuing");let view: TaskView = call(config, methods::CONTINUE_TASK, request, true).await?;- follow(config, view).await+ settle(config, view).await}/// Keep following a task that was still running when the last call returned.@@ -119,7 +120,7 @@ pub async fn wait(config: &Config, id: TaskId) -> Result<TaskView, String> {false,).await?;- follow(config, view).await+ settle(config, view).await}/// Cancel a task.@@ -140,15 +141,38 @@ pub async fn cancel(config: &Config, id: TaskId) -> Result<TaskView, String> {////// Returns a module or transport error.pub async fn report(config: &Config, id: TaskId) -> Result<TaskReport, String> {+ report_with(config, id, false).await+}++/// The task's record, with every Jev exchange when `trace` is set and the+/// task was started with `StartTask.trace`. A traced report can run to+/// megabytes, so only the tracing path asks for it.+///+/// # Errors+///+/// Returns a module or transport error.+pub(crate) async fn report_with(+ config: &Config,+ id: TaskId,+ trace: bool,+) -> Result<TaskReport, String> {call(config,methods::TASK_REPORT,- TaskReportRequest { id, trace: false },+ TaskReportRequest { id, trace },true,).await}+/// Follow `view` until it stops or the host deadline passes, then record+/// how it stopped (see [`super::browser_task_report`]).+async fn settle(config: &Config, view: TaskView) -> Result<TaskView, String> {+ let view = follow(config, view).await?;+ super::browser_task_report::record(config, &view).await;+ Ok(view)+}+async fn follow(config: &Config, mut view: TaskView) -> Result<TaskView, String> {let deadline = Instant::now() + Duration::from_secs(config.browser.task_timeout_secs.max(1));while matches!(view.status, tinycomputer_bus::agent::TaskStatus::Running) {diff --git a/crates/openhuman-core/src/modules/browser_task_report.rs b/crates/openhuman-core/src/modules/browser_task_report.rsnew file mode 100644index 0000000000..bc1b9d0818--- /dev/null+++ b/crates/openhuman-core/src/modules/browser_task_report.rs@@ -0,0 +1,315 @@+//! What the host keeps from a browser task once it stops: a content-free+//! summary in the log when the task stopped short (failed, or needs a person+//! or a plan), and — with tracing on — the module's full report under+//! `<workspace>/state/computer/tasks/`.+//!+//! A report holds page text (step notes, records and, when traced, every Jev+//! exchange), so it is written only to the workspace, readable by its owner+//! alone, and never logged: the log gets counts, the failed step's position+//! and kind, and the module's own one-line reason.++use std::collections::VecDeque;+use std::future::Future;+#[cfg(unix)]+use std::os::unix::fs::PermissionsExt;+use std::path::{Path, PathBuf};+use std::pin::Pin;+use std::sync::{Mutex, MutexGuard, OnceLock};+use std::time::{SystemTime, UNIX_EPOCH};++use tinycomputer_bus::agent::{RescueOutcome, TaskId, TaskReport, TaskStatus, TaskView};+use tinycomputer_bus::flow::StepOutcome;+use tokio::io::AsyncWriteExt;++use crate::config::Config;++#[cfg(test)]+#[path = "browser_task_report_tests.rs"]+mod tests;++/// How many stopped tasks are remembered, so a view followed again does not+/// record the same stop twice.+const REMEMBERED: usize = 64;+/// The most characters of a failure reason written to the log.+const REASON_CHARS: usize = 240;++/// A pending `TaskReport` call.+type ReportFetch<'a> = Pin<Box<dyn Future<Output = Result<TaskReport, String>> + Send + 'a>>;++/// Records `view` once per task and state: a log summary when it stopped+/// short, and the full report on disk when tracing is on and it settled.+/// Never fails the caller; a report that cannot be fetched is only logged,+/// and the next settle of the same state tries again.+pub(crate) async fn record(config: &Config, view: &TaskView) {+ let traced = super::computer_config::tracing_enabled(config);+ record_with(config, view, traced, |id, trace| {+ Box::pin(super::browser_task::report_with(config, id, trace))+ })+ .await;+}++/// [`record`] with tracing on or off as `traced` says, and the module's+/// `TaskReport` call passed in as `fetch`.+async fn record_with<'a>(+ config: &'a Config,+ view: &TaskView,+ traced: bool,+ fetch: impl FnOnce(TaskId, bool) -> ReportFetch<'a>,+) {+ if !worth_recording(&view.status, traced) {+ return;+ }+ let key = record_key(view);+ let claimed = recorded().claim(&key);+ if !claimed {+ return;+ }+ let report = match fetch(view.id.clone(), traced).await {+ Ok(report) => report,+ Err(error) => {+ // Give the claim back, so the next settle of this state tries again.+ recorded().release(&key);+ tracing::warn!(task = %view.id, %error, "[browser-task] report unavailable");+ return;+ }+ };+ if stopped_short(&view.status) {+ let summary = Summary::of(&view.status, &report);+ tracing::warn!(+ task = %view.id,+ state = status_name(&view.status),+ step = ?summary.failed_step,+ kind = summary.failed_kind.unwrap_or("-"),+ steps = summary.steps,+ jev_calls = summary.jev_calls,+ actions = summary.actions,+ rescues = summary.rescues,+ recovered = summary.recovered,+ reason = %reason(&view.status),+ "[browser-task] task stopped short"+ );+ }+ if traced {+ write(config, &report).await;+ }+}++/// A task that ended without doing what it was asked.+fn stopped_short(status: &TaskStatus) -> bool {+ matches!(+ status,+ TaskStatus::Failed { .. } | TaskStatus::NeedsHuman { .. } | TaskStatus::NeedsPlan { .. }+ )+}++/// Whether a stop in `status` is recorded: always when it stopped short, and+/// any settled stop when `traced`.+fn worth_recording(status: &TaskStatus, traced: bool) -> bool {+ stopped_short(status) || (traced && !matches!(status, TaskStatus::Running))+}++/// What a task's stop is remembered by: the task, its state and its progress.+fn record_key(view: &TaskView) -> String {+ format!(+ "{}|{}|{:.3}",+ view.id,+ status_name(&view.status),+ view.progress+ )+}++/// The stops this process has recorded, or is recording.+fn recorded() -> MutexGuard<'static, Recorded> {+ static RECORDED: OnceLock<Mutex<Recorded>> = OnceLock::new();+ RECORDED+ .get_or_init(|| Mutex::new(Recorded::new(REMEMBERED)))+ .lock()+ .unwrap_or_else(std::sync::PoisonError::into_inner)+}++/// Stops claimed for recording, oldest first, at most `cap` of them.+#[derive(Debug)]+struct Recorded {+ keys: VecDeque<String>,+ cap: usize,+}++impl Recorded {+ /// Remembers at most `cap` stops.+ fn new(cap: usize) -> Self {+ Self {+ keys: VecDeque::new(),+ cap,+ }+ }++ /// Claims `key`; false when it is already recorded or being recorded.+ fn claim(&mut self, key: &str) -> bool {+ if self.keys.iter().any(|seen| seen == key) {+ return false;+ }+ if self.keys.len() == self.cap {+ self.keys.pop_front();+ }+ self.keys.push_back(key.to_owned());+ true+ }++ /// Gives a claim back, so the stop can be recorded later.+ fn release(&mut self, key: &str) {+ self.keys.retain(|seen| seen != key);+ }+}++/// The state's wire name, for the log and the record key.+fn status_name(status: &TaskStatus) -> &'static str {+ match status {+ TaskStatus::Running => "running",+ TaskStatus::NeedsInput { .. } => "needs_input",+ TaskStatus::NeedsApproval { .. } => "needs_approval",+ TaskStatus::Checkpoint { .. } => "checkpoint",+ TaskStatus::NeedsHuman { .. } => "needs_human",+ TaskStatus::NeedsPlan { .. } => "needs_plan",+ TaskStatus::Done { .. } => "done",+ TaskStatus::Failed { .. } => "failed",+ TaskStatus::Cancelled => "cancelled",+ }+}++/// The module's own reason for stopping, cut to [`REASON_CHARS`].+fn reason(status: &TaskStatus) -> String {+ let reason = match status {+ TaskStatus::Failed { reason, .. } | TaskStatus::NeedsHuman { reason, .. } => {+ reason.as_str()+ }+ TaskStatus::NeedsPlan { .. } => "no planner is configured",+ _ => "",+ };+ reason.chars().take(REASON_CHARS).collect()+}++/// The counts a stopped task is logged with; nothing a page showed.+#[derive(Debug, PartialEq, Eq)]+struct Summary {+ steps: usize,+ jev_calls: u64,+ actions: usize,+ rescues: usize,+ recovered: usize,+ failed_step: Option<usize>,+ failed_kind: Option<&'static str>,+}++impl Summary {+ /// The counts in `report`, and the failed step when `status` names one.+ fn of(status: &TaskStatus, report: &TaskReport) -> Self {+ let failed_step = match status {+ TaskStatus::Failed { step, .. } => *step,+ _ => None,+ };+ Self {+ steps: report.steps.len(),+ jev_calls: report+ .steps+ .iter()+ .map(|step| u64::from(step.jev_calls))+ .sum(),+ actions: report.steps.iter().map(|step| step.actions.len()).sum(),+ rescues: report.rescues.len(),+ recovered: report+ .rescues+ .iter()+ .filter(|rescue| rescue.outcome == RescueOutcome::Recovered)+ .count(),+ failed_step,+ failed_kind: report+ .steps+ .iter()+ .rev()+ .find(|step| step.outcome == StepOutcome::Failed)+ .map(|step| kind_name(&step.kind)),+ }+ }+}++/// A step kind as the log may show it: one of the flow grammar's own words,+/// never free text.+fn kind_name(kind: &str) -> &'static str {+ const KINDS: &[&str] = &[+ "open",+ "browse",+ "do",+ "enter",+ "choose",+ "read",+ "extract",+ "pick",+ "verify",+ "wait_for",+ "if",+ "repeat_until",+ "stop_before",+ ];+ KINDS+ .iter()+ .find(|known| kind.eq_ignore_ascii_case(known))+ .copied()+ .unwrap_or("other")+}++/// Where a report of task `id`, recorded at `millis`, is written.+fn report_path(config: &Config, id: &str, millis: u128) -> PathBuf {+ let id: String = id+ .chars()+ .filter(|character| character.is_ascii_alphanumeric() || matches!(character, '-' | '_'))+ .collect();+ super::computer_config::trace_dir(config)+ .join("tasks")+ .join(format!("{millis}-{id}.json"))+}++/// Writes `report` under the workspace's trace directory, and logs where;+/// a failure is logged, never raised.+async fn write(config: &Config, report: &TaskReport) {+ let millis = SystemTime::now()+ .duration_since(UNIX_EPOCH)+ .map_or(0, |elapsed| elapsed.as_millis());+ let path = report_path(config, &report.view.id.0, millis);+ match write_private(&path, report).await {+ Ok(bytes) => tracing::info!(+ task = %report.view.id,+ path = %path.display(),+ bytes,+ exchanges = report.trace.len(),+ "[browser-task] report written"+ ),+ Err(error) => tracing::warn!(+ task = %report.view.id,+ %error,+ "[browser-task] report not written"+ ),+ }+}++/// Writes `report` to `path` as JSON, in a directory and a file only their+/// owner can read, also when either already existed: a report holds page+/// text. Returns how many bytes were written.+async fn write_private(path: &Path, report: &TaskReport) -> std::io::Result<usize> {+ let bytes = serde_json::to_vec_pretty(report).map_err(std::io::Error::other)?;+ if let Some(dir) = path.parent() {+ tokio::fs::create_dir_all(dir).await?;+ #[cfg(unix)]+ tokio::fs::set_permissions(dir, std::fs::Permissions::from_mode(0o700)).await?;+ }+ let mut options = tokio::fs::OpenOptions::new();+ options.write(true).create(true).truncate(true);+ #[cfg(unix)]+ options.mode(0o600);+ let mut file = options.open(path).await?;+ #[cfg(unix)]+ file.set_permissions(std::fs::Permissions::from_mode(0o600))+ .await?;+ file.write_all(&bytes).await?;+ file.flush().await?;+ Ok(bytes.len())+}diff --git a/crates/openhuman-core/src/modules/browser_task_report_tests.rs b/crates/openhuman-core/src/modules/browser_task_report_tests.rsnew file mode 100644index 0000000000..09bcf325dd--- /dev/null+++ b/crates/openhuman-core/src/modules/browser_task_report_tests.rs@@ -0,0 +1,472 @@+//! A stopped task is summarised without page content, recorded once per+//! state (and again when its report could not be fetched), and its full+//! report is written inside the workspace, readable by its owner alone.++use std::sync::atomic::{AtomicUsize, Ordering};+use std::sync::Arc;++use super::*;+use serde_json::{json, Value};++/// Log lines written on this thread while the guard from [`capture_logs`]+/// lives.+#[derive(Clone, Default)]+struct Capture(Arc<std::sync::Mutex<Vec<u8>>>);++impl Capture {+ /// Everything logged so far.+ fn text(&self) -> String {+ String::from_utf8(self.0.lock().unwrap().clone()).unwrap()+ }+}++impl std::io::Write for Capture {+ fn write(&mut self, bytes: &[u8]) -> std::io::Result<usize> {+ self.0.lock().unwrap().extend_from_slice(bytes);+ Ok(bytes.len())+ }++ fn flush(&mut self) -> std::io::Result<()> {+ Ok(())+ }+}++impl<'a> tracing_subscriber::fmt::MakeWriter<'a> for Capture {+ type Writer = Self;++ fn make_writer(&'a self) -> Self::Writer {+ self.clone()+ }+}++/// Captures this thread's log lines, at every level, until the guard drops.+fn capture_logs() -> (Capture, tracing::subscriber::DefaultGuard) {+ let capture = Capture::default();+ let subscriber = tracing_subscriber::fmt()+ .with_writer(capture.clone())+ .with_ansi(false)+ .with_max_level(tracing::Level::TRACE)+ .finish();+ (capture, tracing::subscriber::set_default(subscriber))+}++/// A config whose workspace is inside `dir`.+fn workspace_config(dir: &tempfile::TempDir) -> Config {+ let mut config = Config::default();+ config.workspace_dir = dir.path().join("workspace");+ config+}++/// A `fetch` for [`record_with`] that counts its calls and answers `reply`.+fn fetch_counted<'a>(+ calls: &'a AtomicUsize,+ reply: Result<TaskReport, String>,+) -> impl FnOnce(TaskId, bool) -> ReportFetch<'a> {+ move |_, _| {+ calls.fetch_add(1, Ordering::SeqCst);+ Box::pin(async move { reply })+ }+}++/// A view of task `id` in `status`.+fn view(id: &str, status: Value, progress: f32) -> TaskView {+ serde_json::from_value(json!({+ "id": id,+ "status": status,+ "summary": "searching",+ "progress": progress,+ "next": []+ }))+ .unwrap()+}++/// A failed status at step 2, with the module's one-line reason.+fn failed() -> Value {+ json!({+ "state": "failed",+ "step": 2,+ "reason": "the last three actions changed nothing on screen",+ "hint": "",+ "recoverable": true+ })+}++/// A report of three steps, the last one failed, with one rescue.+fn report(view: &TaskView) -> TaskReport {+ serde_json::from_value(json!({+ "view": view,+ "steps": [+ {"path": "0", "kind": "browse", "text": "open the site", "outcome": "done",+ "turns": 0, "jev_calls": 0, "actions": [], "loops": [], "note": ""},+ {"path": "1", "kind": "enter", "text": "type Asha", "outcome": "done",+ "turns": 2, "jev_calls": 14, "actions": [{"action": "fill", "ok": true}],+ "loops": [], "note": ""},+ {"path": "2", "kind": "do", "text": "search for trains", "outcome": "failed",+ "turns": 3, "jev_calls": 21,+ "actions": [{"action": "click", "ok": true}, {"action": "click", "ok": false}],+ "loops": [], "note": "nothing changed"}+ ],+ "records": {},+ "artifacts": [],+ "learned": [],+ "trace": [],+ "rescues": [+ {"step": 2, "failure": "nothing changed", "reason": "timed out", "outcome": "gave_up"}+ ]+ }))+ .unwrap()+}++#[test]+fn a_task_that_stopped_short_is_summarised_with_counts_not_page_text() {+ let view = view("t-summary", failed(), 0.33);+ let summary = Summary::of(&view.status, &report(&view));+ assert_eq!(+ summary,+ Summary {+ steps: 3,+ jev_calls: 35,+ actions: 3,+ rescues: 1,+ recovered: 0,+ failed_step: Some(2),+ failed_kind: Some("do"),+ }+ );+}++#[test]+fn only_a_task_that_stopped_short_or_a_traced_settled_one_is_recorded() {+ let done = view(+ "t-done",+ json!({"state": "done", "answer": "found", "records": {}}),+ 1.0,+ );+ let running = view("t-running", json!({"state": "running"}), 0.5);+ let human = view(+ "t-human",+ json!({"state": "needs_human", "reason": "log in"}),+ 0.5,+ );+ let plan = view("t-plan", json!({"state": "needs_plan", "guide": "…"}), 0.0);+ let failed = view("t-failed", failed(), 0.3);++ assert!(worth_recording(&failed.status, false));+ assert!(worth_recording(&human.status, false));+ assert!(worth_recording(&plan.status, false));+ assert!(!worth_recording(&done.status, false));+ assert!(worth_recording(&done.status, true));+ assert!(!worth_recording(&running.status, true));+}++#[test]+fn the_same_stop_is_claimed_once_and_can_be_given_back() {+ let mut recorded = Recorded::new(8);+ let first = record_key(&view("t-dedupe", failed(), 0.33));+ assert!(recorded.claim(&first));+ assert!(+ !recorded.claim(&first),+ "followed again, it is not recorded twice"+ );+ let later = record_key(&view("t-dedupe", failed(), 0.66));+ assert!(+ recorded.claim(&later),+ "a later stop of the same task is new"+ );+ recorded.release(&first);+ assert!(+ recorded.claim(&first),+ "a released stop can be claimed again"+ );+}++#[test]+fn the_oldest_remembered_stop_is_forgotten_first() {+ let mut recorded = Recorded::new(2);+ assert!(recorded.claim("a"));+ assert!(recorded.claim("b"));+ assert!(recorded.claim("c"));+ assert!(recorded.claim("a"), "the oldest was forgotten to make room");+ assert!(!recorded.claim("c"));+}++#[test]+fn every_state_has_its_own_name() {+ let names = [+ (json!({"state": "running"}), "running"),+ (json!({"state": "needs_input", "fields": []}), "needs_input"),+ (+ json!({"state": "needs_approval", "action": "send it", "target": "Send"}),+ "needs_approval",+ ),+ (+ json!({"state": "checkpoint", "reason": "payment", "location": "pay page",+ "summary": "", "continuable": false}),+ "checkpoint",+ ),+ (+ json!({"state": "needs_human", "reason": "log in"}),+ "needs_human",+ ),+ (json!({"state": "needs_plan", "guide": "…"}), "needs_plan"),+ (+ json!({"state": "done", "answer": "found", "records": {}}),+ "done",+ ),+ (failed(), "failed"),+ (json!({"state": "cancelled"}), "cancelled"),+ ];+ for (status, name) in names {+ let status: TaskStatus = serde_json::from_value(status).unwrap();+ assert_eq!(status_name(&status), name);+ }+}++#[test]+fn a_task_that_needs_a_person_names_no_failed_step() {+ let view = view(+ "t-human-summary",+ json!({"state": "needs_human", "reason": "log in"}),+ 0.5,+ );+ let summary = Summary::of(&view.status, &report(&view));+ assert_eq!(summary.failed_step, None);+ assert_eq!(summary.failed_kind, Some("do"));+}++#[tokio::test]+async fn a_stopped_task_is_logged_once_with_counts_and_no_step_text() {+ let dir = tempfile::tempdir().unwrap();+ let config = workspace_config(&dir);+ let view = view("t-rec-once", failed(), 0.33);+ let (logs, _guard) = capture_logs();+ let calls = AtomicUsize::new(0);++ record_with(+ &config,+ &view,+ false,+ fetch_counted(&calls, Ok(report(&view))),+ )+ .await;+ record_with(+ &config,+ &view,+ false,+ fetch_counted(&calls, Ok(report(&view))),+ )+ .await;++ assert_eq!(calls.load(Ordering::SeqCst), 1, "fetched once per stop");+ let text = logs.text();+ assert_eq!(text.matches("task stopped short").count(), 1, "{text}");+ assert!(text.contains("jev_calls=35"), "{text}");+ assert!(text.contains("changed nothing on screen"), "{text}");+ for page_text in ["type Asha", "search for trains", "open the site"] {+ assert!(!text.contains(page_text), "step text leaked: {text}");+ }+ assert!(+ !super::super::computer_config::trace_dir(&config).exists(),+ "an untraced stop writes no report"+ );+}++#[tokio::test]+async fn a_report_that_could_not_be_fetched_is_fetched_on_the_next_settle() {+ let dir = tempfile::tempdir().unwrap();+ let config = workspace_config(&dir);+ let view = view("t-rec-retry", failed(), 0.33);+ let (logs, _guard) = capture_logs();+ let calls = AtomicUsize::new(0);++ record_with(+ &config,+ &view,+ false,+ fetch_counted(&calls, Err("module unavailable".to_owned())),+ )+ .await;+ assert!(+ logs.text().contains("report unavailable"),+ "{}",+ logs.text()+ );+ assert!(!logs.text().contains("task stopped short"));++ record_with(+ &config,+ &view,+ false,+ fetch_counted(&calls, Ok(report(&view))),+ )+ .await;+ assert_eq!(+ calls.load(Ordering::SeqCst),+ 2,+ "the failed fetch was retried"+ );+ assert!(+ logs.text().contains("task stopped short"),+ "{}",+ logs.text()+ );+}++#[tokio::test]+async fn a_traced_task_that_settled_writes_its_traced_report() {+ let dir = tempfile::tempdir().unwrap();+ let config = workspace_config(&dir);+ let view = view(+ "t-rec-traced",+ json!({"state": "done", "answer": "found", "records": {}}),+ 1.0,+ );+ let asked_for_trace = Arc::new(std::sync::Mutex::new(None));+ let asked = Arc::clone(&asked_for_trace);+ let reply = report(&view);++ record_with(&config, &view, true, move |id, trace| {+ *asked.lock().unwrap() = Some((id, trace));+ Box::pin(async move { Ok(reply) })+ })+ .await;++ assert_eq!(+ *asked_for_trace.lock().unwrap(),+ Some((TaskId("t-rec-traced".to_owned()), true))+ );+ let tasks = super::super::computer_config::trace_dir(&config).join("tasks");+ assert_eq!(std::fs::read_dir(&tasks).unwrap().count(), 1);+}++#[tokio::test]+async fn an_untraced_task_that_finished_is_not_fetched() {+ let dir = tempfile::tempdir().unwrap();+ let config = workspace_config(&dir);+ let view = view(+ "t-rec-done",+ json!({"state": "done", "answer": "found", "records": {}}),+ 1.0,+ );+ let calls = AtomicUsize::new(0);+ record_with(+ &config,+ &view,+ false,+ fetch_counted(&calls, Ok(report(&view))),+ )+ .await;+ assert_eq!(calls.load(Ordering::SeqCst), 0);+}++#[test]+fn the_logged_reason_is_the_modules_own_line_cut_short() {+ let long = "x".repeat(500);+ let status: TaskStatus = serde_json::from_value(json!({+ "state": "failed", "step": null, "reason": long, "hint": "", "recoverable": false+ }))+ .unwrap();+ assert_eq!(reason(&status).chars().count(), REASON_CHARS);+ let plan: TaskStatus =+ serde_json::from_value(json!({"state": "needs_plan", "guide": "write a flow"})).unwrap();+ assert_eq!(reason(&plan), "no planner is configured");+ assert_eq!(reason(&TaskStatus::Cancelled), "");+}++#[test]+fn a_step_kind_outside_the_flow_grammar_is_logged_as_other() {+ assert_eq!(kind_name("DO"), "do");+ assert_eq!(kind_name("stop_before"), "stop_before");+ assert_eq!(kind_name("<b>Pay</b>"), "other");+}++#[test]+fn a_report_path_stays_in_the_workspace_and_names_the_task_safely() {+ let dir = tempfile::tempdir().unwrap();+ let mut config = Config::default();+ config.workspace_dir = dir.path().join("workspace");+ let path = report_path(&config, "t-1/../etc", 42);+ assert_eq!(+ path,+ config+ .workspace_dir+ .join("state")+ .join("computer")+ .join("tasks")+ .join("42-t-1etc.json")+ );+}++#[tokio::test]+async fn a_traced_report_is_written_whole_into_the_workspace() {+ let dir = tempfile::tempdir().unwrap();+ let mut config = Config::default();+ config.workspace_dir = dir.path().join("workspace");+ let view = view("t-write", failed(), 0.33);+ let report = report(&view);+ write(&config, &report).await;+ let tasks = super::super::computer_config::trace_dir(&config).join("tasks");+ let written = std::fs::read_dir(&tasks)+ .unwrap()+ .map(|entry| entry.unwrap().path())+ .collect::<Vec<_>>();+ assert_eq!(written.len(), 1, "{written:?}");+ let name = written[0]+ .file_name()+ .unwrap()+ .to_string_lossy()+ .into_owned();+ assert!(name.ends_with("-t-write.json"), "{name}");+ let back: TaskReport = serde_json::from_slice(&std::fs::read(&written[0]).unwrap()).unwrap();+ assert_eq!(back, report);+}++#[cfg(unix)]+#[tokio::test]+async fn a_report_and_its_directory_are_readable_by_their_owner_alone() {+ use std::os::unix::fs::PermissionsExt;+ let dir = tempfile::tempdir().unwrap();+ let config = workspace_config(&dir);+ let tasks = super::super::computer_config::trace_dir(&config).join("tasks");+ // A directory left open by an earlier run is narrowed too.+ std::fs::create_dir_all(&tasks).unwrap();+ std::fs::set_permissions(&tasks, std::fs::Permissions::from_mode(0o755)).unwrap();++ let view = view("t-private", failed(), 0.33);+ write(&config, &report(&view)).await;++ let mode =+ |path: &std::path::Path| std::fs::metadata(path).unwrap().permissions().mode() & 0o777;+ assert_eq!(mode(&tasks), 0o700);+ let file = std::fs::read_dir(&tasks)+ .unwrap()+ .next()+ .unwrap()+ .unwrap()+ .path();+ assert_eq!(mode(&file), 0o600);++ // Overwriting a file that was readable by others narrows it as well.+ std::fs::set_permissions(&file, std::fs::Permissions::from_mode(0o644)).unwrap();+ write_private(&file, &report(&view)).await.unwrap();+ assert_eq!(mode(&file), 0o600);+}++#[tokio::test]+async fn a_report_that_cannot_be_written_is_only_logged() {+ let dir = tempfile::tempdir().unwrap();+ let config = workspace_config(&dir);+ // `state` is a file, so the report's directory cannot be made.+ std::fs::create_dir_all(&config.workspace_dir).unwrap();+ std::fs::write(config.workspace_dir.join("state"), b"not a directory").unwrap();+ let (logs, _guard) = capture_logs();++ let view = view("t-unwritable", failed(), 0.33);+ write(&config, &report(&view)).await;++ assert!(+ logs.text().contains("report not written"),+ "{}",+ logs.text()+ );+}diff --git a/crates/openhuman-core/src/modules/browser_task_tests.rs b/crates/openhuman-core/src/modules/browser_task_tests.rsindex ccf1bceb0f..c662c34136 100644--- a/crates/openhuman-core/src/modules/browser_task_tests.rs+++ b/crates/openhuman-core/src/modules/browser_task_tests.rs@@ -1,4 +1,5 @@use super::*;+use serde_json::json;use tinycomputer_bus::agent::AgentError;fn task() -> BrowserTask {@@ -30,6 +31,13 @@ fn start_request_confines_the_task_to_the_browser_under_host_policy() {assert_eq!(request.budget.max_rescues, Some(2));}+#[test]+fn a_traced_host_asks_the_module_to_record_every_decision() {+ let mut config = Config::default();+ config.computer.trace = true;+ assert!(start_request(&config, &task()).trace);+}+#[tokio::test]async fn start_refuses_a_task_without_origins() {let mut empty = task();@@ -81,3 +89,21 @@ fn a_saved_flow_is_run_instead_of_planned() {assert_eq!(request.flow, Some(flow));assert_eq!(request.task.as_deref(), Some("Find the opening hours"));}++#[tokio::test]+async fn a_task_that_already_stopped_settles_without_calling_the_module() {+ // Not running, so no `AwaitTask`; finished and untraced, so no report is+ // fetched either.+ let mut config = Config::default();+ config.computer.trace = false;+ let view: TaskView = serde_json::from_value(json!({+ "id": "t-settled",+ "status": {"state": "done", "answer": "found", "records": {}},+ "summary": "found it",+ "progress": 1.0,+ "next": []+ }))+ .unwrap();+ let settled = settle(&config, view.clone()).await.unwrap();+ assert_eq!(settled, view);+}diff --git a/crates/openhuman-core/src/modules/browser_tests.rs b/crates/openhuman-core/src/modules/browser_tests.rsindex 2f1fc68e01..60e98620d5 100644--- a/crates/openhuman-core/src/modules/browser_tests.rs+++ b/crates/openhuman-core/src/modules/browser_tests.rs@@ -131,6 +131,27 @@ fn failed_reply_without_a_name_falls_back_to_the_code() {));}+#[test]+fn a_missing_chrome_tells_the_agent_where_the_user_sets_its_path() {+ let response: DesktopResponse = serde_json::from_value(serde_json::json!({+ "version": "2.5",+ "ok": false,+ "command": "browser-open-session",+ "error": {+ "code": "BROWSER_UNAVAILABLE",+ "message": "browser unavailable: Chrome not found. Checked: - System Chrome installations",+ "details": {"name": "ai.tinyhumans.tinycomputer.Browser.Error.BrowserUnavailable"}+ }+ }))+ .unwrap();+ let error = BrowserCallError::from_response(&response).to_string();+ assert!(error.starts_with("BrowserUnavailable: browser unavailable: Chrome not found"));+ assert!(error.contains("Chrome path"), "{error}");+ assert!(error.contains("Do not install"), "{error}");+ assert!(chrome_not_found("CHROME NOT FOUND"));+ assert!(!chrome_not_found("Chrome launch timed out"));+}+#[test]fn fresh_profile_is_the_default() {let config = Config::default();diff --git a/crates/openhuman-core/src/modules/computer_config.rs b/crates/openhuman-core/src/modules/computer_config.rsindex 0c6643dc31..3b6eb40095 100644--- a/crates/openhuman-core/src/modules/computer_config.rs+++ b/crates/openhuman-core/src/modules/computer_config.rs@@ -9,6 +9,11 @@//! - `planner` — the planner, rescue and output models: through the//! TinyHumans proxy when signed in, else the user's OpenRouter key.//! - `browser` — the Chrome executable the user picked, if any.+//! - `trace_path` — where desktop commands are traced, when tracing is on.++#[cfg(unix)]+use std::os::unix::fs::PermissionsExt;+use std::path::{Path, PathBuf};use serde_json::{json, Map, Value};@@ -56,6 +61,18 @@ fn jev(config: &Config, hosted: Option<&str>) -> Option<Value> {}}+/// The model the TinyHumans gateway runs the planner, rescue and output+/// roles on when the user picked none. The module's own defaults are+/// OpenRouter ids (`anthropic/claude-sonnet-5`, `openai/gpt-6-luna`) that the+/// gateway refuses ("Model … is not available"), so a signed-in task failed+/// before its first step; the gateway's reasoning tier can outlast its+/// request timeout on a rescue (HTTP 504). A direct OpenRouter key keeps the+/// module's defaults.+pub const HOSTED_REASONING_MODEL: &str = "agentic-v1";++/// The `planner` configuration: the hosted route with the session's bearer+/// when signed in, else the user's OpenRouter key; the user's chosen models,+/// with [`HOSTED_REASONING_MODEL`] for any unchosen role on the hosted route.fn planner(config: &Config, hosted: Option<&str>) -> Option<Value> {let mut planner = match hosted {Some(api_key) => json!({@@ -69,17 +86,54 @@ fn planner(config: &Config, hosted: Option<&str>) -> Option<Value> {}};let computer = &config.computer;- for (key, value) in [- ("model", &computer.planner_model),- ("rescue_model", &computer.rescue_model),+ let fallback = hosted.map(|_| HOSTED_REASONING_MODEL);+ for (key, chosen) in [+ ("model", computer.planner_model.as_deref()),+ ("rescue_model", computer.rescue_model.as_deref()),+ ("output_model", None),] {- if let Some(model) = value {+ let chosen = chosen.map(str::trim).filter(|model| !model.is_empty());+ if let Some(model) = chosen.or(fallback) {planner[key] = json!(model);}}Some(planner)}+/// The environment switch that turns tracing on for one run.+pub const TRACE_ENV: &str = "OPENHUMAN_COMPUTER_TRACE";++/// Whether TinyComputer runs are traced: `[computer] trace`, or+/// `OPENHUMAN_COMPUTER_TRACE=1` in the environment.+#[must_use]+pub fn tracing_enabled(config: &Config) -> bool {+ tracing_enabled_with(config, std::env::var(TRACE_ENV).ok().as_deref())+}++/// [`tracing_enabled`] with the environment switch's value passed in.+fn tracing_enabled_with(config: &Config, env: Option<&str>) -> bool {+ config.computer.trace+ || matches!(+ env.map(str::trim),+ Some("1" | "true" | "TRUE" | "yes" | "YES")+ )+}++/// Where traces and task reports are written: `<workspace>/state/computer`.+#[must_use]+pub fn trace_dir(config: &Config) -> PathBuf {+ config.workspace_dir.join("state").join("computer")+}++/// Creates `dir` for traces, readable by its owner alone, also when it+/// already existed: a trace holds what the screen showed.+fn create_trace_dir(dir: &Path) -> std::io::Result<()> {+ std::fs::create_dir_all(dir)?;+ #[cfg(unix)]+ std::fs::set_permissions(dir, std::fs::Permissions::from_mode(0o700))?;+ Ok(())+}+/// Build the module configuration for `config`.#[must_use]pub fn module_config(config: &Config) -> Value {@@ -94,11 +148,23 @@ pub fn module_config(config: &Config) -> Value {if let Some(executable) = config.browser.chrome_path.as_ref() {out.insert("browser".into(), json!({ "executable": executable }));}+ let traced = tracing_enabled(config);+ if traced {+ let dir = trace_dir(config);+ if let Err(error) = create_trace_dir(&dir) {+ tracing::warn!(%error, "[computer] trace directory unavailable");+ }+ out.insert(+ "trace_path".into(),+ json!(dir.join("desktop-trace.jsonl").to_string_lossy()),+ );+ }tracing::debug!(decision_model = config.computer.decision_model.as_str(),jev = out.contains_key("jev"),planner = out.contains_key("planner"),hosted = hosted.is_some(),+ traced,"[computer] module config built");Value::Object(out)diff --git a/crates/openhuman-core/src/modules/computer_config_tests.rs b/crates/openhuman-core/src/modules/computer_config_tests.rsindex 55d1c22b19..70a8e8223a 100644--- a/crates/openhuman-core/src/modules/computer_config_tests.rs+++ b/crates/openhuman-core/src/modules/computer_config_tests.rs@@ -37,9 +37,24 @@ fn signed_in_host_routes_jev_and_planner_through_tinyhumans() {assert!(value["planner"]["sdk_name"].is_string());assert_eq!(value["planner"]["rescue_model"], "openai/gpt-6-luna-pro");assert_eq!(value["planner"]["model"], "anthropic/claude-sonnet-5");+ // The output shaper has no setting; the gateway runs it on its own model.+ assert_eq!(value["planner"]["output_model"], HOSTED_REASONING_MODEL);assert_eq!(billing_route(&config), "hosted");}+#[test]+fn signed_in_host_runs_unchosen_roles_on_a_model_the_gateway_serves() {+ let dir = tempfile::tempdir().unwrap();+ let mut config = config_in(dir.path());+ api_key::store_api_key(&config, "th_test_backend").unwrap();+ // A blank choice is no choice.+ config.computer.rescue_model = Some(" ".into());+ let value = module_config(&config);+ for role in ["model", "rescue_model", "output_model"] {+ assert_eq!(value["planner"][role], HOSTED_REASONING_MODEL, "{role}");+ }+}+#[test]fn byok_host_uses_openrouter_for_both() {let dir = tempfile::tempdir().unwrap();@@ -49,7 +64,10 @@ fn byok_host_uses_openrouter_for_both() {assert_eq!(value["jev"]["provider"], "open_router");assert_eq!(value["planner"]["provider"], "open_router");assert_eq!(value["planner"]["api_key"], "or_test_direct");- assert!(value["planner"].get("rescue_model").is_none());+ // OpenRouter serves the module's own defaults, so none is sent.+ for role in ["model", "rescue_model", "output_model"] {+ assert!(value["planner"].get(role).is_none(), "{role}");+ }assert_eq!(billing_route(&config), "direct_openrouter");}@@ -78,6 +96,33 @@ fn open_jev_and_sage_use_their_own_keys() {assert_eq!(billing_route(&config), "sage");}+#[test]+fn tracing_is_off_unless_the_config_or_the_environment_turns_it_on() {+ let dir = tempfile::tempdir().unwrap();+ let mut config = config_in(dir.path());+ assert!(!tracing_enabled_with(&config, None));+ assert!(!tracing_enabled_with(&config, Some("0")));+ assert!(tracing_enabled_with(&config, Some("1")));+ assert!(tracing_enabled_with(&config, Some(" true ")));+ config.computer.trace = true;+ assert!(tracing_enabled_with(&config, None));+}++#[test]+fn a_traced_host_gives_the_module_a_desktop_trace_path_in_the_workspace() {+ let dir = tempfile::tempdir().unwrap();+ let mut config = config_in(dir.path());+ config.computer.trace = true;+ let value = module_config(&config);+ let expected = trace_dir(&config).join("desktop-trace.jsonl");+ assert_eq!(value["trace_path"], json!(expected.to_string_lossy()));+ assert!(+ trace_dir(&config).is_dir(),+ "the trace directory is created"+ );+ assert!(expected.starts_with(&config.workspace_dir));+}+#[test]fn chrome_path_is_the_module_browser_executable() {let dir = tempfile::tempdir().unwrap();@@ -89,3 +134,35 @@ fn chrome_path_is_the_module_browser_executable() {json!({"executable": "/Applications/Chrome.app"}));}++#[test]+fn a_trace_directory_that_cannot_be_made_still_leaves_the_module_configured() {+ let dir = tempfile::tempdir().unwrap();+ let mut config = config_in(dir.path());+ config.computer.trace = true;+ std::fs::create_dir_all(&config.workspace_dir).unwrap();+ // `state` is a file, so the trace directory cannot be made.+ std::fs::write(config.workspace_dir.join("state"), b"not a directory").unwrap();+ let value = module_config(&config);+ assert!(value["trace_path"].is_string());+ assert!(!trace_dir(&config).is_dir());+}++#[cfg(unix)]+#[test]+fn the_trace_directory_is_readable_by_its_owner_alone() {+ use std::os::unix::fs::PermissionsExt;+ let dir = tempfile::tempdir().unwrap();+ let mut config = config_in(dir.path());+ config.computer.trace = true;+ // A directory left open by an earlier run is narrowed too.+ std::fs::create_dir_all(trace_dir(&config)).unwrap();+ std::fs::set_permissions(trace_dir(&config), std::fs::Permissions::from_mode(0o755)).unwrap();+ let _ = module_config(&config);+ let mode = std::fs::metadata(trace_dir(&config))+ .unwrap()+ .permissions()+ .mode()+ & 0o777;+ assert_eq!(mode, 0o700);+}diff --git a/crates/openhuman-core/src/modules/mod.rs b/crates/openhuman-core/src/modules/mod.rsindex 696ded9df9..3f80ce1289 100644--- a/crates/openhuman-core/src/modules/mod.rs+++ b/crates/openhuman-core/src/modules/mod.rs@@ -42,6 +42,7 @@pub mod boot;pub mod browser;pub mod browser_task;+mod browser_task_report;pub mod computer;pub mod computer_config;pub mod connectors;diff --git a/crates/openhuman-core/src/modules/schemas.rs b/crates/openhuman-core/src/modules/schemas.rsindex 0848aad26a..1f0604b72e 100644--- a/crates/openhuman-core/src/modules/schemas.rs+++ b/crates/openhuman-core/src/modules/schemas.rs@@ -159,6 +159,18 @@ pub fn schemas(function: &str) -> ControllerSchema {}}+/// What the settings page's Chrome check shows when Chrome would not start:+/// where to fix a missing Chrome, or else the module's own reason.+fn readiness_error(detail: &str) -> String {+ if super::browser::chrome_not_found(detail) {+ "Chrome was not found. Set Chrome path below to the Chrome program (for example \+ /Applications/Google Chrome.app/Contents/MacOS/Google Chrome), save, and test again."+ .to_owned()+ } else {+ format!("Chrome could not start: {detail}")+ }+}+fn handle_browser_check_readiness(_params: Map<String, Value>) -> ControllerFuture {Box::pin(async move {let mut config = config_rpc::load_config_with_timeout().await?;@@ -185,9 +197,9 @@ fn handle_browser_check_readiness(_params: Map<String, Value>) -> ControllerFutu"error": if closed { None } else { Some("Chrome session could not close cleanly") }}),)}- Ok(Err(_)) => Ok(+ Ok(Err(error)) => Ok(serde_json::json!({"module_ready": true, "chrome_ready": false,- "error": "Chrome could not start; check browser settings and allowed websites"}),+ "error": readiness_error(&error.to_string())}),),Err(_) => Ok(serde_json::json!({"module_ready": true, "chrome_ready": false,diff --git a/crates/openhuman-core/src/modules/schemas_tests.rs b/crates/openhuman-core/src/modules/schemas_tests.rsindex ed365dfac1..663c834e97 100644--- a/crates/openhuman-core/src/modules/schemas_tests.rs+++ b/crates/openhuman-core/src/modules/schemas_tests.rs@@ -67,3 +67,16 @@ async fn computer_status_handler_returns_serialized_status() {assert!(status.get("decision_model").is_some());}++#[test]+fn the_chrome_check_says_where_to_fix_a_missing_chrome() {+ let missing = super::readiness_error(+ "BrowserUnavailable: browser unavailable: Chrome not found. Checked: …",+ );+ assert!(missing.starts_with("Chrome was not found."), "{missing}");+ assert!(missing.contains("Chrome path"), "{missing}");+ assert_eq!(+ super::readiness_error("Bus: launch timed out"),+ "Chrome could not start: Bus: launch timed out"+ );+}diff --git a/crates/openhuman-core/src/platform/about_app/catalog_conversation_intelligence.rs b/crates/openhuman-core/src/platform/about_app/catalog_conversation_intelligence.rsindex e51bef92a4..b5f264dd75 100644--- a/crates/openhuman-core/src/platform/about_app/catalog_conversation_intelligence.rs+++ b/crates/openhuman-core/src/platform/about_app/catalog_conversation_intelligence.rs@@ -348,7 +348,7 @@ Capability {name: "Brain",domain: "memory",category: CapabilityCategory::Intelligence,- description: "Documents every agent shares, filed by source type (pdf, markdown, notion, github, web, and one per other source). Add a document from text or a file, search it, forget a whole source, or keep it synced from a folder, a single file, a link, a GitHub repository, an RSS feed or a connected Composio toolkit, on demand and on a schedule.",+ description: "Documents every agent shares, filed by source type (pdf, markdown, notion, github, web, and one per other source). Add a document from text or a file (text, markdown, HTML, code, PDF, Word, PowerPoint or Excel; images are not read yet), search it, forget a whole source, or keep it synced from a folder, a single file, a link, a GitHub repository, an RSS feed or a connected Composio toolkit, on demand and on a schedule.",how_to: "Connections > Memory > Brain (/connections?tab=brain&brain=brain). Programmatic: openhuman.memory_brain_sources, memory_brain_search, memory_brain_ingest, memory_brain_forget, memory_sources_add, memory_sources_sync (RPC).",status: CapabilityStatus::Beta,privacy: MEMORY_TO_REMOTE_ENGINE,diff --git a/crates/openhuman-core/src/sandbox/ops.rs b/crates/openhuman-core/src/sandbox/ops.rsindex 84a0d60806..2ca9b0de42 100644--- a/crates/openhuman-core/src/sandbox/ops.rs+++ b/crates/openhuman-core/src/sandbox/ops.rs@@ -17,6 +17,20 @@ use std::path::{Path, PathBuf};use std::time::Duration;/// Safe environment variables forwarded into sandboxed execution.+///+/// This list is the *entire* environment a sandboxed child gets: both+/// [`execute_unsandboxed`] and [`execute_local_jail`] call `env_clear()` and+/// re-forward only what is named here. Windows process-bootstrap variables are+/// added only in the host spawn paths below; keeping them out of this policy+/// prevents Windows paths from being passed into Linux Docker containers.+///+/// They were missing when this defect was found, and it survived the first+/// round of fixes because the four tool launchers (`shell`, `node_exec`,+/// `npm_exec`, `python_exec`) each carry their own copy of the allow-list and+/// had already been patched: the built-in `orchestrator` runs with+/// `sandbox_mode = "sandboxed"`, and all four tools divert to+/// [`crate::sandbox`] *before* reaching those lists, so the host spawn paths+/// below are the ones that must add the Windows-only bootstrap set.pub const SANDBOX_ENV_PASSTHROUGH: &[&str] = &["PATH", "HOME", "TERM", "LANG", "LC_ALL", "LC_CTYPE", "USER", "SHELL", "TMPDIR",];@@ -259,9 +273,13 @@ async fn execute_unsandboxed(cmd.env_clear();for var in SANDBOX_ENV_PASSTHROUGH {if let Ok(val) = std::env::var(var) {+ if val.is_empty() {+ anyhow::bail!("sandbox passthrough environment variable {var} is empty");+ }cmd.env(var, val);}}+ platform_shell::forward_windows_bootstrap_env(&mut cmd)?;for (k, v) in extra_env {cmd.env(k, v);}@@ -378,6 +396,9 @@ async fn execute_local_jail(jail = jail.add_read_write(&scratch.path);let stdout_file = capture.stdout();let stderr_file = capture.stderr();+ let caller_sets_tmpdir = extra_env.contains_key(std::ffi::OsStr::new("TMPDIR"));+ let caller_sets_temp = extra_env.contains_key(std::ffi::OsStr::new("TEMP"));+ let caller_sets_tmp = extra_env.contains_key(std::ffi::OsStr::new("TMP"));// Platform-aware output-capture wrap: `{ … ; } > … 2> …` on sh/bash,// trailing `> … 2> …` on cmd.exe (no brace grouping). Shell binary is// picked by `platform_shell` so this path is Windows-safe (#4705).@@ -387,13 +408,28 @@ async fn execute_local_jail(cmd.env_clear();for var in SANDBOX_ENV_PASSTHROUGH {if let Ok(val) = std::env::var(var) {+ if val.is_empty() {+ anyhow::bail!("sandbox passthrough environment variable {var} is empty");+ }cmd.env(var, val);}}- cmd.env("TMPDIR", &scratch.path);+ platform_shell::forward_windows_bootstrap_env_std(&mut cmd)?;for (k, v) in extra_env {cmd.env(k, v);}+ // Keep every Windows spelling of the temporary directory inside this+ // per-call grant. `TEMP`/`TMP` are the variables used by Windows tools;+ // `TMPDIR` covers Unix-oriented tools running on the same host.+ if !caller_sets_tmpdir {+ cmd.env("TMPDIR", &scratch.path);+ }+ if !caller_sets_temp {+ cmd.env("TEMP", &scratch.path);+ }+ if !caller_sets_tmp {+ cmd.env("TMP", &scratch.path);+ }let os_backend = cwd_jail::default_backend();let spawn_result = if os_backend.is_available() {diff --git a/crates/openhuman-core/src/sandbox/ops_tests.rs b/crates/openhuman-core/src/sandbox/ops_tests.rsindex b9fe871c2a..082e8dd546 100644--- a/crates/openhuman-core/src/sandbox/ops_tests.rs+++ b/crates/openhuman-core/src/sandbox/ops_tests.rs@@ -322,6 +322,23 @@ fn local_status_is_ready_for_a_real_jail() {}}+// ── Windows child environment ────────────────────────────────────────────────+//+// `execute_unsandboxed` and `execute_local_jail` both call `env_clear()` and+// re-forward only `SANDBOX_ENV_PASSTHROUGH`. On Windows that list has to carry+// the process-bootstrap variables or the child cannot initialise the OS crypto+// provider — `node` dies with `Assertion failed: ncrypto::CSPRNG(nullptr, 0)`+// (exit 134) and `powershell` with `8009001d`. Both read as opaque failures to+// the agent, which is how the original defect shipped: the four tool launchers'+// allow-lists were fixed, the sandbox allow-list — the one the `sandboxed`+// orchestrator actually routes through — was not.++// What a real child actually receives is covered end-to-end in+// `tests/windows_sandbox_env_e2e.rs`, which spawns through `execute_in_sandbox`+// and asserts on the child's own environment. It lives there because the probe+// has to be a Rust `CreateProcess` spawn: `node`'s own `child_process.spawn`+// silently injects `SystemRoot`, so a JavaScript probe reports a stripped+// environment as healthy.// ── #6961: local-jail output capture stays out of the user's project ─────────#[cfg(unix)]@@ -508,12 +525,17 @@ async fn landlock_jail_runs_cargo_and_mktemp_but_blocks_writes_outside() {let outside = tempfile::tempdir().unwrap();let policy = local_policy(action.path(), state.path());- if host_has("cargo") {- let r = run_local(&policy, "cargo --version").await;+ // Cargo records the executable for the active build toolchain. Use it+ // directly so this check exercises Cargo inside the jail: a rustup proxy+ // on PATH can try to initialize a different HOME in a CI container.+ let cargo = Path::new(env!("CARGO"));+ if cargo.is_file() {+ let quoted_cargo = format!("'{}'", cargo.to_string_lossy().replace('\'', "'\\''"));+ let r = run_local(&policy, &format!("{quoted_cargo} --version")).await;assert!(r.success(), "cargo failed under the jail: {}", r.stderr);assert!(r.stdout.starts_with("cargo "), "stdout: {}", r.stdout);} else {- eprintln!("SKIP cargo: not installed on this host");+ eprintln!("SKIP cargo: build toolchain executable is absent on this host");}// `/tmp` is not granted; `mktemp` lands in the per-call TMPDIR scratch dir.diff --git a/crates/openhuman-core/src/search/tools.rs b/crates/openhuman-core/src/search/tools.rsindex c237144fb5..38cd3d940c 100644--- a/crates/openhuman-core/src/search/tools.rs+++ b/crates/openhuman-core/src/search/tools.rs@@ -6,7 +6,9 @@//! through `modules::search::execute_tool`, so a provider or login change is//! honoured on the next call without rebuilding the session.-use std::sync::Arc;+use std::collections::hash_map::DefaultHasher;+use std::hash::{Hash, Hasher};+use std::sync::{Arc, Mutex};use async_trait::async_trait;use serde_json::Value;@@ -17,12 +19,35 @@ use crate::config::Config;/// One TinySearch tool (a role tool such as `web_search_tool`, or a provider/// tool in `all_tools` presentation).+/// What a call reports once every provider has already answered+/// "unavailable" in this session. It tells the model to stop rather than to+/// wait, because nothing about the session will change the answer (#6991).+pub const SEARCH_EXHAUSTED_MESSAGE: &str =+ "Web search is not available with this setup: no provider could answer. Do not call \+ it again \u{2014} answer from the material you already have.";+pub struct TinySearchTool {spec: ToolSpec,/// Spawn-time config. `None` for a deferred instance rebuilt from a/// recorded transcript, which resolves the live config per call.config: Option<Arc<Config>>,exposure: ToolExposure,+ /// The provider configuration a call last found nothing usable under.+ ///+ /// A credential alone makes the managed route look reachable+ /// (`providers::backend_credential_available`), so a deployment that is+ /// offline, firewalled, out of balance or holding a dead key offers this+ /// tool on every turn and fails every call. The agent then spends turns on+ /// a tool that cannot work, at the moment it is least sure what to do.+ ///+ /// Keyed by configuration rather than latched outright, because this+ /// module's contract is that every call re-reads the live config so a+ /// provider or login change is honoured without rebuilding the session. A+ /// call whose signature differs from the recorded one tries again; only a+ /// repeat under the same configuration is refused. The signature is this+ /// tool's own view — its role order and the resolved providers — so one+ /// tool's dead providers never answer for another's.+ exhausted_for: Mutex<Option<u64>>,}impl TinySearchTool {@@ -31,6 +56,7 @@ impl TinySearchTool {spec,config: Some(config),exposure: ToolExposure::Direct,+ exhausted_for: Mutex::new(None),}}@@ -41,7 +67,46 @@ impl TinySearchTool {spec,config: None,exposure: ToolExposure::Direct,+ exhausted_for: Mutex::new(None),+ }+ }++ /// Whether this tool already found nothing usable under `signature`.+ pub(crate) fn is_exhausted_for(&self, signature: u64) -> bool {+ self.exhausted_for+ .lock()+ .map(|recorded| *recorded == Some(signature))+ .unwrap_or(false)+ }++ /// Record that no provider could answer under `signature`. Replaces any+ /// earlier one, so the refusal always describes the current configuration.+ pub(crate) fn mark_exhausted_for(&self, signature: u64) {+ if let Ok(mut recorded) = self.exhausted_for.lock() {+ *recorded = Some(signature);+ }+ }++ /// What this tool's providers look like right now: the order its role+ /// draws from, and every provider's resolved reachability. Two calls agree+ /// only while nothing a user could change — a key, a route, a provider+ /// selection, a login — has moved.+ pub(crate) fn provider_signature(&self, config: &Config) -> u64 {+ let mut hasher = DefaultHasher::new();+ if let Some(role) = tinysearch_bus::role_for_tool(&self.spec.name) {+ for provider in super::providers::role_order(config, role) {+ provider.hash(&mut hasher);+ }}+ for provider in super::providers::resolve(config) {+ provider.id.hash(&mut hasher);+ provider.enabled.hash(&mut hasher);+ provider.usable.hash(&mut hasher);+ provider.key_configured.hash(&mut hasher);+ provider.managed_available.hash(&mut hasher);+ matches!(provider.route, crate::config::SearchRoute::Managed).hash(&mut hasher);+ }+ hasher.finish()}pub fn spec(&self) -> &ToolSpec {@@ -71,10 +136,7 @@ pub fn user_facing_error(error: &str) -> String {Some(code) if code == errors::RATE_LIMITED => {"Web search is rate limited right now. Wait a moment and try again.".to_string()}- Some(code) if code == errors::UNAVAILABLE => {- "Every configured search provider for this request is unavailable right now."- .to_string()- }+ Some(code) if code == errors::UNAVAILABLE => SEARCH_EXHAUSTED_MESSAGE.to_string(),Some(code) if code == errors::INVALID_ARGUMENTS => {let marker = format!("{}{code}: ", errors::PREFIX);let detail = error@@ -92,6 +154,16 @@ pub fn error_code(error: &str) -> Option<&'static str> {errors::code_of(error)}+/// Whether this failure means no provider can answer for the rest of the+/// session, rather than something a later call could get past.+///+/// Only the "every provider is unavailable" verdict qualifies. A rate limit+/// clears on its own, and a low balance or a rejected argument has its own+/// message telling the caller what to change, so neither latches.+pub(crate) fn exhausts_providers(error: &str) -> bool {+ error_code(error) == Some(errors::UNAVAILABLE)+}+#[async_trait]impl Tool for TinySearchTool {fn name(&self) -> &str {@@ -133,6 +205,16 @@ impl Tool for TinySearchTool {options: ToolCallOptions,) -> anyhow::Result<ToolResult> {let config = self.live_config().await?;+ // Re-read per call, so a key added or a provider switched mid-session+ // clears an earlier refusal instead of outliving it.+ let signature = self.provider_signature(&config);+ if self.is_exhausted_for(signature) {+ tracing::debug!(+ tool = %self.spec.name,+ "[search][tool] refused: no provider answered under this configuration"+ );+ return Ok(ToolResult::failed(SEARCH_EXHAUSTED_MESSAGE.to_string()));+ }let subject = super::render::subject(&args);let max_results = args.get("max_results")@@ -169,12 +251,20 @@ impl Tool for TinySearchTool {))}Err(error) => {+ if exhausts_providers(&error) {+ self.mark_exhausted_for(signature);+ }tracing::warn!(tool = %self.spec.name,code = error_code(&error).unwrap_or("unclassified"),+ exhausted = self.is_exhausted_for(signature),"[search][tool] failed");- Ok(ToolResult::error(user_facing_error(&error)))+ Ok(if exhausts_providers(&error) {+ ToolResult::failed(user_facing_error(&error))+ } else {+ ToolResult::error(user_facing_error(&error))+ })}}}diff --git a/crates/openhuman-core/src/search/tools_tests.rs b/crates/openhuman-core/src/search/tools_tests.rsindex 8cdc4e17df..0bd9987051 100644--- a/crates/openhuman-core/src/search/tools_tests.rs+++ b/crates/openhuman-core/src/search/tools_tests.rs@@ -19,7 +19,10 @@ fn classified_errors_become_actionable_messages() {let balance = user_facing_error("tinysearch.insufficient_balance: 402 from backend");assert!(balance.contains("balance is too low"));assert!(user_facing_error("tinysearch.rate_limited: slow down").contains("rate limited"));- assert!(user_facing_error("tinysearch.provider_unavailable: all down").contains("unavailable"));+ assert_eq!(+ user_facing_error("tinysearch.provider_unavailable: all down"),+ SEARCH_EXHAUSTED_MESSAGE+ );assert_eq!(user_facing_error("search ExecuteTool failed: tinysearch.invalid_arguments: urls must not be empty"@@ -100,3 +103,135 @@ fn standard_privacy_mode_allows_search_tool_dispatch() {assert!(local_only_search_block("web_search_tool").is_none());}++// ---------------------------------------------------------------------------+// #6991: a credential alone makes the managed route look reachable, so a+// deployment that is offline, firewalled, out of balance or holding a dead key+// offers these tools on every turn and fails every call. The old message ended+// "unavailable right now", which reads as "retry later": in the DeepSWE-10 run+// the agent called search three times on one task, then guessed, and the guess+// was what the hidden test rejected.+// ---------------------------------------------------------------------------++fn spec(name: &str) -> ToolSpec {+ ToolSpec {+ name: name.to_string(),+ description: "search".into(),+ parameters: serde_json::json!({"type": "object"}),+ }+}++/// A config whose managed providers are selected but whose direct keys are+/// absent, which is the shape that offers the tools and cannot serve them.+fn nothing_usable_config() -> Config {+ let mut config = Config::default();+ config.search.providers = [("brave".to_string(), SearchProviderSettings::direct())]+ .into_iter()+ .collect();+ config+}++#[test]+fn the_unavailable_verdict_tells_the_model_to_stop_rather_than_wait() {+ let message = user_facing_error("tinysearch.provider_unavailable: all down");++ assert!(+ message.contains("Do not call it again"),+ "the model must be told to stop, got: {message}"+ );+ assert!(+ !message.contains("right now"),+ "nothing the model can do will change the answer, so it must not read as a retry hint: {message}"+ );+}++#[test]+fn only_the_exhaustion_verdict_is_treated_as_final() {+ // A rate limit clears on its own; a low balance and a rejected argument+ // each have a message naming what to change. None of them may latch.+ assert!(exhausts_providers(+ "tinysearch.provider_unavailable: all down"+ ));+ assert!(!exhausts_providers("tinysearch.rate_limited: slow down"));+ assert!(!exhausts_providers("tinysearch.insufficient_balance: 402"));+ assert!(!exhausts_providers(+ "tinysearch.invalid_arguments: urls must not be empty"+ ));+ assert!(!exhausts_providers("boom"));+}++#[test]+fn a_tool_starts_with_nothing_recorded() {+ let config = nothing_usable_config();+ let tool = TinySearchTool::recorded(spec("web_search_tool"));++ assert!(!tool.is_exhausted_for(tool.provider_signature(&config)));+}++#[test]+fn the_refusal_answers_only_for_the_configuration_that_failed() {+ // The contract this module documents is that every call re-reads the live+ // config, so a provider or login change is honoured without rebuilding the+ // session. A refusal that outlived a config change would break it: the user+ // adds a key and search stays dead until the thread is abandoned.+ let dead = nothing_usable_config();+ let tool = TinySearchTool::recorded(spec("web_search_tool"));+ let dead_signature = tool.provider_signature(&dead);++ tool.mark_exhausted_for(dead_signature);+ assert!(tool.is_exhausted_for(dead_signature));++ let mut fixed = dead.clone();+ fixed.search.brave.api_key = Some("added-after-the-failure".into());++ assert_ne!(+ tool.provider_signature(&fixed),+ dead_signature,+ "adding a provider key must change what the tool sees"+ );+ assert!(+ !tool.is_exhausted_for(tool.provider_signature(&fixed)),+ "adding a key must clear the refusal"+ );+}++#[test]+fn one_tools_dead_providers_do_not_answer_for_another() {+ // `build_search_tools` can offer provider-specific tools beside the role+ // tools, and the roles draw on different provider orders, so a shared+ // verdict would let one provider's outage disable unrelated ones.+ let config = nothing_usable_config();+ let failed = TinySearchTool::recorded(spec("web_search_tool"));+ let other = TinySearchTool::recorded(spec("web_answer_tool"));++ failed.mark_exhausted_for(failed.provider_signature(&config));++ assert!(!other.is_exhausted_for(other.provider_signature(&config)));+}++#[tokio::test]+async fn a_refused_call_does_not_reach_the_module() {+ // The second call under the same configuration is answered from the+ // recorded verdict, so a dead search costs one module round trip per+ // configuration rather than one per call.+ let config = nothing_usable_config();+ let tool = TinySearchTool::new(std::sync::Arc::new(config.clone()), spec("web_search_tool"));+ tool.mark_exhausted_for(tool.provider_signature(&config));++ let result = tool+ .execute(serde_json::json!({"query": "anything"}))+ .await+ .expect("a refusal is a reported failure, not a tool error");++ assert!(result.is_error);+ assert_eq!(+ result.error_kind,+ Some(tinytools::ToolErrorKind::Failed),+ "the failure is permanent for this configuration, so it must not be tagged retryable"+ );+ assert!(+ result.text().contains("Do not call it again"),+ "{:?}",+ result.text()+ );+}diff --git a/crates/openhuman-core/src/security/credentials/README.md b/crates/openhuman-core/src/security/credentials/README.mdindex 4a54ae0272..423d0aac3f 100644--- a/crates/openhuman-core/src/security/credentials/README.md+++ b/crates/openhuman-core/src/security/credentials/README.md@@ -37,7 +37,7 @@ Credential management for the backend credential the core authenticates with and- **`AuthService`** (`core.rs`) — `from_config`, `new`, `load_profiles`, `store_provider_token`, `set_active_profile`, `remove_profile`, `get_profile`, `get_provider_bearer_token`.- **Constants** — `APP_SESSION_PROVIDER` (`"app-session"`), `DEFAULT_AUTH_PROFILE_NAME` (`"default"`), `COMPOSIO_DIRECT_PROVIDER` (`"composio-direct"`), `api_key::API_KEY_PROVIDER` (`"api-key"`).-- **Credential kinds** — `session_support::CredentialKind {Session, ApiKey, Local}` (wire values `"session"`, `"api-key"`, `"local"`). `session_support::resolve_backend_credential` returns `BackendCredential::ApiKey` when a key is stored (before any session classification) and `BackendCredential::Session` otherwise; `BackendOAuthClient::authed_json` sends an API key as `x-api-key` and a session as `Authorization: Bearer`, while `OpenHumanBackendModel::resolve_bearer` sends the key as the bearer for managed inference. Every backend caller goes through it (integrations, voice, channels, webhooks, hosted proxies); bearer-only seams (connector proxy route, memory-host `SessionBearer`, the Socket.IO handshake) use `backend_bearer_secret`, which returns the key first and the stored session otherwise — the backend accepts a key as `Authorization: Bearer` by its `tiny_` prefix. Cloud embeddings mirror `resolve_bearer`. `has_backend_credential` is the boot-time "signed in?" question the scheduler gate asks; `SessionExpired` is ignored for an API-key runtime and for a local session.+- **Credential kinds** — `session_support::CredentialKind {Session, ApiKey, Local}` (wire values `"session"`, `"api-key"`, `"local"`). `session_support::resolve_backend_credential` returns `BackendCredential::ApiKey` when a key is stored (before any session classification) and `BackendCredential::Session` otherwise; `BackendOAuthClient::authed_json` sends an API key as `x-api-key` and a session as `Authorization: Bearer`, while `OpenHumanBackendModel::resolve_bearer` sends the key as the bearer for managed inference. Every backend caller goes through it (integrations, voice, channels, webhooks, hosted proxies); bearer-only seams (connector proxy route, memory-host `SessionBearer`, the Socket.IO handshake) use `backend_bearer_secret`, which returns the key first and the stored session otherwise — the backend accepts a key as `Authorization: Bearer` by its `tiny_` prefix. Cloud embeddings mirror `resolve_bearer`. `has_backend_credential` is the boot-time "signed in?" question the scheduler gate asks; `SessionExpired` is ignored for an API-key runtime and for a local session. A local session also has no managed bearer: `resolve_backend_credential` answers `LOCAL_SESSION_BACKEND_UNAVAILABLE` and `resolve_bearer` answers `LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE`, so neither hosted REST nor managed inference sends a token the backend will only 401 (#6932).- **Helpers** — `normalize_provider`, `default_profile_id`, `select_profile_id`, `state_dir_from_config`, `profile_id`.- **Types** (`profiles.rs`) — `AuthProfile`, `AuthProfileKind` (`OAuth`/`Token`), `TokenSet`, `AuthProfilesData`, `AuthProfilesStore`.- **Ops/RPC** (`ops`, re-exported as `rpc`) — `set_credential`, `clear_credential`, `store_session`, `clear_session`, `SetCredentialRequest`, `seed_api_key_from_env`, `seed_session_from_env`, `auth_get_state`, `auth_get_session_token_json`, `store_provider_credentials`, `remove_provider_credentials`, `list_provider_credentials`, `list_provider_credentials_by_prefix`, `encrypt_secret`, `decrypt_secret`, `start_credential_gated_services`, `stop_credential_gated_services`.diff --git a/crates/openhuman-core/src/security/credentials/session_support.rs b/crates/openhuman-core/src/security/credentials/session_support.rsindex cc61440922..27d20d54e2 100644--- a/crates/openhuman-core/src/security/credentials/session_support.rs+++ b/crates/openhuman-core/src/security/credentials/session_support.rs@@ -359,6 +359,16 @@ impl BackendCredential {pub const LOCAL_SESSION_BACKEND_UNAVAILABLE: &str ="BACKEND_UNAVAILABLE: hosted account data is unavailable for the offline local session";+/// Error [`OpenHumanBackendModel::resolve_bearer`](crate::inference::provider::OpenHumanBackendModel)+/// returns for the offline local session. The local credential authenticates+/// no TinyHumans account, so managed inference has nothing to bill or route;+/// sending the token anyway earned a backend `401` that read to the user as an+/// expired session (#6932). Distinct from+/// [`LOCAL_SESSION_BACKEND_UNAVAILABLE`] because the chat surface renders this+/// one as its own failure class.+pub const LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE: &str =+ "BACKEND_UNAVAILABLE: managed inference is unavailable for the offline local session";+/// Resolve the backend credential for `config`: the API key when one is/// stored, else the live app-session token with exactly the classification/// [`require_live_session_token`] has always applied.diff --git a/crates/openhuman-core/src/security/keyring/README.md b/crates/openhuman-core/src/security/keyring/README.mdindex 45f73eae5b..ccecf48f03 100644--- a/crates/openhuman-core/src/security/keyring/README.md+++ b/crates/openhuman-core/src/security/keyring/README.md@@ -9,7 +9,7 @@ OS-keychain-backed secret storage with pluggable test and debug backends, plus a- Probe and cache backend availability (`is_available`) so callers (wallet guards, snapshot loops) can fall back to file storage without re-triggering OS keychain prompts.- Migrate a secret from a plaintext file into the active backend (`migrate_from_file`), verifying the write before deleting the source.- Encrypt and decrypt config-field secrets via `SecretStore` (ChaCha20-Poly1305, `enc2:` prefix), including migration of the legacy XOR `enc:` format.-- Load and cache a single app-scoped master encryption key from the OS keychain at startup (`init_master_key`) for the `encrypted_file` backend, reducing keychain access to one call per process.+- Load and cache a single app-scoped master encryption key at startup (`init_master_key`) for the `encrypted_file` backend: from `OPENHUMAN_KEYRING_MASTER_KEY` / `OPENHUMAN_KEYRING_MASTER_KEY_FILE` when an operator supplies one (headless deployments with no keychain, #6926), otherwise from the OS keychain, reducing keychain access to one call per process.- Migrate the legacy plaintext `dev-keychain.json` into the encrypted `secrets.enc` file on first use.## Key files@@ -36,7 +36,7 @@ Re-exported from `mod.rs`:- `KeyringBackend`: backend trait (`get`/`set`/`delete`/`name`).- `SecretStore`: config-field encrypt/decrypt; `encrypt`/`decrypt`/`decrypt_and_migrate`/`needs_migration`/`is_encrypted`/`new`.- `KeyringError`: error enum with `diagnostic()`.-- `init_master_key`: load the app master key from the OS keychain at startup (staging/prod only).+- `init_master_key`: load the app master key at startup (staging/prod only) — from the environment (`OPENHUMAN_KEYRING_MASTER_KEY` inline, or `OPENHUMAN_KEYRING_MASTER_KEY_FILE` naming a file; 64 hex characters, exactly one of the two) when set, otherwise from the OS keychain. A set-but-malformed variable is a boot error, not a fall-through; the source is logged at `info`, the value never. Key files must not be group- or world-writable; read-only group/world access is supported for secret mounts, but any principal able to read the file can decrypt the keyring.- `init_workspace`: register the workspace dir for file and encrypted-file backends.- `get`, `set`, `delete`, `get_or_create_random`, `is_available`, `migrate_from_file`, `MigrationOutcome`.- `force_backend_for_test`: `pub(crate)`, test-only.@@ -58,7 +58,7 @@ None. There is no `bus.rs`, and the module publishes and subscribes to no `DomaiSecret storage backend, selected once and frozen in a `OnceLock`:- `os` (production default outside staging/prod special-casing): native OS credential store, macOS Keychain, Windows Credential Manager, or Linux Secret Service, under service name `"openhuman"`.-- `encrypted_file` (staging/production, and via `OPENHUMAN_KEYRING_BACKEND=encrypted_file`): single ChaCha20-Poly1305 file `{workspace}/secrets.enc`, encrypted with a master key loaded once from the OS keychain (`openhuman` / `app:master_key`). Files are written `0600` on Unix via temp-file plus atomic rename.+- `encrypted_file` (staging/production, and via `OPENHUMAN_KEYRING_BACKEND=encrypted_file`): single ChaCha20-Poly1305 file `{workspace}/secrets.enc`, encrypted with a master key loaded once — from `OPENHUMAN_KEYRING_MASTER_KEY` / `OPENHUMAN_KEYRING_MASTER_KEY_FILE` when set, otherwise from the OS keychain (`openhuman` / `app:master_key`). Files are written `0600` on Unix via temp-file plus atomic rename.- `file` (dev default, `cfg(test)`, or `OPENHUMAN_KEYRING_BACKEND=file`): plaintext JSON `{workspace}/dev-keychain.json`. Not encrypted; test and debug use only.- `mock` (test-only): in-memory `HashMap`.diff --git a/crates/openhuman-core/src/security/keyring/encrypted_file_backend.rs b/crates/openhuman-core/src/security/keyring/encrypted_file_backend.rsindex c4e4d858e5..c29132f406 100644--- a/crates/openhuman-core/src/security/keyring/encrypted_file_backend.rs+++ b/crates/openhuman-core/src/security/keyring/encrypted_file_backend.rs@@ -1,9 +1,11 @@//! Encrypted-file keyring backend.//!//! Stores all secrets in a single ChaCha20-Poly1305-encrypted file on disk,-//! keyed by an app-scoped master key. The key is loaded from the OS keychain-//! once at core startup via [`init_master_key`] and cached in a process-wide-//! static. The backend itself never touches the OS keychain.+//! keyed by an app-scoped master key. The key is loaded once at core startup+//! via [`init_master_key`] — from the environment when an operator supplies+//! it ([`MASTER_KEY_ENV`] / [`MASTER_KEY_FILE_ENV`], for headless deployments+//! with no OS keychain), otherwise from the OS keychain — and cached in a+//! process-wide static. The backend itself never touches the OS keychain.//!//! This design reduces OS keychain access to exactly ONE call per process//! lifetime, avoiding the N-prompt problem where dev-signed macOS builds@@ -21,22 +23,53 @@ use crate::security::keyring::store::BackendKind;const KEYCHAIN_SERVICE: &str = "openhuman";const KEYCHAIN_MASTER_KEY_USERNAME: &str = "app:master_key";+/// Environment variable carrying the master key inline as `2 * KEY_LEN` hex+/// characters (`openssl rand -hex 32`). Lets a headless `openhuman-core+/// serve` — a container with no Secret Service or keychain — keep the+/// `encrypted_file` backend instead of falling back to the plaintext `file`+/// backend (#6926). Operators inject it from their secret manager the same+/// way they inject `OPENHUMAN_CORE_TOKEN`.+pub const MASTER_KEY_ENV: &str = "OPENHUMAN_KEYRING_MASTER_KEY";+/// Environment variable naming a file whose contents are the master key in+/// the same hex form (surrounding whitespace ignored), for Docker/Kubernetes+/// secret mounts. Mutually exclusive with [`MASTER_KEY_ENV`].+pub const MASTER_KEY_FILE_ENV: &str = "OPENHUMAN_KEYRING_MASTER_KEY_FILE";const SECRETS_FILENAME: &str = "secrets.enc";const LEGACY_DEV_KEYCHAIN: &str = "dev-keychain.json";-/// Process-wide master key, set once by [`init_master_key`].-static MASTER_KEY: OnceLock<Option<[u8; KEY_LEN]>> = OnceLock::new();+/// Outcome of the one-time master-key initialization: the key (`None` when+/// the backend needs none or the OS keychain could not provide it), or the+/// configuration error that rejected an operator-supplied source.+type MasterKeyInit = Result<Option<[u8; KEY_LEN]>, String>;++/// Process-wide master-key outcome, set once by [`init_master_key`].+static MASTER_KEY: OnceLock<MasterKeyInit> = OnceLock::new();// ── Public API for core startup ──────────────────────────────────────────────/// Initialize the keyring subsystem: set the workspace directory and load-/// the master encryption key from the OS keychain (staging/production only).+/// the master encryption key (staging/production only) — from+/// [`MASTER_KEY_ENV`] or [`MASTER_KEY_FILE_ENV`] when an operator set one,+/// otherwise from the OS keychain.////// Call this once at core startup before any keyring operations. In dev/// environments the master key is not loaded (the plain file backend is/// used instead). The result is cached process-wide; subsequent calls are-/// no-ops.-pub fn init_master_key() {+/// no-ops. Which source supplied the key is logged at `info`; the key never+/// is.+///+/// # Errors+///+/// Returns `Err` only when an operator-supplied source ([`MASTER_KEY_ENV`] /+/// [`MASTER_KEY_FILE_ENV`]) is set but unusable — both set, unreadable file,+/// wrong length, not hex. That is a configuration error the process should+/// not start with: continuing would run with secrets unreadable and fail+/// later, on the first store, with a less specific message. An OS-keychain+/// failure is **not** an error here: it keeps the #3311 behaviour (log,+/// notify the frontend, run with secrets inaccessible until keychain access+/// is restored). The outcome, error included, is cached process-wide, so+/// every later call after a configuration error returns the same `Err`.+pub fn init_master_key() -> Result<(), String> {// Ensure workspace dir is set for the backend before anything else.let dir = crate::security::keyring::store::workspace_dir_for_file_backend();log::info!(@@ -45,21 +78,28 @@ pub fn init_master_key() {);crate::security::keyring::init_workspace(&dir);- MASTER_KEY.get_or_init(|| {+ init_once(&MASTER_KEY, || {let backend_kind = crate::security::keyring::store::effective_backend_kind();if backend_kind != BackendKind::EncryptedFile {log::debug!("[keyring:encrypted_file] skipping master key init backend={backend_kind:?}");- return None;+ return Ok(None);}match try_load_master_key() {- Ok(key) => {- log::info!("[keyring:encrypted_file] master key loaded from OS keychain");- Some(key)+ Ok((key, source)) => {+ log::info!("[keyring:encrypted_file] master key loaded from {source}");+ Ok(Some(key))}- Err(e) => {+ Err(MasterKeyError::Configured(e)) => {+ log::error!(+ "[keyring:encrypted_file] operator-supplied master key rejected; refusing \+ to start with secrets unreadable. Cause: {e}"+ );+ Err(e)+ }+ Err(MasterKeyError::Keychain(e)) => {log::error!("[keyring:encrypted_file] master key load FAILED — refusing to mint a \replacement (that would orphan existing secrets, #3311). Secrets are \@@ -69,10 +109,37 @@ pub fn init_master_key() {// Surface the denied state to the frontend instead of silently// resetting — this is the "warn before reset" the issue asks for.crate::security::keyring_consent::policy::notify_master_key_unavailable(&e);- None+ Ok(None)}}- });+ })+}++/// Runs `init` at most once per `cell` and reports its outcome on every call.+///+/// A configuration error is stored in the cell rather than leaving it empty+/// or storing `None`: `OnceLock::get_or_init` never reruns its closure, so a+/// later call (a second embedded boot in the same process) must still see the+/// error instead of a silent `Ok` with no key loaded.+fn init_once(+ cell: &OnceLock<MasterKeyInit>,+ init: impl FnOnce() -> MasterKeyInit,+) -> Result<(), String> {+ match cell.get_or_init(init) {+ Ok(_) => Ok(()),+ Err(e) => Err(e.clone()),+ }+}++/// Why the master key could not be loaded. The two kinds are handled+/// differently at startup — see [`init_master_key`].+#[derive(Debug)]+enum MasterKeyError {+ /// An operator-supplied source is set but unusable. Fatal at startup.+ Configured(String),+ /// The OS keychain could not provide (or safely mint) the key. Not fatal:+ /// the process runs with secrets inaccessible, as before.+ Keychain(String),}/// Abstraction over the OS-keychain entry that holds the master key.@@ -96,10 +163,142 @@ impl MasterKeyEntry for keyring::Entry {}}-fn try_load_master_key() -> Result<[u8; KEY_LEN], String> {+/// Loads the master key, returning it with a human-readable description of+/// the source it came from (for the startup log; never the value).+///+/// Uncached: every call reads the environment (and the key file) afresh.+/// Only [`init_master_key`] stores an outcome in [`MASTER_KEY`].+///+/// The environment is consulted first so a headless deployment never touches+/// the OS keychain. An environment variable that is set but unusable is an+/// error, not a fall-through: silently continuing to the keychain would mask+/// the misconfiguration and, in a container, fail later with a less specific+/// "master key unavailable".+fn try_load_master_key() -> Result<([u8; KEY_LEN], String), MasterKeyError> {+ let inline = env_value(MASTER_KEY_ENV, std::env::var(MASTER_KEY_ENV))+ .map_err(MasterKeyError::Configured)?;+ let file = env_value(MASTER_KEY_FILE_ENV, std::env::var(MASTER_KEY_FILE_ENV))+ .map_err(MasterKeyError::Configured)?;+ if let Some(from_env) =+ master_key_from_env(inline.as_deref(), file.as_deref(), read_master_key_file)+ .map_err(MasterKeyError::Configured)?+ {+ return Ok(from_env);+ }let entry = keyring::Entry::new(KEYCHAIN_SERVICE, KEYCHAIN_MASTER_KEY_USERNAME)- .map_err(|e| format!("keychain entry creation failed: {e}"))?;+ .map_err(|e| MasterKeyError::Keychain(format!("keychain entry creation failed: {e}")))?;load_or_mint_master_key(&entry)+ .map(|key| (key, "OS keychain".to_string()))+ .map_err(MasterKeyError::Keychain)+}++/// Interprets one `std::env::var` result for a master-key variable.+///+/// Only `NotPresent` means unset. A value that is not valid Unicode is a+/// misconfiguration and must not be treated as unset: that would fall+/// through to the OS keychain, where [`load_or_mint_master_key`] could mint+/// a different key and orphan every secret in `secrets.enc`. The rejected+/// value is never formatted into the error (`VarError`'s `Display` would+/// include it).+fn env_value(+ name: &str,+ raw: Result<String, std::env::VarError>,+) -> Result<Option<String>, String> {+ match raw {+ Ok(value) => Ok(Some(value)),+ Err(std::env::VarError::NotPresent) => Ok(None),+ Err(std::env::VarError::NotUnicode(_)) => {+ Err(format!("{name} is set but is not valid Unicode"))+ }+ }+}++/// Resolves an operator-supplied master key from the two environment+/// sources, given their raw values.+///+/// `Ok(None)` when neither is set (an empty or whitespace-only value counts+/// as unset, matching how Compose passes an undefined `${VAR}`), so the+/// caller falls through to the OS keychain. `Err` when a source is set but+/// unusable: both set at once, an unreadable file, or a value that is not+/// exactly `2 * KEY_LEN` hex characters. Error messages and the returned+/// source label name the variable and the problem but never include its+/// value — not even the file path, which may be a mistakenly pasted key.+///+/// `read_file` is injected so the decision logic is testable without touching+/// the filesystem; production passes [`read_master_key_file`].+fn master_key_from_env(+ inline: Option<&str>,+ file: Option<&str>,+ read_file: impl FnOnce(&Path) -> Result<String, String>,+) -> Result<Option<([u8; KEY_LEN], String)>, String> {+ let inline = inline.map(str::trim).filter(|value| !value.is_empty());+ let file = file.map(str::trim).filter(|value| !value.is_empty());+ match (inline, file) {+ (None, None) => Ok(None),+ (Some(_), Some(_)) => Err(format!(+ "{MASTER_KEY_ENV} and {MASTER_KEY_FILE_ENV} are both set; set exactly one"+ )),+ (Some(hex), None) => parse_master_key_hex(hex)+ .map(|key| Some((key, MASTER_KEY_ENV.to_string())))+ .map_err(|e| format!("{MASTER_KEY_ENV}: {e}")),+ (None, Some(path)) => {+ // Named by the variable, never by its value: an operator who puts+ // the key itself in the `_FILE` variable would otherwise have it+ // copied into the error and the startup log.+ let contents =+ read_file(Path::new(path)).map_err(|e| format!("{MASTER_KEY_FILE_ENV}: {e}"))?;+ parse_master_key_hex(contents.trim())+ .map(|key| Some((key, MASTER_KEY_FILE_ENV.to_string())))+ .map_err(|e| format!("{MASTER_KEY_FILE_ENV}: {e}"))+ }+ }+}++/// Reads the file named by [`MASTER_KEY_FILE_ENV`].+///+/// On Unix a key file must not be writable by other users. Read-only group or+/// other permissions are supported for container secret mounts, where the+/// runtime may add group-read access for a non-root core.+fn read_master_key_file(path: &Path) -> Result<String, String> {+ #[cfg(unix)]+ {+ use std::os::unix::fs::PermissionsExt;+ let metadata = std::fs::metadata(path).map_err(|e| {+ format!("cannot inspect master key file permissions ({MASTER_KEY_FILE_ENV}): {e}")+ })?;+ let mode = metadata.permissions().mode() & 0o777;+ if key_file_mode_is_other_writable(mode) {+ return Err(format!(+ "master key file ({MASTER_KEY_FILE_ENV}) is writable by other users; \+ restrict it to a read-only secret mount"+ ));+ }+ }+ std::fs::read_to_string(path).map_err(|e| format!("cannot read master key file: {e}"))+}++#[cfg(unix)]+fn key_file_mode_is_other_writable(mode: u32) -> bool {+ mode & 0o002 != 0+}++/// Decodes a master key supplied as exactly `2 * KEY_LEN` hex characters.+/// The value never appears in the error.+fn parse_master_key_hex(hex: &str) -> Result<[u8; KEY_LEN], String> {+ let expected = 2 * KEY_LEN;+ let got = hex.chars().count();+ if got != expected {+ return Err(format!("expected {expected} hex characters, got {got}"));+ }+ // `hex_decode` slices by byte; a non-ASCII value of the right character+ // count would panic there instead of being rejected.+ if !hex.is_ascii() {+ return Err("value is not valid hex".to_string());+ }+ let bytes = crypto::hex_decode(hex).map_err(|_| "value is not valid hex".to_string())?;+ let mut key = [0u8; KEY_LEN];+ key.copy_from_slice(&bytes);+ Ok(key)}/// Load the existing master key, mint a fresh one, or fail safe.@@ -161,7 +360,10 @@ fn load_or_mint_master_key<E: MasterKeyEntry>(entry: &E) -> Result<[u8; KEY_LEN]/// Get a reference to the cached master key, if available.fn master_key() -> Option<&'static [u8; KEY_LEN]> {- MASTER_KEY.get().and_then(|k| k.as_ref())+ MASTER_KEY+ .get()+ .and_then(|init| init.as_ref().ok())+ .and_then(Option::as_ref)}// ── Backend ──────────────────────────────────────────────────────────────────@@ -294,13 +496,13 @@ impl EncryptedFileBackend {fn handle_corruption(&self) {file_store::quarantine_corrupt(&self.path, "enc");}-}-impl KeyringBackend for EncryptedFileBackend {- fn get(&self, namespaced_key: &str) -> Result<Option<String>, KeyringError> {- let Some(key) = master_key() else {- return Ok(None);- };+ /// [`KeyringBackend::get`] under an explicit master key.+ fn get_with_key(+ &self,+ key: &[u8; KEY_LEN],+ namespaced_key: &str,+ ) -> Result<Option<String>, KeyringError> {// `read_map` can mutate the filesystem: it migrates a missing file and// quarantines corrupt ciphertext. Hold the same lock as writers for// either case so a delayed quarantine cannot rename a replacement a@@ -310,12 +512,13 @@ impl KeyringBackend for EncryptedFileBackend {Ok(map.get(namespaced_key).cloned())}- fn set(&self, namespaced_key: &str, value: &str) -> Result<(), KeyringError> {- let Some(key) = master_key() else {- return Err(KeyringError::Backend(- "master key unavailable — cannot store secrets".to_string(),- ));- };+ /// [`KeyringBackend::set`] under an explicit master key.+ fn set_with_key(+ &self,+ key: &[u8; KEY_LEN],+ namespaced_key: &str,+ value: &str,+ ) -> Result<(), KeyringError> {// Held across the read as well as the write: taking it around the write// alone would still let a stale map overwrite a concurrent one.let _guard = file_store::lock_for_write(&self.path)?;@@ -323,6 +526,24 @@ impl KeyringBackend for EncryptedFileBackend {map.insert(namespaced_key.to_string(), value.to_string());self.write_map(key, &map)}+}++impl KeyringBackend for EncryptedFileBackend {+ fn get(&self, namespaced_key: &str) -> Result<Option<String>, KeyringError> {+ let Some(key) = master_key() else {+ return Ok(None);+ };+ self.get_with_key(key, namespaced_key)+ }++ fn set(&self, namespaced_key: &str, value: &str) -> Result<(), KeyringError> {+ let Some(key) = master_key() else {+ return Err(KeyringError::Backend(+ "master key unavailable — cannot store secrets".to_string(),+ ));+ };+ self.set_with_key(key, namespaced_key, value)+ }fn delete(&self, namespaced_key: &str) -> Result<(), KeyringError> {let Some(key) = master_key() else {diff --git a/crates/openhuman-core/src/security/keyring/encrypted_file_backend_tests.rs b/crates/openhuman-core/src/security/keyring/encrypted_file_backend_tests.rsindex 5f08c21ae2..a0a30730da 100644--- a/crates/openhuman-core/src/security/keyring/encrypted_file_backend_tests.rs+++ b/crates/openhuman-core/src/security/keyring/encrypted_file_backend_tests.rs@@ -115,3 +115,371 @@ fn rejects_wrong_length_key_without_minting() {"must not overwrite on length mismatch");}++// ── Operator-supplied master key (#6926) ─────────────────────────────────────++fn hex_key(byte: u8) -> String {+ format!("{byte:02x}").repeat(KEY_LEN)+}++fn file_must_not_be_read(path: &Path) -> Result<String, String> {+ panic!("master key file {} must not be read", path.display())+}++#[test]+fn env_inline_key_is_used_and_names_its_source() {+ let hex = hex_key(0xab);+ let (key, source) = master_key_from_env(Some(&hex), None, file_must_not_be_read)+ .expect("valid inline key")+ .expect("inline key counts as supplied");+ assert_eq!(key, [0xabu8; KEY_LEN]);+ assert_eq!(source, MASTER_KEY_ENV);+}++#[test]+fn env_inline_key_tolerates_surrounding_whitespace_and_uppercase_hex() {+ let hex = format!(" {}\n", hex_key(0xcd).to_uppercase());+ let (key, _) = master_key_from_env(Some(&hex), None, file_must_not_be_read)+ .expect("trimmed key is valid")+ .expect("supplied");+ assert_eq!(key, [0xcdu8; KEY_LEN]);+}++#[test]+fn env_file_key_is_read_trimmed_and_names_the_variable() {+ let hex = hex_key(0x11);+ let (key, source) =+ master_key_from_env(None, Some("/run/secrets/openhuman_master_key"), |path| {+ assert_eq!(path, Path::new("/run/secrets/openhuman_master_key"));+ Ok(format!("{hex}\n"))+ })+ .expect("file key is valid")+ .expect("supplied");+ assert_eq!(key, [0x11u8; KEY_LEN]);+ assert_eq!(source, MASTER_KEY_FILE_ENV);+}++#[test]+fn unreadable_env_file_is_an_error_that_names_the_variable_not_the_path() {+ let err = master_key_from_env(None, Some("/nonexistent/master.key"), |_| {+ Err("cannot read master key file: boom".to_string())+ })+ .expect_err("unreadable file must not fall through to the keychain");+ assert!(err.contains(MASTER_KEY_FILE_ENV), "{err}");+ assert!(err.contains("cannot read"), "{err}");+ assert!(!err.contains("/nonexistent/master.key"), "{err}");+}++#[test]+fn a_key_pasted_into_the_file_variable_is_not_echoed() {+ // The operator meant `MASTER_KEY=<hex>` but set `MASTER_KEY_FILE=<hex>`:+ // the "path" is the secret, so the read error must not carry it into the+ // startup log.+ let pasted_key = hex_key(0x77);+ let err = master_key_from_env(None, Some(&pasted_key), read_master_key_file)+ .expect_err("a key is not a readable path");+ assert!(err.contains(MASTER_KEY_FILE_ENV), "{err}");+ assert!(+ !err.contains(&pasted_key),+ "error must not echo the key: {err}"+ );+}++#[test]+fn both_env_sources_set_is_rejected_before_reading_anything() {+ let hex = hex_key(0x22);+ let err = master_key_from_env(Some(&hex), Some("/run/secrets/key"), file_must_not_be_read)+ .expect_err("ambiguous configuration must be rejected");+ assert!(+ err.contains(MASTER_KEY_ENV) && err.contains(MASTER_KEY_FILE_ENV),+ "{err}"+ );+}++#[test]+fn malformed_env_key_is_rejected_without_leaking_the_value() {+ let too_short = "abcd";+ let err = master_key_from_env(Some(too_short), None, file_must_not_be_read)+ .expect_err("wrong length is rejected");+ assert!(err.contains("expected 64 hex characters, got 4"), "{err}");++ let not_hex = "zz".repeat(KEY_LEN);+ let err = master_key_from_env(Some(¬_hex), None, file_must_not_be_read)+ .expect_err("non-hex is rejected");+ assert!(err.contains("not valid hex"), "{err}");+ assert!(+ !err.contains(¬_hex),+ "error must not echo the value: {err}"+ );++ // Right character count, wrong bytes: must be rejected, not panic in the+ // byte-sliced hex decoder.+ let non_ascii = "é".repeat(KEY_LEN * 2);+ let err = master_key_from_env(Some(&non_ascii), None, file_must_not_be_read)+ .expect_err("non-ASCII is rejected");+ assert!(err.contains("not valid hex"), "{err}");++ // The same validation applies to a file's contents.+ let err = master_key_from_env(None, Some("/run/secrets/key"), |_| Ok("0123".to_string()))+ .expect_err("short file contents are rejected");+ assert!(+ err.contains(MASTER_KEY_FILE_ENV) && err.contains("got 4"),+ "{err}"+ );+}++#[test]+fn empty_env_values_fall_through_to_the_keychain() {+ assert!(master_key_from_env(None, None, file_must_not_be_read)+ .expect("nothing set is fine")+ .is_none());+ assert!(+ master_key_from_env(Some(""), Some(" "), file_must_not_be_read)+ .expect("empty values count as unset")+ .is_none()+ );+}++#[test]+fn read_master_key_file_returns_contents_and_reports_a_missing_file() {+ let tmp = tempfile::TempDir::new().unwrap();+ let path = tmp.path().join("master.key");+ std::fs::write(&path, format!("{}\n", hex_key(0x33))).unwrap();+ #[cfg(unix)]+ {+ use std::os::unix::fs::PermissionsExt;+ std::fs::set_permissions(&path, std::fs::Permissions::from_mode(0o600)).unwrap();+ }++ let contents = read_master_key_file(&path).expect("readable file");+ assert_eq!(contents.trim(), hex_key(0x33));++ let err = read_master_key_file(&tmp.path().join("missing.key")).expect_err("missing file");+ assert!(+ err.contains("cannot inspect master key file permissions"),+ "{err}"+ );+}++#[cfg(unix)]+#[test]+fn read_master_key_file_accepts_read_only_secret_mounts() {+ use std::os::unix::fs::PermissionsExt;+ let tmp = tempfile::TempDir::new().unwrap();+ let path = tmp.path().join("master.key");+ std::fs::write(&path, hex_key(0x44)).unwrap();+ std::fs::set_permissions(&path, std::fs::Permissions::from_mode(0o644)).unwrap();++ read_master_key_file(&path).expect("read-only secret mounts are supported");+}++#[cfg(unix)]+#[test]+fn read_master_key_file_rejects_other_writable_files() {+ use std::os::unix::fs::PermissionsExt;+ let tmp = tempfile::TempDir::new().unwrap();+ let path = tmp.path().join("master.key");+ std::fs::write(&path, hex_key(0x45)).unwrap();+ std::fs::set_permissions(&path, std::fs::Permissions::from_mode(0o602)).unwrap();++ let err = read_master_key_file(&path).expect_err("other-writable key files are unsafe");+ assert!(err.contains("writable by other users"), "{err}");+}++#[cfg(unix)]+#[test]+fn key_file_permissions_reject_other_writes_but_allow_read_only_access() {+ for mode in [0o400, 0o600, 0o644, 0o444, 0o604, 0o440, 0o640] {+ assert!(!key_file_mode_is_other_writable(mode), "{mode:04o}");+ }+ for mode in [0o602, 0o666] {+ assert!(key_file_mode_is_other_writable(mode), "{mode:04o}");+ }+}++#[test]+fn parse_master_key_hex_round_trips_an_encoded_key() {+ let key_bytes = crypto::generate_random_bytes(KEY_LEN);+ let parsed = parse_master_key_hex(&crypto::hex_encode(&key_bytes)).expect("valid");+ assert_eq!(parsed.as_slice(), key_bytes.as_slice());+}++#[test]+fn env_value_distinguishes_unset_from_invalid_unicode() {+ use std::env::VarError;++ assert_eq!(+ env_value(MASTER_KEY_ENV, Ok("abc".to_string())).expect("set"),+ Some("abc".to_string())+ );+ assert_eq!(+ env_value(MASTER_KEY_ENV, Err(VarError::NotPresent)).expect("unset is not an error"),+ None+ );++ // Invalid Unicode must be rejected, not treated as unset: falling through+ // to the keychain could mint a different key and orphan `secrets.enc`.+ let rejected = std::ffi::OsString::from("not-the-real-bytes");+ let err = env_value(MASTER_KEY_FILE_ENV, Err(VarError::NotUnicode(rejected)))+ .expect_err("invalid Unicode is a configuration error");+ assert!(err.contains(MASTER_KEY_FILE_ENV), "{err}");+ assert!(err.contains("not valid Unicode"), "{err}");+ assert!(+ !err.contains("not-the-real-bytes"),+ "error must not echo the value: {err}"+ );+}++// ── Wiring: the real env → `try_load_master_key` → key, no keychain ─────────+//+// `try_load_master_key` is uncached: it reads the environment on every call+// and never touches the process-wide `MASTER_KEY` (only `init_master_key`+// does, and no test here calls it; the one-time logic is tested through+// `init_once` with a local `OnceLock` below). Each test mutates the env only+// under `EnvVarGuard::locked()`, which serializes on the crate's shared+// `TEST_ENV_LOCK` and restores the previous values before releasing it, so+// the tests cannot observe each other's values in any order.++#[test]+fn try_load_master_key_prefers_the_inline_env_key_and_never_touches_the_keychain() {+ let hex = hex_key(0x55);+ let _env = crate::config::test_env::EnvVarGuard::locked()+ .with(MASTER_KEY_ENV, &hex)+ .without(MASTER_KEY_FILE_ENV);++ // A real OS keychain cannot be exercised under `cargo test` (the first+ // access blocks on a GUI prompt), so reaching the keychain here would hang+ // or fail; returning means the env source short-circuited it.+ let (key, source) = try_load_master_key().expect("inline env key loads");+ assert_eq!(key, [0x55u8; KEY_LEN]);+ assert_eq!(source, MASTER_KEY_ENV);+}++#[test]+fn try_load_master_key_reads_the_file_source_and_is_stable_across_restarts() {+ let tmp = tempfile::TempDir::new().unwrap();+ let path = tmp.path().join("master.key");+ std::fs::write(&path, format!("{}\n", hex_key(0x66))).unwrap();+ #[cfg(unix)]+ {+ use std::os::unix::fs::PermissionsExt;+ std::fs::set_permissions(&path, std::fs::Permissions::from_mode(0o600)).unwrap();+ }+ let _env = crate::config::test_env::EnvVarGuard::locked()+ .without(MASTER_KEY_ENV)+ .with(MASTER_KEY_FILE_ENV, &path);++ // Two loads stand in for two process starts: the same file must yield+ // the same key, so a secret encrypted before a restart decrypts after it.+ let (first, source) = try_load_master_key().expect("file key loads");+ let (second, _) = try_load_master_key().expect("file key loads again");+ assert_eq!(first, [0x66u8; KEY_LEN]);+ assert_eq!(first, second);+ assert_eq!(source, MASTER_KEY_FILE_ENV);++ let blob = crypto::chacha20_encrypt(&first, b"sk-live-secret").expect("encrypt");+ assert_eq!(+ crypto::chacha20_decrypt(&second, &blob).expect("decrypt with the restarted key"),+ b"sk-live-secret"+ );+}++#[test]+fn try_load_master_key_reports_a_configured_source_error_as_configured() {+ let _env = crate::config::test_env::EnvVarGuard::locked()+ .with(MASTER_KEY_ENV, "not-a-key")+ .without(MASTER_KEY_FILE_ENV);++ match try_load_master_key() {+ Err(MasterKeyError::Configured(e)) => {+ assert!(e.contains(MASTER_KEY_ENV), "{e}");+ assert!(!e.contains("not-a-key"), "must not echo the value: {e}");+ }+ other => panic!("expected a configuration error, got {other:?}"),+ }+}++#[test]+fn a_secret_written_under_a_configured_key_reads_back_after_a_restart() {+ let workspace = tempfile::TempDir::new().unwrap();+ let key_dir = tempfile::TempDir::new().unwrap();+ let key_path = key_dir.path().join("master.key");+ std::fs::write(&key_path, format!("{}\n", hex_key(0x88))).unwrap();+ #[cfg(unix)]+ {+ use std::os::unix::fs::PermissionsExt;+ std::fs::set_permissions(&key_path, std::fs::Permissions::from_mode(0o600)).unwrap();+ }+ let _env = crate::config::test_env::EnvVarGuard::locked()+ .without(MASTER_KEY_ENV)+ .with(MASTER_KEY_FILE_ENV, &key_path);++ // First "process": load the configured key and store a secret through the+ // same lock → read → encrypt → write path `KeyringBackend::set` uses.+ // `get`/`set` read the key from the process-wide `MASTER_KEY`, which+ // this test must not populate, so the key is passed explicitly.+ {+ let (key, _) = try_load_master_key().expect("configured key loads");+ let backend = EncryptedFileBackend::new(workspace.path());+ backend+ .set_with_key(&key, "provider:openai", "sk-live-secret")+ .expect("store under the configured key");+ }+ let on_disk = std::fs::read(workspace.path().join(SECRETS_FILENAME)).unwrap();+ assert!(+ !on_disk+ .windows(b"sk-live-secret".len())+ .any(|w| w == b"sk-live-secret"),+ "secrets.enc must not hold the plaintext"+ );++ // Second "process": a fresh key load and a fresh backend over the same+ // workspace read the secret back.+ let (key, _) = try_load_master_key().expect("configured key loads after restart");+ let backend = EncryptedFileBackend::new(workspace.path());+ assert_eq!(+ backend+ .get_with_key(&key, "provider:openai")+ .expect("read after restart")+ .as_deref(),+ Some("sk-live-secret")+ );+}++// ── One-time init keeps a configuration error ───────────────────────────────++#[test]+fn init_once_returns_the_configuration_error_on_every_call() {+ let cell = OnceLock::new();+ let first = init_once(&cell, || {+ Err(format!(+ "{MASTER_KEY_ENV}: expected 64 hex characters, got 4"+ ))+ });+ assert!(first.is_err(), "first call reports the error");++ // `OnceLock` does not rerun the closure; the cached error must still+ // surface rather than a silent `Ok` with no key loaded.+ let second = init_once(&cell, || panic!("init must run at most once"));+ assert_eq!(second, first);+}++#[test]+fn init_once_caches_a_loaded_key_and_a_keychain_outage_as_ok() {+ let loaded = OnceLock::new();+ assert_eq!(init_once(&loaded, || Ok(Some([0x99u8; KEY_LEN]))), Ok(()));+ assert_eq!(+ init_once(&loaded, || panic!("init must run at most once")),+ Ok(())+ );+ assert_eq!(loaded.get(), Some(&Ok(Some([0x99u8; KEY_LEN]))));++ // No key (non-encrypted backend, or the #3311 keychain outage) is not a+ // startup error.+ let unavailable = OnceLock::new();+ assert_eq!(init_once(&unavailable, || Ok(None)), Ok(()));+ assert_eq!(+ init_once(&unavailable, || panic!("init must run at most once")),+ Ok(())+ );+}diff --git a/crates/openhuman-core/src/tools/impl/browser/browser.rs b/crates/openhuman-core/src/tools/impl/browser/browser.rsindex 523fd09f6c..5edd81add7 100644--- a/crates/openhuman-core/src/tools/impl/browser/browser.rs+++ b/crates/openhuman-core/src/tools/impl/browser/browser.rs@@ -26,7 +26,7 @@ use std::{sync::{Arc, Mutex as StdMutex},time::Instant,};-use task_actions::{approve_task_action, parse_action, required, task_inputs};+use task_actions::{approve_task_action, host_hint, parse_action, required, task_inputs};use tinycomputer_bus::agent::{ContinueTaskRequest, TaskId, TaskStatus, TaskView};use tinycomputer_bus::browser::{Action, DownloadState, DownloadWaitRequest, NavigateRequest, ReadRequest, SessionId,@@ -311,6 +311,9 @@ impl BrowserTool {/// token that only `confirm_pending` (through the host gate) can spend.async fn report(&self, view: TaskView) -> anyhow::Result<Value> {let mut output = serde_json::to_value(&view)?;+ if let Some(hint) = host_hint(&view) {+ output["host_hint"] = json!(hint);+ }if let TaskStatus::NeedsApproval { action, target, .. } = &view.status {let token = uuid::Uuid::new_v4().to_string();*self.pending.lock().await = Some(Pending {diff --git a/crates/openhuman-core/src/tools/impl/browser/browser_computer_tests.rs b/crates/openhuman-core/src/tools/impl/browser/browser_computer_tests.rsindex d6d3c04ac4..7d3d1541fd 100644--- a/crates/openhuman-core/src/tools/impl/browser/browser_computer_tests.rs+++ b/crates/openhuman-core/src/tools/impl/browser/browser_computer_tests.rs@@ -413,3 +413,24 @@ async fn task_rejects_a_malformed_flow_before_the_module() {.unwrap_err();assert!(error.to_string().contains("Invalid flow"), "{error}");}++#[test]+fn a_task_that_found_no_chrome_tells_the_agent_to_ask_for_its_path() {+ let failed = |reason: &str| -> TaskView {+ serde_json::from_value(json!({+ "id": "t-1",+ "status": {"state": "failed", "step": null, "reason": reason,+ "hint": "", "recoverable": true},+ "summary": "failed",+ "progress": 0.0,+ "next": []+ }))+ .unwrap()+ };+ let hint = host_hint(&failed("browser unavailable: Chrome not found. Checked: …"));+ assert_eq!(hint, Some(crate::modules::browser::CHROME_NOT_FOUND_HINT));+ assert_eq!(+ host_hint(&failed("the last three actions changed nothing")),+ None+ );+}diff --git a/crates/openhuman-core/src/tools/impl/browser/browser_task_actions.rs b/crates/openhuman-core/src/tools/impl/browser/browser_task_actions.rsindex 72f653540f..552ff5cf3b 100644--- a/crates/openhuman-core/src/tools/impl/browser/browser_task_actions.rs+++ b/crates/openhuman-core/src/tools/impl/browser/browser_task_actions.rs@@ -5,8 +5,24 @@ use crate::security::approval::{ApprovalGate, GateOutcome};use serde_json::{json, Value};use sha2::{Digest, Sha256};use std::collections::BTreeMap;+use tinycomputer_bus::agent::{TaskStatus, TaskView};use tinycomputer_bus::browser::{Action, LocateBy, Locator, ScrollDirection, Target, WaitState};+/// What the host adds to a task report the agent cannot act on alone: a+/// task that failed because Chrome was not found says where the user sets+/// its path, rather than leaving the agent to install a browser.+pub(super) fn host_hint(view: &TaskView) -> Option<&'static str> {+ match &view.status {+ TaskStatus::Failed { reason, hint, .. }+ if crate::modules::browser::chrome_not_found(reason)+ || crate::modules::browser::chrome_not_found(hint) =>+ {+ Some(crate::modules::browser::CHROME_NOT_FOUND_HINT)+ }+ _ => None,+ }+}+pub(super) fn task_inputs(args: &Value) -> anyhow::Result<BTreeMap<String, String>> {args["inputs"].as_object().map_or_else(|| Ok(BTreeMap::new()),diff --git a/crates/openhuman-core/src/tools/impl/system/node_exec_tests.rs b/crates/openhuman-core/src/tools/impl/system/node_exec_tests.rsindex 62d4187f49..9615701f33 100644--- a/crates/openhuman-core/src/tools/impl/system/node_exec_tests.rs+++ b/crates/openhuman-core/src/tools/impl/system/node_exec_tests.rs@@ -150,3 +150,14 @@ fn resolve_script_path_targets_action_dir_not_workspace_dir() {resolved.display());}++/// `node_exec` clears the child environment, so its allow-list must carry the+/// Windows process-bootstrap set — without `SystemRoot` a spawned `node.exe`+/// aborts with `Assertion failed: ncrypto::CSPRNG(nullptr, 0)`.+#[test]+fn safe_env_vars_cover_windows_bootstrap() {+ crate::agent::platform_shell::assert_forwards_windows_bootstrap(+ SAFE_ENV_VARS,+ "node_exec::SAFE_ENV_VARS",+ );+}diff --git a/crates/openhuman-core/src/tools/impl/system/npm_exec_tests.rs b/crates/openhuman-core/src/tools/impl/system/npm_exec_tests.rsindex 30c51a322e..059e42a84e 100644--- a/crates/openhuman-core/src/tools/impl/system/npm_exec_tests.rs+++ b/crates/openhuman-core/src/tools/impl/system/npm_exec_tests.rs@@ -75,10 +75,8 @@ fn resolve_cwd_allows_relative_subdir() {#[test]fn safe_env_vars_include_windows_process_essentials() {- for var in ["SystemRoot", "COMSPEC", "PATHEXT", "TEMP", "USERPROFILE"] {- assert!(- SAFE_ENV_VARS.contains(&var),- "{var} must be forwarded for Windows child processes"- );- }+ crate::agent::platform_shell::assert_forwards_windows_bootstrap(+ SAFE_ENV_VARS,+ "npm_exec::SAFE_ENV_VARS",+ );}diff --git a/crates/openhuman-core/src/tools/impl/system/python_exec_tests.rs b/crates/openhuman-core/src/tools/impl/system/python_exec_tests.rsindex b8b87da3f8..94bdbe59a2 100644--- a/crates/openhuman-core/src/tools/impl/system/python_exec_tests.rs+++ b/crates/openhuman-core/src/tools/impl/system/python_exec_tests.rs@@ -37,3 +37,13 @@ fn resolve_script_path_rejects_escapes() {std::path::Path::new("/ws/scripts/run.py"));}++/// `python_exec` clears the child environment, so its allow-list must carry the+/// Windows process-bootstrap set — a child without them fails to start.+#[test]+fn safe_env_vars_cover_windows_bootstrap() {+ crate::agent::platform_shell::assert_forwards_windows_bootstrap(+ SAFE_ENV_VARS,+ "python_exec::SAFE_ENV_VARS",+ );+}diff --git a/crates/openhuman-core/src/tools/impl/system/shell_tests_schema_and_env_tests.rs b/crates/openhuman-core/src/tools/impl/system/shell_tests_schema_and_env_tests.rsindex c012a38fec..cbbbbae6b5 100644--- a/crates/openhuman-core/src/tools/impl/system/shell_tests_schema_and_env_tests.rs+++ b/crates/openhuman-core/src/tools/impl/system/shell_tests_schema_and_env_tests.rs@@ -618,10 +618,8 @@ fn shell_safe_env_vars_includes_essentials() {#[test]fn shell_safe_env_vars_include_windows_process_essentials() {- for var in ["SystemRoot", "COMSPEC", "PATHEXT", "TEMP", "USERPROFILE"] {- assert!(- SAFE_ENV_VARS.contains(&var),- "{var} must be forwarded for Windows child processes"- );- }+ crate::agent::platform_shell::assert_forwards_windows_bootstrap(+ SAFE_ENV_VARS,+ "shell::SAFE_ENV_VARS",+ );}diff --git a/crates/openhuman-core/src/web_chat/README.md b/crates/openhuman-core/src/web_chat/README.mdindex 4d7deddc03..4afb92f05d 100644--- a/crates/openhuman-core/src/web_chat/README.md+++ b/crates/openhuman-core/src/web_chat/README.md@@ -27,7 +27,8 @@ runner behind both surfaces.`APPROVAL_CHAT_CONTEXT` task-local scope all wrap the same future.4. `run_chat_task` checks the session `Agent` out of the per-thread cache(`session.rs::checkout_session_agent`), reusing the `THREAD_SESSIONS` entry- when its `SessionCacheFingerprint` still matches and otherwise building one+ when its `SessionCacheFingerprint` (including the resolved effective model,+ even without a picker override) still matches and otherwise building oneand cold-boot resuming it from the thread's `session_raw` transcript (orthe conversation log). A `Parallel` fork always builds a fresh agent andnever touches the cache. It then spawns [`spawn_progress_bridge`]@@ -113,7 +114,7 @@ re-cached its own agent wins.| `mod.rs` | Module wiring and re-exports; no business logic || `ops.rs` (thin shell over `ops/`: `start_chat.rs`, `channel_ops.rs`, `parallel_turn.rs`, `turn_guards.rs`, `state.rs`, `budget_correlation.rs`, `test_hooks.rs`) | `start_chat`/`cancel_*`/`channel_web_*` operations, session cache, in-flight tracking, budget-signal correlation, `run_turn_under_cancel_and_deadline` || `run_task.rs` | `run_chat_task`: resolves/builds the session agent, spawns the progress bridge, runs the turn, applies the budget correlation to its error |-| `session.rs` | Builds/fingerprints the cached session `Agent`, resolves target agent id, locale directive, provider role for a model override |+| `session.rs` | Builds/fingerprints the cached session `Agent`, resolves target agent id, locale directive, provider role, and turn-local provider/model routing for a model selection || `progress_bridge.rs` | Forwards `AgentProgress` into `WebChannelEvent`s and `TurnStateMirror`, emits the `inference_heartbeat` liveness beat || `presentation.rs` | `deliver_response` (one unsegmented `chat_done`, persisted first) and `deliver_response_single_bubble` (core-initiated turns); local-model emoji-reaction decision; legacy segmentation helpers || `reply_persistence.rs` | Durable write of the reply about to be announced, under a deterministic id shared with the client's own append |@@ -159,7 +160,11 @@ Namespace `channel`, registered viaprogress bridge mirrors turn state here for cross-surface visibility.- `crate::inference::provider::provider_for_role`: resolves the providerbinding for `provider_role_for_model_override`, which feeds the session- fingerprint.+ fingerprint. `effective_session_config` applies a concrete picker provider+ and model to the per-turn clone; managed `openrouter/...` defaults restore+ the managed route after restart without saving changes or altering sibling+ role routes. Hints and unqualified legacy model IDs retain their configured+ provider route.- `crate::security::approval::APPROVAL_CHAT_CONTEXT`: scoped by`run_turn_under_cancel_and_deadline` around the `run_chat_task` future.`crate::web3::wallet::execution::current_owner()` relies on this task-local@@ -203,4 +208,5 @@ Namespace `channel`, registered via`mod.rs` for debug/test builds.- Per-file unit tests: `event_bus_tests.rs`, `ops_budget_correlation_tests_tests.rs`,`presentation_tests.rs` + `presentation_test_support_tests.rs`,- `progress_bridge_tests.rs`, `reply_persistence_tests.rs`, `run_task_tests.rs`.+ `progress_bridge_tests.rs`, `reply_persistence_tests.rs`, `run_task_tests.rs`,+ `session_checkout_tests.rs`, `session_routing_tests.rs`.diff --git a/crates/openhuman-core/src/web_chat/session.rs b/crates/openhuman-core/src/web_chat/session.rsindex 57e637fcf1..2020057f32 100644--- a/crates/openhuman-core/src/web_chat/session.rs+++ b/crates/openhuman-core/src/web_chat/session.rs@@ -71,6 +71,66 @@ pub(crate) fn provider_role_for_model_override(model_override: Option<&str>) ->}}+/// Build the in-memory config for one web-chat turn. Concrete picker values+/// may include their provider (`ollama:model`, `huggingface:org/model`) while+/// managed catalog ids use OpenRouter's `openrouter/...` form. The selected+/// route belongs only to this clone; saved chat settings and sibling workload+/// roles remain untouched.+fn effective_session_config(+ config: &Config,+ model_override: Option<&str>,+ temperature: Option<f64>,+) -> Config {+ let mut effective = config.clone();+ if let Some(model) = model_override+ .map(str::trim)+ .filter(|model| !model.is_empty())+ {+ effective.default_model = Some(model.to_string());+ }++ // Resolve the effective model even when there was no per-turn override:+ // persisted defaults must restore their provider after a restart too.+ if let Some(model) = effective+ .default_model+ .as_deref()+ .map(str::trim)+ .filter(|model| crate::inference::provider::factory::is_raw_passthrough_model(model))+ {+ if model.starts_with("openrouter/") {+ // The managed backend accepts catalog ids verbatim. This also+ // clears a stale local/BYOK chat route from the effective clone.+ effective.chat_provider = Some("openhuman".to_string());+ } else if let Some((provider, model_suffix)) = model.split_once(':') {+ let provider = provider.trim();+ let local_route = tinyinference_local::profile::is_local_provider_string(model);+ let built_in_route = matches!(provider, "claude-code" | "claude_agent_sdk");+ if local_route || built_in_route {+ // Keep the complete selected value for local and built-in routes.+ effective.chat_provider = Some(model.to_string());+ } else if let Some(entry) = effective+ .cloud_providers+ .iter()+ .find(|entry| entry.slug.eq_ignore_ascii_case(provider))+ {+ // The factory matches configured slugs exactly; preserve its canonical slug+ // while keeping the full selected model suffix, including extra colons.+ effective.chat_provider = Some(format!("{}:{model_suffix}", entry.slug));+ } else {+ // Keep an unknown qualified selection on an invalid route so+ // factory construction fails explicitly instead of silently+ // using the previous chat provider.+ effective.chat_provider = Some(model.to_string());+ }+ }+ }++ if let Some(temp) = temperature {+ effective.default_temperature = temp;+ }+ effective+}+pub(super) fn build_session_agent(config: &Config,client_id: &str,@@ -80,14 +140,8 @@ pub(super) fn build_session_agent(temperature: Option<f64>,locale: Option<&str>,) -> Result<OpenHumanSessionHost, String> {- let mut effective = config.clone();- if let Some(model) = model_override {- effective.default_model = Some(model);- }+ let effective = effective_session_config(config, model_override.as_deref(), temperature);let provider_role = provider_role_for_model_override(effective.default_model.as_deref());- if let Some(temp) = temperature {- effective.default_temperature = temp;- }log::info!("[web-channel] routing chat turn to '{}' provider_role='{}' (client_id={}, thread_id={})",@@ -216,6 +270,12 @@ pub(super) fn fingerprint_diff(prior.model_override, next.model_override));}+ if prior.effective_model != next.effective_model {+ diff.push(format!(+ "effective_model: {} -> {}",+ prior.effective_model, next.effective_model+ ));+ }if prior.temperature != next.temperature {diff.push(format!("temperature: {:?} -> {:?}",@@ -258,10 +318,15 @@ pub(super) fn build_session_fingerprint(target_agent_id: String,provider_role: &str,) -> SessionCacheFingerprint {+ let effective = effective_session_config(config, model_override.as_deref(), temperature);SessionCacheFingerprint {model_override,+ effective_model: crate::inference::provider::factory::resolve_model_for_hint(+ &format!("hint:{provider_role}"),+ &effective,+ ),temperature,- provider_binding: crate::inference::provider::provider_for_role(provider_role, config),+ provider_binding: crate::inference::provider::provider_for_role(provider_role, &effective),target_agent_id,autonomy_signature: autonomy_signature(config),model_registry_signature: model_registry_signature(config),@@ -316,7 +381,8 @@ pub(crate) async fn checkout_session_agent() -> Result<CheckedOutSession, String> {let map_key = super::ops::key_for(thread_id);let target_agent_id = pick_target_agent_id(config);- let provider_role = provider_role_for_model_override(model_override.as_deref());+ let effective = effective_session_config(config, model_override.as_deref(), temperature);+ let provider_role = provider_role_for_model_override(effective.default_model.as_deref());let fingerprint = build_session_fingerprint(config,model_override.clone(),@@ -451,3 +517,7 @@ pub(crate) async fn checkin_session_agent_if_vacant(#[cfg(test)]#[path = "session_checkout_tests.rs"]mod session_checkout_tests;++#[cfg(test)]+#[path = "session_routing_tests.rs"]+mod session_routing_tests;diff --git a/crates/openhuman-core/src/web_chat/session_checkout_tests.rs b/crates/openhuman-core/src/web_chat/session_checkout_tests.rsindex 782219d9c2..e94618d434 100644--- a/crates/openhuman-core/src/web_chat/session_checkout_tests.rs+++ b/crates/openhuman-core/src/web_chat/session_checkout_tests.rs@@ -373,6 +373,7 @@ async fn a_thread_binds_one_stable_session_across_cold_boots() {fn sample_fingerprint() -> SessionCacheFingerprint {SessionCacheFingerprint {model_override: Some("hint:chat".to_string()),+ effective_model: "openrouter/author/model".to_string(),temperature: Some(0.7),target_agent_id: "orchestrator".to_string(),provider_binding: "openhuman".to_string(),diff --git a/crates/openhuman-core/src/web_chat/session_routing_tests.rs b/crates/openhuman-core/src/web_chat/session_routing_tests.rsnew file mode 100644index 0000000000..ea888c1d99--- /dev/null+++ b/crates/openhuman-core/src/web_chat/session_routing_tests.rs@@ -0,0 +1,442 @@+use super::effective_session_config;+use crate::config::Config;+use crate::inference::provider::provider_for_role;++fn with_huggingface_route(config: &mut Config) {+ config+ .cloud_providers+ .push(crate::config::schema::CloudProviderCreds {+ id: "huggingface-test".to_string(),+ slug: "huggingface".to_string(),+ label: "Hugging Face test route".to_string(),+ endpoint: "https://huggingface.co".to_string(),+ ..Default::default()+ });+}++#[test]+fn picker_routes_follow_provider_and_model_across_turns() {+ let mut original = Config::default();+ original.chat_provider = Some("openai:gpt-4o".to_string());+ original.reasoning_provider = Some("anthropic:claude-sonnet".to_string());+ original.coding_provider = Some("openai:o3-mini".to_string());+ with_huggingface_route(&mut original);+ let original_snapshot = serde_json::to_value(&original).expect("config serializes");++ let mut selected = effective_session_config(+ &original,+ Some("openrouter/author/managed-model:free"),+ None,+ );+ assert_eq!(+ provider_for_role("chat", &selected),+ "openhuman",+ "managed catalog selection replaces a prior BYOK route"+ );+ assert_eq!(+ selected.default_model.as_deref(),+ Some("openrouter/author/managed-model:free")+ );++ selected = effective_session_config(&selected, Some("ollama:gpt-oss:120b-cloud"), None);+ assert_eq!(+ provider_for_role("chat", &selected),+ "ollama:gpt-oss:120b-cloud",+ "local picker selection retains the model suffix after the provider colon"+ );+ assert_eq!(+ selected.default_model.as_deref(),+ Some("ollama:gpt-oss:120b-cloud")+ );++ selected = effective_session_config(&selected, Some("ollama:qwen3:4b-instruct"), None);+ assert_eq!(+ provider_for_role("chat", &selected),+ "ollama:qwen3:4b-instruct"+ );++ selected = effective_session_config(&selected, Some("huggingface:org/model"), None);+ assert_eq!(+ provider_for_role("chat", &selected),+ "huggingface:org/model"+ );++ selected = effective_session_config(+ &selected,+ Some("openrouter/author/managed-model:free"),+ None,+ );+ assert_eq!(+ provider_for_role("chat", &selected),+ "openhuman",+ "managed selection clears a previously selected local or cloud route"+ );++ assert_eq!(+ serde_json::to_value(&original).expect("config serializes"),+ original_snapshot,+ "turn selections must not mutate the saved config"+ );+ assert_eq!(+ provider_for_role("reasoning", &selected),+ "anthropic:claude-sonnet",+ "changing the chat picker must not change sibling workload routes"+ );+ assert_eq!(provider_for_role("coding", &selected), "openai:o3-mini");+}++#[test]+fn persisted_managed_default_restores_managed_route_after_restart() {+ let mut persisted = Config::default();+ persisted.default_model = Some("openrouter/author/restored-model:free".to_string());+ persisted.chat_provider = Some("ollama:qwen3:4b-instruct".to_string());++ let effective = effective_session_config(&persisted, None, None);+ assert_eq!(+ effective.default_model.as_deref(),+ Some("openrouter/author/restored-model:free")+ );+ assert_eq!(provider_for_role("chat", &effective), "openhuman");+ assert_eq!(+ persisted.chat_provider.as_deref(),+ Some("ollama:qwen3:4b-instruct"),+ "restoration is turn-local and leaves persisted routing alone"+ );+}++#[test]+fn persisted_local_default_restores_its_route_after_restart() {+ let mut persisted = Config::default();+ persisted.default_model = Some("ollama:qwen3:4b-instruct".to_string());+ persisted.chat_provider = Some("openai:gpt-4o".to_string());++ let effective = effective_session_config(&persisted, None, None);+ assert_eq!(+ effective.default_model.as_deref(),+ Some("ollama:qwen3:4b-instruct")+ );+ assert_eq!(+ provider_for_role("chat", &effective),+ "ollama:qwen3:4b-instruct"+ );+}++#[test]+fn hints_and_legacy_model_ids_keep_the_configured_route() {+ let mut config = Config::default();+ config.default_model = Some("stored-default".to_string());+ config.chat_provider = Some("openai:gpt-4o".to_string());+ config.coding_provider = Some("ollama:qwen3-coder:latest".to_string());+ let original = config.clone();++ let hint = effective_session_config(&config, Some("hint:coding"), None);+ assert_eq!(+ provider_for_role("coding", &hint),+ "ollama:qwen3-coder:latest"+ );+ assert_eq!(provider_for_role("chat", &hint), "openai:gpt-4o");++ let legacy_alias = effective_session_config(&config, Some("coding-v1"), None);+ assert_eq!(+ provider_for_role("coding", &legacy_alias),+ "ollama:qwen3-coder:latest"+ );++ let unqualified = effective_session_config(&config, Some("gpt-4.1-mini"), None);+ assert_eq!(provider_for_role("chat", &unqualified), "openai:gpt-4o");+ assert_eq!(unqualified.default_model.as_deref(), Some("gpt-4.1-mini"));++ for selection in [+ "claude-code:claude-sonnet-4-20250514",+ "claude_agent_sdk:claude-sonnet-4-20250514",+ ] {+ let built_in = effective_session_config(&config, Some(selection), None);+ assert_eq!(+ provider_for_role("chat", &built_in),+ selection,+ "built-in provider route {selection} is recognized without a cloud provider entry"+ );+ }++ assert_eq!(config.default_model, original.default_model);+ assert_eq!(config.chat_provider, original.chat_provider);+ assert_eq!(config.coding_provider, original.coding_provider);+}++#[test]+fn explicit_picker_override_wins_over_a_different_persisted_default() {+ let mut persisted = Config::default();+ persisted.default_model = Some("openrouter/author/old-model:free".to_string());+ persisted.chat_provider = Some("openhuman".to_string());++ let effective = effective_session_config(&persisted, Some("ollama:gpt-oss:120b-cloud"), None);+ assert_eq!(+ effective.default_model.as_deref(),+ Some("ollama:gpt-oss:120b-cloud")+ );+ assert_eq!(+ provider_for_role("chat", &effective),+ "ollama:gpt-oss:120b-cloud"+ );+}++#[test]+fn session_fingerprint_records_the_effective_picker_route() {+ let mut config = Config::default();+ config.chat_provider = Some("ollama:qwen3:4b-instruct".to_string());++ let managed = super::build_session_fingerprint(+ &config,+ Some("openrouter/author/model:free".to_string()),+ None,+ "orchestrator".to_string(),+ "chat",+ );+ let local = super::build_session_fingerprint(+ &config,+ Some("ollama:gpt-oss:120b-cloud".to_string()),+ None,+ "orchestrator".to_string(),+ "chat",+ );++ assert_eq!(managed.provider_binding, "openhuman");+ assert_eq!(local.provider_binding, "ollama:gpt-oss:120b-cloud");+ assert_ne!(managed.provider_binding, local.provider_binding);+}++#[test]+fn unknown_qualified_models_keep_the_existing_route() {+ let mut config = Config::default();+ config.chat_provider = Some("openai:gpt-4o".to_string());++ let effective = effective_session_config(&config, Some("unknown-provider:some-model"), None);+ assert_eq!(+ provider_for_role("chat", &effective),+ "unknown-provider:some-model",+ "an unrecognized provider slug must remain invalid instead of falling back"+ );+ assert_eq!(+ effective.default_model.as_deref(),+ Some("unknown-provider:some-model"),+ "unknown legacy model values still pass through as the model override"+ );+}++#[test]+fn selected_managed_route_constructs_with_the_picker_model() {+ let config = Config::default();+ let selection = "openrouter/author/picked-model:free";+ let effective = effective_session_config(&config, Some(selection), None);+ let (_, resolved_model) = crate::inference::provider::factory::create_chat_model_with_model_id(+ "chat",+ &effective,+ effective.default_temperature,+ )+ .expect("managed picker selection should construct without network access");+ assert_eq!(resolved_model, selection);+}++#[test]+fn selected_ollama_route_constructs_the_selected_model_without_network() {+ let mut config = Config::default();+ config.chat_provider = Some("openhuman".to_string());+ config.local_ai.base_url = Some("http://127.0.0.1:1".to_string());++ for model in ["gpt-oss:120b-cloud", "qwen3:4b-instruct"] {+ let selection = format!("ollama:{model}");+ let effective = effective_session_config(&config, Some(&selection), None);+ let (_, resolved_model) =+ crate::inference::provider::factory::create_chat_model_with_model_id(+ "chat",+ &effective,+ effective.default_temperature,+ )+ .expect("local model construction requires no provider request");+ assert_eq!(resolved_model, model);+ }+}++#[test]+fn empty_picker_values_preserve_persisted_selection_and_temperature() {+ let mut config = Config::default();+ config.default_model = Some("ollama:qwen3:4b-instruct".to_string());+ config.chat_provider = Some("openhuman".to_string());+ config.default_temperature = 0.42;+ let snapshot = serde_json::to_value(&config).unwrap();++ for selection in [None, Some(""), Some(" \t ")] {+ let effective = effective_session_config(&config, selection, None);+ assert_eq!(effective.default_model, config.default_model);+ assert_eq!(+ provider_for_role("chat", &effective),+ "ollama:qwen3:4b-instruct"+ );+ assert_eq!(effective.default_temperature, 0.42);+ }+ assert_eq!(serde_json::to_value(&config).unwrap(), snapshot);+}++#[test]+fn temperature_override_is_turn_local_and_changes_the_cache_fingerprint() {+ let mut config = Config::default();+ config.default_temperature = 0.42;+ config.chat_provider = Some("openhuman".to_string());+ let snapshot = serde_json::to_value(&config).unwrap();+ let selection = Some(" ollama:qwen3:4b-instruct ");+ let effective = effective_session_config(&config, selection, Some(0.0));+ assert_eq!(effective.default_temperature, 0.0);+ assert_eq!(+ effective.default_model.as_deref(),+ Some("ollama:qwen3:4b-instruct")+ );+ assert_eq!(+ provider_for_role("chat", &effective),+ "ollama:qwen3:4b-instruct"+ );++ let fingerprint = |temperature| {+ super::build_session_fingerprint(+ &config,+ Some("ollama:qwen3:4b-instruct".to_string()),+ Some(temperature),+ "orchestrator".to_string(),+ "chat",+ )+ };+ let cold = fingerprint(0.0);+ let warm = fingerprint(0.7);+ assert_eq!(cold.temperature, Some(0.0));+ assert_eq!(warm.temperature, Some(0.7));+ assert_eq!(cold.provider_binding, warm.provider_binding);+ assert_ne!(cold, warm);+ assert_eq!(serde_json::to_value(&config).unwrap(), snapshot);+}++/// Settings changes must invalidate a warm managed chat even when the caller+/// sends no model override and the provider binding stays managed.+#[test]+fn persisted_managed_model_changes_invalidate_the_session_fingerprint() {+ let mut config = Config::default();+ config.chat_provider = Some("openhuman".to_string());+ config.default_model = Some("openrouter/author/first-model:free".to_string());+ let fingerprint = |config: &Config, selection: Option<String>| {+ super::build_session_fingerprint(+ config,+ selection,+ None,+ "orchestrator".to_string(),+ "chat",+ )+ };+ let first = fingerprint(&config, None);+ config.default_model = Some("openrouter/author/second-model:free".to_string());+ let second = fingerprint(&config, None);+ assert_eq!(first.provider_binding, second.provider_binding);+ assert_eq!(first.model_override, second.model_override);+ assert_ne!(+ first, second,+ "the old cached agent must not survive a saved model change"+ );+ assert!(super::fingerprint_diff(&first, &second)+ .iter()+ .any(|field| field.starts_with("effective_model:")));+ config.default_model = None;+ assert_ne!(+ second,+ fingerprint(&config, None),+ "clearing the pin restores the managed fallback"+ );+}++/// A concrete picker choice still wins over a changing saved default; changing+/// that unrelated default must not evict the agent built for the explicit pick.+#[test]+fn explicit_picker_model_keeps_its_fingerprint_when_saved_default_changes() {+ let mut config = Config::default();+ config.chat_provider = Some("openhuman".to_string());+ config.default_model = Some("openrouter/author/first-model:free".to_string());+ let selected = Some("openrouter/author/picked-model:free".to_string());+ let first = super::build_session_fingerprint(+ &config,+ selected.clone(),+ None,+ "orchestrator".to_string(),+ "chat",+ );+ config.default_model = Some("openrouter/author/second-model:free".to_string());+ let second = super::build_session_fingerprint(+ &config,+ selected,+ None,+ "orchestrator".to_string(),+ "chat",+ );+ assert_eq!(first, second);+}++fn configured_huggingface_route() -> Config {+ let mut config = Config::default();+ config.chat_provider = Some("openai:gpt-4o".to_string());+ config+ .cloud_providers+ .push(crate::config::schema::CloudProviderCreds {+ id: "p_huggingface".to_string(),+ slug: "huggingface".to_string(),+ label: "Hugging Face".to_string(),+ endpoint: "http://127.0.0.1:1/v1".to_string(),+ auth_style: crate::config::schema::cloud_providers::AuthStyle::None,+ ..Default::default()+ });+ config+}++fn assert_huggingface_model_builds(config: &Config, expected_model: &str) {+ let (_, resolved_model) =+ crate::inference::provider::factory::create_chat_model_with_model_id("chat", config, 0.0)+ .expect("case-insensitive cloud selection should resolve through its configured slug");+ assert_eq!(resolved_model, expected_model);+}++#[test]+fn mixed_case_cloud_picker_uses_configured_slug_and_preserves_colon_suffix() {+ let _guard = crate::inference::inference_test_guard();+ let config = configured_huggingface_route();+ let original = serde_json::to_value(&config).expect("config serializes");+ let selected = "HuggingFace:org/model:version:variant";+ let effective = effective_session_config(&config, Some(selected), None);++ assert_eq!(+ effective.chat_provider.as_deref(),+ Some("huggingface:org/model:version:variant")+ );+ assert_eq!(effective.default_model.as_deref(), Some(selected));+ assert_huggingface_model_builds(&effective, "org/model:version:variant");+ assert_eq!(+ serde_json::to_value(&config).expect("config serializes"),+ original,+ "picker selection must remain turn-local"+ );+}++#[test]+fn persisted_mixed_case_cloud_default_uses_configured_slug_after_restart() {+ let _guard = crate::inference::inference_test_guard();+ let mut config = configured_huggingface_route();+ let selected = "HUGGINGFACE:org/model:version:variant";+ config.default_model = Some(selected.to_string());+ let original = serde_json::to_value(&config).expect("config serializes");+ let effective = effective_session_config(&config, None, None);++ assert_eq!(+ effective.chat_provider.as_deref(),+ Some("huggingface:org/model:version:variant")+ );+ assert_eq!(effective.default_model.as_deref(), Some(selected));+ assert_huggingface_model_builds(&effective, "org/model:version:variant");+ assert_eq!(+ serde_json::to_value(&config).expect("config serializes"),+ original,+ "restoring a persisted picker default must remain turn-local"+ );+}diff --git a/crates/openhuman-core/src/web_chat/types.rs b/crates/openhuman-core/src/web_chat/types.rsindex 14d5fe0515..92fc05bbb8 100644--- a/crates/openhuman-core/src/web_chat/types.rs+++ b/crates/openhuman-core/src/web_chat/types.rs@@ -59,6 +59,9 @@ impl std::fmt::Display for QueueMode {#[derive(PartialEq, Debug, Clone)]pub(crate) struct SessionCacheFingerprint {pub(super) model_override: Option<String>,+ /// Resolved model selected by the effective configuration, including a+ /// persisted managed default when no per-turn override was sent.+ pub(super) effective_model: String,pub(super) temperature: Option<f64>,pub(super) target_agent_id: String,pub(super) provider_binding: String,diff --git a/crates/openhuman-core/src/web_chat/web_errors/classify.rs b/crates/openhuman-core/src/web_chat/web_errors/classify.rsindex 7b77af7aeb..e279262a16 100644--- a/crates/openhuman-core/src/web_chat/web_errors/classify.rs+++ b/crates/openhuman-core/src/web_chat/web_errors/classify.rs@@ -150,6 +150,31 @@ pub(super) fn classified_plain()}+/// Whether `err` says nothing except that the offline local session cannot+/// reach managed inference (#6932).+///+/// A fallback aggregate concatenates every attempt, so the sentinel being+/// present does not mean it is the whole story: one leg can be this refusal+/// while another is a BYO provider failing on its own key. Only an error whose+/// every attempt is the refusal is explained by the local profile.+fn only_local_session_refused(err: &str) -> bool {+ const AGGREGATE: &str = "All providers/models failed";+ let sentinel =+ crate::security::credentials::session_support::LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE;+ if !err.contains(sentinel) {+ return false;+ }+ match err.split_once(AGGREGATE) {+ // Not a chain aggregate: the refusal is the only failure there is.+ None => true,+ Some((_, attempts)) => attempts+ .split(';')+ .map(str::trim)+ .filter(|attempt| !attempt.is_empty())+ .all(|attempt| attempt.contains(sentinel)),+ }+}+pub(crate) fn classify_inference_error(err: &str) -> ClassifiedError {use FailureClass as C;let lower = err.to_lowercase();@@ -184,7 +209,26 @@ pub(crate) fn classify_inference_error(err: &str) -> ClassifiedError {// "iteration", so they MUST be checked before the generic provider-429// branch — otherwise users see a confusing "your AI provider is// rate-limiting you" message for limits OpenHuman itself enforced (#2364).- let classified = if is_codex_token_expired_text(&err.to_ascii_lowercase()) {+ let classified = if only_local_session_refused(err) {+ // #6932: `resolve_bearer` refuses the offline local session before the+ // request, so the backend `401 "Invalid token"` that+ // `is_session_expired_message` claims — and that told a locally+ // signed-in user their session had expired — never comes back.+ //+ // Leads the ladder, because the aggregate wrapper's own words defeat+ // the arms below: "All providers/models failed" supplies "models" and+ // the sentinel supplies "unavailable", which is exactly+ // `is_model_unavailable_text`, so a refusal reaching the lower arms+ // gets told to check its model settings. The gate is what keeps that+ // lead honest — a chain that refused managed and then failed a BYO+ // provider on its own key is NOT claimed here and reports that key+ // instead.+ classified_plain(+ C::LocalSessionManagedUnavailable,+ provider,+ fallback_available,+ )+ } else if is_codex_token_expired_text(&err.to_ascii_lowercase()) {// Codex OAuth refresh failed (#5869): the user must reconnect Codex in// Settings → Integrations, NOT sign into OpenHuman. Checked before// `is_session_expired_message` because the sentinel containsdiff --git a/crates/openhuman-core/src/web_chat/web_tests.rs b/crates/openhuman-core/src/web_chat/web_tests.rsindex 0e23843dcb..1619823249 100644--- a/crates/openhuman-core/src/web_chat/web_tests.rs+++ b/crates/openhuman-core/src/web_chat/web_tests.rs@@ -61,6 +61,7 @@ fn fp() -> SessionCacheFingerprint {SessionCacheFingerprint {model_override: model_override.map(String::from),+ effective_model: "sample-model".to_string(),temperature,target_agent_id: target.to_string(),provider_binding: provider_binding.to_string(),diff --git a/crates/openhuman-core/src/web_chat/web_tests_error_code_classification_tests.rs b/crates/openhuman-core/src/web_chat/web_tests_error_code_classification_tests.rsindex f2a61707d5..2f7df610c6 100644--- a/crates/openhuman-core/src/web_chat/web_tests_error_code_classification_tests.rs+++ b/crates/openhuman-core/src/web_chat/web_tests_error_code_classification_tests.rs@@ -585,3 +585,66 @@ fn classify_inference_error_in_stream_tool_history_rejection_uses_malformed_histclassified.message);}++#[test]+fn classify_inference_error_local_offline_profile_is_not_an_expired_session() {+ // #6932: the refusal travels wrapped in the turn driver's context, so the+ // arm matches the sentinel anywhere in the chain.+ let raw = format!(+ "run_chat_task failed client_id=abc thread_id=t-1 error={}",+ crate::security::credentials::session_support::LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE+ );+ let classified = classify_inference_error(&raw);++ assert_eq!(classified.error_type, "auth_error");+ assert_eq!(classified.source, "config");+ assert!(!classified.retryable);+ assert!(+ classified.message.contains("Use Your Own Models"),+ "must route the user to the setting that fixes it: {}",+ classified.message+ );+ assert!(+ !classified.message.contains("session has expired"),+ "must not claim an expired session: {}",+ classified.message+ );+}++#[test]+fn classify_inference_error_a_mixed_fallback_chain_reports_the_provider_that_failed() {+ // #6932 review: a fallback aggregate carries every attempt's text. A chain+ // that refused managed for the local profile and then failed a BYO+ // provider on its own key must report the key, not blame the profile for+ // someone else's failure — so the sentinel sits with the catch-alls rather+ // than at the head of the ladder.+ let raw = format!(+ "All providers/models failed. Attempts: {}; openai API error (401 Unauthorized): invalid api key",+ crate::security::credentials::session_support::LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE+ );+ let classified = classify_inference_error(&raw);++ assert_eq!(classified.error_type, "auth_error");+ assert!(+ !classified.message.contains("local offline profile"),+ "must not blame the local profile for the BYO provider's key: {}",+ classified.message+ );+}++#[test]+fn classify_inference_error_the_refusal_alone_keeps_the_exhausted_chain_flag() {+ // The same refusal with nothing else in the chain is still ours, and the+ // aggregate metadata rides along instead of being dropped.+ let raw = format!(+ "All providers/models failed. Attempts: {}",+ crate::security::credentials::session_support::LOCAL_SESSION_MANAGED_INFERENCE_UNAVAILABLE+ );+ let classified = classify_inference_error(&raw);++ assert_eq!(+ classified.copy_key,+ "chat_error.local_session_managed_unavailable"+ );+ assert_eq!(classified.fallback_available, Some(false));+}diff --git a/crates/openhuman-core/src/web_chat/web_tests_error_copy_fixture_tests.rs b/crates/openhuman-core/src/web_chat/web_tests_error_copy_fixture_tests.rsindex 64d9068e89..5582ad38f5 100644--- a/crates/openhuman-core/src/web_chat/web_tests_error_copy_fixture_tests.rs+++ b/crates/openhuman-core/src/web_chat/web_tests_error_copy_fixture_tests.rs@@ -28,6 +28,7 @@ const EXPECTED: &[()] = &[("codex_expired", "Codex authentication token is expired; sign in again", "provider_error", "auth", false, None, Some("openai_codex"), None, "Your Codex session has expired. Please reconnect it in Settings → Integrations."),("session_expired", "SESSION_EXPIRED", "session_expired", "auth", false, None, None, None, "Your OpenHuman session has expired. Please sign in again to continue."),+ ("local_session_managed", "BACKEND_UNAVAILABLE: managed inference is unavailable for the offline local session", "auth_error", "config", false, None, None, None, "You're on the local offline profile, which has no OpenHuman account behind it, so the managed (cloud) model can't run. Sign in to use managed models, or switch routing to \"Use Your Own Models\" in Connections → API keys → LLM and add your own provider."),("action_budget", "Action blocked: rate limit exceeded for tool curl", "action_budget_exceeded", "openhuman_budget", true, None, None, None, "You've hit OpenHuman's per-hour action budget — this is a local safety cap, not your AI provider. The window decays gradually; you can keep chatting in this thread and tool-heavy steps will resume as the budget refills."),("max_iterations", "Agent exceeded maximum tool iterations (10)", "max_iterations", "agent_loop", true, None, None, None, "The agent ran the maximum number of tool steps for one turn without finishing. This usually means a tool kept failing (often a rate limit on a web fetch). You can retry the same question in this thread once the underlying limit clears."),("turn_timeout_marker", "openhuman_turn_wall_clock_timeout: agent turn exceeded its 600s wall-clock budget", "turn_timeout", "agent_loop", true, None, None, None, "This turn ran past its time budget without finishing and was stopped so it wouldn't hang. This usually means a tool call or a delegated sub-agent stalled. You can retry your question in this thread."),@@ -67,7 +68,7 @@ const EXPECTED: &[(#[test]fn every_failure_class_keeps_its_exact_copy_and_wire_values() {- assert_eq!(EXPECTED.len(), 37, "fixture row count drifted");+ assert_eq!(EXPECTED.len(), 38, "fixture row count drifted");for (case, input, error_type, source, retryable, retry_after_ms, provider, fallback, message) inEXPECTED{@@ -316,6 +317,11 @@ const EXPECTED_COPY_KEYS: &[(&str, &str, &str)] = &[r#"{"provider":"openai_codex"}"#,),("session_expired", "chat_error.session_expired", "null"),+ (+ "local_session_managed",+ "chat_error.local_session_managed_unavailable",+ "null",+ ),("action_budget", "chat_error.action_budget", "null"),("max_iterations", "chat_error.max_iterations", "null"),("turn_timeout_marker", "chat_error.turn_timeout", "null"),diff --git a/crates/openhuman-embed/README.md b/crates/openhuman-embed/README.mdindex d4f9a2b42b..88c9597b0d 100644--- a/crates/openhuman-embed/README.md+++ b/crates/openhuman-embed/README.md@@ -59,11 +59,22 @@ The library API. Initialize one runtime (features, services, backend URL,the TinyHumans API key), then instantiate agents on it, each fully describedand independent of the others:+For hosted TinyHumans inference and services, use+[`openhuman_tinyhumans::RuntimeBuilder`](../openhuman-tinyhumans/README.md),+which binds the backend transport during startup. The+[minimal library recipe](../../docs/library-minimal-recipe.md) covers the+dependency and feature selection. The plain embed builder supports standalone+hosts with their own providers; hosted requests require an installed transport+and otherwise return `BACKEND_UNAVAILABLE:`.+```rust,no_run-use openhuman_embed::{Access, AgentSpec, McpServer, Provider, Runtime, Workspace};+use openhuman_tinyhumans::{+ embed::{Access, AgentSpec, McpServer, Provider, Workspace},+ RuntimeBuilder,+};# async fn demo() -> Result<(), Box<dyn std::error::Error>> {-let runtime = Runtime::builder()+let runtime = RuntimeBuilder::new().workspace(Workspace::dir("/var/lib/my-product/openhuman")).api_key("th_live_…") // the only credential in library mode.build()@@ -271,7 +282,7 @@ are documented rather than hidden; each is a candidate follow-up in the core.- `autonomy.auto_approve` / `auto_approve_all` and the memory guard'sautonomy tier come from the runtime's boot config (`security::live_policy`),- not the agent's. Path and command policy *do* use the agent's own tier.+ not the agent's. Path and command policy _do_ use the agent's own tier.- The approval gate is on or off process-wide; parked approvals are notlabelled with the agent id. A per-agent "no approvals" is `Access::full()`,whose `TrustedAutomation` origin the gate honours per turn.@@ -289,15 +300,15 @@ are documented rather than hidden; each is a candidate follow-up in the core.registry; `[[mcp_client.servers]]` declared through `AgentSpec::mcp` areper agent. The host-seeded documentation server is visible to every agent.- `install_skill` / `create_skill` still write to `~/.openhuman`. With- `include_user_skills(false)` (the default) an agent does not *discover* the+ `include_user_skills(false)` (the default) an agent does not _discover_ theoperator's skills, but an install by the agent lands there.- One API key (or session) is shared by all agents.-- `IntegrationClient` (backend-proxied Composio/search/media tools) only- ever reads the app-session JWT- (`security::credentials::session_support::get_session_token`), never the- runtime's API key. A library runtime that authenticates with only- `.api_key(...)` gets no integration tools at all rather than the key- being sent as the wrong header.+- `IntegrationClient` (backend-proxied Composio/search/media tools) accepts+ the runtime's TinyHumans API key or an app-session JWT through+ `security::credentials::session_support::resolve_backend_credential`.+ API keys use `x-api-key`; session JWTs use `Authorization: Bearer`.+ With the backend transport installed and the integration feature and runtime+ gates enabled, an API-key-only runtime can register integration tools.Other invariants worth knowing before wiring any entry point:@@ -306,7 +317,7 @@ Other invariants worth knowing before wiring any entry point:auth profiles and the keyring file resolve beside `config_path`, so aworkspace-only override reads the operator's real credentials. `Runtime`and `Harness` set both for `Workspace::Ephemeral` and `Workspace::Dir`.-- A turn runs under the access tier *and* the turn origin. `Access::full()`+- A turn runs under the access tier _and_ the turn origin. `Access::full()`sets both (`AutonomyLevel::Full` plus a `TrustedAutomation` origin);`Access::readonly()` and `Access::supervised()` set no origin and leave theapproval gate on.diff --git a/crates/openhuman-tui/src/runner.rs b/crates/openhuman-tui/src/runner.rsindex 24f686ab58..a95d526224 100644--- a/crates/openhuman-tui/src/runner.rs+++ b/crates/openhuman-tui/src/runner.rs@@ -28,7 +28,6 @@ use openhuman_core::core::types::HostKind;pub fn run_from_cli(args: &[String]) -> anyhow::Result<()> {openhuman_core::core::cli::load_dotenv_for_cli()?;openhuman_core::platform::service::apply_startup_restart_delay_from_env();- openhuman_core::security::keyring::init_master_key();let mut thread_id: Option<String> = None;let mut force_new = false;@@ -109,6 +108,9 @@ pub fn run_from_cli(args: &[String]) -> anyhow::Result<()> {// File-only logging — never stderr while the TUI owns the terminal.let data_dir = resolve_data_dir();let log_dir = openhuman_core::core::logging::init_for_tui(&data_dir, verbose);+ // After argument parsing so `--help` works while a configured master key+ // is being fixed, and after logging so a rejection reaches the log file.+ openhuman_core::security::keyring::init_master_key().map_err(anyhow::Error::msg)?;log::info!("[tui] starting tabbed terminal UI (thread={:?} new={} logs={:?})",thread_id,diff --git a/docs/JAPANESE-UI-VALIDATION.md b/docs/JAPANESE-UI-VALIDATION.mdnew file mode 100644index 0000000000..6c03652dd0--- /dev/null+++ b/docs/JAPANESE-UI-VALIDATION.md@@ -0,0 +1,138 @@+# Japanese UI validation++Validation performed on 2026-10-04, then repeated after merging upstream+`9c475c174ca5506f67ed471ec34ef14617316122` and refreshing the Japanese memory+lifecycle strings at `c261b29e6ac5eabb00c84fb7d87554632d0982d7`.+The final locale has 4,541 keys, with no missing or extra keys and no English+leak findings. The repeat native build and standalone remote Core use that+application source. Later CI repairs also change Core behavior as described+below; the native observations above belong to the recorded application revision.+The remote Core binary's SHA-256 matched the local build:+`fe82c895bb33d3e6b595345ee6c7284c0217a164c8b4ff48b4442c5d0466b6fb`.++## Automated browser E2E++`app/test/playwright/specs/japanese-locale.spec.ts` imports the shared suite in+`app/test/e2e/specs/japanese-locale.browser.ts`. The existing Playwright web lane+discovers the wrapper. Run the focused suite with the repository's mock backend+and standalone Core:++```sh+pnpm --filter openhuman-app test:e2e:web:build+bash app/scripts/e2e-web-session.sh test/playwright/specs/japanese-locale.spec.ts+```++All three tests passed again on the refreshed source (4.4 seconds):++- Select 日本語 through Settings, verify Japanese Chat labels and `html[lang=ja]`,+ reload and verify persistence, then select English and reload again.+- Start a fresh `ja-JP` browser context, verify automatic Japanese selection,+ and verify that a saved English choice wins after reload.+- At 1280×720, navigate to Memory v2 Explorer and Token Usage. Verify `7件`,+ `Qwen3.8-Flash-Next`, and `3 回の圧縮で` replace the interpolation tokens and+ remain visible. Only data-dependent read RPC results are fixtures; locale+ changes, storage, navigation and authentication use the shared Core harness.++E2E TypeScript, ESLint, Prettier and the coverage-matrix guard passed. Using Node+24, the focused LanguageSelect, localeSlice, i18n and attachment suites passed+150 tests. A prior run with mixed Node versions failed one gzip attachment test;+that failure disappeared when the runtime matched CI.++## Native macOS smoke++Built the production frontend and unsigned debug `.app` with the PR's pinned+Rust toolchain and recursive submodules. Used a separate application identifier+and disposable workspace, leaving the installed app and production memory+intact. No WebDriver or mocked model was used for these native checks.++Observed:++- Fresh first-run UI displayed 日本語 in the language/runtime picker.+- Settings, Chat, Connections, Memory v2 and Gateway labels rendered in Japanese.+- After the upstream refresh, the new Brain, Background and Memory Settings tabs+ rendered their Japanese headings, descriptions, controls and empty states.+- Settings switched Japanese → English → Japanese immediately.+- Actual app quit/relaunch checks preserved English and Japanese.+- The remote Core connection test succeeded over an SSH loopback tunnel.+- The Japanese routing dialog tested a custom OpenAI-compatible provider through+ the real model router and received `Hello! How can I help you today?` from+ Qwen3.8-Flash-Next. The provider and model name were visible in the response.+- After assigning that custom provider to Chat, a new native conversation sent+ a Japanese request for `17×19` and streamed the correct answer `323`.+ The UI → remote Core → actual router → model → UI path completed.+ After another quit/relaunch, both Japanese labels and that conversation+ remained visible. The upstream-refresh repeat used a newly created conversation+ and again returned `323`, then preserved that conversation after quit/relaunch.++## Integration limits++The existing production Core rejected the new UI's `reasoning_effort` parameter+on `channel.web_chat`. Therefore the native smoke used a separately built Core+at the same revision, running on the remote Mac Studio with isolated data.+Production Core and memory were not upgraded or migrated.++The legacy `local-openai` agent path reached the actual model but did not complete+a simple arithmetic request: its main wire request contained a synthetic+`Continue with the task described above.` user turn and the model attempted+unrelated tools. That legacy-path run was unsuccessful. The same real+endpoint configured through the current custom-provider UI did complete the+native chat E2E above; production routing was not changed. The isolated Memory+service was not configured, so Memory Explorer+showed its connection error; successful item/count rendering is covered by the+browser fixture test above. No iOS or Android native smoke was performed.++## Upstream integration checks++The upstream memory lifecycle update added 111 English keys and removed 30;+Japanese was refreshed to the same set rather than hiding coverage failures.+The same update reduced the Linux `flows` dependency graph to 332 packages,+311 names and 3 native dependencies. Both the kernel-floor ratchet and dep-sim+calibration were tightened to that measured graph and passed with+`CARGO_BUILD_TARGET=x86_64-unknown-linux-gnu`. The native app lockfile was aligned+to the pinned tinymemory 1.23.1 path crates. A fresh build cache avoided stale+Rust metadata from the earlier dependency graph; both the native bundle and+standalone Core built successfully. Production data remained untouched.++The enabled Rust lanes also exposed two stale upstream static baselines. The+agent-runtime boundary inventory now contains 204 exact entries (previously+205): seven obsolete fingerprints were removed and six were verified against+unchanged upstream Core source. They reflect moved integration/builder code,+a revised user-origin check, and two existing memory task-local accesses; no+Core implementation or checker rule was changed. The ignored-test caps were+tightened from 17 to 8 for Core and 15 to 14 for the top-level tests because+upstream removed their old ignored tests. Both exact-inventory guards passed.++## Repairs for the latest upstream CI failures++The hosted run on `8fae68aa6156457ec440ac5e373b3452566f194f` passed+frontend/static, Rust lint and Tauri, but failed seven Core coverage suites.+The following repairs preserve the original test assertions:++- Install the pinned pnpm workspace dependencies in the independent Rust+ coverage job. Its Memory integration fixture imports `ws`; without the+ install, the backend exits before its health endpoint starts.+- Update the Memory RPC catalogue and reachability tests to the current+ controller contract; explicitly assert that retired read methods are unknown.+- Give vision-delegation fixtures an actual inline PNG, as required by the+ production dispatcher. Request-count and child-response assertions remain.+- Point the Composio fixture at the resolved workspace directory and continue+ checking that its scope file exists.+- Align the test-only agent handler's stack with CI's 64 MiB test stack;+ its instrumented Discord full-pipeline test overflowed at both 8 and 16 MiB.+- Wire the existing iteration-cap resolver into the factory so explicit+ overrides are honored. Both cap-reporting/error integration tests pass.+- Preserve permanent attachments during tool-surface refresh and add their+ names to the session definition's extra tool scope. This fixes their omission+ from the native provider wire for named scopes. All three attached-tool+ integration tests pass, including clones and session resume.++These repairs were verified in an isolated x86_64 Ubuntu 22.04 container on+an Apple Silicon Mac Studio using the exact hosted CI image digest+`sha256:c3c20d625bcc9f75e50c3c2c2b75c88d3e60a3f4352b0f19f5327b490438722d`.+The VM has no host mounts and the container has no published ports or production+credentials. Node 24.21.0, pnpm 10.10.0 and Rust 1.96.1 were used. The complete+Node script suite passes (471 passed, one existing skip), as do the targeted+Memory, Composio, delegation, attached-tools and Discord coverage tests.+MacBook Core/CLI/Tauri Clippy passes with warnings denied. Full Rust coverage+and the new GitHub run are being checked separately; targeted passes do not+establish a green final CI gate.diff --git a/docs/README.ar.md b/docs/README.ar.mdnew file mode 100644index 0000000000..ab8688ef47--- /dev/null+++ b/docs/README.ar.md@@ -0,0 +1,242 @@+<div dir="ltr">++<h1 align="center">OpenHuman</h1>++<p align="center">+ <img src="../gitbooks/.gitbook/assets/demo.png" alt="العرض التوضيحي" />+</p>++<p align="center" style="display: inline-block">+ <a href="https://trendshift.io/repositories/23680" target="_blank" style="display: inline-block">+ <img src="https://trendshift.io/api/badge/repositories/23680" alt="tinyhumansai%2Fopenhuman | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/>+ </a>+ <a href="https://www.producthunt.com/products/openhuman?embed=true&utm_source=badge-top-post-badge&utm_medium=badge&utm_campaign=badge-openhuman" target="_blank" rel="noopener noreferrer">+ <img alt="OpenHuman - An open source AI harness built with the human in mind | Product Hunt" width="250" height="54" src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=1136902&theme=light&period=daily&t=1778916022823">+ </a>+ <a href="https://www.producthunt.com/products/openhuman?embed=true&utm_source=badge-top-post-badge&utm_medium=badge&utm_campaign=badge-openhuman" target="_blank" rel="noopener noreferrer">+ <img alt="OpenHuman - An open source AI harness built with the human in mind | Product Hunt" width="250" height="54" src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=1136902&theme=light&period=weekly&t=1779351403565">+ </a>+</p>+<p align="center" style="display: inline-block">+ <a href="https://www.producthunt.com/products/openhuman?embed=true&utm_source=badge-top-post-topic-badge&utm_medium=badge&utm_campaign=badge-openhuman" target="_blank" rel="noopener noreferrer">+ <img alt="OpenHuman - An open source AI harness built with the human in mind | Product Hunt" width="250" height="54" src="https://api.producthunt.com/widgets/embed-image/v1/top-post-topic-badge.svg?post_id=1136902&theme=light&period=weekly&topic_id=268&t=1779351808756">+ </a>+ <a href="https://www.producthunt.com/products/openhuman?embed=true&utm_source=badge-top-post-topic-badge&utm_medium=badge&utm_campaign=badge-openhuman" target="_blank" rel="noopener noreferrer">+ <img alt="OpenHuman - An open source AI harness built with the human in mind | Product Hunt" width="250" height="54" src="https://api.producthunt.com/widgets/embed-image/v1/top-post-topic-badge.svg?post_id=1136902&theme=light&period=weekly&topic_id=46&t=1779351808756">+ </a>+</p>++</div>++<div dir="rtl" lang="ar">++<p align="center">+ <strong>منظومة وكلاء ذكاء اصطناعي مفتوحة المصدر بنواة مكتوبة بلغة Rust: خفيفة، معيارية، وقابلة للتوصيل بأي نموذج لغوي كبير (LLM)، أو محرك ذاكرة، أو محرك بحث تستخدمه حالياً.</strong>+</p>++<p align="center">+ <a href="https://github.com/tinyhumansai/openhuman/discussions">النقاشات</a> •+ <a href="https://guild.tinyhumans.ai/">Discord</a> •+ <a href="https://www.reddit.com/r/tinyhumansai/">Reddit</a> •+ <a href="https://x.com/intent/follow?screen_name=tinyhumansai">X/تويتر</a> •+ <a href="https://tinyhumans.gitbook.io/openhuman/">المستندات</a> •+ <a href="https://x.com/intent/follow?screen_name=senamakel">متابعة @senamakel (المؤسس)</a>+</p>++</div>++<div dir="ltr">++<p align="center">+ 🇺🇸 <a href="../README.md">English</a> | 🇸🇦 <a href="./README.ar.md">العربية</a> | 🇨🇳 <a href="./README.zh-CN.md">简体中文</a> | 🇯🇵 <a href="./README.ja-JP.md">日本語</a> | 🇰🇷 <a href="./README.ko.md">한국어</a> | 🇩🇪 <a href="./README.de.md">Deutsch</a> | 🇹🇷 <a href="./README.tr.md">Türkçe</a> | 🇵🇰 <a href="./README.ur-pk.md">اردو</a>+</p>++<p align="center">+ <img src="https://img.shields.io/badge/status-early%20beta-orange" alt="Early Beta" />+ <a href="https://github.com/tinyhumansai/openhuman/releases/latest"><img src="https://img.shields.io/github/v/release/tinyhumansai/openhuman?label=latest" alt="Latest Release" /></a>+ <a href="https://github.com/tinyhumansai/openhuman/stargazers"><img src="https://img.shields.io/github/stars/tinyhumansai/openhuman?style=flat" alt="GitHub Stars" /></a>+ <a href="../LICENSE"><img src="https://img.shields.io/github/license/tinyhumansai/openhuman" alt="License" /></a>+</p>++</div>++<div dir="rtl" lang="ar">++> **إصدار تجريبي أولي (Early Beta)**: قيد التطوير النشط المستمر. قد تواجه بعض الجوانب غير المكتملة.++> خلال أسبوع واحد فقط من الإطلاق، تصدر مستودع OpenHuman المركز الأول في قائمة المستودعات الأكثر رواجاً (Trending) على GitHub لمدة تسعة أيام متتالية.++# التثبيت++حمّل مثبتات التطبيق من [tinyhumans.ai/openhuman](https://tinyhumans.ai/openhuman?utm_source=github&utm_medium=readme) أو من صفحة [إصدارات GitHub](https://github.com/tinyhumansai/openhuman/releases/latest).++للتثبيت عبر سطر الأوامر (Homebrew و Debian/Ubuntu `.deb` و AUR ونصوص التثبيت وملاحظات المنصات)، راجع **[INSTALL.md](../INSTALL.md)**.++---++# الميزات الرئيسية++## نواة Rust فائقة السرعة++النواة مبنية بالكامل بلغة Rust مع استهلاك منخفض جداً للذاكرة وسرعة استجابة فائقة. تضمن لك إدارة الموارد بكفاءة، وأمان خيوط المعالجة، والعمل دون أي اعتماديات ثقيلة.++## ذاكرة دائمة واسترجاع ذكي++> يقوم OpenHuman بفهرسة المستندات والمحادثات والمعارف المكتسبة في محرك الذاكرة، ويجيب على الأسئلة مع ذكر المصادر والاقتباسات بدقة.++يتجاوز OpenHuman مرحلة الانتظار أو الإعداد المطول. أضف مصادرك (مجلدات، ملفات، روابط، مستودعات GitHub، موجزات RSS، وتطبيقات متصلة)، ثم اضبط جدول المزامنة، وسيجيب الوكيل بالاعتماد على [الذاكرة](../gitbooks/features/memory.md) مباشرة.++بمزامنة واحدة، يمتلك الوكيل سياقاً كاملاً وموجزاً لبريدك الوارد، وتقويمك، ومستودعاتك، ومستنداتك، ورسائلك. لا حاجة لأسابيع من التدريب، إنه يعمل تحت سيطرتك التامة وفوراً.++## منسق عمليات متكامل وليس مجرد روبوت محادثة++معظم أطر عمل الوكلاء تدير وكيلاً واحداً في حلقة تكرارية بسيطة. بينما OpenHuman هو **[منسق عمليات (Orchestrator)](https://tinyhumans.gitbook.io/openhuman/features/orchestration)** متكامل:++<p align="center">+ <img src="../gitbooks/.gitbook/assets/orchestration.png" alt="مخطط التنسيق في OpenHuman">+</p>++> الرسائل بين الوكلاء مشفرة طرفاً لطرف عبر بروتوكول Signal، ما يتيح لك ربط أي أداة (Claude Code و Codex و OpenClaw و Hermes) وتنسيق جميع وكلائك وأدواتك بسلاسة وأمان.++- **رسم بياني بدلاً من الحلقات**: تعمل كل جولة محادثة كرسم بياني مع نقاط حفظ وتفتيش عبر [tinyagents](https://github.com/tinyhumansai/tinyagents)، يمكن إيقافها مؤقتاً لطلب موافقة بشرية، وتستمر بعد إعادة تشغيل النظام، وتستأنف من منتصف التنفيذ.+- **أسطول من الوكلاء الفرعيين المتخصصين**: يمكن للوكلاء التفريع حتى ثلاثة مستويات؛ والوكيل الذي يتعثر يتحول إلى تقرير للأسباب الجذرية.+- **تواصل مشفر طرفاً لطرف بين الوكلاء**: تتواصل النسخ وتنسق المهام فيما بينها عبر جلسات E2E ببروتوكول Signal، مع دعم مدفوعات x402. لا يمكن لأي خادم وسيط قراءة النصوص الصريحة.++## مسارات عمل مرئية (Workflows)++مستوحاة من n8n و Zapier، تنقل [مسارات العمل](https://tinyhumans.gitbook.io/openhuman/features/workflows) الأتمتة المرئية القائمة على المحفزات إلى وكلائك. والفرق الجوهري: الوكلاء هم من يبنونها لك. اطلب من الوكيل أتمتة معينة، وسيقترح عليك رسماً بيانياً عبر [tinyflows](https://github.com/tinyhumansai/tinyflows) يمكنك مراجعته وتعديله على لوحة مرئية قبل الحفظ.++<p align="center">+ <img src="../gitbooks/.gitbook/assets/workflows.png" alt="لوحة مسارات عمل OpenHuman">+</p>++> يقترح الوكيل مسار العمل؛ وتراجعه وتعتمد حفظه على اللوحة التفاعلية.++مسارات العمل المحفوظة دائمة وتعمل بالمحفزات: تُطلق بمهام Cron المجدولة، أو الـ Webhooks، أو أحداث القنوات، وتستمر عبر عمليات إعادة التشغيل، وتضع الإجراءات المؤثرة خلف بوابات موافقة صريحة.++## مكتبة بلغة Rust++تعتبر حزمة `openhuman-embed` الواجهة المكتوبة لتضمين النواة مباشرة داخل عملية Rust أخرى: نسخة `Runtime` واحدة لكل عملية، ثم أي عدد من وكلاء `Agent` المستقلين، لكل منهم المزود ومستوى الوصول ودليل العمل وخوادم MCP والمهارات والموجه وبيئة العزل الخاصة به (فعّل ميزة `mcp` في `openhuman-embed` لاستخدام `McpServer`). الكود أدناه مأخوذ مباشرة من [`crates/openhuman-embed/README.md`](../crates/openhuman-embed/README.md):++</div>++<div dir="ltr">++```rust+use openhuman_embed::{Access, AgentSpec, McpServer, Provider, Runtime, Workspace};++let runtime = Runtime::builder()+ .workspace(Workspace::dir("/var/lib/my-product/openhuman"))+ .api_key("th_live_…") // runtime/backend credential for hosted services+ .build()+ .await?;++let reviewer = runtime.agent(+ AgentSpec::new("reviewer")+ .system_prompt("You review pull requests and never edit files.")+ .access(Access::readonly())+ .skills_dir("./skills/review") // copied into this agent's own skills root+ .action_dir("/srv/checkouts/pr-42"),+)?;++let fixer = runtime.agent(+ AgentSpec::new("fixer")+ .provider(Provider::openai_compatible("https://api.example/v1", "sk-…").model("gpt-5"))+ .access(Access::supervised())+ .mcp(McpServer::stdio("github", "gh-mcp", ["stdio"]))+ .action_dir("/srv/checkouts/pr-42"),+)?;++let review = reviewer.run("Summarise the risks in this change.").await?;+let fix = fixer+ .turn(format!("Address these findings:\n{}", review.reply))+ .send()+ .await?;+println!("{}", fix.reply);++// Continue a conversation with the same agent.+let again = fixer.turn("Now run the tests.").session(&fix.session_id).send().await?;+println!("{}", again.reply);+```++</div>++<div dir="rtl" lang="ar">++للاطلاع على التفاصيل والوصفات ذات الحجم الأدنى، راجع: [التضمين](../gitbooks/developing/embedding.md).++## مفتاح TinyHumans API موحد لكل شيء++يغطي مفتاح TinyHumans API الواحد استنتاج نماذج LLM المدارة (بما في ذلك الوصول إلى دليل نماذج OpenRouter)، والبحث على الويب، والتضمينات الشعاعية، وتوليد الوسائط، والتكاملات، والصوت، وترتيب Jev. مرره مرة واحدة برمجياً (`.api_key("th_...")`) أو كمتغير بيئة `OPENHUMAN_BACKEND_API_KEY`، وستعمل جميع هذه الخدمات فوراً. التفاصيل: [مفتاح TinyHumans API](../gitbooks/developing/tinyhumans-api-key.md).++## المصدر المفتوح++برنامج OpenHuman مرخص بموجب رخصة [GPL-3.0](../LICENSE).++## مقارنة OpenHuman مع المنظومات الأخرى++مقارنة رفيعة المستوى (المنتجات تتطور باستمرار، لذا يرجى التحقق من أحدث إصدارات كل جهة). صُمم OpenHuman **للحد من التشتت بين عدة مزودين**، والحفاظ على **معرفة مسارات العمل محلياً على الجهاز**، ومنح الوكيل **ذاكرة دائمة** لبياناتك وليس للدردشة فقط.++</div>++<div dir="ltr">++| | Claude Cowork | OpenClaw | Hermes Agent | OpenHuman |+| ---------------------- | ----------------- | ----------------- | ----------------- | -------------------------------------------------------------------------------------------------------- |+| **Open-source** | 🚫 Proprietary | ✅ MIT | ✅ MIT | ✅ GNU |+| **Simple to start** | ✅ Desktop + CLI | ⚠️ Terminal-first | ⚠️ Terminal-first | ✅ Clean UI, minutes |+| **Cost** | ⚠️ Sub + add-ons | ⚠️ BYO models | ⚠️ BYO models | ✅ One sub + TokenJuice |+| **Memory** | ✅ Chat-scoped | ⚠️ Plugin-reliant | ✅ Self-learning | 🚀 Pluggable engine (hosted TinyHumans or your CortexDB), recall before every turn, citations |+| **Integrations** | ⚠️ Few connectors | ⚠️ BYO | ⚠️ BYO | 🚀 100+ OAuth · 5k+ MCP · 90k+ Skills |+| **Source sync** | 🚫 None | 🚫 None | 🚫 None | ✅ Scheduled sync of folders, repos, feeds and apps into memory |+| **Orchestration** | ⚠️ Sub-tasks | ⚠️ Single loop | ⚠️ Single loop | 🚀 Agent graphs + checkpoints + E2E-encrypted A2A |+| **Workflows** | 🚫 None | ⚠️ Scripts | ⚠️ Scripts | 🚀 Visual, durable, agent-proposed, approval-gated |+| **Meetings** | 🚫 None | 🚫 None | 🚫 None | 🚀 Joins Meet/Zoom/Teams/Webex, speaks, live transcript |+| **Messaging channels** | 🚫 None | ⚠️ A few | ⚠️ A few | ✅ 15 incl. native email (IMAP/SMTP) |+| **Local-only mode** | 🚫 Cloud-only | ⚠️ BYO local | ⚠️ BYO local | ✅ One-switch enforced Privacy Mode |+| **Observability** | 🚫 Opaque | ⚠️ Logs | ⚠️ Logs | ✅ Replayable run journals + per-call cost accounting |+| **API sprawl** | 🚫 Extra keys | 🚫 BYOK | 🚫 Multi-vendor | ✅ One account |+| **Model routing** | 🚫 Single model | ⚠️ Manual | ⚠️ Manual | ✅ Built-in |+| **Native tools** | ✅ Code-only | ✅ Code-only | ✅ Code-only | ✅ Code + search + scraper + browser + voice + media gen |++</div>++<div dir="rtl" lang="ar">++## المساهمة البرمجية من المصدر++مساهم جديد؟ ابدأ بـ [`CONTRIBUTING.md`](../CONTRIBUTING.md) للتعرف على مسار عمل التفريع (Fork) وطلبات الدمج (PR) وأوامر التحقق المحلية، أو استخدم موجه وكيل الذكاء الاصطناعي الجاهز في [`CONTRIBUTING-BEGINNERS.md`](./CONTRIBUTING-BEGINNERS.md#optional--let-an-ai-coding-agent-guide-you). الخطوات المختصرة:++1. ثبّت Git و Node.js 24+ و pnpm 10.10.0 و Rust 1.96.1 (`rustfmt` + `clippy`) و CMake و Ninja و ripgrep والمتطلبات الأساسية لبناء سطح المكتب لمنصتك.+2. قم بعمل Fork واستنسخ المستودع، ثم شغّل `git submodule update --init --recursive` قبل `pnpm install` حتى يتم حل اعتماديات Rust الداخلية ضمن `vendor/` (مثل tinyagents و tinyflows و tinychannels و tinymemory وغيرها).+3. استخدم `pnpm dev` للعمل على واجهة الويب فقط، أو `pnpm --filter openhuman-app dev:app` (على macOS) أو `pnpm dev:app:win` (على Windows) لغلاف سطح المكتب، ونفّذ عمليات الفحص الموجهة مثل `pnpm typecheck` و `pnpm format:check` و `cargo check -p openhuman --lib` قبل إنشاء طلب الدمج (PR).++تنقسم مساحة عمل Rust تحت `crates/` إلى `crates/openhuman-core` (الحزمة `openhuman`: النواة وأداة سطر الأوامر `openhuman-core`)، و `crates/openhuman-app` (غلاف سطح المكتب المبني بـ Tauri)، و `crates/openhuman-embed` (واجهة المكتبة للتضمين)، و `crates/openhuman-rpc` (عقود RPC المشتركة والعميل)، و `crates/openhuman-tui` (عميل الطرفية). راجع [بناء نواة Rust](../gitbooks/developing/building-rust-core.md) و [AGENTS.md](../AGENTS.md#repository-map) للاطلاع على الهيكل الكامل.++توثيق إضافي: [الهيكلية (Architecture)](https://tinyhumans.gitbook.io/openhuman/developing/architecture) · [إعداد بيئة العمل](https://tinyhumans.gitbook.io/openhuman/developing/getting-set-up) · [النشر السحابي](../gitbooks/features/cloud-deploy.md).++# ضع نجمة على GitHub++_ضع نجمة على المستودع لمتابعة جديد المشروع ومساعدة الآخرين في اكتشافه._++<p align="center">+ <a href="https://www.star-history.com/#tinyhumansai/openhuman&type=date&legend=top-left">+ <picture>+ <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=tinyhumansai/openhuman&type=date&theme=dark&legend=top-left" />+ <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=tinyhumansai/openhuman&type=date&legend=top-left" />+ <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=tinyhumansai/openhuman&type=date&legend=top-left" />+ </picture>+ </a>+</p>++# لوحة شرف المساهمين++ساهم معنا وانضم إلى لوحة الشرف. يحصل المساهمون على هدايا تذكارية مجانية ووصول خاص إلى مجتمعنا على [Discord](https://guild.tinyhumans.ai/).++<p align="center">+<a href="https://github.com/tinyhumansai/openhuman/graphs/contributors">+ <img src="https://contrib.rocks/image?repo=tinyhumansai/openhuman" alt="OpenHuman contributors" />+</a>+</p>++</div>diff --git a/docs/README.de.md b/docs/README.de.mdindex accfc9056d..3cd4bfb05a 100644--- a/docs/README.de.md+++ b/docs/README.de.md@@ -37,7 +37,7 @@</p><p align="center">- 🇺🇸 <a href="../README.md">English</a> | 🇨🇳 <a href="./README.zh-CN.md">简体中文</a> | 🇯🇵 <a href="./README.ja-JP.md">日本語</a> | 🇰🇷 <a href="./README.ko.md">한국어</a> | 🇩🇪 <a href="./README.de.md">Deutsch</a> | 🇹🇷 <a href="./README.tr.md">Türkçe</a> | 🇵🇰 <a href="./README.ur-pk.md">اردو</a>+ 🇺🇸 <a href="../README.md">English</a> | 🇸🇦 <a href="./README.ar.md">العربية</a> | 🇨🇳 <a href="./README.zh-CN.md">简体中文</a> | 🇯🇵 <a href="./README.ja-JP.md">日本語</a> | 🇰🇷 <a href="./README.ko.md">한국어</a> | 🇩🇪 <a href="./README.de.md">Deutsch</a> | 🇹🇷 <a href="./README.tr.md">Türkçe</a> | 🇵🇰 <a href="./README.ur-pk.md">اردو</a></p><p align="center">diff --git a/docs/README.ja-JP.md b/docs/README.ja-JP.mdindex 1e131ad2c4..2091ad78ff 100644--- a/docs/README.ja-JP.md+++ b/docs/README.ja-JP.md@@ -37,7 +37,7 @@</p><p align="center">- 🇺🇸 <a href="../README.md">English</a> | 🇨🇳 <a href="./README.zh-CN.md">简体中文</a> | 🇯🇵 <a href="./README.ja-JP.md">日本語</a> | 🇰🇷 <a href="./README.ko.md">한국어</a> | 🇩🇪 <a href="./README.de.md">Deutsch</a> | 🇹🇷 <a href="./README.tr.md">Türkçe</a> | 🇵🇰 <a href="./README.ur-pk.md">اردو</a>+ 🇺🇸 <a href="../README.md">English</a> | 🇸🇦 <a href="./README.ar.md">العربية</a> | 🇨🇳 <a href="./README.zh-CN.md">简体中文</a> | 🇯🇵 <a href="./README.ja-JP.md">日本語</a> | 🇰🇷 <a href="./README.ko.md">한국어</a> | 🇩🇪 <a href="./README.de.md">Deutsch</a> | 🇹🇷 <a href="./README.tr.md">Türkçe</a> | 🇵🇰 <a href="./README.ur-pk.md">اردو</a></p><p align="center">diff --git a/docs/README.ko.md b/docs/README.ko.mdindex cab85e4446..c2c8df0c3c 100644--- a/docs/README.ko.md+++ b/docs/README.ko.md@@ -37,7 +37,7 @@</p><p align="center">- 🇺🇸 <a href="../README.md">English</a> | 🇨🇳 <a href="./README.zh-CN.md">简体中文</a> | 🇯🇵 <a href="./README.ja-JP.md">日本語</a> | 🇰🇷 <a href="./README.ko.md">한국어</a> | 🇩🇪 <a href="./README.de.md">Deutsch</a> | 🇹🇷 <a href="./README.tr.md">Türkçe</a> | 🇵🇰 <a href="./README.ur-pk.md">اردو</a>+ 🇺🇸 <a href="../README.md">English</a> | 🇸🇦 <a href="./README.ar.md">العربية</a> | 🇨🇳 <a href="./README.zh-CN.md">简体中文</a> | 🇯🇵 <a href="./README.ja-JP.md">日本語</a> | 🇰🇷 <a href="./README.ko.md">한국어</a> | 🇩🇪 <a href="./README.de.md">Deutsch</a> | 🇹🇷 <a href="./README.tr.md">Türkçe</a> | 🇵🇰 <a href="./README.ur-pk.md">اردو</a></p><p align="center">diff --git a/docs/README.tr.md b/docs/README.tr.mdindex 5fa4f25799..787f2cf949 100644--- a/docs/README.tr.md+++ b/docs/README.tr.md@@ -38,7 +38,7 @@</p><p align="center">- 🇺🇸 <a href="../README.md">English</a> | 🇨🇳 <a href="./README.zh-CN.md">简体中文</a> | 🇯🇵 <a href="./README.ja-JP.md">日本語</a> | 🇰🇷 <a href="./README.ko.md">한국어</a> | 🇩🇪 <a href="./README.de.md">Deutsch</a> | 🇹🇷 <a href="./README.tr.md">Türkçe</a> | 🇵🇰 <a href="./README.ur-pk.md">اردو</a>+ 🇺🇸 <a href="../README.md">English</a> | 🇸🇦 <a href="./README.ar.md">العربية</a> | 🇨🇳 <a href="./README.zh-CN.md">简体中文</a> | 🇯🇵 <a href="./README.ja-JP.md">日本語</a> | 🇰🇷 <a href="./README.ko.md">한국어</a> | 🇩🇪 <a href="./README.de.md">Deutsch</a> | 🇹🇷 <a href="./README.tr.md">Türkçe</a> | 🇵🇰 <a href="./README.ur-pk.md">اردو</a></p><p align="center">diff --git a/docs/README.ur-pk.md b/docs/README.ur-pk.mdindex cb0dd7b3a1..922cfbc508 100644--- a/docs/README.ur-pk.md+++ b/docs/README.ur-pk.md@@ -47,7 +47,7 @@<div dir="ltr"><p align="center">- 🇺🇸 <a href="../README.md">English</a> | 🇨🇳 <a href="./README.zh-CN.md">简体中文</a> | 🇯🇵 <a href="./README.ja-JP.md">日本語</a> | 🇰🇷 <a href="./README.ko.md">한국어</a> | 🇩🇪 <a href="./README.de.md">Deutsch</a> | 🇹🇷 <a href="./README.tr.md">Türkçe</a> | 🇵🇰 <a href="./README.ur-pk.md">اردو</a>+ 🇺🇸 <a href="../README.md">English</a> | 🇸🇦 <a href="./README.ar.md">العربية</a> | 🇨🇳 <a href="./README.zh-CN.md">简体中文</a> | 🇯🇵 <a href="./README.ja-JP.md">日本語</a> | 🇰🇷 <a href="./README.ko.md">한국어</a> | 🇩🇪 <a href="./README.de.md">Deutsch</a> | 🇹🇷 <a href="./README.tr.md">Türkçe</a> | 🇵🇰 <a href="./README.ur-pk.md">اردو</a></p><p align="center">diff --git a/docs/README.zh-CN.md b/docs/README.zh-CN.mdindex 9de05f128b..3a220e6b55 100644--- a/docs/README.zh-CN.md+++ b/docs/README.zh-CN.md@@ -37,7 +37,7 @@</p><p align="center">- 🇺🇸 <a href="../README.md">English</a> | 🇨🇳 <a href="./README.zh-CN.md">简体中文</a> | 🇯🇵 <a href="./README.ja-JP.md">日本語</a> | 🇰🇷 <a href="./README.ko.md">한국어</a> | 🇩🇪 <a href="./README.de.md">Deutsch</a> | 🇹🇷 <a href="./README.tr.md">Türkçe</a> | 🇵🇰 <a href="./README.ur-pk.md">اردو</a>+ 🇺🇸 <a href="../README.md">English</a> | 🇸🇦 <a href="./README.ar.md">العربية</a> | 🇨🇳 <a href="./README.zh-CN.md">简体中文</a> | 🇯🇵 <a href="./README.ja-JP.md">日本語</a> | 🇰🇷 <a href="./README.ko.md">한국어</a> | 🇩🇪 <a href="./README.de.md">Deutsch</a> | 🇹🇷 <a href="./README.tr.md">Türkçe</a> | 🇵🇰 <a href="./README.ur-pk.md">اردو</a></p><p align="center">diff --git a/docs/RELEASE-MANUAL-SMOKE.md b/docs/RELEASE-MANUAL-SMOKE.mdindex bc34249d4f..13d6422027 100644--- a/docs/RELEASE-MANUAL-SMOKE.md+++ b/docs/RELEASE-MANUAL-SMOKE.md@@ -20,6 +20,11 @@ This is the **only** acceptable substitute for a `🚫` row in [`TEST-COVERAGE-MApplies to every release, all platforms.+### Japanese UI++- [ ] **Japanese language selection** — In the first-run language picker and Settings → Language, select **🇯🇵 日本語**. Verify that the labels immediately become Japanese, then visit Chat, Connections → Memory, Connections → LLM, and Gateway. Restart and confirm the selected language is retained. Switch back to English and confirm the labels update again.+- [ ] **Japanese browser language** — With a fresh profile and browser language `ja-JP`, verify that Japanese is selected automatically. Check a message containing a count or model name: the value must appear in place of its placeholder and remain readable at the default window size.+### Conversation resume- [ ] **Default agent traces reach Langfuse** — With a signed-in staging test account, send a synthetic chat turn that spawns a subagent. Expected: the parent and child traces share one conversation session, include the intended input/output and model usage, and carry the authenticated user. Confirm `share_usage_data = false` stops export.@@ -64,6 +69,7 @@ Applies to every release, all platforms.- [ ] **Gatekeeper accepts the signed `.app` on first launch** — Double-click the `.app` from a fresh download (Quarantine attribute set). Expected: app opens without `"OpenHuman" cannot be opened because the developer cannot be verified` dialog. If it appears, the build is unsigned or the notarization stapler is missing.- [ ] **`codesign --verify --deep --strict <path-to-OpenHuman.app>` exits 0** — Run from terminal. Expected: no output, exit 0. Any `code object is not signed at all` or `invalid signature` output blocks the release.+- [ ] **Bundled native modules load from the installer bundle** — On a notarized build with the network disabled, start a chat and use a module-backed feature (e.g. web search, desktop control). Expected: the feature works, and the core log shows `[modules] loaded '<id>' from the installer bundle` for each module used, with no `could not be loaded from the installer bundle` errors. The release signer re-signs these libraries and re-pins their `modules.toml`; a mismatch makes tinybus refuse the module with no download fallback.- [ ] **DMG drag-to-Applications flow works** — Mount the `.dmg`, drag `OpenHuman.app` to the `Applications` alias. Expected: copy completes; eject succeeds; first launch from `/Applications` does not re-prompt Gatekeeper.- [ ] **Accessibility permission prompt fires on first agent run** — Trigger an agent action that uses Accessibility (e.g. window-control skill). Expected: macOS prompts `OpenHuman would like to control this computer using accessibility features`. Granting it allows the action; denying it surfaces a clear in-app fallback.- [ ] **Input Monitoring prompt fires on first hotkey use** — Press the registered global hotkey for the first time. Expected: `Input Monitoring` prompt; granting it makes the hotkey trigger; denying it does not crash the app.@@ -90,6 +96,8 @@ Applies to every release, all platforms.### Cross-platform+- [ ] **Chat model picker selects the provider as well as the model (#6938)** — In an isolated test profile, switch the same thread from managed to Ollama, then to a configured BYOK provider, and back to a managed catalog model (including a `:free` variant). Verify the actual request endpoint and model match each selection, configured background routes stay unchanged, and reopening the app restores the selected provider/model. Selecting a workload hint must retain its configured route.+- [ ] **Agent files land in a visible folder** — Ask the agent for a short document or deck. Expected: the file appears in `~/OpenHuman/projects/Files` under its title (not in `~/.openhuman`); **Show in folder** in the chat Files panel opens the file manager at it; Settings → Agent OS access → **Files folder** shows that path, **Show in folder** opens it, and choosing another folder sends the next file there while the earlier file still opens. On an upgraded install, files from before the upgrade have moved into the folder.- [ ] **Caller-owned inference works without an OpenHuman session** — In a local workspace without an OpenHuman login, configure Ollama/LM Studio/MLX/oMLX/local-openai or an independently authenticated Claude Code/Agent SDK provider. Run chat and an agent flow routed entirely to that provider. For a named harness agent, also configure the summarization route to managed inference and verify that the agent still uses its local route; reversing those routes must retain the managed agent's session requirement. Expected: no OpenHuman session requirement. Select managed inference instead: it must still require a backend session. With LocalOnly privacy enabled, local runtimes remain allowed and Claude subprocesses remain blocked as external inference.- [ ] **LocalOnly blocks remote search** — Configure a remote search provider and enable LocalOnly privacy. Invoke `web_search_tool` with a harmless query. Expected: the tool returns a policy-blocked result and does not dispatch to the provider. Switch privacy to Standard and confirm the same tool can complete.diff --git a/docs/TEST-COVERAGE-MATRIX.md b/docs/TEST-COVERAGE-MATRIX.mdindex d0257342e5..7181cb8a4d 100644--- a/docs/TEST-COVERAGE-MATRIX.md+++ b/docs/TEST-COVERAGE-MATRIX.md@@ -19,6 +19,7 @@ Canonical mapping of every product feature to its test source(s). Drives gap-fil| `RI` | Rust integration (`tests/*.rs`) || `VU` | Vitest unit (`app/src/**/*.test.ts(x)`) || `WD` | WDIO E2E (`app/test/e2e/specs/*.spec.ts`) — Linux `tauri-driver` + macOS Appium Mac2 |+| `PW` | Playwright browser E2E (`app/test/playwright/specs/*.spec.ts`) || `MS` | Manual smoke (release-cut checklist) |**Update contract** — when a PR adds, removes, or changes a feature leaf, the matrix row must be updated in the same PR. Tracking guard: see #965.@@ -336,7 +337,7 @@ End-to-end coverage of the agent harness via the web-chat RPC surface against an| 7.2.3 | TinyFish Integration Tools | RU | `vendor/tinysearch` provider tests, `crates/openhuman-core/src/modules/search/config_tests.rs`, `crates/openhuman-core/src/search/providers_tests.rs` | ✅ | TinyFish is a managed TinySearch provider serving the search and contents roles; host tests cover its managed-only route and usability; request mapping is tested in the module || 7.2.4 | Exa search (managed + BYOK) | RU+RI+VU | `vendor/tinysearch` provider tests, `crates/openhuman-core/src/modules/search/config_tests.rs`, `tests/raw_coverage/worker_b_raw_coverage_e2e.rs::tools_web_search_success_path_uses_backend_session_and_shapes_results`, `crates/openhuman-core/src/config/ops/search_tests.rs`, `app/src/components/settings/panels/SearchPanel.test.tsx` | ✅ | Managed Exa posts `{objective, searchQueries}` (no `mode`) to `/agent-integrations/exa/search` through the loaded TinySearch module against a local backend; direct Exa keeps its key private in the module configuration; the panel switches route and saves/clears the key || 7.2.5 | Tavily BYOK search + extract (direct API) | RU+RI+VU | `vendor/tinysearch` provider tests, `crates/openhuman-core/src/config/ops_loader_and_search_tests.rs` (`apply_search_settings_stores_and_clears_tavily_key`), `tests/in_process/config_auth_app_state_connectivity_e2e.rs`, `app/src/components/settings/panels/SearchPanel.test.tsx` | ✅ | Tavily serves the search and contents roles with the user's key; the key round-trips through the settings RPC and secret encryption and is never returned; clearing it drops Tavily from `effective_roles` |-| 7.2.6 | Multi-provider roles, fallback and grounded answers | RU+RI+VU | `crates/openhuman-core/src/search/{providers,render,tools,bus}_tests.rs`, `crates/openhuman-core/src/config/schema/tools/search_search_config_tests_tests.rs`, `crates/openhuman-core/src/agent/session_host/recorded_tools_tests.rs`, `crates/openhuman-core/src/mcp/server/tools_tests_params_and_specs_tests.rs`, `tests/raw_coverage/worker_b_raw_coverage_e2e.rs::tools_web_answer_uses_managed_gemini_grounding_and_returns_citations`, `app/src/components/settings/panels/SearchPanel.test.tsx`, `app/src/features/conversations/tools/parseWebSearchResult.test.ts` | ✅ | Several providers at once: one agent tool per role (`web_search_tool`, `web_answer_tool`, `web_contents_tool`) served by the first usable provider with fallback (module tests); managed providers need a session and refresh on `CredentialChanged`; managed Gemini grounding returns an answer with citations end to end; single-engine settings migrate on load and Parallel stays as an own-key-only provider; resumed threads keep recorded role tools; chat renders answers, citations and fallback |+| 7.2.6 | Multi-provider roles, fallback and grounded answers | RU+RI+VU+WD | `crates/openhuman-core/src/search/{providers,render,tools,bus}_tests.rs`, `crates/openhuman-core/src/config/schema/tools/search_search_config_tests_tests.rs`, `crates/openhuman-core/src/agent/session_host/recorded_tools_tests.rs`, `crates/openhuman-core/src/mcp/server/tools_tests_params_and_specs_tests.rs`, `tests/raw_coverage/worker_b_raw_coverage_e2e.rs::tools_web_answer_uses_managed_gemini_grounding_and_returns_citations`, `app/src/components/settings/panels/SearchPanel.test.tsx`, `app/src/features/conversations/tools/parseWebSearchResult.test.ts`, `app/test/e2e/specs/chip-tabs-keyboard.spec.ts` | ✅ | Several providers at once: one agent tool per role (`web_search_tool`, `web_answer_tool`, `web_contents_tool`) served by the first usable provider with fallback (module tests); managed providers need a session and refresh on `CredentialChanged`; managed Gemini grounding returns an answer with citations end to end; single-engine settings migrate on load and Parallel stays as an own-key-only provider; resumed threads keep recorded role tools; chat renders answers, citations and fallback || 7.2.8 | Backend socket connect deadline + reconnect diagnostics | RU | `crates/openhuman-core/src/platform/socket/ws_loop_deadline_tests.rs` (`connect_with_redirects_times_out_when_upgrade_never_answers`, `connect_timeout_is_not_tighter_than_a_handshake_read`, `ws_loop_reports_reconnecting_between_attempts`, `ws_loop_reconnects_after_ping_deadline_on_a_silent_server`), `crates/openhuman-core/src/core/observability_error_classification_network_tests.rs` (`classifies_socket_connect_deadline_as_network_unreachable`) (#6256) | ✅ | One connect attempt (DNS + TCP + TLS + upgrade) is bounded at 10 s per redirect hop and fails as the `operation timed out` transport shape the Sentry classifier demotes; the loop reports `reconnecting` between attempts and `disconnected` only when stopped; the ping-timeout warning carries connection age / EIO pings received / frames sent, and a handshake after an outage logs `Reconnected after …` || 7.2.7 | Connectivity chip — core↔hosted backend link | VU | `app/src/services/__tests__/coreHealthMonitor.test.ts`, `app/src/store/__tests__/connectivitySlice.test.ts`, `app/src/store/__tests__/connectivitySelectors.test.ts`, `app/src/components/__tests__/ConnectionIndicator.test.tsx` (#6256) | ✅ | `connectivity_diag.socket_state` + `socket_loop_active` are mirrored into `connectivity.hosted` by the health poll; with the loop alive, `connecting` / `reconnecting` / `disconnected` (server closed the namespace) render the amber `hosted-degraded` chip, ranked below every other channel; `socket_loop_active=false` or `uninitialized` collapse to `unknown` (no chip: signed out, local session, boot) unless `socket_loop_stopped_on_failure` says the loop exited on an unusable session, which renders `hosted-stopped` with "sign in again" copy; `error` (server error event on a live transport) is stored but is not a chip state; a degraded link selects the 5 s poll so recovery shows within seconds |@@ -367,7 +368,7 @@ Spec: `docs/specs/memory-v2.md` (host) and `vendor/tinymemory/docs/specs/memory-| 8.2.5 | Document sources: add, sync, list, remove | RU+RI+WD | `crates/openhuman-core/src/memory/sources/sync_tests.rs`, `crates/openhuman-core/src/memory/sources/composio_tests.rs`, `crates/openhuman-core/src/memory/sources/mod_tests.rs`, `tests/memory_v2_e2e.rs` (`sources_add_sync_list_and_remove`), `app/test/playwright/specs/memory-v2.spec.ts` | ✅ | folder, file, link, github, rss, composio || 8.2.6 | Folder-source path picker | RU+VU | `crates/openhuman-app/src/directory_picker.rs`, `app/src/utils/tauriCommands/directoryPicker.test.ts` | ✅ | || 8.2.7 | Pack preview (Ask tab) and brain views | RU+RI+WD | `crates/openhuman-core/src/memory/lifecycle/views_tests.rs`, `crates/openhuman-core/src/memory/brain_tests.rs`, `tests/memory_v2_e2e.rs`, `app/test/playwright/specs/memory-v2.spec.ts` | ✅ | No `context.md`; pack never persisted in the transcript |-| 8.2.8 | One-time import of previous (v1) memory | RU+RI+WD | `crates/openhuman-core/src/memory/import_tests.rs`, `tests/memory_v2_e2e.rs`, `app/test/playwright/specs/memory-v2.spec.ts` (`importing previous memory needs explicit consent`) | ✅ | Refused without consent |+| 8.2.8 | One-time import of previous (v1) memory | RU+RI+WD | `crates/openhuman-core/src/memory/import_tests.rs`, `tests/memory_v2_e2e.rs`, `app/test/playwright/specs/memory-v2.spec.ts` (`importing previous memory needs explicit consent`, `a stopped import resumes only after consent`), `app/src/components/memory/MemoryImportBanner.test.tsx` | ✅ | Refused without consent; stops (not skips) on exhausted credits or an unreachable engine (`exhausted_credits_stop_the_import_instead_of_skipping_everything`, `an_unreachable_engine_stops_the_import_and_a_retry_resumes_it`); the background job resumes an import the app quit during (`the_background_job_resumes_an_interrupted_import`), never while paused, including a pause mid-run (`nothing_resumes_while_background_work_is_paused`, `a_pause_that_lands_after_the_check_stops_the_run_at_the_next_batch`); a resume that cannot start is stopped, not retried (`an_automatic_resume_that_cannot_start_is_stopped_not_retried`); Resume button after an error, behind consent (`a stopped import resumes only after consent`) || 8.2.9 | MCP memory tools | RU | `crates/openhuman-core/src/mcp/server/tools/` | ✅ | `memory.recall`, `memory.fetch`, `memory.list`, `memory.learn`, `memory.forget` || 8.2.10 | Memory UI chips and legacy redirects | VU+WD | `app/src/components/memory/*.test.tsx`, `app/test/playwright/specs/memory-v2.spec.ts` | ✅ | Engine, Ask, Explorer, Learnings, Conversations, Brain, Background, Settings; `/brain` and `/settings/memory-engine` redirect |@@ -584,7 +585,7 @@ The thread JSONL store moved to `tinyagents_session::threads` (`vendor/tinyagent| 13.3.8 | Managed default model (one OpenRouter model for every managed workload) | RU+RI | `crates/openhuman-core/src/inference/provider/factory_route_resolution_tests.rs` (`resolve_model_for_hint_maps_every_managed_hint_to_the_default_model`, `resolve_model_for_hint_uses_the_pinned_managed_default`, `resolve_model_for_hint_treats_retired_tier_slugs_as_role_aliases`), `crates/openhuman-core/src/inference/provider/factory_crate_native_tests.rs`, `crates/openhuman-core/src/agent/triage/routing_tests.rs`, `crates/openhuman-core/src/agent/cost_tests.rs`, `crates/openhuman-core/src/platform/cost/route_tests.rs`, `crates/openhuman-core/src/config/migrations/retire_managed_tier_slugs_tests.rs`, `crates/openhuman-core/src/config/migrations/mod_tests.rs` (`run_pending_v12_to_v13_*`), `tests/json_rpc_e2e.rs` (routing cases, flows arc) | ✅ | The `chat-v1`/`agentic-v1`/… tier endpoints are retired: every managed workload role resolves to `config.default_model` when it names a catalog model, else `openrouter/deepseek/deepseek-v4-flash`; `hint:*` and retired slugs stay role aliases; migration 12→13 rewrites persisted slugs; cost classification and the flash price row || 13.3.9 | Routing page: Default model row + per-workload tables always shown; providers header action | VU | `app/src/components/settings/panels/__tests__/AIPanel.test.tsx` (`shows the per-workload routing tables directly, with no mode selector`, `pins a managed default model from the routing page`), `app/src/services/api/__tests__/aiSettingsApi.test.ts` (`sends default_model only when the pinned default model changed`), `app/src/components/settings/panels/ai/ProviderModelPickerDialog.test.tsx` | ✅ | No Managed / Own / Advanced selector; the Default model row opens the managed catalog picker (list, alphabetical, search filters models) and persists `default_model`; "Add provider" lives in the page header |-| 13.3.10 | Composer model pick is the global default | PW | `app/test/playwright/specs/chat-model-managed-catalog.spec.ts` (`a composer pick is the global default and survives a fresh page`) | 🟡 | **Was ✅ against a spec that does not run**: `chat-model-managed-catalog.spec.ts:142` is `test.describe.skip` with `TODO(#6395): rebuild these assertions around the picker’s native model select`. The claim is unasserted at every layer until #6395 lands. Partially backstopped meanwhile by 13.3.1’s new PW case, which pins the same `default_model` contract from the settings route rather than the composer pill. |+| 13.3.10 | Composer model pick is the global default | RU+RI+VU+PW | `app/test/playwright/specs/chat-model-managed-catalog.spec.ts` (`Managed OpenRouter catalog in the model picker`), `crates/openhuman-core/src/web_chat/session_routing_tests.rs`, `tests/json_rpc_e2e.rs`, `app/src/features/conversations/Conversations.processSourceCommand.test.tsx` | 🟡 | The managed catalog suite is active and covers catalog display and selection. Its individual `a composer pick is the global default and survives a fresh page` case remains `test.skip` under #6395, so persistence across a fresh page is not asserted by Playwright. Backend provider/model routing is covered by `web_chat::session::session_routing_tests` and `tests/json_rpc_e2e.rs`; composer send defaults, picker overrides, delayed clears, rejected clears, and draft restoration are covered by `Conversations.processSourceCommand.test.tsx`. || 13.3.11 | Skills page (Installed → Registry) with run/edit/remove controls | VU | `app/src/components/skills/__tests__/SkillsExplorerTab.test.tsx` | ✅ | Page-owned header + tabs in the MCP page's shape: installed rows with Run / Edit / Remove icon controls, Install from URL and New skill; registry rows with search, source filter and Install |### 13.4 Developer Options@@ -613,6 +614,12 @@ The thread JSONL store moved to `tinyagents_session::threads` (`vendor/tinyagent| 13.6.2 | Keyboard Shortcuts help directory (? / ⌘/) | VU+WD | `app/src/components/shortcuts/__tests__/shortcutsView.test.tsx`, `app/src/components/commands/__tests__/CommandProvider.test.tsx`, `app/test/e2e/specs/command-palette.spec.ts` | ✅ | Registry-driven grouped list; opens via `?` and ⌘/ (mutually exclusive with palette); also reachable from the sidebar shortcut icon + Settings → Keyboard Shortcuts || 13.6.3 | Global shortcut map (nav / chat / view) | VU | `app/src/lib/commands/__tests__/globalActions.test.tsx` | ✅ | Control-based nav (`ctrl`/`mod` per-OS), New Chat / Toggle Sidebar handlers, and alias keys |+### 13.7 Language++| ID | Feature | Layer | Test path(s) | Status | Notes |+| --- | --- | --- | --- | --- | --- |+| 13.7.1 | Japanese UI locale | VU+PW+MS | `app/src/components/LanguageSelect.test.tsx`, `app/src/components/settings/panels/__tests__/ComposioPanel.test.tsx`, `app/src/store/localeSlice.test.ts`, `app/src/lib/i18n/__tests__/I18nContext.test.tsx`, `app/src/lib/i18n/__tests__/{coverage,mascotDismissPath}.test.ts`, `app/test/e2e/specs/japanese-locale.browser.ts` (discovered through `app/test/playwright/specs/japanese-locale.spec.ts`), `docs/RELEASE-MANUAL-SMOKE.md` | ✅ | Browser E2E asserts settings selection, reload persistence, fresh ja-JP detection, a saved English override, Memory v2 counts and model attribution at 1280x720. Native-script picker, Japanese browser-language detection, switching back to English, unknown-key fallback, complete dictionary, exact interpolation placeholders, and matching menu labels in mascot dismissal instructions |+---## 14. Tabbed Terminal UI (`openhuman-tui`)diff --git a/docs/library-minimal-recipe.md b/docs/library-minimal-recipe.mdindex 9720d3aa30..bc60feb736 100644--- a/docs/library-minimal-recipe.md+++ b/docs/library-minimal-recipe.md@@ -12,20 +12,32 @@ execution.**## The build command-Opencompany recipe (production embed — no benchmark/harness code):+OpenCompany's hosted-backend recipe:```bashcargo build --release \- -p openhuman-embed \+ -p openhuman-tinyhumans \--no-default-features --features "skills,flows"```+Use the same feature selection in the embedding application's manifest:++```toml+[dependencies]+openhuman-tinyhumans = { git = "https://github.com/tinyhumansai/openhuman", default-features = false, features = ["skills", "flows"] }+```++`openhuman_tinyhumans::RuntimeBuilder` installs the SDK-backed transport and+registers the hosted controllers when it builds the runtime. This connects the+API key to managed inference, integrations, channel relay and cloud voice when+their feature and runtime gates are enabled.+- To build the profiling harness against the same recipe, add the dev-only`rss-bench` feature and the two bench bins:```bashcargo build --release \- -p openhuman \+ -p openhuman-cli \--no-default-features --features "rss-bench,skills,flows" \--bin library-profile --bin rss-bench```@@ -40,10 +52,13 @@ Cargo features **and** the runtime's `DomainSet` (the builder's default does)if any agent will declare servers or skills.```rust,no_run-use openhuman_embed::{Access, AgentSpec, Runtime, Workspace};+use openhuman_tinyhumans::{+ embed::{Access, AgentSpec, Workspace},+ RuntimeBuilder,+};# async fn demo() -> Result<(), Box<dyn std::error::Error>> {-let runtime = Runtime::builder()+let runtime = RuntimeBuilder::new().workspace(Workspace::dir("/var/lib/opencompany/openhuman")).api_key(std::env::var("TINYHUMANS_API_KEY")?).build()@@ -58,52 +73,76 @@ println!("{}", worker.run("Start the job.").await?.reply);# }```+### Choosing the backend layer++Use `openhuman_tinyhumans::RuntimeBuilder` for a host that uses the hosted+TinyHumans backend. The builder forwards the embedding options and binds the+transport before startup, as shown in its [compiled quick-start+example](../crates/openhuman-tinyhumans/src/lib.rs).++Use `openhuman_embed::Runtime::builder()` for a standalone host with its own+inference provider and local tools. Agent turns, local memory operations and+enabled skills and flows remain available through their configured providers.+An API key on that builder stores a credential; the host must also supply a+backend transport to reach TinyHumans. Backend requests otherwise return+`BACKEND_UNAVAILABLE:`, and the hosted `billing`, `team`, `referral` and+`announcements` controllers are absent.++For a connected host that manages its own RPC catalog, set+`.hosted_controllers(false)` on the TinyHumans builder to skip hosted controller+registration. `.domains(DomainSet::embedded())` keeps the `hosted` domain gate+off, so it also excludes those controllers from dispatch. The backend transport+still serves agent and integration requests in either configuration.+## Keep / drop table-The single `default` list this session was written against no longer exists.-There are two sets now (`crates/openhuman-core/README.md`, "Feature flags"): **Contrib** is-`[features] default`, what a bare `cargo check` compiles; **Product** is-`scripts/ci/product-features.txt`, what the desktop app ships. Both columns-below are current. `desktop-automation` has since been removed from the tree-altogether, hence the dashes; `tui` is in neither set.--Note how much of this recipe the contributor set already gives you for free —-`voice`, `web3`, `meet` and `tui` are default-OFF today. The Decision column-still records what a **library host** wants, which is the thing this document-is actually for.--| Gate | Contrib | Product | Decision | Why | Deps shed |-| --- | :---: | :---: | :---: | --- | --- |-| `skills` | ON | ON | **KEEP** | python/js `SKILL.md` execution is a stated opencompany use case | none (surface/prompt/startup only) |-| `flows` | ON | ON | **KEEP** | saved-workflow (`flows_create`+`flows_run`) runs are a stated use case | — (adds `tinyflows`, `jaq-*`, `rhai`; see cost note) |-| `voice` | OFF | ON | **DROP** | STT/TTS/dictation/podcast — a headless host does no audio I/O | `hound`, `lettre` |-| `web3` | OFF | ON | **DROP** | crypto wallet / swap / x402 machine payments — not an opencompany path | `bitcoin`, `curve25519-dalek` |-| `media` | ON | ON | **DROP** | `media_generate_*` image/video tools — surface-only | none (backend-proxied) |-| `meet` | OFF | ON | **DROP** | Google-Meet join/live-STT/TTS bot — no headless use | none |-| `mcp` | ON | ON | **DROP** | MCP stdio/HTTP server + Smithery registry (~20k LOC, ~19 tools) — a library host is not an MCP host | none (hand-rolled over tokio/reqwest/axum) |-| `desktop-automation` | — | — | **DROP** | AX / `computer` tool family drives a **local desktop UI** — meaningless headless | `uiautomation` |-| `tui` | OFF | — | **DROP** | `openhuman tui`/`chat` terminal UI — no terminal in a library host | `ratatui`, `crossterm`, `unicode-width` |--**Non-default optional features** (`browser-native`/`fantoccini`, `whatsapp-web`,-`e2e-test-support`, `rss-bench`, `rss-bench-dhat`) are all default-OFF, so a-`--no-default-features` build never links them unless explicitly added. None are-needed for opencompany; `rss-bench`/`rss-bench-dhat` are dev/benchmark-only.+The table below records the July 2026 recipe, before the backend extraction in+#6362. **Contrib** refers to the recorded `[features] default` set; **Product**+refers to the recorded desktop feature set. Use+`crates/openhuman-core/README.md` and `scripts/ci/product-features.txt` for the+current sets. The dashes reflect gates outside the recorded set.++In that contributor set, `voice`, `web3`, `meet` and `tui` were default-OFF.+The Decision column records the domains needed by the headless library host.++| Gate | Contrib | Product | Decision | Why | Deps shed |+| -------------------- | :-----: | :-----: | :------: | --------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |+| `skills` | ON | ON | **KEEP** | python/js `SKILL.md` execution is a stated opencompany use case | none (surface/prompt/startup only) |+| `flows` | ON | ON | **KEEP** | saved-workflow (`flows_create`+`flows_run`) runs are a stated use case | — (adds `tinyflows`, `jaq-*`, `rhai`; see cost note) |+| `voice` | OFF | ON | **DROP** | STT/TTS/dictation/podcast — a headless host does no audio I/O | `hound`, `lettre` |+| `web3` | OFF | ON | **DROP** | crypto wallet / swap / x402 machine payments — not an opencompany path | `bitcoin`, `curve25519-dalek` |+| `media` | ON | ON | **DROP** | `media_generate_*` image/video tools — surface-only | none (backend-proxied) |+| `meet` | OFF | ON | **DROP** | Google-Meet join/live-STT/TTS bot — no headless use | none |+| `mcp` | ON | ON | **DROP** | MCP stdio/HTTP server + Smithery registry (~20k LOC, ~19 tools) — a library host is not an MCP host | none (hand-rolled over tokio/reqwest/axum) |+| `desktop-automation` | — | — | **DROP** | AX / `computer` tool family drives a **local desktop UI** — meaningless headless | `uiautomation` |+| `tui` | OFF | — | **DROP** | `openhuman tui`/`chat` terminal UI — no terminal in a library host | `ratatui`, `crossterm`, `unicode-width` |++The historical recipe also left optional `browser-native`/`fantoccini`,+`whatsapp-web`, `e2e-test-support`, `rss-bench` and `rss-bench-dhat` off.+Check the selected host crate's current feature list before adding optional+domains. `rss-bench` and `rss-bench-dhat` remain development profiling features.## Measured results-All numbers gathered on this branch, Apple-Silicon macOS, `--release` profile+These are historical measurements from the July 2026 feature-shed work,+before the backend extraction in #6362. They describe the earlier core build;+measure the current `openhuman-embed` and `openhuman-tinyhumans` builds separately+when sizing a deployment. The hosted layer adds the SDK transport and hosted+controllers, so these figures serve as a dated reference.++All numbers were gathered on Apple-Silicon macOS, `--release` profile(`optimized + debuginfo`). "default" = the prior 2026-07-21 session baselines in[`docs/library-benchmarking.md`](library-benchmarking.md); "pure slim" =`--no-default-features --features rss-bench` (drops everything). Both slim numbers-were reproduced on this machine and match the prior doc exactly (68.4 MiB).+matched the prior document's 68.4 MiB baseline in that measurement session.### Binary size-| Build | Features | Unstripped | Stripped |-| --- | --- | ---: | ---: |-| default | (all gates) | 115.9 MiB¹ | — |+| Build | Features | Unstripped | Stripped |+| ------------------- | -------------- | ------------: | ------------: |+| default | (all gates) | 115.9 MiB¹ | — || **library-minimal** | `skills,flows` | **~81.1 MiB** | **~60.4 MiB** |-| pure slim | (none) | 68.4 MiB | 51.0 MiB |+| pure slim | (none) | 68.4 MiB | 51.0 MiB |¹ from the prior session (unstripped, same profile). library-minimal bins measureddirectly: `rss-bench` 81.1 MiB, `library-profile` 83.0 MiB unstripped (the extra@@ -114,20 +153,20 @@ matches the `rss-bench` figure — the bench feature adds negligible code.narrower code-paging surface (the dominant cold-turn RSS factor per the priorsession's executable-paging finding).- **library-minimal vs pure slim: +12.7 MiB unstripped / +9.4 MiB stripped — all- of it `flows`.** `cargo tree` confirms the delta is `rhai 1.25` + `rhai_codegen`- + `jaq-core/std/json` + `tinyflows`; `skills` sheds **zero** deps (its value is- tool-surface/prompt/startup, not size). `flows` is by far the most expensive- domain we *keep* — see follow-up #2.+ of it `flows`.** At the time, `cargo tree` attributed the delta to `rhai 1.25`,+ `rhai_codegen`, `jaq-core/std/json` and `tinyflows`; `skills` shed **zero** deps+ (its value is tool-surface/prompt/startup, not size). `flows` was the most+ expensive retained domain — see follow-up #2.### Per-scenario RSS (5 fresh-process repeats, median, `OPENHUMAN_PROFILE_FORCE_UTC=1`)-| Scenario | minimal settled | minimal retained Δ | default settled² | default retained² | Δ settled |-| --- | ---: | ---: | ---: | ---: | ---: |-| `agent-turn` (cold, 1 turn) | 44.0 MiB | 26.6 MiB | 47.6 MiB | 29.5 MiB | **-3.6 MiB** |-| `subagents` (cold, 2 children) | 44.5 MiB | 27.1 MiB | 48.0 MiB | 29.9 MiB | **-3.5 MiB** |-| `workflow` (`flows_create`+`flows_run`) | 46.2 MiB | 26.0 MiB | 50.9 MiB | 29.9 MiB | **-4.7 MiB** |-| `memory-ingest` (100 msgs) | 24.7 MiB | 8.8 MiB | 25.8 MiB | 9.3 MiB | **-1.1 MiB** |-| `long-agent` (10 turns) | 46.4 MiB | 2.9 MiB | — (25-turn: 65.8 MiB) | — | n/a³ |+| Scenario | minimal settled | minimal retained Δ | default settled² | default retained² | Δ settled |+| --------------------------------------- | --------------: | -----------------: | --------------------: | ----------------: | -----------: |+| `agent-turn` (cold, 1 turn) | 44.0 MiB | 26.6 MiB | 47.6 MiB | 29.5 MiB | **-3.6 MiB** |+| `subagents` (cold, 2 children) | 44.5 MiB | 27.1 MiB | 48.0 MiB | 29.9 MiB | **-3.5 MiB** |+| `workflow` (`flows_create`+`flows_run`) | 46.2 MiB | 26.0 MiB | 50.9 MiB | 29.9 MiB | **-4.7 MiB** |+| `memory-ingest` (100 msgs) | 24.7 MiB | 8.8 MiB | 25.8 MiB | 9.3 MiB | **-1.1 MiB** |+| `long-agent` (10 turns) | 46.4 MiB | 2.9 MiB | — (25-turn: 65.8 MiB) | — | n/a³ |² default column from `docs/library-benchmarking.md` (2026-07-21). Those mediansmay not have used `OPENHUMAN_PROFILE_FORCE_UTC=1`, so treat the Δ as approximate@@ -139,7 +178,7 @@ absolute settled figures aren't comparable. The low 2.9 MiB retained Δ confirmsper-turn growth plateaus (matches the prior "not linear" observation).**Takeaway (consistent with the prior session):** compile-time gates shrink the-*binary* substantially (-30%) but move *settled RSS* by only ~3-5 MiB per+_binary_ substantially (-30%) but move _settled RSS_ by only ~3-5 MiB perscenario. Most of the RSS story is initialization + allocator high-water, notlinked code size. The binary/code-paging win is the primary reason to prefer thisrecipe; the RSS win is real but secondary.@@ -147,13 +186,13 @@ recipe; the RSS win is real but secondary.## What is functionally absent in this buildSummarized from the per-gate comments in `crates/openhuman-core/Cargo.toml`. Dropped domains fail-*closed and cleanly* — controllers become unknown-method, tools are simply absent+_closed and cleanly_ — controllers become unknown-method, tools are simply absentfrom the tool list (not degraded to runtime errors), CLI subcommands report abuild-fact error:- **voice/audio:** voice + audio controllers unregistered (unknown-method overRPC, absent from `/schema`); `audio_generate_podcast` tools absent; `openhuman- voice` returns "voice disabled".+voice` returns "voice disabled".- **web3:** wallet / web3 / x402 controllers unregistered; swap/bridge/dapp agenttools absent; the x402 402-retry path returns unpaid; tinyplace on-chainpayments degrade to graceful "wallet disabled" errors (tinyplace comms +@@ -174,8 +213,9 @@ Everything the opencompany use cases need remains: the agent harness + turnrunner, subagent delegation (`spawn_parallel_agents`), the Memory v2 host(engine binding, sources, conversations, context + secret/PII scrubbing), threads, config,security policy, provider routing/inference, `skills` (SKILL.md discovery/install-+ node/python execution + `run_workflow`/`await_workflow`), and `flows` (saved-graph create/run/schedule + `workflow_builder`/`flow_discovery` agents).++- node/python execution + `run_workflow`/`await_workflow`), and `flows` (saved+ graph create/run/schedule + `workflow_builder`/`flow_discovery` agents).## Test verification@@ -209,14 +249,14 @@ The repo convention (the `[features]` policy comments in `crates/openhuman-core/`library-minimal = ["skills","flows"]` alias would be convenient, but it:- duplicates the `default` list's maintenance burden — a new default-ON gate that- opencompany *should* pick up would silently be missing from a frozen alias+ opencompany _should_ pick up would silently be missing from a frozen alias(the exact failure mode the "no meta-feature" rule exists to avoid), and- hides the subtractive intent behind a name, making the drop set invisible atthe call site.**Recommendation: document the explicit list (this file), do not add the alias.**If maintainers later decide an alias is worth it, the minimal-drift option is to-express it *subtractively* in tooling rather than as a frozen additive list —+express it _subtractively_ in tooling rather than as a frozen additive list —but that is a follow-up decision, not part of this recipe.## Follow-up shed list (ranked)@@ -237,19 +277,18 @@ prioritization.headless library host wanted to shed anyway.2. **Split `rhai` out of the `flows` gate.** `flows` is the most expensive domain- we *keep* (+12.7 MiB, dominated by `rhai 1.25` — a full scripting engine).+ we _keep_ (+12.7 MiB, dominated by `rhai 1.25` — a full scripting engine).`rhai` arrives only via `tinyagents/repl`, which powers the `.ragsh`language-workflow tool (`rhai_workflows`). If opencompany needs `tinyflows`saved-graph runs but **not** the `.ragsh` rhai tool, splitting `rhai_workflows`into its own sub-gate would reclaim most of that 12.7 MiB while keeping theflows graph engine. Currently all-or-nothing.--4. **`reqwest` dual TLS backends.** The root `reqwest` enables both `rustls-tls`+3. **`reqwest` dual TLS backends.** The root `reqwest` enables both `rustls-tls`**and** `native-tls` — two full TLS stacks linked simultaneously. A headlesshost on a known target could pick one, shedding the other.-5. **Node/Python runtime bootstrap deps** (`tar`, `xz2`+liblzma, `zip`, `flate2`).+4. **Node/Python runtime bootstrap deps** (`tar`, `xz2`+liblzma, `zip`, `flate2`).Only needed if `skills`/`flows` actually execute node/python workloads; kepthere because `skills` is on. If a deployment runs only pure-LLM skills, thesearchive/decompression deps become sheddable.diff --git a/docs/specs/memory-v2.md b/docs/specs/memory-v2.mdindex d5c34b5041..9dcee71516 100644--- a/docs/specs/memory-v2.md+++ b/docs/specs/memory-v2.md@@ -90,6 +90,12 @@ credential.the turn after the last compaction checkpoint) is left out of the pack.- **No hook fails a turn.** Each is bounded and logs instead of raising; atimed-out pre-turn still finishes logging in the background.+- **A refused recall is not an empty one.** When nothing was recalled because+ the engine refused the account (`INSUFFICIENT_CREDITS`, `UNAUTHORIZED`,+ `UNAVAILABLE`), the turn is given a short notice saying memory is+ unavailable and why, so the model does not tell the user nothing is stored.+ TinyMemory's holistic recall reports a section's failure as a skip reason,+ so the hook reads the refusal back from there too.- **Every write is scrubbed.** The bound engine is wrapped in`memory::guard::ScrubbingEngine`, so turns, documents and learnings arescrubbed of secrets and PII whichever path writes them.@@ -105,7 +111,10 @@ in `<workspace>/memory/jobs.json`, merged when identical, and run by the`memory_background` system cron job (every 5 minutes) once they are`[memory.recall] build_delay_secs` old, since a build reads the facts theengine extracts from the writes. Background work pauses with the scheduler-gate. A failing job is retried up to five times. The hosted engine builds on+gate. A failing job is retried up to five times; an account-wide refusal+(no credits, a rejected credential, an unreachable engine) does not count as+an attempt, so the job waits instead of being dropped. The run that drops a+job records why. The hosted engine builds onits own schedule (`scheduled`); an engine that cannot consolidate answers`skipped`.@@ -118,8 +127,17 @@ its own schedule (`scheduled`); an engine that cannot consolidate answers`markdown`). A source's `namespace` names the layout root it files under.- **Ingest** (`memory_brain_ingest`) files a local file (converted, itssource picked from its format) or text, accepted without waiting for- indexing.-- Each ingest or sync queues one belief build per brain source it touched.+ indexing. Files are capped at 25 MB (`MAX_INGEST_BYTES`).+- **A long document is several writes.** CortexDB refuses an event over+ 1 MiB, so tinymemory writes a document whose text is over about 256 KiB as+ pieces of about 256 KiB each, cut at page breaks and headings (PDF pages+ are joined with a form feed, U+000C, which the scrubber keeps). Each piece+ is one write, and the hosted engine bills per write: a 25 MB text file is+ about 100 billed writes. It still reads back as one item, and a search hit+ on it is the matching piece, tagged `page:`/`section:`.+- Each ingest or sync queues one belief build per brain source it touched,+ unless the engine rebuilds beliefs on its own (`Consolidation::Automatic`),+ which needs none.## Config (`config.toml`)@@ -178,7 +196,11 @@ subtree); a `reach` in the model's filter is overwritten.## RPC (`openhuman.memory_*`)Errors use the standard structured error; `code` is one of `MEMORY_OFF`,-`UNSUPPORTED`, `INVALID_REQUEST`, `UNAUTHORIZED` or `ENGINE`.+`UNSUPPORTED`, `INVALID_REQUEST`, `UNAUTHORIZED`, `INSUFFICIENT_CREDITS` (the+hosted engine's 402), `UNAVAILABLE` (unreachable, timed out or overloaded) or+`ENGINE`. The two account-wide refusals have their own codes so the UI can+say "top up" or "try again" instead of showing an engine fault or an empty+memory.| Method | Params | Result || --- | --- | --- |@@ -234,3 +256,8 @@ and the pack preview), `explorer`, `learnings` (built beliefs marked),search, ingest, synced sources), `background` (the job queue) and `settings`(the recall policy). Legacy `?brain=context` maps to `ask`, `documents`,`sources`, `sync` and `history` to `brain`, `graph` and `goals` to `ask`.++Writes are visible as soon as they return (`WaitFor::Visible`); only beliefs+lag, built by a queued job at least `build_delay_secs` behind the writes. So+an empty `learnings` list while a `build_beliefs` job is pending says beliefs+are still being built, never that memory is empty.diff --git a/gitbooks/SUMMARY.md b/gitbooks/SUMMARY.mdindex 162b0127ea..8896d037fd 100644--- a/gitbooks/SUMMARY.md+++ b/gitbooks/SUMMARY.md@@ -11,6 +11,7 @@- [Guides](guides/README.md)- [Create my personal AI assistant](guides/personal-assistant.md)- [Use OpenHuman with a local model](guides/local-model.md)+ - [Use multiple local LLM servers](guides/multiple-local-llm-servers.md)- [Keep sensitive data private](guides/privacy-sensitive-data.md)- [Recover from a failed installation](guides/recover-failed-installation.md)- [Move OpenHuman to a new PC](guides/move-to-new-pc.md)diff --git a/gitbooks/developing/e2e-testing.md b/gitbooks/developing/e2e-testing.mdindex 93f61a8346..2b1d906541 100644--- a/gitbooks/developing/e2e-testing.md+++ b/gitbooks/developing/e2e-testing.md@@ -9,9 +9,9 @@ icon: vialsDesktop E2E tests use **WebDriverIO (WDIO)** to drive the app through a single `tauri-driver` (WebDriver) session against its native Wry/WebKit webview:-| Platform | Driver | Port | App format | Selectors |-| --------- | ------------------------------ | ---- | ------------- | --------- |-| **Linux** | tauri-driver + WebKitWebDriver | 4444 | Debug binary | CSS / DOM |+| Platform | Driver | Port | App format | Selectors |+| --------- | ------------------------------ | ---- | ------------ | --------- |+| **Linux** | tauri-driver + WebKitWebDriver | 4444 | Debug binary | CSS / DOM |The app moved from CEF to Tauri's native Wry webview in #5456. The old Appium Chromium-driver backend attached over CEF's remote-debugging port; CDP only exists under a Chromium engine, so that backend was removed in #5478 along with CEF itself. Linux CI now drives the debug binary under Xvfb through `tauri-driver`. macOS and Windows have no automated desktop E2E coverage until a native driver (Appium Mac2 / WinAppDriver) replaces the removed one; that work is tracked in #5485. `pnpm --filter openhuman-app test:e2e:build` still produces a `.app` bundle on macOS for manual testing, but there is no supported automated session there yet.@@ -78,7 +78,7 @@ active platform detection.`app/test/e2e/helpers/element-helpers.ts` provides a unified API over the WebView DOM:-| Helper | Behavior |+| Helper | Behavior || ------------------------- | -------------------------------------------- || `waitForText(text)` | XPath over DOM text content || `waitForButton(text)` | `button` / `[role="button"]` XPath |@@ -233,6 +233,19 @@ bash app/scripts/e2e-run-spec.sh test/e2e/specs/notifications.spec.ts notificati## Agent-observable artifact flow+### Starting a composer test++Chat drafts persist per thread. Before a spec types its initial prompt, call+`replaceChatComposerText(input, prompt)` from+`app/test/playwright/helpers/chat-composer.ts`. It selects and deletes the+restored draft, waits for the empty value, types through keyboard events, and+checks the exact prompt. Use `clearChatComposer(input)` when a case needs an+empty composer. These helpers support both textarea and Lexical surfaces.++Cases that exercise draft restoration or append a follow-up should keep their+draft and drive that behavior explicitly. The helper's browser regressions live+in `app/test/playwright/specs/chat-composer-helper.spec.ts`.+For a canonical, inspectable run that drops screenshots, page-source dumps, and mock request logs on disk:```bashdiff --git a/gitbooks/features/cloud-deploy.md b/gitbooks/features/cloud-deploy.mdindex 64ae824a4e..f3cc5d334e 100644--- a/gitbooks/features/cloud-deploy.md+++ b/gitbooks/features/cloud-deploy.md@@ -115,14 +115,16 @@ URL with the typed token and reports `Connected ✓` / `Auth failed` /## What you need before you start-| Setting | Required | Notes |-| ---------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------- |-| `OPENHUMAN_CORE_TOKEN` | yes | Bearer token clients send to `/rpc`. Generate with `openssl rand -hex 32`. **Anyone with this token can drive the core.** |-| `BACKEND_URL` | yes | Tinyhumans backend the core talks to (`https://api.tinyhumans.ai` for prod). |-| `OPENHUMAN_APP_ENV` | no | `production` or `staging`. Defaults to `production`. |-| `OPENHUMAN_CORE_HOST` | no | Defaults to `0.0.0.0` in the container. |-| `OPENHUMAN_CORE_PORT` | no | Defaults to `7788`. |-| `RUST_LOG` | no | `info` is fine; `debug` for triage. |+| Setting | Required | Notes |+| ----------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |+| `OPENHUMAN_CORE_TOKEN` | yes | Bearer token clients send to `/rpc`. Generate with `openssl rand -hex 32`. **Anyone with this token can drive the core.** |+| `BACKEND_URL` | yes | Tinyhumans backend the core talks to (`https://api.tinyhumans.ai` for prod). |+| `OPENHUMAN_APP_ENV` | no | `production` or `staging`. Defaults to `production`. |+| `OPENHUMAN_KEYRING_MASTER_KEY` | no | 64 hex characters (`openssl rand -hex 32`). Master key for the staging/production `encrypted_file` keyring, so a container with no OS keychain can store provider keys encrypted. Inject it from your secret manager like the bearer token; **losing it orphans every stored secret.** |+| `OPENHUMAN_KEYRING_MASTER_KEY_FILE` | no | Path to a file holding the same value, for Docker/Kubernetes secret mounts. Set one of the two, not both. Without either, `encrypted_file` needs an OS keychain. |+| `OPENHUMAN_CORE_HOST` | no | Defaults to `0.0.0.0` in the container. |+| `OPENHUMAN_CORE_PORT` | no | Defaults to `7788`. |+| `RUST_LOG` | no | `info` is fine; `debug` for triage. |Endpoints exposed by the running container:@@ -486,6 +488,63 @@ need before you start" (#6926). On a release that predates those variables, set`$OPENHUMAN_WORKSPACE/dev-keychain.json` (plaintext, `0600`); put the workspacevolume on encrypted storage and treat the host as the secret boundary.+Mount the key file without group- or world-write permissions. The core rejects+group- or world-writable files, while read-only group/world access may be+accepted for container secret mounts; any process able to read the file can+decrypt the entire keyring. Restrict the mode where the mount is declared:++- Kubernetes: Secret volumes are root-owned, and `runAsUser` does not change+ the owner of a projected Secret. For a non-root core, use an init container+ running as root to copy the Secret into an `emptyDir`, `chown` the copy to+ the core UID, and `chmod 0400` it before the core starts. Mount the original+ Secret read-only in the init container and the `emptyDir` read-only in the+ core container. For example:++ ```yaml+ volumes:+ - name: master-key-secret+ secret:+ secretName: openhuman-master-key+ defaultMode: 0400+ - name: master-key+ emptyDir: {}+ initContainers:+ - name: prepare-master-key+ image: busybox:1.36+ command: ["sh", "-c", "cp /source/master.key /target/master.key && chown 10001:10001 /target/master.key && chmod 0400 /target/master.key"]+ volumeMounts:+ - name: master-key-secret+ mountPath: /source+ readOnly: true+ - name: master-key+ mountPath: /target+ containers:+ - name: openhuman+ securityContext:+ runAsUser: 10001+ runAsGroup: 10001+ runAsNonRoot: true+ env:+ - name: OPENHUMAN_KEYRING_MASTER_KEY_FILE+ value: /run/openhuman-master-key/master.key+ volumeMounts:+ - name: master-key+ mountPath: /run/openhuman-master-key+ readOnly: true+ ```++ Set the `emptyDir` medium and the core UID/GID to match the ownership applied+ by the init container. The `defaultMode: 0400` setting is important. For a+ direct non-root mount, also provide `fsGroup` (or equivalent group access)+ matching the core's group so kubelet can make the file readable; the resulting+ read-only `0440` mode is accepted. The init-container recipe above instead+ grants access by changing the copied file's owner. An equivalent setup is a+ secret volume whose `defaultMode` is `0400` and whose file is mounted with+ ownership matching the core's `runAsUser`/`runAsGroup`.+- Docker Swarm: set `mode: 0400` (with `uid`/`gid` for a non-root user) on the+ service's secret.+- A plain file: `chmod 600` it, owned by the user the core runs as.+---## Named-volume ownership and the Docker entrypointdiff --git a/gitbooks/features/model-routing/local-ai.md b/gitbooks/features/model-routing/local-ai.mdindex d42084ad66..44bdea8c7f 100644--- a/gitbooks/features/model-routing/local-ai.md+++ b/gitbooks/features/model-routing/local-ai.md@@ -34,6 +34,14 @@ LM Studio, OMLX, and `local-openai` send `local_ai.api_key` as a Bearer token whThe model part of the provider string is passed to the runtime unchanged, so it must match the runtime's own model id (for Ollama, the name you pulled, including the tag). An optional `@<temperature>` suffix pins a temperature, for example `ollama:qwen2.5:[email protected]`.+## Multiple self-hosted servers++If you run several OpenAI-compatible model servers, a gateway can expose one+endpoint and use named model IDs to select the upstream. See+[Use multiple local LLM servers](../../guides/multiple-local-llm-servers.md) for an+optional community Model Router example with a Mac mini and Linux GPU PC.+OpenHuman does not bundle or supervise the gateway.+## Adding a local runtime in the app1. Start the runtime and make sure its server is listening. For Ollama, `curl http://localhost:11434/api/tags` should return JSON.diff --git a/gitbooks/guides/multiple-local-llm-servers.md b/gitbooks/guides/multiple-local-llm-servers.mdnew file mode 100644index 0000000000..c6c164156f--- /dev/null+++ b/gitbooks/guides/multiple-local-llm-servers.md@@ -0,0 +1,145 @@+---+description: >-+ Route workloads to multiple self-hosted OpenAI-compatible LLM servers through+ a community gateway, with a Mac mini and Linux GPU PC example.+---++# Use multiple local LLM servers++If you already run models on several machines, you can expose them through one+OpenAI-compatible gateway and select a backend in each workload's model ID.+This guide uses [Model Router](https://github.com/tjm8874/model-router), an+independent, MIT-licensed community project. OpenHuman does not bundle, install,+or supervise it. Other compatible gateways can serve the same role.++The example puts OpenHuman Core, the router, and a small model on a **Mac mini+with 64 GB RAM**, and a larger model server on a **Linux GPU PC**:++```text+OpenHuman Core (Mac mini)+ └─ Model Router, 127.0.0.1:18080/v1+ ├─ MacMini:small-model → local model server, 127.0.0.1:8080/v1+ └─ LinuxGPU:large-model → SSH tunnel → Linux PC, 127.0.0.1:8000/v1+```++These labels and ports are examples. Choose models and context lengths that fit+your hardware, including KV-cache and concurrency headroom. The router neither+hosts models nor downloads weights. This setup changes inference destinations;+it does not relocate the Core's existing workspace, memory, or project files.+If you connect a UI from another machine, the router URL is relative to **Core**.++## 1. Start the model servers++Run a small model with an OpenAI-compatible server on the Mac mini, for example+MLX or LM Studio, at `http://127.0.0.1:8080/v1`. Run a larger model on the Linux PC+with a server such as vLLM at that PC's `http://127.0.0.1:8000/v1`.+Use the runtime's own installation and model-loading instructions; see+[the local-model guide](local-model.md) for the single-server setup.++On the Mac mini, create a tunnel to the Linux PC. Replace the example SSH host+with yours, and keep the tunnel running:++```sh+ssh -N -o ExitOnForwardFailure=yes -o ServerAliveInterval=30 \+ -L 127.0.0.1:18000:127.0.0.1:8000 [email protected]+```++The forwarded Linux endpoint is now `http://127.0.0.1:18000/v1` on the Mac mini.+Keep authenticated remote inference behind SSH or HTTPS rather than sending+bearer keys over plain HTTP across the network.++## 2. Start the community gateway++Build Model Router following its+[README](https://github.com/tjm8874/model-router#build-and-run). Its+[example configuration](https://github.com/tjm8874/model-router/blob/main/examples/mac-mini-linux.toml)+contains the following backend mapping:++```toml+[server]+host = "127.0.0.1"+port = 18080++[backends.MacMini]+base_url = "http://127.0.0.1:8080/v1"+endpoints = ["chat/completions"]++[backends.LinuxGPU]+base_url = "http://127.0.0.1:18000/v1"+endpoints = ["chat/completions"]+# For an authenticated upstream, set the environment variable in the router:+# api_key_env = "LINUX_LLM_API_KEY"+```++Validate your configuration and start it:++```sh+model-router --config router.toml --check-config+model-router --config router.toml+curl http://127.0.0.1:18080/v1/models+```++Use the binary's actual path if it is not on `PATH`. The configuration check does+not contact upstream servers. The model catalogue prefixes upstream IDs with the+backend name: `org/model:4bit` becomes `MacMini:org/model:4bit`. Colons and slashes+inside the upstream model ID are preserved. Check `router_errors` as well as+`data`; one reachable backend does not mean every backend is ready.++## 3. Route OpenHuman workloads++Merge these settings into the active Core user's `config.toml`, preserving your+other settings. Replace the placeholder model IDs with exact IDs from the gateway+catalogue. Keep workload keys at the top level, **before** `[local_ai]`:++```toml+chat_provider = "local-openai:MacMini:your-small-model-id"+memory_provider = "local-openai:MacMini:your-small-model-id"+learning_provider = "local-openai:MacMini:your-small-model-id"+reasoning_provider = "local-openai:LinuxGPU:your-large-model-id"+agentic_provider = "local-openai:LinuxGPU:your-large-model-id"+coding_provider = "local-openai:LinuxGPU:your-large-model-id"++[local_ai]+runtime_enabled = true+opt_in_confirmed = true+provider = "lm_studio"+base_url = "http://127.0.0.1:18080/v1"+chat_model_id = "MacMini:your-small-model-id"+vision_model_id = ""+```++`lm_studio` is the existing local OpenAI-compatible settings identifier; this+example's endpoint is Model Router, not an LM Studio installation requirement.+The `local-openai:` prefix selects OpenHuman's compatible provider. Core passes+`MacMini:your-small-model-id` to the router, which removes `MacMini:` and forwards+`your-small-model-id` to the named upstream.++`OPENHUMAN_LOCAL_INFERENCE_URL` or `LOCAL_OPENAI_URL` in Core's environment can+override the configured URL. Update or unset them when switching endpoints; see+[Local AI](../features/model-routing/local-ai.md#supported-runtimes).++Only assign vision to a vision-capable model and register its capabilities and+context window in OpenHuman. This text-only example leaves vision and embeddings+unassigned. Embedding services and background memory engines have separate+configuration/version constraints; adding a gateway does not automatically+reroute them. Model Router can forward `/v1/embeddings` and `/v1/decide` to+compatible services but does not translate APIs or start those services.++## 4. Verify and maintain the routes++Test a short chat using the local model, then a reasoning or agentic workload+using the Linux model. Confirm the backend/model in the router's logs and the+responses in OpenHuman. Model discovery and `/health` alone are not inference+proof. Test streaming and tool calls with models that support them.++Run the router under a per-user LaunchAgent or systemd user service if you need+continuous availability. Supervise the SSH tunnel separately. Validate the router+configuration and restart it after changes; upstream connection failures return+errors, with no automatic retry or fallback in this gateway.++The gateway listens only on loopback and has no inbound authentication. It keeps+upstream keys separate from Core's incoming Authorization header. A loopback+gateway can still forward prompts to another machine: OpenHuman's `local_only`+provider classification does not inspect the gateway's upstream configuration.+Review those destinations yourself; do not infer on-device-only inference from+the `local-openai:` prefix. Unassigned workloads retain their existing routes.diff --git a/scripts/__tests__/capture-first-inference.test.mjs b/scripts/__tests__/capture-first-inference.test.mjsindex a5dac7189a..113ea1a280 100644--- a/scripts/__tests__/capture-first-inference.test.mjs+++ b/scripts/__tests__/capture-first-inference.test.mjs@@ -11,8 +11,11 @@ const HERE = dirname(fileURLToPath(import.meta.url));const SCRIPT = resolve(HERE, "..", "debug", "capture-first-inference.mjs");test("capture proxy --help prints usage without opening a listener", () => {+ const helpEnv = { ...process.env };+ delete helpEnv.FORCE_COLOR;const result = spawnSync(process.execPath, [SCRIPT, "--help"], {encoding: "utf8",+ env: helpEnv,});assert.equal(result.status, 0, result.stderr);assert.match(diff --git a/scripts/__tests__/cli-package-contents.test.mjs b/scripts/__tests__/cli-package-contents.test.mjsindex 3e7e835b6d..5e6655891d 100644--- a/scripts/__tests__/cli-package-contents.test.mjs+++ b/scripts/__tests__/cli-package-contents.test.mjs@@ -116,7 +116,23 @@ test("package-manager consumers install and expose the TUI", () => {);});-test("Debian packages install both commands", () => {+// packages/deb/build.sh shells out to dpkg-deb, which Debian-family hosts+// and the Linux CI runners have and macOS/Windows developer machines do not.+// Without it the build exits 127 and the red reads as a packaging defect.+function dpkgDebAvailable() {+ try {+ execFileSync("dpkg-deb", ["--version"], { stdio: "ignore" });+ return true;+ } catch {+ return false;+ }+}++test("Debian packages install both commands", (t) => {+ if (!dpkgDebAvailable()) {+ t.skip("dpkg-deb not on PATH");+ return;+ }const work = fs.mkdtempSync(path.join(os.tmpdir(), "openhuman-deb-package-"));const core = path.join(work, "core-fixture");const tui = path.join(work, "tui-fixture");diff --git a/scripts/__tests__/macos-bundled-modules.test.mjs b/scripts/__tests__/macos-bundled-modules.test.mjsnew file mode 100644index 0000000000..10cc1b80c4--- /dev/null+++ b/scripts/__tests__/macos-bundled-modules.test.mjs@@ -0,0 +1,148 @@+// The macOS bundled-module signer and its check, end to end on a staged+// marker-layout bundle. Ad-hoc signing (`-`) needs no certificate, so this runs+// on any Mac. An ad-hoc signature has no Developer ID and no secure timestamp,+// so `check` reports exactly those two; every other problem it can report is+// asserted absent, or present after tampering, by name.+import assert from "node:assert/strict";+import { spawnSync } from "node:child_process";+import { createHash } from "node:crypto";+import { mkdirSync, mkdtempSync, readFileSync, writeFileSync } from "node:fs";+import { tmpdir } from "node:os";+import { dirname, join, resolve } from "node:path";+import { test } from "node:test";+import { fileURLToPath } from "node:url";++const ROOT = resolve(dirname(fileURLToPath(import.meta.url)), "..", "..");+const SCRIPT = join(ROOT, "scripts/release/macos-bundled-modules.sh");+const ENTITLEMENTS = join(+ ROOT,+ "crates/openhuman-app/entitlements.sidecar.plist",+);+const sha = (path) =>+ createHash("sha256").update(readFileSync(path)).digest("hex");+const run = (...args) =>+ spawnSync("bash", [SCRIPT, ...args], { encoding: "utf8" });++/** The first architecture of a universal (fat) Mach-O, or the file if thin. */+function firstSlice(bytes) {+ if (bytes.readUInt32BE(0) !== 0xcafebabe) return bytes; // fat_header magic+ // fat_arch[0]: cputype, cpusubtype, offset, size, align (big-endian u32s).+ const offset = bytes.readUInt32BE(8 + 8);+ const size = bytes.readUInt32BE(8 + 12);+ return bytes.subarray(offset, offset + size);+}++/** An app whose bundle holds one module in the macOS layout: library, allowlist, marker. */+function stagedApp() {+ const app = join(+ mkdtempSync(join(tmpdir(), "openhuman-sign-")),+ "OpenHuman.app",+ );+ const modules = join(app, "Contents/Resources/bundled-modules");+ const dir = join(modules, "demo/1.0.0/macos-15-arm64");+ mkdirSync(dir, { recursive: true });+ const library = join(dir, "libdemo.dylib");+ // Any thin Mach-O will do. Thinning matters: in a universal binary the bytes+ // between slices are padding no signature hashes. The first slice is cut out+ // here rather than with `lipo`, which needs the Xcode command-line tools.+ writeFileSync(library, firstSlice(readFileSync("/usr/bin/true")));+ writeFileSync(+ join(dir, "modules.toml"),+ `"libdemo.dylib" = "${sha(library)}"\n`,+ );+ writeFileSync(+ join(dir, "demo-1.0.0-macos-15-arm64.tar.gz.sha256"),+ `${"a".repeat(64)}\n`,+ );+ return { app, modules, dir, library };+}++test(+ "signing re-pins modules.toml, and check verifies both",+ {+ skip: process.platform !== "darwin",+ },+ () => {+ const { app, modules, dir, library } = stagedApp();+ const unsigned = sha(library);+ const marker = readFileSync(+ join(dir, "demo-1.0.0-macos-15-arm64.tar.gz.sha256"),+ "utf8",+ );++ const signed = run("sign", app, ENTITLEMENTS, "-");+ assert.equal(signed.status, 0, signed.stderr);+ assert.notEqual(sha(library), unsigned, "codesign rewrites the library");+ assert.equal(+ readFileSync(join(dir, "modules.toml"), "utf8"),+ `"libdemo.dylib" = "${sha(library)}"\n`,+ "the allowlist names the signed file",+ );+ assert.equal(+ readFileSync(+ join(dir, "demo-1.0.0-macos-15-arm64.tar.gz.sha256"),+ "utf8",+ ),+ marker,+ );++ const clean = run("check", modules);+ assert.equal(clean.status, 1, "ad-hoc is not Developer ID");+ assert.equal(+ clean.stdout,+ "[sign-check] UNSIGNED for notarization: no-developer-id no-timestamp: demo/1.0.0/macos-15-arm64/libdemo.dylib\n",+ );++ // One changed byte in the second page. In a thin Mach-O every page before+ // the signature is hashed; the fixture is asserted rather than assumed, so a+ // byte that missed the hashed region fails here, not as a check bug.+ const bytes = readFileSync(library);+ const offset = 4096 + 16;+ assert.ok(+ bytes.length > 3 * 4096,+ "fixture is large enough to have a hashed second page",+ );+ assert.equal(+ spawnSync("codesign", ["--verify", "--strict", library]).status,+ 0,+ );+ bytes[offset] ^= 0xff;+ writeFileSync(library, bytes);+ assert.match(+ spawnSync("file", ["-b", library], { encoding: "utf8" }).stdout,+ /^Mach-O/,+ );+ assert.notEqual(+ spawnSync("codesign", ["--verify", "--strict", library]).status,+ 0,+ "the tampered byte is inside the hashed code",+ );+ const tampered = run("check", modules);+ assert.equal(tampered.status, 1);+ assert.match(tampered.stdout, /invalid-signature/);+ assert.match(tampered.stdout, /modules\.toml does not match its file/);+ },+);++test(+ "signing refuses a bundle that still ships a module archive",+ {+ skip: process.platform !== "darwin",+ },+ () => {+ const { app, dir } = stagedApp();+ writeFileSync(+ join(dir, "demo-1.0.0-macos-15-arm64.tar.gz"),+ "pinned bytes",+ );+ const result = run("sign", app, ENTITLEMENTS, "-");+ assert.equal(result.status, 1);+ assert.match(result.stderr, /module archives in the macOS bundle/);+ },+);++test("check fails when the bundle has no modules directory", () => {+ const result = run("check", join(tmpdir(), "openhuman-no-such-bundle"));+ assert.equal(result.status, 1);+ assert.match(result.stderr, /no bundled modules/);+});diff --git a/scripts/__tests__/self-hosted-lanes.test.mjs b/scripts/__tests__/self-hosted-lanes.test.mjsindex 6a5afc2115..484a39f126 100644--- a/scripts/__tests__/self-hosted-lanes.test.mjs+++ b/scripts/__tests__/self-hosted-lanes.test.mjs@@ -69,6 +69,32 @@ test("every hosted group resolves on its own, and every hosted lane has exactlyassert.deepEqual(grouped, plan.lanes.map((l) => l.name).sort());});+test("Rust coverage installs the mock backend dependencies without a frontend area", () => {+ for (const profile of ["hosted", "ex63"]) {+ const plan = buildPlan({+ profile,+ areas: { ...NONE, rustCore: true },+ env: profile === "ex63" ? EX63_ENV : {},+ });+ const selected = selectLanes(+ plan,+ profile === "ex63" ? ["frontend", "rust-cov"] : ["rust-cov"],+ );+ assert.deepEqual(validatePlan(selected), []);+ const checks = selected.lanes.flatMap((lane) => lane.checks);+ const install = checks.find((c) => c.name === "pnpm-install");+ assert.equal(install.when, true);+ assert.equal(install.run, "pnpm install --frozen-lockfile");+ assert.ok(+ checks+ .find((c) => c.name === "rust-core-coverage")+ .needs.includes(+ profile === "ex63" ? "frontend:pnpm-install" : "pnpm-install",+ ),+ );+ }+});+test("commands are static: no suite is ever narrowed to the diff", () => {for (const plan of plans()) {for (const run of allRuns(plan)) {@@ -97,6 +123,38 @@ test("ex63 runs the core's unit tests under nextest; hosted keeps cargo's runner);});+test("a core-only change still installs the node deps rust-core-coverage's mock backend imports", () => {+ const coreOnly = { ...NONE, rustCore: true };+ for (const plan of [+ buildPlan({ profile: "ex63", areas: coreOnly, env: EX63_ENV }),+ buildPlan({ profile: "hosted", areas: coreOnly }),+ ]) {+ const checks = new Map(+ plan.lanes.flatMap((l) =>+ l.checks.map((c) => [`${l.name}:${c.name}`, c]),+ ),+ );+ const cov = checks.get("rust-cov:rust-core-coverage");+ const install = cov.needs+ .map((n) => checks.get(n.includes(":") ? n : `rust-cov:${n}`))+ .find((c) => c.run === "pnpm install --frozen-lockfile");+ assert.ok(+ install,+ `${plan.profile}: rust-core-coverage needs a pnpm install`,+ );+ assert.equal(install.when, true, `${plan.profile}: that install runs`);+ // Exactly one install per profile: ex63 lanes share one checkout.+ const installs = [...checks.values()].filter(+ (c) => c.when && c.run === "pnpm install --frozen-lockfile",+ );+ assert.equal(installs.length, 1, plan.profile);+ }+ const hosted = buildPlan({ profile: "hosted", areas: coreOnly });+ const sub = selectLanes(hosted, ["rust-cov"]);+ assert.deepEqual(validatePlan(sub), []);+ assert.deepEqual(orderProblems(sub), []);+});+test("doctests, tui coverage and module-gated tests are outside the PR lane", () => {for (const plan of plans()) {const cov = plan.lanesdiff --git a/scripts/__tests__/stage-modules.test.mjs b/scripts/__tests__/stage-modules.test.mjsindex 8abf206fad..71bd239dbd 100644--- a/scripts/__tests__/stage-modules.test.mjs+++ b/scripts/__tests__/stage-modules.test.mjs@@ -1,8 +1,10 @@import assert from "node:assert/strict";-import { mkdtempSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";+import { existsSync, mkdtempSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";+import { createHash } from "node:crypto";import { tmpdir } from "node:os";import { join } from "node:path";import { createServer } from "node:http";+import { execFileSync } from "node:child_process";import { gzipSync } from "node:zlib";import { test } from "node:test";@@ -14,6 +16,9 @@ import {download,hostKeyForTarget,extractWindowsZip,+ keepsArchive,+ replaceArchiveWithMarker,+ stageModules,} from "../release/stage-modules.mjs";const HOST_KEYS = [@@ -106,6 +111,27 @@ test("host keys follow the Rust target triple, not the runner", () => {assert.throws(() => hostKeyForTarget("wasm32-unknown-unknown"), /no bundled modules/);});+test("only macOS bundles replace the archive with its digest marker", () => {+ for (const hostKey of HOST_KEYS) {+ assert.equal(keepsArchive(hostKey), !hostKey.startsWith("macos-"), hostKey);+ }+});++test("a macOS entry keeps only the archive's verified digest, in tinybus's marker format", () => {+ const dir = mkdtempSync(join(tmpdir(), "openhuman-marker-"));+ const archive = join(dir, "demo-1.0.0-macos-15-arm64.tar.gz");+ writeFileSync(archive, "archive bytes");+ writeFileSync(join(dir, "libdemo.dylib"), "library bytes");+ const sha = createHash("sha256").update(readFileSync(archive)).digest("hex");++ replaceArchiveWithMarker(archive, sha);++ assert.equal(existsSync(archive), false, "the archive must not ship");+ // tinybus reads `<archive>.sha256`, trims it and compares it to the pin.+ assert.equal(readFileSync(`${archive}.sha256`, "utf8"), `${sha}\n`);+ assert.equal(readFileSync(join(dir, "libdemo.dylib"), "utf8"), "library bytes");+});+async function withServer(handler, run) {const server = createServer(handler);await new Promise((resolve) => server.listen(0, "127.0.0.1", resolve));@@ -147,3 +173,37 @@ test("a stalled download times out instead of hanging", async () => {},);});++for (const hostKey of ["macos-15-arm64", "ubuntu-22.04-x86_64"]) {+ test(`stageModules on ${hostKey} ${keepsArchive(hostKey) ? "keeps the archive" : "replaces the archive with its verified digest"}`, async () => {+ const root = mkdtempSync(join(tmpdir(), "openhuman-stage-"));+ const source = join(root, "src");+ mkdirSync(source);+ const library = hostKey.startsWith("macos-") ? "libdemo.dylib" : "libdemo.so";+ writeFileSync(join(source, library), "library bytes");+ const archiveName = `demo-1.0.0-${hostKey}.tar.gz`;+ const built = join(root, archiveName);+ execFileSync("tar", ["-czf", built, "-C", source, library]);+ const bytes = readFileSync(built);+ const sha256 = createHash("sha256").update(bytes).digest("hex");+ const output = join(root, "out");++ await withServer((req, res) => res.end(bytes), async (url) => {+ await stageModules({+ hostKey,+ output,+ assets: [{ id: "demo", version: "1.0.0", hostKey, archive: archiveName, url, sha256 }],+ });+ });++ const dir = join(output, "demo", "1.0.0", hostKey);+ assert.equal(readFileSync(join(dir, library), "utf8"), "library bytes");+ if (keepsArchive(hostKey)) {+ assert.deepEqual(readFileSync(join(dir, archiveName)), bytes);+ assert.equal(existsSync(join(dir, `${archiveName}.sha256`)), false);+ } else {+ assert.equal(existsSync(join(dir, archiveName)), false, "the archive must not ship");+ assert.equal(readFileSync(join(dir, `${archiveName}.sha256`), "utf8"), `${sha256}\n`);+ }+ });+}diff --git a/scripts/__tests__/verify-i18n-bundle-args.test.mjs b/scripts/__tests__/verify-i18n-bundle-args.test.mjsindex f1340c3d51..ca40b899a4 100644--- a/scripts/__tests__/verify-i18n-bundle-args.test.mjs+++ b/scripts/__tests__/verify-i18n-bundle-args.test.mjs@@ -1,30 +1,64 @@-import assert from 'node:assert/strict';-import { spawnSync } from 'node:child_process';-import { dirname, resolve } from 'node:path';-import { fileURLToPath } from 'node:url';-import { test } from 'node:test';+import assert from "node:assert/strict";+import { spawnSync } from "node:child_process";+import { mkdtempSync, rmSync, writeFileSync } from "node:fs";+import { tmpdir } from "node:os";+import { dirname, join, resolve } from "node:path";+import { fileURLToPath } from "node:url";+import { test } from "node:test";const HERE = dirname(fileURLToPath(import.meta.url));-const SCRIPT = resolve(HERE, '..', 'verify-i18n-bundle.mjs');+const SCRIPT = resolve(HERE, "..", "verify-i18n-bundle.mjs");function run(args) {return spawnSync(process.execPath, [SCRIPT, ...args], {- encoding: 'utf8',+ encoding: "utf8",});}-test('verify-i18n-bundle --dist rejects a missing path before filesystem checks', () => {- const result = run(['--dist']);+test("verify-i18n-bundle --dist rejects a missing path before filesystem checks", () => {+ const result = run(["--dist"]);assert.equal(result.status, 2, result.stderr);assert.match(result.stderr, /--dist requires a path/);assert.doesNotMatch(result.stderr, /dist directory does not exist/);});-test('verify-i18n-bundle --dist rejects another flag as the path value', () => {- const result = run(['--dist', '--help']);+test("verify-i18n-bundle --dist rejects another flag as the path value", () => {+ const result = run(["--dist", "--help"]);assert.equal(result.status, 2, result.stderr);assert.match(result.stderr, /--dist requires a path/);assert.doesNotMatch(result.stderr, /dist directory does not exist/);});++function withBundle(content, assertion) {+ const dir = mkdtempSync(join(tmpdir(), "openhuman-i18n-bundle-"));+ try {+ writeFileSync(join(dir, "app.js"), content);+ assertion(run(["--dist", dir]));+ } finally {+ rmSync(dir, { recursive: true, force: true });+ }+}++test("verify-i18n-bundle accepts the Japanese picker and dictionary markers", () => {+ withBundle("zh-CN 简体中文 日本語 言語", (result) => {+ assert.equal(result.status, 0, result.stderr);+ });+});++test("verify-i18n-bundle rejects a build missing Japanese translations", () => {+ withBundle("zh-CN 简体中文 日本語", (result) => {+ assert.equal(result.status, 1, result.stderr);+ assert.match(result.stderr, /Japanese language setting translation/);+ });+});++test("verify-i18n-bundle accepts escaped Japanese markers", () => {+ withBundle(+ String.raw`zh-CN 简体中文 \u65e5\u672c\u8a9e \u8a00\u8a9e`,+ (result) => {+ assert.equal(result.status, 0, result.stderr);+ },+ );+});diff --git a/scripts/apply-i18n-translations.ts b/scripts/apply-i18n-translations.tsindex 518484fb2f..5bd861fb1b 100644--- a/scripts/apply-i18n-translations.ts+++ b/scripts/apply-i18n-translations.ts@@ -13,7 +13,7 @@* not present in the input).* - Rewrites <locale>.ts containing every English key in en.ts order. Value* precedence: new translation → existing translation → English fallback.- * - Single-quoted JS string literals with safe escaping. Header comment preserved.+ * - Single-quoted JS string literals with safe escaping. Locale header generated.** Usage:* pnpm exec tsx scripts/apply-i18n-translations.ts [--dir tmp/i18n-translations] [--locale es]@@ -39,6 +39,7 @@ const LOCALE_HEADERS: Record<string, string> = {ru: "Russian (Русский)",id: "Indonesian (Bahasa Indonesia)",it: "Italian (Italiano)",+ ja: "Japanese (日本語)",ko: "Korean (한국어)",pl: "Polish (Polski)",tr: "Turkish (Türkçe)",@@ -90,9 +91,9 @@ async function writeLocale(const lines: string[] = [];lines.push(`import type { TranslationMap } from './types';`);lines.push("");- lines.push(`// ${langLabel} translations. Keys mirror en.ts; missing/`);+ lines.push(`// ${langLabel} translations. Keys mirror en.ts.`);lines.push(- `// English-identical values fall back to English via I18nContext.resolveEn().`,+ `// Missing keys fall back to English via I18nContext.resolveEn().`,);lines.push(`const messages: TranslationMap = {`);for (const k of enKeysInOrder) {diff --git a/scripts/build-macos-signed.sh b/scripts/build-macos-signed.shindex 27bb068af1..4db134b50f 100755--- a/scripts/build-macos-signed.sh+++ b/scripts/build-macos-signed.sh@@ -127,6 +127,10 @@ unset APPLE_ID APPLE_PASSWORD APPLE_TEAM_IDenv | grep -E 'APPLE|TAURI|VITE' || true+# Same pinned modules as CI's "Bundle pinned native modules" step; on macOS+# each archive is replaced by its digest marker (see stage-modules.mjs).+node scripts/release/stage-modules.mjs+cd appecho "Building now... ${BUILD_ARGS[@]}"pnpm tauri build "${BUILD_ARGS[@]}"@@ -188,6 +192,9 @@ for bin in "$APP_PATH/Contents/Resources/"openhuman-core-*; do"$bin"done+# Bundled native modules (shared with scripts/release/sign-and-notarize-macos.sh)+bash scripts/release/macos-bundled-modules.sh sign "$APP_PATH" "$ENTITLEMENTS" "$APPLE_SIGNING_IDENTITY"+# Sign the .app bundle (signs main exe + updates seal)echo " Signing .app bundle..."codesign --force --options runtime \@@ -200,6 +207,8 @@ echoecho "Verifying code signature..."codesign --verify --deep --strict --verbose=2 "$APP_PATH"echo "Signature OK."+# Run even with --skip-notarize, so a local build fails where CI would.+bash scripts/release/macos-bundled-modules.sh check "$APP_PATH/Contents/Resources/bundled-modules"# ── Notarize ──────────────────────────────────────────────────────────if $SKIP_NOTARIZE; thendiff --git a/scripts/ci/check-dep-sim-calibration.sh b/scripts/ci/check-dep-sim-calibration.shindex 556a5b16d3..1c1e144161 100755--- a/scripts/ci/check-dep-sim-calibration.sh+++ b/scripts/ci/check-dep-sim-calibration.sh@@ -95,6 +95,10 @@ set -euo pipefailcd "$(dirname "$0")/../.."+# 316 -> 311 on 2026-10-05: the upstream Memory lifecycle refresh removed+# five names from the Linux flows graph; native builds remain at three.+# This matches the current `flows:332:311:3` entry in+# scripts/kernel-floor.limits; its preceding 316-name entry is historical.EXPECTED_NAMES=311exec python3 scripts/dep-sim.py --cut-nothing --expect-names "${EXPECTED_NAMES}"diff --git a/scripts/ci/rust-coverage.sh b/scripts/ci/rust-coverage.shindex c7399fe25c..4d0cbf0bce 100755--- a/scripts/ci/rust-coverage.sh+++ b/scripts/ci/rust-coverage.sh@@ -9,6 +9,17 @@ set -euo pipefailOUT="${OUT:-lcov-core.info}"PRODUCT_FEATURES="$(bash scripts/ci/product-features.sh)"+# Sandboxed acting-tool tests deliberately do not forward RUSTUP_HOME. The+# container installs Rust outside HOME, so its rustup proxy otherwise tries+# to create ~/.rustup inside the write-confined jail. Put the already selected+# toolchain binaries first; cargo --version then needs no rustup home writes.+# Keep cargo-installed subcommands on PATH after the toolchain directory.+if command -v rustup >/dev/null 2>&1; then+ if COV_TOOLCHAIN_CARGO="$(rustup which cargo 2>/dev/null)"; then+ export PATH="$(dirname "$COV_TOOLCHAIN_CARGO"):$PATH"+ fi+fi+log() { echo "[ci][rust-cov] $*"; }# cargo-llvm-cov owns RUSTFLAGS while it instruments crates. Keeping thediff --git a/scripts/ci/self-hosted/lanes-plan.mjs b/scripts/ci/self-hosted/lanes-plan.mjsindex 71e5242cd6..59f275fccf 100644--- a/scripts/ci/self-hosted/lanes-plan.mjs+++ b/scripts/ci/self-hosted/lanes-plan.mjs@@ -204,7 +204,10 @@ export function buildPlan({ profile, areas, env = {}, isPullRequest = true }) {checks: [{name: "pnpm-install",- when: areas.frontend || areas.i18n || areas.scripts,+ // ex63: also for a core change, so rust-core-coverage's mock backend+ // (scripts/mock-api-server.mjs imports `ws`) can start when no+ // frontend file changed. One install per VM: lanes share a checkout.+ when: areas.frontend || areas.i18n || areas.scripts || (ex63 && core),run: "pnpm install --frozen-lockfile",},{@@ -288,6 +291,13 @@ export function buildPlan({ profile, areas, env = {}, isPullRequest = true }) {targetDir: targetDir("cov"),env: covEnv,checks: [+ // hosted: rust-cov has a runner of its own, so it installs the node+ // deps the mock backend needs itself (ex63 reuses frontend's install).+ {+ name: "pnpm-install",+ when: !ex63 && core,+ run: "pnpm install --frozen-lockfile",+ },{name: "test-modules",when: core,@@ -303,7 +313,10 @@ export function buildPlan({ profile, areas, env = {}, isPullRequest = true }) {{name: "rust-core-coverage",when: core,- needs: ["test-modules"],+ needs: [+ "test-modules",+ ex63 ? "frontend:pnpm-install" : "pnpm-install",+ ],// Doctests and tui coverage run on pushes to main instead (see above).// ex63: the core's unit tests run under cargo-nextest, one process// per test and in parallel (the guest image ships cargo-nextest).diff --git a/scripts/i18n-coverage.ts b/scripts/i18n-coverage.tsindex 2ebddbc51c..eb99e65699 100644--- a/scripts/i18n-coverage.ts+++ b/scripts/i18n-coverage.ts@@ -42,6 +42,7 @@ const ALL_LOCALES = ["ru","id","it",+ "ja","ko","pl","tr",diff --git a/scripts/i18n-find-english.ts b/scripts/i18n-find-english.tsindex 02af2cfd65..3c4107b6d4 100644--- a/scripts/i18n-find-english.ts+++ b/scripts/i18n-find-english.ts@@ -10,7 +10,7 @@* Detection strategy (per locale):* - Technical literals are skipped (pure placeholders, URLs, single-token identifiers,* file paths, commands, values with no real word).- * - Non-Latin-script locales (zh-CN, hi, bn, ar, ru, ko): a non-technical value that+ * - Non-Latin-script locales (zh-CN, hi, bn, ar, ru, ko, ja): a non-technical value that* contains NO character of the locale's native script is treated as English.* (High recall — vocabulary-independent.)* - Latin-script locales (de, es, fr, it, pt, id, pl, tr): a non-technical value is flagged@@ -40,6 +40,7 @@ const NATIVE_SCRIPT: Record<string, RegExp> = {bn: /[ঀ-]/,ar: /[-ۿݐ-ݿࢠ-ࣿﭐ-﷿ﹰ-]/,ru: /[Ѐ-ӿ]/,+ ja: /[\u3040-\u30ff\u3400-\u9fff\uff66-\uff9f]/,ko: /[가-ᄀ-ᇿ-]/,};diff --git a/scripts/kernel-floor.limits b/scripts/kernel-floor.limitsindex 1f0f75d53e..562042f52c 100644--- a/scripts/kernel-floor.limits+++ b/scripts/kernel-floor.limits@@ -650,4 +650,6 @@# into the required host runtime. The migration adds five# resolved packages and four unique crate names; it does# not add a native build dependency.+# 332/311/3 2026-10-04 Memory lifecycle refresh removed five packages/names+# from the Linux flows graph; native builds remain at 3.flows:332:311:3diff --git a/scripts/release/macos-bundled-modules.sh b/scripts/release/macos-bundled-modules.shnew file mode 100755index 0000000000..85f14e6618--- /dev/null+++ b/scripts/release/macos-bundled-modules.sh@@ -0,0 +1,129 @@+#!/usr/bin/env bash+# Bundled native modules in a macOS .app, shared by the CI release signer+# (sign-and-notarize-macos.sh) and the local signed build+# (build-macos-signed.sh) so both ship the same thing.+#+# Usage:+# macos-bundled-modules.sh sign <app_path> <entitlements_plist> <identity>+# macos-bundled-modules.sh check <bundled-modules dir>+#+# sign: codesign every Mach-O under Contents/Resources/bundled-modules with+# hardened runtime and a secure timestamp. Run before sealing the .app.+# tinybus pins the module *archive* digest, and on macOS stage-modules.mjs+# replaces that archive with its `.sha256` marker, so signing the extracted+# files in place does not break admission. Every Mach-O, not only the dylib:+# tinycomputer ships helper executables beside its library. A release's+# modules.toml pins its library's sha256, which tinybus re-checks on every+# load, and signing rewrites the file; so each entry naming a file signed+# here is rewritten to the signed hash. The installer vouches for it under+# the app's seal, as it does for the archive marker. Nothing else changes.+#+# check: fail when any Mach-O under the directory — loose, or inside a shipped+# .tar.gz — lacks what notarization demands: a valid Developer ID signature,+# hardened runtime and a secure timestamp. Apple's notary service unpacks+# nested archives, so archive members count too. Also fail when a+# modules.toml entry is not the sha256 of the file it names: a sign without+# the rewrite, or a rewrite without a sign, is refused by tinybus at load.+set -euo pipefail++# Rewrite the `"<name>" = "<sha256>"` entry for <file> in its sibling+# modules.toml, if it has one, to the file's current sha256.+repin_allowlist() { # <file>+ local toml name sha tmp+ toml="$(dirname "$1")/modules.toml"+ [ -f "$toml" ] || return 0+ name="$(basename "$1")"+ grep -qF "\"$name\" = " "$toml" || return 0+ sha="$(shasum -a 256 "$1" | cut -d' ' -f1)"+ tmp="$(mktemp)"+ awk -v key="\"$name\"" -v sha="$sha" -F ' = ' \+ '$1 == key { print key " = \"" sha "\""; next } { print }' "$toml" > "$tmp"+ cat "$tmp" > "$toml"+ rm -f "$tmp"+ echo "[sign] modules.toml: $name = $sha"+}++cmd="${1:-}"+case "$cmd" in+ sign)+ APP_PATH="${2:?sign needs <app_path>}"+ ENTITLEMENTS="${3:?sign needs <entitlements_plist>}"+ IDENTITY="${4:?sign needs <identity>}"+ # A pinned archive cannot be signed without changing the pinned bytes, and+ # notarization unpacks it; on macOS stage-modules.mjs replaces each one+ # with its `.sha256` marker. One here means staging went wrong.+ archives="$(find "$APP_PATH/Contents/Resources/bundled-modules" -name '*.tar.gz' -type f 2>/dev/null)"+ if [ -n "$archives" ]; then+ echo "[sign] ERROR: module archives in the macOS bundle (stage-modules.mjs should have replaced them):" >&2+ echo "$archives" >&2+ exit 1+ fi+ while IFS= read -r -d '' bin; do+ file -b "$bin" | grep -q '^Mach-O' || continue+ echo "[sign] Signing bundled module: ${bin#"$APP_PATH/Contents/Resources/"}"+ codesign --force --options runtime \+ --entitlements "$ENTITLEMENTS" \+ --sign "$IDENTITY" \+ --timestamp \+ "$bin"+ repin_allowlist "$bin"+ done < <(find "$APP_PATH/Contents/Resources/bundled-modules" -type f -print0 2>/dev/null)+ ;;+ check)+ ROOT="${2:?check needs <bundled-modules dir>}"+ # Every caller stages modules before building the app, and tauri.conf.json+ # bundles the directory, so its absence is a packaging failure.+ [ -d "$ROOT" ] || { echo "[sign-check] no bundled modules at $ROOT" >&2; exit 1; }+ SCRATCH="$(mktemp -d)"+ trap 'rm -rf "$SCRATCH"' EXIT+ BAD=0+ check_tree() { # <dir> <label prefix>+ while IFS= read -r -d '' f; do+ file -b "$f" | grep -q '^Mach-O' || continue+ info="$(codesign -dvv "$f" 2>&1 || true)"+ problems=""+ # -dvv only reads the signature's metadata; this checks it still+ # matches the file.+ codesign --verify --strict "$f" >/dev/null 2>&1 || problems+=" invalid-signature"+ grep -q '^Authority=Developer ID Application' <<<"$info" || problems+=" no-developer-id"+ grep -q '^Timestamp=' <<<"$info" || problems+=" no-timestamp"+ grep -q '^CodeDirectory.*flags=.*runtime' <<<"$info" || problems+=" no-hardened-runtime"+ if [ -n "$problems" ]; then+ echo "[sign-check] UNSIGNED for notarization:$problems: $2${f#"$1"/}"+ BAD=1+ fi+ done < <(find "$1" -type f -print0)+ }+ check_tree "$ROOT" ""+ while IFS= read -r -d '' toml; do+ while IFS= read -r line; do+ [[ "$line" =~ ^\"([^\"]+)\"\ =\ \"([0-9a-f]{64})\"$ ]] || continue+ file="$(dirname "$toml")/${BASH_REMATCH[1]}"+ actual="$( [ -f "$file" ] && shasum -a 256 "$file" | cut -d' ' -f1 || echo missing)"+ if [ "$actual" != "${BASH_REMATCH[2]}" ]; then+ echo "[sign-check] modules.toml does not match its file ($actual): ${file#"$ROOT"/}"+ BAD=1+ fi+ done < "$toml"+ done < <(find "$ROOT" -name modules.toml -type f -print0)+ while IFS= read -r -d '' archive; do+ dest="$SCRATCH/$(basename "$archive")"+ mkdir -p "$dest"+ if ! tar -xzf "$archive" -C "$dest"; then+ echo "[sign-check] cannot extract archive: ${archive#"$ROOT"/}"+ BAD=1+ continue+ fi+ check_tree "$dest" "${archive#"$ROOT"/}/"+ done < <(find "$ROOT" -name '*.tar.gz' -type f -print0)+ if [ "$BAD" -ne 0 ]; then+ echo "[sign-check] ERROR: notarization or tinybus would reject the files above" >&2+ exit 1+ fi+ echo "[sign-check] every Mach-O under $ROOT is notarization-ready"+ ;;+ *)+ sed -n '2,/^set -euo/p' "$0" | sed '$d' >&2+ exit 1+ ;;+esacdiff --git a/scripts/release/sign-and-notarize-macos.sh b/scripts/release/sign-and-notarize-macos.shindex e6acf39e5b..0dd0017951 100755--- a/scripts/release/sign-and-notarize-macos.sh+++ b/scripts/release/sign-and-notarize-macos.sh@@ -123,13 +123,8 @@ for bin in "$APP_PATH/Contents/Resources/"openhuman-core-*; docodesign_hardened "$bin"done-# Bundled native modules: notarization rejects unsigned Mach-O under Resources/.-# tinybus pins the module *archive* digest, not the extracted dylib, so signing-# the extracted library in place does not break admission.-while IFS= read -r -d '' lib; do- echo "[sign] Signing bundled module: ${lib#"$APP_PATH/Contents/Resources/"}"- codesign_hardened "$lib"-done < <(find "$APP_PATH/Contents/Resources/bundled-modules" -name '*.dylib' -type f -print0 2>/dev/null)+# Bundled native modules (shared with build-macos-signed.sh).+bash "$(dirname "$0")/macos-bundled-modules.sh" sign "$APP_PATH" "$ENTITLEMENTS" "$APPLE_SIGNING_IDENTITY"# ── Outer .app bundle ───────────────────────────────────────────────────────echo "[sign] Signing .app bundle..."@@ -139,6 +134,10 @@ codesign_hardened "$APP_PATH"echo "[sign] Verifying signatures"codesign --verify --deep --strict --verbose=2 "$APP_PATH"+# Fail here, with every offending path, rather than after a notarization+# round trip. This includes Mach-O inside the pinned release archives.+bash "$(dirname "$0")/macos-bundled-modules.sh" check "$APP_PATH/Contents/Resources/bundled-modules"+# ── Notarize ─────────────────────────────────────────────────────────────────echo "[sign] Notarizing..."NOTARIZE_ZIP="$(mktemp /tmp/OpenHuman-notarize-XXXXXX.zip)"diff --git a/scripts/release/stage-modules.mjs b/scripts/release/stage-modules.mjsindex 8e56775136..ac3a8457ef 100644--- a/scripts/release/stage-modules.mjs+++ b/scripts/release/stage-modules.mjs@@ -4,7 +4,8 @@// installer, release tarball or bench image needs no GitHub access to load a// module. The output layout is `<id>/<version>/<host_key>/<archive>` plus the// extracted library, which is what `modules::ops::set_bundled_releases_dir`-// (or `OPENHUMAN_BUNDLED_MODULES`) points at.+// (or `OPENHUMAN_BUNDLED_MODULES`) points at. On macOS the archive is replaced+// by `<archive>.sha256` holding its verified pin (see `keepsArchive`).//// Usage: node scripts/release/stage-modules.mjs [--target TRIPLE | --host-key KEY] [--output DIR]//@@ -66,6 +67,23 @@ export function hostKeyForTarget(triple) {throw new Error(`no bundled modules for target ${triple}`);}+/**+ * Whether the staged entry keeps its release archive. A notarized macOS app+ * cannot: Apple's notary service unpacks it and rejects the unsigned Mach-O+ * inside, and signing them would change the pinned bytes. There the archive is+ * replaced by its verified digest, which tinybus admits from the installer+ * bundle only; the extracted files are signed and sealed with the app.+ */+export function keepsArchive(hostKey) {+ return !hostKey.startsWith("macos-");+}++/** Replace a verified `archive` with `<archive>.sha256` holding `sha256`. */+export function replaceArchiveWithMarker(archive, sha256) {+ writeFileSync(`${archive}.sha256`, `${sha256}\n`);+ rmSync(archive);+}+export function bundledAssets(source, hostKey) {const names = parseAllList(source);const records = parseRecords(source);@@ -170,8 +188,11 @@ export async function download(url, destination, timeoutMs = DOWNLOAD_TIMEOUT_MSthrow new Error(`download of ${url} failed: ${lastError}`);}-export async function stageModules({ hostKey = defaultHostKey(), output = OUTPUT } = {}) {- const assets = bundledAssets(readRegistrySource(), hostKey);+export async function stageModules({+ hostKey = defaultHostKey(),+ output = OUTPUT,+ assets = bundledAssets(readRegistrySource(), hostKey),+} = {}) {rmSync(output, { recursive: true, force: true });mkdirSync(output, { recursive: true });writeFileSync(join(output, ".gitkeep"), "");@@ -188,6 +209,7 @@ export async function stageModules({ hostKey = defaultHostKey(), output = OUTPUTif (librariesUnder(dir).length !== 1) {throw new Error(`${asset.id}: expected exactly one native library in the release archive`);}+ if (!keepsArchive(asset.hostKey)) replaceArchiveWithMarker(archive, actual);console.log(`[bundled-modules] staged ${asset.id} ${asset.version} (${asset.hostKey})`);}console.log(`[bundled-modules] staged ${assets.length} verified releases for ${hostKey}`);diff --git a/scripts/verify-i18n-bundle.mjs b/scripts/verify-i18n-bundle.mjsindex 9e124a95f1..8041549b6f 100644--- a/scripts/verify-i18n-bundle.mjs+++ b/scripts/verify-i18n-bundle.mjs@@ -40,6 +40,14 @@ function listJsFiles(dir) {}const requiredMarkers = [+ {+ label: "Japanese picker label",+ needles: ["日本語", "\\u65e5\\u672c\\u8a9e"],+ },+ {+ label: "Japanese language setting translation",+ needles: ["言語", "\\u8a00\\u8a9e"],+ },{label: "zh-CN locale key",needles: ["zh-CN"],diff --git a/tests/cli_model_overrides_e2e.rs b/tests/cli_model_overrides_e2e.rsindex 6191775f5f..733346d4af 100644--- a/tests/cli_model_overrides_e2e.rs+++ b/tests/cli_model_overrides_e2e.rs@@ -120,3 +120,57 @@ fn cli_rejects_a_missing_model_value() {assert!(!output.status.success());assert!(String::from_utf8_lossy(&output.stderr).contains("missing value for --model"));}++#[test]+fn core_boot_accepts_a_configured_master_key_from_either_source() {+ let key = "ab".repeat(32);+ let file_dir = tempfile::tempdir().expect("master-key directory");+ let key_path = file_dir.path().join("master.key");+ std::fs::write(&key_path, format!("{key}\n")).expect("write master key");+ #[cfg(unix)]+ {+ use std::os::unix::fs::PermissionsExt;+ std::fs::set_permissions(&key_path, std::fs::Permissions::from_mode(0o600))+ .expect("restrict master key");+ }++ for (name, value) in [+ ("OPENHUMAN_KEYRING_MASTER_KEY", key.as_str()),+ (+ "OPENHUMAN_KEYRING_MASTER_KEY_FILE",+ key_path.to_str().expect("key path is UTF-8"),+ ),+ ] {+ let workspace = tempfile::tempdir().expect("workspace");+ let output = Command::new(env!("CARGO_BIN_EXE_openhuman-core"))+ .args(["config", "get"])+ .env("OPENHUMAN_APP_ENV", "staging")+ .env("OPENHUMAN_WORKSPACE", workspace.path())+ .env("OPENHUMAN_KEYRING_MASTER_KEY", "")+ .env("OPENHUMAN_KEYRING_MASTER_KEY_FILE", "")+ .env(name, value)+ .output()+ .expect("run OpenHuman core");+ assert!(+ output.status.success(),+ "{name} boot failed: {}",+ String::from_utf8_lossy(&output.stderr)+ );+ }+}++#[test]+fn core_boot_rejects_a_malformed_configured_master_key() {+ let workspace = tempfile::tempdir().expect("workspace");+ let output = Command::new(env!("CARGO_BIN_EXE_openhuman-core"))+ .args(["config", "get"])+ .env("OPENHUMAN_APP_ENV", "staging")+ .env("OPENHUMAN_WORKSPACE", workspace.path())+ .env("OPENHUMAN_KEYRING_MASTER_KEY", "not-a-key")+ .output()+ .expect("run OpenHuman core");+ assert!(!output.status.success());+ let stderr = String::from_utf8_lossy(&output.stderr);+ assert!(stderr.contains("OPENHUMAN_KEYRING_MASTER_KEY"), "{stderr}");+ assert!(!stderr.contains("not-a-key"), "{stderr}");+}diff --git a/tests/in_process/worker_c_modules_e2e.rs b/tests/in_process/worker_c_modules_e2e.rsindex 1ce9febbcb..af87b31b64 100644--- a/tests/in_process/worker_c_modules_e2e.rs+++ b/tests/in_process/worker_c_modules_e2e.rs@@ -751,6 +751,22 @@ async fn memory_v2_controller_surface_is_reachable() {let response = rpc(&harness.rpc_base, 100 + offset as i64, method, json!({})).await;assert_rpc_completed(&response, method);}+ for (offset, method) in [+ "openhuman.memory_conversations_get",+ "openhuman.memory_context_get",+ ]+ .into_iter()+ .enumerate()+ {+ let response = rpc(&harness.rpc_base, 200 + offset as i64, method, json!({})).await;+ let message = response["error"]["message"]+ .as_str()+ .expect("retired memory method returns a dispatch error");+ assert!(+ message.starts_with(UNKNOWN_METHOD_PREFIX),+ "{method}: {response}"+ );+ }}async fn serve_source_fixtures() -> (String, tokio::task::JoinHandle<Result<(), std::io::Error>>) {diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rsindex 1338257155..884b952ada 100644--- a/tests/json_rpc_e2e.rs+++ b/tests/json_rpc_e2e.rs@@ -4048,8 +4048,77 @@ async fn json_rpc_web_chat_routing_cases_use_expected_backend_models_inner() {Some(*expected_model),"case={model_override} request={request:?}");+ assert_eq!(+ request.get("path").and_then(Value::as_str),+ Some("/openai/v1/chat/completions"),+ "valid managed route should reach the managed backend: case={model_override} request={request:?}"+ );+ assert_eq!(+ request.get("authorization").and_then(Value::as_str),+ Some("Bearer e2e-test-jwt"),+ "valid managed route should use the stored backend session credential: case={model_override} request={request:?}"+ );}+ // An unknown qualified provider must fail during the real core turn+ // setup, rather than silently reusing a previously configured provider.+ with_chat_completion_requests(|requests| requests.clear());+ let unknown_client_id = "routing-unknown-provider-client";+ let unknown_thread_id = "routing-unknown-provider-thread";+ let unknown_events_url = format!("{rpc_base}/events?client_id={unknown_client_id}");+ let unknown_sse_task =+ tokio::spawn(async move { read_terminal_web_chat_event(&unknown_events_url).await });+ let unknown_web_chat = post_json_rpc(+ &rpc_base,+ 200,+ "openhuman.channel_web_chat",+ json!({+ "client_id": unknown_client_id,+ "thread_id": unknown_thread_id,+ "message": "unknown provider route",+ "model_override": "unknown-provider:model",+ }),+ )+ .await;+ let unknown_result = assert_no_jsonrpc_error(&unknown_web_chat, "unknown provider turn");+ assert_eq!(+ unknown_result+ .get("result")+ .and_then(|value| value.get("accepted")),+ Some(&json!(true))+ );++ let unknown_event = tokio::time::timeout(Duration::from_secs(12), unknown_sse_task)+ .await+ .expect("timed out waiting for unknown-provider chat_error")+ .expect("unknown-provider SSE task join should succeed");+ assert_eq!(+ unknown_event.get("event").and_then(Value::as_str),+ Some("chat_error"),+ "unknown provider route should fail at the core boundary: {unknown_event}"+ );+ let unknown_turn_requests = with_chat_completion_requests(|requests| {+ requests+ .iter()+ .filter(|request| {+ request["body"]["messages"]+ .as_array()+ .is_some_and(|messages| {+ messages.iter().any(|entry| {+ entry["content"]+ .as_str()+ .is_some_and(|content| content.contains("unknown provider route"))+ })+ })+ })+ .cloned()+ .collect::<Vec<_>>()+ });+ assert!(+ unknown_turn_requests.is_empty(),+ "unknown selected route must emit chat_error without an inference request attributable to its user message; captured requests={unknown_turn_requests:?}"+ );+mock_join.abort();rpc_join.abort();}@@ -4118,12 +4187,25 @@ async fn json_rpc_web_chat_custom_chat_provider_uses_stored_key_and_rebuilds_on_"endpoint": mock_origin,"auth_style": "bearer"}],- "chat_provider": "openai:gpt-4.1-mini"+ "default_model": "openai:gpt-4.1-mini"}),).await;assert_no_jsonrpc_error(&update, "update_model_settings");+ let initial_config_get =+ post_json_rpc(&rpc_base, 6999, "openhuman.config_get", json!({})).await;+ let initial_config_result = assert_no_jsonrpc_error(&initial_config_get, "initial config_get");+ let initial_config_payload = peel_logs_envelope(initial_config_result);+ let initial_config = initial_config_payload+ .get("config")+ .unwrap_or(initial_config_payload);+ assert_eq!(+ initial_config.get("default_model").and_then(Value::as_str),+ Some("openai:gpt-4.1-mini"),+ "config_get must expose the authoritative configured BYOK default before any turn override"+ );+let store_provider = post_json_rpc(&rpc_base,6003,@@ -4201,7 +4283,7 @@ async fn json_rpc_web_chat_custom_chat_provider_uses_stored_key_and_rebuilds_on_6005,"openhuman.update_model_settings",json!({- "chat_provider": "openai:gpt-4.1-nano"+ "default_model": "openai:gpt-4.1-nano"}),).await;@@ -4310,6 +4392,127 @@ async fn json_rpc_web_chat_custom_chat_provider_uses_stored_key_and_rebuilds_on_Some("openrouter/deepseek/deepseek-v4-flash"));+ async fn assert_managed_turn(+ rpc_base: &str,+ request_id: i64,+ client_id: &str,+ thread_id: &str,+ message: &str,+ expected_model: &str,+ model_override: Option<&str>,+ ) {+ let events_url = format!("{}/events?client_id={}", rpc_base, client_id);+ let (sse_task, request_tx) =+ spawn_ready_terminal_web_chat_event_for_request(&events_url).await;+ let mut params = json!({+ "client_id": client_id,+ "thread_id": thread_id,+ "message": message,+ });+ if let Some(model_override) = model_override {+ params["model_override"] = json!(model_override);+ }+ let accepted =+ post_json_rpc(rpc_base, request_id, "openhuman.channel_web_chat", params).await;+ let accepted_result = assert_no_jsonrpc_error(&accepted, "channel_web_chat managed");+ assert_eq!(+ accepted_result+ .get("result")+ .and_then(|v| v.get("accepted")),+ Some(&json!(true))+ );+ signal_accepted_web_chat_request_id(request_tx, accepted_result);+ let sse_event = tokio::time::timeout(Duration::from_secs(12), sse_task)+ .await+ .expect("timed out waiting for managed chat_done")+ .expect("managed sse join");+ assert_eq!(+ sse_event.get("event").and_then(Value::as_str),+ Some("chat_done"),+ "unexpected managed terminal event: {sse_event}"+ );+ let request = wait_for_chat_completion_request_with_message(message).await;+ assert_eq!(+ request.get("path").and_then(Value::as_str),+ Some("/openai/v1/chat/completions")+ );+ assert_eq!(+ request.get("model").and_then(Value::as_str),+ Some(expected_model)+ );+ assert_eq!(+ request.get("authorization").and_then(Value::as_str),+ Some("Bearer e2e-test-jwt"),+ "managed request must use the backend session credential"+ );+ }++ let picker_model = "openrouter/author/picker-model:free";+ assert_managed_turn(+ &rpc_base,+ 6008,+ client_id,+ thread_id,+ "Explicit managed picker model with warm BYOK session",+ picker_model,+ Some(picker_model),+ )+ .await;+ let config_get = post_json_rpc(&rpc_base, 6009, "openhuman.config_get", json!({})).await;+ let config_result = assert_no_jsonrpc_error(&config_get, "config_get after managed override");+ let config_payload = peel_logs_envelope(config_result);+ let config = config_payload.get("config").unwrap_or(config_payload);+ assert_eq!(+ config.get("default_model").and_then(Value::as_str),+ Some("openai:gpt-4.1-nano"),+ "a per-turn managed selection must not replace the configured BYOK provider"+ );++ let first_managed_default = "openrouter/author/first-default-model:free";+ let update_first_default = post_json_rpc(+ &rpc_base,+ 6010,+ "openhuman.update_model_settings",+ json!({ "default_model": first_managed_default }),+ )+ .await;+ assert_no_jsonrpc_error(+ &update_first_default,+ "update_model_settings first managed default",+ );+ assert_managed_turn(+ &rpc_base,+ 6011,+ client_id,+ thread_id,+ "Managed default first route cache turn",+ first_managed_default,+ None,+ )+ .await;++ let second_managed_default = "openrouter/author/second-default-model:free";+ let update_second_default = post_json_rpc(+ &rpc_base,+ 6012,+ "openhuman.update_model_settings",+ json!({ "default_model": second_managed_default }),+ )+ .await;+ assert_no_jsonrpc_error(+ &update_second_default,+ "update_model_settings second managed default",+ );+ assert_managed_turn(+ &rpc_base,+ 6013,+ client_id,+ thread_id,+ "Managed default second route cache turn",+ second_managed_default,+ None,+ )+ .await;mock_join.abort();rpc_join.abort();}diff --git a/tests/memory_v2_e2e.rs b/tests/memory_v2_e2e.rsindex 8b1008f45a..cd9306f4f4 100644--- a/tests/memory_v2_e2e.rs+++ b/tests/memory_v2_e2e.rs@@ -836,6 +836,97 @@ async fn learn_list_fetch_recall_and_forget_round_trip() {assert_eq!(none["forgotten"], json!(0));}+/// The `/memory/*` requests the mock logged after the first `skip`, as+/// `METHOD path` lines.+async fn memory_requests_since(f: &Fixture, skip: usize) -> Vec<String> {+ f.mock+ .request_rows()+ .await+ .into_iter()+ .skip(skip)+ .filter_map(|row| {+ let url = row["url"].as_str()?.to_string();+ url.starts_with("/memory/").then(|| {+ let method = row["method"].as_str().unwrap_or("?");+ format!("{method} {}", url.split('?').next().unwrap_or(&url))+ })+ })+ .collect()+}++/// The memory calls made after the one experience write in `calls`.+fn after_the_write(calls: &[String]) -> &[String] {+ let writes: Vec<usize> = calls+ .iter()+ .enumerate()+ .filter(|(_, call)| call.as_str() == "POST /memory/experience")+ .map(|(index, _)| index)+ .collect();+ assert_eq!(writes.len(), 1, "exactly one experience write: {calls:?}");+ &calls[writes[0] + 1..]+}++#[tokio::test]+async fn the_agent_learn_returns_on_accept_and_recall_finds_it() {+ let f = Fixture::new(true).await;+ let config = openhuman_core::config::load_config_with_timeout()+ .await+ .expect("the signed-in config");+ let facts = openhuman_core::memory::tools::CallFacts::of(+ &config,+ &openhuman_core::memory::scope::MemoryIdentity::agent("orchestrator"),+ );++ // Control: `memory_learn` over RPC returns once the write is readable, so+ // the hosted engine reads the store back after its write.+ let before = f.mock.request_rows().await.len();+ f.learn("Carol keeps her standup notes in a paper notebook")+ .await;+ let rpc_calls = memory_requests_since(&f, before).await;+ assert!(+ after_the_write(&rpc_calls)+ .iter()+ .any(|call| call == "GET /memory/events"),+ "the RPC learn must read its write back before returning: {rpc_calls:?}"+ );++ // The agent's tool returns on accept: nothing follows its one write (the+ // read before it is the engine's replay lookup), and the model is told+ // recall may lag.+ let before = f.mock.request_rows().await.len();+ let learned = openhuman_core::memory::tools::run_action(+ &config,+ &json!({"action": "learn", "text": "Dave takes his coffee with oat milk"}),+ &facts,+ )+ .await;+ assert!(!learned.is_error, "{}", learned.text());+ let tool_calls = memory_requests_since(&f, before).await;+ assert!(+ after_the_write(&tool_calls).is_empty(),+ "the agent learn must return right after its write, with no visibility reads: {tool_calls:?}"+ );+ let view: Value = serde_json::from_str(&learned.text()).expect("learn result json");+ let id = view["id"].as_str().expect("learn keeps the receipt id");+ assert_eq!(view["status"], json!("saved; searchable in recall shortly"));++ // Shortly after, the learning is readable like any other.+ let deadline = Instant::now() + Duration::from_secs(30);+ loop {+ let listed = f+ .ok(+ "openhuman.memory_items_list",+ json!({ "filter": { "kinds": ["learning"] } }),+ )+ .await;+ if ids_of(&listed, "items").iter().any(|known| known == id) {+ break;+ }+ assert!(Instant::now() < deadline, "never listed: {listed}");+ tokio::time::sleep(Duration::from_millis(250)).await;+ }+}+#[tokio::test]async fn memory_is_isolated_per_account() {let f = Fixture::new(true).await;diff --git a/tests/raw_coverage/composio_raw_coverage_e2e.rs b/tests/raw_coverage/composio_raw_coverage_e2e.rsindex e9ccc159ae..3e9cd42c52 100644--- a/tests/raw_coverage/composio_raw_coverage_e2e.rs+++ b/tests/raw_coverage/composio_raw_coverage_e2e.rs@@ -214,7 +214,9 @@ async fn composio_controller_registry_and_scope_handlers_cover_validation_edges(// the test to an isolated workspace so the scope store does not depend on// a developer's local config.let workspace = tempdir().expect("isolated workspace");- let _workspace = WorkspaceEnvGuard::set(workspace.path());+ let workspace_dir = workspace.path().join("workspace");+ std::fs::create_dir_all(&workspace_dir).expect("create isolated workspace");+ let _workspace = WorkspaceEnvGuard::set(&workspace_dir);let schemas = all_composio_controller_schemas();let registered = all_composio_registered_controllers();assert_eq!(schemas.len(), registered.len());@@ -269,9 +271,7 @@ async fn composio_controller_registry_and_scope_handlers_cover_validation_edges(assert_eq!(reread.pointer("/admin"), Some(&json!(true)));assert_eq!(reread.pointer("/write"), Some(&json!(false)));assert!(- workspace- .path()- .join("workspace")+ workspace_dir.join("integrations").join("composio_user_scopes.json").exists(),diff --git a/tests/windows_sandbox_env_e2e.rs b/tests/windows_sandbox_env_e2e.rsnew file mode 100644index 0000000000..300254113f--- /dev/null+++ b/tests/windows_sandbox_env_e2e.rs@@ -0,0 +1,298 @@+//! Windows child-environment e2e for OpenHuman's own sandbox execution path.+//!+//! Both `sandbox::ops` exec functions call `Command::env_clear()` and re-forward+//! only `SANDBOX_ENV_PASSTHROUGH`, so that list is the entire environment a+//! sandboxed child gets. This test measures what a real child sees when spawned+//! through `execute_in_sandbox` — the same function the `shell`, `node_exec`,+//! `npm_exec` and `python_exec` tools route into whenever the active agent is+//! `SandboxMode::Sandboxed` (which the built-in `orchestrator` is).+//!+//! The defect this pins: the list carried no Windows process-bootstrap+//! variables. A child without `SystemRoot` cannot initialise the OS crypto+//! provider, and the failures are opaque to the agent rather than diagnostic:+//!+//! - `node.exe` aborts at startup — `Assertion failed: ncrypto::CSPRNG(nullptr, 0)`, exit 134.+//! - `powershell.exe` exits with `Internal Windows PowerShell error. Loading+//! managed Windows PowerShell failed with error 8009001d.`+//!+//! Note on method: these must be spawned from Rust. `node`'s own+//! `child_process.spawn` (libuv) injects `SystemRoot` into the child, and a+//! probe driven through `cmd.exe` from JavaScript reports it as present, so a+//! JS harness cannot observe the stripping at all.++#[cfg(windows)]+use std::collections::HashMap;+#[cfg(windows)]+use std::time::Duration;++#[cfg(windows)]+use openhuman_core::agent::harness::definition::SandboxMode;+#[cfg(windows)]+use openhuman_core::config::RuntimeConfig;+#[cfg(windows)]+use openhuman_core::sandbox::ops::{execute_in_sandbox, resolve_sandbox_policy};++/// Run `command` through OpenHuman's sandbox execution path under `mode`.+#[cfg(windows)]+async fn run_in_sandbox(+ mode: SandboxMode,+ command: &str,+) -> (+ openhuman_core::sandbox::types::SandboxExecResult,+ std::path::PathBuf,+) {+ run_in_sandbox_with_env(mode, command, HashMap::new()).await+}++#[cfg(windows)]+async fn run_in_sandbox_with_env(+ mode: SandboxMode,+ command: &str,+ extra_env: HashMap<String, String>,+) -> (+ openhuman_core::sandbox::types::SandboxExecResult,+ std::path::PathBuf,+) {+ let tempdir = tempfile::tempdir().expect("tempdir");+ let root = tempdir.path().to_path_buf();+ let policy = resolve_sandbox_policy(+ mode,+ tempdir.path(),+ tempdir.path(),+ &RuntimeConfig::default(),+ false,+ );+ let result = execute_in_sandbox(+ &policy,+ command,+ tempdir.path(),+ extra_env+ .into_iter()+ .map(|(key, value)| (key.into(), value.into()))+ .collect(),+ Duration::from_secs(120),+ )+ .await+ .unwrap_or_else(|e| panic!("execute_in_sandbox({mode:?}) failed to run the command: {e}"));+ (result, root)+}++#[cfg(windows)]+fn env_probe_command() -> &'static str {+ "echo SR=[%SystemRoot%] TEMP=[%TEMP%] UP=[%USERPROFILE%] PATH=[%PATH%]"+}++/// `cmd.exe` prints `%SystemRoot%` *verbatim* when the variable is absent, which+/// makes non-expansion the assertion. A resolved value is also required, so a+/// child that echoes nothing cannot pass.+#[cfg(windows)]+fn assert_bootstrap_env_resolved(result: &openhuman_core::sandbox::types::SandboxExecResult) {+ assert!(+ result.success(),+ "child exited {} with stderr {:?}",+ result.exit_code,+ result.stderr+ );+ for name in ["SystemRoot", "TEMP", "USERPROFILE", "PATH"] {+ assert!(+ !result.stdout.contains(&format!("%{name}%")),+ "`{name}` reached the child unexpanded, so it is not in the \+ forwarded environment; stdout {:?}",+ result.stdout+ );+ }+ let system_root = bracketed(&result.stdout, "SR=").unwrap_or_default();+ assert!(+ system_root.contains(':'),+ "`SystemRoot` did not resolve to a directory; stdout {:?}",+ result.stdout+ );+ assert!(+ !bracketed(&result.stdout, "UP=")+ .unwrap_or_default()+ .is_empty(),+ "`USERPROFILE` resolved to nothing; stdout {:?}",+ result.stdout+ );+ for name in ["TEMP", "PATH"] {+ assert!(+ !bracketed(&result.stdout, &format!("{name}="))+ .unwrap_or_default()+ .is_empty(),+ "`{name}` resolved to nothing; stdout {:?}",+ result.stdout+ );+ }+}++#[cfg(windows)]+fn assert_temp_is_in_scratch(+ result: &openhuman_core::sandbox::types::SandboxExecResult,+ root: &std::path::Path,+) {+ let temp = bracketed(&result.stdout, "TEMP=").unwrap_or_default();+ let expected_prefix = root.join("artifacts").join("sandbox-scratch");+ let normalize = |path: &str| path.replace('/', "\\").to_ascii_lowercase();+ assert!(+ normalize(&temp).starts_with(&normalize(&expected_prefix.to_string_lossy())),+ "local-jail TEMP escaped its per-test scratch tree: TEMP={temp:?}, expected under {:?}; stdout {:?}",+ expected_prefix,+ result.stdout+ );+}++#[cfg(windows)]+fn bracketed(stdout: &str, prefix: &str) -> Option<String> {+ let tail = stdout.split(prefix).nth(1)?;+ Some(tail.split(']').next()?.trim().to_string())+}++/// The unsandboxed exec path (`SandboxMode::None`), which shares the+/// allow-list with the jail path and has no OS-jail dependency.+#[cfg(windows)]+#[tokio::test]+async fn unsandboxed_child_receives_windows_bootstrap_env() {+ let (result, _) = run_in_sandbox(SandboxMode::None, env_probe_command()).await;+ assert_bootstrap_env_resolved(&result);+}++/// The route the built-in orchestrator actually takes:+/// `SandboxMode::Sandboxed` → `SandboxBackendKind::Local` →+/// `execute_local_jail`.+#[cfg(windows)]+#[tokio::test]+async fn sandboxed_child_receives_windows_bootstrap_env() {+ let (result, root) = run_in_sandbox(SandboxMode::Sandboxed, env_probe_command()).await;+ assert_bootstrap_env_resolved(&result);+ assert_temp_is_in_scratch(&result, &root);+}++/// Caller-provided temporary-directory values remain effective on both host+/// spawn paths; the local jail must not silently replace per-call overrides.+#[cfg(windows)]+#[tokio::test]+async fn caller_temp_overrides_survive_sandbox_paths() {+ let expected = r"C:\openhuman-test-temp";+ for mode in [SandboxMode::None, SandboxMode::Sandboxed] {+ let (result, _) = run_in_sandbox_with_env(+ mode,+ "echo TEMP=[%TEMP%] TMP=[%TMP%] TMPDIR=[%TMPDIR%]",+ HashMap::from([+ ("TEMP".to_string(), expected.to_string()),+ ("TMP".to_string(), expected.to_string()),+ ("TMPDIR".to_string(), expected.to_string()),+ ]),+ )+ .await;+ assert!(result.success(), "child failed: {:?}", result.stderr);+ for name in ["TEMP", "TMP", "TMPDIR"] {+ assert_eq!(+ bracketed(&result.stdout, &format!("{name}=")).as_deref(),+ Some(expected),+ "caller override for {name} was replaced; stdout {:?}",+ result.stdout+ );+ }+ }+}++/// The reported Node failure, end to end through OpenHuman's spawn code:+/// `node -e` must reach the crypto provider and print random bytes.+#[cfg(windows)]+#[tokio::test]+async fn node_crypto_runs_through_sandbox_path() {+ assert!(+ tool_available("node"),+ "node is required for node_crypto_runs_through_sandbox_path; missing tooling must not silently pass"+ );++ let (result, _) = run_in_sandbox(+ SandboxMode::None,+ r#"node -e "console.log('SR=' + process.env.SystemRoot); console.log(require('crypto').randomBytes(8).toString('hex'))""#,+ )+ .await;++ assert!(+ !result.stderr.contains("ncrypto"),+ "node's OS random provider failed to initialise — the child \+ environment is missing Windows bootstrap variables; stderr {:?}",+ result.stderr+ );+ assert!(+ result.success(),+ "node aborted through the sandbox path (exit {}); stderr {:?}",+ result.exit_code,+ result.stderr+ );+ assert!(+ result+ .stdout+ .lines()+ .any(|line| line.trim().len() == 16+ && line.trim().chars().all(|c| c.is_ascii_hexdigit())),+ "no random bytes were printed; stdout {:?}",+ result.stdout+ );+}++/// The reported PowerShell failure: `8009001d` when the child has no system+/// directory to load its crypto provider from.+#[cfg(windows)]+#[tokio::test]+async fn powershell_runs_through_sandbox_path() {+ assert!(+ tool_available("powershell.exe"),+ "powershell.exe is required for powershell_runs_through_sandbox_path; missing tooling must not silently pass"+ );++ let (result, _) = run_in_sandbox(+ SandboxMode::None,+ "powershell.exe -NoProfile -Command [guid]::NewGuid().ToString()",+ )+ .await;++ assert!(+ !result.stderr.contains("8009001d"),+ "PowerShell could not load managed PowerShell — the child environment \+ is missing Windows bootstrap variables; stderr {:?}",+ result.stderr+ );+ assert!(+ result.success(),+ "powershell failed through the sandbox path (exit {}); stderr {:?}",+ result.exit_code,+ result.stderr+ );+ let guid: String = result+ .stdout+ .trim()+ .chars()+ .filter(|c| c.is_ascii_hexdigit() || *c == '-')+ .collect();+ assert!(+ guid.len() >= 36,+ "no GUID was produced by the child; stdout {:?}",+ result.stdout+ );+}++#[cfg(windows)]+fn tool_available(program: &str) -> bool {+ let args = if program.eq_ignore_ascii_case("powershell.exe") {+ vec![+ "-NoProfile",+ "-NonInteractive",+ "-Command",+ "$PSVersionTable.PSVersion.ToString()",+ ]+ } else {+ vec!["--version"]+ };+ std::process::Command::new(program)+ .args(args)+ .stdout(std::process::Stdio::null())+ .stderr(std::process::Stdio::null())+ .status()+ .map(|s| s.success())+ .unwrap_or(false)+}