Commit Graph
25 Commits
Author SHA1 Message Date
SoftFever b3dcf0ac7d Ask before a plugin calls OrcaSlicer's tools
Any plugin could call OrcaSlicer's tools through orca.host.tools without a permission, so it could change your project, run post-processing scripts and answer permission prompts. It now needs the OrcaSlicer tools permission or full access, which it can declare as it loads or is asked for the first time it calls, like its other permissions. The Plugins dialog's Permissions tab has a switch for it, and turning it off ends what the plugin's calls left in force.
2026-11-26 02:56:29 +08:00
SoftFever 1d63e52dec Say action and Speed Dial, not tile and palette, in the MCP commands and docs
The MCP commands, their catalog and the docs called a command's Speed Dial entry a "tile" and the Speed
Dial itself "the palette", words the app already uses for an entry's icon and for sets of colours. They now
say "action" and "Speed Dial", as action_search and action_run do, and the catalog's tiles, tile_group and
in_palette fields are now actions, action_group and has_own_action. Speed Dial ids, and the pins people
stored under them, are unchanged.
2026-11-19 01:39:50 +08:00
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 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 e7f7c4d1e9 Drop the old MCP names the server still read and the text that still used them
set_view's view, the print scope and window for the main window are refused
like any unknown name.
2026-11-11 19:25:09 +08:00
SoftFever 5a5e7b50b5 End the journal entry of a job that never runs 2026-11-10 01:30:45 +08:00
SoftFever e96da420c2 Pin the journal's byte accounting and the CAD table's id notes in tests 2026-11-10 00:54:31 +08:00
SoftFever 45188c9956 Bound the MCP journal by the size of its calls' arguments 2026-11-09 23:42:21 +08:00
SoftFever 70ca70ceb3 Give MCP tools plain names and call recorded tool lists replays 2026-11-09 20:21:02 +08:00
SoftFever 643319c40b Split Run Script into Action Replay and a docked Python Run Script panel 2026-11-09 03:25:25 +08:00
SoftFever cc05d87607 Run Python scripts like python file.py, with the whole plugin API 2026-11-03 16:12:04 +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 457ed1aacb Let MCP agents read and drive web dialogs and plugin pages
Agents can also answer a native message box that is already open (Windows and Linux), and URLs in
replies hide credential values.
2026-10-31 17:56:38 +08:00
SoftFever c56d9968a1 Add app recording and screenshots for MCP agents and the Help menu
Agents can record OrcaSlicer to video, captioned with the current tool call, and encode it to MP4.
People get Take Screenshot and Start/Stop Recording in the Speed Dial and the Help menu, with a
dialog for the recording and encoding settings.
2026-10-30 18:41:40 +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 db75a6dc37 Let MCP clients do the OrcaSlicer tasks the agent benchmark found missing 2026-10-29 20:02:27 +08:00
SoftFever 854430d747 Report native dialogs that hold the MCP UI thread on macOS 2026-10-28 20:40:54 +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 47a90ff25e Let MCP clients inspect and drive the GUI, answer dialogs and run web view scripts 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
SoftFever 16c4ef8675 Add the MCP protocol, loopback transport and job core 2026-10-28 19:43:08 +08:00