Skip to content

Add an explicit Screen Recording permission request to the host protocol #1

Description

@M4n5ter

Problem

The maka.cu/2 host can explicitly request the macOS Accessibility prompt through permissions.check with prompt: true, but it has no equivalent way to request Screen Recording access.

PermissionDiagnostics uses CGPreflightScreenCaptureAccess(), and the host deliberately avoids a live ScreenCaptureKit probe while access is missing. This keeps routine preflight silent, but it also means a client cannot start the native consent flow at the first operation that requires pixels. Maka currently has to direct the user to System Settings manually.

The request must originate from the maka-cu process. Triggering Electron's capture consent would grant the Desktop process instead of the native executor that performs capture.

Proposed contract

  • add an explicit, side-effectful Screen Recording request to the host protocol, separate from silent permissions.check
  • call CGRequestScreenCaptureAccess() from the native executor
  • return a typed result without treating the initial pre-request diagnostic as a grant
  • keep routine per-action preflight non-interactive
  • document whether the executor must restart before a newly granted permission becomes visible

The exact wire shape is open for discussion. It could be a dedicated method or an explicit permission-request operation, but it should not make ordinary permission checks prompt.

Acceptance criteria

  • a host client can deliberately initiate Screen Recording consent once
  • repeated action preflights do not produce dialog storms
  • denial and unavailable platform states are typed
  • the next permission check observes the grant, or reports that a restart is required
  • protocol and live macOS tests cover the request path

Related

The maka-agent Runtime Host Desktop integration now discovers and invokes client-owned Computer Use and can explicitly request Accessibility. Screen Recording is the remaining native authorization gap for screenshot-dependent operations.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions