# `ASM.Extensions.PubSub.Topic`
[🔗](https://github.com/nshkrdotcom/agent_session_manager/blob/v0.9.2/lib/asm/extensions/pub_sub/topic.ex#L1)

Canonical topic strategy for PubSub event fanout.

Scopes:
- `:all` -> `asm:events`
- `:session` -> `asm:session:<session_id>`
- `:run` -> `asm:session:<session_id>:run:<run_id>`

# `scope`

```elixir
@type scope() :: :all | :session | :run
```

# `all`

```elixir
@spec all(String.t()) :: String.t()
```

# `default_prefix`

```elixir
@spec default_prefix() :: String.t()
```

# `default_scopes`

```elixir
@spec default_scopes() :: [scope()]
```

# `for_event`

```elixir
@spec for_event(
  ASM.Event.t(),
  keyword()
) :: {:ok, [String.t()]} | {:error, ASM.Error.t()}
```

# `run`

```elixir
@spec run(String.t(), String.t(), String.t()) :: String.t()
```

# `session`

```elixir
@spec session(String.t(), String.t()) :: String.t()
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
