# Echo Connect 0.1

Approve a precisely bounded Draft Desk file on a separate phone, then inspect the real file on your computer. This is a reference integration with an English workbench, not a simulated file save. It does not call an AI provider: paste a draft yourself, including an AI-generated draft if you choose.

## Start

1. Extract `echo-connect.zip` on Linux or macOS. Keep the directory structure. Use Node 22.13+ (22.x) or Node 24. No npm install or account is needed. Windows is not supported by this private-directory executor profile.
2. From the extracted folder, run:

   ```sh
   node echo-connect/start.mjs
   ```

3. Open the printed `http://127.0.0.1:PORT` address on that computer. Keep the terminal running. The port is selected automatically. It listens only on the local computer, not on the network.
4. On your phone, open https://moneymusk.space/echo-connect/phone.html . Keep both devices on the same local network and keep both pages open. WebRTC and WebCrypto Ed25519 support are required. An unsupported browser refuses rather than using weaker signing.
5. Choose **Create phone connection**. Copy the connection text to the computer's first box. Choose **Create computer answer**, then copy that answer back to the phone. Use a private transfer channel; these texts contain local network addresses. There is no public signaling server or STUN/TURN relay.
6. Compare the complete code shown on both screens. Choose **These codes match** on both devices. Matching codes bind the session's public keys; they do not establish a person's civil identity or human presence. Pairing grants no file permission.
7. Type or paste a draft on the computer and choose **Send to phone for review**. The phone shows the exact UTF-8 text, byte count, fixed outbox destination, deadline and request fingerprint. Non-printing/direction-changing characters are flagged and the exact bytes are available. Check that you reviewed this exact version, then choose **Approve this save once**, or choose **Refuse**. A replacement request clears that review check.
8. Check the signed outcome, then inspect the real file. The terminal prints the private run directory. The only possible target is `outbox/OPERATION.txt` inside that directory. Files are never overwritten. Maximum content is 4,096 UTF-8 bytes, one approved file per paired session, up to 64 unapproved reviews.

The browser-to-browser connection is local-network WebRTC. The computer browser bridges its confirmed connection to the local executor. The phone's approval key is non-extractable and stays in memory on the phone. The computer's executor/delegate keys also stay in process memory. The file gate and journal use durable SQLite state. Keys and grants do not resume after restart: launch a new run and pair again. Keep the old outbox and evidence for verification.

The interface is a preview. Real iPhone/Android versions, local-network permission prompts, captive/guest Wi-Fi isolation and background suspension require field testing. No physical-device compatibility result is claimed. If pairing fails, reload both workbenches and start a new session. Do not disable network security settings to force a connection.

Use accurate automatic date/time on both devices. The short HAP freshness window intentionally rejects requests if device clocks disagree or a browser is suspended too long.

## Know the outcome

* **Waiting for your decision:** no grant yet.
* **Approved once:** one bounded grant; not proof of a save. It expires within two minutes and no later than the review deadline.
* **Execution requested:** a fresh permit may have been issued for the reviewed payload. It can be used for at most five seconds. A permit does not prove completion.
* **Saved — signed result received:** the pinned executor reports the file write. The separate Python checker additionally compares actual file bytes.
* **Refused:** the executor has not reported a successful save for that request. A phone refusal before execution is a local decision, not a fabricated executor receipt.
* **Outcome unknown:** do not replay the request. Inspect the outbox and evidence. Losing a response is not evidence that no effect occurred.

Changing the draft before approval creates a new review, with a previous-text comparison. The approval button is bound to the displayed request fingerprint. After approval, the session cannot accept another draft. A different payload or operation ID cannot get a permit from that approval.

## Withdraw permission

Use **Withdraw permission** on the phone. This first stops new permits on the phone. The interface shows **delivery pending** until it verifies a signed acknowledgment from the computer executor after its revocation is persisted. If delivery fails, press the same button again to request acknowledgment; this does not execute the draft again.

A permit already issued may remain usable for up to five seconds if revocation has not arrived. Once the executor processes the revocation, its gate refuses new execution under that grant, including a permit waiting at the gate. Withdrawal cannot undo a completed write or retrieve copies. Closing/reloading a page is not a confirmed remote revocation.

## Take the evidence with you

Use **Download trusted key pin** on the phone. Retain it separately, before handing evidence to another machine. The computer also writes `trusted-pin.json` before dispatch. A pin supplied by the same untrusted source as an evidence file does not establish independent trust.

Use **Download evidence** after the result. The browser export is the latest available signed snapshot; after withdrawal it includes the received revocation history. The initial on-disk `evidence.json` is the snapshot at the end of the save attempt. Signed delivery acknowledgments are separate `stop-HASH.json` files. Export a new snapshot after withdrawal to include it in verification.

**Exports contain the complete draft text, encoded as hex, not encrypted.** Keep them private. Move evidence and the outbox out of the temporary run directory if you need long-term retention. No draft or signing key is sent to a Money Musk API by this workbench.

For the separate Python verifier, first install its dependency (this preparation requires package access):

```sh
python3 -m venv .venv
.venv/bin/python -m pip install -r hap1/requirements-verify.txt
```

Then verify offline with your actual paths:

```sh
.venv/bin/python draft-desk/verify.py /path/to/echo-connect-evidence.json \
  --pin /path/to/echo-connect-trusted-pin.json \
  --outbox /path/to/run/outbox
```

The verifier checks the retained key pin, signed ticket, continuous permission history, checkpoint, exact authorized payload, signed executor result and actual file bytes. A successful result reports `valid: true` and the matched file count. Tampered bytes, a wrong pin and inconsistent signed history are rejected. Verification never executes a draft.

It verifies the supplied historical snapshot, not global completeness, current permission, human presence, honest hardware, independent adoption or an audit. This integration cannot stop arbitrary applications writing files outside its gate. A compromised computer, phone, page origin or operating system is outside this reference implementation's trust boundary.

## Inspect and test

```sh
node --test scripts/echo-connect-regressions.mjs
node --test scripts/draft-desk-regressions.mjs
```

Connect tests use the real phone controller, HTTP bridge, local file executor and Python checker. They simulate device messages rather than claiming physical phone coverage. The inherited HAP phone-link suite separately tests pairing/confirmation and transport refusal. See `SPEC.md` for message boundaries. The archive's unsigned digest manifest describes source integrity only; authenticate its origin separately.
