devockr / @idsh/host-ops
dsh tools that ask the host broker over a unix socket — the container never holds a host credential
About this plugin
Written by the registry from verified metadata, not from the README.
@idsh/host-ops is a DSH plugin published from the packages/host-ops package in the devockr/idsh repository.
Capabilities and topics
@idsh/host-ops
The agent-facing half of the host broker: the container holds a socket path, never a host
credential. On load the plugin asks @idsh/host-broker for its operation table and registers one
dsh tool per operation, so the model sees the broker's summaries and JSON Schemas under a
tool-safe name (log.tail becomes idsh_log_tail; the call still goes to the broker as log.tail).
Configure
- id: host-ops
name: '@idsh/host-ops'
config:
socketPath: /run/idsh-host/host.sock
timeoutMs: 15000
refreshMs: 60000
socketPath defaults to /run/idsh-host/host.sock and timeoutMs to 15 seconds — slightly longer
than the broker's own 10-second operation deadline, so the broker's timeout is the one the agent
sees. An operation that publishes its own timeoutMs (the build) uses that instead, for the tool
call and the socket wait alike. refreshMs defaults to a minute: the interval at which the table is
asked for again, clamped to the largest delay a Node timer can express. The socket's directory is
the deployment's to mount; this package names nothing else.
Shape
- A tool call is one line to the broker and one line back, on a fresh connection. Nothing is pipelined, and the broker validates the arguments against the schema it published.
- The broker owns the bounds and the audit log: output is capped, operations are rate-limited, and every call — refusals included — leaves a line before the answer.
- The table is read at load and asked for again every minute: an operation added to the broker
appears without a container recreate, and the tools are replaced only when the table changed — an
unchanged one registers nothing. A re-read that fails leaves the mounted tools in place.
The plugin declares its own
protocolwhen it asks, so a broker that speaks one answers with{protocol, version, ops}and an older one ignores the argument and sends the bare table. A different protocol — or a bare table, which only means "older broker" — is named once per table (its protocol and version), not once per poll; the tools still register, because the table is readable either way. - A broker that is down does not fail the profile: the plugin logs a warning and registers no tools, so the delegation still boots. The poll starts only after a table has been read, so such a broker is picked up on the next load, not by the timer.
- An operation that names a
preview(deploy.build/deploy.main→deploy.source) is resolved first: the broker's read-only answer — the branch tip and themainsha — goes into the question, so the person approves a commit rather than{"pr": 82}. A preview that fails is the error the person sees; nothing is asked and the operation is never called. - A destructive operation (
confirm: truein the broker's table) asks first, inside the tool call: the question service blocks and holds the answer, so a model cannot fabricate a yes. Only the "Run" option confirms it. A free-text answer is a reply, not an approval — the person may be asking what the operation does — so it leaves the host untouched and is passed back in the error, where the assistant can answer it and ask again. Cancel, a skipped question and an empty answer behave the same.
Long deploys as jobs
deploy.build, deploy.main and gcb.authorize take minutes, so with the job registry the deployment
provides (ctx.get('jobs')) the tool starts a deploy job and answers with its id at once:
the broker keeps building, the job pulls the broker's build-<log>.log into its output
ring, and the UI streams it while job_output reads it.
Each build writes its own build-<log>.log, named by the call id when that is a broker-safe name,
so a job follows exactly the log its own call writes: a refused deploy streams nothing from a
neighbour, and a later job never replays an earlier build. A broker whose table does not declare
log (one older than this plugin) writes one shared file, so those operations stay synchronous
rather than streaming a log that a neighbour may also be writing.
The job is process-local (the registry lives in this dsh process), so a container recreate ends it
with everything else — what survives is the broker's build log on the host, and what stops blocking
is the tool call. The registry drains every source one last time before settlement, so a build that
finished within one poll still leaves its tail in the ring. The registry ships with dsh — dsh-base
loads @deepseek-ai/dsh-jobs-local — so a deployment without it is not supported: its first
background deploy fails loudly instead of running synchronously.
The deployment mounts the broker's state directory at /run/idsh-host-state (read-only) for that
log — that directory also holds audit.jsonl. A build's file name cannot be known before the call,
so mount the directory (or a known build-<log>.log), not build.log. statePath overrides where the log is read from. Killed jobs report killed and cancel the
client call; the broker's own budget (15 minutes) still ends the build if nobody is watching.
Not in this package
The operation table, the bounds and the audit are @idsh/host-broker (the host program). This
package is the client, and it does not decide what exists.
Badge
Listed here? Link back with this badge — paste the snippet into your repository README.
[](https://dsh-plugin.com/plugins/devockr/idsh/packages/host-ops)