Add KVStoreMixin with 9 methods:
- kv_set, kv_get, kv_delete, kv_delete_all, kv_list
- kv_set_with_expiry
- kv_compare_and_set, kv_compare_and_delete, kv_set_with_options
Provides complete KV store functionality including atomic operations
and expiring keys for plugin data persistence.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add FilesMixin with 8 methods:
- get_file_info, get_file_infos, set_file_searchable_content
- get_file, get_file_link, read_file
- upload_file, copy_file_infos
Covers all file metadata, content retrieval, and upload operations
following the established mixin pattern.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add PostsMixin with 15 methods:
- create_post, get_post, update_post, delete_post
- send_ephemeral_post, update_ephemeral_post, delete_ephemeral_post
- get_post_thread, get_posts_since, get_posts_after, get_posts_before
- add_reaction, remove_reaction, get_reactions
All methods follow the established mixin pattern with proper error
handling and type annotations.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add dataclasses for:
- Post: Mattermost message with full field support
- Reaction: User emoji reaction to a post
- PostList: Ordered list of posts with pagination
- FileInfo: File metadata with all attributes
- UploadSession: Resumable upload session
- PluginKVSetOptions: Options for KV set operations
All wrappers include from_proto() and to_proto() methods for
protobuf serialization.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add mixin imports and inheritance to PluginAPIClient so that the
User/Team/Channel API methods are actually available on the client.
This was missing from the previous mixin implementation commit.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Generate Python code from server/public/pluginapi/grpc/proto:
- Protocol buffer message definitions (*_pb2.py)
- gRPC service stubs (*_pb2_grpc.py)
- Type stubs for IDE completion (*_pb2.pyi, *_pb2_grpc.pyi)
- Imports fixed to use package-relative imports
Generated from 18 .proto files using grpcio-tools and mypy-protobuf.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add client classes for Mattermost Plugin API:
- PluginAPIClient: sync client with context manager support
- AsyncPluginAPIClient: async client with grpc.aio support
- Both implement get_server_version() as smoke test RPC
- Proper error handling converts gRPC errors to SDK exceptions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Create the foundational Python SDK package structure:
- pyproject.toml with project metadata and dependencies
- src/mattermost_plugin/ package with src layout
- Configured for Python >=3.9 with grpcio and protobuf deps
- Dev dependencies include grpcio-tools, mypy-protobuf, pytest
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>