# Operator - Demo

Canonical page: https://capsules.run/operator/

Operator - Demo is a local-first browser surface for turning photos, audio, video, logs, packet captures, documents, arbitrary files, and operator interaction into a signed `.capsule` record.

Operator - Demo now treats every evidence file as an inspectable asset. Select an asset to view the model-visible metadata, text preview, image preview where possible, and hash path. Highlight text inside an asset preview to ask Gemma about that exact selection, or ask a question about the whole asset.

## What It Builds

- `payload/evidence/`: original source bytes from every uploaded file.
- `payload/evidence-index.json`: filename, media type, size, hash, and local extraction metadata.
- `payload/briefing/brief.md`: current command brief.
- `payload/briefing/analysis.json`: local signal extraction, open questions, and command lines.
- `payload/interaction/notes.json`: operator observations and answers captured during the session.
- `payload/model/gemma-prompt.md`: on-device Gemma prompt pack for continuing analysis without cloud dependency.
- `payload/model/model-output.md`: optional responses from configured OpenAI-compatible endpoints, including artifact passes and asset-specific questions.
- `chain/events.jsonl`: append-only event history linking evidence ingestion, operator interaction, local analysis, and transport seal.
- `provenance/envelope.json`: Ed25519 signature over the v0.6 capsule envelope.

## Trust Boundary

The capsule proves integrity and authorship of the sealed record. It does not prove that the underlying claims are true, that a signer is who they say they are outside the key, or that a wall-clock timestamp came from a trusted authority.

Gemma or another local model is the extractor and briefing assistant, not the authority. Human and organizational signers remain the trust boundary.

## Workflow

1. Drop media or files into the browser.
2. Add title, mode, location, timeline, and owner.
3. Select any evidence asset, inspect the model-visible context, and optionally highlight text inside the preview.
4. Ask Gemma about the selected asset or selected excerpt.
5. Run local analysis across the evidence set.
6. Optionally connect an OpenAI-compatible endpoint such as a local Gemma/Ollama/LM Studio/vLLM server.
7. Append operator notes, questions, answers, or decisions.
8. Review the orchestration path, capsule structure, raw model turns, and signer state through focused detail panels.
9. Build a signed Capsule v0.6 prototype.
10. Share the `.capsule` file or download it for offline handoff.

## Local Model Endpoint

The browser accepts either a base URL or a full chat-completions URL:

- `http://127.0.0.1:11434`
- `http://127.0.0.1:1234/v1`
- `http://127.0.0.1:11434/v1/chat/completions`

The page normalizes those values to an OpenAI-compatible `/v1/chat/completions` call. API keys are optional and kept in browser session storage only; they are not sealed into the capsule.

When enabled, model analysis runs as a turn-based evidence loop:

1. One model turn per uploaded artifact.
2. Each artifact turn describes that upload and asks artifact-specific follow-up questions.
3. Asset question turns can target a whole uploaded file or a text selection within that file.
4. One final model turn writes the next operator-facing message.
5. That final turn is surfaced in the Interact panel so the operator can answer and append the reply to the capsule record.

## Route

- HTML: `/operator/`
- Markdown mirror: `/operator/index.md`
