- IntentParser: ajout pattern "expression" pour capturer 5+2, 100*3, etc.
- demo_calculator.json: text "${expression}=" avec default "2+2"
→ l'utilisateur peut dire "calcule 5+2" et le paramètre est injecté
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
101 lines
2.3 KiB
JSON
101 lines
2.3 KiB
JSON
{
|
|
"workflow_id": "demo_calculator",
|
|
"name": "Demo - Calculatrice",
|
|
"description": "Ouvre la calculatrice et effectue un calcul simple",
|
|
"version": "1.0.0",
|
|
"created_at": "2024-11-29T10:00:00",
|
|
"updated_at": "2024-11-29T10:00:00",
|
|
"learning_state": "OBSERVATION",
|
|
"execution_count": 0,
|
|
"entry_nodes": ["start"],
|
|
"end_nodes": ["end"],
|
|
"nodes": [
|
|
{
|
|
"node_id": "start",
|
|
"name": "Desktop",
|
|
"description": "Écran de départ",
|
|
"template": {
|
|
"title_pattern": ".*"
|
|
},
|
|
"is_entry": true,
|
|
"is_end": false,
|
|
"metadata": {}
|
|
},
|
|
{
|
|
"node_id": "calc_open",
|
|
"name": "Calculatrice ouverte",
|
|
"description": "La calculatrice est visible",
|
|
"template": {
|
|
"title_pattern": ".*(calc|gnome-calculator).*"
|
|
},
|
|
"is_entry": false,
|
|
"is_end": false,
|
|
"metadata": {}
|
|
},
|
|
{
|
|
"node_id": "end",
|
|
"name": "Calcul effectué",
|
|
"description": "Le calcul est affiché",
|
|
"template": {
|
|
"title_pattern": ".*"
|
|
},
|
|
"is_entry": false,
|
|
"is_end": true,
|
|
"metadata": {}
|
|
}
|
|
],
|
|
"edges": [
|
|
{
|
|
"edge_id": "open_calc",
|
|
"source_node": "start",
|
|
"target_node": "calc_open",
|
|
"action": {
|
|
"type": "compound",
|
|
"target": {
|
|
"by_role": null,
|
|
"selection_policy": "first"
|
|
},
|
|
"parameters": {
|
|
"steps": [
|
|
{"type": "key_press", "key": "super"},
|
|
{"type": "wait", "duration_ms": 500},
|
|
{"type": "text_input", "text": "calculator"},
|
|
{"type": "key_press", "key": "Return"}
|
|
]
|
|
}
|
|
},
|
|
"constraints": {
|
|
"timeout_ms": 5000
|
|
},
|
|
"confidence_threshold": 0.7
|
|
},
|
|
{
|
|
"edge_id": "do_calc",
|
|
"source_node": "calc_open",
|
|
"target_node": "end",
|
|
"action": {
|
|
"type": "text_input",
|
|
"target": {
|
|
"by_role": "button",
|
|
"selection_policy": "first"
|
|
},
|
|
"parameters": {
|
|
"text": "${expression}=",
|
|
"defaults": {
|
|
"expression": "2+2"
|
|
}
|
|
}
|
|
},
|
|
"constraints": {
|
|
"timeout_ms": 3000
|
|
},
|
|
"confidence_threshold": 0.8
|
|
}
|
|
],
|
|
"metadata": {
|
|
"author": "RPA Vision V3",
|
|
"tags": ["demo", "calculator"],
|
|
"difficulty": "easy"
|
|
}
|
|
}
|