valis / Reference / API reference

Development - API reference

Exported surface for the dev subsystem. Part of the API reference.

Package valis/src/dev/slynk

Conditions

development-listener-host-not-loopback

Signalled when a caller asks for a listener on anything but a loopback address. Loopback is not a default that a caller may override — the deployment host's interfaces are publicly routable, so a listener bound to any real address is remote code execution offered to the open internet. The refusal is unconditional.

development-listener-invalid-port

Signalled when the requested port is not an (unsigned-byte 16). Refusing is what keeps a typo from becoming a bind on some other, unexpected port.

development-listener-not-compiled-in

Signalled when the SLYNK package is absent from the running image.

Every shipped valis node carries slynk, so this refusal should not fire in a delivery build; seeing it means the image was built without the listener, not that the listener was withheld by policy. The condition is kept because such an image remains buildable and must fail with a named cause rather than a mystery, and because the caller that meets it needs to tell it apart from a listener that was configured wrong.

development-listener-refused

Base type for every refusal to start the development listener. A caller handles this to mean "the listener is not running and here is precisely why"; the subtypes below name the individual causes so a handler never has to guess which one it caught.

development-listener-start-failed

Signalled when slynk is present and the arguments were admitted, but the bind itself failed — an already-occupied port, for instance. The underlying condition travels in CAUSE rather than being discarded, so the wrap narrows the type without losing the diagnosis.

Generic functions

development-listener-refused-host

(development-listener-refused-host condition)

Undocumented: this exported symbol needs a docstring.

development-listener-refused-port

(development-listener-refused-port condition)

Undocumented: this exported symbol needs a docstring.

development-listener-start-failure-cause

(development-listener-start-failure-cause condition)

Undocumented: this exported symbol needs a docstring.

Functions

development-listener-available-p

(development-listener-available-p)

True when the SLYNK package is present in this image, which every shipped valis node is built to be.

This answers whether a listener could be started here, never whether one is running: for that, ask DEVELOPMENT-LISTENER-LISTENING-P. It is the predicate form of DEVELOPMENT-LISTENER-NOT-COMPILED-IN, so a caller can find out in advance what a start attempt would refuse with in an image built without slynk.

development-listener-listening-p

(development-listener-listening-p)

True when a development listener has been started in this image and is listening.

This is the fact that varies from node to node now that slynk ships everywhere. The code being present says nothing; only a caller that supplied a port makes this true.

start-development-listener

(start-development-listener port &key (host "127.0.0.1"))

Start the development listener on PORT at HOST and return both as values, so a caller reports what was bound rather than repeating what it hoped for.

Refuses, with a defined condition under DEVELOPMENT-LISTENER-REFUSED, when HOST is not loopback, when PORT is not a TCP port, when this image has no slynk compiled in, or when the bind fails. It never returns NIL to mean "did not start" — the caller either has a listener or has a condition naming why it does not.

The checks run host, then port, then availability, so a non-loopback request is refused identically in every build: a production image must not answer a routable-address request with "no slynk here" and leave the caller thinking the address was the acceptable part.

Nothing here is ambient. There is no global that turns the listener on, no autostart at load time, and no state left behind — it starts only when something calls this function. That is so the single call site can later be placed behind valis's own capability system (a designation alongside /active/zone-write and /edge/listen/<port>) without having to first dismantle an install of hooks.