Topic naming conventions for ASM PubSub integration.
Topics follow a hierarchical colon-separated scheme:
{prefix}:session:{session_id}
{prefix}:session:{session_id}:run:{run_id}
{prefix}:session:{session_id}:type:{event_type}The default prefix is "asm".
Examples
iex> Topic.build_session_topic("ses_abc123")
"asm:session:ses_abc123"
iex> Topic.build_run_topic("ses_abc123", "run_def456")
"asm:session:ses_abc123:run:run_def456"
iex> Topic.build(%{session_id: "ses_abc123", run_id: "run_def456"}, scope: :run)
"asm:session:ses_abc123:run:run_def456"
Summary
Functions
Builds a topic string from an event map and options.
Builds a run-scoped topic.
Builds a session-scoped topic.
Builds a type-scoped topic.
Functions
Builds a topic string from an event map and options.
Options
:prefix- Topic prefix. Default"asm".:scope- One of:session,:run,:type. Default:session.
Builds a run-scoped topic.
iex> Topic.build_run_topic("ses_abc123", "run_def456")
"asm:session:ses_abc123:run:run_def456"
Builds a session-scoped topic.
iex> Topic.build_session_topic("ses_abc123")
"asm:session:ses_abc123"
Builds a type-scoped topic.
iex> Topic.build_type_topic("ses_abc123", :tool_call_started)
"asm:session:ses_abc123:type:tool_call_started"