Skip to content

Latest commit

 

History

History
1862 lines (883 loc) · 67 KB

File metadata and controls

1862 lines (883 loc) · 67 KB

Protocol Documentation

Table of Contents

Top

centralconfig/v1/types.proto

AuditEntry

AuditEntry represents a write event recorded in the audit log. Every config mutation (SetField, SetFields, RollbackToVersion) creates one or more audit entries atomically with the config change.

Field Type Label Description
id string Server-assigned unique identifier (UUID).
tenant_id string The tenant affected (UUID).
actor string The actor who performed the action (from JWT subject).
action string The action type (e.g. "set_field", "rollback").
field_path string optional The field that was changed. Present for set_field actions.
old_value string optional The previous value. Present for set_field actions.
new_value string optional The new value. Present for set_field actions. For rollback actions, contains the target version (e.g. "v2").
config_version int32 optional The config version number created by this action.
created_at google.protobuf.Timestamp When the audit entry was created.
object_kind string The kind of object affected ("field", "schema", "tenant", or "lock").
entry_hash string SHA-256 hash of this entry's immutable fields, chained to previous_hash.
previous_hash string entry_hash of the previous entry in this tenant's chain ("" for the first).

Config

Config represents the full resolved configuration for a tenant at a specific version.

Field Type Label Description
tenant_id string The tenant this config belongs to (UUID).
version int32 The version number this config was resolved at.
values ConfigValue repeated All configuration values at this version.

ConfigChange

ConfigChange represents a real-time change event pushed to subscribers via the Subscribe streaming RPC.

Field Type Label Description
tenant_id string The tenant whose config changed (UUID).
version int32 The new config version number created by this change.
field_path string The field that was changed.
old_value TypedValue The previous value. Absent if field was newly created or was null.
new_value TypedValue The new value. Absent if field was set to null.
changed_by string The actor who made the change.
changed_at google.protobuf.Timestamp When the change occurred.

ConfigValue

ConfigValue represents a single configuration value at a point in time.

Field Type Label Description
field_path string Dot-separated field path (e.g. "payments.fee").
value TypedValue The typed value. Absent when the field value is null.
checksum string Checksum of the value (xxHash). Used for optimistic concurrency control in SetField/SetFields via expected_checksum.
description string optional Human-readable description explaining this specific value. Only populated when include_description(s) is true in the request.

ConfigVersion

ConfigVersion represents a point-in-time snapshot of configuration changes. Each write operation (SetField, SetFields, RollbackToVersion) creates a new config version. Versions store only the changed fields (delta storage) — the full config at any version is the union of all deltas up to that version.

Field Type Label Description
id string Server-assigned unique identifier (UUID).
tenant_id string The tenant this version belongs to (UUID).
version int32 Version number (monotonically increasing, starting at 1).
description string Description of what changed in this version.
created_by string The actor who created this version (from JWT subject, or "unknown" if auth is disabled).
created_at google.protobuf.Timestamp When this version was created.

DependentRequiredEntry

DependentRequiredEntry encodes one cross-field requirement: when the trigger field has a non-null value, every dependent field path must also have a non-null value. This is the proto wire form of JSON Schema 2020-12 dependentRequired, which uses a map<path, list<path>> shape — proto maps cannot hold repeated values directly, so we use a repeated list of entries.

Field Type Label Description
trigger_field string Field path whose presence triggers the requirement.
dependent_fields string repeated Field paths that must be present when the trigger has a non-null value.

ExternalDocs

ExternalDocs links to external documentation. OAS: External Documentation Object

Field Type Label Description
description string Human-readable description of the external documentation.
url string URL to the external documentation.

FieldConstraints

FieldConstraints defines validation rules for a schema field. Which constraints apply depends on the field's type — see FieldType docs.

Field Type Label Description
min double optional For integer/number/duration: minimum allowed value (inclusive, >=).
max double optional For integer/number/duration: maximum allowed value (inclusive, <=).
regex string optional Regular expression pattern the value must match. Applies to string-typed fields. Uses RE2 syntax.
enum_values string repeated Allowed values. If non-empty, the value must be one of these. Applies to any field type.
json_schema string optional JSON Schema document for structural validation of json-typed fields. Encoded as a JSON string.
exclusive_min double optional For integer/number/duration: exclusive minimum (strict, >).
exclusive_max double optional For integer/number/duration: exclusive maximum (strict, <).
min_length int32 optional For string: minimum allowed length.
max_length int32 optional For string: maximum allowed length.

FieldExample

FieldExample represents a named example value for a schema field.

Field Type Label Description
value string The example value, encoded as a string matching the field type.
summary string Short description of what this example demonstrates.

FieldLock

FieldLock prevents a configuration field from being modified by non-superadmin users. Superadmins bypass all field locks.

Field Type Label Description
tenant_id string The tenant this lock applies to (UUID).
field_path string The dot-separated field path that is locked.
locked_values string repeated For enum fields: the specific subset of values that are locked (not editable by admin). If empty, the entire field is locked.

Schema

Schema represents a configuration schema template. Schemas define the allowed fields and their types for tenant configurations. Each schema is versioned — updates create new immutable versions.

Field Type Label Description
id string Server-assigned unique identifier (UUID).
name string Machine identifier for this schema, used in API calls, URLs, and code. Must be a unique slug: lowercase alphanumeric and hyphens, 1-63 characters, matching a-z0-9?. See info.title for a display name.
description string Human-readable description of the schema's purpose.
version int32 Schema version number (monotonically increasing, starting at 1).
parent_version int32 optional The version this was derived from. Absent for the initial version (v1).
version_description string Description of what changed in this version.
checksum string Deterministic checksum of the field definitions (type, constraints, path). Used for change detection on import.
published bool Whether this version is published. Only published versions can be assigned to tenants. Published versions are immutable.
fields SchemaField repeated The fields defined in this schema version.
created_at google.protobuf.Timestamp When this version was created.
info SchemaInfo Optional schema metadata: ownership, contact, labels.
dependent_required DependentRequiredEntry repeated Cross-field "B required when A present" rules. Each entry declares one trigger field whose presence (non-null value) makes a list of dependent field paths required (also non-null). Equivalent to JSON Schema 2020-12 dependentRequired, scoped to schema-level cross-field requirement. Lint-checked at ImportSchema time (every path must reference a real field; trigger may not appear in its own dependents). Enforced at every config write against the post-merge snapshot.
validations ValidationRule repeated Cross-field rule expressions reserved for future Common Expression Language (CEL) evaluation. Stored on the schema and round-tripped through ImportSchema/GetSchema; the runtime engine ships separately (see issue #76). Reserving the key in v0.1.0 of the schema spec avoids a breaking meta-schema change later.

SchemaContact

SchemaContact contains contact information for a schema owner. OAS: Contact Object

Field Type Label Description
name string Contact name (person or team).
email string Contact email address.
url string Contact URL (e.g. team wiki page).

SchemaField

SchemaField defines a single field within a configuration schema.

Field Type Label Description
path string Dot-separated hierarchical path (e.g. "payments.settlement.window"). Must be unique within a schema version.
type FieldType The value type for this field. Controls validation behavior.
constraints FieldConstraints Validation constraints. Optional — when absent, any value of the correct type is accepted.
nullable bool Whether this field accepts empty/null values.
deprecated bool Whether this field is deprecated. Deprecated fields are still readable but clients should migrate to redirect_to if set.
redirect_to string optional When deprecated, reads of this field can be redirected to this path.
default_value string optional Default value for this field, encoded as a string matching the field type.
description string optional Human-readable description of the field's purpose.
title string optional Human-friendly display name (e.g. "Fee Rate" for path "payments.fee_rate"). OAS: title
example string optional Single example value, encoded as a string matching the field type. OAS: example
examples SchemaField.ExamplesEntry repeated Named examples with optional summary. Key is example name. OAS: examples
external_docs ExternalDocs Link to external documentation for this field. OAS: externalDocs
tags string repeated Tags for grouping and categorization beyond the dot-prefix hierarchy. OAS: x-tags
format string optional Semantic format hint within the base type (e.g. "email", "semver", "percentage"). Informational — not enforced by validation. OAS: format
read_only bool Whether this field is system-managed and not user-editable. OAS: readOnly
write_once bool Whether this field can only be set once and becomes immutable after.
sensitive bool Whether this field's value should be masked in logs and UI.

SchemaField.ExamplesEntry

Field Type Label Description
key string
value FieldExample

SchemaInfo

SchemaInfo contains optional metadata about a schema's ownership and context. Optional organizational metadata for a schema. Schema.description lives on Schema itself (not here) because it's a first-class field used in every listing, while these are optional extras. OAS: Info Object

Field Type Label Description
title string Human-friendly display name (e.g. "Payment Configuration"). Unlike Schema.name (a machine slug), this is for UI and documentation. OAS: info.title
author string Schema owner identifier (person, team, or service).
contact SchemaContact Contact information for the schema owner. OAS: info.contact
labels SchemaInfo.LabelsEntry repeated Key-value labels for filtering and categorization.

SchemaInfo.LabelsEntry

Field Type Label Description
key string
value string

Tenant

Tenant represents an organization or entity that has its own configuration based on an assigned schema version.

Field Type Label Description
id string Server-assigned unique identifier (UUID).
name string Unique name for this tenant. Must be a valid slug: lowercase alphanumeric characters and hyphens, 1-63 characters, matching a-z0-9?.
schema_id string The schema this tenant's configuration is based on (UUID).
schema_version int32 The specific schema version assigned to this tenant. Must reference a published schema version.
created_at google.protobuf.Timestamp When the tenant was created.
updated_at google.protobuf.Timestamp When the tenant was last updated (name or schema version change).

TypedValue

TypedValue holds a configuration value with its native type. An unset oneof (no field present) represents a null value.

Field Type Label Description
integer_value int64 Integer value.
number_value double Floating-point number value.
string_value string Free-form string value.
bool_value bool Boolean value.
time_value google.protobuf.Timestamp Timestamp value.
duration_value google.protobuf.Duration Duration value.
url_value string URL value (must be a valid absolute URL).
json_value string JSON value (must be valid JSON).

UsageStats

UsageStats represents aggregated read usage statistics for a config field.

Field Type Label Description
tenant_id string The tenant (UUID).
field_path string The field path.
read_count int64 Total number of reads across the queried time range.
last_read_by string optional The last actor who read this field (if tracked).
last_read_at google.protobuf.Timestamp optional When this field was last read (if tracked).

ValidationRule

ValidationRule encodes one cross-field rule expressed in Common Expression Language (CEL). Reserved in v0.1.0 of the schema spec — the parser accepts and persists rules, but the engine that compiles and evaluates them ships separately (see issue #76 / .agents/context/cel-validation.md).

Rules are scoped to a path prefix: an empty path means a schema-wide rule; a non-empty path anchors the rule to a group for documentation and UI grouping (the binding namespace itself always exposes every field via self, regardless of path).

Field Type Label Description
path string Optional path prefix scoping the rule to a group of fields. Empty string means the rule applies at schema scope.
rule string The CEL expression source. Lint at ImportSchema in v0.1.0 only checks that the string is non-empty; CEL compilation happens in Phase 2 once the engine ships.
message string Human-readable failure message shown to clients when the rule rejects a write. Required.
severity string Optional severity hint. Reserved values: "error" (default — write rejected) and "warning" (write accepted, surfaced for UI). v0.1.0 only validates the value is empty or one of the reserved set; the warning path is not yet enforced.
reason string Optional machine-readable failure code for SDK consumers that want to branch on rule outcome without parsing the message text.

FieldType

FieldType enumerates the supported configuration value types. Each type maps to a specific field in the TypedValue oneof.

Name Number Description
FIELD_TYPE_UNSPECIFIED 0
FIELD_TYPE_INT 1 Integer value. Encoded as a decimal string (e.g. "42", "-1"). Supports minimum/maximum constraints on the numeric value.
FIELD_TYPE_STRING 2 Free-form string value. Supports minimum/maximum constraints on string length, pattern (regex), and enum constraints.
FIELD_TYPE_TIME 3 Timestamp value. Encoded as an RFC 3339 string (e.g. "2025-01-15T09:30:00Z").
FIELD_TYPE_DURATION 4 Duration value. Encoded as a Go-style duration string (e.g. "24h", "30m", "500ms"). Supports minimum/maximum constraints on the duration in seconds.
FIELD_TYPE_URL 5 URL value. Must be a valid absolute URL.
FIELD_TYPE_JSON 6 JSON value. Stored as a JSON-encoded string. Supports json_schema constraint for structural validation.
FIELD_TYPE_NUMBER 7 Floating-point number value. Encoded as a decimal string (e.g. "3.14", "0.025"). Supports minimum/maximum constraints on the numeric value.
FIELD_TYPE_BOOL 8 Boolean value. Encoded as "true" or "false".

Top

centralconfig/v1/audit_service.proto

AuditChainBreak

Field Type Label Description
entry_id string ID of the entry where the break was detected.
position int32 0-based position in the ordered chain.
got string The entry_hash stored in the database.
want string The entry_hash we recomputed from the entry's fields.

GetFieldUsageRequest

Field Type Label Description
tenant_id string Tenant ID (UUID).
field_path string Dot-separated field path to query.
start_time google.protobuf.Timestamp optional Start of the time range. If omitted, includes all historical data.
end_time google.protobuf.Timestamp optional End of the time range. If omitted, includes up to the current time.

GetFieldUsageResponse

Field Type Label Description
stats UsageStats Aggregated usage statistics across the queried time range.

GetTenantUsageRequest

Field Type Label Description
tenant_id string Tenant ID (UUID).
start_time google.protobuf.Timestamp optional Start of the time range. If omitted, includes all historical data.
end_time google.protobuf.Timestamp optional End of the time range. If omitted, includes up to the current time.

GetTenantUsageResponse

Field Type Label Description
field_stats UsageStats repeated Per-field usage statistics, ordered by field path.

GetUnusedFieldsRequest

Field Type Label Description
tenant_id string Tenant ID (UUID).
since google.protobuf.Timestamp Fields not read since this time are considered unused. Required — there is no "all time" default to avoid expensive full scans.

GetUnusedFieldsResponse

Field Type Label Description
field_paths string repeated Dot-separated paths of fields with no reads since the specified time.

QueryWriteLogRequest

Field Type Label Description
tenant_id string optional Filter by tenant ID (UUID). If omitted, returns entries across all tenants.
actor string optional Filter by actor (JWT subject). If omitted, matches all actors.
field_path string optional Filter by field path. If omitted, matches all fields.
start_time google.protobuf.Timestamp optional Filter entries created at or after this time. If omitted, no lower bound.
end_time google.protobuf.Timestamp optional Filter entries created at or before this time. If omitted, no upper bound.
page_size int32 Maximum number of results to return. Defaults to 50, max 100.
page_token string Pagination token from a previous QueryWriteLogResponse.

QueryWriteLogResponse

Field Type Label Description
entries AuditEntry repeated Audit entries matching the filters, ordered by created_at descending.
next_page_token string Token for the next page. Empty if no more results.

VerifyChainRequest

Field Type Label Description
tenant_id string Tenant ID (UUID) whose chain to verify. Empty verifies the global (schema-level) chain.

VerifyChainResponse

Field Type Label Description
tenant_id string Tenant ID that was verified (mirrors the request).
total int32 Total number of entries in the chain.
ok bool Whether the chain is intact (no breaks found).
breaks AuditChainBreak repeated Any breaks found. Empty when ok is true.

AuditService

AuditService provides read-only access to the change history and usage statistics for tenant configurations.

Write events are recorded automatically by the ConfigService whenever configuration values are modified (atomically with the config change). Usage statistics are tracked asynchronously via batched read counters.

Method Name Request Type Response Type Description
QueryWriteLog QueryWriteLogRequest QueryWriteLogResponse QueryWriteLog searches the audit log for config change events. All filter parameters are optional — omit a filter to match all values.
GetFieldUsage GetFieldUsageRequest GetFieldUsageResponse GetFieldUsage returns aggregated read statistics for a specific field.
GetTenantUsage GetTenantUsageRequest GetTenantUsageResponse GetTenantUsage returns aggregated read statistics for all fields of a tenant.
GetUnusedFields GetUnusedFieldsRequest GetUnusedFieldsResponse GetUnusedFields returns field paths that have not been read since the given time. Useful for identifying configuration fields that may be safe to deprecate.
VerifyChain VerifyChainRequest VerifyChainResponse VerifyChain walks a tenant's audit chain and reports any tampered entries. An empty tenant_id verifies the global (schema-level) chain.

Top

centralconfig/v1/config_service.proto

ExportConfigRequest

Field Type Label Description
tenant_id string Tenant ID (UUID).
version int32 optional Config version to export. If omitted, exports the latest version.
spec_version string optional Config-format spec version to emit (e.g. "v1"). When omitted, defaults to the highest version the server supports. The server returns InvalidArgument if the requested version is not registered.

ExportConfigResponse

Field Type Label Description
yaml_content bytes YAML-encoded configuration values.

FieldUpdate

FieldUpdate represents a single field change within a SetFields batch.

Field Type Label Description
field_path string Dot-separated field path.
value TypedValue The typed value. Omit to set the field to null.
expected_checksum string optional Optimistic concurrency control checksum for this specific field. See SetFieldRequest.expected_checksum for details.
value_description string optional Value-level description for this specific field.

GetConfigRequest

Field Type Label Description
tenant_id string Tenant ID (UUID).
version int32 optional Config version to retrieve. If omitted, returns the latest version.
include_descriptions bool When true, includes value-level descriptions in the response. This bypasses the Redis cache and reads directly from the database.

GetConfigResponse

Field Type Label Description
config Config The full resolved configuration at the requested version.

GetFieldRequest

Field Type Label Description
tenant_id string Tenant ID (UUID).
field_path string Dot-separated field path (e.g. "payments.fee").
version int32 optional Config version to read from. If omitted, reads from the latest version.
include_description bool When true, includes the value-level description. This bypasses the Redis cache and reads directly from the database.

GetFieldResponse

Field Type Label Description
value ConfigValue The configuration value. Returns NOT_FOUND if the field has no value set.

GetFieldsRequest

Field Type Label Description
tenant_id string Tenant ID (UUID).
field_paths string repeated Dot-separated field paths to retrieve.
version int32 optional Config version to read from. If omitted, reads from the latest version.
include_descriptions bool When true, includes value-level descriptions. This bypasses the Redis cache and reads directly from the database.

GetFieldsResponse

Field Type Label Description
values ConfigValue repeated The requested values. Fields that don't exist are omitted (not an error).

GetVersionRequest

Field Type Label Description
tenant_id string Tenant ID (UUID).
version int32 The version number to retrieve.

GetVersionResponse

Field Type Label Description
config_version ConfigVersion

ImportConfigRequest

Field Type Label Description
tenant_id string Tenant ID (UUID).
yaml_content bytes YAML-encoded configuration values to import.
description string optional Description for the new config version created by the import.
mode ImportMode Import mode. Defaults to IMPORT_MODE_MERGE.

ImportConfigResponse

Field Type Label Description
config_version ConfigVersion The config version created by the import.

ListVersionsRequest

Field Type Label Description
tenant_id string Tenant ID (UUID).
page_size int32 Maximum number of results to return. Defaults to 50, max 100.
page_token string Pagination token from a previous ListVersionsResponse.

ListVersionsResponse

Field Type Label Description
versions ConfigVersion repeated Config versions, ordered by version number descending (newest first).
next_page_token string Token for the next page. Empty if no more results.

RollbackToVersionRequest

Field Type Label Description
tenant_id string Tenant ID (UUID).
version int32 The target version to rollback to. The full config at this version is copied into a new version (the current version number + 1). The target version itself is not modified.
description string optional Description for the new rollback version. Defaults to "Rollback to version N" if omitted.

RollbackToVersionResponse

Field Type Label Description
config_version ConfigVersion The newly created config version containing the rolled-back values.

SetFieldRequest

Field Type Label Description
tenant_id string Tenant ID (UUID).
field_path string Dot-separated field path (e.g. "payments.fee").
value TypedValue The typed value. Omit to set the field to null.
expected_checksum string optional Optimistic concurrency control: the checksum from a previous GetField/GetConfig response. If provided and the field's current checksum doesn't match, the request fails with ABORTED. This prevents lost updates when multiple actors modify the same field concurrently.
description string optional Version-level description explaining why this change was made.
value_description string optional Value-level description explaining what this specific value means. Retrievable via include_description in read requests.

SetFieldResponse

Field Type Label Description
config_version ConfigVersion The newly created config version.

SetFieldsRequest

Field Type Label Description
tenant_id string Tenant ID (UUID).
updates FieldUpdate repeated Field updates to apply. All updates are applied atomically in a single config version. If any update fails validation (checksum, field lock), no changes are committed.
description string optional Version-level description explaining why these changes were made.

SetFieldsResponse

Field Type Label Description
config_version ConfigVersion The newly created config version.

SubscribeRequest

Field Type Label Description
tenant_id string Tenant ID (UUID) to subscribe to.
field_paths string repeated Field paths to filter on. If empty, receives changes for all fields. Changes to fields not in this list are silently dropped.
start_version int32 optional Resume the stream from this config version (inclusive). When set, the server replays all changes at versions >= start_version before streaming live events. Use snapshot_version + 1 to close the gap between a GetConfig snapshot and the live subscription.

SubscribeResponse

Field Type Label Description
change ConfigChange A configuration change event. Delivered via Redis Pub/Sub internally.

ImportMode

ImportMode controls how imported values interact with existing config.

Name Number Description
IMPORT_MODE_UNSPECIFIED 0 Unspecified defaults to merge behavior.
IMPORT_MODE_MERGE 1 Merge: update fields from YAML that differ, keep runtime overrides for fields not in the YAML.
IMPORT_MODE_REPLACE 2 Replace: full replace — all fields from YAML are set, fields not in YAML are not carried forward. Runtime overrides are wiped.
IMPORT_MODE_DEFAULTS 3 Defaults: only set fields that have no value yet. Fields that already have a value are skipped regardless of the YAML content.

ConfigService

ConfigService manages configuration values, versions, and real-time subscriptions.

Configuration is stored per-tenant using delta versioning: each write creates a new version containing only the changed fields. The full config at any version is the union of all deltas up to that version (latest value per field wins).

Read operations are cached in Redis. Write operations are atomic: the config version, values, and audit log entry are committed in a single database transaction.

Read operations. Reads are served from Redis cache when possible. Setting include_descriptions bypasses the cache and reads directly from the database.

Method Name Request Type Response Type Description
GetConfig GetConfigRequest GetConfigResponse GetConfig returns the full resolved configuration for a tenant.
GetField GetFieldRequest GetFieldResponse GetField returns a single configuration value by field path.
GetFields GetFieldsRequest GetFieldsResponse GetFields returns multiple configuration values by field paths. Fields that don't exist are silently omitted from the response.
SetField SetFieldRequest SetFieldResponse SetField sets a single configuration value, creating a new config version.
SetFields SetFieldsRequest SetFieldsResponse SetFields sets multiple configuration values in a single config version.
ListVersions ListVersionsRequest ListVersionsResponse ListVersions returns config version history for a tenant (newest first).
GetVersion GetVersionRequest GetVersionResponse GetVersion retrieves metadata for a specific config version.
RollbackToVersion RollbackToVersionRequest RollbackToVersionResponse RollbackToVersion creates a new version with the same values as the target version. This does not delete intermediate versions — it creates a new version that copies the target's values.
Subscribe SubscribeRequest SubscribeResponse stream Subscribe opens a server-streaming connection that pushes ConfigChange events whenever the tenant's configuration is modified. The stream remains open until the client disconnects or the server shuts down.
ExportConfig ExportConfigRequest ExportConfigResponse ExportConfig serializes a tenant's configuration to YAML.
ImportConfig ImportConfigRequest ImportConfigResponse ImportConfig applies configuration values from YAML.

Top

centralconfig/v1/schema_service.proto

CreateSchemaRequest

Field Type Label Description
name string Unique name for the schema. Must be a valid slug: lowercase alphanumeric and hyphens, 1-63 characters (e.g. "payment-config", "settlement-rules").
description string optional Human-readable description of the schema's purpose.
fields SchemaField repeated Initial field definitions for version 1. At least one field is required.

CreateSchemaResponse

Field Type Label Description
schema Schema The created schema with version 1 (draft, unpublished).

CreateTenantRequest

Field Type Label Description
name string Unique name for the tenant. Must be a valid slug: lowercase alphanumeric and hyphens, 1-63 characters (e.g. "acme-corp", "tenant-42").
schema_id string The schema to assign to this tenant (UUID).
schema_version int32 The schema version to use. Must be a published version.

CreateTenantResponse

Field Type Label Description
tenant Tenant

DeleteSchemaRequest

Field Type Label Description
id string Schema ID (UUID). Cascades to all versions, fields, and associated tenants.

DeleteSchemaResponse

DeleteTenantRequest

Field Type Label Description
id string Tenant ID (UUID). Cascades to all config versions, values, and field locks.

DeleteTenantResponse

ExportSchemaRequest

Field Type Label Description
id string Schema ID (UUID).
version int32 optional Schema version to export. If omitted, exports the latest version.
spec_version string optional Schema-format spec version to emit (e.g. "v1"). When omitted, defaults to the highest version the server supports. The server returns InvalidArgument if the requested version is not registered.

ExportSchemaResponse

Field Type Label Description
yaml_content bytes YAML-encoded schema (spec_version v1). Includes schema name, description, version, and all field definitions with OAS-style constraint naming. Server-generated fields (id, checksum, published, created_at) are excluded.

GetSchemaRequest

Field Type Label Description
id string Schema ID (UUID).
version int32 optional Schema version to retrieve. If omitted, returns the latest version.

GetSchemaResponse

Field Type Label Description
schema Schema

GetTenantRequest

Field Type Label Description
id string Tenant ID (UUID).

GetTenantResponse

Field Type Label Description
tenant Tenant

ImportSchemaRequest

Field Type Label Description
yaml_content bytes YAML-encoded schema (spec_version v1). Must include spec_version, name, and fields.

Import uses full-replace semantics: - If no schema with this name exists: creates a new schema with version 1. - If a schema exists and fields differ from latest: creates the next version. - If a schema exists and fields are identical: returns AlreadyExists error.

Imported versions are created as drafts (unpublished) unless auto_publish is true. The version field in the YAML is informational — the server assigns the next version number automatically. | | auto_publish | bool | | When true, the imported version is automatically published after creation. If the schema already exists and fields are identical (AlreadyExists), this has no effect. |

ImportSchemaResponse

Field Type Label Description
schema Schema The created (or existing, on AlreadyExists) schema version.

ListFieldLocksRequest

Field Type Label Description
tenant_id string Tenant ID (UUID).

ListFieldLocksResponse

Field Type Label Description
locks FieldLock repeated All active field locks for the tenant.

ListSchemasRequest

Field Type Label Description
name_filter string optional Filter schemas by name prefix. Currently reserved for future use.
page_size int32 Maximum number of results to return. Defaults to 50, max 100.
page_token string Pagination token from a previous ListSchemasResponse.

ListSchemasResponse

Field Type Label Description
schemas Schema repeated Schemas with their latest version.
next_page_token string Token for the next page. Empty if no more results.

ListTenantsRequest

Field Type Label Description
schema_id string optional Filter by schema ID (UUID). If omitted, returns tenants across all schemas.
page_size int32 Maximum number of results to return. Defaults to 50, max 100.
page_token string Pagination token from a previous ListTenantsResponse.

ListTenantsResponse

Field Type Label Description
tenants Tenant repeated
next_page_token string Token for the next page. Empty if no more results.

LockFieldRequest

Field Type Label Description
tenant_id string Tenant ID (UUID).
field_path string Dot-separated field path to lock (e.g. "payments.currency").
locked_values string repeated For enum fields: lock only these specific values. If empty, the entire field is locked regardless of value.

LockFieldResponse

PublishSchemaRequest

Field Type Label Description
id string Schema ID (UUID).
version int32 The version number to publish. Must be an existing draft version. Once published, the version is immutable.

PublishSchemaResponse

Field Type Label Description
schema Schema The published schema version.

UnlockFieldRequest

Field Type Label Description
tenant_id string Tenant ID (UUID).
field_path string Dot-separated field path to unlock.

UnlockFieldResponse

UpdateSchemaRequest

Field Type Label Description
id string Schema ID (UUID).
version_description string optional Description of what changed in this version.
fields SchemaField repeated Fields to add or modify. Existing fields not listed here are carried forward unchanged from the latest version.
remove_fields string repeated Dot-separated paths of fields to remove from the new version.

UpdateSchemaResponse

Field Type Label Description
schema Schema The new schema version (draft, unpublished).

UpdateTenantRequest

Field Type Label Description
id string Tenant ID (UUID).
name string optional New name for the tenant. Must be a valid slug if provided.
schema_version int32 optional Upgrade to a new schema version. The new version must belong to the same schema and must be published.

UpdateTenantResponse

Field Type Label Description
tenant Tenant

SchemaService

SchemaService manages configuration schemas, tenants, and field-level locking.

Schemas define the allowed fields and their types for tenant configurations. Each schema is versioned — updates create new immutable versions that must be published before tenants can use them.

Schema lifecycle.

Method Name Request Type Response Type Description
CreateSchema CreateSchemaRequest CreateSchemaResponse CreateSchema creates a new schema with an initial draft version (v1).
GetSchema GetSchemaRequest GetSchemaResponse GetSchema retrieves a schema by ID, optionally at a specific version.
ListSchemas ListSchemasRequest ListSchemasResponse ListSchemas returns all schemas, ordered by creation time (newest first).
UpdateSchema UpdateSchemaRequest UpdateSchemaResponse UpdateSchema creates a new draft version by merging field changes with the latest version.
DeleteSchema DeleteSchemaRequest DeleteSchemaResponse DeleteSchema permanently deletes a schema and all its versions. Cascades to tenants.
PublishSchema PublishSchemaRequest PublishSchemaResponse PublishSchema marks a schema version as published and immutable. Only published versions can be assigned to tenants.
CreateTenant CreateTenantRequest CreateTenantResponse CreateTenant creates a new tenant assigned to a published schema version.
GetTenant GetTenantRequest GetTenantResponse GetTenant retrieves a tenant by ID.
ListTenants ListTenantsRequest ListTenantsResponse ListTenants returns tenants, optionally filtered by schema.
UpdateTenant UpdateTenantRequest UpdateTenantResponse UpdateTenant updates a tenant's name or upgrades its schema version.
DeleteTenant DeleteTenantRequest DeleteTenantResponse DeleteTenant permanently deletes a tenant and all its configuration data.
LockField LockFieldRequest LockFieldResponse LockField prevents a field from being modified.
UnlockField UnlockFieldRequest UnlockFieldResponse UnlockField removes a field lock, allowing modifications again.
ListFieldLocks ListFieldLocksRequest ListFieldLocksResponse ListFieldLocks returns all active field locks for a tenant.
ExportSchema ExportSchemaRequest ExportSchemaResponse ExportSchema serializes a schema version to YAML.
ImportSchema ImportSchemaRequest ImportSchemaResponse ImportSchema creates a schema (or new version) from YAML. Full-replace semantics: the YAML defines the complete field set. Returns AlreadyExists if the imported fields are identical to the latest version.

Top

centralconfig/v1/server_service.proto

GetServerInfoRequest

GetServerInfoResponse

Field Type Label Description
version string Semantic version string (e.g. "1.2.3" or "dev").
commit string Git commit hash.
features GetServerInfoResponse.FeaturesEntry repeated Enabled server features. Keys are feature names, values indicate enabled state. Known features: schema, config, audit, usage_tracking, jwt_auth, http_gateway.

GetServerInfoResponse.FeaturesEntry

Field Type Label Description
key string
value bool

ServerService

ServerService provides server metadata and capability discovery. Always registered, no authentication required.

Method Name Request Type Response Type Description
GetServerInfo GetServerInfoRequest GetServerInfoResponse GetServerInfo returns the server's version, commit hash, and enabled features.

Scalar Value Types

.proto Type Notes C++ Java Python Go C# PHP Ruby
double double double float float64 double float Float
float float float float float32 float float Float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int int32 int integer Bignum or Fixnum (as required)
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long int64 long integer/string Bignum
uint32 Uses variable-length encoding. uint32 int int/long uint32 uint integer Bignum or Fixnum (as required)
uint64 Uses variable-length encoding. uint64 long int/long uint64 ulong integer/string Bignum or Fixnum (as required)
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int int32 int integer Bignum or Fixnum (as required)
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long int64 long integer/string Bignum
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int uint32 uint integer Bignum or Fixnum (as required)
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long uint64 ulong integer/string Bignum
sfixed32 Always four bytes. int32 int int int32 int integer Bignum or Fixnum (as required)
sfixed64 Always eight bytes. int64 long int/long int64 long integer/string Bignum
bool bool boolean boolean bool bool boolean TrueClass/FalseClass
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode string string string String (UTF-8)
bytes May contain any arbitrary sequence of bytes. string ByteString str []byte ByteString string String (ASCII-8BIT)