feat(plugin): object-pick acquisition for interactive commands

Extend InteractiveCommand with needs_object_pick / on_object_pick so a
plugin tool can prompt the user to pick an existing entity (handle + point)
rather than a free point — the structure-pick path Storm Sewer's SS_PIPE
needs to connect existing structures. The host adapter delegates to the
internal entity-pick flow; over --serve the pick is fed as a hex handle.
Stays API v2 (no released plugin implements InteractiveCommand yet).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-18 01:43:53 +03:00
1 parent f5ac0a90cf
commit 707c143212
4 files changed
+114 -2

No files matched your search

+6
View File
@@ -243,6 +243,12 @@ command works by clicking in the viewport and by feeding coordinates over the
API to **v2** — the added `HostApi` method changes the contract's vtable, so v1
binaries are refused at load.
To reference **existing** geometry (e.g. connect a pipe between two structures),
set `needs_object_pick() -> true`; the host then calls
`on_object_pick(handle, pt)` with the clicked entity's handle (read its
XDATA/geometry via `HostApi`). Over `--serve` the pick is supplied as a hex
handle: `run "MY_CMD 2F 30"`.
### XDATA — domain persistence
Store domain data on entities as XDATA (under your `xdata_apps` ids), not in a