Skip to main content
Glama
README.md
# Hyde's Hoard

[Español](README.es.md)

## What it is

Hyde is a local browser app for trying a digital double in writing and by voice. It drafts replies using reviewed writing traits from a demo persona archive and lets the owner compare synthetic writing samples in a blind review.

## What it does

- **Conversation.** The owner enables replies in the browser and chooses the audience, **Just me** or **Third parties**. Hyde reads the persona sheet permitted for that audience and checks it again before delivering the reply. It labels opinions and inferences, and adds a digital-double disclosure to replies for third parties.
- **Dictation and playback.** Type or use **Dictate with microphone** and finish the recording to transcribe it into the message field. An empty field submits the transcript automatically. Enable **Read replies aloud** to hear replies as their audio is generated. **Stop voice** ends playback. Hyde remembers the setting and the selected voice profile.
- **Disclosure and acknowledgement.** The default voice identifies itself to third parties while Hyde prepares their reply. In **Just me**, Hyde says “One moment” when the question arrives. The owner can switch that acknowledgement off in **Configure voice profile**.
- **Cited recall.** Memory replies quote evidence permitted for the selected audience. The references are available under **Memory citations**. When evidence is missing, Hyde says it does not remember.
- **Activity log.** The owner can see delivered replies, their audience, the persona revision, supporting references and stage timings. The log stores the reply without a copy of the input prompt or the full persona sheet.
- **Blind style review.** Compare a synthetic A/B packet and rate catchphrases, turns of phrase, rhythm, humour and register. You can abstain on any dimension. The reference and double slots are revealed after submission, with separate rating and abstention counts for each dimension.

## Limits

- Conversations use the demo archive only. They require a persona credential scoped to the selected audience and access to the common model through Hoard Hub. The owner switch starts off on each launch.
- The default voice reads the digital-double disclosure to third parties. Granted voice profiles are restricted to **Just me** until synthesis provides a detectable watermark and synthetic-origin metadata. Written replies remain available when voice is unavailable.
- Blind packets use synthetic, independently completed pairs. They stay in memory and can be reviewed with the conversation switch off. The delivered reply log is append-only.

## Run

Open **Hyde's Hoard** from Hoard Hub. The default local address is `http://127.0.0.1:5254`.

Start **Dorian Demo** from the Hub, then select **Prepare the demo** in Hyde. The owner can turn on the double before or after preparing the sheet. If a message is waiting, Hyde retries it after setup. To withdraw the access Hyde created, open **Demo settings** and choose **Undo demo setup**. The synthetic examples stay in the archive.

For development from a checkout with Python 3.11 or later:

```powershell
python -m venv .venv
.venv\Scripts\python -m pip install .
.venv\Scripts\python -m hyde_hoard --no-browser
```

Demo setup uses `HYDE_DORIAN_DEMO_URL`, which defaults to `http://127.0.0.1:18743`. Hyde saves the managed credential in `<data_dir>/dorian-credential.json` and renews it before expiry while Dorian still permits access. Development and test installations can supply `HYDE_DORIAN_CREDENTIAL_FILE` with a loopback `url` and `token`. That file takes priority and Hyde leaves its permissions to the caller. The grant needs `persona.owner.read` for **Just me** and `persona.third_party.read` for **Third parties**.

Hyde uses the common model through the loopback `HOARD_HUB_URL`. Set `HOARD_HUB_TOKEN_FILE` if that endpoint needs a Hub credential.

Voice uses the local Boltagon service at `http://127.0.0.1:5253` or the loopback origin configured in `CYRANO_URL`. Authorise the app `hyde` when creating the voice profile in Boltagon. Copy its profile credentials, paste them into **Configure voice profile** in Hyde and save. Then select the authorised profile in the conversation.

Data defaults to `data/`. Use `--port` and `--data-dir` to run with a separate port and directory.

## Connection with Faustus and Hoard Hub

The manifest registers the app as `hyde`. Its stdio MCP bridge, `mcp_server.py`, connects to a running instance with `HYDE_URL` and `HYDE_TOKEN_FILE` (normally `<data>/mcp-token`).

| MCP tool | Use |
| --- | --- |
| `hyde_status` | Read the owner switch, demo setup and voice availability. |
| `hyde_reply` | Request a written reply with references and optional live speech. The delivered text is recorded locally. |
| `hyde_voice_cancel` | Cancel live speech with the returned undo token. |
| `hyde_trial_demo` / `hyde_trial_create` | Open a blind packet from built-in or supplied synthetic pairs and receive its undo token. |
| `hyde_trial_read` | Read a blind packet or its reveal after the owner submits scores. |
| `hyde_trial_undo` | Discard a packet using its undo token. |

The owner controls the switch, reviews the activity log and submits blind scores in the browser. See [FAUSTUS.md](FAUSTUS.md) for the agent contracts.

## Project layout

- `hyde_hoard/` contains the API, conversation, activity log, trials and browser interface.
- `faustus-plugin.json` is the plugin manifest. `tests/` contains synthetic fixtures and checks.

## Licence

[MIT](LICENSE). See [third-party notices](THIRD_PARTY_NOTICES.md).