Core Concepts
Selectors
Element resolution chain, selector cache, and deterministic replay.
Resolution chain
Descriptor-aware actions (click, input, hover, select, scroll) resolve their target in this order:
| Step | Source | When |
|---|---|---|
| 1 | Persisted path | description matches a cached selector |
| 2 | Element counter | element number from current snapshot |
| 3 | CSS selector | Explicit selector provided |
| 4 | LLM resolution | description provided, no cache hit |
| 5 | Error | No resolution possible |
When steps 2-4 succeed and description is present, the resolved path is persisted for replay.
// First run: LLM resolves "login-button", persists path
await opensteer.click({ description: 'login-button' })
// Subsequent runs: uses persisted path (no LLM call)
await opensteer.click({ description: 'login-button' })
Selector cache storage
Cache location: .opensteer/selectors/<namespace>/
index.json— registry of cached selectors.<descriptor-id>.json— individual selector records with method, description, DOM path, and metadata.
Cache persistence
Each record stores createdAt, updatedAt, and sourceUrl. Records are keyed by (method, descriptionHash, siteOrigin).
Cloud cache import
Upload your local cache to the cloud for replay continuity:
POST /selector-cache/import
See Cloud API for endpoint details.
Cache invalidation
Wipe all cached selectors for the current namespace programmatically:
await opensteer.clearCache()
Or delete the directory manually:
rm -rf .opensteer/selectors/<namespace>
