glass-browser 0.2.6

Local, revision-safe Chrome automation runtime for agents, with semantic observation, verified workflows, MCP, CLI, TUI, and Rust APIs
Documentation
# Semantic observations

A semantic observation is a bounded, versioned view of the current page. Glass
builds it from browser accessibility data.

A classification is evidence. It does not authorize an action.

Each observation contains:

- a schema version;
- route identity;
- a page revision;
- a page classification;
- region summaries; and
- omission and truncation limits.

A region handle contains the target, frame, URL, and revision. Glass rejects the
handle when the page changes.

## Observation levels

Select the smallest level that answers the question:

| Level | Data |
|---|---|
| `summary` | Page classification and region summaries. |
| `interactive` | Revision-scoped action references grouped by region. |
| `structured` | Bounded visible page text. |
| `detailed` | A bounded compact accessibility projection. |
| `raw` | The bounded fields and an explicit raw accessibility projection. |

Form values, screenshots, and deep DOM are separate operations. Glass does not
add them to a semantic level. Glass reports omitted and truncated fields in
`limits`.

## CLI

Run:

```console
glass observe --level summary
glass observe --level interactive
glass observe --level structured --region region_main_1
```

Do not combine semantic options with `--deep-dom`, `--screenshot`, or
`--form-values`. In the TUI, use `semantic LEVEL [REGION_ID]`.

## MCP

Call the `observe` tool with `level` set to one of the five levels. Add
`region` for a revision-checked region expansion.

If `level` is not present, Glass returns the compact `PageContext` response
for compatibility.

## Revisions and diffs

`SemanticObservation::diff_from` accepts observations with the same target,
frame, URL, and level. The new revision must not be lower than the old revision.

The diff reports bounded region and target additions, removals, and changes.

A continuity entry requires one unique role, name, and input-type match. It is
an advisory link. It is not a replacement reference. It does not authorize an
action.

## Privacy and limits

Semantic data may contain references, roles, names, input types, labels, visible
text, regions, evidence, and change vectors.

Glass does not include form values, cookies, credentials, evaluated source, or
screenshot pixels in semantic data.

Glass bounds all semantic data before serialization. The schema is
[semantic-observation-v1.schema.json](schema/semantic-observation-v1.schema.json).