Commit Graph
24 Commits
Author SHA1 Message Date
SoftFever bbda030f4d Say menu item, not menu row, in the MCP commands and docs
The MCP command descriptions, docs and code called an entry of the app's
menus a "row", the word they also use for the rows of the object list and
the app's other lists. They now say "menu item", so a row is only ever a row
of a list or table. Command names, arguments and Speed Dial tile ids are
unchanged.
2026-11-19 00:35:28 +08:00
SoftFever d64e10f4dd Regroup the slicer's MCP commands and let each run from its arguments
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.
2026-11-18 16:50:32 +08:00
SoftFever 0604f25fd9 Make the MCP tool descriptions say what the tools do, and rename four misleading names 2026-11-16 05:14:35 +08:00
SoftFever fece418ae0 Make the automation runtime its own subsystem, with MCP as one front end
Everything that drives OrcaSlicer by command (the dispatch of the command
catalog, jobs, the journal, replays, Python scripts, recordings) lived
inside the MCP server's service class. So Action Replay, the Run Script
panel, a plugin's tool call, a person's recording and a run from the
command line each had to start "the MCP service", with all of its GUI
hooks, although none of them needs a server or an agent.

The automation runtime is now a subsystem of its own. It starts the first
time a front end asks for it and knows none of them. The MCP endpoint
(HTTP, the protocol, the token, the discovery file, the takeover of a port
another window holds) is one front end beside the others, opened and
closed without stopping what the others run. The widget inspector, menu
capture and ImGui item recording are turned on only by a front end that
drives the GUI, so a person's recording or long command does not carry
them.

The part of the runtime that needs no GUI is the library
libslic3r_automation, built without wxWidgets and tested by its own suite,
automation_tests. A wx dependency in it fails to build, and its tests no
longer link the GUI library or the embedded Python.

The command line has one option set for this: --run FILE runs a replay or
a Python script once the GUI is ready, with --outputdir for its files, and
--unrestricted-scripts and --cad turn their settings on for one run
without saving them. --mcp-run, --mcp-run-out and --mcp-token are gone;
the scripts setting is python_scripts_unrestricted and a session's output
folder is <datadir>/automation/out. get_app_state reports ready and
version at the top level, and its mcp block describes the endpoint only.

No change to slicing output.
2026-11-14 23:41:01 +08:00
SoftFever 1ef24b7d34 Hold Speed Dial commands, MCP tools and Design tools in one command catalog
Every command takes JSON arguments and has one function for a person and for
automation: with no arguments it does what a person's pick does, and with
arguments it runs silently. The Design tab's CAD tools are commands that
call_tool runs, and they show as Speed Dial tiles on the Design tab.
2026-11-13 20:59:31 +08:00
SoftFever 0616068e26 Run commands, tools and the plugin API through one operations layer
A Speed Dial command, the MCP tool that does the same thing and the plugin
API's preset calls now run one shared operation, so every route accepts and
refuses the same states, with one wording and a code for each refusal. An
import by a command or a tool is one undo step, and import_file adds geometry
only.

The cases where two routes behaved differently now behave the same: a project
is not saved under a .gcode.3mf name, an empty project exports as .3mf but not
as STL, arrange runs from any view and with a gizmo open, a mixed-colour
filament slot is refused as one, a hidden preset is shown before it is
selected, and a layer is refused while the Preview has none.
2026-11-12 22:06:10 +08:00
SoftFever 8bb18e84bf List objects by plate over MCP and call a part "part" in every tool
list_objects replies as the Objects panel is laid out: each plate with the
objects on it, then the objects on no plate. list_plates gives how many
objects a plate has, and every tool refuses a plate the project lacks in the
same words.
2026-11-11 18:31:00 +08:00
SoftFever 5e426b2cb7 Point MCP name misses at the right catalog and give each argument one name
A tool, Speed Dial action or CAD tool called through the wrong tool is told
where it runs, search_actions ranks a query's words as search_tools does, and
every list replies with items.

Renamed arguments: set_view's target and view are look_at and canvas,
list_widgets' root is target, mouse_gesture's path is waypoints, the presets'
changes is preset_changes, set_height_ranges' layer_config_ranges is ranges,
and the main window is "main" for screenshot and start_recording.

The harness's launch takes --python-scripts to allow Python scripts in the
instance it starts.
2026-11-11 18:31:00 +08:00
SoftFever 70ca70ceb3 Give MCP tools plain names and call recorded tool lists replays 2026-11-09 20:21:02 +08:00
SoftFever 5e5571a99f Make the MCP tool descriptions shorter and consistent, with the UI locators described once 2026-11-04 04:03:04 +08:00
SoftFever 3050fbc6a6 Tell agents what list_objects ids are for and how paged replies continue 2026-11-04 03:22:00 +08:00
SoftFever 8f61a3a34e Let agents select hidden filaments and printers by name 2026-11-04 01:43:48 +08:00
SoftFever e4ee75e749 Ask for approval only on MCP calls that delete without undo, and mark the tools that reach outside the app 2026-11-04 01:06:55 +08:00
SoftFever ec0f3d864f Tell agents which scope a setting belongs to when they name the wrong one or none 2026-11-03 23:56:08 +08:00
SoftFever f776208c94 Document the whole orca Python API and search every catalog from api_describe 2026-11-03 23:10:10 +08:00
SoftFever 99018203de Add Python scripts and plugin tools to the MCP server
The MCP tools are listed in core, API and UI lanes. With Python scripts turned on in Preferences, agents
and people can run Python against the open app; plugins holding the tools permission can call the tools,
and plugins can offer operations of their own to agents. Calls can pin object and volume ids so a stale
index is refused, and run_script takes a script as JSON text as well as an object.
2026-11-02 16:05:13 +08:00
SoftFever 385471a32f Make the MCP tools easier for agents to use
get_settings now gives each setting's description and settings page and finds settings by what
they do, replacing explain_settings. set_view orbits the camera by degrees, the same on every
install, and a painting stroke that would miss the object is refused with the pixel to start it
at instead of turning the camera. Tools accept the argument names and forms agents commonly use,
save_project refuses a .gcode.3mf path, and select range-checks part and instance indices.
2026-10-30 23:43:23 +08:00
SoftFever c9db694c32 Add a Run Script dialog for running MCP scripts in the app 2026-10-30 07:46:10 +08:00
SoftFever bd26585ec1 Add explain_settings so agents can look up what settings do
It returns each setting's full tooltip, its page and group, and its wiki link, maps every setting
by page and group, and finds settings by the words of their help text. get_settings no longer
includes tooltips in its metadata.
2026-10-30 04:33:07 +08:00
SoftFever db75a6dc37 Let MCP clients do the OrcaSlicer tasks the agent benchmark found missing 2026-10-29 20:02:27 +08:00
SoftFever 23f04a5bc4 Keep MCP slice results standing and free the service only once idle
A slice requested after an MCP slice finished no longer marks it superseded, a slice already
running when MCP asks counts as its own, and Slice All reports an invalid plate's validation
message. The Preview tab shows after an MCP slice, as after the Slice button. Point settings
accept [x, y] pairs, a ui_mouse move drags while a button is held, a tab can be captured, and
dialog rules a client sets after the server is turned off are refused.
2026-10-28 19:43:09 +08:00
SoftFever c8c37986ac Keep MCP calls safe across shutdown and UI rebuilds, and attribute slices to their own runs
Also handles non-ASCII paths on Windows, lets file pickers only be auto-cancelled, ends a client's auto-answers when the server is turned off, gives the stdio bridge deadlines, and adds notebook tabs, ImGui checkboxes and index-aware locators to GUI automation.
2026-10-28 19:43:09 +08:00
SoftFever 91f4bd2bcc Include the headers the MCP code uses directly 2026-10-28 19:43:09 +08:00
SoftFever dc522e59e4 Start an opt-in MCP server with slicer, preset, action and screenshot tools 2026-10-28 19:43:09 +08:00