Saying that hw_pipedocument() and hw_gettext() do the link insertion automatically is not as simple as it sounds.
Adding Hyperwave support to PHP should fill in the gap of a missing programming language for interface customisation. It implements all the messages as defined by the HG-CSP but also provides more powerful commands to e.g. retrieve complete documents.