I would like to have 2 events that are similar to the on_put_item event:
- on_put_wire: Called before players connects wire. Called before on_player_cursor_stack_changed (which is now the only event being called when connecting wires).
- on_planned_rails: Called before players uses RailPlanner to build rails. Called before on_built_entity. Other than player_index, it should also provide how many rails will be used.

Edit: turns out placing tiles does not invoke the on_put_item event, so I would like to have another event for tiles, or simply, make on_put_item also called for placing tiles.

Use case:
I am making a cheat that allows players to keep the last item after building something. Like this:
Build rails
You have only one rail left in your hand, but this cheat allows you to use it infinitely.The triggered events are printed on the console. The number after "T" is the tick number, e.g. T6598 = tick 6598.
Test Mode users will be familiar with this function. But my cheat has a different logic.
I am relying on the on_put_item event to give a free item based on the player's cursor_stack before the entity is built.
And I also listen on_built_entity. If the built entity is a ghost, I get the item back.
The problem is, using RailPlanner to build rails will not trigger on_put_item. So, I have to use the old trick in Test Mode - supply item in on_built_entity - if the player has no more item for building the entity after the entity is built, give him a free one.
RailPlanner
But I am not satisfied with the result, as you can see that the item slot changes. Anyway, it is just about perfection. 
Connecting wires has a more serious problem. As I said above, on_player_cursor_stack_changed is the only event being triggered when connecting wires. There is no way I can know the player has used a wire and I should supply it.

Wiring