/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsISupports.idl"

/**
 * The Gecko remote agent is an RPC subsystem that exposes
 * browser-internal interfaces and services to the surrounding
 * system.
 *
 * Consumers, whether remote or browser-local, can interface with
 * the browser through an assorted set of services ranging from
 * document introspection and script evaluation, to instrumentation,
 * user interaction simulation, and event subscription.
 */
[scriptable, uuid(8f685a9d-8181-46d6-a71d-869289099c6d)]
interface nsIRemoteAgent : nsISupports
{
  /**
   * Indicates whether the Remote Agent is running.
   */
  readonly attribute boolean running;

  /**
   * Indicates whether a Remote Agent session for browser automation is
   * currently running. Can be set to false when started at runtime (e.g. for
   * tooling, agentic assisted browsing).
   */
  readonly attribute boolean isBrowserAutomationRunning;
};

%{C++
#define NS_REMOTEAGENT_CONTRACTID "@mozilla.org/remote/agent;1"
%}
