What you need
-
A Reticle service that issues activation tickets (
POST /v1/production-mode/tickets). A service without this route answers 404, and the lease says “the server does not offer production mode”. -
This project linked to that service:
reticle connect, orRETICLE_API_KEY. - A site whose server redeems the ticket. The service signs the ticket, and only that service can check it. Today the Reticle dashboard is the only site that does this. Another site cannot start production mode yet.
-
A browser that is signed in to the site, as the person whose API key asks for the ticket. The service redeems a ticket only for that person, in that workspace. A leased browser starts signed out, so give the lease your session cookies in
seedStorage(see below). -
The site loads
@reticlehq/browserlazily, only when an activation is present, and calls:
Activate a drive
Onereticle_lease call does it:
- It mints a single-use session nonce for the site’s origin. The nonce expires after 60 minutes.
- It asks the service for a ticket with the linked API key:
{ workspaceId, nonce, bridgePort, scope }. The service decides who may activate, and signs the ticket. - It opens
https://app.example.com/?reticle_activate=<ticket>in a leased browser.
ready: false. The usual cause is a signed-out browser: the service refused the ticket, and the page loaded without an activation. Release the lease, then acquire again with your session cookies in seedStorage.
The page connects with the nonce. The daemon accepts a production HELLO only with a live production nonce, never with the machine’s pairing token. The first tab that presents the nonce owns it. That tab can reconnect after a reload. Another tab is refused.
What the policy refuses
The daemon enforces the policy where it sends commands, not in the page. Scopeobserve refuses every act. The agent can still look, observe, assert and navigate.
Scope act refuses these actions, unless the drive’s intent names the action:
The daemon recognises an action in two ways:
- The control. Its name, text, value, test id, link and form target.
- The request. Its method and path, from a policy list. The service can send its own list with the ticket. Without one, the daemon uses
DEFAULT_PRODUCTION_POLICYfrom@reticlehq/core.
- navigation on the activated origin (leaving the origin is refused);
- reading, filters, tabs and panels;
- deleting something the drive itself created. The daemon notes the ids that the drive’s own creates returned (a 2xx
POSTorPUTwhose body has anid).
What a refusal looks like
A refusal is never a silent no-op. The act fails, and its error names the rule:the session nonce expired, and the page cannot reconnect.