total-recall-brain 3.12.2 → 3.13.1

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 (154) hide show
  1. package/README.md +91 -108
  2. package/bin/antigravity.mjs +81 -52
  3. package/bin/total-recall.mjs +32 -57
  4. package/extension/background.js +1 -1
  5. package/extension/options/options.js +9 -3
  6. package/extension/sidepanel/sidepanel.js +0 -2
  7. package/frontend/index.html +4 -3
  8. package/frontend/package.json +3 -1
  9. package/frontend/src/App.tsx +112 -111
  10. package/frontend/src/api.ts +700 -18
  11. package/frontend/src/components/BrainSelector.tsx +211 -199
  12. package/frontend/src/components/DocumentEditorModal.tsx +57 -0
  13. package/frontend/src/components/DocumentTable.tsx +47 -0
  14. package/frontend/src/components/Graph3D.tsx +120 -71
  15. package/frontend/src/components/UsageChart.tsx +78 -0
  16. package/frontend/src/components/brand/BrandMark.tsx +95 -0
  17. package/frontend/src/index.css +286 -86
  18. package/frontend/src/pages/ApiKeysPage.tsx +1878 -215
  19. package/frontend/src/pages/ChatPage.tsx +103 -45
  20. package/frontend/src/pages/DesignDocsPage.tsx +614 -0
  21. package/frontend/src/pages/FilesPage.tsx +10 -6
  22. package/frontend/src/pages/GraphPage.tsx +5 -3
  23. package/frontend/src/pages/HelpPage.tsx +2 -2
  24. package/frontend/src/pages/InboxPage.tsx +82 -0
  25. package/frontend/src/pages/InstructionsPage.tsx +583 -0
  26. package/frontend/src/pages/IntegrationsPage.tsx +21 -10
  27. package/frontend/src/pages/LoginPage.tsx +95 -77
  28. package/frontend/src/pages/MemoryPage.tsx +31 -8
  29. package/frontend/src/pages/ModelsPage.tsx +280 -23
  30. package/frontend/src/pages/OkfPage.tsx +535 -0
  31. package/frontend/src/pages/OnboardingPage.tsx +690 -0
  32. package/frontend/src/pages/OpenWikiPage.tsx +561 -0
  33. package/frontend/src/pages/SettingsPage.tsx +826 -740
  34. package/frontend/src/pages/SkillsPage.tsx +1259 -117
  35. package/frontend/src/pages/UsagePage.tsx +256 -11
  36. package/frontend/src/pages/VaultPage.tsx +223 -0
  37. package/frontend/src/types.ts +173 -0
  38. package/package.json +4 -4
  39. package/scaffold/.agent/skills/total-recall/SKILL.md +43 -4
  40. package/scaffold/.agent/skills/total-recall/modules/README.md +10 -0
  41. package/scaffold/.agent/skills/total-recall/modules/agents/README.md +5 -0
  42. package/scaffold/.agent/skills/total-recall/{skills/tr-cli-agents → modules/agents}/agents.yml +8 -0
  43. package/scaffold/.agent/skills/total-recall/modules/skill-deploy/README.md +9 -0
  44. package/scaffold/.agent/skills/total-recall/openwiki/README.md +10 -0
  45. package/scaffold/.agent/skills/total-recall/openwiki/architecture.md +5 -0
  46. package/scaffold/.agent/skills/total-recall/openwiki/ide.md +10 -0
  47. package/scaffold/.agent/skills/total-recall/openwiki/memory.md +11 -0
  48. package/scaffold/.agent/skills/total-recall/openwiki/secrets.md +7 -0
  49. package/scaffold/.agent/skills/total-recall/openwiki/skills.md +7 -0
  50. package/src/cli/brain.mjs +63 -5
  51. package/src/cli/connect.mjs +11 -19
  52. package/src/cli/daemon.mjs +5 -4
  53. package/src/cli/deploy-ui.mjs +8 -3
  54. package/src/cli/deploy.mjs +84 -27
  55. package/src/cli/ingest/index.mjs +1 -1
  56. package/src/cli/init.mjs +63 -34
  57. package/src/cli/remember.mjs +3 -3
  58. package/src/cli/secret.mjs +812 -0
  59. package/src/cli/setup.mjs +34 -7
  60. package/src/cli/share.mjs +2 -2
  61. package/src/cli/skill.mjs +396 -35
  62. package/src/cli/sync.mjs +4 -4
  63. package/src/cli/task.mjs +287 -0
  64. package/src/core/clarity-rewriter.mjs +5 -5
  65. package/src/core/config.mjs +44 -2
  66. package/src/core/conflict-detector.mjs +5 -5
  67. package/src/core/crons.mjs +54 -0
  68. package/src/core/daemon-loop.mjs +87 -235
  69. package/src/core/dream.mjs +170 -10
  70. package/src/core/env-import.mjs +456 -0
  71. package/src/core/fact-seeker.mjs +14 -14
  72. package/src/core/import-rules.mjs +20 -7
  73. package/src/core/inference-engine.mjs +3 -3
  74. package/src/core/migrate.mjs +14 -8
  75. package/src/core/okf-adapter.mjs +2 -2
  76. package/src/core/operation-validator.mjs +39 -331
  77. package/src/core/optimizer.mjs +7 -0
  78. package/src/core/post-mortem.mjs +2 -2
  79. package/src/core/project-brain.mjs +349 -0
  80. package/src/core/provider-catalog.mjs +296 -0
  81. package/src/core/quick-capture.mjs +1 -1
  82. package/src/core/remote-vault-sync.mjs +194 -0
  83. package/src/core/research-queue.mjs +7 -11
  84. package/src/core/runtime.mjs +33 -9
  85. package/src/core/scheduler.mjs +59 -5
  86. package/src/core/schema.mjs +14 -0
  87. package/src/core/search.mjs +1 -1
  88. package/src/core/secrets-env-export.mjs +323 -0
  89. package/src/core/secrets-rotate.mjs +245 -0
  90. package/src/core/secrets-store.mjs +645 -0
  91. package/src/core/semantic-index.mjs +3 -3
  92. package/src/core/skills-registry.mjs +1062 -0
  93. package/src/core/source-adapters.mjs +4 -1
  94. package/src/core/ssss-host-extension.mjs +94 -0
  95. package/src/core/ssss-kernel-bridge.mjs +530 -0
  96. package/src/core/surface.mjs +14 -0
  97. package/src/core/task-envelope.mjs +298 -0
  98. package/src/core/task-executors.mjs +600 -0
  99. package/src/core/validated-write.mjs +124 -56
  100. package/src/core/vault.mjs +19 -34
  101. package/src/core/webauthn-store.mjs +272 -0
  102. package/src/server/api.mjs +28 -16
  103. package/src/server/auth.mjs +53 -2
  104. package/src/server/index.mjs +3 -3
  105. package/src/server/keys.mjs +30 -4
  106. package/src/server/rest.mjs +405 -68
  107. package/src/server/route-manifest.json +168 -0
  108. package/src/server/routes/_shared.mjs +40 -1
  109. package/src/server/routes/docs.mjs +260 -0
  110. package/src/server/routes/memory.mjs +145 -32
  111. package/src/server/routes/research.mjs +30 -0
  112. package/src/server/routes/secrets.mjs +470 -0
  113. package/src/server/routes/share.mjs +2 -2
  114. package/src/server/routes/skills.mjs +452 -54
  115. package/src/server/routes/sync.mjs +48 -0
  116. package/src/server/routes/webauthn.mjs +184 -0
  117. package/src/server/update-route-manifest.mjs +39 -0
  118. package/templates/onboarding-interview.md +32 -22
  119. package/templates/openwiki/README.md +10 -0
  120. package/templates/openwiki/architecture.md +5 -0
  121. package/templates/openwiki/ide.md +10 -0
  122. package/templates/openwiki/memory.md +11 -0
  123. package/templates/openwiki/secrets.md +7 -0
  124. package/templates/openwiki/skills.md +7 -0
  125. package/scaffold/.agent/skills/total-recall/skills/tr-cli-agents/SKILL.md +0 -121
  126. package/scaffold/.agent/skills/total-recall/skills/tr-cli-agents/references/antigravity.txt +0 -20
  127. package/scaffold/.agent/skills/total-recall/skills/tr-cli-agents/references/claude.txt +0 -58
  128. package/scaffold/.agent/skills/total-recall/skills/tr-cli-agents/references/codex.txt +0 -81
  129. package/scaffold/.agent/skills/total-recall/skills/tr-cli-agents/references/gemini.txt +0 -44
  130. package/scaffold/.agent/skills/total-recall/skills/tr-cli-agents/scripts/.gitkeep +0 -0
  131. package/scaffold/.agent/skills/total-recall/skills/tr-cli-agents/subagents/.gitkeep +0 -0
  132. package/scaffold/.agent/skills/total-recall/skills/tr-research/SKILL.md +0 -338
  133. package/scaffold/.agent/skills/total-recall/skills/tr-skill/SKILL.md +0 -282
  134. package/scaffold/.agent/skills/total-recall/skills/tr-skill/assets/skill-template/SKILL.md +0 -20
  135. package/scaffold/.agent/skills/total-recall/skills/tr-skill/evals/evals.json +0 -20
  136. package/scaffold/.agent/skills/total-recall/skills/tr-skill/hooks/on-skill-add.sh +0 -14
  137. package/scaffold/.agent/skills/total-recall/skills/tr-skill/hooks/on-skill-delete.sh +0 -14
  138. package/scaffold/.agent/skills/total-recall/skills/tr-skill/learnings/.gitkeep +0 -0
  139. package/scaffold/.agent/skills/total-recall/skills/tr-skill/references/.gitkeep +0 -0
  140. package/scaffold/.agent/skills/total-recall/skills/tr-skill/scripts/.gitkeep +0 -0
  141. package/scaffold/.agent/skills/total-recall/skills/tr-skill/scripts/create-skill.sh +0 -65
  142. package/scaffold/.agent/skills/total-recall/skills/tr-skill/scripts/enforce-skill-optimization.mjs +0 -135
  143. package/scaffold/.agent/skills/total-recall/skills/tr-skill/scripts/skill-watcher.mjs +0 -64
  144. package/scaffold/.agent/skills/total-recall/skills/tr-skill/subagents/audit-all-skills.md +0 -62
  145. package/scaffold/.agent/skills/total-recall/skills/tr-ssss/SKILL.md +0 -298
  146. package/scaffold/.agent/skills/total-recall/skills/tr-ssss/evals/evals.json +0 -17
  147. package/scaffold/.agent/skills/total-recall/skills/tr-ssss/references/CHANGELOG.md +0 -124
  148. package/scaffold/.agent/skills/total-recall/skills/tr-ssss/references/ssss-spec.md +0 -1325
  149. package/scaffold/.agent/skills/total-recall/skills/tr-ssss/scripts/validate-schema.mjs +0 -232
  150. package/scaffold/.agent/skills/total-recall/skills/tr-ssss/subagents/audit-ssss-node.md +0 -9
  151. /package/scaffold/.agent/skills/total-recall/{skills/tr-cli-agents/evals → modules/skill-deploy/scripts}/.gitkeep +0 -0
  152. /package/scaffold/.agent/skills/total-recall/{skills/tr-skill → modules/skill-deploy}/scripts/find-skills.mjs +0 -0
  153. /package/scaffold/.agent/skills/total-recall/{skills/tr-skill → modules/skill-deploy}/scripts/install-skill.mjs +0 -0
  154. /package/scaffold/.agent/skills/total-recall/{skills/tr-skill → modules/skill-deploy}/scripts/scan-skill.mjs +0 -0
@@ -10,9 +10,11 @@
10
10
  "preview": "vite preview"
11
11
  },
12
12
  "dependencies": {
13
+ "@simplewebauthn/browser": "^13.3.0",
13
14
  "react": "^19.2.6",
14
15
  "react-dom": "^19.2.6",
15
- "react-router-dom": "^7.15.0"
16
+ "react-router-dom": "^7.15.0",
17
+ "recharts": "^3.9.2"
16
18
  },
17
19
  "devDependencies": {
18
20
  "@eslint/js": "^10.0.1",
@@ -1,26 +1,22 @@
1
1
  import { useState, useEffect } from 'react'
2
- import { BrowserRouter, Routes, Route, NavLink, useLocation } from 'react-router-dom'
2
+ import { BrowserRouter, Routes, Route, NavLink, Navigate, useLocation } from 'react-router-dom'
3
3
  import './App.css'
4
4
  import { getApiBase, setApiBase, checkSession, logout, registerUnauthedCallback, fetchHealth } from './api'
5
5
  import type { HealthData } from './types'
6
6
  import LoginPage from './pages/LoginPage'
7
7
  import ChatPage from './pages/ChatPage'
8
8
  import MemoryPage from './pages/MemoryPage'
9
- import HealthPage from './pages/HealthPage'
10
- import SandboxPage from './pages/SandboxPage'
11
9
  import SettingsPage from './pages/SettingsPage'
12
10
  import TasksPage from './pages/TasksPage'
13
- import FilesPage from './pages/FilesPage'
14
11
  import ApiKeysPage from './pages/ApiKeysPage'
15
12
  import IntegrationsPage from './pages/IntegrationsPage'
16
13
  import BrainSelector from './components/BrainSelector'
17
- import AutomationsPage from './pages/AutomationsPage'
18
- import ModelsPage from './pages/ModelsPage'
19
14
  import SkillsPage from './pages/SkillsPage'
20
- import UsagePage from './pages/UsagePage'
21
- import CollabPage from './pages/CollabPage'
22
15
  import HelpPage from './pages/HelpPage'
23
16
  import GraphPage from './pages/GraphPage'
17
+ import OpenWikiPage from './pages/OpenWikiPage'
18
+ import OnboardingPage, { isOnboardingComplete } from './pages/OnboardingPage'
19
+ import BrandMark from './components/brand/BrandMark'
24
20
 
25
21
  // ─── Auth state type ──────────────────────────────────────────────────────────
26
22
  type AuthState = 'loading' | 'authed' | 'unauthed'
@@ -58,10 +54,21 @@ function Sidebar({ onLogout, health, activeBrainId, onBrainChange }: SidebarProp
58
54
  return (
59
55
  <aside className="sidebar">
60
56
  <div className="sidebar-brand">
61
- <h1>Total Recall</h1>
62
- <span>Sovereign Brain v3.0</span>
57
+ <div className="sidebar-brand-lockup" title="Total Recall">
58
+ <BrandMark variant="lockup" height={48} alt="Total Recall" />
59
+ </div>
60
+ <span style={{ paddingLeft: 2 }}>Portable memory · any IDE</span>
63
61
  </div>
64
62
  <nav className="sidebar-nav">
63
+ <div className="nav-section-label">Memory</div>
64
+ {!isOnboardingComplete() && (
65
+ <NavLink to="/onboarding" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-onboarding">
66
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
67
+ <path d="M12 2L2 7l10 5 10-5-10-5z" /><path d="M2 17l10 5 10-5" /><path d="M2 12l10 5 10-5" />
68
+ </svg>
69
+ Setup
70
+ </NavLink>
71
+ )}
65
72
  <NavLink to="/" end className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-chat">
66
73
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
67
74
  <path d="M21 15a2 2 0 01-2 2H7l-4 4V5a2 2 0 012-2h14a2 2 0 012 2z" />
@@ -72,51 +79,50 @@ function Sidebar({ onLogout, health, activeBrainId, onBrainChange }: SidebarProp
72
79
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
73
80
  <circle cx="12" cy="12" r="10" /><path d="M12 16v-4M12 8h.01" />
74
81
  </svg>
75
- Memory
76
- </NavLink>
77
- <NavLink to="/tasks" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-tasks">
78
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
79
- <path d="M9 11l3 3L22 4" /><path d="M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11" />
80
- </svg>
81
- Tasks
82
+ Vault
82
83
  </NavLink>
83
- <NavLink to="/automations" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-automations">
84
+ <NavLink to="/graph" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-graph">
84
85
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
85
- <circle cx="12" cy="12" r="10" />
86
- <polyline points="12 6 12 12 16 14" />
86
+ <circle cx="5" cy="6" r="2" /><circle cx="19" cy="6" r="2" /><circle cx="12" cy="18" r="2" />
87
+ <path d="M7 7l4 9M17 7l-4 9" />
87
88
  </svg>
88
- Automations
89
+ Graph
89
90
  </NavLink>
90
- <NavLink to="/files" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-files">
91
+ <NavLink to="/tasks" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-tasks">
91
92
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
92
- <path d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z" />
93
+ <path d="M9 11l3 3L22 4" /><path d="M21 12v7a2 2 0 01-2 2H5a2 2 0 01-2-2V5a2 2 0 012-2h11" />
93
94
  </svg>
94
- Files
95
+ Tasks
95
96
  </NavLink>
96
- <NavLink to="/sandbox" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-sandbox">
97
+
98
+ <div className="nav-section-label">Connect</div>
99
+ <NavLink to="/integrations" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-integrations">
97
100
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
98
- <polyline points="16 18 22 12 16 6" /><polyline points="8 6 2 12 8 18" />
101
+ <path d="M10 13a5 5 0 007.54.54l3-3a5 5 0 00-7.07-7.07l-1.72 1.71" />
102
+ <path d="M14 11a5 5 0 00-7.54-.54l-3 3a5 5 0 007.07 7.07l1.71-1.71" />
99
103
  </svg>
100
- Sandbox
104
+ IDEs
101
105
  </NavLink>
102
- <NavLink to="/models" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-models">
106
+ <NavLink to="/skills" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-skills">
103
107
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
104
- <path d="M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"></path><polyline points="3.27 6.96 12 12.01 20.73 6.96"></polyline><line x1="12" y1="22.08" x2="12" y2="12"></line>
108
+ <path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5" />
105
109
  </svg>
106
- Models & Agents
110
+ Skills
107
111
  </NavLink>
108
- <NavLink to="/health" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-health">
112
+ <NavLink to="/openwiki" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-openwiki">
109
113
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
110
- <path d="M22 12h-4l-3 9L9 3l-3 9H2" />
114
+ <path d="M2 3h6a4 4 0 014 4v14a3 3 0 00-3-3H2z" />
115
+ <path d="M22 3h-6a4 4 0 00-4 4v14a3 3 0 013-3h7z" />
111
116
  </svg>
112
- Health
117
+ OpenWiki
113
118
  </NavLink>
114
- <NavLink to="/usage" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-usage">
119
+
120
+ <div className="nav-section-label">Account</div>
121
+ <NavLink to="/keys" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-keys">
115
122
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
116
- <line x1="12" y1="1" x2="12" y2="23"></line>
117
- <path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"></path>
123
+ <path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 11-7.778 7.778 5.5 5.5 0 017.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4" />
118
124
  </svg>
119
- Usage & Costs
125
+ Secrets
120
126
  </NavLink>
121
127
  <NavLink to="/settings" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-settings">
122
128
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
@@ -124,74 +130,45 @@ function Sidebar({ onLogout, health, activeBrainId, onBrainChange }: SidebarProp
124
130
  </svg>
125
131
  Settings
126
132
  </NavLink>
127
- <NavLink to="/keys" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-keys">
128
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
129
- <path d="M21 2l-2 2m-7.61 7.61a5.5 5.5 0 11-7.778 7.778 5.5 5.5 0 017.777-7.777zm0 0L15.5 7.5m0 0l3 3L22 7l-3-3m-3.5 3.5L19 4" />
130
- </svg>
131
- API Keys
132
- </NavLink>
133
- <NavLink to="/integrations" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-integrations">
134
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
135
- <path d="M10 13a5 5 0 007.54.54l3-3a5 5 0 00-7.07-7.07l-1.72 1.71" />
136
- <path d="M14 11a5 5 0 00-7.54-.54l-3 3a5 5 0 007.07 7.07l1.71-1.71" />
137
- </svg>
138
- Integrations
139
- </NavLink>
140
- <NavLink to="/skills" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-skills">
141
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
142
- <path d="M12 2L2 7l10 5 10-5-10-5zM2 17l10 5 10-5M2 12l10 5 10-5" />
143
- </svg>
144
- Skills Manager
145
- </NavLink>
146
- <NavLink to="/collab" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-collab">
147
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
148
- <path d="M17 21v-2a4 4 0 00-4-4H5a4 4 0 00-4 4v2" />
149
- <circle cx="9" cy="7" r="4" />
150
- <path d="M23 21v-2a4 4 0 00-3-3.87" />
151
- <path d="M16 3.13a4 4 0 010 7.75" />
152
- </svg>
153
- Collaboration
154
- </NavLink>
155
133
  <NavLink to="/help" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-help">
156
134
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
157
135
  <circle cx="12" cy="12" r="10" />
158
136
  <path d="M9.09 9a3 3 0 015.83 1c0 2-3 3-3 3" />
159
137
  <line x1="12" y1="17" x2="12.01" y2="17" />
160
138
  </svg>
161
- Documentation
162
- </NavLink>
163
- <NavLink to="/graph" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-graph">
164
- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
165
- <polygon points="12 2 2 22 22 22" />
166
- </svg>
167
- Sovereign Graph
139
+ Help
168
140
  </NavLink>
141
+ {isOnboardingComplete() && (
142
+ <NavLink to="/onboarding" className={({ isActive }) => `nav-link ${isActive ? 'active' : ''}`} id="nav-onboarding-replay" style={{ opacity: 0.75 }}>
143
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round">
144
+ <path d="M12 2L2 7l10 5 10-5-10-5z" /><path d="M2 17l10 5 10-5" /><path d="M2 12l10 5 10-5" />
145
+ </svg>
146
+ Setup guide
147
+ </NavLink>
148
+ )}
169
149
  </nav>
170
- <div className="sidebar-footer">
171
- <div style={{ marginBottom: 8 }}>
172
- <BrainSelector activeBrainId={activeBrainId} onBrainChange={onBrainChange} />
173
- </div>
174
- <div style={{ marginBottom: 12 }}>
175
- <select
176
- value={getApiBase()}
177
- onChange={e => setApiBase(e.target.value)}
178
- style={{
179
- width: '100%',
180
- background: 'var(--bg-secondary)',
181
- color: 'var(--text-secondary)',
182
- border: '1px solid var(--border)',
183
- borderRadius: 6,
184
- padding: '4px 8px',
185
- fontSize: 12,
186
- outline: 'none'
187
- }}
188
- >
189
- <option value="">Localhost (Proxy)</option>
190
- {import.meta.env.VITE_BRAIN_URL && (
191
- <option value={import.meta.env.VITE_BRAIN_URL}>{new URL(import.meta.env.VITE_BRAIN_URL).host}</option>
192
- )}
193
- </select>
194
- </div>
150
+ <div className="sidebar-footer" style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
151
+ <BrainSelector activeBrainId={activeBrainId} onBrainChange={onBrainChange} />
152
+ <select
153
+ value={getApiBase()}
154
+ onChange={e => setApiBase(e.target.value)}
155
+ title="API host"
156
+ style={{
157
+ width: '100%',
158
+ background: 'rgba(148, 163, 184, 0.06)',
159
+ color: 'var(--text-tertiary)',
160
+ border: '1px solid var(--border)',
161
+ borderRadius: 8,
162
+ padding: '5px 8px',
163
+ fontSize: 10,
164
+ outline: 'none',
165
+ }}
166
+ >
167
+ <option value="">Local API</option>
168
+ {import.meta.env.VITE_BRAIN_URL && (
169
+ <option value={import.meta.env.VITE_BRAIN_URL}>{new URL(import.meta.env.VITE_BRAIN_URL).host}</option>
170
+ )}
171
+ </select>
195
172
  <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
196
173
  <div style={{ display: 'flex', flexDirection: 'column', gap: 4, fontSize: 11 }}>
197
174
  {(() => {
@@ -254,9 +231,19 @@ function Sidebar({ onLogout, health, activeBrainId, onBrainChange }: SidebarProp
254
231
 
255
232
  // ─── Main content (routes) ────────────────────────────────────────────────────
256
233
 
234
+ function OnboardingRedirect() {
235
+ const location = useLocation()
236
+ // First visit: force guided onboarding until complete (local flag or vault profile)
237
+ if (!isOnboardingComplete() && location.pathname !== '/onboarding') {
238
+ return <Navigate to="/onboarding" replace />
239
+ }
240
+
241
+ return null
242
+ }
243
+
257
244
  function MainContent({ activeBrainId, onBrainChange }: { activeBrainId: string; onBrainChange: (id: string) => void }) {
258
245
  const location = useLocation();
259
- const isChat = location.pathname === '/';
246
+ const isChat = location.pathname === '/' || location.pathname === '/chat';
260
247
  const [floatingChat, setFloatingChat] = useState(false);
261
248
 
262
249
  useEffect(() => {
@@ -291,10 +278,14 @@ function MainContent({ activeBrainId, onBrainChange }: { activeBrainId: string;
291
278
 
292
279
  return (
293
280
  <main className="main-content" style={{ display: 'flex', flexDirection: 'column', height: '100%', overflow: 'hidden', position: 'relative' }}>
281
+ <OnboardingRedirect />
294
282
  <div style={chatStyle}>
295
283
  {floatingChat && (
296
284
  <div style={{ padding: '8px', background: 'var(--bg-secondary)', borderBottom: '1px solid var(--border)', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
297
- <span style={{ fontSize: 12, fontWeight: 600 }}>Total Recall Agent</span>
285
+ <span style={{ fontSize: 12, fontWeight: 600, display: 'flex', alignItems: 'center', gap: 8 }}>
286
+ <img src="/brand/total-recall-icon.svg" alt="" width={18} height={18} style={{ borderRadius: 4 }} />
287
+ Total Recall
288
+ </span>
298
289
  <button onClick={() => setFloatingChat(false)} style={{ background: 'none', border: 'none', cursor: 'pointer', color: 'var(--text-tertiary)' }}>✖</button>
299
290
  </div>
300
291
  )}
@@ -303,22 +294,32 @@ function MainContent({ activeBrainId, onBrainChange }: { activeBrainId: string;
303
294
  {(!isChat || floatingChat) && (
304
295
  <div style={{ flex: 1, overflow: 'auto' }}>
305
296
  <Routes>
306
- <Route path="/" element={<div/>} />
297
+ <Route path="/" element={<Navigate to={isOnboardingComplete() ? '/openwiki' : '/onboarding'} replace />} />
298
+ <Route path="/chat" element={<ChatPage activeBrainId={activeBrainId} />} />
299
+ <Route path="/onboarding" element={<OnboardingPage />} />
307
300
  <Route path="/memory" element={<MemoryPage activeBrainId={activeBrainId} />} />
301
+ <Route path="/graph" element={<GraphPage activeBrainId={activeBrainId} />} />
308
302
  <Route path="/tasks" element={<TasksPage />} />
309
- <Route path="/automations" element={<AutomationsPage />} />
310
- <Route path="/files" element={<FilesPage />} />
311
- <Route path="/sandbox" element={<SandboxPage />} />
312
- <Route path="/models" element={<ModelsPage />} />
313
- <Route path="/health" element={<HealthPage />} />
314
- <Route path="/usage" element={<UsagePage />} />
315
- <Route path="/settings" element={<SettingsPage />} />
316
- <Route path="/keys" element={<ApiKeysPage />} />
317
- <Route path="/integrations" element={<IntegrationsPage />} />
318
303
  <Route path="/skills" element={<SkillsPage />} />
319
- <Route path="/collab" element={<CollabPage />} />
304
+ <Route path="/openwiki" element={<OpenWikiPage activeBrainId={activeBrainId} />} />
305
+ <Route path="/integrations" element={<IntegrationsPage />} />
306
+ <Route path="/keys" element={<ApiKeysPage />} />
307
+ <Route path="/settings" element={<SettingsPage />} />
320
308
  <Route path="/help" element={<HelpPage />} />
321
- <Route path="/graph" element={<GraphPage activeBrainId={activeBrainId} />} />
309
+ {/* Legacy OS-control-plane routes → core product */}
310
+ <Route path="/vault" element={<Navigate to="/memory" replace />} />
311
+ <Route path="/inbox" element={<Navigate to="/tasks" replace />} />
312
+ <Route path="/automations" element={<Navigate to="/tasks" replace />} />
313
+ <Route path="/files" element={<Navigate to="/memory" replace />} />
314
+ <Route path="/sandbox" element={<Navigate to="/memory" replace />} />
315
+ <Route path="/models" element={<Navigate to="/settings" replace />} />
316
+ <Route path="/health" element={<Navigate to="/settings" replace />} />
317
+ <Route path="/usage" element={<Navigate to="/settings" replace />} />
318
+ <Route path="/collab" element={<Navigate to="/memory" replace />} />
319
+ <Route path="/instructions" element={<Navigate to="/memory" replace />} />
320
+ <Route path="/design" element={<Navigate to="/memory" replace />} />
321
+ <Route path="/okf" element={<Navigate to="/memory" replace />} />
322
+ <Route path="*" element={<Navigate to="/memory" replace />} />
322
323
  </Routes>
323
324
  </div>
324
325
  )}