total-recall-brain 3.40.0 → 3.40.2

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 (187) hide show
  1. package/README.md +152 -41
  2. package/bin/total-recall.mjs +16 -76
  3. package/docs/reference/cli-reference.md +10 -10
  4. package/extension/background.js +6 -2
  5. package/extension/config.js +8 -0
  6. package/extension/lib/brain-client.js +29 -4
  7. package/extension/options/options.html +1 -0
  8. package/extension/sidepanel/sidepanel.html +1 -0
  9. package/frontend/dist/assets/{index-CvQRdT2j.css → index-AGUes-VG.css} +1 -1
  10. package/frontend/dist/assets/index-Bt5iVPZj.js +5618 -0
  11. package/frontend/dist/index.html +2 -2
  12. package/frontend/src/api/keys.ts +9 -2
  13. package/frontend/src/api/plugins.ts +4 -0
  14. package/frontend/src/components/plugins/card/CardEngine.tsx +2 -1
  15. package/frontend/src/components/plugins/card/card.css +1 -1
  16. package/frontend/src/pages/IntegrationsPage.tsx +315 -8
  17. package/frontend/src/pages/PluginsPage.tsx +532 -87
  18. package/package.json +6 -5
  19. package/scaffold/.agent/skills/meta-harness/references/optimized/original.md +1 -1
  20. package/scaffold/.agent/skills/meta-harness/references/optimized/section-09.md +1 -1
  21. package/scaffold/.agent/skills/total-recall/plugins/auth/package-lock.json +10 -10
  22. package/scaffold/.agent/skills/total-recall/plugins/auth/package.json +1 -6
  23. package/scaffold/.agent/skills/total-recall/plugins/auth/plugin.json +0 -1
  24. package/scaffold/.agent/skills/total-recall/plugins/auth/src/browser-session.mjs +309 -4
  25. package/scaffold/.agent/skills/total-recall/plugins/auth/src/cli-secret.mjs +44 -34
  26. package/scaffold/.agent/skills/total-recall/plugins/auth/src/google-oauth.mjs +6 -4
  27. package/scaffold/.agent/skills/total-recall/plugins/auth/src/provider-catalog.mjs +1 -1
  28. package/scaffold/.agent/skills/total-recall/plugins/auth/src/provider-rotation-recipes.mjs +118 -4
  29. package/scaffold/.agent/skills/total-recall/plugins/auth/src/routes/auth.mjs +2 -2
  30. package/scaffold/.agent/skills/total-recall/plugins/auth/src/secrets-env-export.mjs +3 -3
  31. package/scaffold/.agent/skills/total-recall/plugins/auth/src/secrets-remote-deploy.mjs +1 -1
  32. package/scaffold/.agent/skills/total-recall/plugins/auth/src/secrets-rotate.mjs +24 -6
  33. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/card.js +164 -123
  34. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/README.md +65 -0
  35. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/cli.mjs +76 -0
  36. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/package.json +19 -0
  37. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/plugin.json +290 -0
  38. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/adapters/dsh.mjs +446 -0
  39. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/documentation.mjs +152 -0
  40. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/executor.mjs +71 -0
  41. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/runtime.mjs +36 -0
  42. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/setup.mjs +35 -0
  43. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/worker.mjs +175 -0
  44. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/ui/card.js +18 -0
  45. package/scaffold/.agent/skills/total-recall/plugins/code-quality/LICENSE +21 -0
  46. package/scaffold/.agent/skills/total-recall/plugins/code-quality/README.md +84 -0
  47. package/scaffold/.agent/skills/total-recall/plugins/code-quality/cli.mjs +79 -0
  48. package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/check.mjs +6 -0
  49. package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/report.mjs +6 -0
  50. package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/run-core.mjs +27 -0
  51. package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/snapshot.mjs +163 -0
  52. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/check.mjs +757 -0
  53. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/config.schema.json +86 -0
  54. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/detect.mjs +89 -0
  55. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/report-data.mjs +145 -0
  56. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/report.mjs +210 -0
  57. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/state.mjs +20 -0
  58. package/scaffold/.agent/skills/total-recall/plugins/code-quality/package-lock.json +2869 -0
  59. package/scaffold/.agent/skills/total-recall/plugins/code-quality/package.json +28 -0
  60. package/scaffold/.agent/skills/total-recall/plugins/code-quality/plugin.json +186 -0
  61. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/DESIGN.md +18 -0
  62. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/card.js +272 -0
  63. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/code-quality-report.mjs +129 -0
  64. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/LICENSE +21 -0
  65. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/README.md +73 -0
  66. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/cli.mjs +375 -0
  67. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/examples/commands/echo-tool.mjs +23 -0
  68. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/examples/commands/group.mjs +262 -0
  69. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/examples/commands/project-id.mjs +74 -0
  70. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package-lock.json +2869 -0
  71. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package.json +31 -0
  72. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/plugin.json +221 -0
  73. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/schemas/cli_command.schema.json +107 -0
  74. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/skills/composable-cli/SKILL.md +63 -0
  75. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/command.mjs +313 -0
  76. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/compile.mjs +19 -0
  77. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/compose.mjs +144 -0
  78. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/contract.mjs +110 -0
  79. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/library.mjs +23 -0
  80. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/registry.mjs +192 -0
  81. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/resolve.mjs +221 -0
  82. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/risk.mjs +126 -0
  83. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/ssss-documents.mjs +29 -0
  84. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/DESIGN.md +18 -0
  85. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/card.js +273 -0
  86. package/scaffold/.agent/skills/total-recall/plugins/embeddings/LICENSE +21 -0
  87. package/scaffold/.agent/skills/total-recall/plugins/embeddings/README.md +20 -0
  88. package/scaffold/.agent/skills/total-recall/plugins/embeddings/cli.mjs +310 -0
  89. package/scaffold/.agent/skills/total-recall/plugins/embeddings/package-lock.json +2826 -0
  90. package/scaffold/.agent/skills/total-recall/plugins/embeddings/package.json +11 -0
  91. package/scaffold/.agent/skills/total-recall/plugins/embeddings/plugin.json +62 -0
  92. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/card.js +297 -0
  93. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/LICENSE +21 -0
  94. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/README.md +43 -0
  95. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/cli.mjs +258 -0
  96. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/package-lock.json +4005 -0
  97. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/package.json +20 -0
  98. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/plugin.json +125 -0
  99. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/ui/DESIGN.md +18 -0
  100. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/ui/card.js +278 -0
  101. package/scaffold/.agent/skills/total-recall/plugins/mesh/README.md +9 -0
  102. package/scaffold/.agent/skills/total-recall/plugins/mesh/cli.mjs +6 -0
  103. package/scaffold/.agent/skills/total-recall/plugins/mesh/package-lock.json +4721 -0
  104. package/scaffold/.agent/skills/total-recall/plugins/mesh/package.json +3 -21
  105. package/scaffold/.agent/skills/total-recall/plugins/mesh/plugin.json +14 -1
  106. package/scaffold/.agent/skills/total-recall/plugins/mesh/src/cli/mesh.mjs +10 -0
  107. package/scaffold/.agent/skills/total-recall/plugins/mesh/src/core/headscale-client.mjs +5 -1
  108. package/scaffold/.agent/skills/total-recall/plugins/mesh/src/core/leader-election.mjs +4 -13
  109. package/scaffold/.agent/skills/total-recall/plugins/mesh/src/core/mesh-access-verify.mjs +22 -0
  110. package/scaffold/.agent/skills/total-recall/plugins/mesh/src/core/mesh-files.mjs +18 -0
  111. package/scaffold/.agent/skills/total-recall/plugins/mesh/src/core/mesh.mjs +2 -0
  112. package/scaffold/.agent/skills/total-recall/plugins/mesh/test-support/memory-root.mjs +14 -0
  113. package/scaffold/.agent/skills/total-recall/plugins/openwiki/LICENSE +21 -0
  114. package/scaffold/.agent/skills/total-recall/plugins/openwiki/README.md +35 -0
  115. package/scaffold/.agent/skills/total-recall/plugins/openwiki/cli.mjs +124 -0
  116. package/scaffold/.agent/skills/total-recall/plugins/openwiki/package-lock.json +4097 -0
  117. package/scaffold/.agent/skills/total-recall/plugins/openwiki/package.json +12 -0
  118. package/scaffold/.agent/skills/total-recall/plugins/openwiki/plugin.json +165 -0
  119. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/ingest.mjs +127 -0
  120. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/DESIGN.md +18 -0
  121. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/card.js +279 -0
  122. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/panel.js +539 -0
  123. package/scaffold/.agent/skills/total-recall/plugins/security/LICENSE +21 -0
  124. package/scaffold/.agent/skills/total-recall/plugins/security/README.md +67 -0
  125. package/scaffold/.agent/skills/total-recall/plugins/security/cli.mjs +932 -0
  126. package/scaffold/.agent/skills/total-recall/plugins/security/package-lock.json +3256 -0
  127. package/scaffold/.agent/skills/total-recall/plugins/security/package.json +25 -0
  128. package/scaffold/.agent/skills/total-recall/plugins/security/plugin.json +297 -0
  129. package/scaffold/.agent/skills/total-recall/plugins/security/scripts/build-ui.mjs +4 -0
  130. package/scaffold/.agent/skills/total-recall/plugins/security/skills/security/SKILL.md +37 -0
  131. package/scaffold/.agent/skills/total-recall/plugins/security/src/android.mjs +21 -0
  132. package/scaffold/.agent/skills/total-recall/plugins/security/src/devices.mjs +94 -0
  133. package/scaffold/.agent/skills/total-recall/plugins/security/src/machines.mjs +164 -0
  134. package/scaffold/.agent/skills/total-recall/plugins/security/src/scanner.mjs +41 -0
  135. package/scaffold/.agent/skills/total-recall/plugins/security/src/windows.mjs +42 -0
  136. package/scaffold/.agent/skills/total-recall/plugins/security/ui/DESIGN.md +18 -0
  137. package/scaffold/.agent/skills/total-recall/plugins/security/ui/card.js +95 -0
  138. package/scaffold/.agent/skills/total-recall/plugins/security/ui/panel.js +98 -0
  139. package/scaffold/.agent/skills/total-recall/references/auth.md +1 -1
  140. package/src/cli/backup.mjs +71 -3
  141. package/src/cli/brief.mjs +33 -9
  142. package/src/cli/command.mjs +2 -7
  143. package/src/cli/config.mjs +1 -0
  144. package/src/cli/connect.mjs +5 -0
  145. package/src/cli/context.mjs +2 -1
  146. package/src/cli/daemon.mjs +36 -1
  147. package/src/cli/doctor.mjs +6 -0
  148. package/src/cli/harness.mjs +3 -0
  149. package/src/cli/help.mjs +26 -0
  150. package/src/cli/init.mjs +4 -4
  151. package/src/cli/memory-entry.mjs +1 -0
  152. package/src/cli/memory-init.mjs +2 -0
  153. package/src/cli/plugin/index.mjs +11 -0
  154. package/src/cli/plugin/install.mjs +2 -1
  155. package/src/cli/rebuild.mjs +3 -1
  156. package/src/cli/startup.mjs +2 -1
  157. package/src/cli/update.mjs +19 -0
  158. package/src/core/automatic-brain-updates.mjs +67 -0
  159. package/src/core/brain-updates.mjs +21 -2
  160. package/src/core/cli-commands.mjs +71 -0
  161. package/src/core/cli-maintenance.mjs +45 -0
  162. package/src/core/cli-quick-reference.mjs +20 -0
  163. package/src/core/cli-semantic-index.mjs +722 -0
  164. package/src/core/context-compiler.mjs +27 -1
  165. package/src/core/crons.mjs +2 -13
  166. package/src/core/daemon-control.mjs +6 -4
  167. package/src/core/daemon-loop.mjs +12 -8
  168. package/src/core/default-plugins.mjs +5 -0
  169. package/src/core/global-brain-updates.mjs +39 -0
  170. package/src/core/mesh-brain-updates.mjs +30 -0
  171. package/src/core/meta-harness.mjs +108 -0
  172. package/src/core/plugin-dependencies.mjs +2 -1
  173. package/src/core/plugin-loader.mjs +2 -1
  174. package/src/core/plugin-runner.mjs +12 -4
  175. package/src/core/plugin-setup.mjs +20 -0
  176. package/src/core/plugin-store.mjs +22 -4
  177. package/src/core/plugin-tasks.mjs +1 -1
  178. package/src/core/project-brain.mjs +2 -0
  179. package/src/core/project-status.mjs +64 -0
  180. package/src/core/required-plugins.mjs +46 -0
  181. package/src/core/scaffold-plugins.mjs +17 -3
  182. package/src/core/source-brain-updates.mjs +47 -0
  183. package/src/core/startup-health.mjs +5 -3
  184. package/src/core/surface.mjs +44 -10
  185. package/src/server/routes/extension.mjs +53 -8
  186. package/templates/onboarding-interview.md +1 -1
  187. package/frontend/dist/assets/index-SOVUlZqm.js +0 -5596
package/README.md CHANGED
@@ -1,71 +1,182 @@
1
- # Total Recall
1
+ # Total Recall — VibeBrain
2
2
 
3
- **Portable personal memory for any IDE** — open source, with canonical SSSS Markdown and disposable search indexes.
3
+ > **The Vibe Coding Brain & Autonomous Software Factory**
4
+ > *Your AI Daily Driver: Memory, Rules, Secrets, and 33 Visual Plugins — Automatically Managed Across All Your Devices.*
4
5
 
5
- Total Recall stores rules, preferences, facts and project knowledge. The portable runtime provides validated memory operations, local retrieval, task context and instruction surfaces. Optional capabilities run through explicitly installed plugins. Initialization creates an empty brain.
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
7
+ [![Zero Cost Embeddings](https://img.shields.io/badge/Embeddings-Zero--Cost%20Ollama-emerald.svg)](#zero-cost-local-intelligence)
8
+ [![Visual Plugins](https://img.shields.io/badge/Visual%20Plugins-33%20Installed-violet.svg)](#installed-plugins--capabilities)
9
+ [![Spec: SSSS 0.9](https://img.shields.io/badge/Spec-SSSS%200.9-amber.svg)](docs/SSSS.md)
6
10
 
7
- ## Memory CLI
11
+ ---
8
12
 
9
- ```sh
10
- npm install total-recall-brain
11
- npx total-recall-memory init --project
12
- npx total-recall-memory remember preference "Prefer clear, short answers." --project
13
- npx total-recall-memory recall "short answers" --local --project
14
- npx total-recall-memory context "Implement a memory change" --action edit,test --project
15
- npx total-recall-memory compile --project
13
+ ## ⚡ Why Total Recall?
14
+
15
+ Modern software development with AI agents requires more than fragmented chat sessions or fragile prompt snippets. Developers need an integrated environment that remembers project rules, safeguards credentials, and scales from local prototype to autonomous multi-node production.
16
+
17
+ Total Recall delivers two synchronized engines in one unified system:
18
+
19
+ 1. **The Personal Daily Driver**: A persistent memory layer, secret vault, and semantic CLI across every editor, terminal, and enrolled device.
20
+ 2. **The Autonomous Software Factory**: A modular scaffolding system that constructs production applications from battle-tested plugin bricks (`total-recall new <app> --with <bricks>`) with deterministic quality gates.
21
+
22
+ ---
23
+
24
+ ## 🚀 Quickstart (Under 60 Seconds)
25
+
26
+ ### 1. Install Total Recall
27
+ ```bash
28
+ npm install -g total-recall-brain
29
+ ```
30
+
31
+ ### 2. Initialize Your Project Brain
32
+ ```bash
33
+ npx total-recall init --project
34
+ ```
35
+
36
+ ### 3. Record Facts, Preferences, and Invariants
37
+ ```bash
38
+ # Store project facts and guidelines
39
+ npx total-recall remember preference "Prefer clear, short answers and functional TypeScript code."
40
+ npx total-recall remember invariant "Databases are disposable projections; never back up raw SQL."
41
+
42
+ # Hybrid vector and keyword recall (zero token cost via local Ollama)
43
+ npx total-recall recall "database backup policy" --local
44
+ ```
45
+
46
+ ### 4. Semantic CLI Discovery
47
+ Query over 415 built-in verbs, plugin operations, and composed commands using natural language:
48
+ ```bash
49
+ # Ask questions in natural language
50
+ npx total-recall help "how do I buy a domain and configure DNS"
51
+ npx total-recall help "check test code quality"
52
+ npx total-recall help "rotate production credentials"
53
+ ```
54
+
55
+ ### 5. Generate Task Rule Capsules
56
+ Before executing tasks, compile verified instructions that fit your model's exact token budget:
57
+ ```bash
58
+ npx total-recall context "Configure production DNS and payment webhooks" --action publish,network
16
59
  ```
17
60
 
18
- The package preserves the `total-recall` executable, dashboard and plugin scaffold during migration. The isolated memory CLI is available as `total-recall-memory`. Use `npx --package total-recall-brain total-recall-memory <command>` without a local installation.
61
+ ---
19
62
 
20
- `context` includes required rules before ranked knowledge. Check `ready: true`; exit 2 means the required rules exceed the selected budget. Increase the explicit budget or curate applicability before continuing.
63
+ ## 🏗️ The Software Factory: Owned Modular Bricks
21
64
 
22
- Project memory lives at `<repo>/.agent/skills/total-recall/`; global memory lives at `<home>/.agent/skills/total-recall/`. `--project` and `--global` select the layer. `AGENT_DIR` explicitly pins all layer operations to one agent root. Canonical memory remains separate between roots.
65
+ Never start an application from empty directories again. Total Recall plugins are **vendorable bricks**: when you scaffold a project, the plugin implementation vendors directly into your repository, giving your team full code ownership.
23
66
 
24
- Local retrieval needs no server or embedding provider. Set `TR_EMBEDDINGS_DISABLED=1` for provider-free operation. Semantic search requires a configured provider. Compilation preserves existing embeddings; mutation commands await local indexing.
67
+ ```bash
68
+ # Scaffold an entire production application with pre-wired capabilities
69
+ npx total-recall new my-saas-app --with auth,domains,stripe,marketing,code-quality
70
+ ```
71
+
72
+ ### Shipped Bricks Include:
73
+ - **`auth`**: Hardware WebAuthn biometric FIDO2 passkeys, OAuth session management, and AES-256 encrypted credential vaults.
74
+ - **`domains`**: Unified registrar purchasing, DNS table synchronization, Mailcow mailboxes, and SPF/DKIM verification.
75
+ - **`stripe`**: Checkout sessions, automated payment intents, webhook signing verification, and refunds.
76
+ - **`marketing`**: SSSS brand vision profiles, fail-closed copy compliance linters, social card auditors, and UTM link attribution.
77
+ - **`code-quality`**: Deterministic test compliance gates, fail-closed linting, and coverage snapshots.
78
+ - **`mesh`**: Tailscale-based encrypted peer-to-peer device mesh, remote execution, and node presence monitoring.
79
+
80
+ ---
81
+
82
+ ## 🧠 Zero-Cost Local Intelligence
25
83
 
26
- Run `total-recall --help` for the current commands. `import` preserves authored rule files and imports validated memory. `lint` validates memory and can validate installed manifests with `--plugins`; feature records require their owning validator.
84
+ Total Recall prioritizes local-first intelligence. While legacy tools impose per-query token fees, Total Recall pairs with local and mesh Ollama instances to deliver fast vector embeddings at zero cost:
27
85
 
28
- ## Optional capabilities
86
+ - **Model**: `nomic-embed-text:latest` (768 dimensions)
87
+ - **Local Endpoint**: `http://127.0.0.1:11434` (falls back to mesh cloud nodes)
88
+ - **Content-Hash Incremental Rebuilds**: Skips unchanged vault nodes during surface compilation
89
+ - **Fail-Closed Fallback**: Seamlessly falls back to local keyword token matching when offline
29
90
 
30
- ```sh
31
- total-recall plugin install /path/to/capability --global
32
- total-recall plugin list
33
- total-recall plugin info capability-id
34
- total-recall capability-command --help
35
- total-recall plugin remove capability-id --global
91
+ ```bash
92
+ # Rebuild surfaces and vector indices
93
+ npx total-recall compile
94
+
95
+ # Inspect vector model coverage and benchmarks
96
+ npx total-recall embeddings status
36
97
  ```
37
98
 
38
- Local directories and Git sources use the same manifest validation, canonical installation records and artifact digest. Installed `cli` and `commands` declarations use an isolated child process with bounded output and timeout. Removal disables dispatch and preserves memory and recorded installation history; reinstalling the same artifact restores its digest.
99
+ ---
100
+
101
+ ## 👥 Personas & Workflows
102
+
103
+ ### 🎨 For Makers
104
+ - **Problem**: Context windows reset constantly, losing instructions and design preferences.
105
+ - **Solution**: Total Recall automatically injects relevant memory, design tokens, and image generation studio tools into any client.
106
+
107
+ ### 🛠️ For Builders
108
+ - **Problem**: Wiring authentication, DNS records, and quality gates from scratch drains engineering momentum.
109
+ - **Solution**: Vendor pre-built, tested plugin bricks with `total-recall new` and maintain deterministic CI gates locally.
39
110
 
40
- Plugins are trusted code with the operator's OS permissions. A child process protects the host from handler exits and output interference; it provides no OS sandbox. Background jobs, services, interfaces, distribution and feature-specific validation belong to the capability owner.
111
+ ### 🏢 For Founders
112
+ - **Problem**: Managing scattered API keys and multi-server fleet deployments creates operational risk.
113
+ - **Solution**: Encrypt all secrets in local AES-256 stores (`total-recall auth secret`) and coordinate multi-node execution over the secure mesh network.
41
114
 
42
- Dashboard plugin interfaces run in scripts-only frames with an opaque origin. They cannot access dashboard DOM/storage or fetch services directly. Self-contained owner modules receive themed variables and a `host.run(subcommand, args)` bridge restricted to manifest-declared commands and server authorization. Native command handlers retain the trust boundary described above. Never embed secret values in generated interface code.
115
+ ### 📈 For Sellers
116
+ - **Problem**: Coordinating direct line telephony, customer messaging, and ticket inventory requires multiple disconnected services.
117
+ - **Solution**: Run integrated phone dialers, SMS pooling, and tiered ticket reservations directly from your terminal.
43
118
 
44
- ## Memory HTTP service
119
+ ---
45
120
 
46
- After installing the package locally:
121
+ ## 🔌 Visual Plugin Ecosystem (33 Installed Plugins)
47
122
 
48
- ```sh
49
- AGENT_DIR=/path/to/agent TR_EMBEDDINGS_DISABLED=1 total-recall-memory init
50
- AGENT_DIR=/path/to/agent HOST=127.0.0.1 PORT=3900 node node_modules/total-recall-brain/src/server/memory-server.mjs
123
+ Total Recall plugins feature bespoke animated interfaces with zero simulated state, touch-first ergonomics, and live operational controls:
124
+
125
+ | Plugin | Namespace | Role |
126
+ | :--- | :--- | :--- |
127
+ | **Auth** | `auth` | Biometric WebAuthn passkeys, OAuth sessions, and AES-256 secrets |
128
+ | **Marketing** | `marketing` | Brand vision, copy compliance linter, SEO auditor, and campaign UTMs |
129
+ | **Domains** | `domains` | Domain purchases, DNS records, Mailcow mailboxes, and SPF/DKIM alignment |
130
+ | **Stripe** | `stripe` | Payment processing, checkout sessions, and webhook signature verification |
131
+ | **Code Quality** | `code-quality` | Fail-closed deterministic code gates and test reports |
132
+ | **Embeddings** | `embeddings` | Local zero-cost embedding model management and benchmarks |
133
+ | **Mesh** | `mesh` | Encrypted Tailscale control server, remote execution, and node presence |
134
+ | **Hermes** | `hermes` | Hermes Agent runtime supervision and messaging gateway |
135
+ | **CLI Agents** | `cli-agents` | Authenticated terminal coding agent orchestration and documentation |
136
+ | **OpenWiki** | `openwiki` | Multi-repository documentation graph and knowledge ingestion |
137
+ | **Phone** | `phone` | Direct telephony dialer, call session control, and inventory |
138
+ | **Text** | `text` | Direct SMS/MMS messaging, number pooling, and message threads |
139
+ | **Tickets** | `tickets` | Tiered ticket types, reservations, and double-entry ledger audits |
140
+ | **Security** | `security` | Machine security scanning, OS hardening, and credential audits |
141
+ | **Decision** | `decision` | Typed SSSS decision sets with confidence rankings and event logging |
142
+ | **Design** | `design` | Design system synthesis, theme tokens, and CSS variable generation |
143
+
144
+ ---
145
+
146
+ ## 💻 Composable CLI Architecture
147
+
148
+ Total Recall eliminates script sprawl through its dynamic composable CLI engine. Compose reusable multi-step workflows with full version history and rollback capabilities:
149
+
150
+ ```bash
151
+ # Run configured repository quality gates
152
+ npx total-recall code-quality-check
153
+
154
+ # Inspect latest gate report
155
+ npx total-recall code-quality-report
51
156
  ```
52
157
 
53
- In the source checkout, `npm run start:memory` selects the memory server. `npm start` preserves the existing dashboard service.
158
+ ---
54
159
 
55
- The service exposes memory, context, instructions, rules, scoped keys and authentication. `/health` reports initialization, node count, runtime and package version. Health requires authentication except direct local access. `/.well-known/total-recall.json` lists available memory endpoints. Configure a scoped credential with `total-recall key --help` or `generate-pat --help` before remote use.
160
+ ## 🛠️ Development & Quality Gates
56
161
 
57
- The `total-recall-brain/memory` export provides `createMemoryApp()`. Existing package and secret-store exports remain available for installed consumers.
162
+ Total Recall source code enforces strict deterministic quality checks:
58
163
 
59
- ## Source and migration
164
+ ```bash
165
+ # Run unit and integration tests
166
+ npm test
60
167
 
61
- The source checkout and this compatible npm release retain existing product implementations during migration, including the dashboard, update command and plugin creation scaffold. The package gate verifies the complete memory file inventory alongside these compatibility surfaces and excludes private brain state. The isolated memory entrypoint does not load the product worker or dashboard. A default memory-only package requires a breaking release and completed capability migration.
168
+ # Verify npm package distribution inventory
169
+ npm run check:package
62
170
 
63
- Versions ahead of the public npm release display **Preview features**. Host updates and older registered projects are reported separately; updating projects never downgrades a preview installation.
171
+ # Verify SSSS specification schema registry lock
172
+ npm run check:ssss-registry
64
173
 
65
- The [prior product README](docs/reference/legacy-product-readme.md) preserves the original documentation. The [active core/plugin project](docs/projects/in-progress/TR_CORE_PLUGIN_SPLIT/TR_CORE_PLUGIN_SPLIT_PROJECT_TRACKER.md) records implementation and verification; its unfinished acceptance items are not release claims.
174
+ # Verify scaffold plugin synchronization
175
+ node scripts/sync-scaffold-plugins.mjs --check
176
+ ```
66
177
 
67
- ## Development
178
+ ---
68
179
 
69
- The source uses Node ESM and Vitest. Run the repository's configured background gates on its sanctioned test host. `npm run check:package` inspects npm's actual file inventory; `npm run check:ssss-registry` verifies the composed registry lock. Clean installed-artifact and native service checks complement the source suite.
180
+ ## 📄 License
70
181
 
71
- MIT license. See [LICENSE](LICENSE).
182
+ MIT License. See [LICENSE](LICENSE) for full details.
@@ -40,76 +40,7 @@ import path from 'node:path';
40
40
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
41
41
  const CLI_DIR = path.join(__dirname, '..', 'src', 'cli');
42
42
 
43
- const COMMANDS = {
44
- app: 'app/index.mjs',
45
- init: 'init.mjs',
46
- setup: 'setup.mjs',
47
- start: 'start.mjs',
48
- startup: 'startup.mjs',
49
- deploy: 'deploy.mjs',
50
- doctor: 'doctor.mjs',
51
- backup: 'backup.mjs',
52
- dream: 'dream.mjs',
53
- lint: 'lint.mjs',
54
- daemon: 'daemon.mjs',
55
- restore: 'restore.mjs',
56
- upgrade: 'upgrade.mjs',
57
- update: 'update.mjs',
58
- friction: 'friction.mjs',
59
- chat: 'chat.mjs',
60
- status: 'status.mjs',
61
- remember: 'remember.mjs',
62
- forget: 'forget.mjs',
63
- edit: 'edit.mjs',
64
- recall: 'recall.mjs',
65
- context: 'context.mjs',
66
- rules: 'rules.mjs',
67
- search: 'recall.mjs',
68
- research: 'research.mjs',
69
- proposals: 'proposals.mjs',
70
- proposal: 'proposals.mjs',
71
- task: 'task.mjs',
72
- share: 'share.mjs',
73
- 'generate-pat': 'generate-pat.mjs',
74
- key: 'key.mjs',
75
- keys: 'key.mjs',
76
- pat: 'key.mjs',
77
- 'hash-password': 'hash-password.mjs',
78
- 'reset-password': 'reset-password.mjs',
79
- compile: 'rebuild.mjs',
80
- rebuild: 'rebuild.mjs',
81
- snapshot: 'snapshot.mjs',
82
- migrate: 'migrate.mjs',
83
- backfill: 'backfill.mjs',
84
- ingest: 'ingest.mjs',
85
- import: 'import-rules.mjs',
86
- connect: 'connect.mjs',
87
- sync: 'sync.mjs',
88
- relay: 'relay.mjs',
89
- uninstall: 'uninstall.mjs',
90
- map: 'map.mjs',
91
- brain: 'brain.mjs',
92
- config: 'config.mjs',
93
- skill: 'skill.mjs',
94
- 'project-id': 'project-id.mjs',
95
- api: 'api.mjs',
96
- brief: 'brief.mjs',
97
- group: 'group.mjs',
98
- groups: 'group.mjs',
99
- help: 'help.mjs',
100
- collab: 'collab.mjs',
101
- command: 'command.mjs',
102
- export: 'export.mjs',
103
- harness: 'harness.mjs',
104
- watch: 'rebuild.mjs',
105
- agent: 'agent.mjs',
106
- agents: 'agent.mjs',
107
- new: 'new.mjs',
108
- plugin: 'plugin/index.mjs',
109
- plugins: 'plugin/index.mjs',
110
- scaffold: 'plugin/scaffold-cmd.mjs',
111
- 'scaffold-plugin': 'plugin/scaffold-cmd.mjs',
112
- };
43
+ import { CLI_COMMANDS as COMMANDS } from '../src/core/cli-commands.mjs';
113
44
  async function printHelp() {
114
45
  let pluginsSection = '';
115
46
  try {
@@ -135,6 +66,8 @@ async function printHelp() {
135
66
  connect <client> Wire IDE surface (Cursor, Claude, Codex, Grok, Replit, Lovable)
136
67
  remember / forget / edit Write-path memory (SSSS vault)
137
68
  recall Read-path hybrid search
69
+ context "<task>" Required-rule capsule to read before acting (require ready:true)
70
+ auth secret <cmd> Credentials (the only secrets path): list|get|set|rotate|remote deploy|diff-env|export-env
138
71
  compile Rebuild instruction surfaces
139
72
  dream Memory consolidation cycle
140
73
  proposals <cmd> Review / apply optimizer proposals (list|apply|revert)
@@ -163,17 +96,23 @@ ${pluginsSection}
163
96
  npx total-recall remember fact "The API uses port 3000."
164
97
  npx total-recall dream
165
98
  npx total-recall skill track .
166
- npx total-recall secret list
99
+ npx total-recall auth secret list
167
100
 
168
101
  Options:
169
102
  --help, -h Show this help
170
103
  --version, -v Show version
171
104
  `);
105
+ console.log(` Complete built-in command list:\n ${Object.keys(COMMANDS).join(', ')}\n`);
172
106
  }
173
107
 
174
108
  async function main() {
175
109
  const args = process.argv.slice(2);
176
110
  const command = args[0];
111
+ // These names must not reappear through generic API or composed routing.
112
+ if (command === 'secret' || command === 'secrets') {
113
+ console.error('Credential commands belong to the auth plugin. Use total-recall auth secret --help.');
114
+ process.exit(1);
115
+ }
177
116
 
178
117
  if (!command || command === '--help' || command === '-h') {
179
118
  await printHelp();
@@ -201,15 +140,16 @@ async function main() {
201
140
  const { discoverPlugins } = await import('../src/core/plugin-loader.mjs');
202
141
  const plugins = discoverPlugins(process.cwd());
203
142
  for (const p of plugins) {
204
- if (p.valid && (p.manifest.cli?.command === command || (p.id === 'auth' && (command === 'secret' || command === 'secrets')))) {
143
+ if (p.valid && p.manifest.cli?.command === command) {
205
144
  const handlerRel = p.manifest.cli.handler;
206
145
  if (handlerRel) {
207
146
  const { runPluginCommand } = await import('../src/core/plugin-runner.mjs');
208
- const pluginArgs = (command === 'secret' || command === 'secrets')
209
- ? ['secret', ...args.slice(1)]
210
- : args.slice(1);
147
+ const pluginArgs = args.slice(1);
211
148
  const result = await runPluginCommand(p, { args: pluginArgs, stdin: 'inherit' });
212
- if (result.output) process.stdout.write(result.output);
149
+ if (result.stdout !== undefined) {
150
+ if(result.stdout)process.stdout.write(result.stdout);
151
+ if(result.stderr)process.stderr.write(result.stderr);
152
+ }else if(result.output)process.stdout.write(result.output);
213
153
  process.exit(result.ok ? 0 : (result.exitCode || 1));
214
154
  }
215
155
  }
@@ -376,18 +376,18 @@ Issue labels and grant scoped Bearer Personal Access Tokens (PATs).
376
376
  Manage API keys and credentials (stored in `secrets.enc`, not in the memory vault).
377
377
  - **Usage**:
378
378
  ```bash
379
- npx total-recall secret set <key> <value> [options]
380
- npx total-recall secret generate <key> [--bytes 32] [--format hex|base64url]
381
- npx total-recall secret get <key>
382
- npx total-recall secret list
383
- npx total-recall secret rotate <key> <value>
384
- npx total-recall secret delete <key>
379
+ npx total-recall auth secret set <key> <value> [options]
380
+ npx total-recall auth secret generate <key> [--bytes 32] [--format hex|base64url]
381
+ npx total-recall auth secret get <key>
382
+ npx total-recall auth secret list
383
+ npx total-recall auth secret rotate <key> <value>
384
+ npx total-recall auth secret delete <key>
385
385
 
386
386
  # Executed rotation (3.22.0+)
387
- npx total-recall secret rotation-status [--json]
388
- npx total-recall secret rotate-auto <key> [--export-env]
389
- npx total-recall secret rotate-browser <key> [--headless] [--print-only]
390
- npx total-recall secret browser-logout
387
+ npx total-recall auth secret rotation-status [--json]
388
+ npx total-recall auth secret rotate-auto <key> [--export-env]
389
+ npx total-recall auth secret rotate-browser <key> [--headless] [--print-only]
390
+ npx total-recall auth secret browser-logout
391
391
  ```
392
392
  - **Options for set**:
393
393
  - `--provider <name>`: E.g., openai, anthropic.
@@ -3,7 +3,7 @@
3
3
  // badge, and capture. The side panel and content script talk to the brain
4
4
  // through here or through BrainClient directly.
5
5
 
6
- importScripts('lib/brain-client.js', 'lib/ui-helpers.js');
6
+ importScripts('config.js', 'lib/brain-client.js', 'lib/ui-helpers.js');
7
7
 
8
8
  const Brain = self.BrainClient;
9
9
  const UI = self.TRUi;
@@ -36,7 +36,11 @@ chrome.runtime.onInstalled.addListener(async (details) => {
36
36
  for (const menu of menus) {
37
37
  chrome.contextMenus.create({ ...menu, documentUrlPatterns: ['http://*/*', 'https://*/*'] });
38
38
  }
39
- if (details.reason === 'install') chrome.runtime.openOptionsPage();
39
+ // If already pre-configured with a token, do not interrupt with the options page.
40
+ const config = await Brain.getConfig();
41
+ if (details.reason === 'install' && !config.pat) {
42
+ chrome.runtime.openOptionsPage();
43
+ }
40
44
  });
41
45
 
42
46
  // ---------------------------------------------------------------------------
@@ -0,0 +1,8 @@
1
+ // Total Recall extension configuration
2
+ // When downloaded from the Total Recall dashboard, this file is pre-populated
3
+ // with your brain's address and an automatically generated access token.
4
+ self.TOTAL_RECALL_CONFIG = self.TOTAL_RECALL_CONFIG || {
5
+ brainUrl: 'http://127.0.0.1:3000',
6
+ pat: '',
7
+ activeBrainId: 'global'
8
+ };
@@ -28,11 +28,36 @@
28
28
  }
29
29
 
30
30
  async function getConfig() {
31
+ const pre = (typeof self !== 'undefined' && self.TOTAL_RECALL_CONFIG) || {};
31
32
  const [local, sync] = await Promise.all([
32
- chrome.storage.local.get(['brainUrl', 'pat']),
33
+ chrome.storage.local.get(['brainUrl', 'pat', 'activeBrainId']),
33
34
  chrome.storage.sync.get(['brainUrl', 'pat', 'activeBrainId']),
34
35
  ]);
35
36
 
37
+ let pat = local.pat || sync.pat || pre.pat || '';
38
+ let brainUrl = normalizeUrl(local.brainUrl || sync.brainUrl || pre.brainUrl || DEFAULT_BRAIN_URL);
39
+ let activeBrainId = local.activeBrainId || sync.activeBrainId || pre.activeBrainId || 'global';
40
+
41
+ // If local storage is empty, attempt to read bundled config.json fallback
42
+ if (!pat && typeof chrome !== 'undefined' && chrome.runtime?.getURL) {
43
+ try {
44
+ const res = await fetch(chrome.runtime.getURL('config.json'));
45
+ if (res.ok) {
46
+ const json = await res.json();
47
+ if (json && json.pat) {
48
+ pat = json.pat;
49
+ if (json.brainUrl) brainUrl = normalizeUrl(json.brainUrl);
50
+ if (json.activeBrainId) activeBrainId = json.activeBrainId;
51
+ }
52
+ }
53
+ } catch { /* config.json is optional */ }
54
+ }
55
+
56
+ // Automatically initialize local storage with pre-configured settings
57
+ if (!local.pat && pat) {
58
+ await chrome.storage.local.set({ pat, brainUrl, activeBrainId });
59
+ }
60
+
36
61
  // PATs belong in extension-local storage only; migrate any legacy synced copy.
37
62
  if (sync.pat && !local.pat) {
38
63
  await chrome.storage.local.set({ pat: sync.pat });
@@ -41,9 +66,9 @@
41
66
  if (sync.pat) await chrome.storage.sync.remove('pat');
42
67
 
43
68
  return {
44
- brainUrl: normalizeUrl(local.brainUrl || sync.brainUrl),
45
- pat: local.pat || '',
46
- activeBrainId: sync.activeBrainId || 'global',
69
+ brainUrl,
70
+ pat,
71
+ activeBrainId,
47
72
  };
48
73
  }
49
74
 
@@ -114,6 +114,7 @@
114
114
  <footer class="foot" id="foot"></footer>
115
115
  </div>
116
116
 
117
+ <script src="../config.js"></script>
117
118
  <script src="../lib/brain-client.js"></script>
118
119
  <script src="../lib/ui-helpers.js"></script>
119
120
  <script src="options.js"></script>
@@ -236,6 +236,7 @@
236
236
  <div class="toast" id="toast" role="status" aria-live="polite" hidden></div>
237
237
  </div>
238
238
 
239
+ <script src="../config.js"></script>
239
240
  <script src="../lib/brain-client.js"></script>
240
241
  <script src="../lib/ui-helpers.js"></script>
241
242
  <script src="sidepanel.js"></script>