Add python-proto-gen and proto-gen-all targets to server/public/Makefile
for complete gRPC code generation workflow:
- python-proto-gen: Generates Python gRPC code by calling generate_protos.py
- proto-gen-all: Runs both Go and Python proto generation in sequence
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add bidirectional streaming RPC for ServeHTTP hook to support
efficient HTTP request/response transfer between Go and Python.
Key changes:
- New hooks_http.proto with ServeHTTPRequest/Response messages
- HTTPHeader message for multi-value header support
- ServeHTTPRequestInit with full request metadata
- ServeHTTPResponseInit for status and headers
- Body chunks with completion flag for streaming
- Updated hooks.proto with ServeHTTP streaming RPC
- Regenerated Go and Python code
Design decisions:
- 64KB default chunk size per gRPC best practices
- First message carries metadata, subsequent messages carry body
- body_complete flag signals end of stream
- Headers as repeated HTTPHeader for multi-value support
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add hooks_command.proto to Makefile proto mappings
- Update hooks_command.proto to import api_remaining.proto for shared types
(CommandArgs, CommandResponse, PluginClusterEvent)
- Define new types: WebSocketRequest, SyncMsgJson, SyncResponse, RemoteCluster
- Generated Go code compiles successfully
- Total hooks in PluginHooks service: 41 (excluding deferred ServeHTTP/ServeMetrics)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add hooks_user_channel.proto mapping to Makefile proto generation
- Regenerate Go protobuf code with new user/channel hook types
- Generated hooks_user_channel.pb.go with all message types
- Updated hooks.pb.go and hooks_grpc.pb.go with new RPCs
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add hooks_message.proto mapping to Makefile for proto generation
- Update hooks_message.proto to import api_remaining.proto for
PushNotification and Preference types (avoiding redefinition)
- Generate Go code for all message hook messages and RPCs
Verified:
- make proto-gen succeeds
- go build ./public/pluginapi/grpc/generated/go/pluginapiv1/... succeeds
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create api.proto with PluginAPI service definition covering all 236
methods from server/public/plugin/api.go
- Create api_user_team.proto with User, Session, and Team request/response
messages with placeholder fields
- Create api_channel_post.proto with Channel, Post, and Emoji messages
- Create api_kv_config.proto with KV store, config, plugin, and logging
messages
- Create api_file_bot.proto with File, Upload, and Bot messages
- Create api_remaining.proto with Server, Command, Preference, OAuth,
Group, SharedChannel, Property, and Audit messages
- Add ViewUsersRestrictions to common.proto
- Add apiverify tool that parses Go API interface and proto service
to ensure parity
- Update Makefile with new proto file mappings
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Define protobuf messages and PluginHooks gRPC service for lifecycle and
system hooks:
- Implemented: returns list of hooks the plugin implements
- OnActivate/OnDeactivate: plugin lifecycle events
- OnConfigurationChange: configuration change notifications
- OnInstall: plugin installation event
- OnSendDailyTelemetry: daily telemetry hook
- RunDataRetention: data retention batch processing
- OnCloudLimitsUpdated: cloud product limit changes
- ConfigurationWillBeSaved: configuration validation/modification
Also adds model types:
- OnInstallEvent: mirrors model.OnInstallEvent
- ProductLimits/FilesLimits/MessagesLimits/TeamsLimits: typed cloud limits
- ConfigJson: JSON blob wrapper for model.Config (too large for typed proto)
Updates Makefile to include new proto file mappings.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add common.proto with Empty, StringMap, and AppError messages
- Add user.proto with User message (34 fields mirroring model.User)
- Add channel.proto with Channel, ChannelType enum, ChannelBannerInfo
- Add post.proto with Post, PostMetadata, PostEmbed, PostPriority, Reaction
- Add team.proto with Team, TeamMember, TeamUnread, TeamType enum
- Add file.proto with FileInfo, FileUploadResponse, FileData
- Update Makefile to support all proto files with proper import mappings
- Remove bootstrap.proto (replaced by common.proto)
- Use google.protobuf.Struct for dynamic JSON fields (Post.props, Channel.props)
- All timestamps are int64 (milliseconds since epoch)
- All IDs are strings (26-char base32)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add proto-tools target to install pinned protoc-gen-go (v1.36.6)
and protoc-gen-go-grpc (v1.5.1) matching go.mod dependencies
- Add proto-gen target to generate Go code from .proto files
- Ensure proto-gen fails fast with clear message if protoc missing
- Use --plugin flag to reference GOBIN-installed tools explicitly
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Include https://github.com/mattermost/mattermost-plugin-api into the mono repo
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Co-authored-by: Michael Kochell <mjkochell@gmail.com>
Co-authored-by: Alejandro García Montoro <alejandro.garciamontoro@gmail.com>
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Co-authored-by: Alex Dovenmuehle <alex.dovenmuehle@mattermost.com>
Co-authored-by: Michael Kochell <6913320+mickmister@users.noreply.github.com>
Co-authored-by: Christopher Poile <cpoile@gmail.com>
Co-authored-by: İlker Göktuğ Öztürk <ilkergoktugozturk@gmail.com>
Co-authored-by: Shota Gvinepadze <wineson@gmail.com>
Co-authored-by: Ali Farooq <ali.farooq0@pm.me>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
Co-authored-by: Daniel Espino García <larkox@gmail.com>
Co-authored-by: Christopher Speller <crspeller@gmail.com>
Co-authored-by: Alex Dovenmuehle <adovenmuehle@gmail.com>
Co-authored-by: Szymon Gibała <szymongib@gmail.com>
Co-authored-by: Lev <1187448+levb@users.noreply.github.com>
Co-authored-by: Jason Frerich <jason.frerich@mattermost.com>
Co-authored-by: Agniva De Sarker <agnivade@yahoo.co.in>
Co-authored-by: Artur M. Wolff <artur.m.wolff@gmail.com>
Co-authored-by: Madhav Hugar <16546715+madhavhugar@users.noreply.github.com>
Co-authored-by: Joe <security.joe@pm.me>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: José Peso <trilopin@users.noreply.github.com>