Commit Graph
319 Commits
Author SHA1 Message Date
SoftFever 5eefef82fc Add the Agent Activity pane
A new pane, opened from View > Agent Activity or the Speed Dial, lists live what an AI agent and other
automation (Action Replay, Run Script, the command line, plugins) do in OrcaSlicer while it is open: each
call with its source, what it changed, failures with their reason, the steps of a run and the dialogs a
rule answered. Opening a call shows its request and response with passwords, keys and typed text masked,
so a person can watch and check what an agent is doing to their project.
2026-11-24 16:38:50 +08:00
SoftFever 2b52191901 Warn in Action Replay when a step can run a program
A replay someone sends you can hold a Python script or set a post-processing
script, and either runs a program on your computer when the replay plays. The
window listed those steps with no warning. They carry a "Can run a program"
tag, as a step that writes a file or sends to a printer carries its own, and a
step that makes its call through tool_call shows the tags of that call.
2026-11-24 02:34:07 +08:00
SoftFever efc29fdb80 Give a polygon drawn on the axes the same constraints on every platform
A square drawn on the axes through sketch_draw was locked level on x64 but could be
left free to rotate on arm64, so its constraints and degrees of freedom depended on
the CPU, and the test of them failed on macOS arm64 and Windows arm64. A polygon's
side that lies on an axis is now pinned Horizontal or Vertical on every platform, as
the Polygon tool pins it, so such a square has all four sides pinned.
2026-11-23 20:02:09 +08:00
SoftFever df459143cc Merge branch 'main' into feature/mcp 2026-11-23 13:29:29 +08:00
Arthur Porto 6d563f72c2 Keep arranged objects clear of a compacted prime tower (#17304)
With "No sparse layers" on, Arrange and Fill bed keep objects as far from the compacted prime tower as the slicer's clearance check needs. Objects stay the toolhead radius away, or 4 mm when none of the objects being placed is taller than nozzle_height. Objects taller than the rod clearance are also kept out of the tower's Y span, and the final alignment of the pile is skipped in that case. Placing a newly added object keeps the full toolhead radius.

With the option off, arranging is unchanged.

Fixes #17566
2026-11-22 16:43:49 -06:00
SoftFever e6250eca57 Let MCP commands name objects, parts and instances by id
An agent that read an object's id in object_list could only pass it as a guard beside the index, and the index moves
whenever objects are deleted, split or reordered; an id passed as an index was refused without saying what it was.
Every command that names an object, a part or an instance now takes its index or its id, both together still a
guard, and object_list gives each instance's id too. An id given as an index is refused with what that id names, and
recorded replays keep naming targets by index, so they still run in a new session.
2026-11-23 00:06:23 +08:00
SoftFever 6122352058 Shorten the longest MCP tool descriptions
The ten largest definitions in the tool list repeated much of what their parameters already say. They now
say it once, taking about 4.9 KB off the tool list an agent reads at the start of every session, with
nothing they described left out.
2026-11-22 22:36:37 +08:00
SoftFever 3283fa0016 Mark names as code in the MCP tool descriptions
Agents can tell an argument or a reply field from an English word in every tool description. The
server instructions say what the Speed Dial is, a call held by a dialog says how to run it without
asking next time, and object_add_text and object_add_svg say what they reply.
2026-11-22 22:01:16 +08:00
SoftFever d3f57df99f Shrink the MCP tool list
Agents load less text before their first call: the object and part id guards are explained once
in the server instructions instead of in every schema that takes one, and each tool's title is
sent once.
2026-11-22 21:59:35 +08:00
SoftFever f9c0411c0c Keep MCP replies short and free of float noise
Agents now read an object's position as 60.001 rather than 60.001007080078125, and a Design
command's zero as 0 rather than 4.4e-16, without the wrapper and ok flag that said nothing; a
client that computes with the numbers can still ask for them whole. object_list gives a short row
per object unless asked for detail, so a plate of a hundred objects fits a client's reply limit,
and app_log returns 50 lines by default.
2026-11-22 21:57:47 +08:00
SoftFever bca0a9857f Say in the server instructions that values_from belongs to a parameter 2026-11-22 20:01:01 +08:00
SoftFever 8bb0196353 Tell agents which catalog filters are optional and that values_from may name several tools 2026-11-22 19:57:16 +08:00
SoftFever 122f106aee Tell agents in the server instructions how to find what to call
An agent connecting to the MCP server now reads, right after the workflow, how each catalog is found
by listing: commands place by place and the rest through tool_list, a command's manual before calling
it through tool_call, settings by page, Speed Dial actions by section and the Python API by module.
2026-11-22 19:52:06 +08:00
SoftFever a629d3590f Say where tool_describe keeps a schema part it cannot show 2026-11-22 19:48:47 +08:00
SoftFever f399cdd79f Say in the MCP design doc exactly what a manual leaves out for a raw schema 2026-11-22 19:47:14 +08:00
SoftFever 37e136acac Keep tool_describe from calling an object open when a plugin schema may close it
A plugin schema can close an object through a keyword the manual keeps raw, such as allOf. The manual
then no longer says the object, or the call, takes other keys, and leaves the attached schema to say
what it accepts.
2026-11-22 19:33:47 +08:00
SoftFever b1500e4aae Say in tool_describe's manuals which objects take keys they don't list
Every object in a manual now says whether it takes keys besides its properties, at any depth, as the top
level already did. A plugin schema whose properties can't be read now comes with the raw schema instead of
looking like one that takes no arguments.
2026-11-22 19:25:15 +08:00
SoftFever 5026ada896 Point tool_describe's manuals to more values' sources, and keep plugin rules
An agent reading a manual now learns where a filament's purge mode, a calibration's shaper type, a
hole's point, printer_install's models and dialog_answer's dialog come from, and sees that a plugin
operation can reach outside the app. What a plugin's schema says that the manual can't show, such as a
required argument with no property, now comes with the raw schema, and a schema that takes any argument
says so instead of looking like one that takes none.
2026-11-22 19:14:39 +08:00
SoftFever 918fc04533 Pass clang-tidy on the MCP list tools and drop the docs' last search wording 2026-11-22 18:38:33 +08:00
SoftFever 7f8af3beeb Browse settings by page with settings_list_pages, and read them by key
settings_get and preferences_get matched an agent's words, so a goal such as "add a brim" found the wrong
settings. Agents now list a settings tab's pages and groups with settings_list_pages, read a page's settings
and what each does with settings_list, and read named settings with settings_get and preferences by tab
with preferences_get.
2026-11-22 18:19:51 +08:00
SoftFever 3c6752abf9 Browse the Python API a module at a time with script_list_api and script_describe_api
script_search_api ranked the API by an agent's words, so a goal phrased in other words found the wrong entries.
Agents now list what a module or class holds with script_list_api and read one entry's whole documentation
with script_describe_api.
2026-11-22 18:08:23 +08:00
SoftFever ee42f3922c List the Speed Dial's actions with action_list, in place of action_search
action_search ranked actions by matching an agent's words, so an action named differently from the request
was missed. action_list lists them by section and title for the agent to choose from, as tool_list does
for commands.
2026-11-22 18:03:47 +08:00
SoftFever 2e46806600 Document how agents find and read commands with tool_list and tool_describe 2026-11-22 17:57:19 +08:00
SoftFever d51fb9f4ed Show what each command does when tool_search lists a group
Agents listing the Design tab's commands, or any other group, got bare names and had to look each one up to
choose. tool_search {group} now gives each command's first sentence and, in Design, its heading, in the order
the description's index uses. action_search names the Speed Dial's sections section rather than group, so they
are no longer mistaken for tool_search's groups, and a wrong section is refused with the sections there are
instead of returning nothing.
2026-11-22 14:50:46 +08:00
SoftFever 7db95f5c1e Say in a word why an MCP call was refused, and how to get past it
Design commands were refused with numbers such as -32002 or with no code at all; they now say design_busy,
precondition, invalid_argument, rebuild_failed and the like, so an agent can tell a wrong argument from a design
that is not ready, on every route that takes arguments. Refusals worded for a person, such as an open gizmo or a
selected object, carry a hint naming the call that gets past them, and an index too large for the app or written
as 2.0 is no longer misread as another object, plate or instance.
2026-11-22 13:36:38 +08:00
SoftFever 15bb082ce2 Refuse misspelt Design arguments and tell agents how to fix refused calls
A misspelt argument to most Design commands was ignored, so the command ran with
its default, such as a helix built with the default pitch. Every Design command now
refuses it and names the arguments it takes. Refusals of a missing object or part,
an unknown setting key, an invalid setting value or a preset that is not installed
now say the valid range, the similar keys, what the setting takes or the command
to use, and plate_add and object_add_handy_model say what they added.
2026-11-22 01:28:26 +08:00
SoftFever fdf335472c Fix --run crashing at exit when a dialog is still open
A --run launch that ended with a dialog open, such as the prompt to restore an unsaved project left by an
earlier session, crashed while closing and returned a crash code instead of the replay's result. It now
closes the dialog first and exits with the replay's code, and it no longer asks about or discards a
person's unsaved project, which their next normal launch still offers to restore.
2026-11-21 23:41:23 +08:00
SoftFever 3ba8743720 Write replay results to the temp folder unless an output folder is given
Replays that name no output folder, whether run from Action Replay, by an agent or with --run, left a
<name>.out folder beside the replay file or filled the data folder. They now write to a new
orca_action_replay/replay-<time> folder in the temp folder, or inside --outputdir when a --run launch names one.
2026-11-21 23:41:14 +08:00
Warren GreenandClaude Opus 5.5 1174b39004 Speed up slicing without changing the G-code of a fresh slice (#17335)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-21 10:59:12 -03:00
SoftFever 7e4b791589 Let MCP calibration tests print with any physical filament
calibration_generate_test always printed with filament slot 1, so an agent could not calibrate another filament of
the project or, on a multi-extruder printer, the nozzle that prints it. It now takes filament_slot, as the
Calibration dialogs' filament list offers, prints on the extruder the filament map gives that filament, and says in
its reply which extruder that is.
2026-11-21 20:45:39 +08:00
SoftFever 867ba9b005 Merge branch 'main' into feature/mcp 2026-11-21 18:57:39 +08:00
SoftFever b30dfcd51b Let MCP path rules answer file pickers on Linux
A dialog_auto_answer rule with a path still cancelled every open and save file picker on Linux, so a script
couldn't save or open a project through the File menu or insert an SVG in the Design tab there, and the sweep
skipped those steps. File pickers now take the path as on Windows and macOS. This needs the updated
wxWidgets, so rebuild the deps.
2026-11-21 17:24:41 +08:00
SoftFever 97809fe274 Let MCP path rules answer folder pickers on Linux
A dialog_auto_answer rule with a path cancelled every folder picker on Linux, such as the Preferences
download folder's Browse and the recording dialog's Change..., so a script couldn't pick a folder there and
the sweep's Preferences and Speed Dial tests failed. Folder pickers now take the path as on Windows and
macOS; file pickers still cancel on Linux.
2026-11-21 17:24:34 +08:00
SoftFever af80804f24 Make MCP sweep tests pass in any order, one app per job
A test's verdict depended on which test had run before it on the shared data folder, and fixed pauses failed tests
on a busy machine. Each job now runs its tests in one app, every test starts from the same baseline whatever ran
before, and tests wait for the state they expect rather than for a set time; --shuffle runs the sweep in a random
order to show any test that still leans on another. The command-line test is gone, as it checked options outside
the MCP server.
2026-11-21 02:24:06 +08:00
SoftFever 3f314bad3f Stop testing that the early MCP command-line options are refused
The command-line test checked that four MCP options from before their rename are refused. They never shipped in a release, so the check guarded nothing a user could rely on, and on Windows it printed the app's full usage text into the sweep's console four times.
2026-11-21 02:23:39 +08:00
SoftFever 9d7778ec86 Make the full MCP sweep finish in about 11 minutes
A full sweep on six jobs took 17 to 19 minutes, too long to run often. Its 66 tests are
now 40 that cover the same areas with each scenario run once, and the sweep finishes in
about 11 minutes. The Speed Dial test checks a handful of commands no other test reaches,
and the sweep runs only test_*.py files; smoke_test.json and the Design replays are
played by the tests that use them.
2026-11-20 21:38:12 +08:00
SoftFever 190d6848b0 Edit mixed filaments and their gradients over MCP as the sidebar does
Agents can now read the whole filament list with filament_list, change a mixed filament with filament_edit_mixed,
and set a gradient by driving the Add or Edit Mixed Filament dialog. The slot colours and the flushing settings move
from the project tools to filament_set_colour and filament_set_flushing, beside the rest of the filament list.
Deleting or merging a filament that a mix uses now behaves as it does in the sidebar, and the settings tools no
longer edit a physical filament's preset through a mixed slot.
2026-11-20 17:15:05 +08:00
SoftFever 28203ae06d Keep MCP calls reliable on a busy machine
When the computer was busy, agents saw calls fail that work on a quiet one. A right click's context menu could open
on screen instead of reaching the call, a click could find a button still disabled, a call could report it was
blocked by a dialog an auto-answer rule had already answered, the first call through the stdio bridge could be
refused while the app it started was still loading, and a replay could fail waiting on a step that had finished.
Each of these now waits for the app to catch up instead.
2026-11-20 15:04:12 +08:00
SoftFever f81887ca13 Delete mixed filament slots and export sliced files of unsliced plates over MCP
An agent could not remove a mixed filament slot, so a project that had one never got back to a single slot, and
deleting a physical slot a mix used left the mix broken. filament_delete now removes a mixed slot as the sidebar's
list does and refuses to delete a slot a mix needs. Exporting a sliced file to a given path no longer fails on the
file name template when the plate is not sliced, as it did on the Generic Klipper Printer.
2026-11-20 15:04:05 +08:00
Ian Chua 0c62aa085e feat: Install Python plugin wheels with uv (#17281)
* feat: initial migration to let UV install plugins for .whls

* fix: clang-tidy

* Simplify plugin wheel loading through uv

* fix: use legacy loader for plugins loaded with legacy method

* fix: use same unzip name as old one

* fix: keep legacy plugins on the same path

* fix: unit tests

* fix: allow epoch versions in wheel filenames

* fix: clang-tidy

* fix: pass Unicode paths to uv on Windows

* fix: cleanup

* fix: support Windows long paths when installing wheel plugins

* fix: recognize uppercase .whl extensions in plugin discovery and dependencies

* fix: keep plain import paths for short namespace and compiled packages

* refactor: fold duplicate wheel import and cache migration branches

* fix: treat an absent package directory as a single-module import

* fix: windows long path deletion (#17703)

* fix: handle long Windows plugin cleanup paths

* fix: warn when plugin deletion removes no files
2026-11-20 14:51:42 +08:00
HanifKoh 3efe401d8e Give the Section View's Cut Face the Infill Colour in the Solid Model (#17701)
The solid model capped the section view's cut with the body's wall colour, while the two layer caps already took the infill's. The section cap now takes the infill colour sampled over every layer the solid stands for, as the body takes the wall colour, falling back to the body's colour where a body has no infill. Views that colour by filament are unchanged.
2026-11-20 13:50:36 +08:00
Ian Chua 5cf5ef881e fix: audit process by executable (#17671)
* fix: audit process execution by name, ignore args

* test: fix stale test expectations

* fix: resolve Windows subprocess audit targets from command line

* fix: preserve quoted Windows paths in process audit grants

* fix: grant shell permissions for os.system commands

* fix: require grants for all possible os.system shells

* fix: clarify process permission scope in prompts

* refactor: simplify audit target handling

* fix: handle ambiguous Windows process commands

* test: fix for ambigous calls on windows
2026-11-20 05:24:22 +08:00
SoftFever fd6f2934eb Document the gizmo and printing commands for MCP clients and developers
The command reference now describes the 13 gizmo and printing commands: which gizmo or dialog each opens, the
arguments that do the job without it, the Print button's routes for each kind of printer, and what is left to the
dialog. The server design says how the commands reach the gizmos, the print dialogs and the printer, and the test
notes name what no test reaches: the Bambu print dialogs and a physical printer.
2026-11-19 23:54:56 +08:00
SoftFever 04b533f493 Let MCP clients see and close the Action Replay window
The Action Replay window was hidden from every GUI tool, so an agent or a test that opened it could not close it,
and it stayed on screen for the rest of the run. It is now listed with a ref, its page can be read, and Escape sent
to it closes it. Its file pickers and confirmation prompts stay the person's alone.
2026-11-19 23:29:31 +08:00
SoftFever 6cd2ce1a2e Check every area of the MCP sweep with Python tests that read each step back
The sweep's objects, presets, filaments, settings, project files, slicing, gizmos and GUI tools are tested by Python
tests that compare the app's state after every step with the values their entries write out, in place of the
replays, and the existing tests' checks that could not fail now can. The calls these tests found wrong now behave
as described: moving one instance no longer sinks the others, a toolpath export writes the layers shown, an
auto-answered dialog no longer reports its call blocked, and a web dialog that has just opened takes requests.
2026-11-19 13:49:20 +08:00
SoftFever f80433cff0 Check the plates in the MCP sweep with a Python test that reads every step back
test_plates.py takes the place of the plate replays: after each add, duplicate, rename, lock, select or delete it
reads the plate list back and compares it with the state its entry writes out, and it checks what a lock keeps
Arrange and Auto-Orient from doing, a plate's own settings, the filament slots and the plate icons. Arranging a
locked plate is refused with advice that names plate_lock with the plate, instead of a needless plate_select.
2026-11-19 06:15:39 +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 ba02e96c27 Document every MCP command in one reference, the Design tab's in a section of its own
The commands outside the Design tab now have a reference like the Design tab's: what each does and
takes, which menu rows call it, which calls ask in a dialog and the call that does not. Both live in
docs/HLSD/mcp-tools.md, OrcaSlicer's commands first and the Design tab's at the end.
2026-11-18 19:17:04 +08:00
Ian Chua 3838002bc8 feat: serialize permission grant for create and delete files (#17478)
* feat: serialize permission grant for create and delete files

* test: expect saved copytree permissions in hardlink audit test

* refactor: simplify plugin filesystem and permission handling

* fix: show triggering paths in plugin permission prompts

* fix: require subtree consent for recursive plugin deletes

* fix: tests

* fix: Windows short-path aliases in plugin audit checks

* fix: correct plugin folder permission display and consent text
2026-11-18 17:50:29 +08:00