JFLib

ui/agent.rs#

Source: lib/ui/agent.rs

Universal application automation through the existing input, command and render paths.
Domain semantics remain in App::actions/action; no screen-coordinate inference is used.

impl Ui

  • fn agent_enabled(&self) -> bool Whether external control was explicitly activated. No endpoint opens by reading this.
  • fn agent_connected(&self) -> bool Whether the active control session has received a client request.
  • fn set_agent_enabled(&mut self, enabled: bool) Enable or revoke external control. Revocation also discards screenshot resources.

impl Runtime

  • fn set_agent_enabled(&mut self, enabled: bool) Explicitly opt into the same control dispatcher used by native JSON/MCP sessions.
  • fn control(&mut self, session: &mut agent_core::RpcSession, line: &[u8]) -> Option<String> Handle one control request without IO. The caller owns one session per connection.

Source: docs/API.md in the JFLib repository.