gRPC Strategy

This document defines and tracks the gRPC approach for exposing the sikuli-go API surface across multiple languages.

Goals

Non-goals

Current Implementation

Proposed API Surface

Start with a single sikuli.v1.SikuliService and expand by adding RPCs, not by changing existing fields.

Implemented v1 RPC set:

Contract Layout

Repository layout:

proto/
  sikuli/
    v1/
      sikuli.proto

Proto conventions:

Implementation Phases

Phase 1: Contract and generation

Status: ✅ Implemented

Phase 2: Go server transport

Status: ✅ Implemented

Phase 3: Cross-cutting concerns

Status: ✅ Implemented (auth/logging/tracing interceptors)

Phase 4: Client integration enablement

Status: ✅ Implemented (baseline client wrappers/examples)

Phase 5: Verification and rollout

Status: 🟡 In progress

Local Usage

Generate stubs:

./scripts/generate-grpc-stubs.sh

Run server:

go run ./cmd/sikuli-go -listen :50051 -admin-listen :8080

Run server with auth:

go run ./cmd/sikuli-go -listen :50051 -auth-token "$SIKULI_GRPC_AUTH_TOKEN"

Testing Requirements

Definition of Done