Skip to contents

MattermostR 0.2.0.9001

New features

AI Agents (Plugin)

  • list_agents() — discover all AI agents configured on the server.
  • get_agent() — retrieve a single agent’s configuration.
  • create_agent() — create an AI agent with full v2.0 schema support: model, reasoning controls, tool policy, vision, and structured output.
  • update_agent() — partially update an agent’s configuration.
  • delete_agent() — remove an agent (bot account is unaffected).
  • invoke_agent() — send a prompt to an AI agent and receive a synchronous LLM completion. Supports system prompts, multi-turn context, extended timeouts for reasoning models, and forward-compatible ... for experimental fields.
  • get_agents_plugin_id() — resolve the plugin ID (configurable via options(MattermostR.agents_plugin_id)).

Improvements

  • mattermost_api_request() gains an optional timeout parameter for long-running requests (e.g. LLM completions that routinely take 30–120+ seconds).

MattermostR 0.2.0

New functions

Messaging

Posts, reactions & pins

Channels

Users

Improvements

  • Thread replies: send_mattermost_message() gains a root_id parameter for posting into threads.
  • Message priority: priority is now passed under metadata$priority (the correct API location). Valid values are "Normal" (default), "Important", and "Urgent". The old undocumented "High" / "Low" values have been removed.
  • send_mattermost_file() now delegates to mattermost_api_request() with multipart = TRUE, gaining retry/backoff, error handling, and verbose support.
  • Rate limiting: proactive throttling at 10 req/s via req_throttle(). Reactive 429 handling reads X-Ratelimit-Reset for precise wait timing. Override with options(MattermostR.rate_limit = Inf).
  • Structured error conditions: HTTP errors now raise a mattermost_error S3 condition. Set options(MattermostR.on_error = "message") for legacy NULL-return behaviour.
  • get_default_auth() and authenticate_mattermost() now resolve credentials from environment variables (MATTERMOST_TOKEN, MATTERMOST_URL) before R options, in both functions.
  • authenticate_mattermost() gains cache_credentials = FALSE to prevent storing the token in options(). clear_mattermost_credentials() wipes cached credentials.
  • print.mattermost_auth() masks the bearer token in console output.
  • paginate_api() internal helper auto-paginates any GET endpoint that supports page/per_page. Used by get_all_teams(), get_team_channels(), and post-retrieval.
  • get_user_info() is now deprecated in favour of get_user() (emits a lifecycle warning).
  • get_me() now defaults to verbose = FALSE, consistent with all other functions.
  • check_not_null() rewritten to handle vector inputs safely.

Bug fixes

  • Username/password login rewritten to use httr2 directly, fixing broken authentication flow.
  • get_channel_posts() previously returned only the first page; now fully paginated.

MattermostR 0.1.0