Principle:A9T9 RPA Command Dispatch
| Knowledge Sources | |
|---|---|
| Domains | Browser_Automation, Command_Dispatch |
| Last Updated | 2026-10-22 00:00 GMT |
Overview
Mechanism for routing individual RPA commands from the player loop to the target execution context (in-page content script or desktop) via inter-process communication.
Description
Command Dispatch is the bridge between the playback engine (which iterates commands) and the actual executor (which runs the command in the target context). In a browser extension architecture, the player runs in the popup/side panel context, but the DOM manipulation must happen in the content script of the target tab. The dispatch layer sends the command via IPC (inter-process communication) through the background service worker to the content script.
The dispatch involves:
- Serialization: the command object is serialized for IPC transport
- Routing: the background service worker routes the message to the correct tab's content script
- Execution: the content script's command runner executes the action (click, type, etc.)
- Trusted input: for events that must be "trusted" (to trigger event listeners), the Chrome DevTools Protocol (CDP) is used via `chrome.debugger` to dispatch native input events
- Result return: the execution result (status, screenshots, logs) is returned to the player
Usage
Use this principle when designing a browser-extension-based RPA system where the playback controller and the command executor run in different execution contexts.
Theoretical Basis
The dispatch is a remote procedure call (RPC) over the extension's messaging infrastructure: