All print API code should be on the server (move, extrude, stop, etc) and exposed via RPC. The raw GCode sending function can stay for advanced users but it makes sense that the printer driver itself should make decisions about queuing commands, interpreting printer physical extents, and handling errors and actual movements. The web GUI can query printer position and movement status and the size/content of the raw GCode and higher level API command queue.
All print API code should be on the server (move, extrude, stop, etc) and exposed via RPC. The raw GCode sending function can stay for advanced users but it makes sense that the printer driver itself should make decisions about queuing commands, interpreting printer physical extents, and handling errors and actual movements. The web GUI can query printer position and movement status and the size/content of the raw GCode and higher level API command queue.