Commit graph

5 commits

Author SHA1 Message Date
Nick Misasi
19c392084b feat(08-01): add protobuf contract for ServeHTTP request streaming
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>
2026-01-19 14:23:38 -05:00
Nick Misasi
20f7cdebcd feat(03-04): update Makefile and generate Go code
- 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>
2026-01-16 13:42:31 -05:00
Nick Misasi
8bbc01cca2 feat(03-03): update Makefile and generate Go code for user/channel hooks
- 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>
2026-01-16 13:37:13 -05:00
Nick Misasi
5b3ef59f9a feat(03-02): update Makefile and generate Go code for message hooks
- 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>
2026-01-16 13:33:52 -05:00
Nick Misasi
8a38e38f0d feat(03-01): add lifecycle/system hook RPCs in hooks_lifecycle.proto and hooks.proto
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>
2026-01-16 11:18:19 -05:00