PtcRunner.Kernel.MCPOAuth.Store.Memory (PtcRunner v0.14.0)

Copy Markdown View Source

Owner-process, process-local implementation of the MCP OAuth store.

It is intended for tests, examples, and one foreground CLI invocation. All compound behavior operations execute in one serialized GenServer callback, so grant CAS, lease transitions, requirement updates, authority claims, and retirement fences are atomic. Registered managers are monitored and removed from lifecycle tracking when they stop.

A store is bound to its owner by a monitor rather than a link, so it belongs to the process responsible for closing it and not to whichever process happened to start it. Owner death destroys the complete store; the death of a bounded worker that merely used it does not.

Summary

Functions

Returns a specification to start this module under a supervisor.

Types

t()

@type t() :: %PtcRunner.Kernel.MCPOAuth.Store.Memory{pid: pid()}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start(opts)

@spec start(keyword()) :: {:ok, t()} | {:error, :invalid_owner}

store(memory)

@spec store(t()) ::
  {:ok, PtcRunner.Kernel.MCPOAuth.Store.t()} | {:error, :invalid_store}