Skip to main content

Module harness_service

Module harness_service 

Source
Expand description

Versioned, language-neutral service over persisted harness sessions.

The service is transport-agnostic: HarnessSessionService::handle accepts one JSON-RPC value and HarnessSessionService::poll produces subscription notifications. The CLI exposes those primitives as NDJSON over stdio.

Structs§

DetachedAnswer
One detached call’s complete answer, plus whatever it must hand back to the service before that answer is written. See HarnessSessionService::finish_detached.
DetachedCall
One detached request: the half that reads this service’s state already done, and the half that waits not yet started. See HarnessSessionService::detach and HarnessSessionService::detach_runtime.
GatewayHealth
ORCH-17: gateway on a harness.v1.harnesses.list row.
HarnessSessionService
Stateful persisted-session service. Each instance owns its follow subscriptions; discovery and loading remain read-only.
OpenedRuntime
The result of RuntimeOpen::open, ready for HarnessSessionService::finish_runtime_open.
ReturnedRuntime
A connection lent to a detached call, on its way back to the service that owns it.
RuntimeOpen
One RUNTIME_OPEN_METHODS request, parsed but not yet started. See HarnessSessionService::runtime_open for why it exists apart from HarnessSessionService::handle_async.

Enums§

GatewayState
Receipt-backed evidence that a harness has a RUNNING instance right now, distinct from being merely installed (UNI-7). Detection is passive and default-on: a gateway liveness connect for daemon harnesses, a fresh SQLite WAL stamp for store-writer harnesses (precedent: the opencode follower’s -wal/-shm freshness). Control stays behind per-connection grants — this reports observations only. ORCH-17: the gateway-health noun on an inventory row. Derived from the UNI-7 running-instance probe (Hermes: state.db-wal freshness; OpenClaw: a TCP connect to the gateway endpoint resolved from its OWN config) plus the executable version — never by starting anything.

Constants§

DETACHED_CALL_DEADLINE
How long a request moved off a transport’s loop gets before its caller is answered an error instead. Each of these already bounds its own inner waits (a probe’s handshake, the courier’s run); this is the backstop for the ones that do not — a harness CLI that never exits — so no caller waits forever on a detached task no one is watching.
DETACHED_METHODS
The doors whose work happens entirely OUTSIDE this service’s state once its state has been read: probing harnesses, couriering a message into a live session, and performing a conversation verb through a harness’s own CLI / HTTP / store door. Every one of them waits on a child process or a network peer. See HarnessSessionService::detach.
HARNESS_SERVICE_METHODS
Every JSON-RPC method the harness service dispatches (harness.v1.capabilities reports it; ORCH-4 registry tiers must cite entries of it).
HARNESS_SERVICE_VERSION
Protocol namespace implemented by this service.
RUNTIME_CONTROL_DEADLINE
How long a control call on an ALREADY-open runtime — send input, interrupt, steer, respond, close — gets before its caller is answered an error instead. A live runtime answers these in milliseconds; a wedged one never answers at all, and close is exactly what a caller reaches for when it suspects that.
RUNTIME_EVENT_METHOD
Notification method emitted for live runtime events.
RUNTIME_OPEN_DEADLINE
How long a runtime gets to finish opening before its caller is answered an error instead. A program that never speaks the protocol at all — the wrong binary, a shim that prints usage and waits — never answers the handshake, so the wait is unbounded without this.
RUNTIME_OPEN_METHODS
The doors that open a runtime: each spawns or joins a program and waits on that program’s protocol handshake before it can answer.
SESSION_ACTIVITY_EVENT_METHOD
Notification method emitted for normalized session-activity transitions.
SESSION_DISCOVER_DEADLINE
How long sessions.discover gets before its caller is answered an error instead. Discovery reads each harness’s own store, and a store on a cold or unavailable mount answers at the filesystem’s pace rather than its own.
SESSION_EVENT_METHOD
Notification method emitted for followed-session changes.
SESSION_INDEX_EVENT_METHOD
Notification method emitted for revisioned session-list changes.