35 lines
986 B
JSON
35 lines
986 B
JSON
{
|
|
"name": "switch_via_palette",
|
|
"scripts": [
|
|
{
|
|
"name": "named-loop",
|
|
"body": "#!/bin/sh\necho \"$1 READY\"\nsleep 5\n"
|
|
}
|
|
],
|
|
"steps": [
|
|
{
|
|
"type": "mcp_call",
|
|
"method": "spawn_process",
|
|
"params": { "kind": "command", "argv": ["named-loop", "first"], "name": "first" },
|
|
"save_as": "first"
|
|
},
|
|
{
|
|
"type": "mcp_call",
|
|
"method": "spawn_process",
|
|
"params": { "kind": "command", "argv": ["named-loop", "second"], "name": "second" },
|
|
"save_as": "second"
|
|
},
|
|
{ "type": "wait_text", "contains": "second READY", "timeout_ms": 5000 },
|
|
{ "type": "send_chord", "chord": "ctrl-k" },
|
|
{ "type": "send_text", "text": "Switch to first" },
|
|
{ "type": "send_chord", "chord": "enter" },
|
|
{ "type": "wait_text", "contains": "first READY", "timeout_ms": 5000 },
|
|
{
|
|
"type": "assert_mcp",
|
|
"method": "get_project_status",
|
|
"path": "processes.0.name",
|
|
"equals": "first"
|
|
}
|
|
]
|
|
}
|