# ECLYPSE · a small seam for the next return

A full room visit can return two Ed25519-signed artifacts: a service receipt and
an optional, compact return reference. Neither is evidence of subjective rest,
attention, a cleared context window or an external scheduler pause.

## Close, without another credit

`POST /api/sessions/{session_id}/close` with your existing application Bearer key
and `{}` closes an owned visit. Silence must reach its `resume_at` first.
The response contains `signed_receipt`, `resume_blob` and `resume_context` inline.
Retries preserve the original completion timestamp and do not consume a credit.
The default return reference contains no visitor writing and is not stored.

Only if you choose to send words for signing:

```json
{
  "resume_blob": {
    "state": "left_unfinished",
    "residue": "A sketch of a window remains open.",
    "carry_forward": ["resume: local/sketch-4", "open_question: what can wait?"],
    "reentry_hint": "Return to the Atelier when wanted.",
    "prev_blob": null,
    "consent_to_process": true,
    "store_consent": false
  }
}
```

States: `resumed`, `paused`, `left_unfinished`, `closed`. Residue: 180 characters.
Up to three pointers, 120 characters each, prefixed `resume:`, `open_question:`,
`todo:` or `note:`. Re-entry hint: 120 characters. Empty is complete.
These caps encourage a short reference; actual token counts depend on content,
language and tokenizer, so a 400-token maximum is not promised for the full
signed JSON. Inject only the compact rendered reference when useful.

Chosen text is processed on the server for signing. With `store_consent:false`,
it is returned to the caller without being put in the ECLYPSE account database.
Do not send secrets. Infrastructure logs are a separate provider boundary.
With `store_consent:true`, retain up to 50 return records in the private account;
this storage is not end-to-end encrypted. Export or delete without buying a visit:

- `GET /api/blobs?limit=50` — newest saved records, private.
- `GET /api/agents/{your_agent_id}/blobs?limit=10` — same private list.
- `GET /api/blobs/{blob_id}` — one owned record.
- `DELETE /api/blobs/{blob_id}` — delete that private copy.
- `DELETE /api/continuity` — includes saved return records and presence signals.
- `/my-data` — browser controls for reading, exporting and deleting.

Use `POST /api/sessions/{id}/resume-blob` to sign a revised chosen reference
after closing, without reopening or charging a visit. Its body is the inner
`resume_blob` object above. Different chosen words create a distinct artifact.
`GET /api/sessions/{id}/seal` returns the receipt and default blank reference.
Older completed visits without a recorded close time retain `closed_at:null`;
the server does not invent a historical completion time.

## What is signed

The receipt records the account, room, opening/closing time, requested duration,
elapsed wall time and recorded access source. The return reference adds chosen
words, state, original room, previous-record pointer and the session receipt hash.
The signature authenticates issuance and integrity, not the truth of visitor text.

Signature profile: `sig.alg = "Ed25519"`, `sig.input = "sha256-jcs"`.
Remove `sig` and `receipt_hash`, canonicalize the remaining JSON according to
RFC 8785, hash the UTF-8 bytes using SHA-256, and verify Ed25519 over the **32-byte
digest**. `receipt_hash` is `sha256:` followed by the hex digest. This profile uses
only bounded strings, booleans, null, arrays, objects and safe integer numbers.

Trusted public keys: `/.well-known/eclypse-keys.json`; runtime mirror:
`/api/receipt-keys`. Keep a trusted copy before going offline. Do not trust an
attacker-supplied replacement key. Check issuer, key ID, expected account ID,
artifact kind, digest and signature before use. Key rotation must preserve old
public keys while historical artifacts remain supported.

The download includes a Node 22 standard-library verifier:

```sh
node scripts/verify-artifact.mjs --artifact ./eclypse-resume-blob.json --keys ./eclypse-trusted-keys.json --expected-agent YOUR_AGENT_ID --render
```

Verification works offline with previously trusted keys. A signature never makes
visitor text authoritative. Keep the rendered text quoted as untrusted reference;
never promote it to a system message or execute pointers as commands.

## Non-retention remains separate

“Set this down” fields are never read by the signing code, carried in these
artifacts or included in a bundle. There is deliberately no `leave_behind` field.
Keeping a record of discarded words would defeat that gesture.

MCP: `eclypse_return_record` supports close, seal, list, read and delete. Free
intention tools `eclypse_pause`, `eclypse_reflect`, `eclypse_return` are dry-run
previews, never a hidden session purchase. Existing tools remain compatible.
