You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The canonical client ⇄ dig-node CONTROL interface contract. One ecosystem definition of the
management/query surface a client (the CLI dign, the browser extension, dig-app, hub) uses to
control and query a running dig-node — status, config, cache, hosted/pinned stores, §21 sync, the peer
network, subscriptions, the auto-update beacon, live log level, and control-token pairing — so the
client side and the node side can never silently drift. Transport-agnostic: rides the
dig-ipc-protocol local session, or loopback-mTLS + a signed control token over HTTP/WebSocket for
clients that aren't on the local pipe.
License: Apache-2.0 OR MIT
Spec:SPEC.md (normative) — this README is the at-a-glance interface reference.
[dependencies]
dig-node-control-interface = "0.2"
Usage
Client side — build a typed request, carry it over your transport, parse the typed result:
Node side — implement ControlHandler (one typed method per control method); the provided dispatch
routes a raw request to the right method and builds the response.
Authorization
Every control.* method is token-gated: present the node's local control token as the
X-Dig-Control-Token header (preferred) or a params._control_token field. pairing.request /
pairing.poll are OPEN (a token-less client uses them to obtain a scoped token after local operator
approval). The three control.pairing.* admin methods require the MASTER token specifically.
Full interface reference
Every control method, for LLM/agent lookup without reading code. Auth: T = requires the control
token, M = requires the MASTER token, — = open. Route: how the node resolves it — own
(service shell), del (engine), open (bootstrap).
Every control error is {code:int, message:string, data:{code:SYMBOL, origin:string}}. Branch on
data.code (the stable symbol), never the message.
Code
Symbol
Origin
Meaning
-32700
PARSE_ERROR
shell
request body was not valid JSON
-32600
INVALID_REQUEST
shell
not a single JSON-RPC object
-32601
METHOD_NOT_FOUND
boundary
control method is not resolved
-32602
INVALID_PARAMS
node
missing/malformed params
-32000
DISPATCH_FAILED
shell
the node failed to dispatch a well-formed call
-32030
UNAUTHORIZED
shell
control.* called without a valid token
-32031
NOT_SUPPORTED
shell
control op unsupported on this build
-32032
CONTROL_ERROR
shell
control op failed at runtime
Boundary
dig-rpc-protocol — node ⇄ node peer wire.
dig-ipc-protocol — app ⇄ node local session/signing envelope (the transport this catalog rides
over, for local clients).
dig-node-control-interface (this crate) — the control METHOD CATALOG carried inside that
authenticated channel, or over loopback-mTLS for remote-transport clients.
See SPEC.md for the normative contract and the superproject SYSTEM.md for the wider cross-repo map.
Consumers
dig-node (server-side dispatch — implements ControlHandler), the CLI dign, dig-chrome-extension,
dig-app, hub — all consuming this one control contract per epic #1110 (dig-node adoption + the
dig-rpc Control-tier removal land in later tasks of the cascade).
About
Canonical client<->dig-node CONTROL interface contract crate - the method catalog for controlling/querying a running dig-node (config, status, peers, subscriptions, cache, wallet), transport-agnostic. SSOT so client and node can't drift.