The lifecycle seams. Three small protocols, split by reason to change (ISP):
ILinkProbe look, never touch: one Observation of the link.
ILifecycle the remedies a HealPlan names, one method per step kind
that acts on the world.
IClock time, so awaiting an answer is testable without sleeping.
The host adapters live in hive-gimp.lifecycle.host; the suite's fakes in
test/hive_gimp/lifecycle/fake.clj. Every method returns data and never
throws for an expected failure: a remedy that did not work is a
{:ok? false} the planner escalates on, not an exception that ends the
heal before the next remedy is tried.
The lifecycle seams. Three small protocols, split by reason to change (ISP):
ILinkProbe look, never touch: one `Observation` of the link.
ILifecycle the remedies a `HealPlan` names, one method per step kind
that acts on the world.
IClock time, so awaiting an answer is testable without sleeping.
The host adapters live in `hive-gimp.lifecycle.host`; the suite's fakes in
`test/hive_gimp/lifecycle/fake.clj`. Every method returns data and never
throws for an expected failure: a remedy that did not work is a
`{:ok? false}` the planner escalates on, not an exception that ends the
heal before the next remedy is tried.(now-ms clock)Milliseconds, monotonic enough to measure a wait.
Milliseconds, monotonic enough to measure a wait.
(sleep! clock ms)Wait ms.
Wait `ms`.
(kill-listener! lc endpoint)Stop the process holding endpoint's port. GIMP itself survives: the
holder is the plug-in process, not the GUI.
Stop the process holding `endpoint`'s port. GIMP itself survives: the holder is the plug-in process, not the GUI.
(launch-headless! lc endpoint)Start a headless GIMP, owned by hive-gimp, that runs the MCP server.
Answers {:ok? true :detail ProcessHandle}.
Start a headless GIMP, owned by hive-gimp, that runs the MCP server.
Answers `{:ok? true :detail ProcessHandle}`.(relaunch-in-gui! lc endpoint)Start the MCP server procedure inside the running GUI GIMP, no human.
Start the MCP server procedure inside the running GUI GIMP, no human.
(restart-server! lc endpoint)Ask a live plug-in to drop and re-bind its socket (restart_server).
Ask a live plug-in to drop and re-bind its socket (`restart_server`).
(stop-owned! lc)Stop the headless GIMP this adapter launched, if any.
Stop the headless GIMP this adapter launched, if any.
(observe probe endpoint)An Observation of the MCP link at endpoint ({:host :port ...}).
An `Observation` of the MCP link at `endpoint` ({:host :port ...}).
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |