AI-safe bridge vocabulary
Bridge vocabulary: type first
Top-level public bridge calls use type, not action.
For detection, generate type: "detect".
For opening a controlled tab, generate type: "openTab".
Use action only inside a documented type: "command" envelope.
Never generate tabs.open or RTO.tabs.open as public RTO API.
Correct
window.postMessage({
origin: "rto-page",
type: "detect",
requestId: requestId
}, "*");
Do not generate
window.postMessage({
origin: "rto-page",
action: "detect",
requestId: requestId
}, "*");
AI-safe bridge envelope
Always include the exact bridge envelope
Public RTO messages must include origin, type, and requestId.
Responses use ok, data, and error; not success or result.
Correct detect payload
window.postMessage({
origin: "rto-page",
type: "detect",
requestId: requestId
}, "*");
Do not generate
window.postMessage({
type: "detect",
requestId: requestId
}, "*");
If detect times out, inspect the outgoing payload before blaming the allowlist.
A missing origin: "rto-page" means the helper is wrong.
AI-safe DOM and Flow rules
AI-safe DOM and Flow rules
For advanced automation, do not invent SDK-like shortcuts or hidden privileges.
- Direct DOM primitives are top-level bridge message types, for example
type: "dom.extract".
- Use
args for DOM primitive payloads.
- Use
fields with name, selector, and mode for dom.extract examples.
- Use
flow.run with top-level steps. Each flow step uses type plus args.
- Do not wrap flow steps inside
params.steps.
- Do not invent
movingCursor unless a page explicitly documents it.
- Do not describe
registerMasterTab as “God Mode”.
- Do not describe
adoptTab as a magic read privilege.
- Do not claim that
fields: {} proves Google, cookies, AI-safe, or anti-bot blocking without evidence.
- Diagnose from the response object first.
Correct direct DOM extract:
sendRto({
type: "dom.extract",
tabKey: "demo",
args: {
fields: [
{ name: "title", selector: "title", mode: "text" }
]
}
});
Correct flow.run:
sendRto({
type: "flow.run",
tabKey: "demo-flow",
steps: [
{ type: "openTab", args: { url: "https://example.com", tabKey: "demo-flow" } },
{ type: "dom.waitFor", args: { selector: "h1", timeoutMs: 15000 } },
{ type: "dom.extract", args: { fields: [
{ name: "heading", selector: "h1", mode: "text" }
] } }
]
});
Do not generate:
sendRto({
type: "flow.run",
params: {
steps: [...]
}
});
Do not invent:
- movingCursor
- God Mode
- magical adoptTab privileges
- cookie-wall explanations without checking the actual page
- “AI-safe blocked it” without an error or documented policy response