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

checkpoint: File edit:

rUvcdfbb95d7b19
diff --git a/.claude/helpers/swarm-hooks.sh b/.claude/helpers/swarm-hooks.sh
index 96ef1e98a5..9601120909 100755
--- a/.claude/helpers/swarm-hooks.sh
+++ b/.claude/helpers/swarm-hooks.sh
@@ -429,14 +429,21 @@ initiate_handoff() {
local ho_id="ho_$(date +%s)_$(head -c 4 /dev/urandom | xxd -p)"
local timestamp=$(date +%s)
- # Parse context or use defaults
- local context=$(echo "$context_json" | jq -c '. + {
- filesModified: (.filesModified // []),
- patternsUsed: (.patternsUsed // []),
- decisions: (.decisions // []),
- blockers: (.blockers // []),
- nextSteps: (.nextSteps // [])
- }' 2>/dev/null || echo '{"filesModified":[],"patternsUsed":[],"decisions":[],"blockers":[],"nextSteps":[]}')
+ # Parse context or use defaults - ensure valid JSON
+ local context
+ if command -v jq &>/dev/null && echo "$context_json" | jq -e . >/dev/null 2>&1; then
+ context=$(echo "$context_json" | jq -c '{
+ filesModified: (.filesModified // []),
+ patternsUsed: (.patternsUsed // []),
+ decisions: (.decisions // []),
+ blockers: (.blockers // []),
+ nextSteps: (.nextSteps // [])
+ }')
+ else
+ context='{"filesModified":[],"patternsUsed":[],"decisions":[],"blockers":[],"nextSteps":[]}'
+ fi
+
+ local desc_escaped=$(echo -n "$description" | jq -Rs .)
local ho_file="$HANDOFFS_DIR/$ho_id.json"
cat > "$ho_file" << EOF
@@ -445,7 +452,7 @@ initiate_handoff() {
"fromAgent": "$AGENT_ID",
"fromAgentName": "$AGENT_NAME",
"toAgent": "$to_agent",
- "description": $(echo "$description" | jq -Rs .),
+ "description": $desc_escaped,
"context": $context,
"status": "pending",
"timestamp": $timestamp
diff --git a/v3/@claude-flow/cli/README.md b/v3/@claude-flow/cli/README.md
index 24d858b34f..9dbae62396 100644
--- a/v3/@claude-flow/cli/README.md
+++ b/v3/@claude-flow/cli/README.md
@@ -119,22 +119,32 @@ const progress = new Progress({ total: 100 });
### Interactive Prompts
```typescript
-import { prompt } from '@claude-flow/cli';
+import { text, select, confirm, input, multiSelect } from '@claude-flow/cli';
// Text input
-const name = await prompt.text('Enter your name:');
+const name = await text('Enter your name:');
-// Selection
-const choice = await prompt.select('Choose option:', ['A', 'B', 'C']);
+// Selection (with options array)
+const choice = await select({
+ message: 'Choose option:',
+ options: [
+ { label: 'Option A', value: 'A' },
+ { label: 'Option B', value: 'B' },
+ { label: 'Option C', value: 'C' },
+ ]
+});
// Confirmation
-const confirmed = await prompt.confirm('Continue?');
+const confirmed = await confirm({ message: 'Continue?' });
-// Password (hidden input)
-const password = await prompt.password('Enter password:');
+// General input
+const response = await input({ message: 'Enter value:', default: 'default' });
// Multi-select
-const selections = await prompt.multiSelect('Select features:', features);
+const selections = await multiSelect({
+ message: 'Select features:',
+ options: features.map(f => ({ label: f.name, value: f.id }))
+});
```
## Global Options