docs overhaul: agent-facing doc bundle, read-only docs mount in containers
Nightly Build / build (push) Successful in 6m38s

- Strip ~55 stale upstream docs (dev docs never meant for the agents)
- Write new slim index.md as an agent-facing guide to the app's features
- Add new plugin docs: comfyui, elevenlabs, kokoro_tts, orpheus_tts_3b,
  remote_connectivity, whisper_local (replacing old names)
- Add docs_host to UserFs: docs/… and ~/docs/… resolve to {WD}/docs,
  mounted read-only at /root/docs in every user's container
- Instruct assistant/kid/project-coordinator agents to read docs/index.md
  when users ask how the software works
This commit is contained in:
2026-07-22 10:20:21 +01:00
parent 7e9127dc69
commit 9224245f6f
73 changed files with 322 additions and 13342 deletions
+10
View File
@@ -288,6 +288,7 @@ mod tests {
PathBuf::from("/root"),
vec![],
vec![],
None,
))
}
@@ -304,10 +305,12 @@ mod tests {
let shared = root.join("shared").join("family");
// Project owned by user `owner-id`, agent-visible as `projects/alice/budget`.
let project = root.join("projects").join("owner-id").join("budget");
let docs = root.join("docs");
let _ = std::fs::remove_dir_all(&root);
std::fs::create_dir_all(&home).unwrap();
std::fs::create_dir_all(&shared).unwrap();
std::fs::create_dir_all(&project).unwrap();
std::fs::create_dir_all(&docs).unwrap();
let fs = UserFs::new(
"u1",
@@ -327,11 +330,13 @@ mod tests {
container: PathBuf::from("/root/projects/alice/budget"),
can_write: false,
}],
Some(docs.clone()),
);
let home_canon = canonicalize_for_policy(&home.to_string_lossy(), Path::new("/"));
let shared_canon = canonicalize_for_policy(&shared.to_string_lossy(), Path::new("/"));
let project_canon = canonicalize_for_policy(&project.to_string_lossy(), Path::new("/"));
let docs_canon = canonicalize_for_policy(&docs.to_string_lossy(), Path::new("/"));
// ~/… → private home (containment holds for a not-yet-existing file).
let p = resolve_host_path(&fs, "~/notes.md").unwrap();
@@ -344,6 +349,11 @@ mod tests {
// projects/{owner}/{slug} → the project host dir (two-segment routing)
let pr = resolve_host_path(&fs, "projects/alice/budget/plan.md").unwrap();
assert!(path_under(&pr, &project_canon), "{pr:?}");
// docs/… → the shared read-only docs dir (both bare and ~-prefixed)
let d = resolve_host_path(&fs, "docs/index.md").unwrap();
assert!(path_under(&d, &docs_canon), "{d:?}");
let d2 = resolve_host_path(&fs, "~/docs/index.md").unwrap();
assert_eq!(d, d2);
// a shared folder the user is NOT a member of → error
assert!(resolve_host_path(&fs, "shared/secret/x.md").is_err());