@bitseek/hermes-webui 0.1.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/README.md +213 -0
  2. package/bin/hermes-webui.mjs +588 -0
  3. package/package.json +25 -0
  4. package/scripts/sync-vendor.mjs +74 -0
  5. package/templates/launchd/com.bitseek.hermes-webui.plist +21 -0
  6. package/templates/systemd/hermes-webui.service +13 -0
  7. package/templates/windows/hermes-webui-task.ps1 +3 -0
  8. package/vendor/agent-frontend-shell/.bitseek-source.json +6 -0
  9. package/vendor/agent-frontend-shell/.dockerignore +7 -0
  10. package/vendor/agent-frontend-shell/.env.docker.example +89 -0
  11. package/vendor/agent-frontend-shell/.env.example +34 -0
  12. package/vendor/agent-frontend-shell/.github/FUNDING.yml +3 -0
  13. package/vendor/agent-frontend-shell/.github/workflows/browser-smoke.yml +42 -0
  14. package/vendor/agent-frontend-shell/.github/workflows/docker-smoke.yml +233 -0
  15. package/vendor/agent-frontend-shell/.github/workflows/native-windows-startup.yml +132 -0
  16. package/vendor/agent-frontend-shell/.github/workflows/release.yml +57 -0
  17. package/vendor/agent-frontend-shell/.github/workflows/tests.yml +88 -0
  18. package/vendor/agent-frontend-shell/.vscode/launch.json +59 -0
  19. package/vendor/agent-frontend-shell/.vscode/settings.json +13 -0
  20. package/vendor/agent-frontend-shell/AGENTS.md +80 -0
  21. package/vendor/agent-frontend-shell/ARCHITECTURE.md +1658 -0
  22. package/vendor/agent-frontend-shell/BUGS.md +52 -0
  23. package/vendor/agent-frontend-shell/CHANGELOG.md +7295 -0
  24. package/vendor/agent-frontend-shell/CONTRIBUTING.md +205 -0
  25. package/vendor/agent-frontend-shell/CONTRIBUTORS.md +107 -0
  26. package/vendor/agent-frontend-shell/DESIGN.md +173 -0
  27. package/vendor/agent-frontend-shell/Dockerfile +91 -0
  28. package/vendor/agent-frontend-shell/LICENSE +21 -0
  29. package/vendor/agent-frontend-shell/README-CUSTOM.md +76 -0
  30. package/vendor/agent-frontend-shell/README.md +705 -0
  31. package/vendor/agent-frontend-shell/ROADMAP.md +351 -0
  32. package/vendor/agent-frontend-shell/SPRINTS.md +147 -0
  33. package/vendor/agent-frontend-shell/TESTING.md +1932 -0
  34. package/vendor/agent-frontend-shell/THEMES.md +170 -0
  35. package/vendor/agent-frontend-shell/api/__init__.py +1 -0
  36. package/vendor/agent-frontend-shell/api/agent_health.py +392 -0
  37. package/vendor/agent-frontend-shell/api/agent_sessions.py +782 -0
  38. package/vendor/agent-frontend-shell/api/auth.py +592 -0
  39. package/vendor/agent-frontend-shell/api/background.py +87 -0
  40. package/vendor/agent-frontend-shell/api/clarify.py +238 -0
  41. package/vendor/agent-frontend-shell/api/commands.py +124 -0
  42. package/vendor/agent-frontend-shell/api/compression_anchor.py +134 -0
  43. package/vendor/agent-frontend-shell/api/config.py +5178 -0
  44. package/vendor/agent-frontend-shell/api/dashboard_probe.py +255 -0
  45. package/vendor/agent-frontend-shell/api/extensions.py +253 -0
  46. package/vendor/agent-frontend-shell/api/gateway_chat.py +435 -0
  47. package/vendor/agent-frontend-shell/api/gateway_watcher.py +230 -0
  48. package/vendor/agent-frontend-shell/api/goals.py +608 -0
  49. package/vendor/agent-frontend-shell/api/helpers.py +474 -0
  50. package/vendor/agent-frontend-shell/api/kanban_bridge.py +1255 -0
  51. package/vendor/agent-frontend-shell/api/metering.py +194 -0
  52. package/vendor/agent-frontend-shell/api/models.py +4210 -0
  53. package/vendor/agent-frontend-shell/api/oauth.py +770 -0
  54. package/vendor/agent-frontend-shell/api/onboarding.py +1046 -0
  55. package/vendor/agent-frontend-shell/api/passkeys.py +365 -0
  56. package/vendor/agent-frontend-shell/api/profiles.py +1499 -0
  57. package/vendor/agent-frontend-shell/api/providers.py +2175 -0
  58. package/vendor/agent-frontend-shell/api/request_diagnostics.py +160 -0
  59. package/vendor/agent-frontend-shell/api/rollback.py +320 -0
  60. package/vendor/agent-frontend-shell/api/routes.py +13990 -0
  61. package/vendor/agent-frontend-shell/api/run_journal.py +284 -0
  62. package/vendor/agent-frontend-shell/api/runner_client.py +156 -0
  63. package/vendor/agent-frontend-shell/api/runtime_adapter.py +431 -0
  64. package/vendor/agent-frontend-shell/api/session_discoverability.py +640 -0
  65. package/vendor/agent-frontend-shell/api/session_events.py +45 -0
  66. package/vendor/agent-frontend-shell/api/session_lifecycle.py +208 -0
  67. package/vendor/agent-frontend-shell/api/session_ops.py +207 -0
  68. package/vendor/agent-frontend-shell/api/session_recovery.py +655 -0
  69. package/vendor/agent-frontend-shell/api/skill_usage.py +32 -0
  70. package/vendor/agent-frontend-shell/api/startup.py +128 -0
  71. package/vendor/agent-frontend-shell/api/state_sync.py +187 -0
  72. package/vendor/agent-frontend-shell/api/streaming.py +7048 -0
  73. package/vendor/agent-frontend-shell/api/system_health.py +167 -0
  74. package/vendor/agent-frontend-shell/api/terminal.py +410 -0
  75. package/vendor/agent-frontend-shell/api/turn_journal.py +214 -0
  76. package/vendor/agent-frontend-shell/api/updates.py +1261 -0
  77. package/vendor/agent-frontend-shell/api/upload.py +322 -0
  78. package/vendor/agent-frontend-shell/api/usage.py +26 -0
  79. package/vendor/agent-frontend-shell/api/workspace.py +867 -0
  80. package/vendor/agent-frontend-shell/api/workspace_git.py +1261 -0
  81. package/vendor/agent-frontend-shell/api/worktrees.py +357 -0
  82. package/vendor/agent-frontend-shell/bootstrap.py +492 -0
  83. package/vendor/agent-frontend-shell/ctl.sh +427 -0
  84. package/vendor/agent-frontend-shell/docker-compose.custom.yml +26 -0
  85. package/vendor/agent-frontend-shell/docker-compose.three-container.yml +168 -0
  86. package/vendor/agent-frontend-shell/docker-compose.two-container.yml +147 -0
  87. package/vendor/agent-frontend-shell/docker-compose.yml +57 -0
  88. package/vendor/agent-frontend-shell/docker_init.bash +459 -0
  89. package/vendor/agent-frontend-shell/docs/CONTRACTS.md +207 -0
  90. package/vendor/agent-frontend-shell/docs/EXTENSIONS.md +212 -0
  91. package/vendor/agent-frontend-shell/docs/ISSUES.md +23 -0
  92. package/vendor/agent-frontend-shell/docs/UIUX-GUIDE.md +196 -0
  93. package/vendor/agent-frontend-shell/docs/advanced-chat-setup.md +83 -0
  94. package/vendor/agent-frontend-shell/docs/docker.md +337 -0
  95. package/vendor/agent-frontend-shell/docs/onboarding-agent-checklist.md +207 -0
  96. package/vendor/agent-frontend-shell/docs/onboarding.md +202 -0
  97. package/vendor/agent-frontend-shell/docs/remote-access.md +75 -0
  98. package/vendor/agent-frontend-shell/docs/rfcs/README.md +53 -0
  99. package/vendor/agent-frontend-shell/docs/rfcs/agent-source-boundary.md +70 -0
  100. package/vendor/agent-frontend-shell/docs/rfcs/canonical-session-resolution.md +124 -0
  101. package/vendor/agent-frontend-shell/docs/rfcs/hermes-run-adapter-contract.md +1079 -0
  102. package/vendor/agent-frontend-shell/docs/rfcs/turn-journal.md +195 -0
  103. package/vendor/agent-frontend-shell/docs/rfcs/webui-run-state-consistency-contract.md +157 -0
  104. package/vendor/agent-frontend-shell/docs/supervisor.md +280 -0
  105. package/vendor/agent-frontend-shell/docs/troubleshooting.md +132 -0
  106. package/vendor/agent-frontend-shell/docs/ui-ux/index.html +863 -0
  107. package/vendor/agent-frontend-shell/docs/ui-ux/two-stage-proposal.html +768 -0
  108. package/vendor/agent-frontend-shell/docs/why-hermes.md +489 -0
  109. package/vendor/agent-frontend-shell/docs/workspace-git.md +92 -0
  110. package/vendor/agent-frontend-shell/docs/wsl-autostart.md +126 -0
  111. package/vendor/agent-frontend-shell/eslint.runtime-guard.config.mjs +35 -0
  112. package/vendor/agent-frontend-shell/extensions/bitseek-design-system.md +330 -0
  113. package/vendor/agent-frontend-shell/extensions/branding/assets/apple-touch-icon.png +0 -0
  114. package/vendor/agent-frontend-shell/extensions/branding/assets/empty-logo.svg +739 -0
  115. package/vendor/agent-frontend-shell/extensions/branding/assets/favicon-192.png +0 -0
  116. package/vendor/agent-frontend-shell/extensions/branding/assets/favicon-32.png +0 -0
  117. package/vendor/agent-frontend-shell/extensions/branding/assets/favicon-512.png +0 -0
  118. package/vendor/agent-frontend-shell/extensions/branding/assets/favicon-512.svg +745 -0
  119. package/vendor/agent-frontend-shell/extensions/branding/assets/favicon.ico +0 -0
  120. package/vendor/agent-frontend-shell/extensions/branding/assets/favicon.svg +745 -0
  121. package/vendor/agent-frontend-shell/extensions/branding/assets/titlebar-icon-v2.svg +751 -0
  122. package/vendor/agent-frontend-shell/extensions/branding/assets/titlebar-icon-v3.svg +739 -0
  123. package/vendor/agent-frontend-shell/extensions/branding/assets/titlebar-icon.svg +745 -0
  124. package/vendor/agent-frontend-shell/extensions/branding/branding.js +112 -0
  125. package/vendor/agent-frontend-shell/extensions/branding/config.json +14 -0
  126. package/vendor/agent-frontend-shell/extensions/branding/manifest.json +53 -0
  127. package/vendor/agent-frontend-shell/extensions/index.js +67 -0
  128. package/vendor/agent-frontend-shell/extensions/loader/hermes-loader.js +77 -0
  129. package/vendor/agent-frontend-shell/extensions/manifest.json +16 -0
  130. package/vendor/agent-frontend-shell/extensions/pages/ai-teammates/page.css +333 -0
  131. package/vendor/agent-frontend-shell/extensions/pages/ai-teammates/page.js +487 -0
  132. package/vendor/agent-frontend-shell/extensions/pages/manifest.json +6 -0
  133. package/vendor/agent-frontend-shell/extensions/pages/registry.css +56 -0
  134. package/vendor/agent-frontend-shell/extensions/pages/registry.js +302 -0
  135. package/vendor/agent-frontend-shell/extensions/themes/bitseek/index.css +93 -0
  136. package/vendor/agent-frontend-shell/extensions/themes/bitseek/index.js +98 -0
  137. package/vendor/agent-frontend-shell/install.sh +63 -0
  138. package/vendor/agent-frontend-shell/mcp_server.py +567 -0
  139. package/vendor/agent-frontend-shell/package.json +12 -0
  140. package/vendor/agent-frontend-shell/pyproject.toml +56 -0
  141. package/vendor/agent-frontend-shell/pytest.ini +3 -0
  142. package/vendor/agent-frontend-shell/requirements.txt +5 -0
  143. package/vendor/agent-frontend-shell/server.py +624 -0
  144. package/vendor/agent-frontend-shell/start.ps1 +210 -0
  145. package/vendor/agent-frontend-shell/start.sh +65 -0
  146. package/vendor/agent-frontend-shell/static/apple-touch-icon.png +0 -0
  147. package/vendor/agent-frontend-shell/static/boot.js +1990 -0
  148. package/vendor/agent-frontend-shell/static/commands.js +1402 -0
  149. package/vendor/agent-frontend-shell/static/favicon-192.png +0 -0
  150. package/vendor/agent-frontend-shell/static/favicon-32.png +0 -0
  151. package/vendor/agent-frontend-shell/static/favicon-512.png +0 -0
  152. package/vendor/agent-frontend-shell/static/favicon-512.svg +18 -0
  153. package/vendor/agent-frontend-shell/static/favicon.ico +0 -0
  154. package/vendor/agent-frontend-shell/static/favicon.svg +20 -0
  155. package/vendor/agent-frontend-shell/static/i18n.js +15389 -0
  156. package/vendor/agent-frontend-shell/static/icons.js +92 -0
  157. package/vendor/agent-frontend-shell/static/index.html +1506 -0
  158. package/vendor/agent-frontend-shell/static/login.js +177 -0
  159. package/vendor/agent-frontend-shell/static/manifest.json +53 -0
  160. package/vendor/agent-frontend-shell/static/messages.js +3521 -0
  161. package/vendor/agent-frontend-shell/static/onboarding.js +800 -0
  162. package/vendor/agent-frontend-shell/static/panels.js +7995 -0
  163. package/vendor/agent-frontend-shell/static/pwa-startup.js +83 -0
  164. package/vendor/agent-frontend-shell/static/sessions.js +5165 -0
  165. package/vendor/agent-frontend-shell/static/style.css +4774 -0
  166. package/vendor/agent-frontend-shell/static/sw.js +173 -0
  167. package/vendor/agent-frontend-shell/static/terminal.js +632 -0
  168. package/vendor/agent-frontend-shell/static/ui.js +8997 -0
  169. package/vendor/agent-frontend-shell/static/vendor/js-yaml/4.1.0/js-yaml.min.js +2 -0
  170. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_AMS-Regular.ttf +0 -0
  171. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_AMS-Regular.woff +0 -0
  172. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  173. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  174. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  175. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  176. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  177. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  178. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  179. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  180. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  181. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  182. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  183. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  184. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  185. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Main-Bold.ttf +0 -0
  186. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Main-Bold.woff +0 -0
  187. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Main-Bold.woff2 +0 -0
  188. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  189. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  190. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  191. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Main-Italic.ttf +0 -0
  192. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Main-Italic.woff +0 -0
  193. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Main-Italic.woff2 +0 -0
  194. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Main-Regular.ttf +0 -0
  195. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Main-Regular.woff +0 -0
  196. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Main-Regular.woff2 +0 -0
  197. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  198. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  199. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  200. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Math-Italic.ttf +0 -0
  201. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Math-Italic.woff +0 -0
  202. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Math-Italic.woff2 +0 -0
  203. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  204. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  205. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  206. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  207. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  208. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  209. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  210. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  211. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  212. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Script-Regular.ttf +0 -0
  213. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Script-Regular.woff +0 -0
  214. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Script-Regular.woff2 +0 -0
  215. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Size1-Regular.ttf +0 -0
  216. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Size1-Regular.woff +0 -0
  217. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  218. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Size2-Regular.ttf +0 -0
  219. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Size2-Regular.woff +0 -0
  220. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  221. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Size3-Regular.ttf +0 -0
  222. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Size3-Regular.woff +0 -0
  223. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  224. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Size4-Regular.ttf +0 -0
  225. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Size4-Regular.woff +0 -0
  226. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  227. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  228. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  229. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  230. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/katex.min.css +1 -0
  231. package/vendor/agent-frontend-shell/static/vendor/katex/0.16.22/katex.min.js +1 -0
  232. package/vendor/agent-frontend-shell/static/vendor/smd.min.js +29 -0
  233. package/vendor/agent-frontend-shell/static/workspace.js +680 -0
@@ -0,0 +1,202 @@
1
+ # First-run onboarding guide
2
+
3
+ This guide explains what happens the first time Hermes WebUI starts, which
4
+ setup path to choose, and how to recover when the wizard cannot finish.
5
+
6
+ If an AI assistant is helping with install, reinstall, bootstrap, provider
7
+ setup, or first-run support, read
8
+ [`docs/onboarding-agent-checklist.md`](onboarding-agent-checklist.md) before
9
+ running commands or inspecting logs.
10
+
11
+ The short version: run the bootstrap, open the WebUI, choose a provider, choose
12
+ a workspace, optionally set a password, then start a chat. If you are using a
13
+ local model server from Docker, pay special attention to the Base URL section
14
+ below.
15
+
16
+ ## Before you start
17
+
18
+ Hermes WebUI is only the browser interface. The actual agent runtime, memory,
19
+ skills, config, cron jobs, and provider credentials belong to Hermes Agent.
20
+
21
+ The bootstrap supports Linux, macOS, and WSL2. Native Windows is not supported
22
+ by the bootstrap yet. A community native Windows setup is being tracked in
23
+ [#1952](https://github.com/nesquena/hermes-webui/issues/1952), including:
24
+
25
+ - [Native Windows guide](https://github.com/markwang2658/hermes-windows-native-guide)
26
+ - [Native Windows setup scripts](https://github.com/markwang2658/hermes-windows-native)
27
+
28
+ For Windows users who want the supported path today, use WSL2 and see
29
+ [Windows / WSL auto-start](wsl-autostart.md).
30
+
31
+ ## Install path choices
32
+
33
+ | Path | Use it when | Notes |
34
+ |---|---|---|
35
+ | Local bootstrap | You run WebUI directly on Linux, macOS, or WSL2 | Best for a personal server, Mac mini, VPS, or homelab host. |
36
+ | Docker single-container | You want the simplest container setup | Recommended first Docker path. WebUI runs the agent in-process. |
37
+ | Docker two-container | You already run the agent gateway separately | More isolated, but tools launched from WebUI run in the WebUI container. |
38
+ | Docker three-container | You want agent gateway plus dashboard plus WebUI | Same caveats as two-container, plus the dashboard service. |
39
+ | Native Windows community path | You are intentionally testing unsupported native Windows | Community-maintained for now, not the official bootstrap path. |
40
+
41
+ If a Docker install gets confusing, start again with the single-container setup.
42
+ It avoids most UID/GID, source-volume, and tool-location surprises. See
43
+ [Docker setup guide](docker.md) for the full container reference.
44
+
45
+ ## Re-running onboarding safely
46
+
47
+ Do not delete `~/.hermes` just to see the wizard again. That directory can hold
48
+ your real Hermes config, credentials, memory, skills, profiles, sessions, and
49
+ cron state.
50
+
51
+ For a clean local trial, use an isolated Hermes home and WebUI state directory:
52
+
53
+ ```bash
54
+ mkdir -p ~/hermes-onboarding-test
55
+ HERMES_HOME=~/hermes-onboarding-test/.hermes \
56
+ HERMES_WEBUI_STATE_DIR=~/hermes-onboarding-test/webui \
57
+ HERMES_WEBUI_PORT=8789 \
58
+ python3 bootstrap.py
59
+ ```
60
+
61
+ Then open `http://127.0.0.1:8789`.
62
+
63
+ For an assistant-led trial run, follow the safety rules, evidence commands, and
64
+ pass/fail criteria in
65
+ [`docs/onboarding-agent-checklist.md`](onboarding-agent-checklist.md).
66
+
67
+ If your repo has a `.env` file, remember that the bootstrap loads it. Remove or
68
+ adjust any `HERMES_HOME`, `HERMES_WEBUI_STATE_DIR`, or `HERMES_WEBUI_PORT`
69
+ entries there before using the isolated command above.
70
+
71
+ For managed hosting or fully preconfigured images, set
72
+ `HERMES_WEBUI_SKIP_ONBOARDING=1` to bypass the wizard.
73
+
74
+ ## What the wizard checks
75
+
76
+ The first screen reports the runtime state WebUI can see:
77
+
78
+ - Hermes Agent importability: whether WebUI can import and run `AIAgent`.
79
+ - Provider status: whether `config.yaml` and credential state are enough for a
80
+ chat request.
81
+ - Password status: whether WebUI password protection is enabled.
82
+ - Config paths: the active `config.yaml` and `.env` locations for this profile.
83
+
84
+ If the agent check fails, use [Troubleshooting](troubleshooting.md), especially
85
+ the `AIAgent not available` section. If provider setup is incomplete, continue
86
+ through the wizard or run `hermes model` in the same machine environment that
87
+ will run WebUI.
88
+
89
+ ## Choosing a provider
90
+
91
+ The setup step groups providers by how much information they usually need.
92
+
93
+ | Group | Examples | What you usually enter |
94
+ |---|---|---|
95
+ | Easy start | OpenRouter, Anthropic, OpenAI | API key and model. |
96
+ | Open / self-hosted | Ollama, LM Studio, custom OpenAI-compatible | Base URL, model, optional API key. |
97
+ | Specialized | Gemini, DeepSeek, Xiaomi MiMo, Z.AI / GLM, NVIDIA NIM, Mistral, xAI | Provider API key and default model. |
98
+
99
+ For API-key providers, the wizard writes the key to the active Hermes `.env`
100
+ file and writes the default model/provider to `config.yaml`.
101
+
102
+ For local providers, the API key field can be blank when the server is keyless.
103
+ Most LM Studio, Ollama, vLLM, llama-server, and TabbyAPI installs run this way.
104
+ Use **Test connection** to verify the Base URL and populate the model list
105
+ before continuing.
106
+
107
+ Advanced provider flows such as Nous Portal and GitHub Copilot are still
108
+ terminal-first. OpenAI Codex and Anthropic Claude Code OAuth can be started in
109
+ the onboarding flow when your Hermes config selects the corresponding provider.
110
+ If the wizard points you back to `hermes model`, use that CLI flow first, then
111
+ refresh WebUI.
112
+
113
+ ## Base URL rules for local model servers
114
+
115
+ For self-hosted providers, the Base URL should point to the OpenAI-compatible
116
+ API root. Common examples:
117
+
118
+ | Server | Typical Base URL |
119
+ |---|---|
120
+ | LM Studio on the same non-Docker host | `http://127.0.0.1:1234/v1` |
121
+ | Ollama on the same non-Docker host | `http://127.0.0.1:11434/v1` |
122
+ | LM Studio from Docker Desktop | `http://host.docker.internal:1234/v1` |
123
+ | Ollama from Docker Desktop | `http://host.docker.internal:11434/v1` |
124
+ | Local server from Linux Docker Engine | `http://api.local:<port>/v1` with `api.local:host-gateway` in Compose `extra_hosts` |
125
+ | Local server on another LAN machine | `http://<lan-ip>:<port>/v1` |
126
+
127
+ Inside Docker, `localhost` means the WebUI container itself, not your Mac,
128
+ Windows host, Linux host, or another machine on your LAN. If LM Studio or Ollama
129
+ is running outside the container, use `host.docker.internal` on Docker Desktop,
130
+ use the server's LAN IP address, or add a Linux Docker host alias:
131
+
132
+ ```yaml
133
+ services:
134
+ hermes-webui:
135
+ extra_hosts:
136
+ - "api.local:host-gateway"
137
+ ```
138
+
139
+ Then use `http://api.local:<port>/v1` as the Base URL. The alias avoids writing
140
+ `localhost` in WebUI config where it would resolve to the container loopback
141
+ instead of the host service.
142
+
143
+ The wizard probes `<base-url>/models` before saving. A successful probe fills
144
+ the model dropdown. A failed probe blocks the setup step and shows an inline
145
+ error such as DNS failure, connection refused, timeout, HTTP error, or
146
+ unexpected response shape.
147
+
148
+ ## Workspace step
149
+
150
+ The workspace is the filesystem location Hermes should use for new sessions.
151
+ It can be a source checkout, a project directory, or a general workspace folder.
152
+
153
+ In Docker, the default browsable path is `/workspace`, which maps to the host
154
+ directory mounted by the compose file. If the workspace appears empty, check the
155
+ Docker UID/GID and mount guidance in [Docker setup guide](docker.md).
156
+
157
+ ## Password step
158
+
159
+ Password protection is optional for localhost-only installs. Enable it if you
160
+ expose WebUI outside `127.0.0.1`, behind a reverse proxy, or on a LAN.
161
+
162
+ The password is stored through the normal WebUI settings path and hashed
163
+ server-side. You can change it later from Settings.
164
+
165
+ ## What gets written
166
+
167
+ The wizard uses the same files and APIs as the normal app:
168
+
169
+ - Active Hermes `config.yaml`: provider, default model, and Base URL when
170
+ relevant.
171
+ - Active Hermes `.env`: provider API keys when you entered one.
172
+ - WebUI `settings.json`: onboarding completion, workspace, password state, and
173
+ other WebUI preferences.
174
+
175
+ State normally lives outside the repository. By default:
176
+
177
+ - Hermes Agent state: Windows `%LOCALAPPDATA%\hermes`; POSIX `~/.hermes`
178
+ - WebUI state: `$HERMES_HOME/webui` (Windows default `%LOCALAPPDATA%\hermes\webui`, POSIX default `~/.hermes/webui`)
179
+
180
+ Override these with `HERMES_HOME` and `HERMES_WEBUI_STATE_DIR` when you need an
181
+ isolated test install.
182
+
183
+ ## When to file an issue
184
+
185
+ File an issue when the diagnostics point to WebUI rather than local
186
+ configuration. Include:
187
+
188
+ 1. Install path: local bootstrap, Docker single-container, Docker
189
+ two-container, Docker three-container, WSL2, or community native Windows.
190
+ 2. Output from `/health`, or the startup banner if the server never starts.
191
+ 3. The provider selected in onboarding and the Base URL shape, with secrets
192
+ redacted.
193
+ 4. For Docker provider problems, the result of probing from inside the
194
+ container, for example:
195
+
196
+ ```bash
197
+ docker exec hermes-webui sh -c 'curl -sS -w "\nHTTP %{http_code}\n" http://host.docker.internal:1234/v1/models | head -50'
198
+ ```
199
+
200
+ 5. Any inline wizard error text and relevant logs.
201
+
202
+ Never paste API keys, OAuth tokens, or full `.env` contents into an issue.
@@ -0,0 +1,75 @@
1
+ # Remote access
2
+
3
+ How to reach a self-hosted Hermes WebUI from another machine or your phone.
4
+
5
+ ## Accessing from a remote machine
6
+
7
+ The server binds to `127.0.0.1` by default (loopback only). If you are running
8
+ Hermes on a VPS or remote server, use an SSH tunnel from your local machine:
9
+
10
+ ```bash
11
+ ssh -N -L <local-port>:127.0.0.1:<remote-port> <user>@<server-host>
12
+ ```
13
+
14
+ Example:
15
+
16
+ ```bash
17
+ ssh -N -L 8787:127.0.0.1:8787 user@your.server.com
18
+ ```
19
+
20
+ Then open `http://localhost:8787` in your local browser.
21
+
22
+ `start.sh` will print this command for you automatically when it detects you
23
+ are running over SSH.
24
+
25
+ ---
26
+
27
+ ## Accessing on your phone with Tailscale
28
+
29
+ [Tailscale](https://tailscale.com) is a zero-config mesh VPN built on
30
+ WireGuard. Install it on your server and your phone, and they join the same
31
+ private network -- no port forwarding, no SSH tunnels, no public exposure.
32
+
33
+ The Hermes Web UI is fully responsive with a mobile-optimized layout
34
+ (hamburger sidebar, sidebar top tabs in the drawer, touch-friendly controls),
35
+ so it works well as a daily-driver agent interface from your phone.
36
+
37
+ **Setup:**
38
+
39
+ 1. Install [Tailscale](https://tailscale.com/download) on your server and
40
+ your iPhone/Android.
41
+ 2. Start the WebUI listening on all interfaces with password auth enabled:
42
+
43
+ ```bash
44
+ HERMES_WEBUI_HOST=0.0.0.0 HERMES_WEBUI_PASSWORD=your-secret ./start.sh
45
+ ```
46
+
47
+ 3. Open `http://<server-tailscale-ip>:8787` in your phone's browser
48
+ (find your server's Tailscale IP in the Tailscale app or with
49
+ `tailscale ip -4` on the server).
50
+
51
+ That's it. Traffic is encrypted end-to-end by WireGuard, and password auth
52
+ protects the UI at the application level. You can add it to your home screen
53
+ for an app-like experience.
54
+
55
+ ### Community field report: ARM64 Android via AVF
56
+
57
+ A community report in [#2364](https://github.com/nesquena/hermes-webui/issues/2364)
58
+ documents Hermes Agent + WebUI running on a mid-range ARM64 Android phone inside
59
+ a Debian 12 VM via Android Virtualization Framework (AVF). The reported setup
60
+ used a Xiaomi Redmi Note 13 Pro 4G, 3.8 GiB RAM allocated to the VM, 8 visible
61
+ CPU cores, Chrome on Android at `localhost:8787`, and cloud-hosted inference.
62
+
63
+ This is not an official support baseline or provider/model benchmark, but it is
64
+ a useful compatibility signal for mobile ARM64 experiments: the WebUI rendered
65
+ smoothly in Chrome, ARM64 Debian worked for the agent stack, and the total local
66
+ footprint was about 1.7 GB. Practical caveats from the report: first install can
67
+ take longer when dependencies compile from source, Android browser tabs may
68
+ reload when switching apps, and disabling battery optimization for the terminal
69
+ or VM host may be needed for longer-running sessions.
70
+
71
+ > **Tip:** If using Docker, set `HERMES_WEBUI_HOST=0.0.0.0` in your
72
+ > `docker-compose.yml` environment (already the default) and set
73
+ > `HERMES_WEBUI_PASSWORD`.
74
+
75
+ ---
@@ -0,0 +1,53 @@
1
+ # RFCs
2
+
3
+ This directory holds design documents for hermes-webui features that are
4
+ worth thinking through in writing before (or alongside) implementation —
5
+ typically when the change touches durability, recovery, schema, or cross-
6
+ cutting infrastructure.
7
+
8
+ ## Conventions
9
+
10
+ - One file per RFC. Filename is the topic (kebab-case), not a number.
11
+ - Top of every RFC carries a small header:
12
+
13
+ - **Status:** Proposed | Accepted | Implemented | Withdrawn
14
+ - **Author:** @github-handle
15
+ - **Created:** YYYY-MM-DD
16
+
17
+ - Sections usually include: Problem, Goals, Non-goals, Proposal, Open
18
+ questions, Rollout plan. Skip what doesn't apply.
19
+ - An RFC is a starting point for review. Comments and revisions land via PR
20
+ edits, not separate discussion threads.
21
+ - An RFC documents a design direction. It is **not** an invitation to file
22
+ implementation PRs against fragments of it. Before opening any PR that
23
+ implements an accepted RFC, confirm with a maintainer in the tracking
24
+ issue that the implementation slice is wanted and that no other
25
+ contributor is already building it. Speculative implementations of RFC
26
+ fragments without a confirmed integration site will be held.
27
+
28
+ ## When to file an RFC
29
+
30
+ - The change is large enough that you want consensus before writing code.
31
+ - The change touches data-at-rest formats or recovery semantics.
32
+ - The change introduces a new architectural primitive (journal, queue,
33
+ scheduler, cache layer) that other features will build on.
34
+ - A reviewer asks for one during code review.
35
+
36
+ When in doubt, just ship the code — small features don't need RFCs.
37
+ First-time contributor RFCs should be discussed in an issue before opening a PR.
38
+
39
+ ## Current RFCs
40
+
41
+ - [`hermes-run-adapter-contract.md`](hermes-run-adapter-contract.md) — #1925
42
+ event/control contract, runtime-state ownership matrix, acceptance catalog,
43
+ and reversible migration gates for moving WebUI execution behind an explicit
44
+ adapter boundary.
45
+ - [`webui-run-state-consistency-contract.md`](webui-run-state-consistency-contract.md)
46
+ — #2361 consistency rules for keeping transcript, model context, live streams,
47
+ replay, compression, and session metadata coherent during active and recovered
48
+ WebUI runs.
49
+ - [`canonical-session-resolution.md`](canonical-session-resolution.md) — #2361
50
+ focused contract for resolving URL, query parameter, localStorage, sidebar,
51
+ and compression-lineage session IDs to one canonical visible chat target.
52
+ - [`turn-journal.md`](turn-journal.md) — Crash-safe WebUI turn journal for
53
+ recovering interrupted chat submissions.
@@ -0,0 +1,70 @@
1
+ # Agent Source Boundary and API Decoupling Inventory
2
+
3
+ - **Status:** Proposed
4
+ - **Created:** 2026-05-17
5
+ - **Tracking issue:** [#2453](https://github.com/nesquena/hermes-webui/issues/2453)
6
+
7
+ ## Problem
8
+
9
+ The WebUI currently depends on Hermes Agent Python source being importable at
10
+ runtime. In local installs this usually means a neighboring checkout; in the
11
+ multi-container Docker setup it means the WebUI reads the `hermes-agent-src`
12
+ volume that the agent container also uses.
13
+
14
+ That source mount is a compatibility bridge, not the desired long-term contract.
15
+ Even when mounted read-only on the WebUI side, it couples WebUI releases to
16
+ Hermes Agent internal module layout and makes the multi-container setup look more
17
+ isolated than it really is.
18
+
19
+ ## Current safety posture
20
+
21
+ - The multi-container compose files mount `hermes-agent-src` read-only into the
22
+ WebUI service by default.
23
+ - `docker_init.bash` prunes the agent source subtree from `chown` so read-only
24
+ mounts do not break startup.
25
+ - If an operator overrides the compose files with a mutable agent-source mount,
26
+ startup now emits a notable warning. The WebUI still starts because local dev
27
+ checkouts and custom deployments may intentionally be writable, but the warning
28
+ makes the reduced boundary explicit.
29
+
30
+ ## Source-access inventory
31
+
32
+ These are the current WebUI capabilities that still rely on Agent source or
33
+ `hermes_cli`/`agent` modules being importable. Each item should eventually move
34
+ behind an explicit, versioned Agent API or a packaged library contract that does
35
+ not require mounting the live source checkout.
36
+
37
+ | WebUI capability | Current dependency | Desired API / contract | Notes |
38
+ |---|---|---|---|
39
+ | Browser chat execution | `run_agent.AIAgent` imported by `api/streaming.py` | Run lifecycle API: start, observe, status, cancel, approval, clarify, final usage | Covered by the runtime-adapter migration in [#1925](https://github.com/nesquena/hermes-webui/issues/1925), but still source-backed today. |
40
+ | Runtime event rendering | WebUI callbacks around Agent token/reasoning/tool events | Stable event envelope for tokens, reasoning, progress, tool lifecycle, approvals, clarify, errors, and final usage | The existing run-adapter RFC describes the browser-facing shape; Agent still needs a durable producer contract. |
41
+ | Profile list/create/delete/seed | `hermes_cli.profiles` from `api/profiles.py` | Profile management API with profile metadata, env/runtime context, seed/delete operations, and validation errors | WebUI has fallback filesystem handling for some operations, but feature parity follows Hermes CLI internals. |
42
+ | Goal command state | `hermes_cli.goals` from `api/goals.py` | Goal CRUD/control API: get, save, pause/resume/clear, and status | Should preserve current `/goal` WebUI behavior without direct module import. |
43
+ | Slash command registry and plugin commands | `hermes_cli.commands` and `hermes_cli.plugins` from `api/commands.py` | Command/plugin capability discovery API scoped by active profile | WebUI should render command help from a stable capability response. |
44
+ | Provider/auth/model catalogs | `hermes_cli.models`, `hermes_cli.auth`, and `agent.credential_pool` from `api/config.py` | Provider registry, model catalog, auth status, OAuth/credential-pool status APIs | WebUI has static fallbacks, but exact parity and custom provider state come from Agent internals. |
45
+ | Redaction helper parity | `agent.redact.redact_sensitive_text` from `api/helpers.py` | Redaction service/library contract with signature/version compatibility | WebUI keeps a fallback redactor because this import has changed before. |
46
+ | CLI/Gateway session bridge | Agent `state.db` schema and gateway metadata read by sidebar/session helpers | Session listing/transcript/metadata API for non-WebUI-originated sessions | Direct SQLite/schema coupling should narrow over time, especially for messaging/email/gateway sessions. |
47
+
48
+ ## Decoupling task list
49
+
50
+ 1. Keep the Docker default safe: WebUI-side `hermes-agent-src` stays read-only in
51
+ two- and three-container compose files.
52
+ 2. Keep documenting the boundary honestly: multi-container isolates process,
53
+ network, and resources, not filesystem/source compatibility.
54
+ 3. Warn loudly when the WebUI container sees a writable agent-source mount in
55
+ Docker, because that weakens the defense-in-depth posture.
56
+ 4. Convert runtime execution first through the #1925 RuntimeAdapter path instead
57
+ of adding new direct imports.
58
+ 5. For each inventory row, file or link a follow-up that defines the Agent API
59
+ response shape before replacing the import.
60
+ 6. Do not claim the source mount can be removed until chat execution, provider
61
+ catalogs/auth status, profiles, goals, commands/plugins, redaction, and
62
+ imported Agent/Gateway sessions all have stable replacement contracts.
63
+
64
+ ## Non-goals for this slice
65
+
66
+ - Do not remove `HERMES_WEBUI_AGENT_DIR`.
67
+ - Do not break local source-checkout development.
68
+ - Do not fail startup solely because the agent source is writable.
69
+ - Do not replace the runtime adapter or Hermes Agent API in this document-only
70
+ inventory slice.
@@ -0,0 +1,124 @@
1
+ # Canonical Session Resolution Contract
2
+
3
+ - **Status:** Proposed
4
+ - **Author:** @ai-ag2026
5
+ - **Created:** 2026-05-25
6
+ - **Tracking issue:** [#2361](https://github.com/nesquena/hermes-webui/issues/2361)
7
+ - **Related architecture:** [#1925](https://github.com/nesquena/hermes-webui/issues/1925), [`webui-run-state-consistency-contract.md`](webui-run-state-consistency-contract.md)
8
+
9
+ ## Problem
10
+
11
+ WebUI can reach the same conversation through several browser-facing entrypoints:
12
+
13
+ - a URL route such as `/session/<session_id>`,
14
+ - a query parameter such as `?session=<session_id>` or `?session_id=<session_id>`,
15
+ - the browser's `localStorage` active-session value,
16
+ - sidebar rows built from `/api/sessions`,
17
+ - direct session open actions from links, search, or imported session lists,
18
+ - browser boot restore after reload, auth redirect, or PWA resume.
19
+
20
+ After automatic compression, those entrypoints can point at different rows in one
21
+ logical conversation lineage. A pre-compression parent snapshot can remain a
22
+ valid archived session while the user-facing conversation tip has moved to a
23
+ newer continuation. If each caller resolves IDs independently, the UI can appear
24
+ to lose the session, reopen an old one-message snapshot, duplicate sidebar rows,
25
+ or prefer the wrong transcript even though durable data is still present.
26
+
27
+ This contract defines the expected resolution semantics for those entrypoints. It
28
+ is intentionally narrower than the run adapter RFC: this is about choosing the
29
+ correct visible session target, not moving execution ownership.
30
+
31
+ ## Goals
32
+
33
+ - Define one canonical browser-facing resolution concept for sessions and
34
+ compression lineage.
35
+ - Make URL, query parameter, localStorage, sidebar, and direct-open behavior use
36
+ the same mental model.
37
+ - Preserve archived parent snapshots without letting them become the default
38
+ active target when a continuation exists.
39
+ - Give reviewers a small checklist for future session-routing, sidebar, and
40
+ compression-lineage changes.
41
+
42
+ ## Non-goals
43
+
44
+ - Do not delete archived `pre_compression_snapshot` rows.
45
+ - Do not merge or rewrite session files as part of this contract.
46
+ - Do not replace state.db/session sidecar reconciliation.
47
+ - Do not require a new backend endpoint before narrow frontend guards can land.
48
+ - Do not change explicit history browsing when the user deliberately opens an
49
+ archived snapshot as a record.
50
+
51
+ ## Terms
52
+
53
+ | Term | Meaning |
54
+ |---|---|
55
+ | Requested session ID | The ID supplied by route, query parameter, localStorage, sidebar click, or direct session open. |
56
+ | Canonical visible session | The session row WebUI should display by default for normal chat navigation. |
57
+ | `canonical_visible_session_id` | Proposed field/name for an API or helper output that identifies the canonical visible session. |
58
+ | Compression snapshot | A preserved archived parent row with `pre_compression_snapshot` set. |
59
+ | Continuation session | The active child/tip created after compression, usually represented by `continuation_session_id`, `_lineage_tip_id`, or newer lineage metadata. |
60
+ | Lineage relation | Links such as `parent_session_id`, `_lineage_root_id`, `_lineage_tip_id`, and `_compression_segment_count` that connect rows belonging to one logical conversation. |
61
+
62
+ ## Resolution Rules
63
+
64
+ 1. **Directly valid non-snapshot IDs stay stable.** If the requested session ID
65
+ exists and is not a `pre_compression_snapshot`, it should normally resolve to
66
+ itself.
67
+ 2. **Snapshot parents defer to visible continuation tips.** If the requested
68
+ session ID is a `pre_compression_snapshot` and the session list has a newer
69
+ non-snapshot continuation in the same lineage, normal chat navigation should
70
+ resolve to that continuation as the `canonical_visible_session_id`.
71
+ 3. **Explicit archive/history inspection remains possible.** A future UI affordance
72
+ may intentionally open a snapshot as a historical record, but that should be a
73
+ distinct mode from ordinary boot restore, URL restore, or sidebar continuation.
74
+ 4. **Local browser state is advisory.** `localStorage` may remember the last active
75
+ ID, but browser boot restore must treat it as a requested session ID and still
76
+ run canonical resolution before rendering.
77
+ 5. **Query aliases share the same resolver.** `?session=...`, `?session_id=...`,
78
+ and `/session/...` should feed the same requested-ID path instead of carrying
79
+ separate precedence rules.
80
+ 6. **Sidebar collapse and session loading agree.** The row chosen as the visible
81
+ representative for a lineage should match the target opened by `loadSession()`
82
+ for that lineage during ordinary navigation.
83
+ 7. **404 self-heal is separate from lineage resolution.** Missing/deleted sessions
84
+ should still use the stale-route recovery path. A present archived parent with
85
+ a live continuation is not a 404; it is a canonicalization problem.
86
+
87
+ ## Entry Point Matrix
88
+
89
+ | Entry point | Input | Expected resolution |
90
+ |---|---|---|
91
+ | URL route | `/session/<id>` | Treat `<id>` as requested; resolve to canonical visible session before ordinary render. |
92
+ | Query parameter | `?session=<id>` or `?session_id=<id>` | Same as URL route. Query spelling must not change the target semantics. |
93
+ | localStorage | last active session ID | Advisory requested ID during browser boot restore; canonicalize before render. |
94
+ | Sidebar click | visible row ID or lineage representative | Open the same canonical visible session that the row represents. |
95
+ | Direct session open | programmatic call/search/import link | Use the shared requested-ID resolver unless the caller explicitly opts into archive inspection. |
96
+ | Browser boot restore | URL and/or localStorage state after reload/auth/PWA resume | Prefer explicit URL/query input, then localStorage, then canonicalize the requested ID. |
97
+
98
+ ## Review Checklist
99
+
100
+ For PRs that touch session routing, compression lineage, sidebar collapse, boot
101
+ restore, direct session open, or URL parsing, answer:
102
+
103
+ - Which entrypoints provide the requested session ID?
104
+ - Does the code path accept both route and query parameter forms where relevant?
105
+ - Does localStorage go through the same canonicalization path as URL restore?
106
+ - Can a `pre_compression_snapshot` become the default active chat when a
107
+ non-snapshot `continuation_session_id` / `_lineage_tip_id` exists?
108
+ - Do sidebar collapse and `loadSession()` pick the same visible representative?
109
+ - Is missing-session 404 recovery kept distinct from present-but-archived lineage
110
+ canonicalization?
111
+ - What regression proves route, query parameter, localStorage, and sidebar paths
112
+ agree for compressed lineage rows?
113
+
114
+ ## Rollout Plan
115
+
116
+ 1. Document this proposed contract and link it from the public contract index.
117
+ 2. Keep narrow bugfixes small while referencing the relevant rule they preserve.
118
+ 3. Add shared frontend helper coverage for URL/query/localStorage/sidebar
119
+ requested-ID inputs.
120
+ 4. If backend session APIs later expose `canonical_visible_session_id`, make the
121
+ frontend resolver prefer the backend value while preserving client fallback for
122
+ older WebUI servers.
123
+ 5. If #1925 moves execution/session ownership behind an adapter, carry this
124
+ contract forward as an adapter-facing session-navigation invariant.