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.
- package/README.md +152 -41
- package/bin/total-recall.mjs +16 -76
- package/docs/reference/cli-reference.md +10 -10
- package/extension/background.js +6 -2
- package/extension/config.js +8 -0
- package/extension/lib/brain-client.js +29 -4
- package/extension/options/options.html +1 -0
- package/extension/sidepanel/sidepanel.html +1 -0
- package/frontend/dist/assets/{index-CvQRdT2j.css → index-AGUes-VG.css} +1 -1
- package/frontend/dist/assets/index-Bt5iVPZj.js +5618 -0
- package/frontend/dist/index.html +2 -2
- package/frontend/src/api/keys.ts +9 -2
- package/frontend/src/api/plugins.ts +4 -0
- package/frontend/src/components/plugins/card/CardEngine.tsx +2 -1
- package/frontend/src/components/plugins/card/card.css +1 -1
- package/frontend/src/pages/IntegrationsPage.tsx +315 -8
- package/frontend/src/pages/PluginsPage.tsx +532 -87
- package/package.json +6 -5
- package/scaffold/.agent/skills/meta-harness/references/optimized/original.md +1 -1
- package/scaffold/.agent/skills/meta-harness/references/optimized/section-09.md +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/auth/package-lock.json +10 -10
- package/scaffold/.agent/skills/total-recall/plugins/auth/package.json +1 -6
- package/scaffold/.agent/skills/total-recall/plugins/auth/plugin.json +0 -1
- package/scaffold/.agent/skills/total-recall/plugins/auth/src/browser-session.mjs +309 -4
- package/scaffold/.agent/skills/total-recall/plugins/auth/src/cli-secret.mjs +44 -34
- package/scaffold/.agent/skills/total-recall/plugins/auth/src/google-oauth.mjs +6 -4
- package/scaffold/.agent/skills/total-recall/plugins/auth/src/provider-catalog.mjs +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/auth/src/provider-rotation-recipes.mjs +118 -4
- package/scaffold/.agent/skills/total-recall/plugins/auth/src/routes/auth.mjs +2 -2
- package/scaffold/.agent/skills/total-recall/plugins/auth/src/secrets-env-export.mjs +3 -3
- package/scaffold/.agent/skills/total-recall/plugins/auth/src/secrets-remote-deploy.mjs +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/auth/src/secrets-rotate.mjs +24 -6
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/card.js +164 -123
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/README.md +65 -0
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/cli.mjs +76 -0
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/package.json +19 -0
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/plugin.json +290 -0
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/adapters/dsh.mjs +446 -0
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/documentation.mjs +152 -0
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/executor.mjs +71 -0
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/runtime.mjs +36 -0
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/setup.mjs +35 -0
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/worker.mjs +175 -0
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/ui/card.js +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/LICENSE +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/README.md +84 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/cli.mjs +79 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/check.mjs +6 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/report.mjs +6 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/run-core.mjs +27 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/commands/snapshot.mjs +163 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/check.mjs +757 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/config.schema.json +86 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/detect.mjs +89 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/report-data.mjs +145 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/report.mjs +210 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/core/state.mjs +20 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/package-lock.json +2869 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/package.json +28 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/plugin.json +186 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/DESIGN.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/card.js +272 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/ui/code-quality-report.mjs +129 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/LICENSE +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/README.md +73 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/cli.mjs +375 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/examples/commands/echo-tool.mjs +23 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/examples/commands/group.mjs +262 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/examples/commands/project-id.mjs +74 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package-lock.json +2869 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package.json +31 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/plugin.json +221 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/schemas/cli_command.schema.json +107 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/skills/composable-cli/SKILL.md +63 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/command.mjs +313 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/compile.mjs +19 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/compose.mjs +144 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/contract.mjs +110 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/library.mjs +23 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/registry.mjs +192 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/resolve.mjs +221 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/risk.mjs +126 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/src/ssss-documents.mjs +29 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/DESIGN.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/ui/card.js +273 -0
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/LICENSE +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/README.md +20 -0
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/cli.mjs +310 -0
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/package-lock.json +2826 -0
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/package.json +11 -0
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/plugin.json +62 -0
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/ui/card.js +297 -0
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/LICENSE +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/README.md +43 -0
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/cli.mjs +258 -0
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/package-lock.json +4005 -0
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/package.json +20 -0
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/plugin.json +125 -0
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/ui/DESIGN.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/ui/card.js +278 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/README.md +9 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/cli.mjs +6 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/package-lock.json +4721 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/package.json +3 -21
- package/scaffold/.agent/skills/total-recall/plugins/mesh/plugin.json +14 -1
- package/scaffold/.agent/skills/total-recall/plugins/mesh/src/cli/mesh.mjs +10 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/src/core/headscale-client.mjs +5 -1
- package/scaffold/.agent/skills/total-recall/plugins/mesh/src/core/leader-election.mjs +4 -13
- package/scaffold/.agent/skills/total-recall/plugins/mesh/src/core/mesh-access-verify.mjs +22 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/src/core/mesh-files.mjs +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/src/core/mesh.mjs +2 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/test-support/memory-root.mjs +14 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/LICENSE +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/README.md +35 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/cli.mjs +124 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/package-lock.json +4097 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/package.json +12 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/plugin.json +165 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/ingest.mjs +127 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/DESIGN.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/card.js +279 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/ui/panel.js +539 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/LICENSE +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/README.md +67 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/cli.mjs +932 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/package-lock.json +3256 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/package.json +25 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/plugin.json +297 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/scripts/build-ui.mjs +4 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/skills/security/SKILL.md +37 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/src/android.mjs +21 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/src/devices.mjs +94 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/src/machines.mjs +164 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/src/scanner.mjs +41 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/src/windows.mjs +42 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/DESIGN.md +18 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/card.js +95 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/ui/panel.js +98 -0
- package/scaffold/.agent/skills/total-recall/references/auth.md +1 -1
- package/src/cli/brief.mjs +33 -9
- package/src/cli/command.mjs +2 -7
- package/src/cli/config.mjs +1 -0
- package/src/cli/connect.mjs +5 -0
- package/src/cli/context.mjs +2 -1
- package/src/cli/daemon.mjs +36 -1
- package/src/cli/doctor.mjs +6 -0
- package/src/cli/harness.mjs +3 -0
- package/src/cli/help.mjs +26 -0
- package/src/cli/init.mjs +4 -4
- package/src/cli/memory-entry.mjs +1 -0
- package/src/cli/memory-init.mjs +2 -0
- package/src/cli/plugin/index.mjs +11 -0
- package/src/cli/plugin/install.mjs +2 -1
- package/src/cli/rebuild.mjs +3 -1
- package/src/cli/startup.mjs +2 -1
- package/src/cli/update.mjs +19 -0
- package/src/core/automatic-brain-updates.mjs +67 -0
- package/src/core/brain-updates.mjs +21 -2
- package/src/core/cli-commands.mjs +71 -0
- package/src/core/cli-maintenance.mjs +45 -0
- package/src/core/cli-quick-reference.mjs +20 -0
- package/src/core/cli-semantic-index.mjs +722 -0
- package/src/core/context-compiler.mjs +27 -1
- package/src/core/crons.mjs +2 -13
- package/src/core/daemon-control.mjs +6 -4
- package/src/core/daemon-loop.mjs +12 -8
- package/src/core/default-plugins.mjs +5 -0
- package/src/core/global-brain-updates.mjs +39 -0
- package/src/core/mesh-brain-updates.mjs +30 -0
- package/src/core/meta-harness.mjs +108 -0
- package/src/core/plugin-dependencies.mjs +2 -1
- package/src/core/plugin-loader.mjs +2 -1
- package/src/core/plugin-runner.mjs +12 -4
- package/src/core/plugin-setup.mjs +20 -0
- package/src/core/plugin-store.mjs +22 -4
- package/src/core/plugin-tasks.mjs +1 -1
- package/src/core/project-brain.mjs +2 -0
- package/src/core/project-status.mjs +64 -0
- package/src/core/required-plugins.mjs +46 -0
- package/src/core/scaffold-plugins.mjs +17 -3
- package/src/core/source-brain-updates.mjs +47 -0
- package/src/core/startup-health.mjs +5 -3
- package/src/core/surface.mjs +44 -10
- package/src/server/routes/extension.mjs +53 -8
- package/templates/onboarding-interview.md +1 -1
- package/frontend/dist/assets/index-SOVUlZqm.js +0 -5596
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Auth & Secrets — Hardware WebAuthn Biometric FIDO2 Passkeys &
|
|
3
|
-
*
|
|
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
|
|
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
|
|
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:
|
|
105
|
+
border-radius: 12px;
|
|
54
106
|
border: 1px solid #064e3b;
|
|
55
|
-
padding:
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
.
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
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
|
-
.
|
|
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:
|
|
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
|
-
.
|
|
142
|
-
font-size:
|
|
141
|
+
.metric-value {
|
|
142
|
+
font-size: 13px;
|
|
143
143
|
font-weight: 700;
|
|
144
|
-
color: #
|
|
145
|
-
letter-spacing: 0.02em;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.enclave-status {
|
|
144
|
+
color: #ffffff;
|
|
149
145
|
font-family: 'JetBrains Mono', monospace;
|
|
150
|
-
|
|
151
|
-
|
|
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:
|
|
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
|
|
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-
|
|
196
|
+
.btn-action.btn-primary:hover {
|
|
204
197
|
background: #10b981;
|
|
205
198
|
color: #021a12;
|
|
206
199
|
}
|
|
207
200
|
|
|
208
|
-
/* Terminal
|
|
209
|
-
.terminal-
|
|
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
|
|
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:
|
|
219
|
-
max-height:
|
|
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
|
-
<!--
|
|
227
|
-
<div class="
|
|
228
|
-
<div class="
|
|
229
|
-
<
|
|
230
|
-
|
|
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
|
-
<
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
<span class="
|
|
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-
|
|
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="
|
|
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
|
|
259
|
-
<div class="terminal-
|
|
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
|
+
}
|