tr-plugin-meta-harness 0.0.0-stage → 0.3.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.
- package/README.md +64 -2
- package/capability/BRICK.md +59 -0
- package/capability/index.mjs +534 -0
- package/cli.mjs +139 -0
- package/package.json +20 -4
- package/plugin.json +376 -0
- package/skills/meta-harness/SKILL.md +37 -0
- package/src/adapters/dsh.mjs +446 -0
- package/src/alerts.mjs +23 -0
- package/src/coordinator.mjs +398 -0
- package/src/documentation.mjs +152 -0
- package/src/executor.mjs +82 -0
- package/src/learner.mjs +90 -0
- package/src/router.mjs +415 -0
- package/src/runtime.mjs +36 -0
- package/src/setup.mjs +35 -0
- package/src/tracker.mjs +133 -0
- package/src/worker.mjs +233 -0
- package/ui/DESIGN.md +32 -0
- package/ui/card.js +845 -0
package/cli.mjs
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import fs from 'node:fs';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { pathToFileURL } from 'node:url';
|
|
4
|
+
import { ADAPTERS, inspectAgents, getActiveAdapters, getCustomAdaptersDirs, loadCustomAdapters } 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
|
+
import { inspectUpstreamFleet, getAgentChangelog } from './src/tracker.mjs';
|
|
10
|
+
import { inspectQuotas, getBenchmarks, routeTask } from './src/router.mjs';
|
|
11
|
+
import { coordinateTask } from './src/coordinator.mjs';
|
|
12
|
+
import { recordRunReceipt, learnFromHistory } from './src/learner.mjs';
|
|
13
|
+
|
|
14
|
+
export async function run(argv = []) {
|
|
15
|
+
const args = argv.slice(3); const operation = args[0] || 'status';
|
|
16
|
+
// Help anywhere in the arguments prints usage; it must never run an operation.
|
|
17
|
+
if (operation === 'help' || args.some(arg => arg === '--help' || arg === '-h')) {
|
|
18
|
+
const manifest=JSON.parse(fs.readFileSync(new URL('./plugin.json',import.meta.url),'utf8'));
|
|
19
|
+
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');
|
|
20
|
+
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}`);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
let result;
|
|
24
|
+
if (operation === 'status') result = {...await inspectAgents(),documentation:documentationStatus()};
|
|
25
|
+
else if (operation === 'catalog') result = { adapters: getActiveAdapters(), permissions: ['read', 'write', 'send', 'destructive'] };
|
|
26
|
+
else if (operation === 'nodes') result = await listTargets();
|
|
27
|
+
else if (operation === 'quota') {
|
|
28
|
+
const index = args.indexOf('--node');
|
|
29
|
+
result = await inspectQuotas({ node: index >= 0 ? args[index + 1] : 'local' });
|
|
30
|
+
}
|
|
31
|
+
else if (operation === 'benchmarks') result = getBenchmarks();
|
|
32
|
+
else if (operation === 'route') {
|
|
33
|
+
const includeUninstalled = args.includes('--include-uninstalled');
|
|
34
|
+
const preferLocal = args.includes('--prefer-local');
|
|
35
|
+
const preferFrontier = args.includes('--prefer-frontier');
|
|
36
|
+
const task = args.slice(1).filter(a => !a.startsWith('--')).join(' ');
|
|
37
|
+
if (!task) throw new Error('route requires a task description');
|
|
38
|
+
result = await routeTask(task, { includeUninstalled, preferLocal, preferFrontier });
|
|
39
|
+
}
|
|
40
|
+
else if (operation === 'coordinate') {
|
|
41
|
+
const modeIdx = args.indexOf('--mode');
|
|
42
|
+
const mode = modeIdx >= 0 ? args[modeIdx + 1] : 'pipeline';
|
|
43
|
+
const execute = args.includes('--execute');
|
|
44
|
+
const task = args.slice(1).filter(a => !a.startsWith('--') && a !== mode).join(' ');
|
|
45
|
+
if (!task) throw new Error('coordinate requires a task description');
|
|
46
|
+
result = await coordinateTask(task, { mode, execute });
|
|
47
|
+
}
|
|
48
|
+
else if (operation === 'learn') result = learnFromHistory();
|
|
49
|
+
else if (operation === 'upstream') result = await inspectUpstreamFleet(getActiveAdapters());
|
|
50
|
+
else if (operation === 'changelog') result = getAgentChangelog(args[1] || 'agy');
|
|
51
|
+
else if (operation === 'adapter') {
|
|
52
|
+
const sub = args[1] || 'list';
|
|
53
|
+
if (sub === 'list') {
|
|
54
|
+
result = { active: getActiveAdapters(), custom: loadCustomAdapters() };
|
|
55
|
+
} else if (sub === 'add') {
|
|
56
|
+
const target = args[2];
|
|
57
|
+
if (!target) throw new Error('adapter add requires a JSON spec or file path');
|
|
58
|
+
let spec;
|
|
59
|
+
try {
|
|
60
|
+
spec = fs.existsSync(target) ? JSON.parse(fs.readFileSync(target, 'utf8')) : JSON.parse(target);
|
|
61
|
+
} catch {
|
|
62
|
+
throw new Error('Invalid adapter JSON specification');
|
|
63
|
+
}
|
|
64
|
+
if (!spec.id || !spec.binary) throw new Error('Adapter specification must define id and binary');
|
|
65
|
+
const dirs = getCustomAdaptersDirs();
|
|
66
|
+
fs.mkdirSync(dirs[0], { recursive: true });
|
|
67
|
+
const dest = path.join(dirs[0], `${spec.id}.json`);
|
|
68
|
+
fs.writeFileSync(dest, JSON.stringify(spec, null, 2), 'utf8');
|
|
69
|
+
result = { ok: true, added: spec.id, path: dest };
|
|
70
|
+
} else if (sub === 'remove') {
|
|
71
|
+
const id = args[2];
|
|
72
|
+
if (!id) throw new Error('adapter remove requires an adapter identifier');
|
|
73
|
+
const dirs = getCustomAdaptersDirs();
|
|
74
|
+
let removed = false;
|
|
75
|
+
for (const d of dirs) {
|
|
76
|
+
const dest = path.join(d, `${id}.json`);
|
|
77
|
+
if (fs.existsSync(dest)) {
|
|
78
|
+
fs.unlinkSync(dest);
|
|
79
|
+
removed = true;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
result = { ok: removed, removed: id };
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
else if(operation==='docs-sources')result={sources:DOC_SOURCES};
|
|
86
|
+
else if(operation==='docs-read' || operation==='docs-search') {
|
|
87
|
+
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];};
|
|
88
|
+
result=operation==='docs-read'?readDocumentation({agent:option('--agent'),url:option('--url')}):searchDocumentation({agent:option('--agent'),query:option('--query')});
|
|
89
|
+
}
|
|
90
|
+
else if(operation==='setup') {
|
|
91
|
+
const index=args.indexOf('--node');
|
|
92
|
+
if(index>=0 && (!args[index+1] || args[index+1].startsWith('-')))throw new Error('--node requires a recorded node');
|
|
93
|
+
result=await setupIntegrations({node:index>=0?args[index+1]:undefined});
|
|
94
|
+
}
|
|
95
|
+
else if (['docs-status','docs-refresh','docs-ensure','maintenance'].includes(operation)) {
|
|
96
|
+
const selected = args.indexOf('--agent');
|
|
97
|
+
if (selected>=0 && (!args[selected+1] || args[selected+1].startsWith('-'))) throw new Error('--agent requires an adapter identifier');
|
|
98
|
+
const options = selected>=0 ? {agent:args[selected+1]} : {};
|
|
99
|
+
if(operation==='maintenance') {
|
|
100
|
+
const setup=await setupIntegrations();
|
|
101
|
+
result={...await maintainDocumentation(options),setup};
|
|
102
|
+
} else result = operation==='docs-status' ? documentationStatus(options) : operation==='docs-ensure' ? await ensureDocumentation(options) : await refreshDocumentation(options);
|
|
103
|
+
if(!result.ok)process.exitCode=1;
|
|
104
|
+
}
|
|
105
|
+
else if (operation === 'runtime') {
|
|
106
|
+
const runtimeArgs=args.slice(1).filter(arg=>arg!=='--json'), agent=runtimeArgs.shift();
|
|
107
|
+
const index=runtimeArgs.indexOf('--node'); let node='local';
|
|
108
|
+
if(index>=0){node=runtimeArgs[index+1];if(!node || node.startsWith('-'))throw new Error('--node requires an identifier');runtimeArgs.splice(index,2);}
|
|
109
|
+
result = node==='local' ? await manageRuntime(agent,runtimeArgs) : await executeOnNode(node,{operation:'direct',cwd:process.cwd(),argv:['total-recall','cli-agents','runtime',agent,...runtimeArgs,'--json']});
|
|
110
|
+
if(!result.ok)process.exitCode=1;
|
|
111
|
+
}
|
|
112
|
+
else if(operation==='dispatch') {
|
|
113
|
+
if(!args.includes('--stdin'))throw new Error('Task requests must arrive through stdin');
|
|
114
|
+
const input=fs.readFileSync(0,'utf8');if(Buffer.byteLength(input)>65536)throw new Error('Task request too large');
|
|
115
|
+
const request=JSON.parse(input);
|
|
116
|
+
result=await executeOnNode(request.node || 'local',{...request,operation:'dispatch'});
|
|
117
|
+
if(!result.ok)process.exitCode=1;
|
|
118
|
+
}
|
|
119
|
+
else if (operation === 'inspect') {
|
|
120
|
+
const index = args.indexOf('--node');
|
|
121
|
+
if (index >= 0 && (!args[index + 1] || args[index + 1].startsWith('--'))) throw new Error('--node requires a recorded node identifier');
|
|
122
|
+
result = await inspectNode(index >= 0 ? args[index + 1] : 'local');
|
|
123
|
+
}
|
|
124
|
+
else if (operation === 'run-command') {
|
|
125
|
+
if (!args.includes('--stdin')) throw new Error('Supply the command request through stdin');
|
|
126
|
+
const input = fs.readFileSync(0, 'utf8'); if (Buffer.byteLength(input) > 65536) throw new Error('Command request is too large');
|
|
127
|
+
const request = JSON.parse(input);
|
|
128
|
+
const root = process.env.TR_PACKAGE_ROOT;
|
|
129
|
+
if (!root) throw new Error('Native host context required');
|
|
130
|
+
if (!path.isAbsolute(root)) throw new Error('Absolute native host context required');
|
|
131
|
+
if (JSON.parse(fs.readFileSync(path.join(root, 'package.json'), 'utf8')).name !== 'total-recall-brain') throw new Error('Native host identity mismatch');
|
|
132
|
+
const { getPlugin } = await import(pathToFileURL(path.join(root, 'src/core/plugin-loader.mjs')));
|
|
133
|
+
const plugin = getPlugin(request.pluginId, request.projectRoot || process.cwd());
|
|
134
|
+
result = await executeCommand({ ...request, plugin });
|
|
135
|
+
if (!result.ok) process.exitCode = 1;
|
|
136
|
+
} else throw new Error('Unknown CLI-agents operation');
|
|
137
|
+
console.log(JSON.stringify(result));
|
|
138
|
+
}
|
|
139
|
+
export default run;
|
package/package.json
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tr-plugin-meta-harness",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Total Recall Meta Harness plugin",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"test": "node --test test/*.test.mjs"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"cli.mjs",
|
|
11
|
+
"plugin.json",
|
|
12
|
+
"README.md",
|
|
13
|
+
"src/",
|
|
14
|
+
"!src/**/*.spec.mjs",
|
|
15
|
+
"ui/",
|
|
16
|
+
"capability/",
|
|
17
|
+
"skills/"
|
|
18
|
+
],
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
}
|
|
22
|
+
}
|
package/plugin.json
ADDED
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "meta-harness",
|
|
3
|
+
"name": "Meta Harness",
|
|
4
|
+
"version": "0.3.0",
|
|
5
|
+
"description": "Discover, configure, document, track, and run coding agent harnesses through Total Recall across mesh nodes.",
|
|
6
|
+
"cli": {
|
|
7
|
+
"command": "meta-harness",
|
|
8
|
+
"alias": "cli-agents",
|
|
9
|
+
"handler": "cli.mjs",
|
|
10
|
+
"subcommands": [
|
|
11
|
+
{
|
|
12
|
+
"name": "status",
|
|
13
|
+
"description": "Inspect local agent binaries and authentication metadata",
|
|
14
|
+
"effect": "read",
|
|
15
|
+
"output": "json",
|
|
16
|
+
"args": []
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"name": "catalog",
|
|
20
|
+
"description": "List documented adapter contracts and source references",
|
|
21
|
+
"effect": "read",
|
|
22
|
+
"output": "json",
|
|
23
|
+
"args": []
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"name": "nodes",
|
|
27
|
+
"description": "List recorded mesh targets without probing or changing them",
|
|
28
|
+
"effect": "read",
|
|
29
|
+
"output": "json",
|
|
30
|
+
"args": []
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "inspect",
|
|
34
|
+
"description": "Inspect installed harnesses on a selected node",
|
|
35
|
+
"effect": "read",
|
|
36
|
+
"output": "json",
|
|
37
|
+
"args": [
|
|
38
|
+
{
|
|
39
|
+
"name": "node",
|
|
40
|
+
"flag": "--node",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"label": "Mesh node"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"timeout_ms": 120000
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "run-command",
|
|
49
|
+
"description": "Run an explicit plugin command through the selected agent and node using a JSON request on stdin",
|
|
50
|
+
"effect": "write",
|
|
51
|
+
"output": "json",
|
|
52
|
+
"args": [],
|
|
53
|
+
"timeout_ms": 600000
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "runtime",
|
|
57
|
+
"description": "Manage any agent runtime; includes Hermes gateway/auth/skills/plugins and DSH observations",
|
|
58
|
+
"effect": "write",
|
|
59
|
+
"output": "json",
|
|
60
|
+
"args": [
|
|
61
|
+
{
|
|
62
|
+
"name": "agent",
|
|
63
|
+
"type": "string",
|
|
64
|
+
"label": "Agent adapter",
|
|
65
|
+
"required": true,
|
|
66
|
+
"positional": true
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
"name": "operation",
|
|
70
|
+
"type": "string",
|
|
71
|
+
"label": "Native operation",
|
|
72
|
+
"required": true,
|
|
73
|
+
"positional": true
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"timeout_ms": 120000
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"name": "dispatch",
|
|
80
|
+
"description": "Run a task from stdin after automatic Total Recall bootstrap",
|
|
81
|
+
"effect": "write",
|
|
82
|
+
"output": "json",
|
|
83
|
+
"args": [],
|
|
84
|
+
"timeout_ms": 120000
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "docs-status",
|
|
88
|
+
"description": "Verify cached official documentation coverage freshness and hashes",
|
|
89
|
+
"effect": "read",
|
|
90
|
+
"output": "json",
|
|
91
|
+
"args": [
|
|
92
|
+
{
|
|
93
|
+
"name": "agent",
|
|
94
|
+
"flag": "--agent",
|
|
95
|
+
"type": "string",
|
|
96
|
+
"label": "Agent adapter"
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
"timeout_ms": 120000
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "docs-refresh",
|
|
103
|
+
"description": "Download complete official agent documentation and retain last-good content on failure",
|
|
104
|
+
"effect": "write",
|
|
105
|
+
"output": "json",
|
|
106
|
+
"args": [
|
|
107
|
+
{
|
|
108
|
+
"name": "agent",
|
|
109
|
+
"flag": "--agent",
|
|
110
|
+
"type": "string",
|
|
111
|
+
"label": "Agent adapter"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"timeout_ms": 600000
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "docs-ensure",
|
|
118
|
+
"description": "Refresh missing or stale documentation automatically",
|
|
119
|
+
"effect": "write",
|
|
120
|
+
"output": "json",
|
|
121
|
+
"args": [
|
|
122
|
+
{
|
|
123
|
+
"name": "agent",
|
|
124
|
+
"flag": "--agent",
|
|
125
|
+
"type": "string",
|
|
126
|
+
"label": "Agent adapter"
|
|
127
|
+
}
|
|
128
|
+
],
|
|
129
|
+
"timeout_ms": 600000
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "maintenance",
|
|
133
|
+
"description": "Total Recall daemon maintenance: current official documentation and integration surfaces",
|
|
134
|
+
"effect": "write",
|
|
135
|
+
"output": "json",
|
|
136
|
+
"args": [],
|
|
137
|
+
"timeout_ms": 600000
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
"name": "setup",
|
|
141
|
+
"description": "Configure supported agent instruction surfaces and daemon task placement",
|
|
142
|
+
"effect": "write",
|
|
143
|
+
"output": "json",
|
|
144
|
+
"args": [
|
|
145
|
+
{
|
|
146
|
+
"name": "node",
|
|
147
|
+
"flag": "--node",
|
|
148
|
+
"type": "string",
|
|
149
|
+
"label": "Maintenance mesh node"
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
"timeout_ms": 120000
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"name": "docs-sources",
|
|
156
|
+
"description": "List approved official documentation sources",
|
|
157
|
+
"effect": "read",
|
|
158
|
+
"output": "json",
|
|
159
|
+
"args": []
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"name": "docs-read",
|
|
163
|
+
"description": "Read integrity-checked cached official documentation",
|
|
164
|
+
"effect": "read",
|
|
165
|
+
"output": "json",
|
|
166
|
+
"args": [
|
|
167
|
+
{
|
|
168
|
+
"name": "agent",
|
|
169
|
+
"flag": "--agent",
|
|
170
|
+
"type": "string",
|
|
171
|
+
"label": "Agent"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"name": "url",
|
|
175
|
+
"flag": "--url",
|
|
176
|
+
"type": "string",
|
|
177
|
+
"label": "Url"
|
|
178
|
+
}
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "docs-search",
|
|
183
|
+
"description": "Search downloaded official documentation",
|
|
184
|
+
"effect": "read",
|
|
185
|
+
"output": "json",
|
|
186
|
+
"args": [
|
|
187
|
+
{
|
|
188
|
+
"name": "agent",
|
|
189
|
+
"flag": "--agent",
|
|
190
|
+
"type": "string",
|
|
191
|
+
"label": "Agent"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"name": "query",
|
|
195
|
+
"flag": "--query",
|
|
196
|
+
"type": "string",
|
|
197
|
+
"required": true,
|
|
198
|
+
"label": "Query"
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "upstream",
|
|
204
|
+
"description": "Probe latest upstream harness versions and update availability",
|
|
205
|
+
"effect": "read",
|
|
206
|
+
"output": "json",
|
|
207
|
+
"args": []
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"name": "changelog",
|
|
211
|
+
"description": "Inspect recent official changelog highlights for a selected agent",
|
|
212
|
+
"effect": "read",
|
|
213
|
+
"output": "json",
|
|
214
|
+
"args": [
|
|
215
|
+
{
|
|
216
|
+
"name": "agent",
|
|
217
|
+
"type": "string",
|
|
218
|
+
"label": "Agent identifier",
|
|
219
|
+
"required": false,
|
|
220
|
+
"positional": true
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"name": "adapter",
|
|
226
|
+
"description": "Manage extensible harness adapter definitions (list, add, remove)",
|
|
227
|
+
"effect": "write",
|
|
228
|
+
"output": "json",
|
|
229
|
+
"args": [
|
|
230
|
+
{
|
|
231
|
+
"name": "operation",
|
|
232
|
+
"type": "string",
|
|
233
|
+
"label": "list | add | remove",
|
|
234
|
+
"required": true,
|
|
235
|
+
"positional": true
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"name": "target",
|
|
239
|
+
"type": "string",
|
|
240
|
+
"label": "File path, spec JSON, or adapter ID",
|
|
241
|
+
"required": false,
|
|
242
|
+
"positional": true
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "quota",
|
|
248
|
+
"description": "Inspect 5-hour rolling/weekly quotas, credit balances, and host RAM",
|
|
249
|
+
"effect": "read",
|
|
250
|
+
"output": "json",
|
|
251
|
+
"args": [
|
|
252
|
+
{
|
|
253
|
+
"name": "node",
|
|
254
|
+
"flag": "--node",
|
|
255
|
+
"type": "string",
|
|
256
|
+
"label": "Mesh node"
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"name": "benchmarks",
|
|
262
|
+
"description": "Inspect SWE-bench Pro, Terminal-Bench 2.0, and local empirical pass rates",
|
|
263
|
+
"effect": "read",
|
|
264
|
+
"output": "json",
|
|
265
|
+
"args": []
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
"name": "route",
|
|
269
|
+
"description": "Evaluate task complexity and select optimal harness via two-stage RouteLLM classifier",
|
|
270
|
+
"effect": "read",
|
|
271
|
+
"output": "json",
|
|
272
|
+
"args": [
|
|
273
|
+
{
|
|
274
|
+
"name": "task",
|
|
275
|
+
"type": "string",
|
|
276
|
+
"label": "Task description",
|
|
277
|
+
"required": true,
|
|
278
|
+
"positional": true
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"name": "coordinate",
|
|
284
|
+
"description": "Coordinate multi-agent specialized execution pipelines (pipeline, council, race)",
|
|
285
|
+
"effect": "write",
|
|
286
|
+
"output": "json",
|
|
287
|
+
"args": [
|
|
288
|
+
{
|
|
289
|
+
"name": "task",
|
|
290
|
+
"type": "string",
|
|
291
|
+
"label": "Task description",
|
|
292
|
+
"required": true,
|
|
293
|
+
"positional": true
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"name": "mode",
|
|
297
|
+
"flag": "--mode",
|
|
298
|
+
"type": "string",
|
|
299
|
+
"label": "pipeline | council | race"
|
|
300
|
+
}
|
|
301
|
+
]
|
|
302
|
+
},
|
|
303
|
+
{
|
|
304
|
+
"name": "learn",
|
|
305
|
+
"description": "Summarize empirical run scorecards and generate memory friction proposals",
|
|
306
|
+
"effect": "read",
|
|
307
|
+
"output": "json",
|
|
308
|
+
"args": []
|
|
309
|
+
}
|
|
310
|
+
]
|
|
311
|
+
},
|
|
312
|
+
"runtime": {
|
|
313
|
+
"modules": {
|
|
314
|
+
"command-executor": "src/executor.mjs",
|
|
315
|
+
"documentation": "src/documentation.mjs",
|
|
316
|
+
"agent-runtime": "src/runtime.mjs",
|
|
317
|
+
"tracker": "src/tracker.mjs"
|
|
318
|
+
},
|
|
319
|
+
"setup_command": "setup"
|
|
320
|
+
},
|
|
321
|
+
"branding": {
|
|
322
|
+
"name": "Meta Harness",
|
|
323
|
+
"color": "#3b82f6",
|
|
324
|
+
"accent": "#38bdf8",
|
|
325
|
+
"background": "#0c1427",
|
|
326
|
+
"font": "system"
|
|
327
|
+
},
|
|
328
|
+
"ui": {
|
|
329
|
+
"elements": [
|
|
330
|
+
{
|
|
331
|
+
"id": "meta-harness-card",
|
|
332
|
+
"kind": "card",
|
|
333
|
+
"tag": "meta-harness-card",
|
|
334
|
+
"module": "ui/card.js",
|
|
335
|
+
"description": "Meta Harness multi-agent coordination matrix"
|
|
336
|
+
}
|
|
337
|
+
]
|
|
338
|
+
},
|
|
339
|
+
"card_face": {
|
|
340
|
+
"quick_actions": [
|
|
341
|
+
{
|
|
342
|
+
"subcommand": "status",
|
|
343
|
+
"label": "Local agents"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"subcommand": "nodes",
|
|
347
|
+
"label": "Mesh nodes"
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
"subcommand": "catalog",
|
|
351
|
+
"label": "Adapters"
|
|
352
|
+
}
|
|
353
|
+
]
|
|
354
|
+
},
|
|
355
|
+
"auth": {
|
|
356
|
+
"plugin": "auth",
|
|
357
|
+
"methods": [
|
|
358
|
+
"passkey",
|
|
359
|
+
"google-oauth2"
|
|
360
|
+
],
|
|
361
|
+
"session_verification": true
|
|
362
|
+
},
|
|
363
|
+
"distribution": {
|
|
364
|
+
"tier": "official",
|
|
365
|
+
"license": "open"
|
|
366
|
+
},
|
|
367
|
+
"tasks": [
|
|
368
|
+
{
|
|
369
|
+
"intent": "Keep official agent documentation and Total Recall integrations current",
|
|
370
|
+
"schedule": "*/15 * * * *",
|
|
371
|
+
"command": "maintenance",
|
|
372
|
+
"placement": "selected-node",
|
|
373
|
+
"timeout_ms": 600000
|
|
374
|
+
}
|
|
375
|
+
]
|
|
376
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: meta-harness
|
|
3
|
+
description: Discover, configure, document, track, route, coordinate, and run coding agent harnesses through Total Recall across mesh nodes.
|
|
4
|
+
repo_scoped: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Meta Harness
|
|
8
|
+
|
|
9
|
+
The Meta Harness plugin coordinates 15+ coding agent runtimes (`agy`, `claude`, `codex`, `grok`, `ollama`, `hermes`, `dsh`, `openclaw`, `aider`, `goose`, `openhands`, `cline`, and IDE runners) across local and remote mesh nodes.
|
|
10
|
+
|
|
11
|
+
## Golden Rules
|
|
12
|
+
1. **Never Hardcode Credential Logic**: All API keys resolve via `total-recall auth secret get <KEY>` using the global encrypted vault.
|
|
13
|
+
2. **Total Recall First**: Every dispatched agent run enforces `total-recall context "<task>"` with `ready:true` and writes a verified preflight receipt.
|
|
14
|
+
3. **Deterministic Complexity Routing**: Use `meta-harness route "<task>"` to classify task complexity and avoid burning frontier quotas on mechanical edits.
|
|
15
|
+
4. **Isolated Verification**: In multi-agent pipelines (`Architect -> Implementer -> Verifier`), the Verifier must execute in an isolated git worktree and employ a distinct model family.
|
|
16
|
+
|
|
17
|
+
## Command Reference
|
|
18
|
+
|
|
19
|
+
### Discovery & Upstream Version Tracking
|
|
20
|
+
- `total-recall meta-harness status [--node <id>]`: Check installed binaries, versions, and auth status.
|
|
21
|
+
- `total-recall meta-harness tracking [--node <id>]`: Compare installed versions against upstream release tags and changelogs.
|
|
22
|
+
- `total-recall meta-harness catalog`: List all built-in and custom declarative adapter contracts.
|
|
23
|
+
|
|
24
|
+
### Smart Routing & Telemetry
|
|
25
|
+
- `total-recall meta-harness quota [--node <id>]`: Inspect 5-hour rolling/weekly quotas, credit balances, and free RAM.
|
|
26
|
+
- `total-recall meta-harness benchmarks`: View SWE-bench Pro, Terminal-Bench 2.0, and local empirical pass rates.
|
|
27
|
+
- `total-recall meta-harness route "<task>"`: Two-stage RouteLLM classifier and gate cascade evaluation.
|
|
28
|
+
|
|
29
|
+
### Multi-Agent Coordination & Mesh Dispatch
|
|
30
|
+
- `total-recall meta-harness coordinate "<task>" --mode pipeline`: Run Architect -> Implementer -> Verifier pipeline.
|
|
31
|
+
- `total-recall meta-harness coordinate "<task>" --mode council`: Run multi-model consensus review.
|
|
32
|
+
- `total-recall meta-harness dispatch <harness> "<prompt>" [--node <id>]`: Dispatch a single task with preflight receipt.
|
|
33
|
+
|
|
34
|
+
### Self-Learning & Adapters
|
|
35
|
+
- `total-recall meta-harness learn`: Ingest recent run receipts, update scorecards, and propose memory friction improvements.
|
|
36
|
+
- `total-recall meta-harness adapter add <json-or-file>`: Register custom third-party agent harnesses dynamically.
|
|
37
|
+
- `total-recall meta-harness adapter list`: View custom registered adapters.
|