total-recall-brain 3.44.0 → 3.45.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 (212) hide show
  1. package/bin/total-recall.mjs +6 -4
  2. package/docs/ARCHITECTURE.md +10 -7
  3. package/docs/reference/cli-reference.md +13 -8
  4. package/frontend/dist/assets/index-DACh1dhx.js +5613 -0
  5. package/frontend/dist/index.html +1 -1
  6. package/frontend/src/App.tsx +2 -2
  7. package/frontend/src/pages/PluginsPage.tsx +1 -1
  8. package/package.json +1 -1
  9. package/scaffold/.agent/skills/total-recall/plugins/auth/package-lock.json +7 -7
  10. package/scaffold/.agent/skills/total-recall/plugins/auth/package.json +1 -1
  11. package/scaffold/.agent/skills/total-recall/plugins/auth/plugin.json +1 -1
  12. package/scaffold/.agent/skills/total-recall/plugins/auth/src/cli-secret.mjs +20 -1
  13. package/scaffold/.agent/skills/total-recall/plugins/auth/src/secrets-store.mjs +12 -1
  14. package/scaffold/.agent/skills/total-recall/plugins/automations/BRICK.md +7 -0
  15. package/scaffold/.agent/skills/total-recall/plugins/automations/LICENSE +21 -0
  16. package/scaffold/.agent/skills/total-recall/plugins/automations/README.md +66 -0
  17. package/scaffold/.agent/skills/total-recall/plugins/automations/adapters.mjs +231 -0
  18. package/scaffold/.agent/skills/total-recall/plugins/automations/capability/index.mjs +16 -0
  19. package/scaffold/.agent/skills/total-recall/plugins/automations/cli.mjs +121 -0
  20. package/{src/core/plugin-cron.mjs → scaffold/.agent/skills/total-recall/plugins/automations/cron.mjs} +1 -3
  21. package/scaffold/.agent/skills/total-recall/plugins/automations/inventory.mjs +88 -0
  22. package/scaffold/.agent/skills/total-recall/plugins/automations/package-lock.json +7661 -0
  23. package/scaffold/.agent/skills/total-recall/plugins/automations/package.json +35 -0
  24. package/scaffold/.agent/skills/total-recall/plugins/automations/plugin.json +167 -0
  25. package/scaffold/.agent/skills/total-recall/plugins/automations/scheduler.mjs +246 -0
  26. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/DESIGN.md +42 -0
  27. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/automations.js +2 -0
  28. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/card.js +273 -0
  29. package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/run-core.mjs +1 -1
  30. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/check.mjs +57 -5
  31. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/report-data.mjs +40 -14
  32. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/report.mjs +15 -40
  33. package/scaffold/.agent/skills/total-recall/plugins/code-quality/package-lock.json +7 -7
  34. package/scaffold/.agent/skills/total-recall/plugins/code-quality/package.json +1 -1
  35. package/scaffold/.agent/skills/total-recall/plugins/code-quality/plugin.json +1 -1
  36. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package-lock.json +7 -7
  37. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package.json +1 -1
  38. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/plugin.json +1 -1
  39. package/scaffold/.agent/skills/total-recall/plugins/embeddings/package-lock.json +7 -7
  40. package/scaffold/.agent/skills/total-recall/plugins/embeddings/package.json +1 -1
  41. package/scaffold/.agent/skills/total-recall/plugins/embeddings/plugin.json +1 -1
  42. package/scaffold/.agent/skills/total-recall/plugins/git/README.md +112 -0
  43. package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/cli.mjs +135 -23
  44. package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/package-lock.json +7 -7
  45. package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/package.json +2 -1
  46. package/scaffold/.agent/skills/total-recall/plugins/git/plugin.json +161 -0
  47. package/scaffold/.agent/skills/total-recall/plugins/git/src/lib/context.mjs +94 -0
  48. package/scaffold/.agent/skills/total-recall/plugins/git/src/lib/phase3-spec-support.mjs +50 -0
  49. package/scaffold/.agent/skills/total-recall/plugins/git/src/lib/runtime.mjs +40 -0
  50. package/scaffold/.agent/skills/total-recall/plugins/git/src/lib/spec-support.mjs +51 -0
  51. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/_support.mjs +195 -0
  52. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/auth.mjs +201 -0
  53. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/bisect.mjs +40 -0
  54. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/cli-meta.mjs +159 -0
  55. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/commit-memory.mjs +30 -0
  56. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/commit.mjs +46 -0
  57. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/fleet.mjs +156 -0
  58. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/force-push.mjs +58 -0
  59. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/group.mjs +119 -0
  60. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/handoff.mjs +59 -0
  61. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/message.mjs +22 -0
  62. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/resolve.mjs +60 -0
  63. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/rules.mjs +81 -0
  64. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/secret-firewall.mjs +66 -0
  65. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/undo.mjs +132 -0
  66. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/why.mjs +16 -0
  67. package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/ui/card.js +2 -2
  68. package/scaffold/.agent/skills/total-recall/plugins/mesh/package-lock.json +7 -7
  69. package/scaffold/.agent/skills/total-recall/plugins/mesh/package.json +1 -1
  70. package/scaffold/.agent/skills/total-recall/plugins/mesh/plugin.json +1 -1
  71. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/README.md +25 -9
  72. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/capability/BRICK.md +1 -1
  73. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/capability/index.mjs +18 -6
  74. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/cli.mjs +124 -24
  75. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/package-lock.json +7 -7
  76. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/package.json +2 -2
  77. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/plugin.json +147 -14
  78. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/skills/meta-harness/SKILL.md +17 -3
  79. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/adoption.mjs +2 -2
  80. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/alerts.mjs +3 -3
  81. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/cascade.mjs +92 -18
  82. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/control.mjs +145 -0
  83. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/coordinator.mjs +42 -21
  84. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/dispatch-request.mjs +4 -2
  85. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/dispatch.mjs +33 -9
  86. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/documentation.mjs +55 -11
  87. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/executor.mjs +26 -4
  88. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/hermes.mjs +29 -1
  89. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/index.mjs +1 -1
  90. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/included-usage.mjs +1 -1
  91. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/jobs.mjs +84 -0
  92. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/learner.mjs +3 -12
  93. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/maintenance.mjs +17 -0
  94. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/mcp-server.mjs +228 -0
  95. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/process-manager.mjs +25 -2
  96. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/reasoning.mjs +1 -1
  97. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/remote-operation.mjs +5 -1
  98. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/review.mjs +34 -3
  99. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/reviews.mjs +25 -0
  100. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/router.mjs +1 -1
  101. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/claude.mjs +319 -0
  102. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/codex.mjs +387 -0
  103. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/result.mjs +67 -0
  104. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/resume.mjs +373 -0
  105. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/run.mjs +223 -0
  106. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session-jobs.mjs +72 -0
  107. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/setup.mjs +6 -3
  108. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/termination.mjs +16 -12
  109. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/threads.mjs +32 -1
  110. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/usage-queue.mjs +1 -1
  111. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/verify-ssss.mjs +3 -3
  112. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/worker.mjs +285 -40
  113. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/worktree.mjs +76 -9
  114. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/DESIGN.md +5 -5
  115. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/card.js +3 -3
  116. package/scaffold/.agent/skills/total-recall/plugins/openwiki/cli.mjs +47 -18
  117. package/scaffold/.agent/skills/total-recall/plugins/openwiki/package-lock.json +7 -7
  118. package/scaffold/.agent/skills/total-recall/plugins/openwiki/package.json +1 -1
  119. package/scaffold/.agent/skills/total-recall/plugins/openwiki/plugin.json +1 -1
  120. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/refresh-diagnostics.mjs +44 -0
  121. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/refresh.mjs +120 -113
  122. package/scaffold/.agent/skills/total-recall/plugins/security/package-lock.json +7 -7
  123. package/scaffold/.agent/skills/total-recall/plugins/security/package.json +1 -1
  124. package/scaffold/.agent/skills/total-recall/plugins/security/plugin.json +1 -1
  125. package/scaffold/.agent/skills/total-recall/references/operations.md +1 -1
  126. package/src/cli/agent.mjs +1 -1
  127. package/src/cli/command.mjs +41 -2
  128. package/src/cli/dream.mjs +93 -69
  129. package/src/cli/harness.mjs +4 -4
  130. package/src/cli/help.mjs +1 -1
  131. package/src/cli/init.mjs +0 -25
  132. package/src/cli/lessons.mjs +51 -0
  133. package/src/cli/memory-plugin.mjs +1 -1
  134. package/src/cli/plugin/copies.mjs +64 -14
  135. package/src/cli/plugin/create.mjs +6 -7
  136. package/src/cli/plugin/index.mjs +11 -7
  137. package/src/cli/plugin/install.mjs +10 -15
  138. package/src/cli/plugin/remove.mjs +1 -1
  139. package/src/cli/plugin/search.mjs +2 -2
  140. package/src/cli/preflight.mjs +19 -6
  141. package/src/cli/proposals.mjs +1 -1
  142. package/src/cli/recall.mjs +66 -23
  143. package/src/cli/remember.mjs +3 -14
  144. package/src/cli/server.mjs +18 -0
  145. package/src/cli/startup.mjs +1 -0
  146. package/src/cli/task.mjs +9 -2
  147. package/src/cli/update.mjs +6 -2
  148. package/src/core/access-ledger.mjs +78 -0
  149. package/src/core/agent-manager.mjs +2 -2
  150. package/src/core/brain-locate.mjs +15 -0
  151. package/src/core/brain-updates.mjs +31 -11
  152. package/src/core/claude-hooks.mjs +3 -1
  153. package/src/core/cleanup-task.mjs +15 -0
  154. package/src/core/cli-commands.mjs +2 -0
  155. package/src/core/cli-maintenance.mjs +4 -1
  156. package/src/core/cli-semantic-index.mjs +23 -3
  157. package/src/core/context-compiler.mjs +20 -0
  158. package/src/core/daemon-loop.mjs +39 -62
  159. package/src/core/default-plugins.mjs +1 -1
  160. package/src/core/dream.mjs +33 -105
  161. package/src/core/ensure-dependencies.mjs +148 -0
  162. package/src/core/fast-recall.mjs +2 -2
  163. package/src/core/field-evaluation.mjs +23 -0
  164. package/src/core/gate-mode.mjs +1 -1
  165. package/src/core/harness-hooks.mjs +14 -2
  166. package/src/core/lesson-hooks.mjs +74 -0
  167. package/src/core/lesson-memory.mjs +24 -0
  168. package/src/core/lesson-sessions.mjs +52 -0
  169. package/src/core/lessons.mjs +96 -0
  170. package/src/core/meta-harness.mjs +2 -2
  171. package/src/core/optimizer.mjs +66 -165
  172. package/src/core/plugin-contracts/card.mjs +3 -0
  173. package/src/core/plugin-loader.mjs +12 -3
  174. package/src/core/plugin-runtime.mjs +40 -1
  175. package/src/core/plugin-store.mjs +35 -23
  176. package/src/core/post-mortem.mjs +52 -36
  177. package/src/core/preflight-gate.mjs +23 -2
  178. package/src/core/proposal-applier.mjs +31 -2
  179. package/src/core/repo-sync.mjs +4 -6
  180. package/src/core/required-plugins.mjs +26 -4
  181. package/src/core/rule-length.mjs +23 -0
  182. package/src/core/runtime.mjs +1 -1
  183. package/src/core/scheduler.mjs +35 -43
  184. package/src/core/schema.mjs +1 -2
  185. package/src/core/search.mjs +4 -3
  186. package/src/core/server-service.mjs +148 -0
  187. package/src/core/session-watcher.mjs +19 -1
  188. package/src/core/skill-gap.mjs +16 -0
  189. package/src/core/ssss-kernel-bridge.mjs +32 -4
  190. package/src/core/startup-health.mjs +6 -1
  191. package/src/core/surface.mjs +65 -54
  192. package/src/core/task-executors.mjs +54 -106
  193. package/src/core/validated-write.mjs +1 -0
  194. package/src/core/vector-field.mjs +134 -192
  195. package/src/server/invoke-core-child.mjs +24 -0
  196. package/src/server/invoke-core-operations.mjs +102 -0
  197. package/src/server/route-manifest.json +0 -56
  198. package/src/server/routes/brains.mjs +0 -18
  199. package/src/server/routes/context.mjs +0 -41
  200. package/src/server/routes/invoke.mjs +26 -1
  201. package/src/server/routes/ssss.mjs +0 -169
  202. package/src/server/routes/system.mjs +0 -15
  203. package/src/server/routes/tasks.mjs +0 -26
  204. package/src/server/routes/vault.mjs +2 -23
  205. package/frontend/dist/assets/index-DD4qONvH.js +0 -5607
  206. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/README.md +0 -53
  207. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/plugin.json +0 -129
  208. package/src/core/append-log.mjs +0 -131
  209. package/src/core/plugin-tasks.mjs +0 -173
  210. package/templates/onboarding-interview.md +0 -82
  211. /package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/LICENSE +0 -0
  212. /package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/ui/DESIGN.md +0 -0
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "tr-plugin-code-quality",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "tr-plugin-code-quality",
9
- "version": "0.2.6",
9
+ "version": "0.2.7",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@gregiteen/ssss-cli": "0.14.5"
13
13
  },
14
14
  "devDependencies": {
15
- "total-recall-brain": "3.43.3"
15
+ "total-recall-brain": "3.44.0"
16
16
  }
17
17
  },
18
18
  "node_modules/@alcalzone/ansi-tokenize": {
@@ -5543,9 +5543,9 @@
5543
5543
  }
5544
5544
  },
5545
5545
  "node_modules/total-recall-brain": {
5546
- "version": "3.43.3",
5547
- "resolved": "https://registry.npmjs.org/total-recall-brain/-/total-recall-brain-3.43.3.tgz",
5548
- "integrity": "sha512-yjfPN/BQxEEa+iodyFXQov/6fRt1pZg/7RcmgsbpALwBt6Ki3JJjT3tzArBC7NxHQmXgGYyKnCYId6xe/W2rPg==",
5546
+ "version": "3.44.0",
5547
+ "resolved": "https://registry.npmjs.org/total-recall-brain/-/total-recall-brain-3.44.0.tgz",
5548
+ "integrity": "sha512-VNPaIO9zsSwoxAsJ5ByIQBP9zPpLq4RiQO7Vrex4rBOHFQJT50P7utcZiLMSZTyZJU4C/m5uB8qTCSBMp6+l6Q==",
5549
5549
  "dev": true,
5550
5550
  "license": "MIT",
5551
5551
  "workspaces": [
@@ -5553,7 +5553,7 @@
5553
5553
  ],
5554
5554
  "dependencies": {
5555
5555
  "@simplewebauthn/server": "^13.3.2",
5556
- "@ssss/cli": "npm:@gregiteen/ssss-cli@0.14.4",
5556
+ "@ssss/cli": "npm:@gregiteen/ssss-cli@0.14.5",
5557
5557
  "bcrypt": "^6.0.0",
5558
5558
  "better-sqlite3": "^12.11.1",
5559
5559
  "cookie-parser": "^1.4.7",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tr-plugin-code-quality",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "type": "module",
5
5
  "description": "Total Recall code-quality plugin: shared gate runner core and per-repo gate configuration.",
6
6
  "license": "MIT",
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://github.com/gregiteen/total-recall/blob/main/metadata.plugin.schema.json",
3
3
  "id": "code-quality",
4
4
  "name": "Code Quality Gates",
5
- "version": "0.2.6",
5
+ "version": "0.2.7",
6
6
  "description": "Fail-closed deterministic code-quality gates, lint rules, and test compliance reporting.",
7
7
  "author": "Total Recall contributors",
8
8
  "license": "MIT",
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "tr-plugin-composable-cli",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "tr-plugin-composable-cli",
9
- "version": "0.2.5",
9
+ "version": "0.2.6",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@gregiteen/ssss-cli": "0.14.5"
13
13
  },
14
14
  "devDependencies": {
15
- "total-recall-brain": "3.43.3"
15
+ "total-recall-brain": "3.44.0"
16
16
  }
17
17
  },
18
18
  "node_modules/@alcalzone/ansi-tokenize": {
@@ -5543,9 +5543,9 @@
5543
5543
  }
5544
5544
  },
5545
5545
  "node_modules/total-recall-brain": {
5546
- "version": "3.43.3",
5547
- "resolved": "https://registry.npmjs.org/total-recall-brain/-/total-recall-brain-3.43.3.tgz",
5548
- "integrity": "sha512-yjfPN/BQxEEa+iodyFXQov/6fRt1pZg/7RcmgsbpALwBt6Ki3JJjT3tzArBC7NxHQmXgGYyKnCYId6xe/W2rPg==",
5546
+ "version": "3.44.0",
5547
+ "resolved": "https://registry.npmjs.org/total-recall-brain/-/total-recall-brain-3.44.0.tgz",
5548
+ "integrity": "sha512-VNPaIO9zsSwoxAsJ5ByIQBP9zPpLq4RiQO7Vrex4rBOHFQJT50P7utcZiLMSZTyZJU4C/m5uB8qTCSBMp6+l6Q==",
5549
5549
  "dev": true,
5550
5550
  "license": "MIT",
5551
5551
  "workspaces": [
@@ -5553,7 +5553,7 @@
5553
5553
  ],
5554
5554
  "dependencies": {
5555
5555
  "@simplewebauthn/server": "^13.3.2",
5556
- "@ssss/cli": "npm:@gregiteen/ssss-cli@0.14.4",
5556
+ "@ssss/cli": "npm:@gregiteen/ssss-cli@0.14.5",
5557
5557
  "bcrypt": "^6.0.0",
5558
5558
  "better-sqlite3": "^12.11.1",
5559
5559
  "cookie-parser": "^1.4.7",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tr-plugin-composable-cli",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "type": "module",
5
5
  "description": "Total Recall composable CLI plugin: create, compose, register, test and safely run custom verbs; every command listed in the instruction surfaces.",
6
6
  "scripts": {
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://github.com/gregiteen/total-recall/blob/main/metadata.plugin.schema.json",
3
3
  "id": "composable-cli",
4
4
  "name": "Composable CLI",
5
- "version": "0.2.5",
5
+ "version": "0.2.6",
6
6
  "description": "Dynamic agent command composition engine with pipeline registration, versioning, and execution.",
7
7
  "author": "Total Recall contributors",
8
8
  "license": "MIT",
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "tr-plugin-embeddings",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "tr-plugin-embeddings",
9
- "version": "0.1.3",
9
+ "version": "0.1.4",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@gregiteen/ssss-cli": "0.14.5"
13
13
  },
14
14
  "devDependencies": {
15
- "total-recall-brain": "3.43.3"
15
+ "total-recall-brain": "3.44.0"
16
16
  }
17
17
  },
18
18
  "node_modules/@alcalzone/ansi-tokenize": {
@@ -5539,9 +5539,9 @@
5539
5539
  }
5540
5540
  },
5541
5541
  "node_modules/total-recall-brain": {
5542
- "version": "3.43.3",
5543
- "resolved": "https://registry.npmjs.org/total-recall-brain/-/total-recall-brain-3.43.3.tgz",
5544
- "integrity": "sha512-yjfPN/BQxEEa+iodyFXQov/6fRt1pZg/7RcmgsbpALwBt6Ki3JJjT3tzArBC7NxHQmXgGYyKnCYId6xe/W2rPg==",
5542
+ "version": "3.44.0",
5543
+ "resolved": "https://registry.npmjs.org/total-recall-brain/-/total-recall-brain-3.44.0.tgz",
5544
+ "integrity": "sha512-VNPaIO9zsSwoxAsJ5ByIQBP9zPpLq4RiQO7Vrex4rBOHFQJT50P7utcZiLMSZTyZJU4C/m5uB8qTCSBMp6+l6Q==",
5545
5545
  "dev": true,
5546
5546
  "license": "MIT",
5547
5547
  "workspaces": [
@@ -5549,7 +5549,7 @@
5549
5549
  ],
5550
5550
  "dependencies": {
5551
5551
  "@simplewebauthn/server": "^13.3.2",
5552
- "@ssss/cli": "npm:@gregiteen/ssss-cli@0.14.4",
5552
+ "@ssss/cli": "npm:@gregiteen/ssss-cli@0.14.5",
5553
5553
  "bcrypt": "^6.0.0",
5554
5554
  "better-sqlite3": "^12.11.1",
5555
5555
  "cookie-parser": "^1.4.7",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tr-plugin-embeddings",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "description": "Local embedding model management: provider/model status, benchmark, index build and coverage",
6
6
  "scripts": {
@@ -2,7 +2,7 @@
2
2
  "$schema": "https://github.com/gregiteen/total-recall/blob/main/metadata.plugin.schema.json",
3
3
  "id": "embeddings",
4
4
  "name": "Embeddings",
5
- "version": "0.1.3",
5
+ "version": "0.1.4",
6
6
  "description": "Local embedding model management: provider/model status, benchmark, index build and coverage",
7
7
  "license": "MIT",
8
8
  "branding": {
@@ -0,0 +1,112 @@
1
+ # Git
2
+
3
+ The whole git CLI through Total Recall. Every git command works: anything that is not a plugin
4
+ operation runs git itself, with your arguments, git's hooks, output and exit status. On top of git,
5
+ the plugin signs git in from the auth store, checks commits and pushes, takes a snapshot before
6
+ destructive commands, and records the intent behind each change.
7
+
8
+ ```bash
9
+ total-recall git status
10
+ total-recall git pull --rebase
11
+ total-recall git help rebase # git's own help for a command
12
+ total-recall git --help # the plugin's operations
13
+ total-recall git commit --help # one plugin operation's help (-h is git's usage)
14
+ ```
15
+
16
+ ## Install
17
+
18
+ ```bash
19
+ npx total-recall plugin install git
20
+ ```
21
+
22
+ ## Commit and push
23
+
24
+ - `commit [git commit arguments]` refuses a missing or machine-derived identity, unresolved
25
+ conflicts and a detached HEAD, then runs git's own `commit` with your arguments unchanged.
26
+ - Before `commit` and `push`, guards run:
27
+ - **Secret firewall:** the staged content and outgoing commits are compared with fingerprints of
28
+ every value in the auth store. A match refuses the command and names the key, never the value.
29
+ - **Rules:** workflow files (`.github/workflows`), internal project records in public
30
+ repositories, and machine-derived identities are refused.
31
+ - **Force-push guard:** `--force` becomes `--force-with-lease`. Deleting a remote branch needs
32
+ `--reason <text>`, which is recorded.
33
+
34
+ ## Undo
35
+
36
+ Before a destructive command (`reset --hard`, `checkout -- <paths>`, `restore`, `clean`,
37
+ `branch -D`, `stash drop|clear`, `rebase`, `filter-branch`, `update-ref -d`) the plugin records a
38
+ snapshot of refs, the index and files.
39
+
40
+ ```bash
41
+ total-recall git undo --list
42
+ total-recall git undo <event>
43
+ ```
44
+
45
+ ## Sign-in
46
+
47
+ ```bash
48
+ total-recall git auth status # live check against the remote; no secret is shown
49
+ total-recall git auth map <host> <KEY>
50
+ total-recall git auth setup # helper entries for this machine
51
+ ```
52
+
53
+ git asks the auth store through `credential-helper`; the credential goes only to git.
54
+
55
+ ## The git CLI on every node
56
+
57
+ ```bash
58
+ total-recall git cli --json # version, path, install source, upstream, release notes
59
+ total-recall git cli --all-nodes
60
+ total-recall git cli update # update git through its installer
61
+ ```
62
+
63
+ The task `cli update --scheduled` runs daily on every node.
64
+
65
+ ## Across the mesh
66
+
67
+ ```bash
68
+ total-recall git fleet --all-nodes # dirty, unpushed, behind, diverged, stale stashes, abandoned worktrees
69
+ total-recall git where <commit> # machines and checkouts that contain a commit
70
+ ```
71
+
72
+ ## Intent
73
+
74
+ ```bash
75
+ total-recall git why <file>:<line> # blame plus the session, tracker item and rules recorded at commit time
76
+ total-recall git message # draft a commit message from the diff, tracker and action log
77
+ total-recall git group [--apply] # split a dirty tree into commits by agent session
78
+ total-recall git resolve [--apply] # propose conflict resolutions from both sides' intent
79
+ total-recall git bisect-agent <good> <bad> # first bad commit, with the quality gate as the test
80
+ total-recall git handoff <branch> [--out <file>] # branch, tracker and memory as one SSSS bundle
81
+ ```
82
+
83
+ Successful commits are recorded with their session and tracker items. A commit message that names
84
+ a decision is saved to memory.
85
+
86
+ ## Repository state
87
+
88
+ ```bash
89
+ total-recall git audit [--json] # branch, worktree, upstream and stash state
90
+ total-recall git identity [--json] # commit identity and the identities history publishes
91
+ total-recall git diff --json [--patch] [--cached] [--base <ref>]
92
+ ```
93
+
94
+ An unknown upstream is never reported as zero unpushed commits.
95
+
96
+ ## Using this from an agent
97
+
98
+ Send every git command here: `total-recall git <git command and arguments>` runs git itself, with
99
+ the same output and exit status, plus sign-in from the auth store and the guards above. Push your
100
+ finished, tested work yourself; never push unfinished work.
101
+
102
+ ```bash
103
+ total-recall git status --short
104
+ total-recall git add -A
105
+ total-recall git commit -m "<message>"
106
+ total-recall git push
107
+ total-recall git fleet --json
108
+ total-recall git undo --list
109
+ ```
110
+
111
+ A refused commit or push names the rule or the auth key that matched; fix the cause, never bypass
112
+ the guard. Raw commands this plugin owns: `git <command>`.
@@ -1,24 +1,25 @@
1
1
  #!/usr/bin/env node
2
- import { execFileSync } from 'node:child_process';
3
- import { realpathSync } from 'node:fs';
2
+ import { execFileSync, spawnSync } from 'node:child_process';
3
+ import { readdirSync, realpathSync } from 'node:fs';
4
4
  import path from 'node:path';
5
+ import { fileURLToPath, pathToFileURL } from 'node:url';
5
6
  import { parseArgs } from 'node:util';
6
7
 
7
8
  const GIT_TIMEOUT_MS = 15000;
8
9
  const GIT_MAX_BUFFER = 64 * 1024 * 1024;
9
- const VERBS = ['audit', 'diff', 'identity', 'worktree-list', 'worktree-create', 'worktree-remove', 'help'];
10
+ const VERBS = ['audit', 'diff', 'identity', 'worktree-list', 'worktree-create', 'worktree-remove'];
10
11
 
11
12
  /**
12
13
  * Run git without throwing. Never trims stdout (porcelain rows begin with
13
14
  * significant spaces) and never forwards stderr to the caller's terminal.
14
15
  * @returns {{ ok: boolean, code: number|null, stdout: string, stderr: string, missing: boolean }}
15
16
  */
16
- export function git(args, cwd = process.cwd()) {
17
+ export function git(args, cwd = process.cwd(), input) {
17
18
  try {
18
19
  const stdout = execFileSync('git', args, {
19
20
  cwd,
20
21
  encoding: 'utf8',
21
- stdio: ['ignore', 'pipe', 'pipe'],
22
+ ...(input === undefined ? { stdio: ['ignore', 'pipe', 'pipe'] } : { input, stdio: ['pipe', 'pipe', 'pipe'] }),
22
23
  timeout: GIT_TIMEOUT_MS,
23
24
  maxBuffer: GIT_MAX_BUFFER,
24
25
  env: { ...process.env, LC_ALL: 'C', GIT_OPTIONAL_LOCKS: '0', GIT_TERMINAL_PROMPT: '0' },
@@ -210,14 +211,20 @@ function printIdentity(r) {
210
211
  console.log('');
211
212
  }
212
213
 
213
- function usage() {
214
- return `Usage: total-recall git-sentinel [operation] [--json]
215
- audit | identity
216
- diff [--patch] [--cached] [--base <ref>]
217
- worktree list
218
- worktree create <path> [--base <ref>]
219
- worktree remove <path> [--force]
220
- worktree-list | worktree-create | worktree-remove (separate operation effects)`;
214
+ function usage(operations = {}) {
215
+ const features = Object.entries(operations).sort(([a], [b]) => a.localeCompare(b))
216
+ .map(([name, op]) => ` ${(op.usage || name).split('\n')[0].padEnd(46)} ${op.summary}`).join('\n');
217
+ return `Usage: total-recall git <command> [arguments] [--json]
218
+
219
+ Every git command works here: anything that is not listed below runs git itself, with your
220
+ arguments, git's hooks, output and exit status. Example: total-recall git pull --rebase.
221
+ Git's own help for a command: total-recall git help <command>.
222
+
223
+ Plugin operations:
224
+ audit | identity Repository state; commit identity and its history
225
+ diff --json [--patch] [--cached] [--base <ref>] The card's diff (plain diff is git's)
226
+ worktree-list | worktree-create <path> [--base <ref>] | worktree-remove <path> [--force]
227
+ ${features ? features + '\n' : ''} --help This help; <operation> --help for one operation`;
221
228
  }
222
229
 
223
230
  function gitResult(args, cwd) {
@@ -303,36 +310,141 @@ function printAudit(r) {
303
310
  console.log(` Head Commit: ${fmt(r.lastCommit, unk)}\n`);
304
311
  }
305
312
 
313
+ /**
314
+ * Feature operations live in src/ops/<name>.mjs, one file per feature. Each module may export:
315
+ * - `operations`: { <name>: { summary, usage, run(args, ctx) } }; `run` returns an exit status.
316
+ * - `guards`: [{ name, before(args, ctx) }] run before git's own commands, in file order. `before`
317
+ * returns nothing to allow, `{ args }` to rewrite the arguments, or `{ refuse: <message> }`.
318
+ * An optional `after(args, ctx, status)` runs after git finishes; its failure is reported, never fatal.
319
+ * `ctx` is { cwd, env, json, git(args) -> spawnSync result with captured output }.
320
+ * Help is built from this registry, so every operation is in `--help`.
321
+ */
322
+ const OPS_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), 'src', 'ops');
323
+ let GIT_COMMANDS;
324
+ function isGitCommand(name) {
325
+ if (!GIT_COMMANDS) GIT_COMMANDS = new Set(String(spawnSync('git', ['--list-cmds=main,others,alias,nohelpers'], { encoding: 'utf8' }).stdout || '').split('\n').filter(Boolean));
326
+ return GIT_COMMANDS.has(name);
327
+ }
328
+
329
+ export async function loadRegistry(dir = OPS_DIR) {
330
+ const operations = {}, guards = [];
331
+ let files = [];
332
+ try { files = readdirSync(dir).filter(f => f.endsWith('.mjs') && !f.includes('.spec.') && !f.includes('.test.')).sort(); } catch { /* no feature modules */ }
333
+ for (const file of files) {
334
+ // One module that fails to load disables only its own operations; git and every other operation keep working.
335
+ let mod;
336
+ try { mod = await import(pathToFileURL(path.join(dir, file)).href); }
337
+ catch (error) {
338
+ const name = file.replace(/\.mjs$/, '');
339
+ if (!operations[name]) operations[name] = { summary: `unavailable: ${String(error.message).split('\n')[0]}`, usage: name, file, broken: true,
340
+ run: () => { console.error(`${name} is unavailable: ${error.message.split('\n')[0]}`); return 1; } };
341
+ continue;
342
+ }
343
+ for (const [name, op] of Object.entries(mod.operations || {})) {
344
+ if (operations[name]) throw new Error(`Operation "${name}" is defined twice (${file})`);
345
+ operations[name] = { ...op, file };
346
+ }
347
+ for (const guard of mod.guards || []) guards.push({ ...guard, file });
348
+ }
349
+ return { operations, guards };
350
+ }
351
+
352
+ function context(cwd, json) {
353
+ return {
354
+ cwd, env: process.env, json,
355
+ git: (args, options = {}) => spawnSync('git', args, { cwd, env: process.env, encoding: 'utf8', maxBuffer: GIT_MAX_BUFFER, ...options }),
356
+ };
357
+ }
358
+
359
+ /**
360
+ * Plugin operations: audit, identity, help, the checked commit, the hyphenated worktree-* operations
361
+ * and `diff` with --json or --base (the card's diff). Everything else is git's own CLI.
362
+ * `commit` stays a plugin operation only in its checked form (-m/--message, -a/--all, paths).
363
+ * Any other git commit flag (--amend, --fixup, -S and the rest) goes to git's own commit.
364
+ */
365
+ export function isPassthrough(args, featureOps = []) {
366
+ const [first] = args;
367
+ if (first === undefined) return false;
368
+ if (featureOps.includes(first)) return false;
369
+ if (first.startsWith('-')) return !['--json', '--help', '-h'].includes(first);
370
+ if (['audit', 'identity', 'worktree-list', 'worktree-create', 'worktree-remove'].includes(first)) return false;
371
+ if (first === 'diff') return !args.includes('--json') && !args.some(a => a === '--base' || a.startsWith('--base='));
372
+ return true;
373
+ }
374
+
306
375
  export async function run(argv = []) {
307
- // argv: ["node", "total-recall", "git-sentinel", "<subcommand>", ...flags]
376
+ // argv: ["node", "total-recall", "git", "<subcommand>", ...flags]
308
377
  // Never process.exit(): a host running this in-process would be stopped too.
309
378
  const clean = Array.isArray(argv) ? argv.slice(3) : [];
379
+ const registry = await loadRegistry();
380
+ const cwd0 = process.cwd();
381
+ const featureOp = registry.operations[clean[0]];
382
+ const wantsOpHelp = clean.includes('--help') || clean.includes('-h');
383
+ // Guards see every command, plugin operations included (a plugin `commit` is still a commit).
384
+ // Each guard decides from args[0] whether the command concerns it.
385
+ const runGuards = async (args, phase, status) => {
386
+ for (const guard of registry.guards) {
387
+ if (phase === 'before') {
388
+ const verdict = await guard.before?.(args, context(cwd0, false));
389
+ if (verdict?.refuse) return { refuse: `${args[0]} refused by ${guard.name}: ${verdict.refuse}` };
390
+ if (verdict?.args) args = verdict.args;
391
+ } else if (guard.after) {
392
+ try { await guard.after(args, context(cwd0, false), status); }
393
+ catch (error) { console.error(`${guard.name} after ${args[0]}: ${error.message}`); }
394
+ }
395
+ }
396
+ return { args };
397
+ };
398
+ // `-h` on a plugin operation that is also a git command (commit, bundle) is git's own usage;
399
+ // `--help` shows the plugin operation's help.
400
+ const gitUsage = featureOp && clean.includes('-h') && !clean.includes('--help') && isGitCommand(clean[0]);
401
+ if (featureOp && !wantsOpHelp || gitUsage) {
402
+ if (gitUsage) {
403
+ const ran = spawnSync('git', clean, { cwd: cwd0, stdio: 'inherit', env: process.env });
404
+ process.exitCode = ran.status ?? 1;
405
+ return;
406
+ }
407
+ const checked = await runGuards(clean, 'before');
408
+ if (checked.refuse) { console.error(checked.refuse); process.exitCode = 1; return; }
409
+ const status = await featureOp.run(checked.args.slice(1).filter(a => a !== '--json'), context(cwd0, clean.includes('--json')));
410
+ process.exitCode = typeof status === 'number' ? status : 0;
411
+ await runGuards(checked.args, 'after', process.exitCode);
412
+ return;
413
+ }
414
+ if (featureOp) { console.log(`total-recall git ${clean[0]} — ${featureOp.summary}\n${featureOp.usage || ''}`.trimEnd()); return; }
415
+ // The whole git CLI: every command that is not a plugin operation runs git itself, with the
416
+ // caller's arguments unchanged (unless a guard rewrites them), git's own hooks, output and exit status.
417
+ if (isPassthrough(clean, Object.keys(registry.operations))) {
418
+ const checked = await runGuards(clean, 'before');
419
+ if (checked.refuse) { console.error(`git ${checked.refuse}`); process.exitCode = 1; return; }
420
+ const ran = spawnSync('git', checked.args, { cwd: cwd0, stdio: 'inherit', env: process.env });
421
+ if (ran.error) console.error(`git could not start: ${ran.error.message}`);
422
+ process.exitCode = ran.status ?? 1;
423
+ await runGuards(checked.args, 'after', process.exitCode);
424
+ return;
425
+ }
310
426
  const isJson = clean.includes('--json');
311
427
  const wantsHelp = clean.includes('--help') || clean.includes('-h');
312
428
  let [action = 'audit', ...args] = clean.filter(arg => arg !== '--json');
313
- if (action === 'worktree') {
314
- const [verb = 'list', ...rest] = args;
315
- action = `worktree-${verb}`;
316
- args = rest;
317
- }
318
429
  const fail = (message, code = 1, extra = {}) => {
319
430
  process.exitCode = code;
320
431
  if (isJson) console.log(JSON.stringify({ ok: false, error: message, ...extra }, null, 2));
321
432
  else console.error(message);
322
433
  };
323
434
 
324
- if (wantsHelp || action === 'help') {
325
- console.log(usage());
435
+ if (wantsHelp) {
436
+ console.log(usage(registry.operations));
326
437
  return;
327
438
  }
328
439
  if (!VERBS.includes(action)) {
329
- fail(`Unknown git-sentinel command "${action}". ${usage()}`, 2);
440
+ fail(`Unknown git plugin command "${action}". ${usage()}`, 2);
330
441
  return;
331
442
  }
332
443
 
333
444
  const options = action === 'diff' ? { patch: { type: 'boolean' }, cached: { type: 'boolean' }, base: { type: 'string' } }
334
445
  : action === 'worktree-create' ? { base: { type: 'string' } }
335
- : action === 'worktree-remove' ? { force: { type: 'boolean' } } : {};
446
+ : action === 'worktree-remove' ? { force: { type: 'boolean' } }
447
+ : {};
336
448
  const targetRequired = action === 'worktree-create' || action === 'worktree-remove';
337
449
  let parsed;
338
450
  try {
@@ -1,18 +1,18 @@
1
1
  {
2
- "name": "tr-plugin-git-sentinel",
2
+ "name": "tr-plugin-git",
3
3
  "version": "1.1.5",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
- "name": "tr-plugin-git-sentinel",
8
+ "name": "tr-plugin-git",
9
9
  "version": "1.1.5",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@gregiteen/ssss-cli": "0.14.5"
13
13
  },
14
14
  "devDependencies": {
15
- "total-recall-brain": "3.43.3",
15
+ "total-recall-brain": "3.44.0",
16
16
  "vitest": "^4.1.10"
17
17
  }
18
18
  },
@@ -6533,9 +6533,9 @@
6533
6533
  }
6534
6534
  },
6535
6535
  "node_modules/total-recall-brain": {
6536
- "version": "3.43.3",
6537
- "resolved": "https://registry.npmjs.org/total-recall-brain/-/total-recall-brain-3.43.3.tgz",
6538
- "integrity": "sha512-yjfPN/BQxEEa+iodyFXQov/6fRt1pZg/7RcmgsbpALwBt6Ki3JJjT3tzArBC7NxHQmXgGYyKnCYId6xe/W2rPg==",
6536
+ "version": "3.44.0",
6537
+ "resolved": "https://registry.npmjs.org/total-recall-brain/-/total-recall-brain-3.44.0.tgz",
6538
+ "integrity": "sha512-VNPaIO9zsSwoxAsJ5ByIQBP9zPpLq4RiQO7Vrex4rBOHFQJT50P7utcZiLMSZTyZJU4C/m5uB8qTCSBMp6+l6Q==",
6539
6539
  "dev": true,
6540
6540
  "license": "MIT",
6541
6541
  "workspaces": [
@@ -6543,7 +6543,7 @@
6543
6543
  ],
6544
6544
  "dependencies": {
6545
6545
  "@simplewebauthn/server": "^13.3.2",
6546
- "@ssss/cli": "npm:@gregiteen/ssss-cli@0.14.4",
6546
+ "@ssss/cli": "npm:@gregiteen/ssss-cli@0.14.5",
6547
6547
  "bcrypt": "^6.0.0",
6548
6548
  "better-sqlite3": "^12.11.1",
6549
6549
  "cookie-parser": "^1.4.7",
@@ -1,5 +1,5 @@
1
1
  {
2
- "name": "tr-plugin-git-sentinel",
2
+ "name": "tr-plugin-git",
3
3
  "version": "1.1.5",
4
4
  "type": "module",
5
5
  "description": "Reports the state of the current git repository: branch, dirty files, unpushed commits and stashes.",
@@ -11,6 +11,7 @@
11
11
  "files": [
12
12
  "cli.mjs",
13
13
  "plugin.json",
14
+ "src/",
14
15
  "README.md",
15
16
  "LICENSE",
16
17
  "ui/"