// Code generated by protoc-gen-connect-go. DO NOT EDIT.
//
// Source: tars/configurator/v1/configurator.proto

package configuratorv1connect

import (
	connect "connectrpc.com/connect"
	context "context"
	errors "errors"
	v1 "github.com/tetrateio/agentrouter-go/genapi/api/tars/configurator/v1"
	http "net/http"
	strings "strings"
)

// This is a compile-time assertion to ensure that this generated file and the connect package are
// compatible. If you get a compiler error that this constant is not defined, this code was
// generated with a version of connect newer than the one compiled into your binary. You can fix the
// problem by either regenerating this code with an older version of connect or updating the connect
// version compiled into your binary.
const _ = connect.IsAtLeastVersion1_13_0

const (
	// ConfiguratorServiceName is the fully-qualified name of the ConfiguratorService service.
	ConfiguratorServiceName = "tars.configurator.v1.ConfiguratorService"
)

// These constants are the fully-qualified names of the RPCs defined in this package. They're
// exposed at runtime as Spec.Procedure and as the final two segments of the HTTP route.
//
// Note that these are different from the fully-qualified method names used by
// google.golang.org/protobuf/reflect/protoreflect. To convert from these constants to
// reflection-formatted method names, remove the leading slash and convert the remaining slash to a
// period.
const (
	// ConfiguratorServiceGetConfigurationProcedure is the fully-qualified name of the
	// ConfiguratorService's GetConfiguration RPC.
	ConfiguratorServiceGetConfigurationProcedure = "/tars.configurator.v1.ConfiguratorService/GetConfiguration"
	// ConfiguratorServiceTriggerUpdateProcedure is the fully-qualified name of the
	// ConfiguratorService's TriggerUpdate RPC.
	ConfiguratorServiceTriggerUpdateProcedure = "/tars.configurator.v1.ConfiguratorService/TriggerUpdate"
	// ConfiguratorServiceListConfigurationsProcedure is the fully-qualified name of the
	// ConfiguratorService's ListConfigurations RPC.
	ConfiguratorServiceListConfigurationsProcedure = "/tars.configurator.v1.ConfiguratorService/ListConfigurations"
	// ConfiguratorServiceListPendingEventsProcedure is the fully-qualified name of the
	// ConfiguratorService's ListPendingEvents RPC.
	ConfiguratorServiceListPendingEventsProcedure = "/tars.configurator.v1.ConfiguratorService/ListPendingEvents"
	// ConfiguratorServiceReconcileWorkspaceProcedure is the fully-qualified name of the
	// ConfiguratorService's ReconcileWorkspace RPC.
	ConfiguratorServiceReconcileWorkspaceProcedure = "/tars.configurator.v1.ConfiguratorService/ReconcileWorkspace"
	// ConfiguratorServiceFullSyncWorkspaceProcedure is the fully-qualified name of the
	// ConfiguratorService's FullSyncWorkspace RPC.
	ConfiguratorServiceFullSyncWorkspaceProcedure = "/tars.configurator.v1.ConfiguratorService/FullSyncWorkspace"
	// ConfiguratorServiceAcknowledgeEventProcedure is the fully-qualified name of the
	// ConfiguratorService's AcknowledgeEvent RPC.
	ConfiguratorServiceAcknowledgeEventProcedure = "/tars.configurator.v1.ConfiguratorService/AcknowledgeEvent"
	// ConfiguratorServiceSetDataplaneURLProcedure is the fully-qualified name of the
	// ConfiguratorService's SetDataplaneURL RPC.
	ConfiguratorServiceSetDataplaneURLProcedure = "/tars.configurator.v1.ConfiguratorService/SetDataplaneURL"
	// ConfiguratorServiceUpsertMCPCatalogServerProcedure is the fully-qualified name of the
	// ConfiguratorService's UpsertMCPCatalogServer RPC.
	ConfiguratorServiceUpsertMCPCatalogServerProcedure = "/tars.configurator.v1.ConfiguratorService/UpsertMCPCatalogServer"
	// ConfiguratorServiceValidateDataplaneProcedure is the fully-qualified name of the
	// ConfiguratorService's ValidateDataplane RPC.
	ConfiguratorServiceValidateDataplaneProcedure = "/tars.configurator.v1.ConfiguratorService/ValidateDataplane"
	// ConfiguratorServiceCompleteEventProcedure is the fully-qualified name of the
	// ConfiguratorService's CompleteEvent RPC.
	ConfiguratorServiceCompleteEventProcedure = "/tars.configurator.v1.ConfiguratorService/CompleteEvent"
	// ConfiguratorServiceListActiveUsersProcedure is the fully-qualified name of the
	// ConfiguratorService's ListActiveUsers RPC.
	ConfiguratorServiceListActiveUsersProcedure = "/tars.configurator.v1.ConfiguratorService/ListActiveUsers"
	// ConfiguratorServiceListActiveProvidersProcedure is the fully-qualified name of the
	// ConfiguratorService's ListActiveProviders RPC.
	ConfiguratorServiceListActiveProvidersProcedure = "/tars.configurator.v1.ConfiguratorService/ListActiveProviders"
	// ConfiguratorServiceSaveBYOKBackendsProcedure is the fully-qualified name of the
	// ConfiguratorService's SaveBYOKBackends RPC.
	ConfiguratorServiceSaveBYOKBackendsProcedure = "/tars.configurator.v1.ConfiguratorService/SaveBYOKBackends"
	// ConfiguratorServiceDeleteBYOKBackendsProcedure is the fully-qualified name of the
	// ConfiguratorService's DeleteBYOKBackends RPC.
	ConfiguratorServiceDeleteBYOKBackendsProcedure = "/tars.configurator.v1.ConfiguratorService/DeleteBYOKBackends"
	// ConfiguratorServiceRevokeUserTokenProcedure is the fully-qualified name of the
	// ConfiguratorService's RevokeUserToken RPC.
	ConfiguratorServiceRevokeUserTokenProcedure = "/tars.configurator.v1.ConfiguratorService/RevokeUserToken"
	// ConfiguratorServiceUpdateEventMetadataProcedure is the fully-qualified name of the
	// ConfiguratorService's UpdateEventMetadata RPC.
	ConfiguratorServiceUpdateEventMetadataProcedure = "/tars.configurator.v1.ConfiguratorService/UpdateEventMetadata"
	// ConfiguratorServiceSubmitDataplaneUpgradeCredentialsProcedure is the fully-qualified name of the
	// ConfiguratorService's SubmitDataplaneUpgradeCredentials RPC.
	ConfiguratorServiceSubmitDataplaneUpgradeCredentialsProcedure = "/tars.configurator.v1.ConfiguratorService/SubmitDataplaneUpgradeCredentials"
	// ConfiguratorServiceGetDataplaneUpgradeCredentialsProcedure is the fully-qualified name of the
	// ConfiguratorService's GetDataplaneUpgradeCredentials RPC.
	ConfiguratorServiceGetDataplaneUpgradeCredentialsProcedure = "/tars.configurator.v1.ConfiguratorService/GetDataplaneUpgradeCredentials"
	// ConfiguratorServiceAckDataplaneUpgradeCredentialsProcedure is the fully-qualified name of the
	// ConfiguratorService's AckDataplaneUpgradeCredentials RPC.
	ConfiguratorServiceAckDataplaneUpgradeCredentialsProcedure = "/tars.configurator.v1.ConfiguratorService/AckDataplaneUpgradeCredentials"
	// ConfiguratorServiceCancelDataplaneUpgradeProcedure is the fully-qualified name of the
	// ConfiguratorService's CancelDataplaneUpgrade RPC.
	ConfiguratorServiceCancelDataplaneUpgradeProcedure = "/tars.configurator.v1.ConfiguratorService/CancelDataplaneUpgrade"
	// ConfiguratorServiceRollbackDataplaneUpgradeProcedure is the fully-qualified name of the
	// ConfiguratorService's RollbackDataplaneUpgrade RPC.
	ConfiguratorServiceRollbackDataplaneUpgradeProcedure = "/tars.configurator.v1.ConfiguratorService/RollbackDataplaneUpgrade"
)

// ConfiguratorServiceClient is a client for the tars.configurator.v1.ConfiguratorService service.
type ConfiguratorServiceClient interface {
	// GetConfiguration retrieves the latest configuration for a user.
	// Returns configuration only if the version is newer than the provided
	// version. Supports batch queries for multiple users for efficiency.
	GetConfiguration(context.Context, *connect.Request[v1.GetConfigurationRequest]) (*connect.Response[v1.GetConfigurationResponse], error)
	// TriggerUpdate triggers a configuration update for a specific user and
	// config type. This is called by the dashboard when configuration changes.
	TriggerUpdate(context.Context, *connect.Request[v1.TriggerUpdateRequest]) (*connect.Response[v1.TriggerUpdateResponse], error)
	// ListConfigurations lists all configurations with optional filtering.
	// Used for debugging and monitoring.
	ListConfigurations(context.Context, *connect.Request[v1.ListConfigurationsRequest]) (*connect.Response[v1.ListConfigurationsResponse], error)
	// ListPendingEvents returns configuration events that need processing.
	// Used by workers to discover which configurations have updates. The worker
	// piggybacks its tare-doctor runtime observation onto this poll
	// (request.doctor_runtime) so MP can explain a stale doctor report — hence
	// this is no longer NO_SIDE_EFFECTS: a poll updates the data plane's
	// doctor-runtime state.
	ListPendingEvents(context.Context, *connect.Request[v1.ListPendingEventsRequest]) (*connect.Response[v1.ListPendingEventsResponse], error)
	// ReconcileWorkspace re-enqueues missing or stale slot events for
	// the caller's workspace by cloning the latest sibling event of each
	// slot the workspace has not yet converged on. Used by the worker's
	// periodic drift sweep. Workspace is resolved from the caller's auth
	// claims; callers without a workspace claim are rejected.
	ReconcileWorkspace(context.Context, *connect.Request[v1.ReconcileWorkspaceRequest]) (*connect.Response[v1.ReconcileWorkspaceResponse], error)
	// FullSyncWorkspace is the heavier "last resort" replay path: walks
	// `liaison_configurations` directly rather than sibling events, so it
	// can recover legacy unscoped events the drift sweep can't see. Worker
	// calls this once on startup and every Nth drift sweep tick. Workspace
	// and customer are resolved from the caller's auth claims.
	FullSyncWorkspace(context.Context, *connect.Request[v1.FullSyncWorkspaceRequest]) (*connect.Response[v1.FullSyncWorkspaceResponse], error)
	// AcknowledgeEvent marks an event as acknowledged by a worker.
	// This prevents other workers from processing the same event.
	AcknowledgeEvent(context.Context, *connect.Request[v1.AcknowledgeEventRequest]) (*connect.Response[v1.AcknowledgeEventResponse], error)
	// SetDataplaneURL persists the customer-facing gateway URL for a data plane
	// (workspace). Called by `tare install` to register the URL at install time
	// and by the management-plane dashboard when an admin edits it later.
	//
	// trigger_update=false (install path) only writes the system_settings row.
	// trigger_update=true (admin-edit path) additionally fires a PROXY_URL
	// configuration event so the running data plane converges on the new URL
	// via the worker's existing event-handling loop.
	SetDataplaneURL(context.Context, *connect.Request[v1.SetDataplaneURLRequest]) (*connect.Response[v1.SetDataplaneURLResponse], error)
	// UpsertMCPCatalogServer wires a deployed in-cluster MCP server into the
	// customer's catalog. Used by `tare mcp enable <server>`: the CLI looks
	// up the server's seed entry in mcp-catalog-tare-mcp-with-tools.json, asks
	// the operator for the in-cluster URL, and submits this RPC to set
	// is_enabled=true on the corresponding mcp_catalog_servers row.
	//
	// Default behaviour (force_overwrite=false): if the row exists, only
	// url + is_enabled (+updated_at) are updated; dashboard-set fields
	// (description / icon / categories / tools / etc.) are preserved.
	// If the row is new, the seed-provided fields are used to populate it.
	//
	// force_overwrite=true: every seed field is written, clobbering any
	// dashboard edits. Use sparingly — intended for "reset this row to
	// seed defaults" repairs.
	UpsertMCPCatalogServer(context.Context, *connect.Request[v1.UpsertMCPCatalogServerRequest]) (*connect.Response[v1.UpsertMCPCatalogServerResponse], error)
	// ValidateDataplane lets a data plane's filter confirm that this DP is
	// still a valid (non-revoked) member of the customer and fetch the
	// customer's current gatekeeper public keys. Authentication is via the
	// caller's service-account JWT signed with its DP keypair
	// (kid=`instance-<...>`). When the DP keypair has been soft-deleted at
	// MP, the auth layer rejects the call with Unauthenticated — the filter
	// treats that as "revoked" without needing a separate response field.
	// On success, the response carries the customer's gatekeeper public
	// keys so the filter can repopulate its in-memory cache (and the
	// worker can repopulate `tars-config[gatekeeper-public-keys]`).
	ValidateDataplane(context.Context, *connect.Request[v1.ValidateDataplaneRequest]) (*connect.Response[v1.ValidateDataplaneResponse], error)
	// CompleteEvent marks an event as successfully applied or failed.
	CompleteEvent(context.Context, *connect.Request[v1.CompleteEventRequest]) (*connect.Response[v1.CompleteEventResponse], error)
	// ListActiveUsers returns a list of user IDs that have active configurations.
	// Used for monitoring and debugging.
	ListActiveUsers(context.Context, *connect.Request[v1.ListActiveUsersRequest]) (*connect.Response[v1.ListActiveUsersResponse], error)
	// ListActiveProviders returns a list of active (enabled) AI providers.
	// Used for monitoring, debugging, and querying available provider configurations.
	ListActiveProviders(context.Context, *connect.Request[v1.ListActiveProvidersRequest]) (*connect.Response[v1.ListActiveProvidersResponse], error)
	// SaveBYOKBackends saves BYOK provider backends configuration.
	// Used by workers to persist BYOK backend metadata to database.
	SaveBYOKBackends(context.Context, *connect.Request[v1.SaveBYOKBackendsRequest]) (*connect.Response[v1.SaveBYOKBackendsResponse], error)
	// DeleteBYOKBackends deletes BYOK provider backends configuration.
	// Used by workers to remove BYOK backend metadata from database.
	DeleteBYOKBackends(context.Context, *connect.Request[v1.DeleteBYOKBackendsRequest]) (*connect.Response[v1.DeleteBYOKBackendsResponse], error)
	// RevokeUserToken revokes a user token by JTI.
	// Used by workers in enterprise mode to revoke tokens when API keys are deleted.
	RevokeUserToken(context.Context, *connect.Request[v1.RevokeUserTokenRequest]) (*connect.Response[v1.RevokeUserTokenResponse], error)
	// Replaces metadata JSON on an existing liaison_configuration_events row.
	// Lets workers push mid-flight progress onto an event without changing
	// its status (AcknowledgeEvent/CompleteEvent are terminal-only).
	// Worker writes are scoped to the caller's workspace claim.
	UpdateEventMetadata(context.Context, *connect.Request[v1.UpdateEventMetadataRequest]) (*connect.Response[v1.UpdateEventMetadataResponse], error)
	// SubmitDataplaneUpgradeCredentials stores operator-provided registry
	// credentials for a DATAPLANE_UPGRADE event parked in NeedsCredentials.
	// Payload is KEK-envelope encrypted at MP and stored in
	// dataplane_upgrade_credentials. Dashboard (admin) is the only caller.
	SubmitDataplaneUpgradeCredentials(context.Context, *connect.Request[v1.SubmitDataplaneUpgradeCredentialsRequest]) (*connect.Response[v1.SubmitDataplaneUpgradeCredentialsResponse], error)
	// GetDataplaneUpgradeCredentials returns the operator-submitted
	// credentials for an upgrade event. MP decrypts server-side and
	// returns plaintext over TLS — the worker (DP cluster) never has
	// KEK access. Caller's workspace claim must match the event's
	// workspace. Read-only — no state change until AckDataplaneUpgradeCredentials.
	GetDataplaneUpgradeCredentials(context.Context, *connect.Request[v1.GetDataplaneUpgradeCredentialsRequest]) (*connect.Response[v1.GetDataplaneUpgradeCredentialsResponse], error)
	// AckDataplaneUpgradeCredentials confirms the worker successfully
	// materialised the credentials Secret in-cluster. MP DELETEs the
	// ciphertext row immediately — no 30-day retention. Workspace claim
	// must match. Idempotent: a second Ack on an already-deleted row
	// returns success.
	AckDataplaneUpgradeCredentials(context.Context, *connect.Request[v1.AckDataplaneUpgradeCredentialsRequest]) (*connect.Response[v1.AckDataplaneUpgradeCredentialsResponse], error)
	// CancelDataplaneUpgrade emits a pending UPGRADE_CANCEL event against
	// the workspace. The liaison worker picks it up via the normal
	// ListPendingEvents poll, matches the in-flight TarsUpgrade CR by name
	// (= upgrade_event_id), and patches spec.cancel so the running Job
	// initiates helm --atomic rollback at its next 5s poll tick. Idempotent:
	// a no-op when the CR already has spec.cancel=true or has reached a
	// terminal phase.
	CancelDataplaneUpgrade(context.Context, *connect.Request[v1.CancelDataplaneUpgradeRequest]) (*connect.Response[v1.CancelDataplaneUpgradeResponse], error)
	// RollbackDataplaneUpgrade emits a pending UPGRADE_ROLLBACK event
	// against the workspace. Operator-initiated post-Completed rollback:
	// dashboard shows a Rollback button after a successful upgrade so the
	// operator can return to the prior helm revision (e.g. they want to
	// unwind a release that's behaving badly under real traffic). Worker
	// spawns a new rollback Job that runs
	// `helm rollback tars <prev-revision> --wait --atomic`. The new event
	// becomes the latest dataplane-upgrade view so the dashboard renders
	// the in-flight rollback through phase RollingBack → RolledBack.
	RollbackDataplaneUpgrade(context.Context, *connect.Request[v1.RollbackDataplaneUpgradeRequest]) (*connect.Response[v1.RollbackDataplaneUpgradeResponse], error)
}

// NewConfiguratorServiceClient constructs a client for the tars.configurator.v1.ConfiguratorService
// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
// the connect.WithGRPC() or connect.WithGRPCWeb() options.
//
// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
// http://api.acme.com or https://acme.com/grpc).
func NewConfiguratorServiceClient(httpClient connect.HTTPClient, baseURL string, opts ...connect.ClientOption) ConfiguratorServiceClient {
	baseURL = strings.TrimRight(baseURL, "/")
	configuratorServiceMethods := v1.File_tars_configurator_v1_configurator_proto.Services().ByName("ConfiguratorService").Methods()
	return &configuratorServiceClient{
		getConfiguration: connect.NewClient[v1.GetConfigurationRequest, v1.GetConfigurationResponse](
			httpClient,
			baseURL+ConfiguratorServiceGetConfigurationProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("GetConfiguration")),
			connect.WithIdempotency(connect.IdempotencyNoSideEffects),
			connect.WithClientOptions(opts...),
		),
		triggerUpdate: connect.NewClient[v1.TriggerUpdateRequest, v1.TriggerUpdateResponse](
			httpClient,
			baseURL+ConfiguratorServiceTriggerUpdateProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("TriggerUpdate")),
			connect.WithClientOptions(opts...),
		),
		listConfigurations: connect.NewClient[v1.ListConfigurationsRequest, v1.ListConfigurationsResponse](
			httpClient,
			baseURL+ConfiguratorServiceListConfigurationsProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("ListConfigurations")),
			connect.WithIdempotency(connect.IdempotencyNoSideEffects),
			connect.WithClientOptions(opts...),
		),
		listPendingEvents: connect.NewClient[v1.ListPendingEventsRequest, v1.ListPendingEventsResponse](
			httpClient,
			baseURL+ConfiguratorServiceListPendingEventsProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("ListPendingEvents")),
			connect.WithClientOptions(opts...),
		),
		reconcileWorkspace: connect.NewClient[v1.ReconcileWorkspaceRequest, v1.ReconcileWorkspaceResponse](
			httpClient,
			baseURL+ConfiguratorServiceReconcileWorkspaceProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("ReconcileWorkspace")),
			connect.WithClientOptions(opts...),
		),
		fullSyncWorkspace: connect.NewClient[v1.FullSyncWorkspaceRequest, v1.FullSyncWorkspaceResponse](
			httpClient,
			baseURL+ConfiguratorServiceFullSyncWorkspaceProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("FullSyncWorkspace")),
			connect.WithClientOptions(opts...),
		),
		acknowledgeEvent: connect.NewClient[v1.AcknowledgeEventRequest, v1.AcknowledgeEventResponse](
			httpClient,
			baseURL+ConfiguratorServiceAcknowledgeEventProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("AcknowledgeEvent")),
			connect.WithClientOptions(opts...),
		),
		setDataplaneURL: connect.NewClient[v1.SetDataplaneURLRequest, v1.SetDataplaneURLResponse](
			httpClient,
			baseURL+ConfiguratorServiceSetDataplaneURLProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("SetDataplaneURL")),
			connect.WithClientOptions(opts...),
		),
		upsertMCPCatalogServer: connect.NewClient[v1.UpsertMCPCatalogServerRequest, v1.UpsertMCPCatalogServerResponse](
			httpClient,
			baseURL+ConfiguratorServiceUpsertMCPCatalogServerProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("UpsertMCPCatalogServer")),
			connect.WithClientOptions(opts...),
		),
		validateDataplane: connect.NewClient[v1.ValidateDataplaneRequest, v1.ValidateDataplaneResponse](
			httpClient,
			baseURL+ConfiguratorServiceValidateDataplaneProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("ValidateDataplane")),
			connect.WithIdempotency(connect.IdempotencyNoSideEffects),
			connect.WithClientOptions(opts...),
		),
		completeEvent: connect.NewClient[v1.CompleteEventRequest, v1.CompleteEventResponse](
			httpClient,
			baseURL+ConfiguratorServiceCompleteEventProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("CompleteEvent")),
			connect.WithClientOptions(opts...),
		),
		listActiveUsers: connect.NewClient[v1.ListActiveUsersRequest, v1.ListActiveUsersResponse](
			httpClient,
			baseURL+ConfiguratorServiceListActiveUsersProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("ListActiveUsers")),
			connect.WithIdempotency(connect.IdempotencyNoSideEffects),
			connect.WithClientOptions(opts...),
		),
		listActiveProviders: connect.NewClient[v1.ListActiveProvidersRequest, v1.ListActiveProvidersResponse](
			httpClient,
			baseURL+ConfiguratorServiceListActiveProvidersProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("ListActiveProviders")),
			connect.WithIdempotency(connect.IdempotencyNoSideEffects),
			connect.WithClientOptions(opts...),
		),
		saveBYOKBackends: connect.NewClient[v1.SaveBYOKBackendsRequest, v1.SaveBYOKBackendsResponse](
			httpClient,
			baseURL+ConfiguratorServiceSaveBYOKBackendsProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("SaveBYOKBackends")),
			connect.WithClientOptions(opts...),
		),
		deleteBYOKBackends: connect.NewClient[v1.DeleteBYOKBackendsRequest, v1.DeleteBYOKBackendsResponse](
			httpClient,
			baseURL+ConfiguratorServiceDeleteBYOKBackendsProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("DeleteBYOKBackends")),
			connect.WithClientOptions(opts...),
		),
		revokeUserToken: connect.NewClient[v1.RevokeUserTokenRequest, v1.RevokeUserTokenResponse](
			httpClient,
			baseURL+ConfiguratorServiceRevokeUserTokenProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("RevokeUserToken")),
			connect.WithClientOptions(opts...),
		),
		updateEventMetadata: connect.NewClient[v1.UpdateEventMetadataRequest, v1.UpdateEventMetadataResponse](
			httpClient,
			baseURL+ConfiguratorServiceUpdateEventMetadataProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("UpdateEventMetadata")),
			connect.WithClientOptions(opts...),
		),
		submitDataplaneUpgradeCredentials: connect.NewClient[v1.SubmitDataplaneUpgradeCredentialsRequest, v1.SubmitDataplaneUpgradeCredentialsResponse](
			httpClient,
			baseURL+ConfiguratorServiceSubmitDataplaneUpgradeCredentialsProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("SubmitDataplaneUpgradeCredentials")),
			connect.WithClientOptions(opts...),
		),
		getDataplaneUpgradeCredentials: connect.NewClient[v1.GetDataplaneUpgradeCredentialsRequest, v1.GetDataplaneUpgradeCredentialsResponse](
			httpClient,
			baseURL+ConfiguratorServiceGetDataplaneUpgradeCredentialsProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("GetDataplaneUpgradeCredentials")),
			connect.WithIdempotency(connect.IdempotencyNoSideEffects),
			connect.WithClientOptions(opts...),
		),
		ackDataplaneUpgradeCredentials: connect.NewClient[v1.AckDataplaneUpgradeCredentialsRequest, v1.AckDataplaneUpgradeCredentialsResponse](
			httpClient,
			baseURL+ConfiguratorServiceAckDataplaneUpgradeCredentialsProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("AckDataplaneUpgradeCredentials")),
			connect.WithClientOptions(opts...),
		),
		cancelDataplaneUpgrade: connect.NewClient[v1.CancelDataplaneUpgradeRequest, v1.CancelDataplaneUpgradeResponse](
			httpClient,
			baseURL+ConfiguratorServiceCancelDataplaneUpgradeProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("CancelDataplaneUpgrade")),
			connect.WithClientOptions(opts...),
		),
		rollbackDataplaneUpgrade: connect.NewClient[v1.RollbackDataplaneUpgradeRequest, v1.RollbackDataplaneUpgradeResponse](
			httpClient,
			baseURL+ConfiguratorServiceRollbackDataplaneUpgradeProcedure,
			connect.WithSchema(configuratorServiceMethods.ByName("RollbackDataplaneUpgrade")),
			connect.WithClientOptions(opts...),
		),
	}
}

// configuratorServiceClient implements ConfiguratorServiceClient.
type configuratorServiceClient struct {
	getConfiguration                  *connect.Client[v1.GetConfigurationRequest, v1.GetConfigurationResponse]
	triggerUpdate                     *connect.Client[v1.TriggerUpdateRequest, v1.TriggerUpdateResponse]
	listConfigurations                *connect.Client[v1.ListConfigurationsRequest, v1.ListConfigurationsResponse]
	listPendingEvents                 *connect.Client[v1.ListPendingEventsRequest, v1.ListPendingEventsResponse]
	reconcileWorkspace                *connect.Client[v1.ReconcileWorkspaceRequest, v1.ReconcileWorkspaceResponse]
	fullSyncWorkspace                 *connect.Client[v1.FullSyncWorkspaceRequest, v1.FullSyncWorkspaceResponse]
	acknowledgeEvent                  *connect.Client[v1.AcknowledgeEventRequest, v1.AcknowledgeEventResponse]
	setDataplaneURL                   *connect.Client[v1.SetDataplaneURLRequest, v1.SetDataplaneURLResponse]
	upsertMCPCatalogServer            *connect.Client[v1.UpsertMCPCatalogServerRequest, v1.UpsertMCPCatalogServerResponse]
	validateDataplane                 *connect.Client[v1.ValidateDataplaneRequest, v1.ValidateDataplaneResponse]
	completeEvent                     *connect.Client[v1.CompleteEventRequest, v1.CompleteEventResponse]
	listActiveUsers                   *connect.Client[v1.ListActiveUsersRequest, v1.ListActiveUsersResponse]
	listActiveProviders               *connect.Client[v1.ListActiveProvidersRequest, v1.ListActiveProvidersResponse]
	saveBYOKBackends                  *connect.Client[v1.SaveBYOKBackendsRequest, v1.SaveBYOKBackendsResponse]
	deleteBYOKBackends                *connect.Client[v1.DeleteBYOKBackendsRequest, v1.DeleteBYOKBackendsResponse]
	revokeUserToken                   *connect.Client[v1.RevokeUserTokenRequest, v1.RevokeUserTokenResponse]
	updateEventMetadata               *connect.Client[v1.UpdateEventMetadataRequest, v1.UpdateEventMetadataResponse]
	submitDataplaneUpgradeCredentials *connect.Client[v1.SubmitDataplaneUpgradeCredentialsRequest, v1.SubmitDataplaneUpgradeCredentialsResponse]
	getDataplaneUpgradeCredentials    *connect.Client[v1.GetDataplaneUpgradeCredentialsRequest, v1.GetDataplaneUpgradeCredentialsResponse]
	ackDataplaneUpgradeCredentials    *connect.Client[v1.AckDataplaneUpgradeCredentialsRequest, v1.AckDataplaneUpgradeCredentialsResponse]
	cancelDataplaneUpgrade            *connect.Client[v1.CancelDataplaneUpgradeRequest, v1.CancelDataplaneUpgradeResponse]
	rollbackDataplaneUpgrade          *connect.Client[v1.RollbackDataplaneUpgradeRequest, v1.RollbackDataplaneUpgradeResponse]
}

// GetConfiguration calls tars.configurator.v1.ConfiguratorService.GetConfiguration.
func (c *configuratorServiceClient) GetConfiguration(ctx context.Context, req *connect.Request[v1.GetConfigurationRequest]) (*connect.Response[v1.GetConfigurationResponse], error) {
	return c.getConfiguration.CallUnary(ctx, req)
}

// TriggerUpdate calls tars.configurator.v1.ConfiguratorService.TriggerUpdate.
func (c *configuratorServiceClient) TriggerUpdate(ctx context.Context, req *connect.Request[v1.TriggerUpdateRequest]) (*connect.Response[v1.TriggerUpdateResponse], error) {
	return c.triggerUpdate.CallUnary(ctx, req)
}

// ListConfigurations calls tars.configurator.v1.ConfiguratorService.ListConfigurations.
func (c *configuratorServiceClient) ListConfigurations(ctx context.Context, req *connect.Request[v1.ListConfigurationsRequest]) (*connect.Response[v1.ListConfigurationsResponse], error) {
	return c.listConfigurations.CallUnary(ctx, req)
}

// ListPendingEvents calls tars.configurator.v1.ConfiguratorService.ListPendingEvents.
func (c *configuratorServiceClient) ListPendingEvents(ctx context.Context, req *connect.Request[v1.ListPendingEventsRequest]) (*connect.Response[v1.ListPendingEventsResponse], error) {
	return c.listPendingEvents.CallUnary(ctx, req)
}

// ReconcileWorkspace calls tars.configurator.v1.ConfiguratorService.ReconcileWorkspace.
func (c *configuratorServiceClient) ReconcileWorkspace(ctx context.Context, req *connect.Request[v1.ReconcileWorkspaceRequest]) (*connect.Response[v1.ReconcileWorkspaceResponse], error) {
	return c.reconcileWorkspace.CallUnary(ctx, req)
}

// FullSyncWorkspace calls tars.configurator.v1.ConfiguratorService.FullSyncWorkspace.
func (c *configuratorServiceClient) FullSyncWorkspace(ctx context.Context, req *connect.Request[v1.FullSyncWorkspaceRequest]) (*connect.Response[v1.FullSyncWorkspaceResponse], error) {
	return c.fullSyncWorkspace.CallUnary(ctx, req)
}

// AcknowledgeEvent calls tars.configurator.v1.ConfiguratorService.AcknowledgeEvent.
func (c *configuratorServiceClient) AcknowledgeEvent(ctx context.Context, req *connect.Request[v1.AcknowledgeEventRequest]) (*connect.Response[v1.AcknowledgeEventResponse], error) {
	return c.acknowledgeEvent.CallUnary(ctx, req)
}

// SetDataplaneURL calls tars.configurator.v1.ConfiguratorService.SetDataplaneURL.
func (c *configuratorServiceClient) SetDataplaneURL(ctx context.Context, req *connect.Request[v1.SetDataplaneURLRequest]) (*connect.Response[v1.SetDataplaneURLResponse], error) {
	return c.setDataplaneURL.CallUnary(ctx, req)
}

// UpsertMCPCatalogServer calls tars.configurator.v1.ConfiguratorService.UpsertMCPCatalogServer.
func (c *configuratorServiceClient) UpsertMCPCatalogServer(ctx context.Context, req *connect.Request[v1.UpsertMCPCatalogServerRequest]) (*connect.Response[v1.UpsertMCPCatalogServerResponse], error) {
	return c.upsertMCPCatalogServer.CallUnary(ctx, req)
}

// ValidateDataplane calls tars.configurator.v1.ConfiguratorService.ValidateDataplane.
func (c *configuratorServiceClient) ValidateDataplane(ctx context.Context, req *connect.Request[v1.ValidateDataplaneRequest]) (*connect.Response[v1.ValidateDataplaneResponse], error) {
	return c.validateDataplane.CallUnary(ctx, req)
}

// CompleteEvent calls tars.configurator.v1.ConfiguratorService.CompleteEvent.
func (c *configuratorServiceClient) CompleteEvent(ctx context.Context, req *connect.Request[v1.CompleteEventRequest]) (*connect.Response[v1.CompleteEventResponse], error) {
	return c.completeEvent.CallUnary(ctx, req)
}

// ListActiveUsers calls tars.configurator.v1.ConfiguratorService.ListActiveUsers.
func (c *configuratorServiceClient) ListActiveUsers(ctx context.Context, req *connect.Request[v1.ListActiveUsersRequest]) (*connect.Response[v1.ListActiveUsersResponse], error) {
	return c.listActiveUsers.CallUnary(ctx, req)
}

// ListActiveProviders calls tars.configurator.v1.ConfiguratorService.ListActiveProviders.
func (c *configuratorServiceClient) ListActiveProviders(ctx context.Context, req *connect.Request[v1.ListActiveProvidersRequest]) (*connect.Response[v1.ListActiveProvidersResponse], error) {
	return c.listActiveProviders.CallUnary(ctx, req)
}

// SaveBYOKBackends calls tars.configurator.v1.ConfiguratorService.SaveBYOKBackends.
func (c *configuratorServiceClient) SaveBYOKBackends(ctx context.Context, req *connect.Request[v1.SaveBYOKBackendsRequest]) (*connect.Response[v1.SaveBYOKBackendsResponse], error) {
	return c.saveBYOKBackends.CallUnary(ctx, req)
}

// DeleteBYOKBackends calls tars.configurator.v1.ConfiguratorService.DeleteBYOKBackends.
func (c *configuratorServiceClient) DeleteBYOKBackends(ctx context.Context, req *connect.Request[v1.DeleteBYOKBackendsRequest]) (*connect.Response[v1.DeleteBYOKBackendsResponse], error) {
	return c.deleteBYOKBackends.CallUnary(ctx, req)
}

// RevokeUserToken calls tars.configurator.v1.ConfiguratorService.RevokeUserToken.
func (c *configuratorServiceClient) RevokeUserToken(ctx context.Context, req *connect.Request[v1.RevokeUserTokenRequest]) (*connect.Response[v1.RevokeUserTokenResponse], error) {
	return c.revokeUserToken.CallUnary(ctx, req)
}

// UpdateEventMetadata calls tars.configurator.v1.ConfiguratorService.UpdateEventMetadata.
func (c *configuratorServiceClient) UpdateEventMetadata(ctx context.Context, req *connect.Request[v1.UpdateEventMetadataRequest]) (*connect.Response[v1.UpdateEventMetadataResponse], error) {
	return c.updateEventMetadata.CallUnary(ctx, req)
}

// SubmitDataplaneUpgradeCredentials calls
// tars.configurator.v1.ConfiguratorService.SubmitDataplaneUpgradeCredentials.
func (c *configuratorServiceClient) SubmitDataplaneUpgradeCredentials(ctx context.Context, req *connect.Request[v1.SubmitDataplaneUpgradeCredentialsRequest]) (*connect.Response[v1.SubmitDataplaneUpgradeCredentialsResponse], error) {
	return c.submitDataplaneUpgradeCredentials.CallUnary(ctx, req)
}

// GetDataplaneUpgradeCredentials calls
// tars.configurator.v1.ConfiguratorService.GetDataplaneUpgradeCredentials.
func (c *configuratorServiceClient) GetDataplaneUpgradeCredentials(ctx context.Context, req *connect.Request[v1.GetDataplaneUpgradeCredentialsRequest]) (*connect.Response[v1.GetDataplaneUpgradeCredentialsResponse], error) {
	return c.getDataplaneUpgradeCredentials.CallUnary(ctx, req)
}

// AckDataplaneUpgradeCredentials calls
// tars.configurator.v1.ConfiguratorService.AckDataplaneUpgradeCredentials.
func (c *configuratorServiceClient) AckDataplaneUpgradeCredentials(ctx context.Context, req *connect.Request[v1.AckDataplaneUpgradeCredentialsRequest]) (*connect.Response[v1.AckDataplaneUpgradeCredentialsResponse], error) {
	return c.ackDataplaneUpgradeCredentials.CallUnary(ctx, req)
}

// CancelDataplaneUpgrade calls tars.configurator.v1.ConfiguratorService.CancelDataplaneUpgrade.
func (c *configuratorServiceClient) CancelDataplaneUpgrade(ctx context.Context, req *connect.Request[v1.CancelDataplaneUpgradeRequest]) (*connect.Response[v1.CancelDataplaneUpgradeResponse], error) {
	return c.cancelDataplaneUpgrade.CallUnary(ctx, req)
}

// RollbackDataplaneUpgrade calls tars.configurator.v1.ConfiguratorService.RollbackDataplaneUpgrade.
func (c *configuratorServiceClient) RollbackDataplaneUpgrade(ctx context.Context, req *connect.Request[v1.RollbackDataplaneUpgradeRequest]) (*connect.Response[v1.RollbackDataplaneUpgradeResponse], error) {
	return c.rollbackDataplaneUpgrade.CallUnary(ctx, req)
}

// ConfiguratorServiceHandler is an implementation of the tars.configurator.v1.ConfiguratorService
// service.
type ConfiguratorServiceHandler interface {
	// GetConfiguration retrieves the latest configuration for a user.
	// Returns configuration only if the version is newer than the provided
	// version. Supports batch queries for multiple users for efficiency.
	GetConfiguration(context.Context, *connect.Request[v1.GetConfigurationRequest]) (*connect.Response[v1.GetConfigurationResponse], error)
	// TriggerUpdate triggers a configuration update for a specific user and
	// config type. This is called by the dashboard when configuration changes.
	TriggerUpdate(context.Context, *connect.Request[v1.TriggerUpdateRequest]) (*connect.Response[v1.TriggerUpdateResponse], error)
	// ListConfigurations lists all configurations with optional filtering.
	// Used for debugging and monitoring.
	ListConfigurations(context.Context, *connect.Request[v1.ListConfigurationsRequest]) (*connect.Response[v1.ListConfigurationsResponse], error)
	// ListPendingEvents returns configuration events that need processing.
	// Used by workers to discover which configurations have updates. The worker
	// piggybacks its tare-doctor runtime observation onto this poll
	// (request.doctor_runtime) so MP can explain a stale doctor report — hence
	// this is no longer NO_SIDE_EFFECTS: a poll updates the data plane's
	// doctor-runtime state.
	ListPendingEvents(context.Context, *connect.Request[v1.ListPendingEventsRequest]) (*connect.Response[v1.ListPendingEventsResponse], error)
	// ReconcileWorkspace re-enqueues missing or stale slot events for
	// the caller's workspace by cloning the latest sibling event of each
	// slot the workspace has not yet converged on. Used by the worker's
	// periodic drift sweep. Workspace is resolved from the caller's auth
	// claims; callers without a workspace claim are rejected.
	ReconcileWorkspace(context.Context, *connect.Request[v1.ReconcileWorkspaceRequest]) (*connect.Response[v1.ReconcileWorkspaceResponse], error)
	// FullSyncWorkspace is the heavier "last resort" replay path: walks
	// `liaison_configurations` directly rather than sibling events, so it
	// can recover legacy unscoped events the drift sweep can't see. Worker
	// calls this once on startup and every Nth drift sweep tick. Workspace
	// and customer are resolved from the caller's auth claims.
	FullSyncWorkspace(context.Context, *connect.Request[v1.FullSyncWorkspaceRequest]) (*connect.Response[v1.FullSyncWorkspaceResponse], error)
	// AcknowledgeEvent marks an event as acknowledged by a worker.
	// This prevents other workers from processing the same event.
	AcknowledgeEvent(context.Context, *connect.Request[v1.AcknowledgeEventRequest]) (*connect.Response[v1.AcknowledgeEventResponse], error)
	// SetDataplaneURL persists the customer-facing gateway URL for a data plane
	// (workspace). Called by `tare install` to register the URL at install time
	// and by the management-plane dashboard when an admin edits it later.
	//
	// trigger_update=false (install path) only writes the system_settings row.
	// trigger_update=true (admin-edit path) additionally fires a PROXY_URL
	// configuration event so the running data plane converges on the new URL
	// via the worker's existing event-handling loop.
	SetDataplaneURL(context.Context, *connect.Request[v1.SetDataplaneURLRequest]) (*connect.Response[v1.SetDataplaneURLResponse], error)
	// UpsertMCPCatalogServer wires a deployed in-cluster MCP server into the
	// customer's catalog. Used by `tare mcp enable <server>`: the CLI looks
	// up the server's seed entry in mcp-catalog-tare-mcp-with-tools.json, asks
	// the operator for the in-cluster URL, and submits this RPC to set
	// is_enabled=true on the corresponding mcp_catalog_servers row.
	//
	// Default behaviour (force_overwrite=false): if the row exists, only
	// url + is_enabled (+updated_at) are updated; dashboard-set fields
	// (description / icon / categories / tools / etc.) are preserved.
	// If the row is new, the seed-provided fields are used to populate it.
	//
	// force_overwrite=true: every seed field is written, clobbering any
	// dashboard edits. Use sparingly — intended for "reset this row to
	// seed defaults" repairs.
	UpsertMCPCatalogServer(context.Context, *connect.Request[v1.UpsertMCPCatalogServerRequest]) (*connect.Response[v1.UpsertMCPCatalogServerResponse], error)
	// ValidateDataplane lets a data plane's filter confirm that this DP is
	// still a valid (non-revoked) member of the customer and fetch the
	// customer's current gatekeeper public keys. Authentication is via the
	// caller's service-account JWT signed with its DP keypair
	// (kid=`instance-<...>`). When the DP keypair has been soft-deleted at
	// MP, the auth layer rejects the call with Unauthenticated — the filter
	// treats that as "revoked" without needing a separate response field.
	// On success, the response carries the customer's gatekeeper public
	// keys so the filter can repopulate its in-memory cache (and the
	// worker can repopulate `tars-config[gatekeeper-public-keys]`).
	ValidateDataplane(context.Context, *connect.Request[v1.ValidateDataplaneRequest]) (*connect.Response[v1.ValidateDataplaneResponse], error)
	// CompleteEvent marks an event as successfully applied or failed.
	CompleteEvent(context.Context, *connect.Request[v1.CompleteEventRequest]) (*connect.Response[v1.CompleteEventResponse], error)
	// ListActiveUsers returns a list of user IDs that have active configurations.
	// Used for monitoring and debugging.
	ListActiveUsers(context.Context, *connect.Request[v1.ListActiveUsersRequest]) (*connect.Response[v1.ListActiveUsersResponse], error)
	// ListActiveProviders returns a list of active (enabled) AI providers.
	// Used for monitoring, debugging, and querying available provider configurations.
	ListActiveProviders(context.Context, *connect.Request[v1.ListActiveProvidersRequest]) (*connect.Response[v1.ListActiveProvidersResponse], error)
	// SaveBYOKBackends saves BYOK provider backends configuration.
	// Used by workers to persist BYOK backend metadata to database.
	SaveBYOKBackends(context.Context, *connect.Request[v1.SaveBYOKBackendsRequest]) (*connect.Response[v1.SaveBYOKBackendsResponse], error)
	// DeleteBYOKBackends deletes BYOK provider backends configuration.
	// Used by workers to remove BYOK backend metadata from database.
	DeleteBYOKBackends(context.Context, *connect.Request[v1.DeleteBYOKBackendsRequest]) (*connect.Response[v1.DeleteBYOKBackendsResponse], error)
	// RevokeUserToken revokes a user token by JTI.
	// Used by workers in enterprise mode to revoke tokens when API keys are deleted.
	RevokeUserToken(context.Context, *connect.Request[v1.RevokeUserTokenRequest]) (*connect.Response[v1.RevokeUserTokenResponse], error)
	// Replaces metadata JSON on an existing liaison_configuration_events row.
	// Lets workers push mid-flight progress onto an event without changing
	// its status (AcknowledgeEvent/CompleteEvent are terminal-only).
	// Worker writes are scoped to the caller's workspace claim.
	UpdateEventMetadata(context.Context, *connect.Request[v1.UpdateEventMetadataRequest]) (*connect.Response[v1.UpdateEventMetadataResponse], error)
	// SubmitDataplaneUpgradeCredentials stores operator-provided registry
	// credentials for a DATAPLANE_UPGRADE event parked in NeedsCredentials.
	// Payload is KEK-envelope encrypted at MP and stored in
	// dataplane_upgrade_credentials. Dashboard (admin) is the only caller.
	SubmitDataplaneUpgradeCredentials(context.Context, *connect.Request[v1.SubmitDataplaneUpgradeCredentialsRequest]) (*connect.Response[v1.SubmitDataplaneUpgradeCredentialsResponse], error)
	// GetDataplaneUpgradeCredentials returns the operator-submitted
	// credentials for an upgrade event. MP decrypts server-side and
	// returns plaintext over TLS — the worker (DP cluster) never has
	// KEK access. Caller's workspace claim must match the event's
	// workspace. Read-only — no state change until AckDataplaneUpgradeCredentials.
	GetDataplaneUpgradeCredentials(context.Context, *connect.Request[v1.GetDataplaneUpgradeCredentialsRequest]) (*connect.Response[v1.GetDataplaneUpgradeCredentialsResponse], error)
	// AckDataplaneUpgradeCredentials confirms the worker successfully
	// materialised the credentials Secret in-cluster. MP DELETEs the
	// ciphertext row immediately — no 30-day retention. Workspace claim
	// must match. Idempotent: a second Ack on an already-deleted row
	// returns success.
	AckDataplaneUpgradeCredentials(context.Context, *connect.Request[v1.AckDataplaneUpgradeCredentialsRequest]) (*connect.Response[v1.AckDataplaneUpgradeCredentialsResponse], error)
	// CancelDataplaneUpgrade emits a pending UPGRADE_CANCEL event against
	// the workspace. The liaison worker picks it up via the normal
	// ListPendingEvents poll, matches the in-flight TarsUpgrade CR by name
	// (= upgrade_event_id), and patches spec.cancel so the running Job
	// initiates helm --atomic rollback at its next 5s poll tick. Idempotent:
	// a no-op when the CR already has spec.cancel=true or has reached a
	// terminal phase.
	CancelDataplaneUpgrade(context.Context, *connect.Request[v1.CancelDataplaneUpgradeRequest]) (*connect.Response[v1.CancelDataplaneUpgradeResponse], error)
	// RollbackDataplaneUpgrade emits a pending UPGRADE_ROLLBACK event
	// against the workspace. Operator-initiated post-Completed rollback:
	// dashboard shows a Rollback button after a successful upgrade so the
	// operator can return to the prior helm revision (e.g. they want to
	// unwind a release that's behaving badly under real traffic). Worker
	// spawns a new rollback Job that runs
	// `helm rollback tars <prev-revision> --wait --atomic`. The new event
	// becomes the latest dataplane-upgrade view so the dashboard renders
	// the in-flight rollback through phase RollingBack → RolledBack.
	RollbackDataplaneUpgrade(context.Context, *connect.Request[v1.RollbackDataplaneUpgradeRequest]) (*connect.Response[v1.RollbackDataplaneUpgradeResponse], error)
}

// NewConfiguratorServiceHandler builds an HTTP handler from the service implementation. It returns
// the path on which to mount the handler and the handler itself.
//
// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
// and JSON codecs. They also support gzip compression.
func NewConfiguratorServiceHandler(svc ConfiguratorServiceHandler, opts ...connect.HandlerOption) (string, http.Handler) {
	configuratorServiceMethods := v1.File_tars_configurator_v1_configurator_proto.Services().ByName("ConfiguratorService").Methods()
	configuratorServiceGetConfigurationHandler := connect.NewUnaryHandler(
		ConfiguratorServiceGetConfigurationProcedure,
		svc.GetConfiguration,
		connect.WithSchema(configuratorServiceMethods.ByName("GetConfiguration")),
		connect.WithIdempotency(connect.IdempotencyNoSideEffects),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceTriggerUpdateHandler := connect.NewUnaryHandler(
		ConfiguratorServiceTriggerUpdateProcedure,
		svc.TriggerUpdate,
		connect.WithSchema(configuratorServiceMethods.ByName("TriggerUpdate")),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceListConfigurationsHandler := connect.NewUnaryHandler(
		ConfiguratorServiceListConfigurationsProcedure,
		svc.ListConfigurations,
		connect.WithSchema(configuratorServiceMethods.ByName("ListConfigurations")),
		connect.WithIdempotency(connect.IdempotencyNoSideEffects),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceListPendingEventsHandler := connect.NewUnaryHandler(
		ConfiguratorServiceListPendingEventsProcedure,
		svc.ListPendingEvents,
		connect.WithSchema(configuratorServiceMethods.ByName("ListPendingEvents")),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceReconcileWorkspaceHandler := connect.NewUnaryHandler(
		ConfiguratorServiceReconcileWorkspaceProcedure,
		svc.ReconcileWorkspace,
		connect.WithSchema(configuratorServiceMethods.ByName("ReconcileWorkspace")),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceFullSyncWorkspaceHandler := connect.NewUnaryHandler(
		ConfiguratorServiceFullSyncWorkspaceProcedure,
		svc.FullSyncWorkspace,
		connect.WithSchema(configuratorServiceMethods.ByName("FullSyncWorkspace")),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceAcknowledgeEventHandler := connect.NewUnaryHandler(
		ConfiguratorServiceAcknowledgeEventProcedure,
		svc.AcknowledgeEvent,
		connect.WithSchema(configuratorServiceMethods.ByName("AcknowledgeEvent")),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceSetDataplaneURLHandler := connect.NewUnaryHandler(
		ConfiguratorServiceSetDataplaneURLProcedure,
		svc.SetDataplaneURL,
		connect.WithSchema(configuratorServiceMethods.ByName("SetDataplaneURL")),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceUpsertMCPCatalogServerHandler := connect.NewUnaryHandler(
		ConfiguratorServiceUpsertMCPCatalogServerProcedure,
		svc.UpsertMCPCatalogServer,
		connect.WithSchema(configuratorServiceMethods.ByName("UpsertMCPCatalogServer")),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceValidateDataplaneHandler := connect.NewUnaryHandler(
		ConfiguratorServiceValidateDataplaneProcedure,
		svc.ValidateDataplane,
		connect.WithSchema(configuratorServiceMethods.ByName("ValidateDataplane")),
		connect.WithIdempotency(connect.IdempotencyNoSideEffects),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceCompleteEventHandler := connect.NewUnaryHandler(
		ConfiguratorServiceCompleteEventProcedure,
		svc.CompleteEvent,
		connect.WithSchema(configuratorServiceMethods.ByName("CompleteEvent")),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceListActiveUsersHandler := connect.NewUnaryHandler(
		ConfiguratorServiceListActiveUsersProcedure,
		svc.ListActiveUsers,
		connect.WithSchema(configuratorServiceMethods.ByName("ListActiveUsers")),
		connect.WithIdempotency(connect.IdempotencyNoSideEffects),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceListActiveProvidersHandler := connect.NewUnaryHandler(
		ConfiguratorServiceListActiveProvidersProcedure,
		svc.ListActiveProviders,
		connect.WithSchema(configuratorServiceMethods.ByName("ListActiveProviders")),
		connect.WithIdempotency(connect.IdempotencyNoSideEffects),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceSaveBYOKBackendsHandler := connect.NewUnaryHandler(
		ConfiguratorServiceSaveBYOKBackendsProcedure,
		svc.SaveBYOKBackends,
		connect.WithSchema(configuratorServiceMethods.ByName("SaveBYOKBackends")),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceDeleteBYOKBackendsHandler := connect.NewUnaryHandler(
		ConfiguratorServiceDeleteBYOKBackendsProcedure,
		svc.DeleteBYOKBackends,
		connect.WithSchema(configuratorServiceMethods.ByName("DeleteBYOKBackends")),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceRevokeUserTokenHandler := connect.NewUnaryHandler(
		ConfiguratorServiceRevokeUserTokenProcedure,
		svc.RevokeUserToken,
		connect.WithSchema(configuratorServiceMethods.ByName("RevokeUserToken")),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceUpdateEventMetadataHandler := connect.NewUnaryHandler(
		ConfiguratorServiceUpdateEventMetadataProcedure,
		svc.UpdateEventMetadata,
		connect.WithSchema(configuratorServiceMethods.ByName("UpdateEventMetadata")),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceSubmitDataplaneUpgradeCredentialsHandler := connect.NewUnaryHandler(
		ConfiguratorServiceSubmitDataplaneUpgradeCredentialsProcedure,
		svc.SubmitDataplaneUpgradeCredentials,
		connect.WithSchema(configuratorServiceMethods.ByName("SubmitDataplaneUpgradeCredentials")),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceGetDataplaneUpgradeCredentialsHandler := connect.NewUnaryHandler(
		ConfiguratorServiceGetDataplaneUpgradeCredentialsProcedure,
		svc.GetDataplaneUpgradeCredentials,
		connect.WithSchema(configuratorServiceMethods.ByName("GetDataplaneUpgradeCredentials")),
		connect.WithIdempotency(connect.IdempotencyNoSideEffects),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceAckDataplaneUpgradeCredentialsHandler := connect.NewUnaryHandler(
		ConfiguratorServiceAckDataplaneUpgradeCredentialsProcedure,
		svc.AckDataplaneUpgradeCredentials,
		connect.WithSchema(configuratorServiceMethods.ByName("AckDataplaneUpgradeCredentials")),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceCancelDataplaneUpgradeHandler := connect.NewUnaryHandler(
		ConfiguratorServiceCancelDataplaneUpgradeProcedure,
		svc.CancelDataplaneUpgrade,
		connect.WithSchema(configuratorServiceMethods.ByName("CancelDataplaneUpgrade")),
		connect.WithHandlerOptions(opts...),
	)
	configuratorServiceRollbackDataplaneUpgradeHandler := connect.NewUnaryHandler(
		ConfiguratorServiceRollbackDataplaneUpgradeProcedure,
		svc.RollbackDataplaneUpgrade,
		connect.WithSchema(configuratorServiceMethods.ByName("RollbackDataplaneUpgrade")),
		connect.WithHandlerOptions(opts...),
	)
	return "/tars.configurator.v1.ConfiguratorService/", http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
		switch r.URL.Path {
		case ConfiguratorServiceGetConfigurationProcedure:
			configuratorServiceGetConfigurationHandler.ServeHTTP(w, r)
		case ConfiguratorServiceTriggerUpdateProcedure:
			configuratorServiceTriggerUpdateHandler.ServeHTTP(w, r)
		case ConfiguratorServiceListConfigurationsProcedure:
			configuratorServiceListConfigurationsHandler.ServeHTTP(w, r)
		case ConfiguratorServiceListPendingEventsProcedure:
			configuratorServiceListPendingEventsHandler.ServeHTTP(w, r)
		case ConfiguratorServiceReconcileWorkspaceProcedure:
			configuratorServiceReconcileWorkspaceHandler.ServeHTTP(w, r)
		case ConfiguratorServiceFullSyncWorkspaceProcedure:
			configuratorServiceFullSyncWorkspaceHandler.ServeHTTP(w, r)
		case ConfiguratorServiceAcknowledgeEventProcedure:
			configuratorServiceAcknowledgeEventHandler.ServeHTTP(w, r)
		case ConfiguratorServiceSetDataplaneURLProcedure:
			configuratorServiceSetDataplaneURLHandler.ServeHTTP(w, r)
		case ConfiguratorServiceUpsertMCPCatalogServerProcedure:
			configuratorServiceUpsertMCPCatalogServerHandler.ServeHTTP(w, r)
		case ConfiguratorServiceValidateDataplaneProcedure:
			configuratorServiceValidateDataplaneHandler.ServeHTTP(w, r)
		case ConfiguratorServiceCompleteEventProcedure:
			configuratorServiceCompleteEventHandler.ServeHTTP(w, r)
		case ConfiguratorServiceListActiveUsersProcedure:
			configuratorServiceListActiveUsersHandler.ServeHTTP(w, r)
		case ConfiguratorServiceListActiveProvidersProcedure:
			configuratorServiceListActiveProvidersHandler.ServeHTTP(w, r)
		case ConfiguratorServiceSaveBYOKBackendsProcedure:
			configuratorServiceSaveBYOKBackendsHandler.ServeHTTP(w, r)
		case ConfiguratorServiceDeleteBYOKBackendsProcedure:
			configuratorServiceDeleteBYOKBackendsHandler.ServeHTTP(w, r)
		case ConfiguratorServiceRevokeUserTokenProcedure:
			configuratorServiceRevokeUserTokenHandler.ServeHTTP(w, r)
		case ConfiguratorServiceUpdateEventMetadataProcedure:
			configuratorServiceUpdateEventMetadataHandler.ServeHTTP(w, r)
		case ConfiguratorServiceSubmitDataplaneUpgradeCredentialsProcedure:
			configuratorServiceSubmitDataplaneUpgradeCredentialsHandler.ServeHTTP(w, r)
		case ConfiguratorServiceGetDataplaneUpgradeCredentialsProcedure:
			configuratorServiceGetDataplaneUpgradeCredentialsHandler.ServeHTTP(w, r)
		case ConfiguratorServiceAckDataplaneUpgradeCredentialsProcedure:
			configuratorServiceAckDataplaneUpgradeCredentialsHandler.ServeHTTP(w, r)
		case ConfiguratorServiceCancelDataplaneUpgradeProcedure:
			configuratorServiceCancelDataplaneUpgradeHandler.ServeHTTP(w, r)
		case ConfiguratorServiceRollbackDataplaneUpgradeProcedure:
			configuratorServiceRollbackDataplaneUpgradeHandler.ServeHTTP(w, r)
		default:
			http.NotFound(w, r)
		}
	})
}

// UnimplementedConfiguratorServiceHandler returns CodeUnimplemented from all methods.
type UnimplementedConfiguratorServiceHandler struct{}

func (UnimplementedConfiguratorServiceHandler) GetConfiguration(context.Context, *connect.Request[v1.GetConfigurationRequest]) (*connect.Response[v1.GetConfigurationResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.GetConfiguration is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) TriggerUpdate(context.Context, *connect.Request[v1.TriggerUpdateRequest]) (*connect.Response[v1.TriggerUpdateResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.TriggerUpdate is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) ListConfigurations(context.Context, *connect.Request[v1.ListConfigurationsRequest]) (*connect.Response[v1.ListConfigurationsResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.ListConfigurations is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) ListPendingEvents(context.Context, *connect.Request[v1.ListPendingEventsRequest]) (*connect.Response[v1.ListPendingEventsResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.ListPendingEvents is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) ReconcileWorkspace(context.Context, *connect.Request[v1.ReconcileWorkspaceRequest]) (*connect.Response[v1.ReconcileWorkspaceResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.ReconcileWorkspace is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) FullSyncWorkspace(context.Context, *connect.Request[v1.FullSyncWorkspaceRequest]) (*connect.Response[v1.FullSyncWorkspaceResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.FullSyncWorkspace is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) AcknowledgeEvent(context.Context, *connect.Request[v1.AcknowledgeEventRequest]) (*connect.Response[v1.AcknowledgeEventResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.AcknowledgeEvent is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) SetDataplaneURL(context.Context, *connect.Request[v1.SetDataplaneURLRequest]) (*connect.Response[v1.SetDataplaneURLResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.SetDataplaneURL is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) UpsertMCPCatalogServer(context.Context, *connect.Request[v1.UpsertMCPCatalogServerRequest]) (*connect.Response[v1.UpsertMCPCatalogServerResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.UpsertMCPCatalogServer is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) ValidateDataplane(context.Context, *connect.Request[v1.ValidateDataplaneRequest]) (*connect.Response[v1.ValidateDataplaneResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.ValidateDataplane is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) CompleteEvent(context.Context, *connect.Request[v1.CompleteEventRequest]) (*connect.Response[v1.CompleteEventResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.CompleteEvent is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) ListActiveUsers(context.Context, *connect.Request[v1.ListActiveUsersRequest]) (*connect.Response[v1.ListActiveUsersResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.ListActiveUsers is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) ListActiveProviders(context.Context, *connect.Request[v1.ListActiveProvidersRequest]) (*connect.Response[v1.ListActiveProvidersResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.ListActiveProviders is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) SaveBYOKBackends(context.Context, *connect.Request[v1.SaveBYOKBackendsRequest]) (*connect.Response[v1.SaveBYOKBackendsResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.SaveBYOKBackends is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) DeleteBYOKBackends(context.Context, *connect.Request[v1.DeleteBYOKBackendsRequest]) (*connect.Response[v1.DeleteBYOKBackendsResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.DeleteBYOKBackends is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) RevokeUserToken(context.Context, *connect.Request[v1.RevokeUserTokenRequest]) (*connect.Response[v1.RevokeUserTokenResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.RevokeUserToken is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) UpdateEventMetadata(context.Context, *connect.Request[v1.UpdateEventMetadataRequest]) (*connect.Response[v1.UpdateEventMetadataResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.UpdateEventMetadata is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) SubmitDataplaneUpgradeCredentials(context.Context, *connect.Request[v1.SubmitDataplaneUpgradeCredentialsRequest]) (*connect.Response[v1.SubmitDataplaneUpgradeCredentialsResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.SubmitDataplaneUpgradeCredentials is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) GetDataplaneUpgradeCredentials(context.Context, *connect.Request[v1.GetDataplaneUpgradeCredentialsRequest]) (*connect.Response[v1.GetDataplaneUpgradeCredentialsResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.GetDataplaneUpgradeCredentials is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) AckDataplaneUpgradeCredentials(context.Context, *connect.Request[v1.AckDataplaneUpgradeCredentialsRequest]) (*connect.Response[v1.AckDataplaneUpgradeCredentialsResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.AckDataplaneUpgradeCredentials is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) CancelDataplaneUpgrade(context.Context, *connect.Request[v1.CancelDataplaneUpgradeRequest]) (*connect.Response[v1.CancelDataplaneUpgradeResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.CancelDataplaneUpgrade is not implemented"))
}

func (UnimplementedConfiguratorServiceHandler) RollbackDataplaneUpgrade(context.Context, *connect.Request[v1.RollbackDataplaneUpgradeRequest]) (*connect.Response[v1.RollbackDataplaneUpgradeResponse], error) {
	return nil, connect.NewError(connect.CodeUnimplemented, errors.New("tars.configurator.v1.ConfiguratorService.RollbackDataplaneUpgrade is not implemented"))
}
