docs/cmd/ez-agent-hub.md
ez-agent-hub command
ez-agent-hub runs the optional standalone AgentHub service with one explicitly
enabled public TCP listener and a private local-control dashboard.
The client is ez-agent --hub.
Direct and restricted routed bilateral Hub pairing and normal peer-link
management are implemented. Verified public directories synchronize over fresh
normal-peer links. Production remote endpoint selection combines signed
publication with eligible route availability and carries the existing endpoint
TLS/ACL/application stream with bounded circuit recovery. Restricted routed
pairing has its own Hub-targeted carrier and never opens an endpoint.
Commands and bootstrap
Build with just build; run build/ez-agent-hub. The command accepts --help,
--version, and --config; with no arguments it runs until SIGINT or SIGTERM.
--config opens the local dashboard and never starts the public listener or
EzAgent. On an empty layout, type exactly bootstrap to create initial
credentials and an inbound-disabled config; empty input or Ctrl-D cancels. A
successful bootstrap prints the new identities and exits; run --config again
to enter the dashboard. With a running service the dashboard securely dials
private control.sock, completes EzHub hello and holds one concurrent typed
Client for commands and the pairing view. Only an absent socket permits opening
the protected store through admin.NewOfflineClient. Unsafe/refused sockets,
authentication failures and failed hello never trigger offline bootstrap or
administration. Type help at hub> for current commands.
A client-only home can bootstrap its local Hub without replacing its existing device, saved Hub pins/admissions or endpoint grants. Bootstrap validates the existing client snapshot and credentials before committing the Hub, reuses that client and displays its existing device identity. Invalid existing snapshots or credentials stop without replacement. A missing snapshot does not authorize replacement of prior credential material; incomplete bootstrap stays fail-closed.
Ordinary dashboard mutations preflight the displayed store revision and authority
before sending. A change stops the command; it never substitutes a fresh revision
or authority. Read status, review the changed state, and enter a new decision.
After a failed/uncertain write or local authority rotation, an explicit displayed
status is required before another ordinary mutation. Detail-based decisions use
their own exact loaded revision and one-use confirmation token, described below.
Neither path retries conflicts or replays invitation cards.
Offline security-time checks can also reject prepared work if the clock advances
before the final append, even when no other administrator changed the revision.
This includes endpoint registration. Read status and make a new decision;
the dashboard does not silently rebase or retry the failed operation.
Offline pairing administration supports durable browse/detail and
set_pairing_alias through an independent protected sidecar owner. The original
approve_joining_pairing, approve_inviting_pairing, cancel_pairing and
cancel_pairing_card require a running service PairingActions owner and return
unavailable offline, as do check_pairing and add_hub. Offline administration
does not create a pairing worker or perform network checks. Durable mutations
share locked domain code where supported offline, not a blanket offline guarantee
for service-owned decisions. This does not demote mandatory new private operations.
Keep the resolved local control.sock pathname short enough for the platform's
Unix-domain socket limit. A deeply nested XDG_RUNTIME_DIR can prevent startup;
the current CLI may report only service startup failed for that listener error.
For isolated tests, use a shorter test-specific runtime directory while keeping
all three XDG homes separate from live state.
This diagnostic limitation does not indicate a circuit-recovery failure.
Configure the listener
| 1 | version: 1 |
| 2 | inbound: |
| 3 | enabled: true |
| 4 | listen: 127.0.0.1:53441 |
| 5 | address: hub.example:443 |
listen is the local bind address; address is the one public address delivered
to clients. They may differ under NAT or container mapping. All public phases
use that advertised address. Inbound access is disabled by default. Protected
config/state must be owner-private regular files; malformed or unsupported state
fails closed. See configuration.
Storage diagnostics identify the selected checkpoint or auxiliary file when its read fails. Startup cancellation, deadline expiry and snapshot-budget exhaustion are reported separately from corruption or unsafe file ownership and modes.
Deployment and supervision
Choose one owner for each Hub process. Foreground execution, EzAgent's explicit
on_start child, a systemd user service, and a container are alternatives, not
four services to enable together. Hub never launches EzAgent. Start the
application daemon separately and register its Unix socket. A successful Hub
startup or endpoint registration does not prove application readiness.
The checked-in deployment examples use the existing
configuration schemas. Hub has no --listen, --foreground, --daemon,
config-path, or stop flag. Its no-argument command already runs in the foreground.
All paths come from the three XDG homes. The ordinary ez-agent-service also
runs in the foreground without command-line flags.
Foreground processes
Install all built binaries together, or use the build directory directly.
In a normal user login with XDG_RUNTIME_DIR set:
| 1 | umask 077 |
| 2 | export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" |
| 3 | export XDG_STATE_HOME="${XDG_STATE_HOME:-$HOME/.local/state}" |
| 4 | : "${XDG_RUNTIME_DIR:?Use a private, same-user runtime directory}" |
| 5 | build/ez-agent-hub --config |
| 6 | # Type bootstrap on an empty layout. This creates an inbound-disabled Hub. |
| 7 | build/ez-agent-service |
Run build/ez-agent-hub in a second terminal with the same XDG environment, then
build/ez-agent-hub --config in another terminal for registration and approval.
Ctrl-C or SIGTERM to the foreground Hub joins shutdown and removes its owned
control socket. Use the built ez-agent --no-autolaunch --stop with the same
XDG homes to stop the application daemon. For a test deployment, override all
three homes with fresh private directories before running any of these commands.
Explicit EzAgent OnStart child
Merge on-start.yaml into the ordinary
$XDG_CONFIG_HOME/ez-agent/config.yaml, not the Hub YAML. Bootstrap Hub first.
The agenthub service uses path: ez-agent-hub, on_start: true,
direct: false, ruby: false, and no arguments. The relative path resolves
beside the physical ez-agent-service binary, not through PATH. Both binaries
must be installed there.
The existing process pool launches this background child after the application
socket becomes ready. It inherits the XDG paths but gets no JSONL capability
handshake. startup_timeout is a direct-JSONL hello timeout, not a Hub readiness
deadline. Check the Hub dashboard separately. A failed Hub child does not make
the application daemon unready; diagnostics go to the daemon log. There is no
automatic background-child restart policy. Starting Hub is opt-in, never an
effect of endpoint registration, client --hub, or opening --config.
The process pool currently kills children at daemon shutdown rather than sending SIGTERM. Do not treat this option as graceful Hub supervision. On Linux, use this exact-child sequence for normal cleanup:
- Find the current daemon's
background service spawnedlog entry withservice=agenthub, or the JSON fields"service":"agenthub"and"pid". Obtainhub_pidfrom that entry. Obtaindaemon_pidfrom your foreground process owner or its supervisor, not broad name matching. The client auto-launch log is$XDG_STATE_HOME/ez-agent/ez-agent-service.log; direct execution uses stderr orEZ_AGENT_LOG_FILE. - Check that
/proc/$hub_pid/statusreports the intendeddaemon_pidasPPid, and that/proc/$daemon_pid/exeresolves to your installedez-agent-service. Resolve that executable's physical directory and confirm/proc/$hub_pid/exeis its siblingez-agent-hub. Confirm both processes have your effective UID. Reject old log entries, missing processes, or any mismatch; never replace them withpgrepor broad kill commands. - Recheck the PID, parent and executable immediately before
kill -TERM "$hub_pid". Signal that PID only. This/procprocedure assumes stable processes during the check; stop if a restart or PID reuse is suspected. - Wait up to 15 seconds for both
/proc/$hub_pidand$XDG_RUNTIME_DIR/ez-agent/hub/control.sockto disappear. A timeout requires investigation of that exact child, not a broad kill. The process pool reaps its exited child. - Only after that wait succeeds, run the built
ez-agent --no-autolaunch --stopwith the same three XDG homes.
After a crash or forced kill, a stale Hub control.sock can remain. Startup refuses a pre-existing socket and the dashboard refuses a
failed dial instead of falling back offline. Only after confirming that the
exact Hub is gone and the path is its stale socket should its owner remove
$XDG_RUNTIME_DIR/ez-agent/hub/control.sock. Never delete persistent state or
credentials to recover a stale runtime socket. Use systemd if you need restart
and graceful-stop supervision.
Systemd user service
ez-agent-hub.service is a user unit,
not a root/system service. This recipe requires systemd 255 or newer and working
unprivileged user and mount namespaces. It does not establish a project-wide
systemd minimum. Install the binaries in ~/.local/bin. Start the application
independently with a dedicated socket directory before enabling Hub:
| 1 | # In its own terminal, not from the Hub unit: |
| 2 | umask 077 |
| 3 | export XDG_CONFIG_HOME="$HOME/.config" |
| 4 | export XDG_STATE_HOME="$HOME/.local/state" |
| 5 | : "${XDG_RUNTIME_DIR:?Run in a systemd user login}" |
| 6 | app_runtime="$XDG_RUNTIME_DIR/ez-agent-application" |
| 7 | install -d -m 700 "$app_runtime" |
| 8 | env XDG_RUNTIME_DIR="$app_runtime" "$HOME/.local/bin/ez-agent-service" |
Bootstrap Hub using the unit's paths in a second terminal. Register the socket path as seen inside the unit's private filesystem:
| 1 | umask 077 |
| 2 | export XDG_CONFIG_HOME="$HOME/.config" |
| 3 | export XDG_STATE_HOME="$HOME/.local/state" |
| 4 | : "${XDG_RUNTIME_DIR:?Run in a systemd user login}" |
| 5 | "$HOME/.local/bin/ez-agent-hub" --config |
| 6 | # Type bootstrap on an empty layout, then run --config again: |
| 7 | "$HOME/.local/bin/ez-agent-hub" --config |
| 8 | # At hub>: register local-app /application/ez-agent.sock |
| 9 | install -d -m 700 "$HOME/.config/systemd/user" |
| 10 | install -m 600 docs/examples/agenthub/ez-agent-hub.service \ |
| 11 | "$HOME/.config/systemd/user/ez-agent-hub.service" |
| 12 | systemctl --user daemon-reload |
| 13 | systemctl --user enable --now ez-agent-hub.service |
| 14 | journalctl --user -u ez-agent-hub.service |
| 15 | # Graceful stop: |
| 16 | systemctl --user stop ez-agent-hub.service |
The user manager owns %t, the login runtime directory. The nested
RuntimeDirectory=ez-agent/hub creates its 0700 Hub child before namespace setup
on every service start, including after a login-runtime reset. Systemd removes
that innermost child on stop; it does not own the application's runtime
directory or assign the shared %t/ez-agent parent to Hub. Do not change this
setting to RuntimeDirectory=ez-agent. Persistent Hub state and hub-client
credentials stay under %h/.local/state/ez-agent, not under %t; reboot must
not replace the Hub identity. Bootstrap creates the persistent bind sources.
ProtectHome=tmpfs hides home directories and /run/user instead of leaving
credentials readable. The unit binds back only the executable read-only, Hub
config/state/client-state writable, its systemd-created runtime child writable,
and the dedicated application's socket directory read-only at /application.
This last directory must exist at startup. After a runtime reset, the independent
application supervisor must recreate it before starting Hub, or this unit fails
closed; systemd creates Hub's runtime child without a manual install -d step.
If you use a different application runtime, edit this one BindReadOnlyPaths
source. Share the directory, not the socket inode. No auth.yaml, SSH directory,
whole home, or other runtime directory is exposed by these binds. Config/state
files must be 0600 and directories 0700, owned by the login user. The sandbox
still exposes system files and inherited non-home resources; it is not a
complete security boundary against a compromised same-user process.
Use explicit registration of /application/ez-agent.sock, not register local,
which would look in Hub's own runtime. The application and Hub must have the
same effective UID. There is deliberately no ExecStartPre launch of EzAgent
and no promise that process ordering implies application readiness. Do not also
enable the OnStart example. Stop the application separately with the built
ez-agent --no-autolaunch --stop and
XDG_RUNTIME_DIR="$XDG_RUNTIME_DIR/ez-agent-application", keeping its config and
state homes unchanged. User lingering, permission to enable it, namespace
support and filesystem sandbox enforcement require host-specific checks. Do not
remove the isolation directives to make an unsupported host start silently.
The YAML examples have parser/startup coverage. The user unit has not been
started under a systemd user manager in the test container.
Container with a shared application socket directory
Use an image you build containing the shipped Hub binary at
/usr/local/bin/ez-agent-hub. The following is a deployment recipe, not a tested
image or a Docker build. Keep Hub state persistent and mount only the required
application socket directory, not a Docker socket, home directory, or provider
credential directory. Sharing the directory rather than a socket file lets a
restarted application replace its socket inode.
Prepare and bootstrap a dedicated Hub layout on the host:
| 1 | umask 077 |
| 2 | hub_root="$HOME/.local/share/agenthub-container" |
| 3 | : "${XDG_RUNTIME_DIR:?Use a private, same-user runtime directory}" |
| 4 | hub_runtime="$XDG_RUNTIME_DIR/agenthub-container" |
| 5 | install -d -m 700 "$hub_root/config" "$hub_root/state" "$hub_runtime" |
| 6 | env XDG_CONFIG_HOME="$hub_root/config" XDG_STATE_HOME="$hub_root/state" \ |
| 7 | XDG_RUNTIME_DIR="$hub_runtime" build/ez-agent-hub --config |
| 8 | # Register an absolute path as seen INSIDE the container: |
| 9 | env XDG_CONFIG_HOME="$hub_root/config" XDG_STATE_HOME="$hub_root/state" \ |
| 10 | XDG_RUNTIME_DIR="$hub_runtime" build/ez-agent-hub --config |
| 11 | # At hub>: register local-app /application/ez-agent.sock |
Set app_socket_dir to the application daemon's private runtime socket directory,
normally $XDG_RUNTIME_DIR/ez-agent. The application and Hub must run with the
same effective UID. Parent directories and sockets must remain accessible to
that user without making them world-accessible. With user namespaces, container
UID numbers alone do not prove that the kernel credentials match the host UID.
SELinux/AppArmor mount labels and policy also require host-specific review.
| 1 | app_socket_dir="$XDG_RUNTIME_DIR/ez-agent" |
| 2 | docker run --rm --name agenthub --user "$(id -u):$(id -g)" \ |
| 3 | --cap-drop ALL --security-opt no-new-privileges --read-only \ |
| 4 | --env XDG_CONFIG_HOME=/config --env XDG_STATE_HOME=/state \ |
| 5 | --env XDG_RUNTIME_DIR=/runtime \ |
| 6 | --mount "type=bind,src=$hub_root/config/ez-agent/hub,dst=/config/ez-agent/hub" \ |
| 7 | --mount "type=bind,src=$hub_root/state/ez-agent/hub,dst=/state/ez-agent/hub" \ |
| 8 | --mount "type=bind,src=$hub_root/state/ez-agent/hub-client,dst=/state/ez-agent/hub-client" \ |
| 9 | --mount "type=bind,src=$hub_runtime,dst=/runtime" \ |
| 10 | --mount "type=bind,src=$app_socket_dir,dst=/application,readonly" \ |
| 11 | --entrypoint /usr/local/bin/ez-agent-hub agenthub-local |
| 12 | # In a second terminal, same-user private administration: |
| 13 | docker exec -it agenthub /usr/local/bin/ez-agent-hub --config |
| 14 | # SIGTERM, then a bounded wait before the engine may force-kill: |
| 15 | docker stop --time 15 agenthub |
The image must provide traversable /config/ez-agent and /state/ez-agent
parents. The mounted /runtime is dedicated to Hub and private to the host UID;
it does not replace or own the application's runtime directory. If the
application directory contains unrelated sockets, give that application a
dedicated runtime directory instead of widening the mount. Do not mount the
host Hub's control socket into /application. Registration uses the container
path; register local would instead use /runtime/ez-agent/ez-agent.sock and
would be wrong here. Container stop and host UID/socket policy need actual host
testing. A provider-free local startup test is not a container or hardware trial.
One TCP mapping, or outbound only
The inbound example binds
0.0.0.0:53441 and advertises hub.example:443. Install it as the protected Hub
config only when inbound service is wanted, then restart Hub. On a host, map
public TCP 443 to the host listener's TCP 53441. For the container recipe, add
--publish 443:53441/tcp and arrange DNS and any upstream NAT to reach that
host. This is raw Hub TLS, not an HTTP reverse-proxy path. A non-root process
binds the high internal port; firewall/NAT or the container engine handles the
external port. A loopback-only bind cannot receive forwarded external traffic
without a separate host-specific forwarding arrangement.
Allow only intended inbound sources at the host/upstream firewall and permit needed outbound peer TCP traffic. The application socket and private control socket are never published. Client admission, pairing, normal peers and application traffic share this one TCP address; do not add a public control port. DNS, NAT hairpin behavior and reachability from another machine must be checked on the deployment network. Parser tests cannot validate that mapping.
The outbound-only example opens no
public listener and leaves listen and address empty by omission. It needs no
container --publish or inbound firewall rule. An origin can initiate an
approved peer link to an inbound-enabled neighbor and serve routed applications
over that link. It cannot receive direct first contact at an invented public
address. See outbound-only origins
for pairing and route requirements. Inbound is optional and disabled at bootstrap.
Register a local endpoint
Start the ordinary local EzAgent service, then use:
| 1 | $ build/ez-agent-hub --config |
| 2 | hub> register local |
| 3 | hub> status |
| 4 | hub> publish <endpoint-id> |
register local uses the normal EzAgent Unix socket. register <alias> <absolute-socket> adds another application. Registration creates an unpublished
endpoint with an empty ACL and prints its identity card. publish exposes the
opaque endpoint identity to admitted clients; it grants no access.
Invitations and approval
Before creating an invitation, obtain the client device card independently. A claimant check is a full fingerprint, four KEY CHECK words plus check byte, or both in agreeing combined form. The resulting private lock is immutable.
JOIN WORDS are a separate five-word secret shown once. Voice/manual entry uses
four public KEY CHECK words with their mandatory two-digit lowercase hex byte,
or an independently supplied full fingerprint. Both forms must agree when
supplied together. No expiry, raw SPKI, machine blob or QR input is required.
Malformed checks and JOIN input receive fixed diagnostics without quoting command
fields. In compact combined input word_word_word_word@hh=fingerprint, an
explicit = requires a full valid fingerprint. A missing or truncated fingerprint
is an error, never a downgrade to short authentication. This applies to admission,
endpoint and pairing invitations as well as Add Hub. Interactive Add Hub validates
the direct address and all public checks before opening the hidden JOIN prompt.
Standalone --config owns Ctrl-C and SIGTERM cancellation through bootstrap,
ordinary command prompts, hidden entry and active dashboard calls. Hidden entry
keeps canonical editing and signal handling enabled, disables echo, and restores
the saved terminal modes before returning. Cancellation wakes and joins input,
discards unfinished JOIN bytes from both the reader and terminal queue, and does
not submit a partial Add Hub decision. Closing a dashboard does not undo an
operation already submitted or cancel a durable pairing ceremony.
Offline transport stays alive for canceled-call acknowledgements and explicit
joined retirement. Successful input cancellation exits normally; genuine failed
retirement still reports failure rather than being hidden as cancellation.
Both Prepared and Accepted Add Hub results label independently entered matches
separately from candidate checks and fingerprints. Prepared still means signed
Context is not durable and no approval is available. Candidate values remain
diagnostic only; confirmation
does not make them independent authenticators. A generic TLS/transport failure
proves no identity mismatch. Verify public checks independently with the intended
owner and verify invitation words privately. The dashboard does not
persist or replay a lost card. browse invitations and exact invitation detail
identify an unclaimed client-card or pairing-card row for explicit cancellation;
otherwise the row remains live until expiry.
Admission and endpoint access require separate invitations and approvals. The
owner's status labels each pending client approval as "client admission to this
entry Hub" or "client access to endpoint ". The client must durably store its
recovery credential and ACK before status prints the exact revision-checked
approve command for that scope.
Two-operator command sequence
The direct-handshake review owns the ceremony and failure ordering; the client page owns prompts and recovery.
- Client runs
ez-agent --hub <address>, returns its claimant card, and pauses without dialing. - Owner runs
invite admission <claimant-check> [lifetime-seconds]and privately sends address, Hub identity check, and JOIN WORDS. - Client enters the Hub check and words, confirms the verified identity, then durably ACKs its claim.
- Owner waits for
ACKedinstatus, then runs the displayedapprove <subject-id> <selector> <invitation-revision>. - Client selects an approved endpoint or chooses
addand enters its independently supplied endpoint check. - Owner runs
invite endpoint <endpoint-id> <claimant-check> [lifetime-seconds]and privately sends new JOIN WORDS. - Client confirms the exact endpoint and ACKs; owner waits for
ACKedand runs the displayed approval command. - Client opens a fresh application connection and enters the existing TUI.
Admission grants directory access, not endpoint access. Ctrl-C closes the active prompt or connection without rolling back durable state. Unambiguous saved claims resume at their exact address and pin without the original words.
Before JSONL hello, Hub mode uses explicit --cwd or the endpoint's remembered
remote CWD, then its endpoint/CWD leaf recency. With neither CWD available,
startup stops. This convenience state grants no trust and adds no pre-TUI root
or leaf chooser.
Service boundary
AgentHub never starts or manages EzAgent. A configured application socket must exist when application access is opened. Registration and dashboard refresh do not connect to it or claim that it is healthy. The service enforces identity pins, endpoint TLS and ACLs, finite capacity, security time, authorization epochs, audit, and joined shutdown. Its caps contain local failure but do not replace firewall or source-filtering policy.
The pairing handshake owns bilateral pairing, and the normal-peer link owns fresh
normal-peer connections and explicit one-step Peer-authority successor decisions. Operational
certificate renewal under the accepted stable authority requires no approval;
changing that authority requires signed lineage and local approval for each
immediate successor. A verified fork of an active Peer terminates the
relationship; neither branch can be approved, and both sides must remove
locally and pair again. Converging accepted heads across active relationships
are rejected without merging Hub identities. The process logs confirmed
normal-peer TLS with remote authority ID and direction, and closure with a
removed, shutdown, or transport reason. Pairing TLS never becomes a
normal-peer link. The local catalog and directory sync provide signed public catalogs, bounded
synchronization and learned listing. Routing, relay and circuit sessions provide
retained circuit recovery. Production carriers compose with the existing endpoint
TLS and ACL engines to give production remote selection, routed endpoint
authorization and live recovery, and restricted routed Hub pairing runs through
the unchanged bilateral ceremony. The private backend extends local
administration in place. See service,
client transport, and
fixture checks.
Address-free routed Hub pairing
The inviting Hub can issue the existing locked pairing card with:
| 1 | hub> invite pairing routed <joining-check> [lifetime-seconds] |
The joining Hub uses independently supplied inviting authority checks, not an address or route identity:
| 1 | hub> add hub routed <inviting-check> |
On a terminal, JOIN WORDS are requested separately with echo disabled.
Redirected automation uses add hub routed <inviting-check> <join-words> [alias].
Checks accept the same full fingerprint, four KEY CHECK words plus check byte,
or agreeing combined form as direct pairing. Every supplied check must match
one current nonforked verified authority. A missing learned authority or eligible
route makes the operation unavailable; it never falls back to direct dialing.
The existing typed Prepared/Accepted results open or wake the same pairing view. Both administrators still approve locally in the usual order. Active routed Peers have empty address lists, so eligibility does not imply a live normal-peer link. This operation cannot replace a nonremoved relationship or approve an authority successor. Re-pairing requires bilateral removal and fresh consent. See the ceremony and carrier ordering.
Pairing check ownership
status [page] is passive, including after a Hub restart. Durable Prepared or
LocalApproved rows do not cause daemon recovery dials. Use pairing open to
open the local pairing view. It reads access/status and requests exact checks
immediately, then repeats sequentially five seconds after each pass. Reopening
checks immediately. Add Hub opens the view automatically; approval wakes an
already open view. Keep the joining view open while the inviting administrator
reviews and approves, or reopen it later to retrieve Completion.
pairing close, Ctrl-D, input failure, or dashboard exit cancels and joins the
timer and in-flight check. Closing does not cancel the ceremony. Use
cancel pairing <remote-id> <request-id> for that separate durable decision.
The existing initial TLS carrier may finish within its five-minute bound, but
its closure or expiry never starts recovery.
The seven-day deadline cuts off new authorization, not observation. A later view first checks durable Peer access. Otherwise it may retrieve a pre-cutoff Completion until the existing retention boundary. A clean exact check without Completion after cutoff reports timeout. A transport failure reports temporary unavailability, not a remote rejection, and can be retried while the view is open and evidence is retained. Retention never revokes already active access.
Private administration migration boundary
All existing command calls now use concrete ezhubapi requests/results, without
JSON parameters, legacy serialization or command-managed RPC counters. Typed preflight, paging, aliases,
hidden JOIN prompts and one-time card release/redaction remain intact. The private backend
replaces silent revision/authority substitution with rejection and explicit
operator refresh, and moves successor decisions to reviewed detail confirmation.
Mutation conflicts are not rebased. A definite result received during cancellation remains
usable even when the separate retirement ACK times out; display the durable
outcome, release it and report the missing acknowledgment rather than replaying.
Add Hub consumes prepared and accepted with exact nonsecret IDs and the
checkpoint commit revision. Failure before Prepared opens no view. Prepared
means saved for recovery, with no durable signed Context or approval available.
Accepted permits identity review only against fresh state. Either outcome opens
one view or wakes the existing view with a deduplicated immediate exact target,
without waiting for page-zero discovery or a timer. Full target queues apply
caller-owned backpressure rather than dropping work or opening another view.
Closing still joins the current check before reopening. A canceled or failed
alias write adds alias_not_saved without losing the pairing checkpoint.
The shipped process tests require a completed dashboard hello/status rather than connect-only readiness. See private API, service tests and process suites.
Outbound-only origins and routed acceptance
A Hub with this configuration opens no public TCP listener and advertises no public address:
| 1 | version: 1 |
| 2 | inbound: |
| 3 | enabled: false |
It can still initiate direct pairing to an inbound-enabled neighbor, receive that neighbor's address at joining activation, and establish ordinary eligible outbound peer TLS. Existing routes may then carry applications and restricted pairing toward it over that already authenticated connection. The accepting neighbor's address-free reverse relationship does not need a dial address. This is reuse of a normal-peer connection in both directions, not outbound routed normal-peer transport or an arbitrary tunnel. Without a live eligible path, a published remote endpoint is unavailable.
For a line, have entry E join relay R1, optional R2 join R1, and origin O join
the nearest relay. O can remain inbound-disabled throughout. Register the
application's explicit AF_UNIX pathname on O, publish it, admit the client on E,
and authorize the endpoint separately on O. register local uses the invoking
Hub environment's normal EzAgent socket, which may differ from an isolated
application daemon's socket. Do not confuse registration/publication with an
application health probe or endpoint access grant.
Service tests own one/two-relay, outbound-only origin, diamond recovery, routed authorization/pairing and exact epoch revocation/re-grant regressions. The AgentHub process suite owns shipped-process integration. Use the test guide for fixture isolation and validation selection, and the computer-use guide for affected terminal interactions. Package tests do not establish terminal behavior or external NAT/firewall compatibility. The existing command dashboard exposes durable and runtime inventory, protected audit, exact actions and configuration through the same private contract. The commands below use bounded browse/detail rather than a new fullscreen UI. Client UX and bookmarks are separate. Diagnostic notices are bounded, nonsecret, best effort and not a complete topology history.
Saved configuration and active limits
ez-agent-hub --config uses the existing typed online client, or the same typed
offline adapter while holding the exclusive local store lock. It never reads or
displays authentication files. The dashboard commands are:
| 1 | configuration |
| 2 | configuration set inbound disabled |
| 3 | configuration set inbound enabled <listen-IP:port> <public-host:port> |
| 4 | configuration set data_bytes <bytes> |
| 5 | configuration set control_bytes <bytes> |
| 6 | configuration set circuit_admission <global> <per_client> <per_endpoint> |
| 7 | configuration set resource <name> <count> <bytes> <per_key> <key_bytes> |
| 8 | configuration save <displayed-config-token> |
| 9 | limits |
configuration loads a complete saved document, its exact file-byte token and
store revision. It displays the active startup token when online, restart-required
state, the complete viable minimum, default and maximum profiles, and
fixed structural bounds. These values are not interchangeable. limits performs
one explicit online sample of active limits, usage and peaks. It is unavailable
offline, not an empty fabricated runtime sample, and does not poll automatically.
configuration set edits a local complete draft only. Every edit uses the same
configuration validation as protected YAML, strict private decoding and saving.
Settings below any viable minimum are rejected with the draft unchanged. Valid
reductions below defaults show a warning that additional concurrent work may be
denied with resource_limit; values are never silently raised or payload bounds
lowered to make a setting fit.
Circuit policy defaults are 524,288 each for process-global logical owners, per authenticated entry client and per EzAgent endpoint. The process pool has a separate adapter counter with the same global limit. All three settings accept positive int64 values; they do not allocate maximum-sized storage. The shared physical TCP budget defaults to 512, while client gateway and normal Hub peer budgets default to 256 and 32. Connection settings can be raised above defaults within their supported profiles. Gateway and authenticated endpoint TLS keyed defaults are 256 owners and 32 MiB per stable key. Local sockets default to 1,024 owners and 32 MiB globally and per endpoint. Peer connections can be raised through the actual 256-link routing bound. Logical circuit counts still intersect resource byte budgets and prepaid registry capacity. Public physical admission precedes TLS on the one shared listener; role-specific budgets do not guess an unauthenticated socket's identity. OS descriptor limits remain separate and may also need raising. See the admission and connection settings for interacting policy, byte-budget and structural constraints.
Saving requires the displayed token and loaded store revision. A stale revision
or byte token fails without a write. A failed save discards the loaded decision
and requires an explicit configuration reload before another edit/save; there
is no automatic retry or replay. Every configuration change applies only at the
next daemon start, including inbound settings. Saving neither restarts the
daemon nor hot-shrinks active work. Comment-only protected file edits change the
token and can require restart even when effective limits are unchanged. Offline
shows no active daemon token and restart-required false, preserving saved intent.
Complete command dashboard
Type help for the task guide and all command families. durable help,
runtime help and audit help print their positional field tables. IDs are
complete values, not row numbers, aliases or prefixes. status remains a bounded
summary; truncation is not the end of a collection.
Durable browse and detail
| 1 | browse <family> [parent fields] [limit <1..16>] |
| 2 | browse next |
| 3 | detail <family> <displayed-store-revision> <parent fields> <key fields> |
The 15 families are endpoints, admissions, endpoint_acls,
endpoint_notices, invitations, pairings, peers, peer_addresses,
peer_proposals, authority_history, authority_resolutions,
authority_rejections, peer_authority_history, peer_authority_resolutions,
and peer_authority_rejections. The command help lists every parent's and
key's order. Invitation browsing includes pending, unclaimed and retained
terminal client/pairing cards. Peer browsing includes removed relationships.
Private claimant locks and JOIN WORDS are never reconstructed by reads.
Every detail prints its full nonsecret record, identity checks and exact revision. Continuation retains one copied cursor at that revision. A changed revision invalidates it. Start a fresh browse deliberately; there is no silent restart. These reads work online or offline and never trigger pairing checks or dialing. Local pairing aliases stay in the bounded revision-ordered sidecar; they are not signed identity evidence or synchronized data.
Reviewed actions
Read the exact detail first. A durable action prints the exact typed request
and a review token without writing. Submit that displayed request once with:
| 1 | durable confirm <displayed-store-revision> <displayed-review-token> |
For example, retire an endpoint only after inspecting its identity and binding:
| 1 | browse endpoints |
| 2 | detail endpoints <store-revision> <endpoint-id> |
| 3 | durable delete <endpoint-id> <store-revision> |
| 4 | durable confirm <store-revision> <review-token> |
The old delete <id> and approve|deny successor ... shortcuts cannot write.
Successor review uses detail peer_proposals and then
durable successor <approve|deny> <genesis> <request-id> <proposal-revision> <old-id> <new-id> <store-revision>. Detail shows both complete fingerprints,
KEY CHECK words and check bytes. Verified lineage alone grants no permission.
peer_proposals contains pending, approved and denied decisions. A verified fork
clears the proposal and removes the relationship. Inspect its retained removed-peer
and fork diagnosis through browse peers, detail peers and protected audit.
There is no accept-anyway action. Neither a conflict nor uncertain persistence
is success.
durable help also lists exact epoch revocation for admissions and endpoint
ACLs, fresh ACKed invitation approval/regrant with Unix-second expiry,
client-card/invitation cancellation, same-key endpoint certificate renewal,
and higher-binding repair. Expiry is not an arbitrary edit of an old grant.
Revoke its exact epoch, create a fresh claimant-locked invitation, wait for the
client's durable ACK, inspect the row, then approve/regrant with the desired
expiry. Pairing has no client ACK; durable initiating approval precedes target
final approval. Compromised/conflicted cards cannot be approved or rebound.
A result's store revision identifies the Hub commit. Its approval_revision
identifies the authorization epoch and need not equal that commit revision.
The command checks the exact reviewed claimant, scope and endpoint and a nonzero
granted epoch independently of the commit revision. Use the displayed epoch,
not the Hub revision, when reviewing later revocation.
Repair requires stopping cloned writable copies, selecting the intended local
owner, and publishing max(local, observed)+1. Online review includes the exact
runtime generation, sample sequence and conflict digest. Offline review accepts
explicit observed evidence and sends a null live reference; it does not fabricate
a runtime sample. A committed higher binding does not prove network-wide repair.
A review is consumed before submission, including cancellation, conflict, lost retirement ACK, uncertain persistence or failed result display. Reads invalidate pending confirmation. Reload the exact detail and make a new decision. No write is replayed or silently rebased. Definitely committed results can still be shown when retirement acknowledgment is missing, with a separate diagnostic.
Runtime inventory and protected audit
| 1 | runtime list <family> [parent fields] [limit <1..maximum>] |
| 2 | runtime next |
| 3 | runtime get <family> <runtime-generation> <sample-sequence> <parent fields> <key fields> |
| 4 | runtime list session_path <runtime-generation> <sample-sequence> <session-id> [limit <1..8>] |
| 5 | runtime get session_path <runtime-generation> <sample-sequence> <session-id> <path-index> |
| 6 | audit read [limit <1..8>] |
| 7 | audit next |
Runtime families are peer_observations, peer_links, directory_endpoints,
directory_conflicts, directory_origins, directory_evidence, routes,
route_candidates, sessions, and session_path. Ordinary pages hold at most
16 rows; candidates/path pages hold at most eight. Session detail exposes the
attachment handle and recovery/gateway metadata; path rows describe that exact
immutable attachment, not a route that can be retargeted.
Durable eligibility, live links, route eligibility, endpoint access, sessions, and attachments are separate facts. Terminal and Joined are separate too. Store revision, runtime generation, and each owner's sample sequence are independent observations, not one cross-owner transaction. Runtime views and active limits are unavailable offline, never synthetic empty success samples. No browse/refresh starts network work or daemon polling. Only the explicit open pairing view owns repeated checks and stops them when closed.
Protected audit works online and offline. It prints typed nonsecret events, not raw records or file paths. Its copied high-water cursor excludes later appends. Retention invalidation requires a new read and an explicit gap, not an automatic restart or skipped/corrupt records. The dashboard retains one durable cursor, one copied reviewed detail/request, one runtime cursor and one audit cursor. Commands have a 64 KiB per-line bound, not a total interactive-session byte cap.
The service tests own the production 79-operation dispatch matrix; process suites own shipped-command integration. Dispatch/error coverage does not establish every successful lifecycle through the UI. Select affected terminal interactions with the computer-use guide.