cursor_cli_sdk is a provider-native Elixir SDK above the normalized subprocess stack. It does not implement its own erlexec transport.

flowchart TD
  App[Application code] --> SDK[CursorCliSdk]
  SDK --> CoreProfile[CliSubprocessCore.ProviderProfiles.Cursor]
  SDK --> CoreSession[CliSubprocessCore.Session]
  CoreSession --> ExecutionPlane[execution_plane subprocess transport]
  CoreProfile --> Events[Typed CursorCliSdk events]
  SDK --> ASM[agent_session_manager SDK lane]

Layers

LayerResponsibility
CursorCliSdk.OptionsTyped caller input and validation
CursorCliSdk.ArgBuilderCursor argv rendering
CursorCliSdk.CLICommand resolution and invocation construction
CursorCliSdk.Runtime.CLISession-shaped runtime used by ASM and streams
CursorCliSdk.StreamLazy enumerable over runtime events
CursorCliSdk.TypesProjection from core events into SDK event structs
CliSubprocessCore.ProviderProfiles.CursorCanonical Cursor NDJSON parser and core invocation profile
execution_planeProcess execution transport

Boundary Rule

The SDK is provider-native, but it still shares the normalized parser and subprocess kernel with other CLI providers. Cursor-specific flags live in Options and ArgBuilder; command execution and event transport stay in cli_subprocess_core / execution_plane.

ASM

ASM uses CursorCliSdk.Runtime.CLI on its :sdk lane. The :core lane remains available through CliSubprocessCore.ProviderProfiles.Cursor.