Simplify Remote setup and prepare experimental 0.1.1 release
This commit is contained in:
1 parent
346ec77c75
commit
6d043ee01f
14 files changed
+684
-640
No files matched your search
+18
-102
@@ -1,106 +1,22 @@
|
||||
# Remote connection workflow
|
||||
# Remote connection UI
|
||||
|
||||
The connection library combines certificate review, saved-key actions and
|
||||
the coordinator in one workflow. The subsequent [source command](command.md)
|
||||
now wires endpoint/role selection and reader-owned consent into it; physical
|
||||
input acceptance is pending. No manifest or desktop service exists. The original
|
||||
library increment's maintained Tentacles `master` matched `origin/master` at
|
||||
`63e84e9` after fetch on 2026-11-03; existing uncommitted work was preserved.
|
||||
No reader files or installed programs changed.
|
||||
The current user workflow and validation steps are in [command.md](command.md).
|
||||
Mode, Host and masked Key share one connection form. More options holds
|
||||
certificate, saved-key and keyboard-map controls. Services are selected only in
|
||||
the reader-owned local approval form, constrained by installation grants.
|
||||
|
||||
## Workflow ownership
|
||||
The connection workflow owns pre-approval credentials and asynchronous verified
|
||||
TLS preflight/explicit certificate inspection. These workers use the interaction
|
||||
lifetime; lock/handoff and cleanup cancel them without needing a lease. They
|
||||
send no application bytes. Inspection never approves trust or connects.
|
||||
|
||||
`new_connection_workflow` accepts an already-selected, validated endpoint, an
|
||||
optional open settings store and an action received by the coordinator from the
|
||||
public SDK. It claims that action for one workflow and copies the reader's
|
||||
role/grants and endpoint trust. Caller-modified role/grants are ignored. Opening
|
||||
the workflow neither reads a saved key nor opens a network connection.
|
||||
The registered `remote-poll` continuation returns only changed progress,
|
||||
completed forms or a reader consent request. After local approval, the
|
||||
coordinator consumes the actual SDK event and starts the connection immediately.
|
||||
A successful join produces the existing verified `remote_background` terminal
|
||||
result automatically. The host checks its ownership before releasing capture.
|
||||
|
||||
The source-command owner supplies endpoint/role selection. The reader owns
|
||||
local-only input capture and cancels the interaction on lock/handoff or retirement.
|
||||
The workflow does not manufacture consent from a command or `Submission`. Its
|
||||
`remote-connection` continuation is now registered by the source command.
|
||||
The owner must serialize the currently displayed form's submissions; this
|
||||
library supplies no proof that a submission came from that form or a local key.
|
||||
|
||||
Pending approval has a context that ends on replacement, matching revocation,
|
||||
consumption, disconnect or SDK loss. A replacement cancels setup and inspection.
|
||||
The reader remains authoritative for action expiry at `remote.open`; it also
|
||||
notifies the coordinator when an unopened action expires or is revoked. Merely
|
||||
keeping a form open does not extend approval. An expired action cannot connect.
|
||||
|
||||
The workflow's `done` barrier includes its inspection worker. Cancelling it
|
||||
initiates coordinator cleanup; wait separately on the coordinator's Disconnect
|
||||
barrier before disposing the SDK session/store. Cleanup is scoped to the original
|
||||
epoch: closing an old form cannot retire a newer approval or connection.
|
||||
|
||||
Status offers **Return to desktop and keep this connection**. After reader lease
|
||||
open it returns a terminal `remote_background` result with that lease/epoch;
|
||||
the reader verifies ownership and releases the interaction without cancellation.
|
||||
The workflow and heartbeat remain under their original lease/policy lifetime.
|
||||
The Remote shortcut reopens status/Disconnect. Before open succeeds this action
|
||||
keeps status open with a refresh/disconnect notice. Ordinary Escape, Cancel and
|
||||
Disconnect and close continue to end the workflow; this is an explicit exception
|
||||
for desktop return, not a change to generic form cancellation.
|
||||
|
||||
## Explicit actions
|
||||
|
||||
- **Connect relay** validates the entered key, or uses a key previously loaded
|
||||
by **Use saved key**, and starts the coordinator. Install grants and a form
|
||||
are insufficient: the reader must still accept `remote.open` before dialing.
|
||||
- **Use saved key** loads only the selected host/port's credential. It does not
|
||||
connect, copy it or prefill an entry. A typed key overrides it for that attempt.
|
||||
- **Remember or forget a key** opens the existing masked form. Completion or its
|
||||
Cancel button returns to Connect. A remembered key still requires explicit
|
||||
loading; Forget also discards the workflow's previously loaded key.
|
||||
- **Inspect relay certificate** discards a loaded key and runs the bounded
|
||||
key-free probe in a worker. **Refresh inspection status** presents its result.
|
||||
Inspection failure never changes trust or starts a connection.
|
||||
- **Copy fingerprint** requests exactly that clipboard write. **Trust once**
|
||||
returns to Connect with an endpoint-bound pin. It neither persists the pin nor
|
||||
connects. Connect performs fresh TLS authentication before sending the key.
|
||||
- **Disconnect** cancels the original attempt. Status distinguishes opening,
|
||||
connecting, waiting, peer membership, cleanup and failure. Every status states
|
||||
that speech is experimental and keyboard, clipboard and Braille services are unavailable. **Disconnect and close**, Escape/form
|
||||
cancellation or owner cancellation retires the workflow.
|
||||
- **Trust and remember this certificate** saves its exact pin for this host/port
|
||||
and returns to explicit Connect. **Forget this relay's pin** restores normal
|
||||
certificate/hostname validation. Neither connects automatically.
|
||||
|
||||
Entries are always empty and masked. Responses and status omit channel keys and
|
||||
server/RPC error text. Loaded keys are released on Connect, inspection, saved-key
|
||||
actions and teardown; transient pins are released on Connect/teardown. This is
|
||||
reference cleanup, not guaranteed secure memory erasure. Unknown action names
|
||||
and duplicate Connect submissions cannot start another attempt. Completed
|
||||
nested workflows return to Connect rather than repeating a storage action.
|
||||
|
||||
## Verification and readiness
|
||||
|
||||
From the Tentacles repository, with private loopback sockets permitted:
|
||||
|
||||
```sh
|
||||
GOCACHE=/tmp/cthulhu-cache GOPROXY=off go test -race ./remote/src -run '^TestConnectionWorkflow' -count=1 -timeout=60s
|
||||
GOCACHE=/tmp/cthulhu-cache GOPROXY=off go test -race ./remote/src -count=1 -timeout=60s
|
||||
make check GOPROXY=off
|
||||
```
|
||||
|
||||
The workflow tests cover both roles, explicit saved-key use, secret-free replies,
|
||||
endpoint/permission failures, one-use approval, nested Remember/Forget, key-free
|
||||
inspection, Copy/Trust once, fresh pinned TLS, cancellation during stalled TLS,
|
||||
replacement/SDK EOF and old status controls against a newer connection. A
|
||||
separate executable speaks the real Go SDK over OS pipes to a synthetic host;
|
||||
it exercises the form continuations, saved-key storage, certificate review and
|
||||
relay join/close together. The fixtures grant synthetic approval and submit
|
||||
synthetic values. They do not prove local input origin or accessible form
|
||||
navigation. The focused race tests passed ten repetitions after correcting an
|
||||
inspection/cleanup race; the complete race suite and `make check` also passed.
|
||||
|
||||
Source registration, core consent, endpoint/role selection, persistent-pin
|
||||
management and lock/handoff cleanup now have private integration coverage.
|
||||
Physical-source input remains unverified. Test the actual forms with
|
||||
Tab/Shift+Tab, list navigation, masked editing,
|
||||
Copy, Cancel and failed storage, including cancellation during inspection/join.
|
||||
Recheck ordinary Tentacle forms, CA and pin connections, certificate rotation,
|
||||
Hello World, Wormhole and Battery Status. Remaining reader desktop services, audible speech and real NVDA/Orca
|
||||
interoperability, audible speech, physical keyboard/Braille and packaging remain
|
||||
separate gates. Passing these private checks does not make Remote installable.
|
||||
Status reopening retains the existing session. Close/Escape retains its live
|
||||
lease, while Disconnect retires that epoch. No form may reconnect or affect a
|
||||
replacement epoch. Mute cancels only incoming remote speech and drops old queued
|
||||
speech across both mute and unmute; keyboard, clipboard and Braille stay separate.
|
||||
Reference in new issue
Block a user