mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-26 23:29:38 -05:00
Outside the Design tab an agent had 175 commands, 50 of them in the tool list. There are now 118, named by what they act on (`object_`, `plate_`, `preset_`, `filament_`, `plugin_` and so on), and 115 are listed. Each takes its target and values in the call, acts on the selection when it names no target and says what it acted on; an old name is refused. Printers and system filaments install and uninstall, preferences read and write, plugins enable, reload, uninstall and refresh, and objects reorder, with no dialog to drive. The Speed Dial keeps its 129 tiles under the same ids. Eight defects in the rows these commands share with the menus are fixed. For a person: an object row that cannot run says why instead of "Select an object first.", rows that failed no longer claim success, Duplicate Plate can be undone, and Refresh Plugins picked while a refresh runs now runs after it instead of beside it.
53 lines
3.5 KiB
JSON
53 lines
3.5 KiB
JSON
// Records the refusals of the send_gcode tile (action_run), and nothing else: it never sets a print host, so
|
|
// nothing is ever sent. A Bambu network printer (the harness's X1 Carbon as it starts, then with
|
|
// bbl_use_printhost off) with no objects, on a plate not sliced and on a sliced one; then the same printer set
|
|
// to print through a host (bbl_use_printhost on, OctoPrint) with no host address, sliced, not sliced and with no
|
|
// objects. After each it reads the dialogs and uploads (app_state) and the undo snapshots taken since the
|
|
// last read (fixtures/ops_undo.py). It ends by discarding the printer changes. Every call it records is
|
|
// optional. Run it with
|
|
// tools/mcp/orca_mcp.py run-replay tools/mcp/tests/ops_send_gcode_to_host.json --out <dir>
|
|
{
|
|
"orca_replay_version": "0.2.0",
|
|
"name": "ops send_gcode_to_host",
|
|
"vars": {"undo": "${replay_dir}/fixtures/ops_undo.py"},
|
|
"steps": [
|
|
{"tool": "app_wait", "args": {"for": "ready"}},
|
|
{"tool": "project_new", "args": {"discard_changes": true, "preset_changes": "discard"}},
|
|
{"tool": "view_set", "args": {"tab": "prepare"}},
|
|
{"tool": "settings_get", "args": {"type": "printer", "keys": ["bbl_use_printhost", "host_type", "print_host"]}},
|
|
{"tool": "app_wait", "args": {"for": "idle"}},
|
|
{"tool": "script_run", "args": {"filename": "${vars.undo}", "code": "import ops_undo\nresult = ops_undo.taken()"}},
|
|
|
|
// ---- A Bambu network printer: no objects, not sliced, sliced ----
|
|
{"tool": "action_run", "args": {"id": "orca_command:send_gcode:orca"}, "optional": true},
|
|
{"tool": "app_state"},
|
|
{"tool": "object_add_primitive", "args": {"shape": "cube", "size": [20, 20, 20]}},
|
|
{"tool": "app_wait", "args": {"for": "idle"}},
|
|
{"tool": "action_run", "args": {"id": "orca_command:send_gcode:orca"}, "optional": true},
|
|
{"tool": "plate_slice", "expect": {"/plates/0/outcome": {"eq": "ok"}}},
|
|
{"tool": "action_run", "args": {"id": "orca_command:send_gcode:orca"}, "optional": true},
|
|
{"tool": "settings_set", "args": {"type": "printer", "values": {"bbl_use_printhost": false}}},
|
|
{"tool": "action_run", "args": {"id": "orca_command:send_gcode:orca"}, "optional": true},
|
|
{"tool": "app_state"},
|
|
{"tool": "script_run", "args": {"filename": "${vars.undo}", "code": "import ops_undo\nresult = ops_undo.taken()"}},
|
|
|
|
// ---- Through a print host with no address: sliced, not sliced, no objects ----
|
|
{"tool": "settings_set", "args": {"type": "printer", "values": {"bbl_use_printhost": true, "host_type": "octoprint", "print_host": "", "use_3mf": false}}},
|
|
{"tool": "plate_slice", "expect": {"/plates/0/outcome": {"eq": "ok"}}},
|
|
{"tool": "plate_list"},
|
|
{"tool": "action_run", "args": {"id": "orca_command:send_gcode:orca"}, "optional": true},
|
|
{"tool": "app_state"},
|
|
{"tool": "object_transform", "args": {"object": 0, "translate": [5, 0, 0]}},
|
|
{"tool": "app_wait", "args": {"for": "idle"}},
|
|
{"tool": "plate_list"},
|
|
{"tool": "action_run", "args": {"id": "orca_command:send_gcode:orca"}, "optional": true},
|
|
{"tool": "project_new", "args": {"discard_changes": true}},
|
|
{"tool": "action_run", "args": {"id": "orca_command:send_gcode:orca"}, "optional": true},
|
|
{"tool": "app_state"},
|
|
{"tool": "script_run", "args": {"filename": "${vars.undo}", "code": "import ops_undo\nresult = ops_undo.taken()"}},
|
|
|
|
{"tool": "project_new", "args": {"discard_changes": true, "preset_changes": "discard"}},
|
|
{"tool": "settings_get", "args": {"type": "printer", "keys": ["bbl_use_printhost", "host_type", "print_host"]}}
|
|
]
|
|
}
|