mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-23 21:59:14 +09:00
checkpoint: File edit:
🚀 Generated with [Claude Code](https://claude.com/claude-code) 📊 V3 Development Progress Checkpoint Co-Authored-By: Claude Sonnet 4 <noreply@anthropic.com>
This commit is contained in:
1 parent
fccf31d2ee
commit
cdfbb95d7b
2 files changed
+34
-17
No files matched your search
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in new issue
Block a user