total-recall-brain 3.41.5 → 3.41.6
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/bin/total-recall.mjs +7 -4
- package/frontend/dist/assets/index-4tGQfTa2.js +5605 -0
- package/frontend/dist/assets/index-DtwsDyFM.css +1 -0
- package/frontend/dist/index.html +2 -2
- package/frontend/package.json +11 -0
- package/frontend/src/App.tsx +47 -122
- package/frontend/src/components/plugins/plugin-frame.ts +1 -0
- package/frontend/src/index.css +152 -86
- package/frontend/src/pages/HelpPage.tsx +13 -10
- package/frontend/src/pages/MemoryPage.tsx +28 -30
- package/frontend/src/pages/NetworkPage.tsx +3 -3
- package/frontend/src/pages/PluginsPage.tsx +6 -5
- package/frontend/src/pages/RulesPage.tsx +16 -12
- package/package.json +3 -2
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/package-lock.json +8 -8
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/package.json +3 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package-lock.json +8 -8
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package.json +3 -0
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/package-lock.json +8 -8
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/package.json +3 -0
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/package-lock.json +8 -8
- package/scaffold/.agent/skills/total-recall/plugins/git-sentinel/package.json +3 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/package-lock.json +8 -8
- package/scaffold/.agent/skills/total-recall/plugins/mesh/package.json +4 -1
- package/scaffold/.agent/skills/total-recall/plugins/mesh/src/core/mesh.mjs +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/capability/index.mjs +136 -7
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/cli.mjs +135 -26
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/package-lock.json +8 -8
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/package.json +4 -1
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/plugin.json +228 -9
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/skills/meta-harness/SKILL.md +24 -30
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/alerts.mjs +29 -16
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/cascade.mjs +73 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/coordinator.mjs +182 -365
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/dispatch.mjs +33 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/documentation.mjs +9 -3
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/executor.mjs +4 -4
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/agy.mjs +187 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/claude.mjs +275 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/cline.mjs +132 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/codex.mjs +187 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/cursor.mjs +158 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/devin.mjs +157 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/dsh.mjs +183 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/grok.mjs +132 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/hermes.mjs +173 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/index.mjs +87 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/openclaw.mjs +173 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate-adapters/pi.mjs +129 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/gate.mjs +12 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/json-reply.mjs +22 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/learner.mjs +72 -70
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/model-catalog.mjs +195 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/paths.mjs +11 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/pool.mjs +36 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/review.mjs +169 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/router.mjs +136 -346
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/runtime.mjs +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/ssss-store.mjs +20 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/telemetry.mjs +43 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/threads.mjs +156 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/worker.mjs +117 -35
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/worktree.mjs +51 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/card.js +398 -57
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/cli.mjs +10 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/package-lock.json +3 -3
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/package.json +3 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/plugin.json +42 -190
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/vendor/openwiki.mjs +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/vendor/skills/mermaid-diagrams/SKILL.md +44 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/vendor/skills/write-connector/SKILL.md +56 -0
- package/scaffold/.agent/skills/total-recall/plugins/security/package-lock.json +8 -8
- package/scaffold/.agent/skills/total-recall/plugins/security/package.json +3 -0
- package/src/cli/agent.mjs +12 -1
- package/src/cli/compact.mjs +2 -2
- package/src/cli/connect.mjs +56 -1
- package/src/cli/context.mjs +10 -7
- package/src/cli/doctor.mjs +5 -2
- package/src/cli/harness.mjs +62 -50
- package/src/cli/memory-entry.mjs +2 -2
- package/src/cli/preflight.mjs +152 -16
- package/src/cli/remember.mjs +19 -1
- package/src/cli/rules.mjs +54 -12
- package/src/cli/startup.mjs +1 -1
- package/src/cli/status.mjs +12 -2
- package/src/core/claude-hooks.mjs +41 -3
- package/src/core/cli-semantic-index.mjs +3 -2
- package/src/core/conflict-detector.mjs +23 -12
- package/src/core/context-compactor.mjs +2 -0
- package/src/core/context-policy.mjs +20 -0
- package/src/core/duplicate-guard.mjs +350 -0
- package/src/core/meta-harness.mjs +31 -11
- package/src/core/preflight-gate.mjs +2 -2
- package/src/core/preflight-receipt.mjs +28 -0
- package/src/core/scaffold-plugins.mjs +7 -0
- package/src/core/stdio-flush.mjs +23 -0
- package/src/core/surface.mjs +33 -10
- package/src/server/routes/plugins.mjs +2 -2
- package/frontend/dist/assets/index-BIQmqDKP.css +0 -1
- package/frontend/dist/assets/index-WT3gs-x6.js +0 -5631
- package/frontend/src/components/DaemonLogsTab.tsx +0 -54
- package/frontend/src/components/ResearchAgendaTab.tsx +0 -712
- package/frontend/src/components/TaskQueueTab.tsx +0 -193
- package/frontend/src/components/VoiceInput.tsx +0 -112
- package/frontend/src/pages/ChatPage.tsx +0 -1059
- package/frontend/src/pages/CollabPage.tsx +0 -470
- package/frontend/src/pages/DesignDocsPage.tsx +0 -621
- package/frontend/src/pages/FilesPage.tsx +0 -393
- package/frontend/src/pages/HealthPage.tsx +0 -359
- package/frontend/src/pages/InboxPage.tsx +0 -83
- package/frontend/src/pages/InstructionsPage.tsx +0 -583
- package/frontend/src/pages/IntegrationsPage.tsx +0 -761
- package/frontend/src/pages/MeshPage.css +0 -58
- package/frontend/src/pages/MeshPage.tsx +0 -1219
- package/frontend/src/pages/OkfPage.tsx +0 -535
- package/frontend/src/pages/SandboxPage.tsx +0 -113
- package/frontend/src/pages/SkillsPage.tsx +0 -1994
- package/frontend/src/pages/TasksPage.tsx +0 -427
- package/frontend/src/pages/UsagePage.tsx +0 -702
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/README.md +0 -65
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/cli.mjs +0 -76
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/package.json +0 -19
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/plugin.json +0 -266
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/adapters/dsh.mjs +0 -446
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/documentation.mjs +0 -152
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/executor.mjs +0 -71
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/runtime.mjs +0 -36
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/setup.mjs +0 -35
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/src/worker.mjs +0 -175
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/ui/DESIGN.md +0 -32
- package/scaffold/.agent/skills/total-recall/plugins/cli-agents/ui/card.js +0 -575
|
@@ -130,10 +130,17 @@
|
|
|
130
130
|
},
|
|
131
131
|
{
|
|
132
132
|
"name": "maintenance",
|
|
133
|
-
"description": "
|
|
133
|
+
"description": "Daemon maintenance: official documentation and integration surfaces, or the model catalog with --models",
|
|
134
134
|
"effect": "write",
|
|
135
135
|
"output": "json",
|
|
136
|
-
"args": [
|
|
136
|
+
"args": [
|
|
137
|
+
{
|
|
138
|
+
"name": "models",
|
|
139
|
+
"flag": "--models",
|
|
140
|
+
"type": "boolean",
|
|
141
|
+
"label": "Refresh the model and benchmark catalog"
|
|
142
|
+
}
|
|
143
|
+
],
|
|
137
144
|
"timeout_ms": 600000
|
|
138
145
|
},
|
|
139
146
|
{
|
|
@@ -259,16 +266,17 @@
|
|
|
259
266
|
},
|
|
260
267
|
{
|
|
261
268
|
"name": "benchmarks",
|
|
262
|
-
"description": "
|
|
269
|
+
"description": "Sourced model pricing, coding index and leaderboard results, with pass rates measured on this machine",
|
|
263
270
|
"effect": "read",
|
|
264
271
|
"output": "json",
|
|
265
272
|
"args": []
|
|
266
273
|
},
|
|
267
274
|
{
|
|
268
275
|
"name": "route",
|
|
269
|
-
"description": "
|
|
270
|
-
"effect": "
|
|
276
|
+
"description": "Choose the harness for a task; with --execute, run it on its own branch and escalate on failure",
|
|
277
|
+
"effect": "write",
|
|
271
278
|
"output": "json",
|
|
279
|
+
"timeout_ms": 600000,
|
|
272
280
|
"args": [
|
|
273
281
|
{
|
|
274
282
|
"name": "task",
|
|
@@ -276,6 +284,30 @@
|
|
|
276
284
|
"label": "Task description",
|
|
277
285
|
"required": true,
|
|
278
286
|
"positional": true
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"name": "execute",
|
|
290
|
+
"flag": "--execute",
|
|
291
|
+
"type": "boolean",
|
|
292
|
+
"label": "Run the task on its own branch"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"name": "gate",
|
|
296
|
+
"flag": "--gate",
|
|
297
|
+
"type": "boolean",
|
|
298
|
+
"label": "Require the code-quality gate, escalating when it fails"
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"name": "jev",
|
|
302
|
+
"flag": "--jev",
|
|
303
|
+
"type": "boolean",
|
|
304
|
+
"label": "Classify through the decision plugin"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"name": "tier",
|
|
308
|
+
"flag": "--tier",
|
|
309
|
+
"type": "string",
|
|
310
|
+
"label": "Gate tier: fast | full | remote"
|
|
279
311
|
}
|
|
280
312
|
]
|
|
281
313
|
},
|
|
@@ -297,15 +329,194 @@
|
|
|
297
329
|
"flag": "--mode",
|
|
298
330
|
"type": "string",
|
|
299
331
|
"label": "pipeline | council | race"
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "execute",
|
|
335
|
+
"flag": "--execute",
|
|
336
|
+
"type": "boolean",
|
|
337
|
+
"label": "Run the agents; without this the plan is only reported"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
"name": "gate",
|
|
341
|
+
"flag": "--gate",
|
|
342
|
+
"type": "boolean",
|
|
343
|
+
"label": "Require the code-quality gate"
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
"name": "autoReview",
|
|
347
|
+
"flag": "--auto-review",
|
|
348
|
+
"type": "boolean",
|
|
349
|
+
"label": "Add a cross-model code review"
|
|
350
|
+
},
|
|
351
|
+
{
|
|
352
|
+
"name": "allowSameFamily",
|
|
353
|
+
"flag": "--allow-same-family",
|
|
354
|
+
"type": "boolean",
|
|
355
|
+
"label": "Accept a Verifier from the Implementer's model family"
|
|
300
356
|
}
|
|
301
|
-
]
|
|
357
|
+
],
|
|
358
|
+
"timeout_ms": 600000
|
|
302
359
|
},
|
|
303
360
|
{
|
|
304
361
|
"name": "learn",
|
|
305
|
-
"description": "Summarize
|
|
362
|
+
"description": "Summarize run receipts into scorecards and quota walls; --emit writes proposals to memory",
|
|
363
|
+
"effect": "write",
|
|
364
|
+
"output": "json",
|
|
365
|
+
"args": [
|
|
366
|
+
{
|
|
367
|
+
"name": "emit",
|
|
368
|
+
"flag": "--emit",
|
|
369
|
+
"type": "boolean",
|
|
370
|
+
"label": "Write proposals through the memory owner"
|
|
371
|
+
}
|
|
372
|
+
]
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"name": "alerts",
|
|
376
|
+
"description": "Send operator alerts for quota walls and usage over the threshold",
|
|
377
|
+
"effect": "send",
|
|
378
|
+
"output": "json",
|
|
379
|
+
"args": [
|
|
380
|
+
{
|
|
381
|
+
"name": "action",
|
|
382
|
+
"type": "string",
|
|
383
|
+
"label": "check | test",
|
|
384
|
+
"positional": true
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"name": "threshold",
|
|
388
|
+
"flag": "--threshold",
|
|
389
|
+
"type": "number",
|
|
390
|
+
"label": "Usage percent that triggers an alert"
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"name": "dryRun",
|
|
394
|
+
"flag": "--dry-run",
|
|
395
|
+
"type": "boolean",
|
|
396
|
+
"label": "Report without sending"
|
|
397
|
+
}
|
|
398
|
+
]
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"name": "decompose",
|
|
402
|
+
"description": "Decompose complex multi-step tasks into specialized Explorer, Architect, Implementer, and Verifier subagent stages",
|
|
306
403
|
"effect": "read",
|
|
307
404
|
"output": "json",
|
|
308
|
-
"args": [
|
|
405
|
+
"args": [
|
|
406
|
+
{
|
|
407
|
+
"name": "task",
|
|
408
|
+
"type": "string",
|
|
409
|
+
"label": "Task description",
|
|
410
|
+
"required": true,
|
|
411
|
+
"positional": true
|
|
412
|
+
}
|
|
413
|
+
]
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"name": "orchestrate",
|
|
417
|
+
"description": "Orchestrate multi-step tasks using subagent fan-out, one-way valve context compression, and cross-model verification",
|
|
418
|
+
"effect": "write",
|
|
419
|
+
"output": "json",
|
|
420
|
+
"args": [
|
|
421
|
+
{
|
|
422
|
+
"name": "task",
|
|
423
|
+
"type": "string",
|
|
424
|
+
"label": "Task description",
|
|
425
|
+
"required": true,
|
|
426
|
+
"positional": true
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
"name": "orchestrator",
|
|
430
|
+
"flag": "--orchestrator",
|
|
431
|
+
"type": "string",
|
|
432
|
+
"label": "Active orchestrator harness (claude, codex, agy, hermes, cursor)"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"name": "execute",
|
|
436
|
+
"flag": "--execute",
|
|
437
|
+
"type": "boolean",
|
|
438
|
+
"label": "Execute live stages"
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
"name": "autoReview",
|
|
442
|
+
"flag": "--auto-review",
|
|
443
|
+
"type": "boolean",
|
|
444
|
+
"label": "Trigger adversarial code review upon completion"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"name": "gate",
|
|
448
|
+
"flag": "--gate",
|
|
449
|
+
"type": "boolean",
|
|
450
|
+
"label": "Require the code-quality gate"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"name": "allowSameFamily",
|
|
454
|
+
"flag": "--allow-same-family",
|
|
455
|
+
"type": "boolean",
|
|
456
|
+
"label": "Accept a Verifier from the Implementer's model family"
|
|
457
|
+
}
|
|
458
|
+
],
|
|
459
|
+
"timeout_ms": 600000
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
"name": "threads",
|
|
463
|
+
"description": "Manage multi-platform agent threads, PR branch tracking, and turn history across all connected platforms",
|
|
464
|
+
"effect": "write",
|
|
465
|
+
"output": "json",
|
|
466
|
+
"args": [
|
|
467
|
+
{
|
|
468
|
+
"name": "action",
|
|
469
|
+
"type": "string",
|
|
470
|
+
"label": "list | show | create | close | delete",
|
|
471
|
+
"required": true,
|
|
472
|
+
"positional": true
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"name": "target",
|
|
476
|
+
"type": "string",
|
|
477
|
+
"label": "Thread ID or title",
|
|
478
|
+
"positional": true
|
|
479
|
+
}
|
|
480
|
+
]
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"name": "review",
|
|
484
|
+
"description": "Execute automated adversarial cross-model code review on Git diffs, PR branches, or staged changes",
|
|
485
|
+
"effect": "write",
|
|
486
|
+
"output": "json",
|
|
487
|
+
"args": [
|
|
488
|
+
{
|
|
489
|
+
"name": "target",
|
|
490
|
+
"type": "string",
|
|
491
|
+
"label": "Target branch, PR commit, or empty for working-tree",
|
|
492
|
+
"positional": true
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"name": "reviewer",
|
|
496
|
+
"flag": "--reviewer",
|
|
497
|
+
"type": "string",
|
|
498
|
+
"label": "Adversarial reviewer harness"
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
"name": "staged",
|
|
502
|
+
"flag": "--staged",
|
|
503
|
+
"type": "boolean",
|
|
504
|
+
"label": "Review staged diffs"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"name": "author",
|
|
508
|
+
"flag": "--author",
|
|
509
|
+
"type": "string",
|
|
510
|
+
"label": "Harness that wrote the code, excluded with its model family"
|
|
511
|
+
},
|
|
512
|
+
{
|
|
513
|
+
"name": "thread",
|
|
514
|
+
"flag": "--thread",
|
|
515
|
+
"type": "string",
|
|
516
|
+
"label": "Thread to attach the review to"
|
|
517
|
+
}
|
|
518
|
+
],
|
|
519
|
+
"timeout_ms": 600000
|
|
309
520
|
}
|
|
310
521
|
]
|
|
311
522
|
},
|
|
@@ -314,7 +525,8 @@
|
|
|
314
525
|
"command-executor": "src/executor.mjs",
|
|
315
526
|
"documentation": "src/documentation.mjs",
|
|
316
527
|
"agent-runtime": "src/runtime.mjs",
|
|
317
|
-
"tracker": "src/tracker.mjs"
|
|
528
|
+
"tracker": "src/tracker.mjs",
|
|
529
|
+
"gate-adapters": "src/gate-adapters/index.mjs"
|
|
318
530
|
},
|
|
319
531
|
"setup_command": "setup"
|
|
320
532
|
},
|
|
@@ -371,6 +583,13 @@
|
|
|
371
583
|
"command": "maintenance",
|
|
372
584
|
"placement": "selected-node",
|
|
373
585
|
"timeout_ms": 600000
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
"intent": "Automated daily model and benchmark catalog refresh into offline living documents",
|
|
589
|
+
"schedule": "0 3 * * *",
|
|
590
|
+
"command": "maintenance --models",
|
|
591
|
+
"placement": "selected-node",
|
|
592
|
+
"timeout_ms": 300000
|
|
374
593
|
}
|
|
375
594
|
]
|
|
376
595
|
}
|
package/scaffold/.agent/skills/total-recall/plugins/meta-harness/skills/meta-harness/SKILL.md
CHANGED
|
@@ -1,37 +1,31 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: meta-harness
|
|
3
|
-
description: Discover,
|
|
3
|
+
description: Discover, route, coordinate, review and run coding agent harnesses through Total Recall across mesh nodes.
|
|
4
4
|
repo_scoped: false
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Meta Harness
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
##
|
|
12
|
-
1. **
|
|
13
|
-
2. **
|
|
14
|
-
3. **
|
|
15
|
-
4. **
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
- `
|
|
21
|
-
- `
|
|
22
|
-
- `
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- `
|
|
26
|
-
- `
|
|
27
|
-
- `
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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.
|
|
9
|
+
Coordinates coding agent harnesses across mesh nodes. `cli-agents` is an alias of `meta-harness`. Run `total-recall meta-harness --help` for flags.
|
|
10
|
+
|
|
11
|
+
## Rules
|
|
12
|
+
1. **Believe the status words.** `ready` was proved by a login probe. `unverified` has no probe, so only a completed run proves it. `needs_auth`, `blocked` and `exhausted` cannot take work; the reason is in `quotaNote` and in `excluded`.
|
|
13
|
+
2. **No figure without a source.** `benchmarks` shows only fetched figures with their source and time. A dash means nobody measured it. Adapter quality and cost scores are configured priors, not measurements.
|
|
14
|
+
3. **Writing happens on a branch.** `route --execute`, `coordinate --execute` and race work in their own worktree on a `meta-harness/...` branch. Nothing merges into your branch; review the branch and merge it yourself.
|
|
15
|
+
4. **Long runs go to the background.** The host stops plugin commands after 10 minutes, so add `--background` to any multi-stage `--execute` and follow it with `threads list`.
|
|
16
|
+
5. **Cost.** dsh, hermes and other metered harnesses bill per token, and `route` warns when it picks one. `--jev` also makes a metered call.
|
|
17
|
+
|
|
18
|
+
## Commands
|
|
19
|
+
- `status`, `inspect --node <id>`, `upstream`, `changelog <agent>`, `catalog`, `nodes`: what is installed, signed in and current.
|
|
20
|
+
- `quota [--node <id>]`: readiness, measured usage and walls, OpenRouter balance, and memory across the fleet.
|
|
21
|
+
- `benchmarks`: pricing, Artificial Analysis indices, SWE-bench Pro, and pass rates from this machine's receipts. Refresh with `maintenance --models`.
|
|
22
|
+
- `route "<task>" [--jev] [--execute [--gate] [--tier fast|full|remote] [--background]]`: pick a harness; with `--execute`, run it and escalate on failure.
|
|
23
|
+
- `coordinate "<task>" --mode pipeline|council|race [--execute] [--gate] [--auto-review] [--allow-same-family] [--background]`: without `--execute` it only reports the plan and its blockers.
|
|
24
|
+
- `decompose "<task>"`: the stages and which ready harness takes each.
|
|
25
|
+
- `review [<git-range>] [--staged] [--author <id>] [--reviewer <id>] [--thread <id>]`: review by another model family. `NO_DIFF` means there was nothing to review.
|
|
26
|
+
- `dispatch --stdin` with JSON `{agent, cwd, prompt, permissions, node, allowUnknownAuth}`: one bootstrapped run with a receipt.
|
|
27
|
+
- `threads list|show|create|close|delete`, `learn [--emit]`, `alerts check|test [--dry-run]`, `adapter list|add|remove`.
|
|
28
|
+
- `docs-status`, `docs-refresh`, `docs-search --query <q>`, `docs-read`, `maintenance`, `setup`, `runtime <agent> <args>`.
|
|
29
|
+
|
|
30
|
+
## When something fails
|
|
31
|
+
Read `failureKind` on the result. `quota` carries `resetsAt`, and routing avoids that harness until then. `auth` and `not-ready` mean the operator must sign in or install something. These do not count against a harness's pass rate; `agent` and `gate` failures do.
|
|
@@ -1,23 +1,36 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Operator Alerts Dispatcher
|
|
3
|
-
* Bridges to Total Recall alerts plugin or system notifications.
|
|
4
|
-
*/
|
|
5
|
-
|
|
1
|
+
/** Operator alerts go through the alerts plugin. A failed send is reported as failed. */
|
|
6
2
|
import { execFileSync } from 'node:child_process';
|
|
3
|
+
import { readReceipts, activeQuotaWalls } from './learner.mjs';
|
|
7
4
|
|
|
8
|
-
|
|
9
|
-
const { title = 'Meta Harness Notification', message = '', severity = 'info' } = alert;
|
|
5
|
+
const SEVERITY = { info: 'info', warning: 'high', high: 'high', critical: 'critical' };
|
|
10
6
|
|
|
11
|
-
|
|
7
|
+
export async function notifyAlert({ title = 'Meta Harness', message = '', severity = 'info', eventId, dryRun = false } = {}) {
|
|
8
|
+
const args = ['alerts', 'send', '--title', title, '--message', message, '--severity', SEVERITY[severity] || 'info', '--source', 'meta-harness'];
|
|
9
|
+
if (eventId) args.push('--event-id', eventId);
|
|
10
|
+
if (dryRun) args.push('--dry-run');
|
|
12
11
|
try {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
execFileSync(process.env.TOTAL_RECALL_BIN || 'total-recall', args, { stdio: 'pipe', timeout: 15000 });
|
|
13
|
+
return { ok: true, title };
|
|
14
|
+
} catch (error) {
|
|
15
|
+
return { ok: false, title, error: String(error.stderr || error.message).slice(0, 300) };
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/** Alert on quota walls and on measured usage over the threshold. Event ids keep a wall from alerting twice. */
|
|
20
|
+
export async function checkAlerts({ quotas = {}, threshold = 85, dryRun = false } = {}) {
|
|
21
|
+
const walls = activeQuotaWalls(await readReceipts());
|
|
22
|
+
const candidates = Object.entries(walls).map(([harness, wall]) => ({
|
|
23
|
+
title: `Meta Harness: ${harness} is out of quota`,
|
|
24
|
+
message: `${wall.message || 'Quota wall observed.'} Routing avoids ${harness} until ${wall.until}.`,
|
|
25
|
+
severity: 'warning', eventId: `meta-harness-wall-${harness}-${wall.until}`,
|
|
26
|
+
}));
|
|
27
|
+
for (const [id, quota] of Object.entries(quotas)) {
|
|
28
|
+
if (typeof quota?.usagePercent === 'number' && quota.usagePercent > threshold && quota.billingModel !== 'local') candidates.push({
|
|
29
|
+
title: `Meta Harness: ${id} is at ${quota.usagePercent}%`, message: `Measured usage on ${id} is above ${threshold}%.`,
|
|
30
|
+
severity: 'warning', eventId: `meta-harness-usage-${id}-${new Date().toISOString().slice(0, 10)}`,
|
|
17
31
|
});
|
|
18
|
-
return { ok: true, dispatchedVia: 'total-recall-alerts' };
|
|
19
|
-
} catch {
|
|
20
|
-
// Fallback: console log without crashing
|
|
21
|
-
return { ok: true, dispatchedVia: 'fallback-logged', logged: { title, message, severity } };
|
|
22
32
|
}
|
|
33
|
+
const sent = [];
|
|
34
|
+
for (const alert of candidates) sent.push(await notifyAlert({ ...alert, dryRun }));
|
|
35
|
+
return { ok: sent.every(row => row.ok), threshold, walls, alerts: sent };
|
|
23
36
|
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verification-gated escalation: run the routed harness on its own branch, run the gate,
|
|
3
|
+
* and hand any failure to a stronger harness with the diagnostic.
|
|
4
|
+
*/
|
|
5
|
+
import { evaluateGateCascade } from '../capability/index.mjs';
|
|
6
|
+
import { dispatchWithReceipt } from './dispatch.mjs';
|
|
7
|
+
import { notifyAlert } from './alerts.mjs';
|
|
8
|
+
import { recordRunReceipt } from './learner.mjs';
|
|
9
|
+
import { resolvePool } from './pool.mjs';
|
|
10
|
+
import { routeTask } from './router.mjs';
|
|
11
|
+
import { runQualityGate } from './gate.mjs';
|
|
12
|
+
import { isGitRepo, createWorktree, removeWorktree, commitAll, linkDependencies, deleteBranch } from './worktree.mjs';
|
|
13
|
+
|
|
14
|
+
export async function executeRoutedTask(task, options = {}) {
|
|
15
|
+
const cwd = options.cwd || process.cwd();
|
|
16
|
+
if (!isGitRepo(cwd)) throw new Error('Routed execution writes on its own branch, so it must run inside a git repository');
|
|
17
|
+
const route = options.route || await routeTask(task, options);
|
|
18
|
+
if (!route.selected) return { ok: false, route, attempts: [], error: 'No harness can take this task right now.' };
|
|
19
|
+
const pool = options.pool || (await resolvePool(options)).ready.map(h => h.id);
|
|
20
|
+
const maxAttempts = options.maxAttempts || 3;
|
|
21
|
+
const id = `route-${Date.now().toString(36)}`;
|
|
22
|
+
const attempts = [];
|
|
23
|
+
const tried = new Set();
|
|
24
|
+
let harness = route.selected, diagnostic = null, previous = null;
|
|
25
|
+
|
|
26
|
+
for (let index = 1; index <= maxAttempts && harness; index += 1) {
|
|
27
|
+
tried.add(harness);
|
|
28
|
+
const branch = `meta-harness/${id}-${index}-${harness}`;
|
|
29
|
+
const directory = createWorktree(cwd, { branch });
|
|
30
|
+
const attempt = { harness, branch: null, commit: null, gate: null, escalatedFrom: previous };
|
|
31
|
+
attempts.push(attempt);
|
|
32
|
+
try {
|
|
33
|
+
const prompt = `Work only in this checkout. Do not commit; the harness commits your changes.\nTask:\n${task}${diagnostic ? `\n\nA previous attempt by ${previous} failed. Diagnostic:\n${diagnostic}` : ''}`;
|
|
34
|
+
const result = await dispatchWithReceipt({ agent: harness, cwd: directory, contextCwd: cwd, contextTask: task, prompt, permissions: { read: true, write: true }, allowUnknownAuth: true }, { dispatchFn: options.dispatchFn, role: 'Routed', complexityScore: route.complexity?.score, escalatedFrom: previous });
|
|
35
|
+
attempt.ok = result.ok === true;
|
|
36
|
+
attempt.durationMs = result.durationMs;
|
|
37
|
+
attempt.output = result.response || null;
|
|
38
|
+
if (result.ok) {
|
|
39
|
+
attempt.commit = commitAll(directory, `meta-harness: ${task.slice(0, 60)}\n\nAgent: ${harness}`);
|
|
40
|
+
if (attempt.commit) attempt.branch = branch;
|
|
41
|
+
else { attempt.ok = false; attempt.error = 'The agent reported success but changed no files.'; }
|
|
42
|
+
} else {
|
|
43
|
+
attempt.error = result.error;
|
|
44
|
+
attempt.failureKind = result.failureKind;
|
|
45
|
+
}
|
|
46
|
+
if (attempt.ok && options.gate) {
|
|
47
|
+
linkDependencies(cwd, directory);
|
|
48
|
+
attempt.gate = (options.gateFn || runQualityGate)(directory, options.gateOptions);
|
|
49
|
+
// A gate that could not run says nothing about this agent's work, so it does not escalate.
|
|
50
|
+
if (['unavailable', 'unconfigured'].includes(attempt.gate.status)) return { ok: false, route, attempts, error: `The quality gate is ${attempt.gate.status}: ${attempt.gate.summary}` };
|
|
51
|
+
await recordRunReceipt({ harness, role: 'Gate', task, success: attempt.gate.passed, failureKind: attempt.gate.passed ? null : 'gate', error: attempt.gate.passed ? null : attempt.gate.summary, gate: attempt.gate.status });
|
|
52
|
+
attempt.ok = attempt.gate.passed;
|
|
53
|
+
}
|
|
54
|
+
} catch (error) {
|
|
55
|
+
attempt.ok = false;
|
|
56
|
+
attempt.error = String(error.message);
|
|
57
|
+
} finally {
|
|
58
|
+
removeWorktree(cwd, directory);
|
|
59
|
+
// Only the branch this run hands back survives; the attempt record keeps what happened.
|
|
60
|
+
if (!attempt.ok) { deleteBranch(cwd, branch); attempt.branch = null; }
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
if (attempt.ok) return { ok: true, route, gateApplied: Boolean(options.gate), branch: attempt.branch, commit: attempt.commit, harness, attempts };
|
|
64
|
+
|
|
65
|
+
const remaining = pool.filter(item => !tried.has(item));
|
|
66
|
+
const next = remaining.length ? evaluateGateCascade(harness, { testsPassed: false }, remaining) : null;
|
|
67
|
+
diagnostic = attempt.gate?.summary || attempt.error || 'The previous attempt failed.';
|
|
68
|
+
previous = harness;
|
|
69
|
+
harness = next?.recommendedHarness && !tried.has(next.recommendedHarness) ? next.recommendedHarness : null;
|
|
70
|
+
if (harness) await notifyAlert({ title: 'Meta Harness: escalating', message: `${previous} failed on "${task.slice(0, 60)}"; escalating to ${harness}.`, severity: 'warning' });
|
|
71
|
+
}
|
|
72
|
+
return { ok: false, route, gateApplied: Boolean(options.gate), attempts, error: 'No attempt passed.' };
|
|
73
|
+
}
|