Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

feat(metaharness): MCP audit-list + audit-trend tools (iter 21)

ruv32c469c23075
diff --git a/plugins/ruflo-metaharness/scripts/smoke.sh b/plugins/ruflo-metaharness/scripts/smoke.sh
index fcf04dd65c..8a11fa8b1d 100755
--- a/plugins/ruflo-metaharness/scripts/smoke.sh
+++ b/plugins/ruflo-metaharness/scripts/smoke.sh
@@ -174,8 +174,8 @@ step "17m. metaharness MCP tools registered (ADR-150 deepest integration — ite
F="$ROOT/../../v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts"
miss=""
[[ -f "$F" ]] || miss="$miss tools-file-missing"
-# All 5 tools declared
-for tool in metaharness_score metaharness_genome metaharness_mcp_scan metaharness_threat_model metaharness_oia_audit; do
+# All 7 tools declared (5 static-analysis + 2 audit-observability — iter 20, 21)
+for tool in metaharness_score metaharness_genome metaharness_mcp_scan metaharness_threat_model metaharness_oia_audit metaharness_audit_list metaharness_audit_trend; do
grep -q "name: '${tool}'" "$F" || miss="$miss missing-${tool}"
done
# ADR-150 architectural-constraint anchor: zero static @metaharness/* import
diff --git a/v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts b/v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts
index 8a32b0ee1d..db60fa3300 100644
--- a/v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts
+++ b/v3/@claude-flow/cli/src/mcp-tools/metaharness-tools.ts
@@ -188,4 +188,45 @@ export const metaharnessTools: MCPTool[] = [
return { success: !r.degraded, data: r.json, degraded: r.degraded, exitCode: r.exitCode };
},
},
+ {
+ name: 'metaharness_audit_list',
+ description: 'ADR-150 iter 16 — list timestamped records from the `metaharness-audit` memory namespace. Use this BEFORE metaharness_audit_trend to discover which audit keys exist to diff.',
+ category: 'metaharness',
+ inputSchema: {
+ type: 'object',
+ properties: {
+ limit: { type: 'number', description: 'Max records to return, newest first (default: 20)', default: 20 },
+ since: { type: 'string', description: 'Filter to last N(h|d|w|m), e.g. "30d" for last 30 days' },
+ },
+ },
+ handler: async (input) => {
+ const args: string[] = [];
+ if (input.limit !== undefined) args.push('--limit', String(input.limit));
+ if (input.since !== undefined) args.push('--since', String(input.since));
+ const r = await runScript('audit-list.mjs', args);
+ return { success: !r.degraded, data: r.json, degraded: r.degraded, exitCode: r.exitCode };
+ },
+ },
+ {
+ name: 'metaharness_audit_trend',
+ description: 'ADR-150 iter 15 — diff two oia-audit records (drift detection). Pulls baseline + current snapshots from the `metaharness-audit` memory namespace and surfaces composite worst-severity delta + per-component status change + introduced/cleared findings.',
+ category: 'metaharness',
+ inputSchema: {
+ type: 'object',
+ properties: {
+ baselineKey: { type: 'string', description: 'Memory key for the older audit (run metaharness_audit_list first to discover keys)' },
+ currentKey: { type: 'string', description: 'Memory key for the newer audit' },
+ alertOnWorsening: { type: 'boolean', description: 'Set tool.alert.triggered when composite worst severity worsened', default: false },
+ },
+ required: ['baselineKey', 'currentKey'],
+ },
+ handler: async (input) => {
+ const baselineKey = input.baselineKey as string;
+ const currentKey = input.currentKey as string;
+ const args = ['--baseline-key', baselineKey, '--current-key', currentKey];
+ if (input.alertOnWorsening === true) args.push('--alert-on-worsening');
+ const r = await runScript('audit-trend.mjs', args);
+ return { success: !r.degraded, data: r.json, degraded: r.degraded, exitCode: r.exitCode };
+ },
+ },
];