Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
_Notes on upcoming releases will be added here_
<!-- END PLACEHOLDER - ADD NEW CHANGELOG ENTRIES BELOW THIS LINE -->

### Documentation

#### Caller identity fields are described (#105)

The dataclass identifying an MCP caller now says what each field holds. They
previously reached the rendered API reference as "Alias for field number 0"
or as a bare name carrying only its type.

### Development

#### CI actions updated to current majors
Expand Down
20 changes: 20 additions & 0 deletions src/libtmux_mcp/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,26 @@ class CallerIdentity:
Used to scope self-protection checks to the caller's own tmux server —
a pane ID like ``%1`` is only unique within a single server, so
comparisons must also verify the socket path matches.

Attributes
----------
socket_path : str | None
Filesystem path of the tmux socket the caller is attached to, from
the first ``TMUX`` field. ``None`` when ``TMUX`` is unset or its
first field is empty — the socket comparisons in
:func:`_caller_is_on_server` and
:func:`_caller_is_strictly_on_server` then cannot prove which
server the caller belongs to.
server_pid : int | None
PID of the tmux server process, from the second ``TMUX`` field.
``None`` when that field is absent or not an integer.
session_id : str | None
Session the caller's pane belongs to (e.g. ``$7``), from the third
``TMUX`` field. ``None`` when that field is absent or empty.
pane_id : str | None
Pane the MCP server process runs in (e.g. ``%3``), read from
``TMUX_PANE``. ``None`` when the variable is unset, meaning no
pane can be identified as the caller's own.
"""

socket_path: str | None
Expand Down