total-recall-brain 3.44.0 → 3.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (502) hide show
  1. package/bin/total-recall.mjs +10 -6
  2. package/docs/ARCHITECTURE.md +10 -7
  3. package/docs/reference/cli-reference.md +13 -8
  4. package/frontend/dist/assets/index-BRYE1jmv.css +1 -0
  5. package/frontend/dist/assets/index-D1goIPjC.js +5598 -0
  6. package/frontend/dist/index.html +2 -2
  7. package/frontend/dist/sw.js +5 -4
  8. package/frontend/src/App.tsx +185 -238
  9. package/frontend/src/api/auth-inventory.ts +62 -0
  10. package/frontend/src/api/memory.ts +13 -8
  11. package/frontend/src/api/plugin-credentials.ts +23 -0
  12. package/frontend/src/api/plugins.ts +37 -53
  13. package/frontend/src/api/workspace-drawers.ts +97 -0
  14. package/frontend/src/components/BrainSelector.tsx +9 -3
  15. package/frontend/src/components/plugins/PluginPanel.tsx +83 -42
  16. package/frontend/src/components/plugins/PluginSettings.tsx +10 -20
  17. package/frontend/src/components/plugins/PluginWorkspace.tsx +367 -0
  18. package/frontend/src/components/plugins/ScopedPluginCommands.tsx +142 -0
  19. package/frontend/src/components/plugins/plugin-frame.ts +44 -33
  20. package/frontend/src/components/plugins/scoped-plugin-operations.ts +28 -0
  21. package/frontend/src/components/workspace/DrawerChat.tsx +110 -0
  22. package/frontend/src/components/workspace/DrawerLayout.tsx +196 -0
  23. package/frontend/src/components/workspace/DrawerMarkup.tsx +49 -0
  24. package/frontend/src/components/workspace/PluginChunkLibrary.tsx +92 -0
  25. package/frontend/src/components/workspace/PluginHome.tsx +76 -0
  26. package/frontend/src/components/workspace/WorkspaceDrawers.tsx +96 -0
  27. package/frontend/src/components/workspace/WorkspacePage.tsx +95 -0
  28. package/frontend/src/components/workspace/usePluginDesign.ts +38 -0
  29. package/frontend/src/index.css +409 -136
  30. package/frontend/src/pages/HelpPage.tsx +15 -46
  31. package/frontend/src/pages/MemoryPage.tsx +19 -36
  32. package/frontend/src/pages/SettingsPage.tsx +1 -1
  33. package/metadata.plugin.schema.json +53 -227
  34. package/package.json +1 -1
  35. package/scaffold/.agent/skills/plugin/SKILL.md +13 -11
  36. package/scaffold/.agent/skills/plugin/evals/README.md +14 -21
  37. package/scaffold/.agent/skills/plugin/evals/cases/01-fabricated-seed.mjs +15 -18
  38. package/scaffold/.agent/skills/plugin/evals/cases/02-reassuring-default.mjs +19 -24
  39. package/scaffold/.agent/skills/plugin/evals/cases/03-declared-template.mjs +12 -20
  40. package/scaffold/.agent/skills/plugin/evals/cases/04-home-collects-credential.mjs +35 -0
  41. package/scaffold/.agent/skills/plugin/evals/cases/05-host-leak-in-scaffold.mjs +8 -28
  42. package/scaffold/.agent/skills/plugin/evals/cases/06-correct-plugin.mjs +85 -47
  43. package/scaffold/.agent/skills/plugin/evals/run.mjs +17 -18
  44. package/scaffold/.agent/skills/plugin/prompts/05-credentials.md +4 -4
  45. package/scaffold/.agent/skills/plugin/prompts/07-scaffold.md +2 -2
  46. package/scaffold/.agent/skills/plugin/prompts/08-verify.md +4 -4
  47. package/scaffold/.agent/skills/plugin/references/anti-patterns.md +2 -2
  48. package/scaffold/.agent/skills/plugin/references/generative-home.md +38 -0
  49. package/scaffold/.agent/skills/plugin/references/scaffold.md +5 -5
  50. package/scaffold/.agent/skills/plugin/references/surfaces.md +13 -4
  51. package/scaffold/.agent/skills/plugin/scripts/record.mjs +75 -153
  52. package/scaffold/.agent/skills/plugin/subagents/plugin-reviewer.md +4 -4
  53. package/scaffold/.agent/skills/total-recall/plugins/auth/DESIGN.md +76 -0
  54. package/scaffold/.agent/skills/total-recall/plugins/auth/README.md +3 -1
  55. package/scaffold/.agent/skills/total-recall/plugins/auth/cli.mjs +20 -15
  56. package/scaffold/.agent/skills/total-recall/plugins/auth/package-lock.json +7 -7
  57. package/scaffold/.agent/skills/total-recall/plugins/auth/package.json +2 -1
  58. package/scaffold/.agent/skills/total-recall/plugins/auth/plugin.json +13 -51
  59. package/scaffold/.agent/skills/total-recall/plugins/auth/src/cli-secret.mjs +20 -1
  60. package/scaffold/.agent/skills/total-recall/plugins/auth/src/secrets-store.mjs +12 -1
  61. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/access-overview.md +17 -0
  62. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/agent-login.md +20 -0
  63. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/baseline-audit.md +22 -0
  64. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/credential-repository-binding.md +17 -0
  65. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/credential-store-maintenance.md +17 -0
  66. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/dashboard-password.md +18 -0
  67. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/dashboard-sessions.md +18 -0
  68. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/endpoint-probe.md +23 -0
  69. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/google-sign-in.md +21 -0
  70. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/mesh-machines.md +16 -0
  71. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/passkey-enrollment.md +21 -0
  72. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/registered-brains.md +16 -0
  73. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/scoped-access-keys.md +17 -0
  74. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/secret-inventory.md +25 -0
  75. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/chunks/signing-key-rotation.md +22 -0
  76. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/home.js +375 -0
  77. package/scaffold/.agent/skills/total-recall/plugins/automations/BRICK.md +7 -0
  78. package/scaffold/.agent/skills/total-recall/plugins/automations/DESIGN.md +53 -0
  79. package/scaffold/.agent/skills/total-recall/plugins/automations/LICENSE +21 -0
  80. package/scaffold/.agent/skills/total-recall/plugins/automations/README.md +66 -0
  81. package/scaffold/.agent/skills/total-recall/plugins/automations/adapters.mjs +247 -0
  82. package/scaffold/.agent/skills/total-recall/plugins/automations/capability/index.mjs +16 -0
  83. package/scaffold/.agent/skills/total-recall/plugins/automations/cli.mjs +130 -0
  84. package/{src/core/plugin-cron.mjs → scaffold/.agent/skills/total-recall/plugins/automations/cron.mjs} +1 -3
  85. package/scaffold/.agent/skills/total-recall/plugins/automations/inventory.mjs +88 -0
  86. package/scaffold/.agent/skills/total-recall/plugins/automations/package-lock.json +7661 -0
  87. package/scaffold/.agent/skills/total-recall/plugins/automations/package.json +36 -0
  88. package/scaffold/.agent/skills/total-recall/plugins/automations/plugin.json +151 -0
  89. package/scaffold/.agent/skills/total-recall/plugins/automations/scheduler.mjs +246 -0
  90. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/automations.js +2 -0
  91. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/control-ledger.md +42 -0
  92. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/local-inventory-triage.md +17 -0
  93. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/pending-control.md +39 -0
  94. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/run-evidence.md +41 -0
  95. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/schedule-vs-run-evidence.md +17 -0
  96. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/source-coverage.md +41 -0
  97. package/scaffold/.agent/skills/total-recall/plugins/automations/ui/home.js +278 -0
  98. package/scaffold/.agent/skills/total-recall/plugins/code-quality/DESIGN.md +53 -0
  99. package/scaffold/.agent/skills/total-recall/plugins/code-quality/cli.mjs +23 -0
  100. package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/run-core.mjs +5 -3
  101. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/check.mjs +61 -7
  102. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/report-data.mjs +40 -14
  103. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/report.mjs +15 -40
  104. package/scaffold/.agent/skills/total-recall/plugins/code-quality/package-lock.json +7 -7
  105. package/scaffold/.agent/skills/total-recall/plugins/code-quality/package.json +2 -1
  106. package/scaffold/.agent/skills/total-recall/plugins/code-quality/plugin.json +40 -40
  107. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/config.md +15 -0
  108. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/detect.md +15 -0
  109. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/gate.md +15 -0
  110. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/init.md +15 -0
  111. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/report.md +17 -0
  112. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/run.md +17 -0
  113. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/chunks/snapshot.md +15 -0
  114. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/code-quality-report.mjs +55 -23
  115. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/home.mjs +214 -0
  116. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/DESIGN.md +146 -0
  117. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package-lock.json +7 -7
  118. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package.json +2 -1
  119. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/plugin.json +51 -34
  120. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/command.mjs +1 -1
  121. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/create.md +35 -0
  122. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/history.md +35 -0
  123. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/library.md +49 -0
  124. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/list.md +42 -0
  125. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/promote.md +40 -0
  126. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/read.md +25 -0
  127. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/remove.md +26 -0
  128. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/rollback.md +26 -0
  129. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/show.md +53 -0
  130. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/status.md +40 -0
  131. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/test-path.md +38 -0
  132. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/test.md +46 -0
  133. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/chunks/update.md +32 -0
  134. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/home.js +533 -0
  135. package/scaffold/.agent/skills/total-recall/plugins/embeddings/DESIGN.md +110 -0
  136. package/scaffold/.agent/skills/total-recall/plugins/embeddings/package-lock.json +7 -7
  137. package/scaffold/.agent/skills/total-recall/plugins/embeddings/package.json +2 -1
  138. package/scaffold/.agent/skills/total-recall/plugins/embeddings/plugin.json +13 -10
  139. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/benchmark.md +49 -0
  140. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/coverage.md +53 -0
  141. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/models.md +43 -0
  142. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/pull.md +41 -0
  143. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/chunks/status.md +59 -0
  144. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/home.js +353 -0
  145. package/scaffold/.agent/skills/total-recall/plugins/git/DESIGN.md +31 -0
  146. package/scaffold/.agent/skills/total-recall/plugins/git/README.md +136 -0
  147. package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/cli.mjs +140 -24
  148. package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/package-lock.json +9 -9
  149. package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/package.json +4 -2
  150. package/scaffold/.agent/skills/total-recall/plugins/git/plugin.json +151 -0
  151. package/scaffold/.agent/skills/total-recall/plugins/git/src/lib/context.mjs +94 -0
  152. package/scaffold/.agent/skills/total-recall/plugins/git/src/lib/phase3-spec-support.mjs +50 -0
  153. package/scaffold/.agent/skills/total-recall/plugins/git/src/lib/runtime.mjs +40 -0
  154. package/scaffold/.agent/skills/total-recall/plugins/git/src/lib/spec-support.mjs +51 -0
  155. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/_support.mjs +195 -0
  156. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/auth.mjs +201 -0
  157. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/bisect.mjs +40 -0
  158. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/cli-meta.mjs +159 -0
  159. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/commit-memory.mjs +54 -0
  160. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/commit.mjs +46 -0
  161. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/fleet.mjs +174 -0
  162. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/force-push.mjs +58 -0
  163. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/group.mjs +119 -0
  164. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/handoff.mjs +59 -0
  165. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/message.mjs +22 -0
  166. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/resolve.mjs +60 -0
  167. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/rules.mjs +81 -0
  168. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/secret-firewall.mjs +92 -0
  169. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/undo.mjs +156 -0
  170. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/unmerged.mjs +182 -0
  171. package/scaffold/.agent/skills/total-recall/plugins/git/src/ops/why.mjs +16 -0
  172. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/change-comparison.md +27 -0
  173. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/commit-identity.md +22 -0
  174. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/create-worktree.md +25 -0
  175. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/registered-worktrees.md +22 -0
  176. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/remove-worktree.md +23 -0
  177. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/repository-ledger.md +25 -0
  178. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/unmerged-work.md +22 -0
  179. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/upstream-divergence.md +17 -0
  180. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/worktree-conflict-triage.md +17 -0
  181. package/scaffold/.agent/skills/total-recall/plugins/git/ui/chunks/worktree-terminal.md +22 -0
  182. package/scaffold/.agent/skills/total-recall/plugins/git/ui/home.js +273 -0
  183. package/scaffold/.agent/skills/total-recall/plugins/mesh/DESIGN.md +35 -0
  184. package/scaffold/.agent/skills/total-recall/plugins/mesh/README.md +4 -5
  185. package/scaffold/.agent/skills/total-recall/plugins/mesh/cli.mjs +9 -3
  186. package/scaffold/.agent/skills/total-recall/plugins/mesh/package-lock.json +7 -7
  187. package/scaffold/.agent/skills/total-recall/plugins/mesh/package.json +2 -1
  188. package/scaffold/.agent/skills/total-recall/plugins/mesh/plugin.json +37 -39
  189. package/scaffold/.agent/skills/total-recall/plugins/mesh/src/cli/mesh.mjs +5 -3
  190. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/active-device-dispatch.md +22 -0
  191. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/control-probe.md +25 -0
  192. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/control-server.md +22 -0
  193. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/credential-readiness.md +23 -0
  194. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/elected-leader.md +22 -0
  195. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/enrollment-key.md +22 -0
  196. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/file-receipt.md +25 -0
  197. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/fleet-execution.md +23 -0
  198. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/fleet-presence.md +23 -0
  199. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/interactive-ssh.md +22 -0
  200. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/local-enrollment.md +23 -0
  201. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/mesh-policy.md +23 -0
  202. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/network-atlas.md +25 -0
  203. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/node-roster.md +26 -0
  204. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/node-selection-proof.md +17 -0
  205. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/owner-observations.md +23 -0
  206. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/peer-path.md +23 -0
  207. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/pinned-leader.md +24 -0
  208. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/reachability-evidence-ladder.md +17 -0
  209. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/recorded-login.md +23 -0
  210. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/remote-execution.md +22 -0
  211. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/chunks/secret-grants.md +26 -0
  212. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/{card.js → home.js} +93 -22
  213. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/DESIGN.md +86 -0
  214. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/README.md +44 -9
  215. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/capability/BRICK.md +1 -1
  216. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/capability/index.mjs +18 -6
  217. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/cli.mjs +128 -24
  218. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/package-lock.json +7 -7
  219. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/package.json +3 -2
  220. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/plugin.json +188 -34
  221. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/skills/meta-harness/SKILL.md +17 -3
  222. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/adoption.mjs +2 -2
  223. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/alerts.mjs +3 -3
  224. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/cascade.mjs +92 -18
  225. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/chat.mjs +80 -0
  226. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/control.mjs +145 -0
  227. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/coordinator.mjs +42 -21
  228. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/dispatch-request.mjs +4 -2
  229. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/dispatch.mjs +33 -9
  230. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/documentation.mjs +55 -11
  231. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/executor.mjs +26 -4
  232. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/hermes.mjs +29 -1
  233. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/index.mjs +1 -1
  234. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/included-usage.mjs +1 -1
  235. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/jobs.mjs +84 -0
  236. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/learner.mjs +3 -12
  237. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/maintenance.mjs +17 -0
  238. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/mcp-server.mjs +228 -0
  239. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/process-manager.mjs +25 -2
  240. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/reasoning.mjs +1 -1
  241. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/remote-operation.mjs +5 -1
  242. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/review.mjs +34 -3
  243. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/reviews.mjs +25 -0
  244. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/router.mjs +1 -1
  245. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/claude.mjs +319 -0
  246. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/codex.mjs +387 -0
  247. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/result.mjs +67 -0
  248. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/resume.mjs +373 -0
  249. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session/run.mjs +223 -0
  250. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/session-jobs.mjs +72 -0
  251. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/setup.mjs +6 -3
  252. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/termination.mjs +16 -12
  253. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/threads.mjs +32 -1
  254. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/usage-queue.mjs +1 -1
  255. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/verify-ssss.mjs +3 -3
  256. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/worker.mjs +285 -40
  257. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/worktree.mjs +76 -9
  258. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/adapter-docs-freshness.md +16 -0
  259. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/chat-handoff.md +26 -0
  260. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/fleet-maintenance.md +21 -0
  261. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/harness-inventory.md +21 -0
  262. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/included-access.md +18 -0
  263. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/included-usage-verification.md +15 -0
  264. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/independent-review.md +17 -0
  265. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/managed-execution.md +20 -0
  266. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/official-documentation.md +18 -0
  267. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/quota-recovery.md +21 -0
  268. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/review-routing-decision.md +16 -0
  269. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/route-work.md +18 -0
  270. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/routing-evidence.md +18 -0
  271. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/run-ledger.md +18 -0
  272. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/home.js +198 -0
  273. package/scaffold/.agent/skills/total-recall/plugins/openwiki/DESIGN.md +75 -0
  274. package/scaffold/.agent/skills/total-recall/plugins/openwiki/README.md +2 -0
  275. package/scaffold/.agent/skills/total-recall/plugins/openwiki/cli.mjs +64 -32
  276. package/scaffold/.agent/skills/total-recall/plugins/openwiki/package-lock.json +7 -7
  277. package/scaffold/.agent/skills/total-recall/plugins/openwiki/package.json +2 -1
  278. package/scaffold/.agent/skills/total-recall/plugins/openwiki/plugin.json +10 -44
  279. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/generate.mjs +5 -4
  280. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/graph.mjs +3 -4
  281. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/ingest.mjs +23 -18
  282. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/mesh-vaults.mjs +8 -3
  283. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/refresh-diagnostics.mjs +44 -0
  284. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/refresh.mjs +123 -113
  285. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/search.mjs +3 -5
  286. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/token.mjs +21 -47
  287. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/upstream-watcher.mjs +17 -6
  288. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/auto-refresh.md +18 -0
  289. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/bootstrap-pages.md +18 -0
  290. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/generate-wiki.md +21 -0
  291. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/generator-settings.md +18 -0
  292. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/host-probe.md +18 -0
  293. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/ingest-preview.md +18 -0
  294. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/link-hygiene.md +21 -0
  295. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/link-topology.md +19 -0
  296. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/passage-search.md +19 -0
  297. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/propagation-plan.md +18 -0
  298. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/provider-credentials.md +18 -0
  299. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/refresh-report.md +18 -0
  300. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/task-evidence.md +22 -0
  301. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/upstream-record.md +18 -0
  302. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/watch-upstream.md +18 -0
  303. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/chunks/wiki-atlas.md +19 -0
  304. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/panel.js +261 -513
  305. package/scaffold/.agent/skills/total-recall/plugins/security/DESIGN.md +84 -0
  306. package/scaffold/.agent/skills/total-recall/plugins/security/README.md +4 -2
  307. package/scaffold/.agent/skills/total-recall/plugins/security/cli.mjs +7 -19
  308. package/scaffold/.agent/skills/total-recall/plugins/security/package-lock.json +7 -7
  309. package/scaffold/.agent/skills/total-recall/plugins/security/package.json +2 -3
  310. package/scaffold/.agent/skills/total-recall/plugins/security/plugin.json +19 -52
  311. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/device-evidence.md +21 -0
  312. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/evidence-desk.md +18 -0
  313. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/guided-device-review.md +17 -0
  314. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/host-and-network.md +21 -0
  315. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/https-headers.md +17 -0
  316. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/mesh-coverage.md +18 -0
  317. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/private-security-tools.md +16 -0
  318. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/single-origin-header-check.md +17 -0
  319. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/source-review.md +21 -0
  320. package/scaffold/.agent/skills/total-recall/plugins/security/ui/chunks/ssh-permission-plan.md +17 -0
  321. package/scaffold/.agent/skills/total-recall/plugins/security/ui/home.js +283 -0
  322. package/scaffold/.agent/skills/total-recall/plugins/ssss/DESIGN.md +93 -0
  323. package/scaffold/.agent/skills/total-recall/plugins/ssss/package-lock.json +2 -2
  324. package/scaffold/.agent/skills/total-recall/plugins/ssss/package.json +2 -1
  325. package/scaffold/.agent/skills/total-recall/plugins/ssss/plugin.json +5 -3
  326. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/conformance.md +26 -0
  327. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/registry.md +37 -0
  328. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/repair.md +42 -0
  329. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/scaffold.md +33 -0
  330. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/status.md +43 -0
  331. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/validate.md +34 -0
  332. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/validation-diagnostics.md +17 -0
  333. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/chunks/workspace-registry-preflight.md +17 -0
  334. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/home.js +348 -0
  335. package/scaffold/.agent/skills/total-recall/references/operations.md +3 -1
  336. package/src/cli/agent.mjs +1 -1
  337. package/src/cli/api.mjs +3 -3
  338. package/src/cli/brief.mjs +3 -0
  339. package/src/cli/command.mjs +41 -2
  340. package/src/cli/config.mjs +16 -0
  341. package/src/cli/connect.mjs +2 -7
  342. package/src/cli/dream.mjs +93 -69
  343. package/src/cli/harness.mjs +4 -4
  344. package/src/cli/help.mjs +1 -1
  345. package/src/cli/init.mjs +0 -25
  346. package/src/cli/lessons.mjs +51 -0
  347. package/src/cli/memory-plugin.mjs +1 -1
  348. package/src/cli/plugin/chunks.mjs +145 -0
  349. package/src/cli/plugin/copies.mjs +64 -14
  350. package/src/cli/plugin/create.mjs +30 -59
  351. package/src/cli/plugin/index.mjs +31 -16
  352. package/src/cli/plugin/install.mjs +10 -15
  353. package/src/cli/plugin/remove.mjs +1 -1
  354. package/src/cli/plugin/search.mjs +2 -2
  355. package/src/cli/preflight.mjs +19 -6
  356. package/src/cli/proposals.mjs +1 -1
  357. package/src/cli/recall.mjs +66 -23
  358. package/src/cli/remember.mjs +3 -14
  359. package/src/cli/server.mjs +18 -0
  360. package/src/cli/setup.mjs +2 -9
  361. package/src/cli/start.mjs +1 -0
  362. package/src/cli/startup.mjs +19 -0
  363. package/src/cli/task.mjs +9 -2
  364. package/src/cli/update.mjs +6 -2
  365. package/src/core/access-ledger.mjs +78 -0
  366. package/src/core/agent-manager.mjs +2 -2
  367. package/src/core/app-deploy/design-tokens.mjs +14 -9
  368. package/src/core/app-deploy/ui-elements.mjs +1 -1
  369. package/src/core/brain-locate.mjs +15 -0
  370. package/src/core/brain-registry.mjs +5 -0
  371. package/src/core/brain-updates.mjs +35 -11
  372. package/src/core/claude-hooks.mjs +3 -1
  373. package/src/core/cleanup-task.mjs +15 -0
  374. package/src/core/cli-commands.mjs +2 -0
  375. package/src/core/cli-maintenance.mjs +4 -1
  376. package/src/core/cli-semantic-index.mjs +23 -3
  377. package/src/core/context-compiler.mjs +20 -0
  378. package/src/core/daemon-control.mjs +5 -1
  379. package/src/core/daemon-loop.mjs +39 -62
  380. package/src/core/dashboard-bundle.mjs +261 -0
  381. package/src/core/default-plugins.mjs +1 -1
  382. package/src/core/dream.mjs +33 -105
  383. package/src/core/ensure-dependencies.mjs +152 -0
  384. package/src/core/fast-recall.mjs +2 -2
  385. package/src/core/field-evaluation.mjs +23 -0
  386. package/src/core/gate-mode.mjs +1 -1
  387. package/src/core/harness-hooks.mjs +14 -2
  388. package/src/core/lesson-hooks.mjs +74 -0
  389. package/src/core/lesson-memory.mjs +24 -0
  390. package/src/core/lesson-sessions.mjs +52 -0
  391. package/src/core/lessons.mjs +96 -0
  392. package/src/core/memory-brain.mjs +30 -8
  393. package/src/core/meta-harness.mjs +2 -2
  394. package/src/core/optimizer.mjs +66 -165
  395. package/src/core/plugin-activation.mjs +63 -20
  396. package/src/core/plugin-contracts/{card.mjs → manifest.mjs} +26 -57
  397. package/src/core/plugin-contracts/startup-check.mjs +49 -0
  398. package/src/core/plugin-contracts/ui.mjs +9 -3
  399. package/src/core/plugin-distribution.mjs +6 -6
  400. package/src/core/plugin-lifecycle.mjs +58 -0
  401. package/src/core/plugin-loader.mjs +21 -8
  402. package/src/core/plugin-runner.mjs +21 -10
  403. package/src/core/plugin-runtime.mjs +40 -1
  404. package/src/core/plugin-startup-checks.mjs +44 -0
  405. package/src/core/plugin-state.mjs +19 -5
  406. package/src/core/plugin-store.mjs +64 -33
  407. package/src/core/post-mortem.mjs +52 -36
  408. package/src/core/preflight-gate.mjs +23 -2
  409. package/src/core/project-id.mjs +15 -5
  410. package/src/core/proposal-applier.mjs +31 -2
  411. package/src/core/repo-sync.mjs +4 -6
  412. package/src/core/required-plugins.mjs +57 -10
  413. package/src/core/rule-length.mjs +23 -0
  414. package/src/core/runtime.mjs +1 -1
  415. package/src/core/scheduler.mjs +35 -43
  416. package/src/core/schema.mjs +3 -2
  417. package/src/core/search.mjs +4 -3
  418. package/src/core/server-service.mjs +148 -0
  419. package/src/core/session-watcher.mjs +19 -1
  420. package/src/core/skill-gap.mjs +16 -0
  421. package/src/core/ssss-kernel-bridge.mjs +32 -4
  422. package/src/core/ssss-operation-service.mjs +1 -0
  423. package/src/core/startup-health.mjs +34 -4
  424. package/src/core/surface.mjs +65 -54
  425. package/src/core/task-executors.mjs +54 -106
  426. package/src/core/testing/plugin-fixture.mjs +22 -21
  427. package/src/core/throttled-fetch.mjs +25 -18
  428. package/src/core/ui-chunk-choice.mjs +77 -0
  429. package/src/core/ui-chunk.registry.json +23 -0
  430. package/src/core/ui-chunks.mjs +434 -0
  431. package/src/core/validated-write.mjs +1 -0
  432. package/src/core/vault-cache.mjs +58 -59
  433. package/src/core/vector-field.mjs +134 -192
  434. package/src/core/workspace-compositions.mjs +151 -0
  435. package/src/core/workspace-drawers.mjs +79 -0
  436. package/src/server/api.mjs +4 -27
  437. package/src/server/index.mjs +28 -21
  438. package/src/server/invoke-core-child.mjs +24 -0
  439. package/src/server/invoke-core-operations.mjs +102 -0
  440. package/src/server/memory-events.mjs +31 -0
  441. package/src/server/plugin-brain-targets.mjs +89 -0
  442. package/src/server/rest.mjs +2 -0
  443. package/src/server/route-inventory.mjs +3 -2
  444. package/src/server/route-manifest.json +47 -55
  445. package/src/server/routes/_shared.mjs +7 -14
  446. package/src/server/routes/brains.mjs +29 -62
  447. package/src/server/routes/context.mjs +0 -41
  448. package/src/server/routes/dashboard.mjs +26 -0
  449. package/src/server/routes/invoke.mjs +26 -1
  450. package/src/server/routes/plugins.mjs +154 -45
  451. package/src/server/routes/ssss.mjs +0 -169
  452. package/src/server/routes/system.mjs +0 -15
  453. package/src/server/routes/tasks.mjs +0 -26
  454. package/src/server/routes/ui-chunks.mjs +192 -0
  455. package/src/server/routes/vault.mjs +2 -23
  456. package/frontend/dist/assets/index-DD4qONvH.js +0 -5607
  457. package/frontend/dist/assets/index-DtwsDyFM.css +0 -1
  458. package/frontend/src/components/plugins/card/CardEngine.tsx +0 -108
  459. package/frontend/src/components/plugins/card/CardScenes.tsx +0 -103
  460. package/frontend/src/components/plugins/card/ExecutionPicker.tsx +0 -64
  461. package/frontend/src/components/plugins/card/args.ts +0 -28
  462. package/frontend/src/components/plugins/card/card.css +0 -32
  463. package/frontend/src/components/plugins/card/cli-line.ts +0 -13
  464. package/frontend/src/components/plugins/card/contract.ts +0 -91
  465. package/frontend/src/components/plugins/card/format.ts +0 -49
  466. package/frontend/src/components/plugins/card/runner-context.ts +0 -11
  467. package/frontend/src/components/plugins/card/runner.tsx +0 -43
  468. package/frontend/src/components/plugins/card/theme.ts +0 -35
  469. package/frontend/src/components/plugins/card/use-source.ts +0 -22
  470. package/frontend/src/components/plugins/card/widgets.tsx +0 -94
  471. package/frontend/src/components/plugins/workspace/WorkspaceHost.tsx +0 -23
  472. package/frontend/src/pages/PluginsPage.tsx +0 -1719
  473. package/scaffold/.agent/skills/plugin/evals/cases/04-card-collects-credential.mjs +0 -47
  474. package/scaffold/.agent/skills/plugin/prompts/06-card.md +0 -46
  475. package/scaffold/.agent/skills/plugin/references/card.md +0 -90
  476. package/scaffold/.agent/skills/plugin/subagents/card-designer.md +0 -60
  477. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/DESIGN.md +0 -67
  478. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/card.js +0 -1179
  479. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/DESIGN.md +0 -32
  480. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/card.js +0 -588
  481. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/card.js +0 -575
  482. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/DESIGN.md +0 -32
  483. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/card.js +0 -482
  484. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/README.md +0 -53
  485. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/plugin.json +0 -129
  486. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/ui/DESIGN.md +0 -100
  487. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/ui/card.js +0 -637
  488. package/scaffold/.agent/skills/total-recall/plugins/mesh/ui/DESIGN.md +0 -217
  489. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/DESIGN.md +0 -32
  490. package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/card.js +0 -1276
  491. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/DESIGN.md +0 -45
  492. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/card.js +0 -1401
  493. package/scaffold/.agent/skills/total-recall/plugins/security/scripts/build-ui.mjs +0 -4
  494. package/scaffold/.agent/skills/total-recall/plugins/security/ui/DESIGN.md +0 -41
  495. package/scaffold/.agent/skills/total-recall/plugins/security/ui/card.js +0 -396
  496. package/scaffold/.agent/skills/total-recall/plugins/security/ui/panel.js +0 -98
  497. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/DESIGN.md +0 -15
  498. package/scaffold/.agent/skills/total-recall/plugins/ssss/ui/card.js +0 -182
  499. package/src/core/append-log.mjs +0 -131
  500. package/src/core/plugin-tasks.mjs +0 -173
  501. package/templates/onboarding-interview.md +0 -82
  502. /package/scaffold/.agent/skills/total-recall/plugins/{git-sentinel → git}/LICENSE +0 -0
@@ -5,10 +5,11 @@ import { pathToFileURL } from 'node:url';
5
5
  import { configDir } from './src/paths.mjs';
6
6
  import { inspectAgents, getActiveAdapters, getCustomAdaptersDirs, loadCustomAdapters, validateCustomAdapter, adapterPath } from './src/worker.mjs';
7
7
  import { inspectNode, listTargets, executeCommand, executeOnNode } from './src/executor.mjs';
8
- import { DOC_SOURCES, documentationStatus, refreshDocumentation, ensureDocumentation, maintainDocumentation, readDocumentation, searchDocumentation } from './src/documentation.mjs';
8
+ import { DOC_SOURCES, documentationStatus, refreshDocumentation, ensureDocumentation, readDocumentation, searchDocumentation } from './src/documentation.mjs';
9
9
  import { manageRuntime, validateRuntimeOperation } from './src/runtime.mjs';
10
10
  import { validateDispatchRequest } from './src/dispatch-request.mjs';
11
11
  import { setupIntegrations } from './src/setup.mjs';
12
+ import { maintainIntegrations } from './src/maintenance.mjs';
12
13
  import { inspectUpstreamFleet, getAgentChangelog } from './src/tracker.mjs';
13
14
  import { inspectQuotas, getBenchmarks, routeTask } from './src/router.mjs';
14
15
  import { coordinateTask } from './src/coordinator.mjs';
@@ -18,11 +19,19 @@ import { resolvePool } from './src/pool.mjs';
18
19
  import { checkAlerts, notifyAlert } from './src/alerts.mjs';
19
20
  import { learnFromHistory, voidReceipts } from './src/learner.mjs';
20
21
  import { decomposeTask } from './capability/index.mjs';
21
- import { listThreads, getThread, createThread, updateThread, closeThread, deleteThread } from './src/threads.mjs';
22
+ import { listThreads, getThread, createThread, updateThread, closeThread, deleteThread, cleanupFixtureThreads } from './src/threads.mjs';
23
+ import { readReviews } from './src/reviews.mjs';
22
24
  import { executeCodeReview } from './src/review.mjs';
23
- import { stopOnTermination } from './src/termination.mjs';
25
+ import { stopOnTermination, finishCancellation } from './src/termination.mjs';
26
+ import { cancellationResult } from './src/worker.mjs';
27
+ import { startJob, newJobId, cancelJob, resolveJob } from './src/jobs.mjs';
28
+ import { appendCommand, waitingRequests } from './src/control.mjs';
29
+ import { sessionOptions } from './src/session/run.mjs';
30
+ import { continueJob } from './src/session-jobs.mjs';
24
31
 
25
- const VALUE_FLAGS = ['--node', '--mode', '--orchestrator', '--branch', '--reviewer', '--thread', '--status', '--platform', '--agent', '--url', '--query', '--tier', '--threshold', '--author', '--explorer', '--architect', '--implementer', '--verifier', '--title', '--summary', '--cwd', '--tools', '--setting-sources', '--model', '--name', '--tail', '--timeout-ms', '--void', '--reason'];
32
+ import { chatTarget, setChatDefault } from './src/chat.mjs';
33
+
34
+ const VALUE_FLAGS = ['--result-schema-json', '--goal', '--max-turns', '--max-budget-usd', '--max-tokens', '--result-schema', '--at', '--node', '--mode', '--orchestrator', '--branch', '--reviewer', '--thread', '--status', '--platform', '--agent', '--url', '--query', '--tier', '--threshold', '--author', '--explorer', '--architect', '--implementer', '--verifier', '--title', '--summary', '--cwd', '--tools', '--setting-sources', '--model', '--name', '--tail', '--timeout-ms', '--void', '--reason', '--approvals', '--question-timeout-ms', '--brains'];
26
35
  export function parseArguments(args) {
27
36
  const positional = [];
28
37
  for (let index = 1; index < args.length; index += 1) {
@@ -38,30 +47,68 @@ export function parseArguments(args) {
38
47
  return { positional, value, has: name => args.includes(name) };
39
48
  }
40
49
 
41
- export async function run(argv = []) {
50
+ export async function run(argv = [], { backgroundJobId } = {}) {
51
+ // MCP owns stdin/stdout for its whole lifetime. The CLI result wrapper must stay out of that stream.
52
+ if (argv[3] === 'mcp' && !argv.includes('--help') && !argv.includes('-h')) {
53
+ try { await runOperation(argv); }
54
+ catch (error) { console.error(`Metaharness MCP: ${error.message}`); process.exitCode = 1; }
55
+ return;
56
+ }
42
57
  stopOnTermination();
43
- try { await runOperation(argv); }
58
+ let job, result;
59
+ const previousJob = process.env.TR_METAHARNESS_JOB;
60
+ try {
61
+ const args = argv.slice(3), operation = args[0];
62
+ if (!args.includes('--help') && !args.includes('-h') && !args.includes('--background') &&
63
+ (['dispatch', 'fork', 'resume'].includes(operation) || (['route', 'coordinate', 'orchestrate'].includes(operation) && args.includes('--execute')))) {
64
+ job = startJob(operation, backgroundJobId ? { id: backgroundJobId } : {});
65
+ process.env.TR_METAHARNESS_JOB = job.job;
66
+ }
67
+ result = await runOperation(argv);
68
+ }
44
69
  catch (error) {
45
70
  const message = String(error?.message || error);
46
- if (argv.includes('--json')) console.log(JSON.stringify({ ok: false, error: message }));
47
- else console.error(`meta-harness: ${message}`);
71
+ result = { ok: false, error: message };
72
+ if (!argv.includes('--json')) console.error(`meta-harness: ${message}`);
48
73
  process.exitCode = 1;
49
74
  }
75
+ result = finishCancellation(result);
76
+ if (result !== undefined) {
77
+ if (job) {
78
+ if (result.execution?.remote && result.job) result.execution = { ...result.execution, remoteJob: result.job };
79
+ result = { ...result, job: job.job };
80
+ }
81
+ job?.finish(result);
82
+ if (!backgroundJobId) console.log(JSON.stringify(result));
83
+ }
84
+ if (previousJob === undefined) delete process.env.TR_METAHARNESS_JOB;
85
+ else process.env.TR_METAHARNESS_JOB = previousJob;
50
86
  }
51
87
 
52
88
  /** The host stops a plugin command after 10 minutes, so long runs detach and report through their thread and log. */
53
89
  async function detachRun(argv) {
54
90
  const directory = path.join(configDir(), 'jobs');
55
91
  fs.mkdirSync(directory, { recursive: true, mode: 0o700 });
56
- const log = path.join(directory, `${Date.now().toString(36)}.log`);
92
+ const id = newJobId();
93
+ const log = path.join(directory, `${id}.log`);
57
94
  const output = fs.openSync(log, 'a', 0o600);
58
95
  const entry = new URL('./cli.mjs', import.meta.url).href;
59
- const child = spawn(process.execPath, ['--input-type=module', '-e', `import(${JSON.stringify(entry)}).then(m=>m.run(${JSON.stringify(argv.filter(arg => arg !== '--background'))}))`], { cwd: process.cwd(), detached: true, stdio: ['ignore', output, output], env: process.env });
96
+ const input = argv[3] === 'dispatch' ? fs.readFileSync(0, 'utf8') : null;
97
+ const child = spawn(process.execPath, ['--input-type=module', '-e', `import(${JSON.stringify(entry)}).then(m=>m.run(${JSON.stringify(argv.filter(arg => arg !== '--background'))}, {backgroundJobId:${JSON.stringify(id)}}))`], { cwd: process.cwd(), detached: true, stdio: [input === null ? 'ignore' : 'pipe', output, output], env: process.env });
98
+ if (input !== null) { child.stdin.on('error', () => {}); child.stdin.end(input); }
60
99
  try {
61
100
  await new Promise((resolve, reject) => { child.once('spawn', resolve); child.once('error', reject); });
101
+ const deadline = Date.now() + 10_000;
102
+ while (!fs.statSync(log).size) {
103
+ if (child.exitCode !== null || Date.now() > deadline) {
104
+ child.kill('SIGTERM');
105
+ throw new Error(`The background job did not record its PID. Log: ${log}`);
106
+ }
107
+ await new Promise(resolve => setTimeout(resolve, 20));
108
+ }
62
109
  child.unref();
63
110
  } finally { fs.closeSync(output); }
64
- return { ok: true, background: true, pid: child.pid, log, follow: `The final JSON result is written to ${log}; a pipeline also records a thread.` };
111
+ return { ok: true, background: true, job: id, pid: child.pid, log, follow: `The final JSON result is written to ${log}; a pipeline also records a thread.` };
65
112
  }
66
113
 
67
114
  async function runOperation(argv) {
@@ -81,10 +128,17 @@ async function runOperation(argv) {
81
128
  for(const command of manifest.cli.subcommands)console.log(` ${command.name} ${(command.args || []).map(arg=>arg.flag?`${arg.flag} <${arg.name}>`:`<${arg.name}>`).join(' ')} — ${command.description}`);
82
129
  return;
83
130
  }
84
- if (has('--background') && ['route', 'coordinate', 'orchestrate'].includes(operation) && has('--execute')) { console.log(JSON.stringify(await detachRun(argv))); return; }
131
+ if (has('--background') && (['dispatch', 'fork', 'resume'].includes(operation) || (['route', 'coordinate', 'orchestrate'].includes(operation) && has('--execute')))) return detachRun(argv);
132
+ const controls = () => sessionOptions({ cwd: value('--cwd') || process.cwd(),
133
+ ...(value('--result-schema-json') !== undefined ? { resultSchema: JSON.parse(value('--result-schema-json')) } : {}),
134
+ ...Object.fromEntries([['goal', '--goal'], ['maxTurns', '--max-turns'], ['maxBudgetUsd', '--max-budget-usd'], ['maxTokens', '--max-tokens'],
135
+ ['resultSchema', '--result-schema'], ['approvalPolicy', '--approvals'], ['questionTimeoutMs', '--question-timeout-ms']]
136
+ .filter(([, flag]) => value(flag) !== undefined).map(([key, flag]) => [key, ['maxTurns', 'maxBudgetUsd', 'maxTokens', 'questionTimeoutMs'].includes(key) ? Number(value(flag)) : value(flag)])) });
85
137
  let result;
86
138
  if (operation === 'status') result = {...await inspectNode(value('--node') || 'local'),documentation:documentationStatus()};
87
139
  else if (operation === 'catalog') result = { adapters: getActiveAdapters(), permissions: ['read', 'write', 'send', 'destructive'] };
140
+ else if (operation === 'chat-target') result = chatTarget(value('--brains'));
141
+ else if (operation === 'chat-default') result = setChatDefault(positional[0], value('--url'));
88
142
  else if (operation === 'nodes') result = await listTargets();
89
143
  else if (operation === 'adoption') {
90
144
  const node = value('--node');
@@ -122,7 +176,7 @@ async function runOperation(argv) {
122
176
  else if (operation === 'route') {
123
177
  const task = positional.join(' ');
124
178
  if (!task) throw new Error('route requires a task description');
125
- const options = { jev: has('--jev'), preferLocal: has('--prefer-local'), preferFrontier: has('--prefer-frontier'), node: value('--node'), cwd: value('--cwd'), allowUnknownAuth: has('--allow-unknown-auth'), ...remoteTimeout() };
179
+ const options = { ...controls(), jev: has('--jev'), preferLocal: has('--prefer-local'), preferFrontier: has('--prefer-frontier'), node: value('--node'), cwd: value('--cwd'), allowUnknownAuth: has('--allow-unknown-auth'), ...remoteTimeout() };
126
180
  result = has('--execute') ? await executeRoutedTask(task, { ...options, gate: has('--gate'), gateOptions: { tier: value('--tier') || 'fast' } }) : await routeTask(task, options);
127
181
  if (!result.ok) process.exitCode = 1;
128
182
  }
@@ -136,7 +190,7 @@ async function runOperation(argv) {
136
190
  const task = positional.join(' ');
137
191
  if (!task) throw new Error(`${operation} requires a task description`);
138
192
  result = await coordinateTask(task, {
139
- mode: value('--mode') || 'pipeline', execute: has('--execute'), orchestrator: value('--orchestrator'), explorer: value('--explorer'), architect: value('--architect'), implementer: value('--implementer'), verifier: value('--verifier'),
193
+ ...controls(), mode: value('--mode') || 'pipeline', execute: has('--execute'), orchestrator: value('--orchestrator'), explorer: value('--explorer'), architect: value('--architect'), implementer: value('--implementer'), verifier: value('--verifier'),
140
194
  branch: value('--branch'), subagents: !has('--no-subagents'), autoReview: has('--auto-review'), gate: has('--gate'), gateOptions: { tier: value('--tier') || 'fast' }, allowSameFamily: has('--allow-same-family'), reviewer: value('--reviewer'),
141
195
  node: value('--node') || 'local', cwd: value('--cwd'), allowUnknownAuth: has('--allow-unknown-auth'), ...remoteTimeout(),
142
196
  });
@@ -151,6 +205,8 @@ async function runOperation(argv) {
151
205
  status: statusIdx >= 0 ? args[statusIdx + 1] : undefined,
152
206
  platform: platformIdx >= 0 ? args[platformIdx + 1] : undefined
153
207
  });
208
+ } else if (sub === 'cleanup-fixtures') {
209
+ result = cleanupFixtureThreads({ dryRun: has('--dry-run') });
154
210
  } else if (sub === 'show' || sub === 'get') {
155
211
  const id = args[2];
156
212
  if (!id) throw new Error('threads show requires a thread id');
@@ -181,14 +237,16 @@ async function runOperation(argv) {
181
237
  throw new Error(`Unsupported threads operation: ${sub}`);
182
238
  }
183
239
  }
240
+ else if (operation === 'reviews') result = { ok: true, reviews: readReviews() };
184
241
  else if (operation === 'review') {
185
242
  result = await executeCodeReview({ target: positional[0] || null, reviewer: value('--reviewer'), author: value('--author'), threadId: value('--thread'), staged: has('--staged'), node: value('--node') || 'local', cwd: value('--cwd'), allowUnknownAuth: has('--allow-unknown-auth'), ...remoteTimeout() });
186
243
  if (!result.ok) process.exitCode = 1;
187
244
  }
188
245
  else if (operation === 'learn') {
246
+ if (has('--emit')) throw new Error('learn --emit was removed. Routing reads run receipts directly.');
189
247
  result = value('--void') !== undefined
190
248
  ? await voidReceipts({ ids: String(value('--void')).split(',').map(id => id.trim()).filter(Boolean), reason: value('--reason') })
191
- : await learnFromHistory({ emit: has('--emit') });
249
+ : await learnFromHistory();
192
250
  if (!result.ok) process.exitCode = 1;
193
251
  }
194
252
  else if (operation === 'alerts') {
@@ -196,7 +254,7 @@ async function runOperation(argv) {
196
254
  if (sub === 'check') {
197
255
  const { quotas } = await inspectQuotas({});
198
256
  result = await checkAlerts({ quotas, threshold: Number(value('--threshold')) || 85, dryRun: has('--dry-run') });
199
- } else if (sub === 'test') result = await notifyAlert({ title: 'Meta Harness: test alert', message: 'Alert delivery check.', dryRun: has('--dry-run') });
257
+ } else if (sub === 'test') result = await notifyAlert({ title: 'Metaharness: test alert', message: 'Alert delivery check.', dryRun: has('--dry-run') });
200
258
  else throw new Error(`Unsupported alerts operation: ${sub}`);
201
259
  if (!result.ok) process.exitCode = 1;
202
260
  }
@@ -256,11 +314,7 @@ async function runOperation(argv) {
256
314
  const { syncModelCatalog } = await import('./src/model-catalog.mjs');
257
315
  result = await syncModelCatalog();
258
316
  } else {
259
- const setup=await setupIntegrations();
260
- const { installAll } = await import('./src/gate-adapters/index.mjs');
261
- const gates=await installAll();
262
- const docs=await maintainDocumentation(options);
263
- result={...docs,ok:docs.ok!==false&&gates.ok,setup,gates};
317
+ result=await maintainIntegrations(options);
264
318
  }
265
319
  } else result = operation==='docs-status' ? documentationStatus(options) : operation==='docs-ensure' ? await ensureDocumentation(options) : await refreshDocumentation(options);
266
320
  if(!result.ok)process.exitCode=1;
@@ -296,11 +350,60 @@ async function runOperation(argv) {
296
350
  result = { ok: true, logs: await processes.getAgentLogs(target, Number(value('--tail') || 50)) };
297
351
  } else throw new Error(`Unsupported process operation: ${action}`);
298
352
  }
353
+ else if (operation === 'fork' || operation === 'resume') {
354
+ if (positional.length !== (operation === 'fork' ? 1 : 2)) throw new Error(`${operation} requires a job${operation === 'resume' ? ' and quoted text' : ''}.`);
355
+ result = await continueJob(positional[0], operation === 'fork' ? 'Continue from this session.' : positional[1], { fork: operation === 'fork', atTurn: value('--at') });
356
+ if (!result.ok) process.exitCode = 1;
357
+ }
358
+ else if (operation === 'cancel') {
359
+ result = await cancelJob(positional[0]);
360
+ }
361
+ else if (['reply', 'approve', 'interrupt', 'goal'].includes(operation)) {
362
+ if (!positional[0]) throw new Error(`${operation} requires a job ID.`);
363
+ if (positional.length !== (operation === 'approve' ? 3 : operation === 'interrupt' ? 1 : 2)) {
364
+ throw new Error(`${operation}: supply a job${operation === 'approve' ? ', request ID, and allow or deny' : operation === 'interrupt' ? '' : ' and quoted text'}.`);
365
+ }
366
+ result = await appendCommand(positional[0], { type: operation,
367
+ ...(operation === 'approve' ? { requestId: positional[1], value: positional[2] } : operation === 'interrupt' ? {} : { text: positional[1] }) },
368
+ { local: has('--local-delivery') });
369
+ }
370
+ else if (operation === 'mcp') {
371
+ const { runMcpServer, QUESTION_TIMEOUT_MS } = await import('./src/mcp-server.mjs');
372
+ await runMcpServer({ approvalPolicy: value('--approvals') || 'auto',
373
+ questionTimeoutMs: value('--question-timeout-ms') === undefined ? QUESTION_TIMEOUT_MS : Number(value('--question-timeout-ms')) });
374
+ return;
375
+ }
376
+ else if (operation === 'watch') {
377
+ // A-107: a dispatched agent's live status and latest events, by log path or job prefix.
378
+ const target = positional[0];
379
+ const jobs = path.join(configDir(), 'jobs');
380
+ let file = target && target.endsWith('.events.jsonl') ? path.resolve(target) : null;
381
+ if (target && !file) {
382
+ try {
383
+ const job = resolveJob(target);
384
+ const canonical = path.join(jobs, `${job.id}.events.jsonl`);
385
+ if (fs.existsSync(canonical)) file = canonical;
386
+ } catch (error) {
387
+ if (!error.message.startsWith('No job log matches')) throw error;
388
+ }
389
+ }
390
+ if (!file) {
391
+ const names = fs.existsSync(jobs) ? fs.readdirSync(jobs).filter(name => name.endsWith('.events.jsonl') && (!target || name.startsWith(target))) : [];
392
+ const newest = names.map(name => ({ name, at: fs.statSync(path.join(jobs, name)).mtimeMs })).sort((a, b) => b.at - a.at)[0];
393
+ if (!newest) throw new Error(target ? `No job log matches ${target}` : 'No dispatched job has a live log yet');
394
+ file = path.join(jobs, newest.name);
395
+ }
396
+ const { readProgress } = await import('./src/worker.mjs');
397
+ result = { ok: true, file, ...readProgress(file, Number(value('--tail') || 20)), waiting: waitingRequests(file) };
398
+ }
299
399
  else if(operation==='dispatch') {
300
400
  if(!args.includes('--stdin'))throw new Error('Task requests must arrive through stdin: pass --stdin with JSON {agent, cwd, prompt}');
301
401
  const input=fs.readFileSync(0,'utf8');if(Buffer.byteLength(input)>65536)throw new Error('Task request too large');
302
- const request=validateDispatchRequest(JSON.parse(input));
303
- result=await dispatchWithReceipt(request,{node:request.node || 'local',role:'Dispatch'});
402
+ const request=validateDispatchRequest({...JSON.parse(input),...controls()});
403
+ // A-107: a local dispatch streams its agent's events to a live log, announced before it starts.
404
+ const progressFile=(request.node||'local')==='local'?path.join(configDir(),'jobs',`${process.env.TR_METAHARNESS_JOB || `dispatch-${Date.now().toString(36)}-${request.agent}`}.events.jsonl`):undefined;
405
+ if(progressFile)console.error(JSON.stringify({progress:progressFile,agent:request.agent}));
406
+ result=await dispatchWithReceipt(progressFile?{...request,progressFile}:request,{node:request.node || 'local',role:'Dispatch',manageWrites:true});
304
407
  if(!result.ok)process.exitCode=1;
305
408
  }
306
409
  else if (operation === 'inspect') {
@@ -321,6 +424,7 @@ async function runOperation(argv) {
321
424
  result = await executeCommand({ ...request, plugin });
322
425
  if (!result.ok) process.exitCode = 1;
323
426
  } else throw new Error(`Unknown operation: ${operation}`);
324
- console.log(JSON.stringify(result));
427
+ if (cancellationResult()) process.exitCode = cancellationResult().exitCode;
428
+ return result;
325
429
  }
326
430
  export default run;
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "tr-plugin-meta-harness",
3
- "version": "0.3.9",
3
+ "version": "0.4.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "tr-plugin-meta-harness",
9
- "version": "0.3.9",
9
+ "version": "0.4.0",
10
10
  "dependencies": {
11
11
  "@gregiteen/ssss-cli": "0.14.5"
12
12
  },
13
13
  "devDependencies": {
14
- "total-recall-brain": "3.43.3"
14
+ "total-recall-brain": "3.45.0"
15
15
  }
16
16
  },
17
17
  "node_modules/@alcalzone/ansi-tokenize": {
@@ -5546,9 +5546,9 @@
5546
5546
  }
5547
5547
  },
5548
5548
  "node_modules/total-recall-brain": {
5549
- "version": "3.43.3",
5550
- "resolved": "https://registry.npmjs.org/total-recall-brain/-/total-recall-brain-3.43.3.tgz",
5551
- "integrity": "sha512-yjfPN/BQxEEa+iodyFXQov/6fRt1pZg/7RcmgsbpALwBt6Ki3JJjT3tzArBC7NxHQmXgGYyKnCYId6xe/W2rPg==",
5549
+ "version": "3.45.0",
5550
+ "resolved": "https://registry.npmjs.org/total-recall-brain/-/total-recall-brain-3.45.0.tgz",
5551
+ "integrity": "sha512-HDYfROazZbsLHQsFPnlBcSpe1HL1QEi7JG8x/eNRUI06RxVQsZWl8LwBo2lTWjWRDrKmCy7BUmSXQDuWF3lrEw==",
5552
5552
  "dev": true,
5553
5553
  "license": "MIT",
5554
5554
  "workspaces": [
@@ -5556,7 +5556,7 @@
5556
5556
  ],
5557
5557
  "dependencies": {
5558
5558
  "@simplewebauthn/server": "^13.3.2",
5559
- "@ssss/cli": "npm:@gregiteen/ssss-cli@0.14.4",
5559
+ "@ssss/cli": "npm:@gregiteen/ssss-cli@0.14.5",
5560
5560
  "bcrypt": "^6.0.0",
5561
5561
  "better-sqlite3": "^12.11.1",
5562
5562
  "cookie-parser": "^1.4.7",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "tr-plugin-meta-harness",
3
- "version": "0.3.9",
4
- "description": "Total Recall Meta Harness plugin",
3
+ "version": "0.4.0",
4
+ "description": "Total Recall Metaharness plugin",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "test": "node --import ./test/isolate.mjs --test test/*.test.mjs",
@@ -12,6 +12,7 @@
12
12
  "cli.mjs",
13
13
  "plugin.json",
14
14
  "README.md",
15
+ "DESIGN.md",
15
16
  "src/",
16
17
  "!src/**/*.spec.mjs",
17
18
  "ui/",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "id": "meta-harness",
3
- "name": "Meta Harness",
4
- "version": "0.3.9",
3
+ "name": "Metaharness",
4
+ "version": "0.4.0",
5
5
  "description": "Discover, configure, document, track, and run coding agent harnesses through Total Recall across mesh nodes.",
6
6
  "gate": {
7
7
  "tasks": ["Run work in another agent harness", "Choose which harness takes a task", "Check harness versions, sign-in and quota", "Read a harness's official documentation"],
@@ -45,6 +45,41 @@
45
45
  "output": "json",
46
46
  "args": []
47
47
  },
48
+ {
49
+ "name": "chat-target",
50
+ "description": "Resolve the default Chat harness and prepare a draft for the selected brains",
51
+ "effect": "read",
52
+ "output": "json",
53
+ "args": [
54
+ {
55
+ "name": "brains",
56
+ "flag": "--brains",
57
+ "type": "string",
58
+ "label": "Selected brain IDs, comma separated"
59
+ }
60
+ ]
61
+ },
62
+ {
63
+ "name": "chat-default",
64
+ "description": "Save the default Chat harness for every brain selection",
65
+ "effect": "write",
66
+ "output": "json",
67
+ "args": [
68
+ {
69
+ "name": "adapter",
70
+ "type": "string",
71
+ "label": "Metaharness adapter ID",
72
+ "required": true,
73
+ "positional": true
74
+ },
75
+ {
76
+ "name": "url",
77
+ "flag": "--url",
78
+ "type": "string",
79
+ "label": "Optional Chat launch URL"
80
+ }
81
+ ]
82
+ },
48
83
  {
49
84
  "name": "nodes",
50
85
  "description": "List recorded mesh targets without probing or changing them",
@@ -124,9 +159,119 @@
124
159
  "description": "Run a task from stdin after automatic Total Recall bootstrap",
125
160
  "effect": "write",
126
161
  "output": "json",
127
- "args": [],
162
+ "args": [
163
+ { "name": "background", "flag": "--background", "type": "boolean", "label": "Return the job ID and log" },
164
+ { "name": "goal", "flag": "--goal", "type": "string", "label": "Goal checked at completion" },
165
+ { "name": "maxTurns", "flag": "--max-turns", "type": "number", "label": "Job turn limit" },
166
+ { "name": "maxBudgetUsd", "flag": "--max-budget-usd", "type": "number", "label": "Job cost limit in USD" },
167
+ { "name": "maxTokens", "flag": "--max-tokens", "type": "number", "label": "Job token limit" },
168
+ { "name": "resultSchema", "flag": "--result-schema", "type": "string", "label": "JSON Schema file" },
169
+ { "name": "approvals", "flag": "--approvals", "type": "string", "label": "auto, operator, or rules" },
170
+ { "name": "questionTimeoutMs", "flag": "--question-timeout-ms", "type": "number", "label": "Question timeout in milliseconds" }
171
+ ],
172
+ "timeout_ms": 600000
173
+ },
174
+ {
175
+ "name": "fork",
176
+ "description": "Start a new job from a saved session and branch",
177
+ "effect": "write",
178
+ "output": "json",
179
+ "args": [
180
+ { "name": "job", "type": "string", "positional": true, "required": true, "label": "Job ID prefix" },
181
+ { "name": "at", "flag": "--at", "type": "string", "label": "Last turn to copy when supported" },
182
+ { "name": "background", "flag": "--background", "type": "boolean", "label": "Return the job ID and log" }
183
+ ],
184
+ "timeout_ms": 600000
185
+ },
186
+ {
187
+ "name": "resume",
188
+ "description": "Continue a finished job session on its saved branch",
189
+ "effect": "write",
190
+ "output": "json",
191
+ "args": [
192
+ { "name": "job", "type": "string", "positional": true, "required": true, "label": "Job ID prefix" },
193
+ { "name": "text", "type": "string", "positional": true, "required": true, "label": "Continuation message" },
194
+ { "name": "background", "flag": "--background", "type": "boolean", "label": "Return the job ID and log" }
195
+ ],
128
196
  "timeout_ms": 600000
129
197
  },
198
+ {
199
+ "name": "cancel",
200
+ "description": "Stop a running job and wait up to 60 seconds for its cancelled result",
201
+ "effect": "write",
202
+ "output": "json",
203
+ "args": [
204
+ { "name": "job", "type": "string", "label": "Job ID prefix or log path", "positional": true, "required": true }
205
+ ],
206
+ "timeout_ms": 65000
207
+ },
208
+ {
209
+ "name": "reply",
210
+ "description": "Send a reply to a running job or answer its oldest waiting question",
211
+ "effect": "write",
212
+ "output": "json",
213
+ "args": [
214
+ { "name": "job", "type": "string", "label": "Job ID prefix or log path", "positional": true, "required": true },
215
+ { "name": "text", "type": "string", "label": "Reply text", "positional": true, "required": true },
216
+ { "name": "localDelivery", "flag": "--local-delivery", "type": "boolean", "label": "Deliver on this node" }
217
+ ],
218
+ "timeout_ms": 65000
219
+ },
220
+ {
221
+ "name": "approve",
222
+ "description": "Allow or deny a waiting job approval",
223
+ "effect": "write",
224
+ "output": "json",
225
+ "args": [
226
+ { "name": "job", "type": "string", "label": "Job ID prefix or log path", "positional": true, "required": true },
227
+ { "name": "requestId", "type": "string", "label": "Approval request ID", "positional": true, "required": true },
228
+ { "name": "value", "type": "string", "label": "allow or deny", "positional": true, "required": true },
229
+ { "name": "localDelivery", "flag": "--local-delivery", "type": "boolean", "label": "Deliver on this node" }
230
+ ],
231
+ "timeout_ms": 65000
232
+ },
233
+ {
234
+ "name": "interrupt",
235
+ "description": "Stop the current job turn and keep its session resumable",
236
+ "effect": "write",
237
+ "output": "json",
238
+ "args": [
239
+ { "name": "job", "type": "string", "label": "Job ID prefix or log path", "positional": true, "required": true },
240
+ { "name": "localDelivery", "flag": "--local-delivery", "type": "boolean", "label": "Deliver on this node" }
241
+ ],
242
+ "timeout_ms": 65000
243
+ },
244
+ {
245
+ "name": "goal",
246
+ "description": "Set the goal of a running job",
247
+ "effect": "write",
248
+ "output": "json",
249
+ "args": [
250
+ { "name": "job", "type": "string", "label": "Job ID prefix or log path", "positional": true, "required": true },
251
+ { "name": "text", "type": "string", "label": "Goal text", "positional": true, "required": true },
252
+ { "name": "localDelivery", "flag": "--local-delivery", "type": "boolean", "label": "Deliver on this node" }
253
+ ],
254
+ "timeout_ms": 65000
255
+ },
256
+ {
257
+ "name": "mcp",
258
+ "description": "Serve the Metaharness ask and approve tools over MCP stdio",
259
+ "effect": "write",
260
+ "args": [
261
+ { "name": "approvals", "flag": "--approvals", "type": "string", "label": "Approval policy: auto, operator, or rules" },
262
+ { "name": "questionTimeoutMs", "flag": "--question-timeout-ms", "type": "number", "label": "Question timeout in milliseconds" }
263
+ ]
264
+ },
265
+ {
266
+ "name": "watch",
267
+ "description": "Show job status, recent events, waiting questions and approvals",
268
+ "effect": "read",
269
+ "output": "json",
270
+ "args": [
271
+ { "name": "job", "type": "string", "label": "Job id prefix or event log path", "positional": true },
272
+ { "name": "tail", "flag": "--tail", "type": "string", "label": "Events to show" }
273
+ ]
274
+ },
130
275
  {
131
276
  "name": "included-status",
132
277
  "description": "Read included usage policy and optionally check Codex allowance without a turn",
@@ -383,6 +528,13 @@
383
528
  "output": "json",
384
529
  "timeout_ms": 600000,
385
530
  "args": [
531
+ { "name": "goal", "flag": "--goal", "type": "string", "label": "Goal checked at completion" },
532
+ { "name": "maxTurns", "flag": "--max-turns", "type": "number", "label": "Job turn limit" },
533
+ { "name": "maxBudgetUsd", "flag": "--max-budget-usd", "type": "number", "label": "Job cost limit in USD" },
534
+ { "name": "maxTokens", "flag": "--max-tokens", "type": "number", "label": "Job token limit" },
535
+ { "name": "resultSchema", "flag": "--result-schema", "type": "string", "label": "JSON Schema file" },
536
+ { "name": "approvals", "flag": "--approvals", "type": "string", "label": "auto, operator, or rules" },
537
+ { "name": "questionTimeoutMs", "flag": "--question-timeout-ms", "type": "number", "label": "Question timeout in milliseconds" },
386
538
  {
387
539
  "name": "task",
388
540
  "type": "string",
@@ -427,6 +579,13 @@
427
579
  "effect": "write",
428
580
  "output": "json",
429
581
  "args": [
582
+ { "name": "goal", "flag": "--goal", "type": "string", "label": "Goal checked at completion" },
583
+ { "name": "maxTurns", "flag": "--max-turns", "type": "number", "label": "Job turn limit" },
584
+ { "name": "maxBudgetUsd", "flag": "--max-budget-usd", "type": "number", "label": "Job cost limit in USD" },
585
+ { "name": "maxTokens", "flag": "--max-tokens", "type": "number", "label": "Job token limit" },
586
+ { "name": "resultSchema", "flag": "--result-schema", "type": "string", "label": "JSON Schema file" },
587
+ { "name": "approvals", "flag": "--approvals", "type": "string", "label": "auto, operator, or rules" },
588
+ { "name": "questionTimeoutMs", "flag": "--question-timeout-ms", "type": "number", "label": "Question timeout in milliseconds" },
430
589
  {
431
590
  "name": "task",
432
591
  "type": "string",
@@ -474,16 +633,10 @@
474
633
  },
475
634
  {
476
635
  "name": "learn",
477
- "description": "Summarize run receipts into scorecards and quota walls; --emit writes proposals to memory",
636
+ "description": "Summarize run receipts into scorecards, quota walls and proposals",
478
637
  "effect": "write",
479
638
  "output": "json",
480
639
  "args": [
481
- {
482
- "name": "emit",
483
- "flag": "--emit",
484
- "type": "boolean",
485
- "label": "Write proposals through the memory owner"
486
- },
487
640
  { "name": "void", "flag": "--void", "type": "string", "label": "Comma-separated receipt ids to void" },
488
641
  { "name": "reason", "flag": "--reason", "type": "string", "label": "Why the receipts are void" }
489
642
  ]
@@ -584,7 +737,7 @@
584
737
  {
585
738
  "name": "action",
586
739
  "type": "string",
587
- "label": "list | show | create | update | close | delete",
740
+ "label": "list | show | create | update | close | delete | cleanup-fixtures",
588
741
  "required": true,
589
742
  "positional": true
590
743
  },
@@ -598,7 +751,8 @@
598
751
  { "name": "summary", "flag": "--summary", "type": "string", "label": "Thread summary" },
599
752
  { "name": "status", "flag": "--status", "type": "string", "label": "Lifecycle status or list filter" },
600
753
  { "name": "platform", "flag": "--platform", "type": "string", "label": "Harness platform or list filter" },
601
- { "name": "branch", "flag": "--branch", "type": "string", "label": "Deliverable branch" }
754
+ { "name": "branch", "flag": "--branch", "type": "string", "label": "Deliverable branch" },
755
+ { "name": "dryRun", "flag": "--dry-run", "type": "boolean", "label": "Preview fixture cleanup" }
602
756
  ]
603
757
  },
604
758
  {
@@ -623,6 +777,13 @@
623
777
  { "name": "allowUnknownAuth", "type": "boolean", "flag": "--allow-unknown-auth", "label": "Explicitly allow an unknown login state" }
624
778
  ]
625
779
  },
780
+ {
781
+ "name": "reviews",
782
+ "description": "Read durable review results, including disposition and selected diff",
783
+ "effect": "read",
784
+ "output": "json",
785
+ "args": []
786
+ },
626
787
  {
627
788
  "name": "review",
628
789
  "description": "Execute automated adversarial cross-model code review on Git diffs, PR branches, or staged changes",
@@ -682,36 +843,22 @@
682
843
  "setup_command": "setup"
683
844
  },
684
845
  "branding": {
685
- "name": "Meta Harness",
846
+ "name": "Metaharness",
686
847
  "color": "#3b82f6",
687
848
  "accent": "#38bdf8",
688
849
  "background": "#0c1427",
689
850
  "font": "system"
690
851
  },
691
852
  "ui": {
853
+ "home": "home",
854
+ "design_tokens": "DESIGN.md",
692
855
  "elements": [
693
856
  {
694
- "id": "meta-harness-card",
695
- "kind": "card",
696
- "tag": "meta-harness-card",
697
- "module": "ui/card.js",
698
- "description": "Meta Harness multi-agent coordination matrix"
699
- }
700
- ]
701
- },
702
- "card_face": {
703
- "quick_actions": [
704
- {
705
- "subcommand": "status",
706
- "label": "Local agents"
707
- },
708
- {
709
- "subcommand": "nodes",
710
- "label": "Mesh nodes"
711
- },
712
- {
713
- "subcommand": "catalog",
714
- "label": "Adapters"
857
+ "id": "home",
858
+ "kind": "panel",
859
+ "tag": "tr-metaharness-home",
860
+ "module": "ui/home.js",
861
+ "description": "Default Chat harness and launch destination"
715
862
  }
716
863
  ]
717
864
  },
@@ -741,6 +888,13 @@
741
888
  "command": "maintenance --models",
742
889
  "placement": "selected-node",
743
890
  "timeout_ms": 300000
891
+ },
892
+ {
893
+ "intent": "Report quota walls and measured usage to the operator",
894
+ "schedule": "*/15 * * * *",
895
+ "command": "alerts check",
896
+ "placement": "selected-node",
897
+ "timeout_ms": 60000
744
898
  }
745
899
  ]
746
900
  }