ASM.Extensions.ProviderSDK.Claude (ASM v0.9.2)

Copy Markdown View Source

Discovery metadata and bridge helpers for the optional Claude-native ASM extension namespace.

This namespace lives above ASM's normalized kernel.

It does not implement Claude's richer control semantics itself. Instead it:

  • publishes discovery metadata for the optional Claude-native surface
  • derives ClaudeAgentSDK.Options from ASM-style configuration, including normalized execution-surface data for CLI-backed families
  • starts ClaudeAgentSDK.Client when callers explicitly opt into the SDK-local control family

The actual control family remains in claude_agent_sdk.

Summary

Functions

Returns the SDK-local Claude client module.

Returns the Claude SDK control protocol module.

Returns the Claude SDK hooks module.

Returns the Claude SDK permission module.

Derives ClaudeAgentSDK.Options from ASM-style Claude configuration.

Derives ClaudeAgentSDK.Options from an ASM session plus optional ASM/native overrides.

Starts ClaudeAgentSDK.Client from ASM-style Claude configuration.

Starts ClaudeAgentSDK.Client from an ASM session plus optional ASM/native overrides.

Functions

available?()

@spec available?() :: boolean()

client_module()

@spec client_module() :: module()

Returns the SDK-local Claude client module.

control_protocol_module()

@spec control_protocol_module() :: module()

Returns the Claude SDK control protocol module.

extension()

hooks_module()

@spec hooks_module() :: module()

Returns the Claude SDK hooks module.

native_capabilities()

@spec native_capabilities() :: [atom()]

native_surface_modules()

@spec native_surface_modules() :: [module()]

permission_module()

@spec permission_module() :: module()

Returns the Claude SDK permission module.

sdk_app()

@spec sdk_app() :: atom()

sdk_module()

@spec sdk_module() :: module()

sdk_options(asm_opts, native_overrides \\ [])

@spec sdk_options(keyword(), keyword()) :: {:ok, struct()} | {:error, ASM.Error.t()}

Derives ClaudeAgentSDK.Options from ASM-style Claude configuration.

native_overrides remains the explicit home for Claude-native options such as hooks, permission callbacks, SDK MCP servers, file checkpointing, or thinking configuration. Execution-surface placement stays on asm_opts.

sdk_options_for_session(session, asm_overrides \\ [], native_overrides \\ [])

@spec sdk_options_for_session(term(), keyword(), keyword()) ::
  {:ok, struct()} | {:error, ASM.Error.t()}

Derives ClaudeAgentSDK.Options from an ASM session plus optional ASM/native overrides.

start_client(asm_opts, native_overrides \\ [], client_opts \\ [])

@spec start_client(keyword(), keyword(), keyword()) ::
  GenServer.on_start() | {:error, ASM.Error.t() | term()}

Starts ClaudeAgentSDK.Client from ASM-style Claude configuration.

ASM configuration stays on the first argument. Claude-native options live in native_overrides. Direct runtime overrides such as :execution_surface or :control_request_timeout_ms live in client_opts.

start_client_for_session(session, asm_overrides \\ [], native_overrides \\ [], client_opts \\ [])

@spec start_client_for_session(term(), keyword(), keyword(), keyword()) ::
  GenServer.on_start() | {:error, ASM.Error.t() | term()}

Starts ClaudeAgentSDK.Client from an ASM session plus optional ASM/native overrides.