total-recall-brain 3.44.0 → 3.46.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 (502) hide show
  1. package/bin/total-recall.mjs +10 -6
  2. package/docs/ARCHITECTURE.md +10 -7
  3. package/docs/reference/cli-reference.md +13 -8
  4. package/frontend/dist/assets/index-BRYE1jmv.css +1 -0
  5. package/frontend/dist/assets/index-D1goIPjC.js +5598 -0
  6. package/frontend/dist/index.html +2 -2
  7. package/frontend/dist/sw.js +5 -4
  8. package/frontend/src/App.tsx +185 -238
  9. package/frontend/src/api/auth-inventory.ts +62 -0
  10. package/frontend/src/api/memory.ts +13 -8
  11. package/frontend/src/api/plugin-credentials.ts +23 -0
  12. package/frontend/src/api/plugins.ts +37 -53
  13. package/frontend/src/api/workspace-drawers.ts +97 -0
  14. package/frontend/src/components/BrainSelector.tsx +9 -3
  15. package/frontend/src/components/plugins/PluginPanel.tsx +83 -42
  16. package/frontend/src/components/plugins/PluginSettings.tsx +10 -20
  17. package/frontend/src/components/plugins/PluginWorkspace.tsx +367 -0
  18. package/frontend/src/components/plugins/ScopedPluginCommands.tsx +142 -0
  19. package/frontend/src/components/plugins/plugin-frame.ts +44 -33
  20. package/frontend/src/components/plugins/scoped-plugin-operations.ts +28 -0
  21. package/frontend/src/components/workspace/DrawerChat.tsx +110 -0
  22. package/frontend/src/components/workspace/DrawerLayout.tsx +196 -0
  23. package/frontend/src/components/workspace/DrawerMarkup.tsx +49 -0
  24. package/frontend/src/components/workspace/PluginChunkLibrary.tsx +92 -0
  25. package/frontend/src/components/workspace/PluginHome.tsx +76 -0
  26. package/frontend/src/components/workspace/WorkspaceDrawers.tsx +96 -0
  27. package/frontend/src/components/workspace/WorkspacePage.tsx +95 -0
  28. package/frontend/src/components/workspace/usePluginDesign.ts +38 -0
  29. package/frontend/src/index.css +409 -136
  30. package/frontend/src/pages/HelpPage.tsx +15 -46
  31. package/frontend/src/pages/MemoryPage.tsx +19 -36
  32. package/frontend/src/pages/SettingsPage.tsx +1 -1
  33. package/metadata.plugin.schema.json +53 -227
  34. package/package.json +1 -1
  35. package/scaffold/.agent/skills/plugin/SKILL.md +13 -11
  36. package/scaffold/.agent/skills/plugin/evals/README.md +14 -21
  37. package/scaffold/.agent/skills/plugin/evals/cases/01-fabricated-seed.mjs +15 -18
  38. package/scaffold/.agent/skills/plugin/evals/cases/02-reassuring-default.mjs +19 -24
  39. package/scaffold/.agent/skills/plugin/evals/cases/03-declared-template.mjs +12 -20
  40. package/scaffold/.agent/skills/plugin/evals/cases/04-home-collects-credential.mjs +35 -0
  41. package/scaffold/.agent/skills/plugin/evals/cases/05-host-leak-in-scaffold.mjs +8 -28
  42. package/scaffold/.agent/skills/plugin/evals/cases/06-correct-plugin.mjs +85 -47
  43. package/scaffold/.agent/skills/plugin/evals/run.mjs +17 -18
  44. package/scaffold/.agent/skills/plugin/prompts/05-credentials.md +4 -4
  45. package/scaffold/.agent/skills/plugin/prompts/07-scaffold.md +2 -2
  46. package/scaffold/.agent/skills/plugin/prompts/08-verify.md +4 -4
  47. package/scaffold/.agent/skills/plugin/references/anti-patterns.md +2 -2
  48. package/scaffold/.agent/skills/plugin/references/generative-home.md +38 -0
  49. package/scaffold/.agent/skills/plugin/references/scaffold.md +5 -5
  50. package/scaffold/.agent/skills/plugin/references/surfaces.md +13 -4
  51. package/scaffold/.agent/skills/plugin/scripts/record.mjs +75 -153
  52. package/scaffold/.agent/skills/plugin/subagents/plugin-reviewer.md +4 -4
  53. package/scaffold/.agent/skills/total-recall/plugins/auth/DESIGN.md +76 -0
  54. package/scaffold/.agent/skills/total-recall/plugins/auth/README.md +3 -1
  55. package/scaffold/.agent/skills/total-recall/plugins/auth/cli.mjs +20 -15
  56. package/scaffold/.agent/skills/total-recall/plugins/auth/package-lock.json +7 -7
  57. package/scaffold/.agent/skills/total-recall/plugins/auth/package.json +2 -1
  58. package/scaffold/.agent/skills/total-recall/plugins/auth/plugin.json +13 -51
  59. package/scaffold/.agent/skills/total-recall/plugins/auth/src/cli-secret.mjs +20 -1
  60. package/scaffold/.agent/skills/total-recall/plugins/auth/src/secrets-store.mjs +12 -1
  61. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/access-overview.md +17 -0
  62. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/agent-login.md +20 -0
  63. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/baseline-audit.md +22 -0
  64. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/credential-repository-binding.md +17 -0
  65. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/credential-store-maintenance.md +17 -0
  66. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/dashboard-password.md +18 -0
  67. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/dashboard-sessions.md +18 -0
  68. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/endpoint-probe.md +23 -0
  69. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/google-sign-in.md +21 -0
  70. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/mesh-machines.md +16 -0
  71. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/passkey-enrollment.md +21 -0
  72. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/registered-brains.md +16 -0
  73. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/scoped-access-keys.md +17 -0
  74. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/secret-inventory.md +25 -0
  75. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/signing-key-rotation.md +22 -0
  76. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/home.js +375 -0
  77. package/scaffold/.agent/skills/total-recall/plugins/automations/BRICK.md +7 -0
  78. package/scaffold/.agent/skills/total-recall/plugins/automations/DESIGN.md +53 -0
  79. package/scaffold/.agent/skills/total-recall/plugins/automations/LICENSE +21 -0
  80. package/scaffold/.agent/skills/total-recall/plugins/automations/README.md +66 -0
  81. package/scaffold/.agent/skills/total-recall/plugins/automations/adapters.mjs +247 -0
  82. package/scaffold/.agent/skills/total-recall/plugins/automations/capability/index.mjs +16 -0
  83. package/scaffold/.agent/skills/total-recall/plugins/automations/cli.mjs +130 -0
  84. package/{src/core/plugin-cron.mjs → scaffold/.agent/skills/total-recall/plugins/automations/cron.mjs} +1 -3
  85. package/scaffold/.agent/skills/total-recall/plugins/automations/inventory.mjs +88 -0
  86. package/scaffold/.agent/skills/total-recall/plugins/automations/package-lock.json +7661 -0
  87. package/scaffold/.agent/skills/total-recall/plugins/automations/package.json +36 -0
  88. package/scaffold/.agent/skills/total-recall/plugins/automations/plugin.json +151 -0
  89. package/scaffold/.agent/skills/total-recall/plugins/automations/scheduler.mjs +246 -0
  90. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/automations.js +2 -0
  91. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/control-ledger.md +42 -0
  92. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/local-inventory-triage.md +17 -0
  93. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/pending-control.md +39 -0
  94. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/run-evidence.md +41 -0
  95. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/schedule-vs-run-evidence.md +17 -0
  96. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/source-coverage.md +41 -0
  97. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/home.js +278 -0
  98. package/scaffold/.agent/skills/total-recall/plugins/code-quality/DESIGN.md +53 -0
  99. package/scaffold/.agent/skills/total-recall/plugins/code-quality/cli.mjs +23 -0
  100. package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/run-core.mjs +5 -3
  101. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/check.mjs +61 -7
  102. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/report-data.mjs +40 -14
  103. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/report.mjs +15 -40
  104. package/scaffold/.agent/skills/total-recall/plugins/code-quality/package-lock.json +7 -7
  105. package/scaffold/.agent/skills/total-recall/plugins/code-quality/package.json +2 -1
  106. package/scaffold/.agent/skills/total-recall/plugins/code-quality/plugin.json +40 -40
  107. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/config.md +15 -0
  108. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/detect.md +15 -0
  109. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/gate.md +15 -0
  110. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/init.md +15 -0
  111. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/report.md +17 -0
  112. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/run.md +17 -0
  113. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/snapshot.md +15 -0
  114. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/code-quality-report.mjs +55 -23
  115. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/home.mjs +214 -0
  116. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/DESIGN.md +146 -0
  117. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package-lock.json +7 -7
  118. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package.json +2 -1
  119. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/plugin.json +51 -34
  120. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/command.mjs +1 -1
  121. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/create.md +35 -0
  122. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/history.md +35 -0
  123. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/library.md +49 -0
  124. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/list.md +42 -0
  125. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/promote.md +40 -0
  126. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/read.md +25 -0
  127. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/remove.md +26 -0
  128. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/rollback.md +26 -0
  129. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/show.md +53 -0
  130. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/status.md +40 -0
  131. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/test-path.md +38 -0
  132. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/test.md +46 -0
  133. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/update.md +32 -0
  134. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/home.js +533 -0
  135. package/scaffold/.agent/skills/total-recall/plugins/embeddings/DESIGN.md +110 -0
  136. package/scaffold/.agent/skills/total-recall/plugins/embeddings/package-lock.json +7 -7
  137. package/scaffold/.agent/skills/total-recall/plugins/embeddings/package.json +2 -1
  138. package/scaffold/.agent/skills/total-recall/plugins/embeddings/plugin.json +13 -10
  139. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/benchmark.md +49 -0
  140. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/coverage.md +53 -0
  141. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/models.md +43 -0
  142. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/pull.md +41 -0
  143. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/status.md +59 -0
  144. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/home.js +353 -0
  145. package/scaffold/.agent/skills/total-recall/plugins/git/DESIGN.md +31 -0
  146. package/scaffold/.agent/skills/total-recall/plugins/git/README.md +136 -0
  147. package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/cli.mjs +140 -24
  148. package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/package-lock.json +9 -9
  149. package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/package.json +4 -2
  150. package/scaffold/.agent/skills/total-recall/plugins/git/plugin.json +151 -0
  151. package/scaffold/.agent/skills/total-recall/plugins/git/src/lib/context.mjs +94 -0
  152. package/scaffold/.agent/skills/total-recall/plugins/git/src/lib/phase3-spec-support.mjs +50 -0
  153. package/scaffold/.agent/skills/total-recall/plugins/git/src/lib/runtime.mjs +40 -0
  154. package/scaffold/.agent/skills/total-recall/plugins/git/src/lib/spec-support.mjs +51 -0
  155. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/_support.mjs +195 -0
  156. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/auth.mjs +201 -0
  157. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/bisect.mjs +40 -0
  158. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/cli-meta.mjs +159 -0
  159. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/commit-memory.mjs +54 -0
  160. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/commit.mjs +46 -0
  161. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/fleet.mjs +174 -0
  162. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/force-push.mjs +58 -0
  163. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/group.mjs +119 -0
  164. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/handoff.mjs +59 -0
  165. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/message.mjs +22 -0
  166. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/resolve.mjs +60 -0
  167. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/rules.mjs +81 -0
  168. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/secret-firewall.mjs +92 -0
  169. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/undo.mjs +156 -0
  170. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/unmerged.mjs +182 -0
  171. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/why.mjs +16 -0
  172. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/change-comparison.md +27 -0
  173. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/commit-identity.md +22 -0
  174. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/create-worktree.md +25 -0
  175. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/registered-worktrees.md +22 -0
  176. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/remove-worktree.md +23 -0
  177. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/repository-ledger.md +25 -0
  178. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/unmerged-work.md +22 -0
  179. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/upstream-divergence.md +17 -0
  180. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/worktree-conflict-triage.md +17 -0
  181. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/worktree-terminal.md +22 -0
  182. package/scaffold/.agent/skills/total-recall/plugins/git/ui/home.js +273 -0
  183. package/scaffold/.agent/skills/total-recall/plugins/mesh/DESIGN.md +35 -0
  184. package/scaffold/.agent/skills/total-recall/plugins/mesh/README.md +4 -5
  185. package/scaffold/.agent/skills/total-recall/plugins/mesh/cli.mjs +9 -3
  186. package/scaffold/.agent/skills/total-recall/plugins/mesh/package-lock.json +7 -7
  187. package/scaffold/.agent/skills/total-recall/plugins/mesh/package.json +2 -1
  188. package/scaffold/.agent/skills/total-recall/plugins/mesh/plugin.json +37 -39
  189. package/scaffold/.agent/skills/total-recall/plugins/mesh/src/cli/mesh.mjs +5 -3
  190. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/active-device-dispatch.md +22 -0
  191. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/control-probe.md +25 -0
  192. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/control-server.md +22 -0
  193. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/credential-readiness.md +23 -0
  194. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/elected-leader.md +22 -0
  195. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/enrollment-key.md +22 -0
  196. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/file-receipt.md +25 -0
  197. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/fleet-execution.md +23 -0
  198. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/fleet-presence.md +23 -0
  199. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/interactive-ssh.md +22 -0
  200. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/local-enrollment.md +23 -0
  201. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/mesh-policy.md +23 -0
  202. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/network-atlas.md +25 -0
  203. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/node-roster.md +26 -0
  204. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/node-selection-proof.md +17 -0
  205. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/owner-observations.md +23 -0
  206. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/peer-path.md +23 -0
  207. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/pinned-leader.md +24 -0
  208. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/reachability-evidence-ladder.md +17 -0
  209. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/recorded-login.md +23 -0
  210. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/remote-execution.md +22 -0
  211. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/secret-grants.md +26 -0
  212. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/{card.js → home.js} +93 -22
  213. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/DESIGN.md +86 -0
  214. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/README.md +44 -9
  215. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/capability/BRICK.md +1 -1
  216. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/capability/index.mjs +18 -6
  217. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/cli.mjs +128 -24
  218. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/package-lock.json +7 -7
  219. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/package.json +3 -2
  220. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/plugin.json +188 -34
  221. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/skills/meta-harness/SKILL.md +17 -3
  222. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/adoption.mjs +2 -2
  223. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/alerts.mjs +3 -3
  224. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/cascade.mjs +92 -18
  225. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/chat.mjs +80 -0
  226. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/control.mjs +145 -0
  227. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/coordinator.mjs +42 -21
  228. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/dispatch-request.mjs +4 -2
  229. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/dispatch.mjs +33 -9
  230. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/documentation.mjs +55 -11
  231. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/executor.mjs +26 -4
  232. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/hermes.mjs +29 -1
  233. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/index.mjs +1 -1
  234. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/included-usage.mjs +1 -1
  235. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/jobs.mjs +84 -0
  236. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/learner.mjs +3 -12
  237. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/maintenance.mjs +17 -0
  238. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/mcp-server.mjs +228 -0
  239. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/process-manager.mjs +25 -2
  240. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/reasoning.mjs +1 -1
  241. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/remote-operation.mjs +5 -1
  242. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/review.mjs +34 -3
  243. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/reviews.mjs +25 -0
  244. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/router.mjs +1 -1
  245. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/claude.mjs +319 -0
  246. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/codex.mjs +387 -0
  247. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/result.mjs +67 -0
  248. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/resume.mjs +373 -0
  249. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/run.mjs +223 -0
  250. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session-jobs.mjs +72 -0
  251. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/setup.mjs +6 -3
  252. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/termination.mjs +16 -12
  253. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/threads.mjs +32 -1
  254. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/usage-queue.mjs +1 -1
  255. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/verify-ssss.mjs +3 -3
  256. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/worker.mjs +285 -40
  257. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/worktree.mjs +76 -9
  258. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/adapter-docs-freshness.md +16 -0
  259. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/chat-handoff.md +26 -0
  260. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/fleet-maintenance.md +21 -0
  261. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/harness-inventory.md +21 -0
  262. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/included-access.md +18 -0
  263. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/included-usage-verification.md +15 -0
  264. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/independent-review.md +17 -0
  265. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/managed-execution.md +20 -0
  266. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/official-documentation.md +18 -0
  267. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/quota-recovery.md +21 -0
  268. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/review-routing-decision.md +16 -0
  269. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/route-work.md +18 -0
  270. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/routing-evidence.md +18 -0
  271. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/run-ledger.md +18 -0
  272. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/home.js +198 -0
  273. package/scaffold/.agent/skills/total-recall/plugins/openwiki/DESIGN.md +75 -0
  274. package/scaffold/.agent/skills/total-recall/plugins/openwiki/README.md +2 -0
  275. package/scaffold/.agent/skills/total-recall/plugins/openwiki/cli.mjs +64 -32
  276. package/scaffold/.agent/skills/total-recall/plugins/openwiki/package-lock.json +7 -7
  277. package/scaffold/.agent/skills/total-recall/plugins/openwiki/package.json +2 -1
  278. package/scaffold/.agent/skills/total-recall/plugins/openwiki/plugin.json +10 -44
  279. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/generate.mjs +5 -4
  280. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/graph.mjs +3 -4
  281. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/ingest.mjs +23 -18
  282. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/mesh-vaults.mjs +8 -3
  283. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/refresh-diagnostics.mjs +44 -0
  284. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/refresh.mjs +123 -113
  285. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/search.mjs +3 -5
  286. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/token.mjs +21 -47
  287. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/upstream-watcher.mjs +17 -6
  288. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/auto-refresh.md +18 -0
  289. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/bootstrap-pages.md +18 -0
  290. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/generate-wiki.md +21 -0
  291. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/generator-settings.md +18 -0
  292. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/host-probe.md +18 -0
  293. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/ingest-preview.md +18 -0
  294. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/link-hygiene.md +21 -0
  295. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/link-topology.md +19 -0
  296. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/passage-search.md +19 -0
  297. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/propagation-plan.md +18 -0
  298. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/provider-credentials.md +18 -0
  299. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/refresh-report.md +18 -0
  300. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/task-evidence.md +22 -0
  301. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/upstream-record.md +18 -0
  302. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/watch-upstream.md +18 -0
  303. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/wiki-atlas.md +19 -0
  304. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/panel.js +261 -513
  305. package/scaffold/.agent/skills/total-recall/plugins/security/DESIGN.md +84 -0
  306. package/scaffold/.agent/skills/total-recall/plugins/security/README.md +4 -2
  307. package/scaffold/.agent/skills/total-recall/plugins/security/cli.mjs +7 -19
  308. package/scaffold/.agent/skills/total-recall/plugins/security/package-lock.json +7 -7
  309. package/scaffold/.agent/skills/total-recall/plugins/security/package.json +2 -3
  310. package/scaffold/.agent/skills/total-recall/plugins/security/plugin.json +19 -52
  311. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/device-evidence.md +21 -0
  312. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/evidence-desk.md +18 -0
  313. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/guided-device-review.md +17 -0
  314. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/host-and-network.md +21 -0
  315. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/https-headers.md +17 -0
  316. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/mesh-coverage.md +18 -0
  317. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/private-security-tools.md +16 -0
  318. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/single-origin-header-check.md +17 -0
  319. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/source-review.md +21 -0
  320. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/ssh-permission-plan.md +17 -0
  321. package/scaffold/.agent/skills/total-recall/plugins/security/ui/home.js +283 -0
  322. package/scaffold/.agent/skills/total-recall/plugins/ssss/DESIGN.md +93 -0
  323. package/scaffold/.agent/skills/total-recall/plugins/ssss/package-lock.json +2 -2
  324. package/scaffold/.agent/skills/total-recall/plugins/ssss/package.json +2 -1
  325. package/scaffold/.agent/skills/total-recall/plugins/ssss/plugin.json +5 -3
  326. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/conformance.md +26 -0
  327. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/registry.md +37 -0
  328. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/repair.md +42 -0
  329. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/scaffold.md +33 -0
  330. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/status.md +43 -0
  331. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/validate.md +34 -0
  332. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/validation-diagnostics.md +17 -0
  333. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/workspace-registry-preflight.md +17 -0
  334. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/home.js +348 -0
  335. package/scaffold/.agent/skills/total-recall/references/operations.md +3 -1
  336. package/src/cli/agent.mjs +1 -1
  337. package/src/cli/api.mjs +3 -3
  338. package/src/cli/brief.mjs +3 -0
  339. package/src/cli/command.mjs +41 -2
  340. package/src/cli/config.mjs +16 -0
  341. package/src/cli/connect.mjs +2 -7
  342. package/src/cli/dream.mjs +93 -69
  343. package/src/cli/harness.mjs +4 -4
  344. package/src/cli/help.mjs +1 -1
  345. package/src/cli/init.mjs +0 -25
  346. package/src/cli/lessons.mjs +51 -0
  347. package/src/cli/memory-plugin.mjs +1 -1
  348. package/src/cli/plugin/chunks.mjs +145 -0
  349. package/src/cli/plugin/copies.mjs +64 -14
  350. package/src/cli/plugin/create.mjs +30 -59
  351. package/src/cli/plugin/index.mjs +31 -16
  352. package/src/cli/plugin/install.mjs +10 -15
  353. package/src/cli/plugin/remove.mjs +1 -1
  354. package/src/cli/plugin/search.mjs +2 -2
  355. package/src/cli/preflight.mjs +19 -6
  356. package/src/cli/proposals.mjs +1 -1
  357. package/src/cli/recall.mjs +66 -23
  358. package/src/cli/remember.mjs +3 -14
  359. package/src/cli/server.mjs +18 -0
  360. package/src/cli/setup.mjs +2 -9
  361. package/src/cli/start.mjs +1 -0
  362. package/src/cli/startup.mjs +19 -0
  363. package/src/cli/task.mjs +9 -2
  364. package/src/cli/update.mjs +6 -2
  365. package/src/core/access-ledger.mjs +78 -0
  366. package/src/core/agent-manager.mjs +2 -2
  367. package/src/core/app-deploy/design-tokens.mjs +14 -9
  368. package/src/core/app-deploy/ui-elements.mjs +1 -1
  369. package/src/core/brain-locate.mjs +15 -0
  370. package/src/core/brain-registry.mjs +5 -0
  371. package/src/core/brain-updates.mjs +35 -11
  372. package/src/core/claude-hooks.mjs +3 -1
  373. package/src/core/cleanup-task.mjs +15 -0
  374. package/src/core/cli-commands.mjs +2 -0
  375. package/src/core/cli-maintenance.mjs +4 -1
  376. package/src/core/cli-semantic-index.mjs +23 -3
  377. package/src/core/context-compiler.mjs +20 -0
  378. package/src/core/daemon-control.mjs +5 -1
  379. package/src/core/daemon-loop.mjs +39 -62
  380. package/src/core/dashboard-bundle.mjs +261 -0
  381. package/src/core/default-plugins.mjs +1 -1
  382. package/src/core/dream.mjs +33 -105
  383. package/src/core/ensure-dependencies.mjs +152 -0
  384. package/src/core/fast-recall.mjs +2 -2
  385. package/src/core/field-evaluation.mjs +23 -0
  386. package/src/core/gate-mode.mjs +1 -1
  387. package/src/core/harness-hooks.mjs +14 -2
  388. package/src/core/lesson-hooks.mjs +74 -0
  389. package/src/core/lesson-memory.mjs +24 -0
  390. package/src/core/lesson-sessions.mjs +52 -0
  391. package/src/core/lessons.mjs +96 -0
  392. package/src/core/memory-brain.mjs +30 -8
  393. package/src/core/meta-harness.mjs +2 -2
  394. package/src/core/optimizer.mjs +66 -165
  395. package/src/core/plugin-activation.mjs +63 -20
  396. package/src/core/plugin-contracts/{card.mjs → manifest.mjs} +26 -57
  397. package/src/core/plugin-contracts/startup-check.mjs +49 -0
  398. package/src/core/plugin-contracts/ui.mjs +9 -3
  399. package/src/core/plugin-distribution.mjs +6 -6
  400. package/src/core/plugin-lifecycle.mjs +58 -0
  401. package/src/core/plugin-loader.mjs +21 -8
  402. package/src/core/plugin-runner.mjs +21 -10
  403. package/src/core/plugin-runtime.mjs +40 -1
  404. package/src/core/plugin-startup-checks.mjs +44 -0
  405. package/src/core/plugin-state.mjs +19 -5
  406. package/src/core/plugin-store.mjs +64 -33
  407. package/src/core/post-mortem.mjs +52 -36
  408. package/src/core/preflight-gate.mjs +23 -2
  409. package/src/core/project-id.mjs +15 -5
  410. package/src/core/proposal-applier.mjs +31 -2
  411. package/src/core/repo-sync.mjs +4 -6
  412. package/src/core/required-plugins.mjs +57 -10
  413. package/src/core/rule-length.mjs +23 -0
  414. package/src/core/runtime.mjs +1 -1
  415. package/src/core/scheduler.mjs +35 -43
  416. package/src/core/schema.mjs +3 -2
  417. package/src/core/search.mjs +4 -3
  418. package/src/core/server-service.mjs +148 -0
  419. package/src/core/session-watcher.mjs +19 -1
  420. package/src/core/skill-gap.mjs +16 -0
  421. package/src/core/ssss-kernel-bridge.mjs +32 -4
  422. package/src/core/ssss-operation-service.mjs +1 -0
  423. package/src/core/startup-health.mjs +34 -4
  424. package/src/core/surface.mjs +65 -54
  425. package/src/core/task-executors.mjs +54 -106
  426. package/src/core/testing/plugin-fixture.mjs +22 -21
  427. package/src/core/throttled-fetch.mjs +25 -18
  428. package/src/core/ui-chunk-choice.mjs +77 -0
  429. package/src/core/ui-chunk.registry.json +23 -0
  430. package/src/core/ui-chunks.mjs +434 -0
  431. package/src/core/validated-write.mjs +1 -0
  432. package/src/core/vault-cache.mjs +58 -59
  433. package/src/core/vector-field.mjs +134 -192
  434. package/src/core/workspace-compositions.mjs +151 -0
  435. package/src/core/workspace-drawers.mjs +79 -0
  436. package/src/server/api.mjs +4 -27
  437. package/src/server/index.mjs +28 -21
  438. package/src/server/invoke-core-child.mjs +24 -0
  439. package/src/server/invoke-core-operations.mjs +102 -0
  440. package/src/server/memory-events.mjs +31 -0
  441. package/src/server/plugin-brain-targets.mjs +89 -0
  442. package/src/server/rest.mjs +2 -0
  443. package/src/server/route-inventory.mjs +3 -2
  444. package/src/server/route-manifest.json +47 -55
  445. package/src/server/routes/_shared.mjs +7 -14
  446. package/src/server/routes/brains.mjs +29 -62
  447. package/src/server/routes/context.mjs +0 -41
  448. package/src/server/routes/dashboard.mjs +26 -0
  449. package/src/server/routes/invoke.mjs +26 -1
  450. package/src/server/routes/plugins.mjs +154 -45
  451. package/src/server/routes/ssss.mjs +0 -169
  452. package/src/server/routes/system.mjs +0 -15
  453. package/src/server/routes/tasks.mjs +0 -26
  454. package/src/server/routes/ui-chunks.mjs +192 -0
  455. package/src/server/routes/vault.mjs +2 -23
  456. package/frontend/dist/assets/index-DD4qONvH.js +0 -5607
  457. package/frontend/dist/assets/index-DtwsDyFM.css +0 -1
  458. package/frontend/src/components/plugins/card/CardEngine.tsx +0 -108
  459. package/frontend/src/components/plugins/card/CardScenes.tsx +0 -103
  460. package/frontend/src/components/plugins/card/ExecutionPicker.tsx +0 -64
  461. package/frontend/src/components/plugins/card/args.ts +0 -28
  462. package/frontend/src/components/plugins/card/card.css +0 -32
  463. package/frontend/src/components/plugins/card/cli-line.ts +0 -13
  464. package/frontend/src/components/plugins/card/contract.ts +0 -91
  465. package/frontend/src/components/plugins/card/format.ts +0 -49
  466. package/frontend/src/components/plugins/card/runner-context.ts +0 -11
  467. package/frontend/src/components/plugins/card/runner.tsx +0 -43
  468. package/frontend/src/components/plugins/card/theme.ts +0 -35
  469. package/frontend/src/components/plugins/card/use-source.ts +0 -22
  470. package/frontend/src/components/plugins/card/widgets.tsx +0 -94
  471. package/frontend/src/components/plugins/workspace/WorkspaceHost.tsx +0 -23
  472. package/frontend/src/pages/PluginsPage.tsx +0 -1719
  473. package/scaffold/.agent/skills/plugin/evals/cases/04-card-collects-credential.mjs +0 -47
  474. package/scaffold/.agent/skills/plugin/prompts/06-card.md +0 -46
  475. package/scaffold/.agent/skills/plugin/references/card.md +0 -90
  476. package/scaffold/.agent/skills/plugin/subagents/card-designer.md +0 -60
  477. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/DESIGN.md +0 -67
  478. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/card.js +0 -1179
  479. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/DESIGN.md +0 -32
  480. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/card.js +0 -588
  481. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/card.js +0 -575
  482. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/DESIGN.md +0 -32
  483. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/card.js +0 -482
  484. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/README.md +0 -53
  485. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/plugin.json +0 -129
  486. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/ui/DESIGN.md +0 -100
  487. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/ui/card.js +0 -637
  488. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/DESIGN.md +0 -217
  489. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/DESIGN.md +0 -32
  490. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/card.js +0 -1276
  491. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/DESIGN.md +0 -45
  492. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/card.js +0 -1401
  493. package/scaffold/.agent/skills/total-recall/plugins/security/scripts/build-ui.mjs +0 -4
  494. package/scaffold/.agent/skills/total-recall/plugins/security/ui/DESIGN.md +0 -41
  495. package/scaffold/.agent/skills/total-recall/plugins/security/ui/card.js +0 -396
  496. package/scaffold/.agent/skills/total-recall/plugins/security/ui/panel.js +0 -98
  497. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/DESIGN.md +0 -15
  498. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/card.js +0 -182
  499. package/src/core/append-log.mjs +0 -131
  500. package/src/core/plugin-tasks.mjs +0 -173
  501. package/templates/onboarding-interview.md +0 -82
  502. /package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/LICENSE +0 -0
@@ -19,10 +19,6 @@
19
19
  "method": "GET",
20
20
  "path": "/api/brains/:id/nodes"
21
21
  },
22
- {
23
- "method": "POST",
24
- "path": "/api/brains/sync"
25
- },
26
22
  {
27
23
  "method": "POST",
28
24
  "path": "/api/capture/:source"
@@ -92,20 +88,16 @@
92
88
  "path": "/api/context"
93
89
  },
94
90
  {
95
- "method": "GET",
96
- "path": "/api/context/flash/health"
91
+ "method": "POST",
92
+ "path": "/api/daemon/restart"
97
93
  },
98
94
  {
99
95
  "method": "GET",
100
- "path": "/api/context/preview"
96
+ "path": "/api/dashboard/drawers/:edge"
101
97
  },
102
98
  {
103
- "method": "POST",
104
- "path": "/api/context/stream"
105
- },
106
- {
107
- "method": "POST",
108
- "path": "/api/daemon/restart"
99
+ "method": "PUT",
100
+ "path": "/api/dashboard/drawers/:edge"
109
101
  },
110
102
  {
111
103
  "method": "GET",
@@ -483,10 +475,6 @@
483
475
  "method": "POST",
484
476
  "path": "/api/plugins/:id/branding"
485
477
  },
486
- {
487
- "method": "PATCH",
488
- "path": "/api/plugins/:id/card-face"
489
- },
490
478
  {
491
479
  "method": "GET",
492
480
  "path": "/api/plugins/:id/configuration"
@@ -807,14 +795,6 @@
807
795
  "method": "GET",
808
796
  "path": "/api/ssss"
809
797
  },
810
- {
811
- "method": "GET",
812
- "path": "/api/ssss"
813
- },
814
- {
815
- "method": "GET",
816
- "path": "/api/ssss/instructions"
817
- },
818
798
  {
819
799
  "method": "GET",
820
800
  "path": "/api/ssss/instructions"
@@ -823,14 +803,6 @@
823
803
  "method": "GET",
824
804
  "path": "/api/ssss/references"
825
805
  },
826
- {
827
- "method": "GET",
828
- "path": "/api/ssss/references"
829
- },
830
- {
831
- "method": "GET",
832
- "path": "/api/ssss/references/:name"
833
- },
834
806
  {
835
807
  "method": "GET",
836
808
  "path": "/api/ssss/references/:name"
@@ -839,14 +811,6 @@
839
811
  "method": "GET",
840
812
  "path": "/api/ssss/skill/ssss"
841
813
  },
842
- {
843
- "method": "GET",
844
- "path": "/api/ssss/skill/ssss"
845
- },
846
- {
847
- "method": "GET",
848
- "path": "/api/ssss/spec"
849
- },
850
814
  {
851
815
  "method": "GET",
852
816
  "path": "/api/ssss/spec"
@@ -876,20 +840,40 @@
876
840
  "path": "/api/tasks/:id/retry"
877
841
  },
878
842
  {
879
- "method": "DELETE",
880
- "path": "/api/tasks/cleanup"
843
+ "method": "POST",
844
+ "path": "/api/tts"
881
845
  },
882
846
  {
883
847
  "method": "GET",
884
- "path": "/api/tasks/failed"
848
+ "path": "/api/tts/status"
885
849
  },
886
850
  {
887
- "method": "POST",
888
- "path": "/api/tts"
851
+ "method": "GET",
852
+ "path": "/api/ui-chunks"
889
853
  },
890
854
  {
891
855
  "method": "GET",
892
- "path": "/api/tts/status"
856
+ "path": "/api/ui-chunks/:plugin/:id"
857
+ },
858
+ {
859
+ "method": "GET",
860
+ "path": "/api/ui-chunks/:plugin/composition/current"
861
+ },
862
+ {
863
+ "method": "GET",
864
+ "path": "/api/ui-chunks/:plugin/design/revision"
865
+ },
866
+ {
867
+ "method": "POST",
868
+ "path": "/api/ui-chunks/compose"
869
+ },
870
+ {
871
+ "method": "POST",
872
+ "path": "/api/ui-chunks/pool"
873
+ },
874
+ {
875
+ "method": "POST",
876
+ "path": "/api/ui-chunks/suggest"
893
877
  },
894
878
  {
895
879
  "method": "GET",
@@ -911,18 +895,10 @@
911
895
  "method": "POST",
912
896
  "path": "/api/v1/ssss"
913
897
  },
914
- {
915
- "method": "POST",
916
- "path": "/api/vault/compact"
917
- },
918
898
  {
919
899
  "method": "POST",
920
900
  "path": "/api/vault/compile"
921
901
  },
922
- {
923
- "method": "GET",
924
- "path": "/api/vault/hash"
925
- },
926
902
  {
927
903
  "method": "GET",
928
904
  "path": "/api/vault/status"
@@ -995,6 +971,22 @@
995
971
  "method": "POST",
996
972
  "path": "/api/webhooks/test/:provider"
997
973
  },
974
+ {
975
+ "method": "GET",
976
+ "path": "/api/workspace/pages"
977
+ },
978
+ {
979
+ "method": "POST",
980
+ "path": "/api/workspace/pages"
981
+ },
982
+ {
983
+ "method": "GET",
984
+ "path": "/api/workspace/pages/:id"
985
+ },
986
+ {
987
+ "method": "PUT",
988
+ "path": "/api/workspace/pages/:id"
989
+ },
998
990
  {
999
991
  "method": "POST",
1000
992
  "path": "/auth/change-password"
@@ -13,6 +13,7 @@ import { fileURLToPath } from 'node:url';
13
13
  import { agentDir, brainDir, globalBrainDir } from '../../core/config.mjs';
14
14
  import { resolveSurfaceDir } from '../../cli/agent-dir.mjs';
15
15
  import { logger } from '../../core/logger.mjs';
16
+ import { dashboardBrainDir, readRegisteredProjects } from '../../core/brain-registry.mjs';
16
17
 
17
18
  export { globalBrainDir };
18
19
  export const AGENT_DIR = process.env.AGENT_DIR || agentDir;
@@ -33,7 +34,7 @@ export const MODEL_CATALOG_DIR = path.join(ROOT, 'models', 'catalog', 'total-rec
33
34
  * Resolve a brain-specific vault directory from the request.
34
35
  *
35
36
  * Reads `req.query.brain` (query param) or `req.body?.brainId` (body field).
36
- * - If the value is `'global'` or missing, returns the default VAULT_DIR.
37
+ * - Missing selection uses the default server vault. Explicit global selection follows the dashboard.
37
38
  * - If it starts with `'project:'`, looks up the project brain in the
38
39
  * project-registry.json (same resolution logic as GET /api/brains/:id/nodes).
39
40
  * - Falls back to VAULT_DIR if the resolved path doesn't exist.
@@ -52,23 +53,15 @@ export function resolveVaultFromQuery(req, { strict = false } = {}) {
52
53
  }
53
54
  }
54
55
 
55
- // No brain specified or explicitly global → default vault
56
- if (!brainId || brainId === 'global') {
57
- return VAULT_DIR;
58
- }
56
+ if (!brainId) return VAULT_DIR;
57
+ if (brainId === 'global') return path.join(dashboardBrainDir(process.env, BRAIN_DIR), 'memory-vault');
59
58
 
60
59
  if (brainId.startsWith('project:')) {
61
60
  const projectName = brainId.slice('project:'.length);
62
- const registryPath = path.join(globalBrainDir, 'config', 'project-registry.json');
63
-
64
- if (!fs.existsSync(registryPath)) {
65
- if (strict) throw Object.assign(new Error('Selected brain is unavailable'), { status: 404 });
66
- return VAULT_DIR;
67
- }
68
-
69
61
  try {
70
- const registry = JSON.parse(fs.readFileSync(registryPath, 'utf8'));
71
- const project = registry.find(p => p.name === projectName);
62
+ const registry = readRegisteredProjects(dashboardBrainDir(process.env, globalBrainDir));
63
+ const matching = registry.filter(p => p.name === projectName || p.project_id === projectName);
64
+ const project = matching.length === 1 ? matching[0] : null;
72
65
  if (project) {
73
66
  const projectVaultDir = path.join(project.brainDir, 'memory-vault');
74
67
  if (fs.existsSync(projectVaultDir)) {
@@ -12,14 +12,10 @@ import fs from 'node:fs';
12
12
  import path from 'node:path';
13
13
  import os from 'node:os';
14
14
  import { requireAuth, requireScope } from '../auth.mjs';
15
+ import { dashboardBrainDir, readRegisteredProjects } from '../../core/brain-registry.mjs';
15
16
  import { getNodes } from '../../core/vault-cache.mjs';
16
17
  import { logger } from '../../core/logger.mjs';
17
- import {
18
- BRAIN_DIR,
19
- VAULT_DIR,
20
- DERIVED_DIR,
21
- serverError,
22
- } from './_shared.mjs';
18
+ import { serverError } from './_shared.mjs';
23
19
 
24
20
  const router = Router();
25
21
 
@@ -49,8 +45,9 @@ function countMd(dir) {
49
45
  * List all known brains (global + registered projects + optional tenant) with state metadata.
50
46
  */
51
47
  router.get('/api/brains', requireAuth, requireScope('ssss:read'), async (req, res) => {
48
+ res.set('Cache-Control', 'private, no-store');
52
49
  try {
53
- const globalBrainDir = path.join(os.homedir(), '.agent', 'skills', 'total-recall');
50
+ const globalBrainDir = dashboardBrainDir();
54
51
  const brains = [];
55
52
 
56
53
  // Global brain
@@ -75,35 +72,27 @@ router.get('/api/brains', requireAuth, requireScope('ssss:read'), async (req, re
75
72
  });
76
73
 
77
74
  // Project brains from registry
78
- const registryPath = path.join(globalBrainDir, 'config', 'project-registry.json');
79
- if (fs.existsSync(registryPath)) {
80
- try {
81
- const registry = JSON.parse(fs.readFileSync(registryPath, 'utf8'));
82
- for (const project of registry) {
83
- const projectVaultDir = path.join(project.brainDir, 'memory-vault');
84
- let nodeCount = 0;
85
- const exists = fs.existsSync(project.path);
86
- if (!exists) continue; // Hide non-existent projects automatically
87
-
88
- if (fs.existsSync(projectVaultDir)) {
89
- nodeCount = countMd(projectVaultDir);
90
- }
91
-
92
- brains.push({
93
- id: `project:${project.name}`,
94
- name: project.name,
95
- layer: 'project',
96
- path: project.brainDir,
97
- project_root: project.path,
98
- exists: true,
99
- node_count: nodeCount,
100
- registered_at: project.registered_at,
101
- last_compiled: project.last_compiled || getLastModified(path.join(project.brainDir, 'memory-derived', 'graph-index.jsonl')),
102
- });
103
- }
104
- } catch (err) {
105
- logger.error('server', 'Failed to read project registry', { error: err.message });
75
+ try {
76
+ const registry = readRegisteredProjects(globalBrainDir);
77
+ for (const project of registry) {
78
+ if (!project.name || !project.path || !project.brainDir || !fs.existsSync(project.path)) continue;
79
+ const duplicateName = registry.some(other => other !== project && other.name === project.name);
80
+ if (duplicateName && !project.project_id) continue;
81
+ brains.push({
82
+ id: `project:${duplicateName ? project.project_id : project.name}`,
83
+ name: project.name,
84
+ layer: 'project',
85
+ path: project.brainDir,
86
+ project_root: project.path,
87
+ exists: true,
88
+ node_count: countMd(path.join(project.brainDir, 'memory-vault')),
89
+ registered_at: project.registered_at,
90
+ last_compiled: project.last_compiled || getLastModified(path.join(project.brainDir, 'memory-derived', 'graph-index.jsonl')),
91
+ });
106
92
  }
93
+ } catch (err) {
94
+ logger.error('server', 'Failed to read project registry', { error: err.message });
95
+ return res.status(503).json({ error: 'Brain registry metadata is unavailable' });
107
96
  }
108
97
 
109
98
  // Optional remote/tenant vault from config
@@ -145,22 +134,18 @@ router.get('/api/brains', requireAuth, requireScope('ssss:read'), async (req, re
145
134
  * List all memory nodes for a specific brain.
146
135
  */
147
136
  router.get('/api/brains/:id/nodes', requireAuth, requireScope('ssss:read', 'memory:read'), async (req, res) => {
137
+ res.set('Cache-Control', 'private, no-store');
148
138
  try {
149
139
  const brainId = req.params.id;
150
140
  let vaultDir;
151
141
 
152
142
  if (brainId === 'global') {
153
- const brainDir = path.join(os.homedir(), '.agent', 'skills', 'total-recall');
154
- vaultDir = path.join(brainDir, 'memory-vault');
143
+ vaultDir = path.join(dashboardBrainDir(), 'memory-vault');
155
144
  } else if (brainId.startsWith('project:')) {
156
145
  const projectName = brainId.slice('project:'.length);
157
- const globalBrainDir = path.join(os.homedir(), '.agent', 'skills', 'total-recall');
158
- const registryPath = path.join(globalBrainDir, 'config', 'project-registry.json');
159
- if (!fs.existsSync(registryPath)) {
160
- return res.status(404).json({ error: 'Project registry not found' });
161
- }
162
- const registry = JSON.parse(fs.readFileSync(registryPath, 'utf8'));
163
- const project = registry.find(p => p.name === projectName);
146
+ const registry = readRegisteredProjects(dashboardBrainDir());
147
+ const matching = registry.filter(p => p.name === projectName || p.project_id === projectName);
148
+ const project = matching.length === 1 ? matching[0] : null;
164
149
  if (!project) {
165
150
  return res.status(404).json({ error: `Project "${projectName}" not found in registry` });
166
151
  }
@@ -210,22 +195,4 @@ router.get('/api/brains/:id/nodes', requireAuth, requireScope('ssss:read', 'memo
210
195
  } catch (err) { serverError(res, err); }
211
196
  });
212
197
 
213
- /**
214
- * POST /api/brains/sync
215
- * Trigger a repo-sync across all registered repos.
216
- * Returns sync results per repo.
217
- */
218
- router.post('/api/brains/sync', requireAuth, requireScope('memory:write'), async (req, res) => {
219
- try {
220
- const { syncAllRepos } = await import('../../core/repo-sync.mjs');
221
- const result = await syncAllRepos();
222
- res.json({
223
- ok: true,
224
- totalIngested: result.totalIngested,
225
- totalSkipped: result.totalSkipped,
226
- repos: result.repos,
227
- });
228
- } catch (err) { serverError(res, err); }
229
- });
230
-
231
198
  export default router;
@@ -49,45 +49,4 @@ router.post('/api/context', requireAuth, requireScope('memory:read'), async (req
49
49
  }
50
50
  });
51
51
 
52
- router.get('/api/context/preview', requireAuth, requireScope('memory:read'), async (req, res) => {
53
- try {
54
- const { previewContext } = await import('../../core/context-compiler.mjs');
55
- const vaultDir = resolveVaultFromQuery(req, { strict: true });
56
- const result = previewContext({ vaultDir });
57
- res.json(result);
58
- } catch (err) {
59
- serverError(res, err);
60
- }
61
- });
62
-
63
- router.post('/api/context/stream', requireAuth, requireScope('memory:read'), async (req, res) => {
64
- try {
65
- const { streamParallelContext } = await import('../../core/parallel-context.mjs');
66
- const { query, budget_tokens, batch_size, concurrency, min_score } = req.body || {};
67
- if (!query) return badRequest(res, 'query is required');
68
- const vaultDir = resolveVaultFromQuery(req, { strict: true });
69
- const result = await streamParallelContext({
70
- query,
71
- vaultDir,
72
- budgetTokens: budget_tokens,
73
- batchSize: batch_size,
74
- concurrency,
75
- minScore: min_score,
76
- });
77
- res.json(result);
78
- } catch (err) {
79
- serverError(res, err);
80
- }
81
- });
82
-
83
- router.get('/api/context/flash/health', requireAuth, requireScope('memory:read'), async (req, res) => {
84
- try {
85
- const { checkFlashHealth } = await import('../../core/parallel-context.mjs');
86
- const result = await checkFlashHealth();
87
- res.json(result);
88
- } catch (err) {
89
- serverError(res, err);
90
- }
91
- });
92
-
93
52
  export default router;
@@ -4,8 +4,10 @@ import path from 'node:path';
4
4
  import { fileURLToPath } from 'node:url';
5
5
  import { requireAuth, requireScope } from '../auth.mjs';
6
6
  import { getNodes } from '../../core/vault-cache.mjs';
7
+ import { DrawerInputError, readDrawerConfig, writeDrawerConfig } from '../../core/workspace-drawers.mjs';
7
8
  import {
8
9
  VAULT_DIR,
10
+ BRAIN_DIR,
9
11
  INSTRUCTIONS,
10
12
  ROOT as SHARED_ROOT,
11
13
  resolveVaultFromQuery,
@@ -17,6 +19,30 @@ const router = Router();
17
19
  // (breaks on Windows and on paths with encoded characters).
18
20
  const ROOT = process.env.TR_ROOT || SHARED_ROOT || path.join(path.dirname(fileURLToPath(import.meta.url)), '..', '..', '..');
19
21
 
22
+ router.get('/api/dashboard/drawers/:edge', requireAuth, requireScope('config:read'), (req, res) => {
23
+ res.set('Cache-Control', 'no-store');
24
+ try {
25
+ return res.json(readDrawerConfig(BRAIN_DIR, req.params.edge));
26
+ } catch (error) {
27
+ if (error instanceof DrawerInputError) return res.status(400).json({ error: error.message });
28
+ return res.status(500).json({ error: 'Could not read the saved drawer.' });
29
+ }
30
+ });
31
+
32
+ router.put('/api/dashboard/drawers/:edge', requireAuth, requireScope('config:write'), async (req, res) => {
33
+ res.set('Cache-Control', 'no-store');
34
+ if (!req.is('application/json')) return res.status(415).json({ error: 'Use JSON to save the drawer.' });
35
+ try {
36
+ return res.json(await writeDrawerConfig(BRAIN_DIR, req.params.edge, req.body?.config, req.body?.version));
37
+ } catch (error) {
38
+ if (error instanceof DrawerInputError) return res.status(400).json({ error: error.message });
39
+ if (error.message.startsWith('Plugin state version conflict')) {
40
+ return res.status(409).json({ error: 'The drawer changed elsewhere. Reload it before saving.' });
41
+ }
42
+ return res.status(500).json({ error: 'Could not save the drawer.' });
43
+ }
44
+ });
45
+
20
46
  router.get('/api/dashboard/instructions', requireAuth, requireScope('instructions:read'), (req, res) => {
21
47
  const vaultDir = resolveVaultFromQuery(req);
22
48
  const paths = pathsForVault(vaultDir);
@@ -16,6 +16,7 @@ import { invokeAuthority, authorizeInvoke, operationAllowed } from '../invoke-po
16
16
  import { restrictedBrainTargets } from '../invoke-targets.mjs';
17
17
  import { INVOKE_LIMITS, InvokeError, executeInvokeChild, requireSuccessfulRun, invokeEnvironment, absoluteTarget } from '../invoke-execution.mjs';
18
18
  import { syncChangedFiles } from '../invoke-durability.mjs';
19
+ import { CORE_OPERATIONS, validateCoreParams } from '../invoke-core-operations.mjs';
19
20
 
20
21
  const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../..');
21
22
  // Share across router instances in this server; do not race projection refreshes.
@@ -29,6 +30,7 @@ export const OPERATIONS = Object.freeze(Object.fromEntries(Object.entries({
29
30
  'composable.run': { scope: 'sandbox:run', family: 'composable' },
30
31
  'decision.run': { scope: 'memory:read', family: 'decision' },
31
32
  'decision.predict': { scope: 'memory:read', family: 'decision' },
33
+ ...CORE_OPERATIONS,
32
34
  }).map(([name, def]) => [name, Object.freeze(def)])));
33
35
 
34
36
  const fail = (res, status, operation, code, message, extra = {}) => res.status(status).json({
@@ -106,13 +108,14 @@ export function createInvokeRouter({ auth = requireAuth, store = { loadKeys, key
106
108
  };
107
109
  revalidate();
108
110
  timer = setInterval(revalidate, 250); timer.unref?.();
109
- const context = { authority, target, serverBrain, selectedBrain, signal: controller.signal, limits, commandScopes,
111
+ const context = { authority, target, serverBrain, registryBrain, selectedBrain, signal: controller.signal, limits, commandScopes,
110
112
  run: options => {
111
113
  revalidate();
112
114
  return execute({ ...options, signal: controller.signal, limits });
113
115
  } };
114
116
  let result;
115
117
  if (operation === 'capabilities') result = capabilitiesFor(authority, limits, targetNames);
118
+ else if (Object.hasOwn(CORE_OPERATIONS, operation)) result = await runCoreOperation(operation, params, context);
116
119
  else result = await HANDLERS[operation](params, context);
117
120
  if (operation === 'ssss.write' && authority.mode === 'restricted') mutationResult = result;
118
121
  revalidate();
@@ -143,6 +146,28 @@ export function createInvokeRouter({ auth = requireAuth, store = { loadKeys, key
143
146
 
144
147
  export const invokeRouter = createInvokeRouter();
145
148
 
149
+ async function runCoreOperation(operation, params, context) {
150
+ validateCoreParams(operation, params);
151
+ const run = await context.run({ entry: path.join(root, 'src/server/invoke-core-child.mjs'),
152
+ cwd: context.target, env: invokeEnvironment(true), timeoutMs: params.timeoutMs,
153
+ input: JSON.stringify({ operation, params, brain: context.serverBrain, registryBrain: context.registryBrain }) });
154
+ if (run.termination_reason || run.truncated) {
155
+ const code = run.termination_reason || 'output-limit';
156
+ throw new InvokeError(code === 'timeout' ? 504 : code === 'authority-ended' ? 403 : 422,
157
+ code, 'Owner execution did not complete; a mutation may already have committed.');
158
+ }
159
+ let response;
160
+ try { response = JSON.parse(run.stdout); } catch { /* reject below */ }
161
+ if (response?.ok === false) {
162
+ const code = ['brain-unavailable', 'sync-failed'].includes(response.error) ? response.error : 'operation-failed';
163
+ throw new InvokeError(code === 'brain-unavailable' ? 404 : 502, code, 'Owner operation failed.');
164
+ }
165
+ if (run.exit_code !== 0 || response?.ok !== true || !response.result || typeof response.result !== 'object' || Array.isArray(response.result)) {
166
+ throw new InvokeError(502, 'invalid-owner-output', 'Owner returned invalid output.');
167
+ }
168
+ return response.result;
169
+ }
170
+
146
171
  /** The categories `total-recall remember` documents. Singular, and closed. */
147
172
  const MEMORY_CATEGORIES = new Set(['invariant', 'preference', 'correction', 'fact', 'concept', 'pattern', 'anti-pattern', 'decision', 'lore']);
148
173