total-recall-brain 3.45.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 (362) hide show
  1. package/bin/total-recall.mjs +4 -2
  2. package/frontend/dist/assets/index-BRYE1jmv.css +1 -0
  3. package/frontend/dist/assets/index-D1goIPjC.js +5598 -0
  4. package/frontend/dist/index.html +2 -2
  5. package/frontend/dist/sw.js +5 -4
  6. package/frontend/src/App.tsx +183 -236
  7. package/frontend/src/api/auth-inventory.ts +62 -0
  8. package/frontend/src/api/memory.ts +13 -8
  9. package/frontend/src/api/plugin-credentials.ts +23 -0
  10. package/frontend/src/api/plugins.ts +37 -53
  11. package/frontend/src/api/workspace-drawers.ts +97 -0
  12. package/frontend/src/components/BrainSelector.tsx +9 -3
  13. package/frontend/src/components/plugins/PluginPanel.tsx +83 -42
  14. package/frontend/src/components/plugins/PluginSettings.tsx +10 -20
  15. package/frontend/src/components/plugins/PluginWorkspace.tsx +367 -0
  16. package/frontend/src/components/plugins/ScopedPluginCommands.tsx +142 -0
  17. package/frontend/src/components/plugins/plugin-frame.ts +44 -33
  18. package/frontend/src/components/plugins/scoped-plugin-operations.ts +28 -0
  19. package/frontend/src/components/workspace/DrawerChat.tsx +110 -0
  20. package/frontend/src/components/workspace/DrawerLayout.tsx +196 -0
  21. package/frontend/src/components/workspace/DrawerMarkup.tsx +49 -0
  22. package/frontend/src/components/workspace/PluginChunkLibrary.tsx +92 -0
  23. package/frontend/src/components/workspace/PluginHome.tsx +76 -0
  24. package/frontend/src/components/workspace/WorkspaceDrawers.tsx +96 -0
  25. package/frontend/src/components/workspace/WorkspacePage.tsx +95 -0
  26. package/frontend/src/components/workspace/usePluginDesign.ts +38 -0
  27. package/frontend/src/index.css +409 -136
  28. package/frontend/src/pages/HelpPage.tsx +15 -46
  29. package/frontend/src/pages/MemoryPage.tsx +19 -36
  30. package/frontend/src/pages/SettingsPage.tsx +1 -1
  31. package/metadata.plugin.schema.json +53 -227
  32. package/package.json +1 -1
  33. package/scaffold/.agent/skills/plugin/SKILL.md +13 -11
  34. package/scaffold/.agent/skills/plugin/evals/README.md +14 -21
  35. package/scaffold/.agent/skills/plugin/evals/cases/01-fabricated-seed.mjs +15 -18
  36. package/scaffold/.agent/skills/plugin/evals/cases/02-reassuring-default.mjs +19 -24
  37. package/scaffold/.agent/skills/plugin/evals/cases/03-declared-template.mjs +12 -20
  38. package/scaffold/.agent/skills/plugin/evals/cases/04-home-collects-credential.mjs +35 -0
  39. package/scaffold/.agent/skills/plugin/evals/cases/05-host-leak-in-scaffold.mjs +8 -28
  40. package/scaffold/.agent/skills/plugin/evals/cases/06-correct-plugin.mjs +85 -47
  41. package/scaffold/.agent/skills/plugin/evals/run.mjs +17 -18
  42. package/scaffold/.agent/skills/plugin/prompts/05-credentials.md +4 -4
  43. package/scaffold/.agent/skills/plugin/prompts/07-scaffold.md +2 -2
  44. package/scaffold/.agent/skills/plugin/prompts/08-verify.md +4 -4
  45. package/scaffold/.agent/skills/plugin/references/anti-patterns.md +2 -2
  46. package/scaffold/.agent/skills/plugin/references/generative-home.md +38 -0
  47. package/scaffold/.agent/skills/plugin/references/scaffold.md +5 -5
  48. package/scaffold/.agent/skills/plugin/references/surfaces.md +13 -4
  49. package/scaffold/.agent/skills/plugin/scripts/record.mjs +75 -153
  50. package/scaffold/.agent/skills/plugin/subagents/plugin-reviewer.md +4 -4
  51. package/scaffold/.agent/skills/total-recall/plugins/auth/DESIGN.md +76 -0
  52. package/scaffold/.agent/skills/total-recall/plugins/auth/README.md +3 -1
  53. package/scaffold/.agent/skills/total-recall/plugins/auth/cli.mjs +20 -15
  54. package/scaffold/.agent/skills/total-recall/plugins/auth/package-lock.json +6 -6
  55. package/scaffold/.agent/skills/total-recall/plugins/auth/package.json +2 -1
  56. package/scaffold/.agent/skills/total-recall/plugins/auth/plugin.json +13 -51
  57. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/access-overview.md +17 -0
  58. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/agent-login.md +20 -0
  59. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/baseline-audit.md +22 -0
  60. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/credential-repository-binding.md +17 -0
  61. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/credential-store-maintenance.md +17 -0
  62. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/dashboard-password.md +18 -0
  63. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/dashboard-sessions.md +18 -0
  64. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/endpoint-probe.md +23 -0
  65. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/google-sign-in.md +21 -0
  66. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/mesh-machines.md +16 -0
  67. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/passkey-enrollment.md +21 -0
  68. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/registered-brains.md +16 -0
  69. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/scoped-access-keys.md +17 -0
  70. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/secret-inventory.md +25 -0
  71. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/signing-key-rotation.md +22 -0
  72. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/home.js +375 -0
  73. package/scaffold/.agent/skills/total-recall/plugins/automations/{ui/DESIGN.md → DESIGN.md} +32 -21
  74. package/scaffold/.agent/skills/total-recall/plugins/automations/adapters.mjs +17 -1
  75. package/scaffold/.agent/skills/total-recall/plugins/automations/cli.mjs +10 -1
  76. package/scaffold/.agent/skills/total-recall/plugins/automations/package-lock.json +6 -6
  77. package/scaffold/.agent/skills/total-recall/plugins/automations/package.json +4 -3
  78. package/scaffold/.agent/skills/total-recall/plugins/automations/plugin.json +11 -27
  79. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/automations.js +2 -2
  80. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/control-ledger.md +42 -0
  81. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/local-inventory-triage.md +17 -0
  82. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/pending-control.md +39 -0
  83. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/run-evidence.md +41 -0
  84. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/schedule-vs-run-evidence.md +17 -0
  85. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/source-coverage.md +41 -0
  86. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/{card.js → home.js} +32 -27
  87. package/scaffold/.agent/skills/total-recall/plugins/code-quality/DESIGN.md +53 -0
  88. package/scaffold/.agent/skills/total-recall/plugins/code-quality/cli.mjs +23 -0
  89. package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/run-core.mjs +4 -2
  90. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/check.mjs +4 -2
  91. package/scaffold/.agent/skills/total-recall/plugins/code-quality/package-lock.json +6 -6
  92. package/scaffold/.agent/skills/total-recall/plugins/code-quality/package.json +2 -1
  93. package/scaffold/.agent/skills/total-recall/plugins/code-quality/plugin.json +40 -40
  94. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/config.md +15 -0
  95. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/detect.md +15 -0
  96. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/gate.md +15 -0
  97. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/init.md +15 -0
  98. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/report.md +17 -0
  99. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/run.md +17 -0
  100. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/snapshot.md +15 -0
  101. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/code-quality-report.mjs +55 -23
  102. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/home.mjs +214 -0
  103. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/DESIGN.md +146 -0
  104. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package-lock.json +6 -6
  105. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package.json +2 -1
  106. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/plugin.json +51 -34
  107. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/command.mjs +1 -1
  108. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/create.md +35 -0
  109. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/history.md +35 -0
  110. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/library.md +49 -0
  111. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/list.md +42 -0
  112. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/promote.md +40 -0
  113. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/read.md +25 -0
  114. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/remove.md +26 -0
  115. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/rollback.md +26 -0
  116. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/show.md +53 -0
  117. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/status.md +40 -0
  118. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/test-path.md +38 -0
  119. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/test.md +46 -0
  120. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/update.md +32 -0
  121. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/home.js +533 -0
  122. package/scaffold/.agent/skills/total-recall/plugins/embeddings/DESIGN.md +110 -0
  123. package/scaffold/.agent/skills/total-recall/plugins/embeddings/package-lock.json +6 -6
  124. package/scaffold/.agent/skills/total-recall/plugins/embeddings/package.json +2 -1
  125. package/scaffold/.agent/skills/total-recall/plugins/embeddings/plugin.json +13 -10
  126. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/benchmark.md +49 -0
  127. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/coverage.md +53 -0
  128. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/models.md +43 -0
  129. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/pull.md +41 -0
  130. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/status.md +59 -0
  131. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/home.js +353 -0
  132. package/scaffold/.agent/skills/total-recall/plugins/git/DESIGN.md +31 -0
  133. package/scaffold/.agent/skills/total-recall/plugins/git/README.md +25 -1
  134. package/scaffold/.agent/skills/total-recall/plugins/git/cli.mjs +5 -1
  135. package/scaffold/.agent/skills/total-recall/plugins/git/package-lock.json +6 -6
  136. package/scaffold/.agent/skills/total-recall/plugins/git/package.json +2 -1
  137. package/scaffold/.agent/skills/total-recall/plugins/git/plugin.json +17 -27
  138. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/commit-memory.mjs +30 -6
  139. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/fleet.mjs +24 -6
  140. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/secret-firewall.mjs +33 -7
  141. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/undo.mjs +29 -5
  142. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/unmerged.mjs +182 -0
  143. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/change-comparison.md +27 -0
  144. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/commit-identity.md +22 -0
  145. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/create-worktree.md +25 -0
  146. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/registered-worktrees.md +22 -0
  147. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/remove-worktree.md +23 -0
  148. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/repository-ledger.md +25 -0
  149. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/unmerged-work.md +22 -0
  150. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/upstream-divergence.md +17 -0
  151. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/worktree-conflict-triage.md +17 -0
  152. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/worktree-terminal.md +22 -0
  153. package/scaffold/.agent/skills/total-recall/plugins/git/ui/home.js +273 -0
  154. package/scaffold/.agent/skills/total-recall/plugins/mesh/DESIGN.md +35 -0
  155. package/scaffold/.agent/skills/total-recall/plugins/mesh/README.md +4 -5
  156. package/scaffold/.agent/skills/total-recall/plugins/mesh/cli.mjs +9 -3
  157. package/scaffold/.agent/skills/total-recall/plugins/mesh/package-lock.json +6 -6
  158. package/scaffold/.agent/skills/total-recall/plugins/mesh/package.json +2 -1
  159. package/scaffold/.agent/skills/total-recall/plugins/mesh/plugin.json +37 -39
  160. package/scaffold/.agent/skills/total-recall/plugins/mesh/src/cli/mesh.mjs +5 -3
  161. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/active-device-dispatch.md +22 -0
  162. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/control-probe.md +25 -0
  163. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/control-server.md +22 -0
  164. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/credential-readiness.md +23 -0
  165. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/elected-leader.md +22 -0
  166. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/enrollment-key.md +22 -0
  167. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/file-receipt.md +25 -0
  168. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/fleet-execution.md +23 -0
  169. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/fleet-presence.md +23 -0
  170. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/interactive-ssh.md +22 -0
  171. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/local-enrollment.md +23 -0
  172. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/mesh-policy.md +23 -0
  173. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/network-atlas.md +25 -0
  174. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/node-roster.md +26 -0
  175. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/node-selection-proof.md +17 -0
  176. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/owner-observations.md +23 -0
  177. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/peer-path.md +23 -0
  178. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/pinned-leader.md +24 -0
  179. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/reachability-evidence-ladder.md +17 -0
  180. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/recorded-login.md +23 -0
  181. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/remote-execution.md +22 -0
  182. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/secret-grants.md +26 -0
  183. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/{card.js → home.js} +93 -22
  184. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/DESIGN.md +86 -0
  185. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/README.md +19 -0
  186. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/cli.mjs +5 -1
  187. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/package-lock.json +6 -6
  188. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/package.json +2 -1
  189. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/plugin.json +43 -22
  190. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/chat.mjs +80 -0
  191. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/adapter-docs-freshness.md +16 -0
  192. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/chat-handoff.md +26 -0
  193. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/fleet-maintenance.md +21 -0
  194. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/harness-inventory.md +21 -0
  195. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/included-access.md +18 -0
  196. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/included-usage-verification.md +15 -0
  197. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/independent-review.md +17 -0
  198. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/managed-execution.md +20 -0
  199. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/official-documentation.md +18 -0
  200. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/quota-recovery.md +21 -0
  201. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/review-routing-decision.md +16 -0
  202. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/route-work.md +18 -0
  203. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/routing-evidence.md +18 -0
  204. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/run-ledger.md +18 -0
  205. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/home.js +198 -0
  206. package/scaffold/.agent/skills/total-recall/plugins/openwiki/DESIGN.md +75 -0
  207. package/scaffold/.agent/skills/total-recall/plugins/openwiki/README.md +2 -0
  208. package/scaffold/.agent/skills/total-recall/plugins/openwiki/cli.mjs +17 -14
  209. package/scaffold/.agent/skills/total-recall/plugins/openwiki/package-lock.json +6 -6
  210. package/scaffold/.agent/skills/total-recall/plugins/openwiki/package.json +2 -1
  211. package/scaffold/.agent/skills/total-recall/plugins/openwiki/plugin.json +10 -44
  212. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/generate.mjs +5 -4
  213. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/graph.mjs +3 -4
  214. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/ingest.mjs +23 -18
  215. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/mesh-vaults.mjs +8 -3
  216. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/refresh.mjs +6 -3
  217. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/search.mjs +3 -5
  218. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/token.mjs +21 -47
  219. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/upstream-watcher.mjs +17 -6
  220. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/auto-refresh.md +18 -0
  221. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/bootstrap-pages.md +18 -0
  222. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/generate-wiki.md +21 -0
  223. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/generator-settings.md +18 -0
  224. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/host-probe.md +18 -0
  225. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/ingest-preview.md +18 -0
  226. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/link-hygiene.md +21 -0
  227. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/link-topology.md +19 -0
  228. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/passage-search.md +19 -0
  229. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/propagation-plan.md +18 -0
  230. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/provider-credentials.md +18 -0
  231. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/refresh-report.md +18 -0
  232. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/task-evidence.md +22 -0
  233. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/upstream-record.md +18 -0
  234. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/watch-upstream.md +18 -0
  235. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/wiki-atlas.md +19 -0
  236. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/panel.js +261 -513
  237. package/scaffold/.agent/skills/total-recall/plugins/security/DESIGN.md +84 -0
  238. package/scaffold/.agent/skills/total-recall/plugins/security/README.md +4 -2
  239. package/scaffold/.agent/skills/total-recall/plugins/security/cli.mjs +7 -19
  240. package/scaffold/.agent/skills/total-recall/plugins/security/package-lock.json +6 -6
  241. package/scaffold/.agent/skills/total-recall/plugins/security/package.json +2 -3
  242. package/scaffold/.agent/skills/total-recall/plugins/security/plugin.json +19 -52
  243. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/device-evidence.md +21 -0
  244. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/evidence-desk.md +18 -0
  245. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/guided-device-review.md +17 -0
  246. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/host-and-network.md +21 -0
  247. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/https-headers.md +17 -0
  248. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/mesh-coverage.md +18 -0
  249. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/private-security-tools.md +16 -0
  250. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/single-origin-header-check.md +17 -0
  251. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/source-review.md +21 -0
  252. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/ssh-permission-plan.md +17 -0
  253. package/scaffold/.agent/skills/total-recall/plugins/security/ui/home.js +283 -0
  254. package/scaffold/.agent/skills/total-recall/plugins/ssss/DESIGN.md +93 -0
  255. package/scaffold/.agent/skills/total-recall/plugins/ssss/package-lock.json +2 -2
  256. package/scaffold/.agent/skills/total-recall/plugins/ssss/package.json +2 -1
  257. package/scaffold/.agent/skills/total-recall/plugins/ssss/plugin.json +5 -3
  258. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/conformance.md +26 -0
  259. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/registry.md +37 -0
  260. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/repair.md +42 -0
  261. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/scaffold.md +33 -0
  262. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/status.md +43 -0
  263. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/validate.md +34 -0
  264. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/validation-diagnostics.md +17 -0
  265. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/workspace-registry-preflight.md +17 -0
  266. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/home.js +348 -0
  267. package/scaffold/.agent/skills/total-recall/references/operations.md +2 -0
  268. package/src/cli/api.mjs +3 -3
  269. package/src/cli/brief.mjs +3 -0
  270. package/src/cli/config.mjs +16 -0
  271. package/src/cli/connect.mjs +2 -7
  272. package/src/cli/plugin/chunks.mjs +145 -0
  273. package/src/cli/plugin/create.mjs +24 -52
  274. package/src/cli/plugin/index.mjs +20 -9
  275. package/src/cli/setup.mjs +2 -9
  276. package/src/cli/start.mjs +1 -0
  277. package/src/cli/startup.mjs +18 -0
  278. package/src/core/app-deploy/design-tokens.mjs +14 -9
  279. package/src/core/app-deploy/ui-elements.mjs +1 -1
  280. package/src/core/brain-registry.mjs +5 -0
  281. package/src/core/brain-updates.mjs +5 -1
  282. package/src/core/daemon-control.mjs +5 -1
  283. package/src/core/dashboard-bundle.mjs +261 -0
  284. package/src/core/ensure-dependencies.mjs +19 -15
  285. package/src/core/memory-brain.mjs +30 -8
  286. package/src/core/plugin-activation.mjs +63 -20
  287. package/src/core/plugin-contracts/{card.mjs → manifest.mjs} +23 -57
  288. package/src/core/plugin-contracts/startup-check.mjs +49 -0
  289. package/src/core/plugin-contracts/ui.mjs +9 -3
  290. package/src/core/plugin-distribution.mjs +6 -6
  291. package/src/core/plugin-lifecycle.mjs +58 -0
  292. package/src/core/plugin-loader.mjs +9 -5
  293. package/src/core/plugin-runner.mjs +21 -10
  294. package/src/core/plugin-startup-checks.mjs +44 -0
  295. package/src/core/plugin-state.mjs +19 -5
  296. package/src/core/plugin-store.mjs +30 -11
  297. package/src/core/project-id.mjs +15 -5
  298. package/src/core/required-plugins.mjs +31 -6
  299. package/src/core/schema.mjs +2 -0
  300. package/src/core/ssss-operation-service.mjs +1 -0
  301. package/src/core/startup-health.mjs +28 -3
  302. package/src/core/testing/plugin-fixture.mjs +22 -21
  303. package/src/core/throttled-fetch.mjs +25 -18
  304. package/src/core/ui-chunk-choice.mjs +77 -0
  305. package/src/core/ui-chunk.registry.json +23 -0
  306. package/src/core/ui-chunks.mjs +434 -0
  307. package/src/core/vault-cache.mjs +58 -59
  308. package/src/core/workspace-compositions.mjs +151 -0
  309. package/src/core/workspace-drawers.mjs +79 -0
  310. package/src/server/api.mjs +4 -27
  311. package/src/server/index.mjs +28 -21
  312. package/src/server/memory-events.mjs +31 -0
  313. package/src/server/plugin-brain-targets.mjs +89 -0
  314. package/src/server/rest.mjs +2 -0
  315. package/src/server/route-inventory.mjs +3 -2
  316. package/src/server/route-manifest.json +52 -4
  317. package/src/server/routes/_shared.mjs +7 -14
  318. package/src/server/routes/brains.mjs +29 -44
  319. package/src/server/routes/dashboard.mjs +26 -0
  320. package/src/server/routes/plugins.mjs +154 -45
  321. package/src/server/routes/ui-chunks.mjs +192 -0
  322. package/frontend/dist/assets/index-DACh1dhx.js +0 -5613
  323. package/frontend/dist/assets/index-DtwsDyFM.css +0 -1
  324. package/frontend/src/components/plugins/card/CardEngine.tsx +0 -108
  325. package/frontend/src/components/plugins/card/CardScenes.tsx +0 -103
  326. package/frontend/src/components/plugins/card/ExecutionPicker.tsx +0 -64
  327. package/frontend/src/components/plugins/card/args.ts +0 -28
  328. package/frontend/src/components/plugins/card/card.css +0 -32
  329. package/frontend/src/components/plugins/card/cli-line.ts +0 -13
  330. package/frontend/src/components/plugins/card/contract.ts +0 -91
  331. package/frontend/src/components/plugins/card/format.ts +0 -49
  332. package/frontend/src/components/plugins/card/runner-context.ts +0 -11
  333. package/frontend/src/components/plugins/card/runner.tsx +0 -43
  334. package/frontend/src/components/plugins/card/theme.ts +0 -35
  335. package/frontend/src/components/plugins/card/use-source.ts +0 -22
  336. package/frontend/src/components/plugins/card/widgets.tsx +0 -94
  337. package/frontend/src/components/plugins/workspace/WorkspaceHost.tsx +0 -23
  338. package/frontend/src/pages/PluginsPage.tsx +0 -1719
  339. package/scaffold/.agent/skills/plugin/evals/cases/04-card-collects-credential.mjs +0 -47
  340. package/scaffold/.agent/skills/plugin/prompts/06-card.md +0 -46
  341. package/scaffold/.agent/skills/plugin/references/card.md +0 -90
  342. package/scaffold/.agent/skills/plugin/subagents/card-designer.md +0 -60
  343. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/DESIGN.md +0 -67
  344. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/card.js +0 -1179
  345. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/DESIGN.md +0 -32
  346. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/card.js +0 -588
  347. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/card.js +0 -575
  348. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/DESIGN.md +0 -32
  349. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/card.js +0 -482
  350. package/scaffold/.agent/skills/total-recall/plugins/git/ui/DESIGN.md +0 -100
  351. package/scaffold/.agent/skills/total-recall/plugins/git/ui/card.js +0 -637
  352. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/DESIGN.md +0 -217
  353. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/DESIGN.md +0 -32
  354. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/card.js +0 -1276
  355. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/DESIGN.md +0 -45
  356. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/card.js +0 -1401
  357. package/scaffold/.agent/skills/total-recall/plugins/security/scripts/build-ui.mjs +0 -4
  358. package/scaffold/.agent/skills/total-recall/plugins/security/ui/DESIGN.md +0 -41
  359. package/scaffold/.agent/skills/total-recall/plugins/security/ui/card.js +0 -396
  360. package/scaffold/.agent/skills/total-recall/plugins/security/ui/panel.js +0 -98
  361. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/DESIGN.md +0 -15
  362. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/card.js +0 -182
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://github.com/gregiteen/total-recall/blob/main/metadata.plugin.schema.json",
3
3
  "id": "openwiki",
4
4
  "name": "OpenWiki",
5
- "version": "0.1.11",
5
+ "version": "0.2.0",
6
6
  "description": "Multi-repo knowledge graph and documentation wiki engine for Total Recall.",
7
7
  "license": "MIT",
8
8
  "runtime": {
@@ -41,29 +41,6 @@
41
41
  "required": false
42
42
  }
43
43
  ],
44
- "card_face": {
45
- "headline": "OpenWiki Control Deck",
46
- "quick_actions": [
47
- {
48
- "subcommand": "status",
49
- "label": "STATUS"
50
- },
51
- {
52
- "subcommand": "hubs",
53
- "label": "HUBS"
54
- },
55
- {
56
- "subcommand": "ingest",
57
- "label": "INGEST"
58
- },
59
- {
60
- "subcommand": "probe",
61
- "label": "200 PROBE"
62
- }
63
- ],
64
- "touch_layout": "comfortable",
65
- "interactive": true
66
- },
67
44
  "ssss_schemas": {
68
45
  "categories": [
69
46
  {
@@ -233,6 +210,12 @@
233
210
  "flag": "--project",
234
211
  "label": "Target project brain",
235
212
  "type": "boolean"
213
+ },
214
+ {
215
+ "name": "json",
216
+ "flag": "--json",
217
+ "label": "JSON output",
218
+ "type": "boolean"
236
219
  }
237
220
  ]
238
221
  },
@@ -443,32 +426,15 @@
443
426
  ]
444
427
  },
445
428
  "ui": {
446
- "design_tokens": "ui/DESIGN.md",
429
+ "home": "panel",
430
+ "design_tokens": "DESIGN.md",
447
431
  "elements": [
448
432
  {
449
433
  "id": "panel",
450
434
  "kind": "panel",
451
435
  "tag": "openwiki-panel",
452
436
  "module": "ui/panel.js",
453
- "description": "OpenWiki panel",
454
- "events": [
455
- "save-token"
456
- ],
457
- "tokens": [
458
- "color-text",
459
- "color-surface",
460
- "color-border",
461
- "spacing-md",
462
- "radius-md"
463
- ],
464
- "optional_tokens": []
465
- },
466
- {
467
- "id": "card",
468
- "kind": "card",
469
- "tag": "tr-openwiki-card",
470
- "module": "ui/card.js",
471
- "description": "Knowledge Graph Card Face"
437
+ "description": "Workspace wiki atlas"
472
438
  }
473
439
  ]
474
440
  },
@@ -28,14 +28,15 @@ export async function generateWiki({
28
28
  const isSelf = selfNode && (selfNode.ip === node || selfNode.hostname.toLowerCase() === node.toLowerCase());
29
29
 
30
30
  if (!isSelf) {
31
- const escapedRepo = repo ? `--repo="${repo}"` : '';
32
- const cmd = `total-recall openwiki generate ${escapedRepo} ${force ? '--force' : ''} --json`;
33
- const meshRes = execOnMeshNode(node, cmd);
31
+ const meshRes = execOnMeshNode(node, [
32
+ 'generate', ...(repo ? [`--repo=${repo}`] : []), ...(force ? ['--force'] : []),
33
+ ...(dryRun ? ['--dry-run'] : []), '--json',
34
+ ]);
34
35
  if (meshRes.ok) {
35
36
  try {
36
37
  return JSON.parse(meshRes.stdout);
37
38
  } catch {
38
- return { ok: true, node, output: meshRes.stdout };
39
+ throw new Error('Mesh generation returned invalid JSON');
39
40
  }
40
41
  } else {
41
42
  throw new Error(`Mesh generation failed on node ${node}: ${meshRes.stderr || meshRes.error}`);
@@ -19,10 +19,9 @@ export async function buildKnowledgeGraph({
19
19
  } = {}) {
20
20
  // If remote mesh node specified, dispatch via mesh
21
21
  if (node && node !== 'local' && node !== 'self') {
22
- const meshRes = execOnMeshNode(
23
- node,
24
- `total-recall openwiki graph ${allVaults ? '--all-vaults' : ''} --format=${format} --json`
25
- );
22
+ const meshRes = execOnMeshNode(node, [
23
+ 'graph', ...(allVaults ? ['--all-vaults'] : []), '--format', format, '--json',
24
+ ]);
26
25
  if (meshRes.ok) {
27
26
  try {
28
27
  return JSON.parse(meshRes.stdout);
@@ -13,6 +13,7 @@ function printHelp() {
13
13
  --dry-run Preview import without writing
14
14
  --global Target the global brain
15
15
  --project Target the project brain (default)
16
+ --json Return a structured import receipt
16
17
  --help, -h Show this help
17
18
  `);
18
19
  }
@@ -22,6 +23,9 @@ export async function runOpenWikiIngest(args = []) {
22
23
  let dryRun = false;
23
24
  let layerFlag = '--project';
24
25
  let help = false;
26
+ const json = args.includes('--json');
27
+ const log = message => { if (!json) console.log(message); };
28
+ const warn = message => { if (!json) console.error(message); };
25
29
 
26
30
  for (let i = 0; i < args.length; i++) {
27
31
  const arg = args[i];
@@ -37,20 +41,20 @@ export async function runOpenWikiIngest(args = []) {
37
41
  }
38
42
  }
39
43
 
40
- if (help || !openwikiPath) {
44
+ if (help || (!json && !openwikiPath)) {
41
45
  printHelp();
42
46
  return { ok: true, imported: 0, errors: 0 };
43
47
  }
44
48
 
45
- if (openwikiPath && !fs.existsSync(openwikiPath)) {
46
- console.error(`Error: OpenWiki directory not found at ${openwikiPath}`);
47
- process.exitCode = 1;
48
- return { ok: false, error: `Directory not found: ${openwikiPath}` };
49
+ if (!openwikiPath || !fs.statSync(openwikiPath, { throwIfNoEntry: false })?.isDirectory()) {
50
+ const error = 'An existing OpenWiki directory is required';
51
+ warn(error);
52
+ return { ok: false, error };
49
53
  }
50
54
 
51
- console.log(`\n Importing OpenWiki from: ${openwikiPath}`);
52
- console.log(` Target Brain: ${layerFlag.replace('--', '')}`);
53
- if (dryRun) console.log(' DRY RUN: No actual writes will be committed.\n');
55
+ log(`\n Importing OpenWiki from: ${openwikiPath}`);
56
+ log(` Target Brain: ${layerFlag.replace('--', '')}`);
57
+ if (dryRun) log(' DRY RUN: No actual writes will be committed.\n');
54
58
 
55
59
  const mdFiles = [];
56
60
  function scanDir(dir) {
@@ -69,6 +73,7 @@ export async function runOpenWikiIngest(args = []) {
69
73
  scanDir(openwikiPath);
70
74
 
71
75
  let imported = 0;
76
+ let planned = 0;
72
77
  let errors = 0;
73
78
 
74
79
  for (const file of mdFiles) {
@@ -85,8 +90,8 @@ export async function runOpenWikiIngest(args = []) {
85
90
  const slug = 'openwiki-' + slugBase.toLowerCase();
86
91
 
87
92
  if (dryRun) {
88
- console.log(` [DRY RUN] Would import: ${slug} ("${title}")`);
89
- imported++;
93
+ log(` [DRY RUN] Would import: ${slug} ("${title}")`);
94
+ planned++;
90
95
  continue;
91
96
  }
92
97
 
@@ -101,27 +106,27 @@ export async function runOpenWikiIngest(args = []) {
101
106
 
102
107
  const result = spawnSync(TR_BIN, cliArgs, { encoding: 'utf8' });
103
108
  if (result.status === 0) {
104
- console.log(` Imported: ${slug}`);
109
+ log(` Imported: ${slug}`);
105
110
  imported++;
106
111
  } else {
107
- console.error(` Error importing ${slug}: ${result.stderr}`);
112
+ warn(` Error importing ${slug}: ${result.stderr}`);
108
113
  errors++;
109
114
  }
110
115
  } catch (err) {
111
- console.error(` Exception on ${file}: ${err.message}`);
116
+ warn(` Exception on ${file}: ${err.message}`);
112
117
  errors++;
113
118
  }
114
119
  }
115
120
 
116
- console.log(`\n Import Summary:`);
117
- console.log(` Imported: ${imported} files`);
118
- console.log(` Errors: ${errors} files`);
121
+ log('\n Import Summary:');
122
+ log(dryRun ? ` Would import: ${planned} files` : ` Imported: ${imported} files`);
123
+ log(` Errors: ${errors} files`);
119
124
 
120
125
  if (!dryRun && imported > 0) {
121
- console.log(`\n OpenWiki knowledge graph successfully indexed into Total Recall.`);
126
+ log('\n OpenWiki knowledge graph successfully indexed into Total Recall.');
122
127
  }
123
128
 
124
- return { ok: errors === 0, imported, errors };
129
+ return { ok: errors === 0, dryRun, imported, planned, errors };
125
130
  }
126
131
 
127
132
  export default runOpenWikiIngest;
@@ -102,7 +102,7 @@ export function getMeshNodes() {
102
102
  * Execute a command on a remote mesh node via Total Recall mesh plugin.
103
103
  * Guarded against self-execution (never ssh a machine into itself).
104
104
  */
105
- export function execOnMeshNode(nodeTarget, commandStr, { timeoutMs = 25000 } = {}) {
105
+ export function execOnMeshNode(nodeTarget, args, { timeoutMs = 25000 } = {}) {
106
106
  if (!nodeTarget || typeof nodeTarget !== 'string') {
107
107
  throw new Error('A valid mesh node identifier or IP is required');
108
108
  }
@@ -117,7 +117,12 @@ export function execOnMeshNode(nodeTarget, commandStr, { timeoutMs = 25000 } = {
117
117
  throw new Error(`Target node '${nodeTarget}' is the local host. Do not mesh exec into self.`);
118
118
  }
119
119
 
120
- const result = spawnSync('total-recall', ['mesh', 'exec', nodeTarget, commandStr], {
120
+ if (!Array.isArray(args) || args.some(arg => typeof arg !== 'string')) {
121
+ throw new Error('Mesh operation requires OpenWiki CLI arguments');
122
+ }
123
+ const quote = arg => "'" + arg.replaceAll("'", "'\\''") + "'";
124
+ const command = ['total-recall', 'openwiki', ...args].map(quote).join(' ');
125
+ const result = spawnSync('total-recall', ['mesh', 'exec', nodeTarget, command], {
121
126
  encoding: 'utf8',
122
127
  timeout: timeoutMs,
123
128
  });
@@ -203,7 +208,7 @@ export async function discoverAllHubs({
203
208
  const isSelf = selfNode && (selfNode.ip === node || selfNode.hostname.toLowerCase() === node.toLowerCase());
204
209
 
205
210
  if (!isSelf) {
206
- const meshRes = execOnMeshNode(node, `total-recall openwiki hubs ${allVaults ? '--all-vaults' : ''} --json`);
211
+ const meshRes = execOnMeshNode(node, ['hubs', ...(allVaults ? ['--all-vaults'] : []), '--json']);
207
212
  if (meshRes.ok) {
208
213
  try {
209
214
  const parsed = JSON.parse(meshRes.stdout);
@@ -299,9 +299,12 @@ function finishRefresh(project, { before, result, git, key, mode, startedAt, via
299
299
  const completedAt = new Date(clock()).toISOString();
300
300
  const stdout = redact(result.stdout, key), stderr = redact(result.stderr, key);
301
301
  const error = redact(result.error?.message, key);
302
- const lines = `${stderr}\n${stdout}`.replace(/\x1b\[[0-9;]*m/g, '').split('\n').map(line => line.trim()).filter(Boolean);
303
- const diagnostic = lines.find(line => /context_length_exceeded|Provider returned error|exited without|Could not restore|interrupted OpenWiki|fetch failed/.test(line));
304
- const reason = error || (result.signal ? `terminated by ${result.signal}` : diagnostic || lines.filter(line => !/^(\[ERR\]\s*)?Error Diagnostics$/.test(line)).at(-1) || `exit ${exitCode}`);
302
+ const clean = text => String(text || '').replace(/\x1b\[[0-9;]*m/g, '').split(/\r?\n/)
303
+ .map(line => line.trim().replace(/^\[ERR\]\s*/, '')).filter(line => line && line !== 'Error Diagnostics');
304
+ const errLines = clean(stderr), outLines = clean(stdout);
305
+ const diagnostic = [...errLines, ...outLines].find(line => /context_length_exceeded|Provider returned error|exited without|Could not restore|interrupted OpenWiki|fetch failed/.test(line));
306
+ // The generator's own first error line names the cause; a trailing "Status: 400" does not.
307
+ const reason = error || (result.signal ? `generator stopped by ${result.signal}` : diagnostic || errLines[0] || outLines.at(-1) || `exit ${exitCode}`);
305
308
  const wrote = pagesWritten(before, after) || (!before.files && hasWiki(project.root) ? 1 : 0);
306
309
  const advanced = after.generatedAt !== before.generatedAt;
307
310
  let action, failureReason;
@@ -36,11 +36,9 @@ export async function searchWikiHubs(query, {
36
36
 
37
37
  // If remote mesh node specified, dispatch via mesh
38
38
  if (node && node !== 'local' && node !== 'self') {
39
- const escapedQuery = query.replace(/"/g, '\\"');
40
- const meshRes = execOnMeshNode(
41
- node,
42
- `total-recall openwiki search "${escapedQuery}" ${allVaults ? '--all-vaults' : ''} --json`
43
- );
39
+ const meshRes = execOnMeshNode(node, [
40
+ 'search', query, ...(allVaults ? ['--all-vaults'] : []), '--limit', String(limit), '--json',
41
+ ]);
44
42
  if (meshRes.ok) {
45
43
  try {
46
44
  return JSON.parse(meshRes.stdout);
@@ -15,60 +15,34 @@ const PROVIDER_KEY_MAP = {
15
15
  /**
16
16
  * Checks token readiness across supported providers.
17
17
  */
18
- export function getTokenStatus() {
19
- const result = spawnSync('total-recall', ['auth', 'secret', 'list', '--json'], {
18
+ export function getTokenStatus({ run = spawnSync } = {}) {
19
+ const result = run('total-recall', ['auth', 'secret', 'list', '--json'], {
20
20
  encoding: 'utf8',
21
21
  timeout: 5000,
22
22
  });
23
23
 
24
- const configured = {
25
- openrouter: false,
26
- google: false,
27
- };
28
-
29
- if (result.status === 0 && result.stdout) {
30
- try {
31
- const parsed = JSON.parse(result.stdout);
32
- const keys = Array.isArray(parsed)
33
- ? parsed.map((k) => (typeof k === 'string' ? k : k.key || k.name))
34
- : (parsed.keys || []);
35
-
36
- configured.openrouter = keys.includes('OPENROUTER_API_KEY') || Boolean(process.env.OPENROUTER_API_KEY);
37
- configured.google = keys.includes('GOOGLE_API_KEY') || Boolean(process.env.GOOGLE_API_KEY);
38
- } catch {
39
- configured.openrouter = Boolean(process.env.OPENROUTER_API_KEY);
40
- configured.google = Boolean(process.env.GOOGLE_API_KEY);
41
- }
42
- } else {
43
- configured.openrouter = Boolean(process.env.OPENROUTER_API_KEY);
44
- configured.google = Boolean(process.env.GOOGLE_API_KEY);
45
- }
46
-
47
- return {
48
- ok: true,
49
- tokens: {
50
- openrouter: {
51
- key: 'OPENROUTER_API_KEY',
52
- configured: configured.openrouter,
53
- status: configured.openrouter ? 'configured' : 'missing',
54
- },
55
- google: {
56
- key: 'GOOGLE_API_KEY',
57
- configured: configured.google,
58
- status: configured.google ? 'configured' : 'missing',
59
- },
60
- },
61
- };
24
+ if (result.status !== 0) throw new Error('Auth credential metadata is unavailable');
25
+ let payload;
26
+ try { payload = JSON.parse(result.stdout); }
27
+ catch { throw new Error('Auth credential metadata is invalid'); }
28
+ const rows = Array.isArray(payload) ? payload : payload?.keys;
29
+ if (!Array.isArray(rows)) throw new Error('Auth credential metadata is invalid');
30
+ const saved = new Set(rows.filter(row => row?.set !== false)
31
+ .map(row => typeof row === 'string' ? row : row?.key ?? row?.name));
32
+ const tokens = Object.fromEntries(Object.entries(PROVIDER_KEY_MAP).map(([provider, key]) => {
33
+ const configured = saved.has(key);
34
+ return [provider, { key, configured, status: configured ? 'configured' : 'missing' }];
35
+ }));
36
+ return { ok: true, tokens };
62
37
  }
63
38
 
64
39
  /**
65
40
  * Securely writes a token into Total Recall auth secrets store using --stdin.
66
41
  */
67
- export function setTokenValue(provider, secretValue) {
68
- const keyName = PROVIDER_KEY_MAP[provider?.toLowerCase()] || provider;
69
- if (!keyName) {
70
- throw new Error(`Unsupported token provider '${provider}'. Allowed: openrouter, google`);
71
- }
42
+ export function setTokenValue(provider, secretValue, { run = spawnSync } = {}) {
43
+ const id = typeof provider === 'string' && provider.toLowerCase();
44
+ if (!Object.hasOwn(PROVIDER_KEY_MAP, id)) throw new Error('Supported token providers are openrouter and google');
45
+ const keyName = PROVIDER_KEY_MAP[id];
72
46
 
73
47
  if (!secretValue || typeof secretValue !== 'string' || !secretValue.trim()) {
74
48
  throw new Error(`Token value for ${keyName} must be a non-empty string`);
@@ -77,14 +51,14 @@ export function setTokenValue(provider, secretValue) {
77
51
  const trimmed = secretValue.trim();
78
52
 
79
53
  // Pipe into total-recall auth secret set <KEY> --stdin
80
- const child = spawnSync('total-recall', ['auth', 'secret', 'set', keyName, '--stdin'], {
54
+ const child = run('total-recall', ['auth', 'secret', 'set', keyName, '--stdin'], {
81
55
  input: trimmed,
82
56
  encoding: 'utf8',
83
57
  timeout: 5000,
84
58
  });
85
59
 
86
60
  if (child.status !== 0) {
87
- throw new Error(child.stderr || child.error?.message || `Failed to set ${keyName} in secrets store`);
61
+ throw new Error(`Auth could not save ${keyName}`);
88
62
  }
89
63
 
90
64
  return {
@@ -15,6 +15,15 @@ import { hasWiki, readProjects, refreshProject, resolveKey } from './refresh.mjs
15
15
  export const UPSTREAM_NPM_URL = 'https://registry.npmjs.org/openwiki/latest';
16
16
  export const UPSTREAM_GITHUB_URL = 'https://api.github.com/repos/langchain-ai/openwiki/releases/latest';
17
17
 
18
+ export function bundledGeneratorVersion() {
19
+ try {
20
+ if (!fs.existsSync(new URL('../vendor/openwiki.mjs', import.meta.url))) return null;
21
+ const build = JSON.parse(fs.readFileSync(new URL('../vendor/build.json', import.meta.url), 'utf8'));
22
+ return typeof build.version === 'string' && /^\d+\.\d+\.\d+(?:[-+][a-zA-Z0-9.-]+)?$/.test(build.version)
23
+ ? build.version : null;
24
+ } catch { return null; }
25
+ }
26
+
18
27
  /**
19
28
  * Resolves the path to the persistent upstream state file.
20
29
  * @param {string} [home] Home directory override
@@ -34,20 +43,21 @@ export function stateFile(home = os.homedir()) {
34
43
  * @returns {{ currentRecordedVersion: string, latestKnownVersion: string, lastCheckedAt: string | null, announcements: Array<object> }}
35
44
  */
36
45
  export function readUpstreamState({ statePath = stateFile() } = {}) {
46
+ const baseline = bundledGeneratorVersion() || '0.0.0';
37
47
  try {
38
48
  const raw = fs.readFileSync(statePath, 'utf8');
39
49
  const parsed = JSON.parse(raw);
40
50
  return {
41
- currentRecordedVersion: typeof parsed.currentRecordedVersion === 'string' ? parsed.currentRecordedVersion : '0.7.2',
42
- latestKnownVersion: typeof parsed.latestKnownVersion === 'string' ? parsed.latestKnownVersion : '0.7.2',
51
+ currentRecordedVersion: typeof parsed.currentRecordedVersion === 'string' ? parsed.currentRecordedVersion : baseline,
52
+ latestKnownVersion: typeof parsed.latestKnownVersion === 'string' ? parsed.latestKnownVersion : baseline,
43
53
  lastCheckedAt: typeof parsed.lastCheckedAt === 'string' ? parsed.lastCheckedAt : null,
44
54
  lastPropagatedAt: typeof parsed.lastPropagatedAt === 'string' ? parsed.lastPropagatedAt : null,
45
55
  announcements: Array.isArray(parsed.announcements) ? parsed.announcements : []
46
56
  };
47
57
  } catch {
48
58
  return {
49
- currentRecordedVersion: '0.7.2',
50
- latestKnownVersion: '0.7.2',
59
+ currentRecordedVersion: baseline,
60
+ latestKnownVersion: baseline,
51
61
  lastCheckedAt: null,
52
62
  lastPropagatedAt: null,
53
63
  announcements: []
@@ -62,13 +72,14 @@ export function readUpstreamState({ statePath = stateFile() } = {}) {
62
72
  * @param {string} [options.statePath] Custom state path
63
73
  */
64
74
  export function saveUpstreamState(state = {}, { statePath = stateFile() } = {}) {
75
+ const baseline = bundledGeneratorVersion() || '0.0.0';
65
76
  const dir = path.dirname(statePath);
66
77
  if (!fs.existsSync(dir)) {
67
78
  fs.mkdirSync(dir, { recursive: true });
68
79
  }
69
80
  const payload = {
70
- currentRecordedVersion: state.currentRecordedVersion || '0.7.2',
71
- latestKnownVersion: state.latestKnownVersion || '0.7.2',
81
+ currentRecordedVersion: state.currentRecordedVersion || baseline,
82
+ latestKnownVersion: state.latestKnownVersion || baseline,
72
83
  lastCheckedAt: state.lastCheckedAt || new Date().toISOString(),
73
84
  lastPropagatedAt: state.lastPropagatedAt || null,
74
85
  announcements: Array.isArray(state.announcements) ? state.announcements.slice(-20) : []
@@ -0,0 +1,18 @@
1
+ ---
2
+ type: ui-chunk:chunk
3
+ plugin: openwiki
4
+ id: auto-refresh
5
+ title: Scheduled wiki refresh
6
+ description: Understand the daemon operation that applies regeneration to due registered repositories.
7
+ timestamp: "2026-11-08T09:14:38Z"
8
+ intents: [inspect scheduled wiki refresh, understand automatic regeneration, review daemon wiki refresh]
9
+ surfaces: [page]
10
+ operations: [auto-refresh]
11
+ data: ["auto-refresh:/counts/current", "auto-refresh:/counts/refreshed"]
12
+ ---
13
+
14
+ <section style="border-inline-start:3px solid var(--color-primary,#8d3e10);padding-inline-start:1rem">
15
+ <h2>Scheduled wiki refresh</h2>
16
+ <p><code>auto-refresh</code> is the daemon's applying operation. It checks the selected registered repositories and regenerates due pages.</p>
17
+ <p>Use <code>total-recall openwiki refresh --json</code> for an operator preview. Review the scheduled run receipt to see what the daemon refreshed.</p>
18
+ </section>
@@ -0,0 +1,18 @@
1
+ ---
2
+ type: ui-chunk:chunk
3
+ plugin: openwiki
4
+ id: bootstrap-pages
5
+ title: Seed missing wiki pages
6
+ description: Preview which owner-provided pages would be created in an explicit brain or project.
7
+ timestamp: "2026-11-08T09:14:38Z"
8
+ intents: [bootstrap wiki pages, seed repository documentation, review missing starter pages]
9
+ surfaces: [page]
10
+ operations: [bootstrap]
11
+ data: ["bootstrap:/files_planned", "bootstrap:/files_preserved"]
12
+ ---
13
+
14
+ <section>
15
+ <h2>Seed missing wiki pages</h2>
16
+ <p>Choose an absolute brain path and, optionally, a project root. Run <code>total-recall openwiki bootstrap --brain &lt;path&gt; --dry-run --json</code> to see the planned pages.</p>
17
+ <p>Review the target paths before applying. The bootstrap receipt separates new pages from existing files that it preserved.</p>
18
+ </section>
@@ -0,0 +1,21 @@
1
+ ---
2
+ type: ui-chunk:chunk
3
+ plugin: openwiki
4
+ id: generate-wiki
5
+ title: Preview wiki generation
6
+ description: Inspect the selected repository and output location before generating documentation.
7
+ timestamp: "2026-11-08T09:14:38Z"
8
+ intents: [preview wiki generation, generate repo documentation, inspect generation destination]
9
+ surfaces: [page]
10
+ operations: [generate]
11
+ data: ["generate:/ok", "generate:/dryRun"]
12
+ ---
13
+
14
+ <section>
15
+ <h2>Preview wiki generation</h2>
16
+ <ol>
17
+ <li>Run <code>total-recall openwiki generate --dry-run --json</code> for the current workspace, or select a registered repository with <code>--repo</code>.</li>
18
+ <li>Review the selected repository and wiki output directory.</li>
19
+ <li>Start generation after approving the target and configured provider.</li>
20
+ </ol>
21
+ </section>
@@ -0,0 +1,18 @@
1
+ ---
2
+ type: ui-chunk:chunk
3
+ plugin: openwiki
4
+ id: generator-settings
5
+ title: Inspect generator configuration
6
+ description: Review the configured provider, model routing, token bound and timeout.
7
+ timestamp: "2026-11-08T09:14:38Z"
8
+ intents: [inspect OpenWiki configuration, review generation limits, change wiki generator settings]
9
+ surfaces: [page, right]
10
+ operations: [config]
11
+ data: ["config:/config/provider", "config:/config/max_tokens", "config:/config/timeout_ms"]
12
+ ---
13
+
14
+ <section>
15
+ <h2>Inspect generator configuration</h2>
16
+ <p>Run <code>total-recall openwiki config show --json</code> to inspect the active provider, routing, token bound and timeout.</p>
17
+ <p>Use <code>config get</code> for an individual setting. An explicit <code>config set</code> changes the chosen setting for future generation.</p>
18
+ </section>
@@ -0,0 +1,18 @@
1
+ ---
2
+ type: ui-chunk:chunk
3
+ plugin: openwiki
4
+ id: host-probe
5
+ title: Probe the Total Recall host
6
+ description: Check the configured host's health endpoint and observe response latency.
7
+ timestamp: "2026-11-08T09:14:38Z"
8
+ intents: [probe Total Recall host, inspect wiki host availability, check health response]
9
+ surfaces: [page, right]
10
+ operations: [probe]
11
+ data: ["probe:/ok", "probe:/status", "probe:/latency_ms"]
12
+ ---
13
+
14
+ <section>
15
+ <h2>Probe the Total Recall host</h2>
16
+ <p>Run <code>total-recall openwiki probe --json</code> to observe the HTTP status and response time for the configured host's health endpoint.</p>
17
+ <p>Use the wiki index or evidence search to check documentation coverage.</p>
18
+ </section>
@@ -0,0 +1,18 @@
1
+ ---
2
+ type: ui-chunk:chunk
3
+ plugin: openwiki
4
+ id: ingest-preview
5
+ title: Preview wiki ingestion
6
+ description: Count pages selected for import into the requested Total Recall brain.
7
+ timestamp: "2026-11-08T09:14:38Z"
8
+ intents: [preview wiki ingest, import markdown into project brain, inspect wiki import receipt]
9
+ surfaces: [page]
10
+ operations: [ingest]
11
+ data: ["ingest:/planned", "ingest:/imported", "ingest:/errors"]
12
+ ---
13
+
14
+ <section>
15
+ <h2>Preview wiki ingestion</h2>
16
+ <p>Run <code>total-recall openwiki ingest &lt;directory&gt; --project --dry-run --json</code> to count pages planned for the project brain. Select <code>--global</code> only when the shared brain is the intended target.</p>
17
+ <p>After approving the target, run the import and review the completed and failed counts. Confirm indexed passages through Total Recall recall.</p>
18
+ </section>
@@ -0,0 +1,21 @@
1
+ ---
2
+ type: ui-chunk:chunk
3
+ plugin: openwiki
4
+ id: link-hygiene
5
+ title: Audit wiki link health
6
+ description: Identify broken references and orphaned pages without rewriting Markdown.
7
+ timestamp: "2026-11-08T09:14:38Z"
8
+ intents: [lint wiki links, find broken markdown links, inspect orphaned wiki pages]
9
+ surfaces: [page, right]
10
+ operations: [lint]
11
+ data: ["lint:/brokenLinksCount", "lint:/orphanCount"]
12
+ ---
13
+
14
+ <section style="border-inline-start:3px solid var(--color-primary,#8d3e10);padding-inline-start:1rem">
15
+ <h2>Audit wiki link health</h2>
16
+ <dl>
17
+ <dt><strong>Broken links</strong></dt><dd>Check Markdown and wikilink targets.</dd>
18
+ <dt><strong>Orphaned pages</strong></dt><dd>Look for pages with neither incoming nor outgoing references.</dd>
19
+ </dl>
20
+ <p>Run <code>total-recall openwiki lint --json</code> and repair the reported files in their repository.</p>
21
+ </section>
@@ -0,0 +1,19 @@
1
+ ---
2
+ type: ui-chunk:chunk
3
+ plugin: openwiki
4
+ id: link-topology
5
+ title: Trace documentation links
6
+ description: Inspect links and isolated pages in the wiki topology.
7
+ timestamp: "2026-11-08T09:14:38Z"
8
+ intents: [show wiki graph, trace page links, find unlinked documentation]
9
+ surfaces: [page, right]
10
+ operations: [graph]
11
+ data: ["graph:/counts/nodes", "graph:/counts/edges", "graph:/counts/orphans", "graph:/scope"]
12
+ panel: panel
13
+ ---
14
+
15
+ <section style="border-block-start:1px solid var(--color-outline,#cbb497)">
16
+ <h2>Trace documentation links</h2>
17
+ <p>Set the evidence scope and select <strong>Inspect links</strong> to see the sources and destinations of resolved Markdown links and wikilinks.</p>
18
+ <p>Export topology through <code>total-recall openwiki graph --format mermaid</code> or <code>--format dot</code>.</p>
19
+ </section>
@@ -0,0 +1,19 @@
1
+ ---
2
+ type: ui-chunk:chunk
3
+ plugin: openwiki
4
+ id: passage-search
5
+ title: Search wiki passages
6
+ description: Retrieve ranked wiki excerpts with source page and line references.
7
+ timestamp: "2026-11-08T09:14:38Z"
8
+ intents: [search wiki text, find documentation passage, find source line for a claim]
9
+ surfaces: [page, right]
10
+ operations: [search]
11
+ data: ["search:/count", "search:/totalHits", "search:/totalHubsScanned", "search:/scope", "search:/results/0/repoName"]
12
+ panel: panel
13
+ ---
14
+
15
+ <section>
16
+ <h2>Search wiki passages</h2>
17
+ <p>Search a term or phrase in the atlas. Choose All registered wikis to broaden the search explicitly. The cross-project results include the repository, excerpt, section and line reference.</p>
18
+ <p>Use <code>total-recall openwiki search &lt;query&gt; --limit 8 --json</code> to retrieve the same evidence from a harness.</p>
19
+ </section>