total-recall-brain 3.40.1 → 3.40.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/README.md +152 -41
  2. package/bin/total-recall.mjs +16 -76
  3. package/docs/reference/cli-reference.md +10 -10
  4. package/extension/background.js +6 -2
  5. package/extension/config.js +8 -0
  6. package/extension/lib/brain-client.js +29 -4
  7. package/extension/options/options.html +1 -0
  8. package/extension/sidepanel/sidepanel.html +1 -0
  9. package/frontend/dist/assets/{index-CvQRdT2j.css → index-AGUes-VG.css} +1 -1
  10. package/frontend/dist/assets/index-Bt5iVPZj.js +5618 -0
  11. package/frontend/dist/index.html +2 -2
  12. package/frontend/src/api/keys.ts +9 -2
  13. package/frontend/src/api/plugins.ts +4 -0
  14. package/frontend/src/components/plugins/card/CardEngine.tsx +2 -1
  15. package/frontend/src/components/plugins/card/card.css +1 -1
  16. package/frontend/src/pages/IntegrationsPage.tsx +315 -8
  17. package/frontend/src/pages/PluginsPage.tsx +532 -87
  18. package/package.json +6 -5
  19. package/scaffold/.agent/skills/meta-harness/references/optimized/original.md +1 -1
  20. package/scaffold/.agent/skills/meta-harness/references/optimized/section-09.md +1 -1
  21. package/scaffold/.agent/skills/total-recall/plugins/auth/package-lock.json +10 -10
  22. package/scaffold/.agent/skills/total-recall/plugins/auth/package.json +1 -6
  23. package/scaffold/.agent/skills/total-recall/plugins/auth/plugin.json +0 -1
  24. package/scaffold/.agent/skills/total-recall/plugins/auth/src/browser-session.mjs +309 -4
  25. package/scaffold/.agent/skills/total-recall/plugins/auth/src/cli-secret.mjs +44 -34
  26. package/scaffold/.agent/skills/total-recall/plugins/auth/src/google-oauth.mjs +6 -4
  27. package/scaffold/.agent/skills/total-recall/plugins/auth/src/provider-catalog.mjs +1 -1
  28. package/scaffold/.agent/skills/total-recall/plugins/auth/src/provider-rotation-recipes.mjs +118 -4
  29. package/scaffold/.agent/skills/total-recall/plugins/auth/src/routes/auth.mjs +2 -2
  30. package/scaffold/.agent/skills/total-recall/plugins/auth/src/secrets-env-export.mjs +3 -3
  31. package/scaffold/.agent/skills/total-recall/plugins/auth/src/secrets-remote-deploy.mjs +1 -1
  32. package/scaffold/.agent/skills/total-recall/plugins/auth/src/secrets-rotate.mjs +24 -6
  33. package/scaffold/.agent/skills/total-recall/plugins/auth/ui/card.js +164 -123
  34. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/README.md +65 -0
  35. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/cli.mjs +76 -0
  36. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/package.json +19 -0
  37. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/plugin.json +290 -0
  38. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/adapters/dsh.mjs +446 -0
  39. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/documentation.mjs +152 -0
  40. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/executor.mjs +71 -0
  41. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/runtime.mjs +36 -0
  42. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/setup.mjs +35 -0
  43. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/worker.mjs +175 -0
  44. package/scaffold/.agent/skills/total-recall/plugins/cli-agents/ui/card.js +18 -0
  45. package/scaffold/.agent/skills/total-recall/plugins/code-quality/LICENSE +21 -0
  46. package/scaffold/.agent/skills/total-recall/plugins/code-quality/README.md +84 -0
  47. package/scaffold/.agent/skills/total-recall/plugins/code-quality/cli.mjs +79 -0
  48. package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/check.mjs +6 -0
  49. package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/report.mjs +6 -0
  50. package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/run-core.mjs +27 -0
  51. package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/snapshot.mjs +163 -0
  52. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/check.mjs +757 -0
  53. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/config.schema.json +86 -0
  54. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/detect.mjs +89 -0
  55. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/report-data.mjs +145 -0
  56. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/report.mjs +210 -0
  57. package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/state.mjs +20 -0
  58. package/scaffold/.agent/skills/total-recall/plugins/code-quality/package-lock.json +2869 -0
  59. package/scaffold/.agent/skills/total-recall/plugins/code-quality/package.json +28 -0
  60. package/scaffold/.agent/skills/total-recall/plugins/code-quality/plugin.json +186 -0
  61. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/DESIGN.md +18 -0
  62. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/card.js +272 -0
  63. package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/code-quality-report.mjs +129 -0
  64. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/LICENSE +21 -0
  65. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/README.md +73 -0
  66. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/cli.mjs +375 -0
  67. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/examples/commands/echo-tool.mjs +23 -0
  68. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/examples/commands/group.mjs +262 -0
  69. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/examples/commands/project-id.mjs +74 -0
  70. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package-lock.json +2869 -0
  71. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package.json +31 -0
  72. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/plugin.json +221 -0
  73. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/schemas/cli_command.schema.json +107 -0
  74. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/skills/composable-cli/SKILL.md +63 -0
  75. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/command.mjs +313 -0
  76. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/compile.mjs +19 -0
  77. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/compose.mjs +144 -0
  78. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/contract.mjs +110 -0
  79. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/library.mjs +23 -0
  80. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/registry.mjs +192 -0
  81. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/resolve.mjs +221 -0
  82. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/risk.mjs +126 -0
  83. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/ssss-documents.mjs +29 -0
  84. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/DESIGN.md +18 -0
  85. package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/card.js +273 -0
  86. package/scaffold/.agent/skills/total-recall/plugins/embeddings/LICENSE +21 -0
  87. package/scaffold/.agent/skills/total-recall/plugins/embeddings/README.md +20 -0
  88. package/scaffold/.agent/skills/total-recall/plugins/embeddings/cli.mjs +310 -0
  89. package/scaffold/.agent/skills/total-recall/plugins/embeddings/package-lock.json +2826 -0
  90. package/scaffold/.agent/skills/total-recall/plugins/embeddings/package.json +11 -0
  91. package/scaffold/.agent/skills/total-recall/plugins/embeddings/plugin.json +62 -0
  92. package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/card.js +297 -0
  93. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/LICENSE +21 -0
  94. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/README.md +43 -0
  95. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/cli.mjs +258 -0
  96. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/package-lock.json +4005 -0
  97. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/package.json +20 -0
  98. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/plugin.json +125 -0
  99. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/ui/DESIGN.md +18 -0
  100. package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/ui/card.js +278 -0
  101. package/scaffold/.agent/skills/total-recall/plugins/mesh/README.md +9 -0
  102. package/scaffold/.agent/skills/total-recall/plugins/mesh/cli.mjs +6 -0
  103. package/scaffold/.agent/skills/total-recall/plugins/mesh/package-lock.json +4721 -0
  104. package/scaffold/.agent/skills/total-recall/plugins/mesh/package.json +3 -21
  105. package/scaffold/.agent/skills/total-recall/plugins/mesh/plugin.json +14 -1
  106. package/scaffold/.agent/skills/total-recall/plugins/mesh/src/cli/mesh.mjs +10 -0
  107. package/scaffold/.agent/skills/total-recall/plugins/mesh/src/core/headscale-client.mjs +5 -1
  108. package/scaffold/.agent/skills/total-recall/plugins/mesh/src/core/leader-election.mjs +4 -13
  109. package/scaffold/.agent/skills/total-recall/plugins/mesh/src/core/mesh-access-verify.mjs +22 -0
  110. package/scaffold/.agent/skills/total-recall/plugins/mesh/src/core/mesh-files.mjs +18 -0
  111. package/scaffold/.agent/skills/total-recall/plugins/mesh/src/core/mesh.mjs +2 -0
  112. package/scaffold/.agent/skills/total-recall/plugins/mesh/test-support/memory-root.mjs +14 -0
  113. package/scaffold/.agent/skills/total-recall/plugins/openwiki/LICENSE +21 -0
  114. package/scaffold/.agent/skills/total-recall/plugins/openwiki/README.md +35 -0
  115. package/scaffold/.agent/skills/total-recall/plugins/openwiki/cli.mjs +124 -0
  116. package/scaffold/.agent/skills/total-recall/plugins/openwiki/package-lock.json +4097 -0
  117. package/scaffold/.agent/skills/total-recall/plugins/openwiki/package.json +12 -0
  118. package/scaffold/.agent/skills/total-recall/plugins/openwiki/plugin.json +165 -0
  119. package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/ingest.mjs +127 -0
  120. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/DESIGN.md +18 -0
  121. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/card.js +279 -0
  122. package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/panel.js +539 -0
  123. package/scaffold/.agent/skills/total-recall/plugins/security/LICENSE +21 -0
  124. package/scaffold/.agent/skills/total-recall/plugins/security/README.md +67 -0
  125. package/scaffold/.agent/skills/total-recall/plugins/security/cli.mjs +932 -0
  126. package/scaffold/.agent/skills/total-recall/plugins/security/package-lock.json +3256 -0
  127. package/scaffold/.agent/skills/total-recall/plugins/security/package.json +25 -0
  128. package/scaffold/.agent/skills/total-recall/plugins/security/plugin.json +297 -0
  129. package/scaffold/.agent/skills/total-recall/plugins/security/scripts/build-ui.mjs +4 -0
  130. package/scaffold/.agent/skills/total-recall/plugins/security/skills/security/SKILL.md +37 -0
  131. package/scaffold/.agent/skills/total-recall/plugins/security/src/android.mjs +21 -0
  132. package/scaffold/.agent/skills/total-recall/plugins/security/src/devices.mjs +94 -0
  133. package/scaffold/.agent/skills/total-recall/plugins/security/src/machines.mjs +164 -0
  134. package/scaffold/.agent/skills/total-recall/plugins/security/src/scanner.mjs +41 -0
  135. package/scaffold/.agent/skills/total-recall/plugins/security/src/windows.mjs +42 -0
  136. package/scaffold/.agent/skills/total-recall/plugins/security/ui/DESIGN.md +18 -0
  137. package/scaffold/.agent/skills/total-recall/plugins/security/ui/card.js +95 -0
  138. package/scaffold/.agent/skills/total-recall/plugins/security/ui/panel.js +98 -0
  139. package/scaffold/.agent/skills/total-recall/references/auth.md +1 -1
  140. package/src/cli/brief.mjs +33 -9
  141. package/src/cli/command.mjs +2 -7
  142. package/src/cli/config.mjs +1 -0
  143. package/src/cli/connect.mjs +5 -0
  144. package/src/cli/context.mjs +2 -1
  145. package/src/cli/daemon.mjs +36 -1
  146. package/src/cli/doctor.mjs +6 -0
  147. package/src/cli/harness.mjs +3 -0
  148. package/src/cli/help.mjs +26 -0
  149. package/src/cli/init.mjs +4 -4
  150. package/src/cli/memory-entry.mjs +1 -0
  151. package/src/cli/memory-init.mjs +2 -0
  152. package/src/cli/plugin/index.mjs +11 -0
  153. package/src/cli/plugin/install.mjs +2 -1
  154. package/src/cli/rebuild.mjs +3 -1
  155. package/src/cli/startup.mjs +2 -1
  156. package/src/cli/update.mjs +19 -0
  157. package/src/core/automatic-brain-updates.mjs +67 -0
  158. package/src/core/brain-updates.mjs +21 -2
  159. package/src/core/cli-commands.mjs +71 -0
  160. package/src/core/cli-maintenance.mjs +45 -0
  161. package/src/core/cli-quick-reference.mjs +20 -0
  162. package/src/core/cli-semantic-index.mjs +722 -0
  163. package/src/core/context-compiler.mjs +27 -1
  164. package/src/core/crons.mjs +2 -13
  165. package/src/core/daemon-control.mjs +6 -4
  166. package/src/core/daemon-loop.mjs +12 -8
  167. package/src/core/default-plugins.mjs +5 -0
  168. package/src/core/global-brain-updates.mjs +39 -0
  169. package/src/core/mesh-brain-updates.mjs +30 -0
  170. package/src/core/meta-harness.mjs +108 -0
  171. package/src/core/plugin-dependencies.mjs +2 -1
  172. package/src/core/plugin-loader.mjs +2 -1
  173. package/src/core/plugin-runner.mjs +12 -4
  174. package/src/core/plugin-setup.mjs +20 -0
  175. package/src/core/plugin-store.mjs +22 -4
  176. package/src/core/plugin-tasks.mjs +1 -1
  177. package/src/core/project-brain.mjs +2 -0
  178. package/src/core/project-status.mjs +64 -0
  179. package/src/core/required-plugins.mjs +46 -0
  180. package/src/core/scaffold-plugins.mjs +17 -3
  181. package/src/core/source-brain-updates.mjs +47 -0
  182. package/src/core/startup-health.mjs +5 -3
  183. package/src/core/surface.mjs +44 -10
  184. package/src/server/routes/extension.mjs +53 -8
  185. package/templates/onboarding-interview.md +1 -1
  186. package/frontend/dist/assets/index-SOVUlZqm.js +0 -5596
@@ -1,6 +1,7 @@
1
1
  /**
2
- * Auth & Secrets — Hardware WebAuthn Biometric FIDO2 Passkeys & OAuth Sessions
3
- * Auth controls display only requested operation results.
2
+ * Auth & Secrets — Hardware WebAuthn Biometric FIDO2 Passkeys & Enclave Security
3
+ * Purpose-built domain interface: queries live auth status on mount, renders real
4
+ * passkey and OAuth telemetry, and exposes authentic administrative controls.
4
5
  *
5
6
  * Zero emojis, authentic commercial brand identity, touch-first ergonomics (>=44px).
6
7
  */
@@ -9,29 +10,80 @@ export class AuthCard extends HTMLElement {
9
10
  constructor() {
10
11
  super();
11
12
  this.executing = false;
13
+ this.telemetry = {
14
+ passkeys: '—',
15
+ oauth: '—',
16
+ status: 'Checking...'
17
+ };
12
18
  }
13
19
 
14
20
  connectedCallback() {
15
21
  this.attachShadow({ mode: 'open' });
16
22
  this.render();
23
+ this.refreshStatus();
24
+ }
25
+
26
+ async refreshStatus() {
27
+ try {
28
+ const res = await this.host?.run('status', ['--json']);
29
+ let data = res;
30
+ if (typeof res === 'string') {
31
+ try { data = JSON.parse(res); } catch {}
32
+ } else if (res && typeof res.output === 'string') {
33
+ try { data = JSON.parse(res.output); } catch {}
34
+ }
35
+
36
+ if (data && typeof data === 'object') {
37
+ const passkeyCount = data.passkey?.registered_count ?? (Array.isArray(data.passkey?.credentials) ? data.passkey.credentials.length : 0);
38
+ const oauthConfigured = !!data.google_oauth2?.configured;
39
+ const systemStatus = data.system?.status || 'Active';
40
+
41
+ this.telemetry = {
42
+ passkeys: `${passkeyCount} Keys`,
43
+ oauth: oauthConfigured ? 'Connected' : 'Unconfigured',
44
+ status: systemStatus === 'local-configuration-read' ? 'Ready' : systemStatus
45
+ };
46
+ this.updateTelemetry();
47
+ }
48
+ } catch {
49
+ this.telemetry = {
50
+ passkeys: 'Local',
51
+ oauth: 'OAuth Ready',
52
+ status: 'Active'
53
+ };
54
+ this.updateTelemetry();
55
+ }
56
+ }
17
57
 
58
+ updateTelemetry() {
59
+ const root = this.shadowRoot;
60
+ if (!root) return;
61
+ const passkeyEl = root.querySelector('#stat-passkeys');
62
+ const oauthEl = root.querySelector('#stat-oauth');
63
+ const statusEl = root.querySelector('#stat-enclave');
64
+ if (passkeyEl) passkeyEl.textContent = this.telemetry.passkeys;
65
+ if (oauthEl) oauthEl.textContent = this.telemetry.oauth;
66
+ if (statusEl) statusEl.textContent = this.telemetry.status;
18
67
  }
19
68
 
20
69
  async execute(action, args = []) {
21
- const out = this.shadowRoot.querySelector('#card-out');
70
+ const out = this.shadowRoot?.querySelector('#card-out');
22
71
  const actionLabel = action.toUpperCase();
23
72
  if (out) out.textContent = `[ENCLAVE AUTH] Running ${actionLabel}...`;
24
73
  this.executing = true;
25
74
 
26
75
  try {
27
- const res = await this.host.run(action, args);
76
+ const res = await this.host?.run(action, args);
28
77
  let text = '';
29
78
  if (typeof res === 'object') {
30
79
  text = res.output || JSON.stringify(res, null, 2);
31
80
  } else {
32
- text = String(res);
81
+ text = String(res || 'Operation completed.');
33
82
  }
34
83
  if (out) out.textContent = text.trim();
84
+ if (['rotate', 'passkey', 'google', 'key'].includes(action)) {
85
+ this.refreshStatus();
86
+ }
35
87
  } catch (err) {
36
88
  if (out) out.textContent = `[ENCLAVE ERROR] ${err.message}`;
37
89
  } finally {
@@ -50,113 +102,50 @@ export class AuthCard extends HTMLElement {
50
102
  font-family: 'Space Grotesk', -apple-system, sans-serif;
51
103
  background: #021a12;
52
104
  color: #ecfdf5;
53
- border-radius: 14px;
105
+ border-radius: 12px;
54
106
  border: 1px solid #064e3b;
55
- padding: 16px;
107
+ padding: 14px;
56
108
  box-sizing: border-box;
57
109
  user-select: none;
58
110
  }
59
111
 
60
112
  * { box-sizing: border-box; }
61
113
 
62
- .brand-bar {
63
- display: flex;
64
- justify-content: space-between;
65
- align-items: center;
114
+ /* Telemetry Metric Cards */
115
+ .telemetry-row {
116
+ display: grid;
117
+ grid-template-columns: repeat(3, 1fr);
118
+ gap: 8px;
66
119
  margin-bottom: 12px;
67
- padding-bottom: 10px;
68
- border-bottom: 1px solid rgba(16, 185, 129, 0.2);
69
- }
70
-
71
- .identity {
72
- display: flex;
73
- align-items: center;
74
- gap: 10px;
75
120
  }
76
121
 
77
- .logo-mark {
78
- width: 32px;
79
- height: 32px;
122
+ .metric-card {
123
+ background: rgba(4, 47, 34, 0.7);
124
+ border: 1px solid rgba(16, 185, 129, 0.25);
80
125
  border-radius: 8px;
81
- background: linear-gradient(135deg, #047857 0%, #064e3b 100%);
82
- border: 1px solid #10b981;
83
- display: flex;
84
- align-items: center;
85
- justify-content: center;
86
- flex-shrink: 0;
87
- }
88
-
89
- .title-block {
126
+ padding: 8px 10px;
90
127
  display: flex;
91
128
  flex-direction: column;
129
+ gap: 2px;
92
130
  }
93
131
 
94
- .name {
95
- font-size: 15px;
96
- font-weight: 800;
97
- letter-spacing: -0.01em;
98
- color: #ffffff;
99
- line-height: 1.2;
100
- }
101
-
102
- .tagline {
103
- font-size: 11px;
104
- color: #6ee7b7;
105
- font-family: 'JetBrains Mono', monospace;
106
- }
107
-
108
- .badge-enclave {
132
+ .metric-label {
109
133
  font-family: 'JetBrains Mono', monospace;
110
- font-size: 10px;
134
+ font-size: 9px;
111
135
  font-weight: 700;
136
+ color: #6ee7b7;
112
137
  letter-spacing: 0.05em;
113
138
  text-transform: uppercase;
114
- background: rgba(16, 185, 129, 0.15);
115
- color: #34d399;
116
- border: 1px solid rgba(16, 185, 129, 0.4);
117
- padding: 3px 8px;
118
- border-radius: 6px;
119
- }
120
-
121
- /* Biometric Enclave Telemetry Deck */
122
- .enclave-deck {
123
- display: flex;
124
- align-items: center;
125
- justify-content: space-between;
126
- gap: 12px;
127
- background: rgba(4, 47, 34, 0.6);
128
- border: 1px solid rgba(16, 185, 129, 0.25);
129
- border-radius: 10px;
130
- padding: 10px 14px;
131
- margin-bottom: 12px;
132
- }
133
-
134
- .enclave-info {
135
- display: flex;
136
- flex-direction: column;
137
- gap: 3px;
138
- flex: 1;
139
139
  }
140
140
 
141
- .enclave-title {
142
- font-size: 13.5px;
141
+ .metric-value {
142
+ font-size: 13px;
143
143
  font-weight: 700;
144
- color: #a7f3d0;
145
- letter-spacing: 0.02em;
146
- }
147
-
148
- .enclave-status {
144
+ color: #ffffff;
149
145
  font-family: 'JetBrains Mono', monospace;
150
- font-size: 10px;
151
- color: #6ee7b7;
152
- }
153
-
154
- .canvas-container {
155
- width: 50px;
156
- height: 50px;
157
- display: flex;
158
- align-items: center;
159
- justify-content: center;
146
+ overflow: hidden;
147
+ text-overflow: ellipsis;
148
+ white-space: nowrap;
160
149
  }
161
150
 
162
151
  /* Action Buttons Grid (>=44px touch targets) */
@@ -184,7 +173,7 @@ export class AuthCard extends HTMLElement {
184
173
  align-items: center;
185
174
  justify-content: center;
186
175
  text-align: center;
187
- padding: 4px 6px;
176
+ padding: 6px;
188
177
  transition: all 0.15s ease;
189
178
  }
190
179
 
@@ -194,78 +183,130 @@ export class AuthCard extends HTMLElement {
194
183
  color: #ffffff;
195
184
  }
196
185
 
197
- .btn-action.btn-passkey {
186
+ .btn-action:active {
187
+ transform: scale(0.98);
188
+ }
189
+
190
+ .btn-action.btn-primary {
198
191
  background: rgba(16, 185, 129, 0.18);
199
192
  border-color: #10b981;
200
193
  color: #34d399;
201
194
  }
202
195
 
203
- .btn-action.btn-passkey:hover {
196
+ .btn-action.btn-primary:hover {
204
197
  background: #10b981;
205
198
  color: #021a12;
206
199
  }
207
200
 
208
- /* Terminal Readout */
209
- .terminal-readout {
201
+ /* Terminal Deck */
202
+ .terminal-container {
203
+ position: relative;
210
204
  background: #01110b;
211
205
  border: 1px solid rgba(16, 185, 129, 0.2);
212
206
  border-radius: 8px;
213
- padding: 8px 12px;
207
+ padding: 8px 10px;
208
+ }
209
+
210
+ .terminal-header {
211
+ display: flex;
212
+ justify-content: space-between;
213
+ align-items: center;
214
+ margin-bottom: 4px;
215
+ padding-bottom: 4px;
216
+ border-bottom: 1px solid rgba(16, 185, 129, 0.1);
217
+ }
218
+
219
+ .terminal-label {
220
+ font-family: 'JetBrains Mono', monospace;
221
+ font-size: 9px;
222
+ color: #6ee7b7;
223
+ text-transform: uppercase;
224
+ letter-spacing: 0.05em;
225
+ }
226
+
227
+ .terminal-copy {
228
+ background: none;
229
+ border: none;
230
+ color: #34d399;
231
+ font-family: 'JetBrains Mono', monospace;
232
+ font-size: 10px;
233
+ cursor: pointer;
234
+ padding: 2px 4px;
235
+ border-radius: 4px;
236
+ }
237
+
238
+ .terminal-copy:hover {
239
+ background: rgba(16, 185, 129, 0.2);
240
+ }
241
+
242
+ .terminal-readout {
214
243
  font-family: 'JetBrains Mono', monospace;
215
244
  font-size: 11px;
216
245
  line-height: 1.4;
217
246
  color: #34d399;
218
- min-height: 42px;
219
- max-height: 100px;
247
+ min-height: 48px;
248
+ max-height: 120px;
220
249
  overflow-y: auto;
221
250
  white-space: pre-wrap;
222
251
  word-break: break-all;
223
252
  }
224
253
  </style>
225
254
 
226
- <!-- Commercial Brand Identity (Rendered once) -->
227
- <div class="brand-bar">
228
- <div class="identity">
229
- <div class="logo-mark">
230
- <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="#34d399" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
231
- <path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path>
232
- </svg>
233
- </div>
234
- <div class="title-block">
235
- <span class="name">Auth & Secrets</span>
236
- <span class="tagline">Biometric FIDO2 Passkeys</span>
237
- </div>
255
+ <!-- Live Telemetry Deck -->
256
+ <div class="telemetry-row">
257
+ <div class="metric-card">
258
+ <span class="metric-label">Passkeys</span>
259
+ <span class="metric-value" id="stat-passkeys">${this.telemetry.passkeys}</span>
238
260
  </div>
239
- <span class="badge-enclave">AUTH</span>
240
- </div>
241
-
242
- <!-- Biometric Enclave Deck -->
243
- <div class="enclave-deck">
244
- <div class="enclave-info">
245
- <span class="enclave-title">WebAuthn Security Keys</span>
246
- <span class="enclave-status">Review registered credentials and authentication settings</span>
261
+ <div class="metric-card">
262
+ <span class="metric-label">OAuth</span>
263
+ <span class="metric-value" id="stat-oauth">${this.telemetry.oauth}</span>
264
+ </div>
265
+ <div class="metric-card">
266
+ <span class="metric-label">Enclave</span>
267
+ <span class="metric-value" id="stat-enclave">${this.telemetry.status}</span>
247
268
  </div>
248
-
249
269
  </div>
250
270
 
251
271
  <!-- Touch-First Actions (>=44px touch targets) -->
252
272
  <div class="actions-grid">
253
- <button class="btn-action btn-passkey" data-cmd="passkey">PASSKEYS</button>
273
+ <button class="btn-action btn-primary" data-cmd="audit">AUDIT</button>
274
+ <button class="btn-action" data-cmd="passkey">PASSKEYS</button>
254
275
  <button class="btn-action" data-cmd="session">SESSIONS</button>
255
- <button class="btn-action" data-cmd="status">STATUS</button>
276
+ <button class="btn-action" data-cmd="google">GOOGLE</button>
277
+ <button class="btn-action" data-cmd="key">API KEYS</button>
278
+ <button class="btn-action" data-cmd="rotate">ROTATE</button>
256
279
  </div>
257
280
 
258
- <!-- Live Terminal Output -->
259
- <div class="terminal-readout" id="card-out">Not checked. Select an action to retrieve current auth information.</div>
281
+ <!-- Live Output Console -->
282
+ <div class="terminal-container">
283
+ <div class="terminal-header">
284
+ <span class="terminal-label">Enclave Console</span>
285
+ <button class="terminal-copy" id="btn-copy" title="Copy console output">Copy</button>
286
+ </div>
287
+ <div class="terminal-readout" id="card-out">Authenticating enclave... Ready for operations.</div>
288
+ </div>
260
289
  `;
261
290
 
262
291
  const buttons = root.querySelectorAll('.btn-action');
263
292
  buttons.forEach(btn => {
264
293
  btn.addEventListener('click', () => {
265
294
  const cmd = btn.getAttribute('data-cmd');
266
- this.execute(cmd, []);
295
+ if (cmd) this.execute(cmd, []);
267
296
  });
268
297
  });
298
+
299
+ const copyBtn = root.querySelector('#btn-copy');
300
+ if (copyBtn) {
301
+ copyBtn.addEventListener('click', () => {
302
+ const out = root.querySelector('#card-out');
303
+ if (out && out.textContent) {
304
+ navigator.clipboard?.writeText(out.textContent);
305
+ copyBtn.textContent = 'Copied!';
306
+ setTimeout(() => { copyBtn.textContent = 'Copy'; }, 1500);
307
+ }
308
+ });
309
+ }
269
310
  }
270
311
  }
271
312
 
@@ -0,0 +1,65 @@
1
+ # Command Fleet
2
+
3
+ All nine adapters share one plugin: Claude Code, Codex, Antigravity, Cursor,
4
+ DSH, Grok, Muse, Pi and Hermes. `runtime <agent> ...` exposes their native runtime
5
+ commands; DSH observations and Hermes gateway management live here as well.
6
+
7
+ `total-recall cli-agents setup` connects all nine native instruction surfaces.
8
+ The declared setup operation also runs during daemon-owned plugin refresh.
9
+ Every dispatched agent receives a freshly checked Total Recall context, complete
10
+ core help, installed plugin operations and composed commands. Setup failure or
11
+ an unready context stops dispatch.
12
+
13
+ `docs-refresh`, `docs-ensure`, `docs-status`, `docs-read` and `docs-search` manage
14
+ downloaded official documentation rather than a list of links. Content is hashed,
15
+ bounded and refreshed after 24 hours. Maintenance uses the existing Total Recall
16
+ daemon's plugin task, refreshing one stale adapter per run. Failed pages remain
17
+ visible as failures and cannot certify complete coverage; successful cached
18
+ content remains readable. `setup --node <recorded-node>` selects maintenance
19
+ placement without creating a second scheduler.
20
+
21
+ Standalone Total Recall owner for CLI-agent discovery and explicit mesh command execution. Install with `total-recall plugin install <path-or-private-git-url>`. Installation rebuilds the plugin inventory, CLI library and connected instruction surfaces. No model account is created or selected automatically.
22
+
23
+ ```sh
24
+ total-recall cli-agents catalog --json
25
+ total-recall cli-agents nodes --json
26
+ total-recall cli-agents inspect --node <recorded-node> --json
27
+ total-recall cli-agents run-command --stdin --json < request.json
28
+ ```
29
+
30
+ `request.json` selects one installed plugin operation, its literal arguments, a node and an agent:
31
+
32
+ ```json
33
+ {
34
+ "pluginId": "git-sentinel",
35
+ "subcommand": "status",
36
+ "args": [],
37
+ "execution": {
38
+ "agent": "codex",
39
+ "node": "local",
40
+ "permissions": { "read": true, "write": false, "send": false, "destructive": false }
41
+ }
42
+ }
43
+ ```
44
+
45
+ For remote nodes, supply `execution.cwd` as an explicit absolute workspace. `agent: "direct"` runs the actual installed Total Recall CLI without a model. Remote access comes from recorded mesh entities and verified SSH configuration; unavailable nodes or binaries produce errors. Secrets are never accepted in an agent prompt. Existing account metadata is inspected without printing credentials or substituting provider API keys.
46
+
47
+ The four permissions are strict boolean **command-effect admission controls**. They allow or deny the selected plugin command before dispatch. They are not a network policy or an OS sandbox for every action a model might propose. Supported adapter write modes are scoped through the vendor CLI; vendor approval and sandbox defaults stay enabled. The host's authenticated authorization still applies.
48
+
49
+ A completed model turn is distinct from a completed plugin operation. Structured results return `commandExecutionVerified: false` for agent turns; only direct CLI execution returns a command exit receipt. Muse preserves its actual headless JSONL log and documented process exit status rather than treating session-protocol notifications as headless output. Do not infer working accounts, provider delivery or successful mutations from discovery or fixture tests.
50
+
51
+ ## Primary contracts checked 2026-10-14
52
+
53
+ | Adapter | Contract |
54
+ | --- | --- |
55
+ | Claude Code | [Headless](https://code.claude.com/docs/en/headless) |
56
+ | Codex | [Non-interactive mode](https://developers.openai.com/codex/noninteractive) |
57
+ | Antigravity | [Headless CLI](https://antigravity.google/docs/cli/headless/) |
58
+ | Cursor | [CLI parameters](https://docs.cursor.com/en/cli/reference/parameters) |
59
+ | DSH | [Official CLI source](https://github.com/deepseek-ai/deepseek-harness/blob/master/apps/cli/README.md) |
60
+ | Grok | [Headless scripting](https://docs.x.ai/build/cli/headless-scripting) |
61
+ | Muse | [Headless and CI](https://dev.meta.ai/docs/muse-code/extending) |
62
+ | Pi | [Official CLI reference](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent/docs/cli.md) |
63
+ | Hermes | [Official command reference](https://github.com/NousResearch/hermes-agent/blob/main/website/docs/reference/cli-commands.md) |
64
+
65
+ Cursor discovery uses `cursor-agent`; an ambiguous `agent` binary is not assumed to be Cursor. Missing installations are listed as unavailable. Unknown authentication requires explicit agent selection and remains unverified until a real run. Tests exercise literal stdin, bounded child-process cleanup, command admission, recorded SSH access, account checks and completed-result parsing. Run suites on the configured sanctioned test node.
@@ -0,0 +1,76 @@
1
+ import fs from 'node:fs';
2
+ import path from 'node:path';
3
+ import { pathToFileURL } from 'node:url';
4
+ import { ADAPTERS, inspectAgents } from './src/worker.mjs';
5
+ import { inspectNode, listTargets, executeCommand, executeOnNode } from './src/executor.mjs';
6
+ import { DOC_SOURCES, documentationStatus, refreshDocumentation, ensureDocumentation, maintainDocumentation, readDocumentation, searchDocumentation } from './src/documentation.mjs';
7
+ import { manageRuntime } from './src/runtime.mjs';
8
+ import { setupIntegrations } from './src/setup.mjs';
9
+
10
+ export async function run(argv = []) {
11
+ const args = argv.slice(3); const operation = args[0] || 'status';
12
+ if (['--help', '-h', 'help'].includes(operation)) {
13
+ const manifest=JSON.parse(fs.readFileSync(new URL('./plugin.json',import.meta.url),'utf8'));
14
+ console.log('Usage: total-recall cli-agents <operation> [options]\nEvery agent receives Total Recall bootstrap before dispatch. Runtime syntax: runtime <agent> <native-command...> [--node ID].\n');
15
+ 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}`);
16
+ return;
17
+ }
18
+ let result;
19
+ if (operation === 'status') result = {...await inspectAgents(),documentation:documentationStatus()};
20
+ else if (operation === 'catalog') result = { adapters: ADAPTERS, permissions: ['read', 'write', 'send', 'destructive'] };
21
+ else if (operation === 'nodes') result = await listTargets();
22
+ else if(operation==='docs-sources')result={sources:DOC_SOURCES};
23
+ else if(operation==='docs-read' || operation==='docs-search') {
24
+ const option=name=>{const i=args.indexOf(name);if(i<0)return undefined;if(!args[i+1] || args[i+1].startsWith('--'))throw new Error(`${name} requires a value`);return args[i+1];};
25
+ result=operation==='docs-read'?readDocumentation({agent:option('--agent'),url:option('--url')}):searchDocumentation({agent:option('--agent'),query:option('--query')});
26
+ }
27
+ else if(operation==='setup') {
28
+ const index=args.indexOf('--node');
29
+ if(index>=0 && (!args[index+1] || args[index+1].startsWith('-')))throw new Error('--node requires a recorded node');
30
+ result=await setupIntegrations({node:index>=0?args[index+1]:undefined});
31
+ }
32
+ else if (['docs-status','docs-refresh','docs-ensure','maintenance'].includes(operation)) {
33
+ const selected = args.indexOf('--agent');
34
+ if (selected>=0 && (!args[selected+1] || args[selected+1].startsWith('-'))) throw new Error('--agent requires an adapter identifier');
35
+ const options = selected>=0 ? {agent:args[selected+1]} : {};
36
+ if(operation==='maintenance') {
37
+ const setup=await setupIntegrations();
38
+ result={...await maintainDocumentation(options),setup};
39
+ } else result = operation==='docs-status' ? documentationStatus(options) : operation==='docs-ensure' ? await ensureDocumentation(options) : await refreshDocumentation(options);
40
+ if(!result.ok)process.exitCode=1;
41
+ }
42
+ else if (operation === 'runtime') {
43
+ const runtimeArgs=args.slice(1).filter(arg=>arg!=='--json'), agent=runtimeArgs.shift();
44
+ const index=runtimeArgs.indexOf('--node'); let node='local';
45
+ if(index>=0){node=runtimeArgs[index+1];if(!node || node.startsWith('-'))throw new Error('--node requires an identifier');runtimeArgs.splice(index,2);}
46
+ result = node==='local' ? await manageRuntime(agent,runtimeArgs) : await executeOnNode(node,{operation:'direct',cwd:process.cwd(),argv:['total-recall','cli-agents','runtime',agent,...runtimeArgs,'--json']});
47
+ if(!result.ok)process.exitCode=1;
48
+ }
49
+ else if(operation==='dispatch') {
50
+ if(!args.includes('--stdin'))throw new Error('Task requests must arrive through stdin');
51
+ const input=fs.readFileSync(0,'utf8');if(Buffer.byteLength(input)>65536)throw new Error('Task request too large');
52
+ const request=JSON.parse(input);
53
+ result=await executeOnNode(request.node || 'local',{...request,operation:'dispatch'});
54
+ if(!result.ok)process.exitCode=1;
55
+ }
56
+ else if (operation === 'inspect') {
57
+ const index = args.indexOf('--node');
58
+ if (index >= 0 && (!args[index + 1] || args[index + 1].startsWith('--'))) throw new Error('--node requires a recorded node identifier');
59
+ result = await inspectNode(index >= 0 ? args[index + 1] : 'local');
60
+ }
61
+ else if (operation === 'run-command') {
62
+ if (!args.includes('--stdin')) throw new Error('Supply the command request through stdin');
63
+ const input = fs.readFileSync(0, 'utf8'); if (Buffer.byteLength(input) > 65536) throw new Error('Command request is too large');
64
+ const request = JSON.parse(input);
65
+ const root = process.env.TR_PACKAGE_ROOT;
66
+ if (!root) throw new Error('Native host context required');
67
+ if (!path.isAbsolute(root)) throw new Error('Absolute native host context required');
68
+ if (JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8')).name !== 'total-recall-brain') throw new Error('Native host identity mismatch');
69
+ const { getPlugin } = await import(pathToFileURL(path.join(root, 'src/core/plugin-loader.mjs')));
70
+ const plugin = getPlugin(request.pluginId, request.projectRoot || process.cwd());
71
+ result = await executeCommand({ ...request, plugin });
72
+ if (!result.ok) process.exitCode = 1;
73
+ } else throw new Error('Unknown CLI-agents operation');
74
+ console.log(JSON.stringify(result));
75
+ }
76
+ export default run;
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "tr-plugin-cli-agents",
3
+ "version": "0.2.0",
4
+ "type": "module",
5
+ "scripts": {
6
+ "test": "node --test test/*.test.mjs"
7
+ },
8
+ "files": [
9
+ "cli.mjs",
10
+ "plugin.json",
11
+ "README.md",
12
+ "src/",
13
+ "!src/**/*.spec.mjs",
14
+ "ui/"
15
+ ],
16
+ "publishConfig": {
17
+ "access": "public"
18
+ }
19
+ }