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

fix(eject + mcp-tools-test): context.flags + oia_audit chain budget (iter 128)

ruvbc38e38108eb
diff --git a/plugins/ruflo-metaharness/scripts/test-mcp-tools.mjs b/plugins/ruflo-metaharness/scripts/test-mcp-tools.mjs
index 88690fcdbd..b56bbdcaa3 100755
--- a/plugins/ruflo-metaharness/scripts/test-mcp-tools.mjs
+++ b/plugins/ruflo-metaharness/scripts/test-mcp-tools.mjs
@@ -134,12 +134,22 @@ async function main() {
// iter 54 β€” composes 3 subprocesses, needs more time than the default.
input = { dryRun: true, threshold: 0.5 };
}
+ if (tool.name === 'metaharness_oia_audit') {
+ // iter 128 β€” composite audit runs 5 sub-audits (oia-manifest +
+ // threat-model + mcp-scan + score + genome) in parallel. Each
+ // shells out via npx. --dry-run skips memory persistence so the
+ // test doesn't pollute namespaces.
+ input = { dryRun: true };
+ }
// iter 124 β€” bumped default 30s β†’ 60s. The first MCP tool that shells
// out via npx pays the cold-cache warmup cost (~25s observed), which
// pushed metaharness_audit_list past the prior 30s budget intermittently.
- // 90s for chain-tools like drift_from_history that compose 3 subprocesses.
- const timeoutMs = tool.name === 'metaharness_drift_from_history' ? 90_000 : 60_000;
+ // iter 128 β€” oia_audit composes 5 sub-audits; same 90s budget as
+ // drift_from_history (also a chain-tool).
+ const isChainTool = tool.name === 'metaharness_drift_from_history'
+ || tool.name === 'metaharness_oia_audit';
+ const timeoutMs = isChainTool ? 90_000 : 60_000;
const handlerPromise = tool.handler(input);
const timeoutPromise = new Promise((_, reject) =>
setTimeout(() => reject(new Error(`${timeoutMs / 1000}s handler timeout`)), timeoutMs));
diff --git a/v3/@claude-flow/cli/src/commands/eject.ts b/v3/@claude-flow/cli/src/commands/eject.ts
index 0e888bf3e7..c59befbcca 100644
--- a/v3/@claude-flow/cli/src/commands/eject.ts
+++ b/v3/@claude-flow/cli/src/commands/eject.ts
@@ -116,7 +116,22 @@ export const ejectCommand: Command = {
},
],
async action(context: CommandContext): Promise<CommandResult> {
- const opts = parseArgs((context as { args?: string[] }).args || []);
+ // iter 128 β€” flags declared on the Command get parsed by the CLI parser
+ // and land in context.flags (NOT context.options or context.args).
+ // Fall back to parseArgs(context.args) for programmatic invocations
+ // where the parser wasn't used (e.g. unit tests).
+ const ctx = context as { args?: string[]; flags?: Record<string, unknown> };
+ const parsedArgs = parseArgs(ctx.args || []);
+ const flagName = ctx.flags?.name as string | undefined;
+ const flagTarget = ctx.flags?.target as string | undefined;
+ const flagConfirm = ctx.flags?.confirm as boolean | undefined;
+ const flagFormat = ctx.flags?.format as 'table' | 'json' | undefined;
+ const opts: EjectOptions = {
+ name: flagName || parsedArgs.name,
+ target: flagTarget || parsedArgs.target,
+ confirm: typeof flagConfirm === 'boolean' ? flagConfirm : parsedArgs.confirm,
+ format: (flagFormat || parsedArgs.format) as 'table' | 'json',
+ };
if (!opts.name) {
output.writeln(output.error('eject: --name is required'));