CursorCliSdk.GovernedLaunch (CursorCliSdk v0.1.0)

Copy Markdown View Source

Governed launch validation and invocation construction for Cursor.

In governed mode the command, cwd, env, clear-env posture, and credential materialization come from CliSubprocessCore.GovernedAuthority. Caller-owned launch overrides are rejected instead of merged.

Summary

Functions

authority(opts)

@spec authority(CursorCliSdk.Options.t() | keyword() | map() | nil) ::
  {:ok, CliSubprocessCore.GovernedAuthority.t() | nil} | {:error, term()}

governed?(input)

@spec governed?(CursorCliSdk.Options.t() | keyword() | map() | nil) :: boolean()

invocation(args, input)

@spec invocation([String.t()], CursorCliSdk.Options.t() | keyword()) ::
  {:ok, CliSubprocessCore.Command.t()} | {:error, term()}

run_options(opts, input)

@spec run_options(
  keyword(),
  CursorCliSdk.Options.t() | keyword()
) :: keyword()

validate_command_options(opts)

@spec validate_command_options(keyword()) :: :ok | {:error, term()}

validate_options(options)

@spec validate_options(CursorCliSdk.Options.t()) :: :ok | {:error, term()}

validate_options!(options)

@spec validate_options!(CursorCliSdk.Options.t()) :: CursorCliSdk.Options.t()