# gRPC Removal - Completed

## Summary

Removed gRPC functionality while keeping the binary protobuf format for wasot files.

**Kept:**
- Binary format (`.wasotb` files) - protobuf serialization of wasot events
- `proto/wasot.proto` - core event definitions only
- `prost` and `prost-build` dependencies
- `BinaryProtobufConsumer`, `ProtobufBinaryEmitter`

**Removed:**
- gRPC remote tool plugins
- gRPC library client for external tool libraries
- `tonic`, `tonic-build`, `tower`, `tower-service` dependencies

## Changes Made

### Files Deleted
- `src/tools/grpc_adapter.rs` - gRPC tool adapter
- `src/tools/grpc_library_client.rs` - gRPC library client
- `src/tools/supervisor.rs` - Plugin supervisor (gRPC-related)
- `src/tools/proto/tool_service.proto` - gRPC service proto
- `examples/grpc_tools_example.rs` - gRPC example
- `python/playground_grpc_example.py` - Python gRPC example
- `reports/grpc_performance_optimization.md` - gRPC optimization report

### Files Modified

#### `Cargo.toml`
- Removed: `tonic`, `tonic-build`, `tower`, `tower-service`
- Renamed feature: `grpc` → `binary`
- Added `binary` to default features

#### `build.rs`
- Changed feature gate from `grpc` to `binary`
- Removed tonic_build calls (only prost_build remains)

#### `proto/wasot.proto`
- Removed gRPC service definition (`GrpcLibrary`)
- Removed tool-related messages using `google.protobuf.Value`:
  - `ToolDefinition`, `Context`, `ToolCall`
  - `ContextChange`, `ContextChangeTarget`
  - `GetToolsRequest`, `GetToolsResponse`
  - `CallToolRequest`, `CallToolResponse`

#### `src/tools/mod.rs`
- Removed: `grpc_adapter`, `grpc_library_client`, `supervisor` modules
- Removed: `GrpcPluginManager`, `GrpcToolAdapter`, `GrpcLibraryAdapter` exports

#### `src/main.rs`, `src/lib.rs`, `src/consumers/mod.rs`, `src/emitters/mod.rs`
- Changed all `#[cfg(feature = "grpc")]` to `#[cfg(feature = "binary")]`
- Updated error messages to reference `binary` feature

#### `src/python.rs`
- Removed `GrpcToolAdapter` import
- Removed `register_grpc_tool` function (both implementations)
- Removed `register_grpc_tool` from module exports

#### `python/playground.py`
- Removed `register_grpc_tool` import
- Removed commented gRPC example

#### `tests/cli_tests.rs`, `tests/roundtrip_tests.rs`
- Removed `#[ignore]` from binary format tests (since binary is now a default feature)

#### `scripts/dev/pre-commit.sh`
- Already updated to use `sqlite` feature only (no grpc)

## Binary Size Impact

Estimated reduction: ~0.5MB from removing:
- `tonic` (~0.3MB)
- `tower` + `tower-service` (~0.1MB)
- gRPC-related generated code (~0.1MB)
