diff --git a/content/docs/api-service/architecture.mdx b/content/docs/api-service/architecture.mdx index 242fbad..e7483e6 100644 --- a/content/docs/api-service/architecture.mdx +++ b/content/docs/api-service/architecture.mdx @@ -60,8 +60,10 @@ failure, after the fact. The plugin name is `group/name:version`. `group` and `name` match `^[a-z][a-z0-9-]*$`; `version` matches `^v\d+\.\d+(\.\d+)?$` or is the literal -`latest`. The service itself requires the `:version` part — the easyp CLI adds -`:latest` when a `remote:` entry omits it. +`latest`. The service itself requires the `:version` part — EasyP v1 CLI +combines `remote:` and `version:` from `easyp.gen.yaml` into +`group/name:version` (EasyP v0.17 appended `:latest` when a `remote:` entry +omitted it). `latest` selects the highest registered version: the registry reads the @@ -112,7 +114,8 @@ attempts, and only when the error text contains `connection refused` or Stderr is kept up to 1 MiB for the error message. - The process gets its own process group, and on timeout the whole group is killed with `SIGKILL`. -- The working directory is not set; it is the service's. +- Each invocation gets a fresh temporary working directory under + `plugins_dir/.tmp` (`run-*`), which is removed when the process exits. That is the whole containment. See [Security](/docs/api-service/security) for what it does not cover. @@ -147,9 +150,10 @@ mounted, or baked into an image. The registry row only points at them. Republishing a version (`plugins publish --force`) uploads the new archive and replaces the recorded checksum through `UpdatePlugin`. On next use every replica -sees that its `.sha256` marker no longer matches the registry and refetches; a -directory without a marker (unpacked before v1.2.0) counts as current. An -archive overwritten in storage any other way no longer has the recorded +sees that its `.sha256` marker no longer matches the registry and refetches; +since v1.2.1, a directory without a marker (unpacked before v1.2.0) is also +refetched once whenever the registry has a recorded checksum, and gets a marker. +An archive overwritten in storage any other way no longer has the recorded checksum, and its next download fails with `CHECKSUM_MISMATCH` — republish it with `publish --force`, or publish a new version. @@ -164,8 +168,11 @@ generation with `UNAVAILABLE` / `STORAGE_UNAVAILABLE`. | `audit_log` | Enterprise audit trail, partitioned by month, plus `audit_log_default`. | | `goose_db_version` | Applied migrations. | -Migrations are embedded and applied by the service at start, under a PostgreSQL -session lock. There are no down migrations. +Migrations are embedded and applied automatically (`goose Up`) by the service at +start under a PostgreSQL session lock. Both SQL migrations include +`-- +goose Down` blocks, though the service never runs rollbacks automatically +(and rolling back `00002_audit_log_partitioning.sql` cannot restore partitions +already dropped by retention). If PostgreSQL is unreachable at start, the service retries with exponential backoff capped at 5 s. At runtime the readiness endpoint `/` on the health port diff --git a/content/docs/api-service/architecture.ru.mdx b/content/docs/api-service/architecture.ru.mdx index b3bc9ba..8ba4b93 100644 --- a/content/docs/api-service/architecture.ru.mdx +++ b/content/docs/api-service/architecture.ru.mdx @@ -60,8 +60,9 @@ gRPC-статусы, и конвертация снаружи переписал Имя плагина — `group/name:version`. `group` и `name` соответствуют `^[a-z][a-z0-9-]*$`; `version` — `^v\d+\.\d+(\.\d+)?$` или литерал `latest`. -Сервису часть `:version` нужна обязательно — easyp CLI сам дописывает `:latest`, -если в `remote:` её нет. +Сервису часть `:version` нужна обязательно — EasyP v1 CLI склеивает `remote:` и +`version:` из `easyp.gen.yaml` в `group/name:version` (в EasyP v0.17 CLI сам +дописывал `:latest`, если в `remote:` версии не было). `latest` выбирает самую новую зарегистрированную версию: реестр читает версии @@ -112,7 +113,8 @@ gRPC-статусы, и конвертация снаружи переписал для сообщения об ошибке. - Процесс получает свою группу процессов, и по таймауту вся группа убивается `SIGKILL`. -- Рабочая директория не задаётся — она та же, что у сервиса. +- Каждый запуск получает свежий временный рабочий каталог в `plugins_dir/.tmp` + (`run-*`), который удаляется после завершения процесса. Это вся изоляция. Чего она не покрывает — в [Безопасности](/ru/docs/api-service/security). @@ -148,11 +150,12 @@ gRPC-статусы, и конвертация снаружи переписал Повторная публикация версии (`plugins publish --force`) загружает новый архив и заменяет записанную контрольную сумму через `UpdatePlugin`. При следующем обращении каждая реплика видит, что её маркер `.sha256` больше не совпадает с -реестром, и скачивает архив заново; каталог без маркера (распакованный до -v1.2.0) считается актуальным. Архив, перезаписанный в хранилище любым другим -способом, уже не имеет записанной контрольной суммы, и его следующее скачивание -падает с `CHECKSUM_MISMATCH` — перепубликуйте его через `publish --force` или -выпустите новую версию. +реестром, и скачивает архив заново; начиная с v1.2.1 каталог без маркера +(распакованный до v1.2.0) также перекачивается один раз при наличии записанной +контрольной суммы и получает маркер. Архив, перезаписанный в хранилище любым +другим способом, уже не имеет записанной контрольной суммы, и его следующее +скачивание падает с `CHECKSUM_MISMATCH` — перепубликуйте его через +`publish --force` или выпустите новую версию. Недоступность хранилища или исчезнувший из бакета архив дают при генерации `UNAVAILABLE` / `STORAGE_UNAVAILABLE`. @@ -165,8 +168,11 @@ v1.2.0) считается актуальным. Архив, перезапис | `audit_log` | Журнал аудита Enterprise, партиции по месяцам плюс `audit_log_default`. | | `goose_db_version` | Применённые миграции. | -Миграции встроены в бинарник и применяются сервисом при старте под сессионной -блокировкой PostgreSQL. Down-миграций нет. +Миграции встроены в бинарник и автоматически применяются (`goose Up`) сервисом +при старте под сессионной блокировкой PostgreSQL. Обе SQL-миграции содержат +блоки `-- +goose Down`, хотя сервис не выполняет откаты автоматически (а откат +`00002_audit_log_partitioning.sql` не может восстановить партиции, уже +удалённые по retention). Если PostgreSQL недоступен при старте, сервис повторяет попытки с экспоненциальной задержкой не больше 5 с. Во время работы readiness `/` на diff --git a/content/docs/api-service/authentication-and-licensing.mdx b/content/docs/api-service/authentication-and-licensing.mdx index 8707439..31407f8 100644 --- a/content/docs/api-service/authentication-and-licensing.mdx +++ b/content/docs/api-service/authentication-and-licensing.mdx @@ -111,7 +111,7 @@ The licence is a PASETO v4.public token signed with Ed25519. Verification is offline: the service does not call anything. 1. The token comes from `license.key` (`LICENSE_KEY`) or the file named by - `license.file`. + `license.file` (`LICENSE_FILE`). 2. The key id in the token's footer selects a public key from `license.public_keys`; an entry under `"*"` verifies any key id. The Helm chart ships easyp.tech's current public key (`2026-08`). @@ -135,8 +135,10 @@ release, not the token. - The token is re-validated every `license.cache_ttl` (5 minutes), so the tier changes on a running service. Replacing the token itself needs a restart. -Dropping to Community is silent for clients: audit stops, the plugin ceiling -starts refusing registrations above 10. The alerts +Dropping to Community is silent for clients: on the running process, audit stops +and the 10-version plugin ceiling starts refusing new registrations immediately, +while the `worker_pool.workers` (4) and `worker_pool.max_concurrent_generations` +(16) ceilings take effect on restart (logged at `Warn`). The alerts [EasypLicenceExpiringSoon](/docs/api-service/runbooks#easyplicenceexpiringsoon) and [EasypLicenceInGrace](/docs/api-service/runbooks#easyplicenceingrace) exist for this. diff --git a/content/docs/api-service/authentication-and-licensing.ru.mdx b/content/docs/api-service/authentication-and-licensing.ru.mdx index c4754d7..9bdf26f 100644 --- a/content/docs/api-service/authentication-and-licensing.ru.mdx +++ b/content/docs/api-service/authentication-and-licensing.ru.mdx @@ -112,7 +112,8 @@ SDK — он поддерживает и то, и другое (`sdk.WithToken`, Лицензия — токен PASETO v4.public, подписанный Ed25519. Проверка офлайновая: сервис никуда не обращается. -1. Токен берётся из `license.key` (`LICENSE_KEY`) или из файла `license.file`. +1. Токен берётся из `license.key` (`LICENSE_KEY`) или из файла `license.file` + (`LICENSE_FILE`). 2. Key id из футера токена выбирает публичный ключ из `license.public_keys`; запись под `"*"` проверяет любой key id. Helm-чарт поставляется с текущим публичным ключом easyp.tech (`2026-08`). @@ -134,8 +135,11 @@ SDK — он поддерживает и то, и другое (`sdk.WithToken`, - Токен перепроверяется каждые `license.cache_ttl` (5 минут), поэтому редакция меняется на работающем сервисе. Замена самого токена требует перезапуска. -Для клиентов переход на Community незаметен: аудит прекращается, потолок -плагинов начинает отклонять регистрации сверх 10. Для этого есть алерты +Для клиентов переход на Community незаметен: на работающем процессе аудит +прекращается и потолок в 10 версий плагинов начинает отклонять новые регистрации +сразу, а потолки `worker_pool.workers` (4) и +`worker_pool.max_concurrent_generations` (16) вступают в силу при перезапуске +(в лог пишется `Warn`). Для этого есть алерты [EasypLicenceExpiringSoon](/ru/docs/api-service/runbooks#easyplicenceexpiringsoon) и [EasypLicenceInGrace](/ru/docs/api-service/runbooks#easyplicenceingrace). diff --git a/content/docs/api-service/client-usage.mdx b/content/docs/api-service/client-usage.mdx index d30bb24..c0c2b16 100644 --- a/content/docs/api-service/client-usage.mdx +++ b/content/docs/api-service/client-usage.mdx @@ -5,38 +5,47 @@ description: "Pointing the easyp CLI at the service, using the Go SDK, and calli ## easyp CLI -A plugin runs on the service when its entry in `generate.plugins` uses `remote:` -instead of `name:`, `path:` or `command:`: +A plugin runs on the service when its entry under `plugins:` in +`easyp.gen.yaml` uses `remote:` and `version:` instead of `name:`, `path:` or +`command:`: ```yaml -generate: - inputs: - - directory: - path: . - root: proto - plugins: - - remote: "plugins.example.com/protocolbuffers/go:v1.36.10" - out: gen/go - opts: - paths: source_relative - - remote: "plugins.example.com/grpc/go:v1.6.2" - out: gen/go - opts: - paths: source_relative - require_unimplemented_servers: false +# easyp.gen.yaml +version: v1 +plugins: + - remote: plugins.example.com/protocolbuffers/go + version: v1.36.10 + out: gen/go + opts: + paths: source_relative + - remote: plugins.example.com/grpc/go + version: v1.6.2 + out: gen/go + opts: + paths: source_relative + require_unimplemented_servers: false ``` -### The `remote:` value + +On EasyP v0.17 (`easyp.yaml`), remote plugins live under `generate.plugins` and +carry the version in the URL: +`remote: "plugins.example.com/protocolbuffers/go:v1.36.10"`. EasyP v1 requires +`easyp.gen.yaml` with separate `remote:` and `version:` fields. + -`[http://|https://]host[:port]/group/name[:version]` +### The `remote:` and `version:` values + +`remote:` takes `[http://|https://]host[:port]/group/name` and `version:` takes +a pinned semver tag `vX.Y.Z` (in EasyP v0.17 `easyp.yaml`, both are combined as +`[http://|https://]host[:port]/group/name[:version]`). | Part | Behaviour | |---|---| | scheme | Optional. `https://` or no scheme → TLS; `http://` → plaintext. | | host | A host containing `localhost` or `127.0.0.1` is always plaintext unless `https://` is given. | -| port | Optional. Without it the gRPC client's default applies (443 for TLS); the Helm chart's ingress serves on 443, a bare service listens on 23410. | +| port | Optional. Without it, the easyp CLI defaults to `:443` — even when `http://` is specified, so include an explicit port for plaintext services (for example `localhost:23410`). The Helm chart's ingress serves on 443; a bare service listens on 23410. | | group/name | Must match a registered plugin. | -| version | Optional. Omitted → `latest`, the highest registered version compared by number (`v1.36.11` over `v1.36.9`). | +| version | Required in EasyP v1 (`version: vX.Y.Z`, separate from `remote:`; embedding `:version` in `remote:` or using `latest` is rejected). Direct gRPC/SDK callers — or EasyP v0.17 configs omitting `:version` — resolve `latest` to the highest registered version compared by number (`v1.36.11` over `v1.36.9`). | `opts` are joined into the `CodeGeneratorRequest` parameter (`paths=source_relative,require_unimplemented_servers=false`), exactly as for @@ -45,7 +54,8 @@ local plugins. ### What the CLI does and does not support - It parses and resolves `.proto` files locally, including dependencies from - `deps`. Only the resulting `CodeGeneratorRequest` is sent. + `protobuf.mod` / `protobuf.lock` (or `deps` in EasyP v0.17). Only the + resulting `CodeGeneratorRequest` is sent. - One gRPC call per plugin, each on a new connection, with a fixed **30-second** deadline. The service's own limit is 120 s; a plugin that needs longer than 30 s fails on the client side with `DeadlineExceeded` while the server may still be @@ -59,8 +69,8 @@ local plugins. pointing at `buf.build` does not reach Buf's remote plugins — Buf's registry does not implement this API. -`command:` takes precedence over `remote:`; a plugin entry must have exactly one -source. +A plugin entry must have exactly one source (`name:`, `path:`, `command:`, or +`remote:`); combining them is rejected when validating `easyp.gen.yaml`. ## Go SDK @@ -115,7 +125,7 @@ func main() { | `WithTransportCredentials(creds)` | — | Private CA, client certificate (mTLS). | | `WithToken(token)` | — | `authorization: Bearer` on every call. Needed for writes, and for reads when the service requires authentication. | | `WithGenerateCodeTimeout(d)` | 30 s | Per-call deadline when the context has none. Raise it towards the server's `generation_timeout`. | -| `WithListPluginsTimeout(d)` | 10 s | Spans the whole paginated walk. | +| `WithListPluginsTimeout(d)` | 10 s | Applied **per page** (`Plugins` RPC), not across the whole walk. To cap the overall traversal budget, set a deadline on `ctx` (the earlier deadline wins). | | `WithCreatePluginTimeout(d)` | 120 s | Registration checks the archive in storage, and reads it when the object carries no checksum. | | `WithMaxRetries(n)`, `WithRetryBaseDelay(d)`, `WithRetryMaxDelay(d)` | 3, 100 ms, 5 s | Exponential backoff. | | `WithMaxRecvMsgSize(n)` | 64 MiB | Matches the server's output limit. | diff --git a/content/docs/api-service/client-usage.ru.mdx b/content/docs/api-service/client-usage.ru.mdx index b08939a..fabeb16 100644 --- a/content/docs/api-service/client-usage.ru.mdx +++ b/content/docs/api-service/client-usage.ru.mdx @@ -5,38 +5,47 @@ description: "Как направить easyp CLI на сервис, как по ## easyp CLI -Плагин выполняется на сервисе, если в его записи в `generate.plugins` указан -`remote:` вместо `name:`, `path:` или `command:`: +Плагин выполняется на сервисе, если в его записи в `plugins:` файла +`easyp.gen.yaml` указаны `remote:` и `version:` вместо `name:`, `path:` или +`command:`: ```yaml -generate: - inputs: - - directory: - path: . - root: proto - plugins: - - remote: "plugins.example.com/protocolbuffers/go:v1.36.10" - out: gen/go - opts: - paths: source_relative - - remote: "plugins.example.com/grpc/go:v1.6.2" - out: gen/go - opts: - paths: source_relative - require_unimplemented_servers: false +# easyp.gen.yaml +version: v1 +plugins: + - remote: plugins.example.com/protocolbuffers/go + version: v1.36.10 + out: gen/go + opts: + paths: source_relative + - remote: plugins.example.com/grpc/go + version: v1.6.2 + out: gen/go + opts: + paths: source_relative + require_unimplemented_servers: false ``` -### Значение `remote:` + +В EasyP v0.17 (`easyp.yaml`) удалённые плагины задаются в `generate.plugins` с +версией прямо в URL: +`remote: "plugins.example.com/protocolbuffers/go:v1.36.10"`. EasyP v1 требует +`easyp.gen.yaml` с раздельными полями `remote:` и `version:`. + -`[http://|https://]host[:port]/group/name[:version]` +### Значения `remote:` и `version:` + +`remote:` имеет вид `[http://|https://]host[:port]/group/name`, а `version:` — +зафиксированный semver-тег `vX.Y.Z` (в EasyP v0.17 `easyp.yaml` они объединены +как `[http://|https://]host[:port]/group/name[:version]`). | Часть | Поведение | |---|---| | схема | Необязательна. `https://` или без схемы → TLS; `http://` → без шифрования. | | host | Хост, содержащий `localhost` или `127.0.0.1`, всегда без шифрования, если не указан `https://`. | -| port | Необязателен. Без него действует порт gRPC-клиента по умолчанию (443 для TLS); ingress из Helm-чарта слушает 443, сервис без обвязки — 23410. | +| port | Необязателен. Без него easyp CLI подставляет `:443` — даже если указана схема `http://`, поэтому для незашифрованных сервисов порт нужно указывать явно (например, `localhost:23410`). Ingress из Helm-чарта слушает 443, сервис без обвязки — 23410. | | group/name | Должны совпадать с зарегистрированным плагином. | -| version | Необязательна. Без неё — `latest`, то есть самая новая зарегистрированная версия при сравнении номеров как чисел (`v1.36.11` новее `v1.36.9`). | +| version | Обязательна в EasyP v1 (`version: vX.Y.Z`, отдельно от `remote:`; суффикс `:version` в `remote:` и `latest` отклоняются). Прямые вызовы gRPC/SDK — или конфиги EasyP v0.17 без `:version` — разрешают `latest` в самую новую зарегистрированную версию при сравнении номеров как чисел (`v1.36.11` новее `v1.36.9`). | `opts` склеиваются в параметр `CodeGeneratorRequest` (`paths=source_relative,require_unimplemented_servers=false`) — так же, как для @@ -45,7 +54,8 @@ generate: ### Что CLI умеет и чего не умеет - Он локально разбирает и разрешает `.proto`-файлы, включая зависимости из - `deps`. Отправляется только получившийся `CodeGeneratorRequest`. + `protobuf.mod` / `protobuf.lock` (или `deps` в EasyP v0.17). Отправляется + только получившийся `CodeGeneratorRequest`. - Один gRPC-вызов на плагин, каждый — по новому соединению, с фиксированным дедлайном **30 секунд**. Собственный лимит сервиса — 120 с; плагин, которому нужно больше 30 с, падает на стороне клиента с `DeadlineExceeded`, хотя сервер @@ -59,8 +69,8 @@ generate: указывающее на `buf.build`, не попадёт в remote plugins Buf: реестр Buf этот API не реализует. -`command:` приоритетнее `remote:`; у записи плагина должен быть ровно один -источник. +У записи плагина должен быть ровно один источник (`name:`, `path:`, `command:` +или `remote:`); их смешение отклоняется при проверке `easyp.gen.yaml`. ## Go SDK @@ -115,7 +125,7 @@ func main() { | `WithTransportCredentials(creds)` | — | Свой CA, клиентский сертификат (mTLS). | | `WithToken(token)` | — | `authorization: Bearer` в каждом вызове. Нужен для записи и для чтения, если сервис требует аутентификацию. | | `WithGenerateCodeTimeout(d)` | 30 с | Дедлайн вызова, если в контексте его нет. Поднимайте к `generation_timeout` сервера. | -| `WithListPluginsTimeout(d)` | 10 с | На весь постраничный обход. | +| `WithListPluginsTimeout(d)` | 10 с | Действует **на каждую страницу** (вызов `Plugins`), а не на весь обход. Общий бюджет обхода задаётся дедлайном `ctx` (сработает более ранний). | | `WithCreatePluginTimeout(d)` | 120 с | Регистрация проверяет архив в хранилище и читает его, если у объекта нет контрольной суммы. | | `WithMaxRetries(n)`, `WithRetryBaseDelay(d)`, `WithRetryMaxDelay(d)` | 3, 100 мс, 5 с | Экспоненциальная задержка. | | `WithMaxRecvMsgSize(n)` | 64 МиБ | Совпадает с лимитом вывода сервера. | diff --git a/content/docs/api-service/configuration.mdx b/content/docs/api-service/configuration.mdx index a65b314..f1cfdf0 100644 --- a/content/docs/api-service/configuration.mdx +++ b/content/docs/api-service/configuration.mdx @@ -125,7 +125,7 @@ Audit rows are written only with an Enterprise licence. | `audit.max_save_retries` | `AUDIT_MAX_SAVE_RETRIES` | int | `3` | Retries of a failed batch before it is counted as lost. | | `audit.enqueue_timeout` | `AUDIT_ENQUEUE_TIMEOUT` | duration | `1s` | How long an operation waits for queue space before dropping its entry. | | `audit.flush_timeout` | `AUDIT_FLUSH_TIMEOUT` | duration | `5s` | Bound on one write, retries included. | -| `audit.retention_months` | `AUDIT_RETENTION_MONTHS` | int | `12` | Monthly partitions older than this are dropped — a real delete. | +| `audit.retention_months` | `AUDIT_RETENTION_MONTHS` | int | `12` | Monthly partitions older than this are dropped — a real delete. `0` disables pruning (keeps all partitions). | | `audit.pre_create_months` | `AUDIT_PRE_CREATE_MONTHS` | int | `3` | Partitions created ahead. | | `audit.partition_check_interval` | `AUDIT_PARTITION_CHECK_INTERVAL` | duration | `6h` | Partition maintenance period. | | `audit.partition_op_timeout` | `AUDIT_PARTITION_OP_TIMEOUT` | duration | `30s` | Bound on one partition create/drop. | diff --git a/content/docs/api-service/configuration.ru.mdx b/content/docs/api-service/configuration.ru.mdx index 3ccde1a..7504585 100644 --- a/content/docs/api-service/configuration.ru.mdx +++ b/content/docs/api-service/configuration.ru.mdx @@ -125,7 +125,7 @@ easyp-svc config print --cfg config.yml --changed # только отлич | `audit.max_save_retries` | `AUDIT_MAX_SAVE_RETRIES` | int | `3` | Повторы упавшего пакета, прежде чем он считается потерянным. | | `audit.enqueue_timeout` | `AUDIT_ENQUEUE_TIMEOUT` | duration | `1s` | Сколько операция ждёт места в очереди, прежде чем отбросить свою запись. | | `audit.flush_timeout` | `AUDIT_FLUSH_TIMEOUT` | duration | `5s` | Предел на одну запись с учётом повторов. | -| `audit.retention_months` | `AUDIT_RETENTION_MONTHS` | int | `12` | Месячные партиции старше этого удаляются — по-настоящему. | +| `audit.retention_months` | `AUDIT_RETENTION_MONTHS` | int | `12` | Месячные партиции старше этого удаляются — по-настоящему. `0` отключает удаление (сохраняются все партиции). | | `audit.pre_create_months` | `AUDIT_PRE_CREATE_MONTHS` | int | `3` | Партиции, создаваемые наперёд. | | `audit.partition_check_interval` | `AUDIT_PARTITION_CHECK_INTERVAL` | duration | `6h` | Период обслуживания партиций. | | `audit.partition_op_timeout` | `AUDIT_PARTITION_OP_TIMEOUT` | duration | `30s` | Предел на одно создание/удаление партиции. | diff --git a/content/docs/api-service/helm-values.mdx b/content/docs/api-service/helm-values.mdx index 15331e2..7cde1d1 100644 --- a/content/docs/api-service/helm-values.mdx +++ b/content/docs/api-service/helm-values.mdx @@ -145,7 +145,7 @@ Ports the container listens on. The service defaults to 23410-23413 when no conf ## mcp -The MCP endpoint: a read-only HTTP surface AI tooling uses to read the plugin catalog and the easyp.yaml schema. It exposes nothing the anonymous gRPC reads do not, but it sits outside the gRPC interceptor chain — no TLS, no rate limit, no audit — so serving it is a deployment's explicit decision. Off: the container does not listen on ports.mcp and the Service does not publish it. Turn it on inside a trusted network or behind an ingress that terminates TLS. +The MCP endpoint: a read-only HTTP surface AI tooling uses to read the plugin catalog (the chart 1.3.2 comment still mentions the `easyp.yaml` schema, which was removed in v0.14.0 — see [MCP Endpoint](/docs/api-service/mcp)). It exposes nothing the anonymous gRPC reads do not, but it sits outside the gRPC interceptor chain — no TLS, no rate limit, no audit — so serving it is a deployment's explicit decision. Off: the container does not listen on ports.mcp and the Service does not publish it. Turn it on inside a trusted network or behind an ingress that terminates TLS. | Key | Type | Default | Description | |---|---|---|---| diff --git a/content/docs/api-service/helm-values.ru.mdx b/content/docs/api-service/helm-values.ru.mdx index 4d9c53a..5c5584f 100644 --- a/content/docs/api-service/helm-values.ru.mdx +++ b/content/docs/api-service/helm-values.ru.mdx @@ -145,7 +145,7 @@ Ports the container listens on. The service defaults to 23410-23413 when no conf ## mcp -The MCP endpoint: a read-only HTTP surface AI tooling uses to read the plugin catalog and the easyp.yaml schema. It exposes nothing the anonymous gRPC reads do not, but it sits outside the gRPC interceptor chain — no TLS, no rate limit, no audit — so serving it is a deployment's explicit decision. Off: the container does not listen on ports.mcp and the Service does not publish it. Turn it on inside a trusted network or behind an ingress that terminates TLS. +The MCP endpoint: a read-only HTTP surface AI tooling uses to read the plugin catalog (комментарий в `values.yaml` чарта 1.3.2 всё ещё упоминает схему `easyp.yaml`, хотя этот инструмент был удалён в v0.14.0 — см. [MCP-эндпоинт](/ru/docs/api-service/mcp)). It exposes nothing the anonymous gRPC reads do not, but it sits outside the gRPC interceptor chain — no TLS, no rate limit, no audit — so serving it is a deployment's explicit decision. Off: the container does not listen on ports.mcp and the Service does not publish it. Turn it on inside a trusted network or behind an ingress that terminates TLS. | Ключ | Тип | По умолчанию | Описание | |---|---|---|---| diff --git a/content/docs/api-service/mcp.mdx b/content/docs/api-service/mcp.mdx index be2b75d..58863ee 100644 --- a/content/docs/api-service/mcp.mdx +++ b/content/docs/api-service/mcp.mdx @@ -5,7 +5,7 @@ description: "The optional Model Context Protocol endpoint: what it exposes, how The service can serve a [Model Context Protocol](https://modelcontextprotocol.io) endpoint so that AI tools can look up which plugins and versions a deployment -offers — for example while writing an `easyp.yaml`. +offers — for example while writing an `easyp.gen.yaml` (or `easyp.yaml` in EasyP v0.17). ## What it exposes diff --git a/content/docs/api-service/mcp.ru.mdx b/content/docs/api-service/mcp.ru.mdx index c5c8c11..6a1e463 100644 --- a/content/docs/api-service/mcp.ru.mdx +++ b/content/docs/api-service/mcp.ru.mdx @@ -5,7 +5,7 @@ description: "Необязательный эндпоинт Model Context Protoc Сервис может отдавать эндпоинт [Model Context Protocol](https://modelcontextprotocol.io), чтобы ИИ-инструменты могли узнать, какие плагины и версии есть в развёртывании — -например, при написании `easyp.yaml`. +например, при написании `easyp.gen.yaml` (или `easyp.yaml` в EasyP v0.17). ## Что он отдаёт diff --git a/content/docs/api-service/meta.ru.json b/content/docs/api-service/meta.ru.json new file mode 100644 index 0000000..8819381 --- /dev/null +++ b/content/docs/api-service/meta.ru.json @@ -0,0 +1,24 @@ +{ + "title": "API-сервис", + "pages": [ + "overview", + "quickstart", + "architecture", + "installation", + "helm-values", + "configuration", + "authentication-and-licensing", + "security", + "plugins", + "plugin-catalog", + "client-usage", + "operator-cli", + "observability", + "mcp", + "runbooks", + "backup", + "upgrading", + "vs-buf-bsr", + "migrating-from-bsr" + ] +} diff --git a/content/docs/api-service/migrating-from-bsr.mdx b/content/docs/api-service/migrating-from-bsr.mdx index ff11859..0479601 100644 --- a/content/docs/api-service/migrating-from-bsr.mdx +++ b/content/docs/api-service/migrating-from-bsr.mdx @@ -12,22 +12,25 @@ Information about Buf is current as of 23 September 2026. - A running EasyP API Service reachable from developer machines and CI — [Installation](/docs/api-service/installation). -- The easyp CLI configured for your schemas (`easyp.yaml` with `generate.inputs`). +- The easyp CLI configured for your module (`protobuf.mod` and `easyp.gen.yaml`; + for EasyP v0.17, `easyp.yaml` with `generate.inputs`). - A list of every `remote:` plugin in your `buf.gen.yaml` files, with versions. ## 1. Map plugin names BSR references are `buf.build//:` -([remote plugins](https://buf.build/docs/bsr/remote-plugins/)). EasyP names are -`/:` on your host. The EasyP catalogue follows the same -owners, so the path after the host is usually identical: +([remote plugins](https://buf.build/docs/bsr/remote-plugins/)). On the service +itself, plugins are named `/:`; in EasyP v1 +`easyp.gen.yaml`, the host and path go in `remote:` and the semver tag goes in +`version:`. The EasyP catalogue follows the same owners, so the path after the +host is usually identical: -| BSR `remote:` | EasyP `remote:` | +| BSR `remote:` | EasyP v1 `remote:` + `version:` | |---|---| -| `buf.build/protocolbuffers/go:v1.36.10` | `plugins.example.com/protocolbuffers/go:v1.36.10` | -| `buf.build/grpc/go:v1.5.1` | `plugins.example.com/grpc/go:v1.5.1` | -| `buf.build/connectrpc/go:v1.18.1` | `plugins.example.com/connectrpc/go:v1.18.1` | -| `buf.build/bufbuild/es:v2.2.0` | `plugins.example.com/bufbuild/es:v2.2.0` | +| `buf.build/protocolbuffers/go:v1.36.10` | `plugins.example.com/protocolbuffers/go` + `v1.36.10` | +| `buf.build/grpc/go:v1.5.1` | `plugins.example.com/grpc/go` + `v1.5.1` | +| `buf.build/connectrpc/go:v1.18.1` | `plugins.example.com/connectrpc/go` + `v1.18.1` | +| `buf.build/bufbuild/es:v2.2.0` | `plugins.example.com/bufbuild/es` + `v2.2.0` | Check each one: @@ -40,8 +43,10 @@ Check each one: A plugin missing from the EasyP catalogue needs a recipe of your own — see [Plugins](/docs/api-service/plugins#adding-a-plugin). -Always pin versions. An unpinned EasyP reference resolves to the newest -registered version, which changes the moment you publish a newer one. +Always pin versions. EasyP v1 requires an explicit semver `version:` in +`easyp.gen.yaml`; in direct gRPC/SDK calls or EasyP v0.17 configs, an unpinned +reference resolves to `latest` (the highest registered version), which changes +the moment you publish a newer one. ## 2. Build and publish @@ -76,30 +81,32 @@ plugins: ``` ```yaml -# easyp.yaml -generate: - inputs: - - directory: - path: . - root: proto - plugins: - - remote: "plugins.example.com/protocolbuffers/go:v1.36.10" - out: gen/go - opts: - paths: source_relative - - remote: "plugins.example.com/grpc/go:v1.5.1" - out: gen/go - opts: - paths: source_relative - require_unimplemented_servers: false +# easyp.gen.yaml +version: v1 +plugins: + - remote: plugins.example.com/protocolbuffers/go + version: v1.36.10 + out: gen/go + opts: + paths: source_relative + - remote: plugins.example.com/grpc/go + version: v1.5.1 + out: gen/go + opts: + paths: source_relative + require_unimplemented_servers: false ``` -| buf.gen.yaml | easyp.yaml | +On EasyP v0.17 (`easyp.yaml`), place plugins under `generate.plugins` with +`remote: "plugins.example.com/protocolbuffers/go:v1.36.10"` and declare inputs +under `generate.inputs`. + +| buf.gen.yaml | easyp.gen.yaml | |---|---| -| `plugins[].remote` | `generate.plugins[].remote`, with your host | -| `plugins[].opt` (string or list) | `generate.plugins[].opts` (map) | -| `plugins[].out` | `generate.plugins[].out` | -| `inputs` | `generate.inputs` | +| `plugins[].remote` (`buf.build//:`) | `plugins[].remote` (`//`) + `plugins[].version` (`vX.Y.Z`) | +| `plugins[].opt` (string or list) | `plugins[].opts` (map or string list) | +| `plugins[].out` | `plugins[].out` | +| `inputs` | Module roots in `protobuf.mod`, optionally narrowed with `generate.modules` / `generate.paths` / `generate.packages` | | managed mode | `generate.managed` — see [Generator](/docs/cli/generator) | ## 4. CI @@ -139,7 +146,7 @@ set of input files. The reverse is the same table read right to left. -1. For each `remote:` in `easyp.yaml`, check the plugin exists in the BSR +1. For each `remote:` in `easyp.gen.yaml` (or `easyp.yaml` on v0.17), check the plugin exists in the BSR catalogue (https://buf.build/plugins) at the same version. Internal plugins you registered on EasyP need to become [custom plugins](https://buf.build/docs/bsr/remote-plugins/custom-plugins/) diff --git a/content/docs/api-service/migrating-from-bsr.ru.mdx b/content/docs/api-service/migrating-from-bsr.ru.mdx index ae33b87..53a0c08 100644 --- a/content/docs/api-service/migrating-from-bsr.ru.mdx +++ b/content/docs/api-service/migrating-from-bsr.ru.mdx @@ -12,22 +12,24 @@ description: "Перенос генерации кода с remote plugins Buf - Работающий EasyP API Service, доступный с машин разработчиков и из CI, — [Установка](/ru/docs/api-service/installation). -- easyp CLI, настроенный на ваши схемы (`easyp.yaml` с `generate.inputs`). +- easyp CLI, настроенный на ваш модуль (`protobuf.mod` и `easyp.gen.yaml`; для + EasyP v0.17 — `easyp.yaml` с `generate.inputs`). - Список всех `remote:`-плагинов из ваших `buf.gen.yaml` с версиями. ## 1. Сопоставить имена плагинов Ссылки BSR имеют вид `buf.build//:` -([remote plugins](https://buf.build/docs/bsr/remote-plugins/)). Имена EasyP — -`/:` на вашем хосте. Каталог EasyP повторяет тех же -владельцев, поэтому путь после хоста обычно совпадает: +([remote plugins](https://buf.build/docs/bsr/remote-plugins/)). На самом сервисе +плагины адресуются как `/:`; в EasyP v1 `easyp.gen.yaml` +хост и путь пишутся в `remote:`, а semver-тег — в `version:`. Каталог EasyP +повторяет тех же владельцев, поэтому путь после хоста обычно совпадает: -| `remote:` в BSR | `remote:` в EasyP | +| `remote:` в BSR | `remote:` + `version:` в EasyP v1 | |---|---| -| `buf.build/protocolbuffers/go:v1.36.10` | `plugins.example.com/protocolbuffers/go:v1.36.10` | -| `buf.build/grpc/go:v1.5.1` | `plugins.example.com/grpc/go:v1.5.1` | -| `buf.build/connectrpc/go:v1.18.1` | `plugins.example.com/connectrpc/go:v1.18.1` | -| `buf.build/bufbuild/es:v2.2.0` | `plugins.example.com/bufbuild/es:v2.2.0` | +| `buf.build/protocolbuffers/go:v1.36.10` | `plugins.example.com/protocolbuffers/go` + `v1.36.10` | +| `buf.build/grpc/go:v1.5.1` | `plugins.example.com/grpc/go` + `v1.5.1` | +| `buf.build/connectrpc/go:v1.18.1` | `plugins.example.com/connectrpc/go` + `v1.18.1` | +| `buf.build/bufbuild/es:v2.2.0` | `plugins.example.com/bufbuild/es` + `v2.2.0` | Проверьте каждый: @@ -40,9 +42,10 @@ description: "Перенос генерации кода с remote plugins Buf Для плагина, которого нет в каталоге EasyP, нужен собственный рецепт — см. [Плагины](/ru/docs/api-service/plugins#adding-a-plugin). -Всегда фиксируйте версии. Незафиксированная ссылка EasyP разрешается в самую -новую зарегистрированную версию, а она меняется, как только вы публикуете более -новую. +Всегда фиксируйте версии. EasyP v1 требует явную semver-версию в `version:` +файла `easyp.gen.yaml`; в прямых вызовах gRPC/SDK или в конфигах EasyP v0.17 +незафиксированная ссылка разрешается в `latest` (самую новую зарегистрированную +версию), а она меняется, как только вы публикуете более новую. ## 2. Собрать и опубликовать @@ -77,30 +80,32 @@ plugins: ``` ```yaml -# easyp.yaml -generate: - inputs: - - directory: - path: . - root: proto - plugins: - - remote: "plugins.example.com/protocolbuffers/go:v1.36.10" - out: gen/go - opts: - paths: source_relative - - remote: "plugins.example.com/grpc/go:v1.5.1" - out: gen/go - opts: - paths: source_relative - require_unimplemented_servers: false +# easyp.gen.yaml +version: v1 +plugins: + - remote: plugins.example.com/protocolbuffers/go + version: v1.36.10 + out: gen/go + opts: + paths: source_relative + - remote: plugins.example.com/grpc/go + version: v1.5.1 + out: gen/go + opts: + paths: source_relative + require_unimplemented_servers: false ``` -| buf.gen.yaml | easyp.yaml | +В EasyP v0.17 (`easyp.yaml`) плагины описываются в `generate.plugins` как +`remote: "plugins.example.com/protocolbuffers/go:v1.36.10"`, а входные каталоги +— в `generate.inputs`. + +| buf.gen.yaml | easyp.gen.yaml | |---|---| -| `plugins[].remote` | `generate.plugins[].remote`, с вашим хостом | -| `plugins[].opt` (строка или список) | `generate.plugins[].opts` (карта) | -| `plugins[].out` | `generate.plugins[].out` | -| `inputs` | `generate.inputs` | +| `plugins[].remote` (`buf.build//:`) | `plugins[].remote` (`//`) + `plugins[].version` (`vX.Y.Z`) | +| `plugins[].opt` (строка или список) | `plugins[].opts` (карта или список строк) | +| `plugins[].out` | `plugins[].out` | +| `inputs` | Корни модуля в `protobuf.mod`, при необходимости суженные через `generate.modules` / `generate.paths` / `generate.packages` | | managed mode | `generate.managed` — см. [Генератор](/ru/docs/cli/generator) | ## 4. CI @@ -141,7 +146,7 @@ easyp generate && diff -r gen.buf gen Обратный путь — та же таблица, прочитанная справа налево. -1. Для каждого `remote:` в `easyp.yaml` убедитесь, что плагин есть в каталоге BSR +1. Для каждого `remote:` в `easyp.gen.yaml` (или `easyp.yaml` в v0.17) убедитесь, что плагин есть в каталоге BSR (https://buf.build/plugins) в той же версии. Внутренние плагины, которые вы регистрировали в EasyP, придётся превратить в [custom plugins](https://buf.build/docs/bsr/remote-plugins/custom-plugins/) diff --git a/content/docs/api-service/overview.mdx b/content/docs/api-service/overview.mdx index 39f7665..193ec2b 100644 --- a/content/docs/api-service/overview.mdx +++ b/content/docs/api-service/overview.mdx @@ -23,9 +23,10 @@ files you generate from never leave your network. - **Nobody decides which versions are allowed.** Without a central list, a plugin version is whatever someone last installed. -With the service, the plugin version is part of the configuration -(`remote: host/protocolbuffers/go:v1.36.10`), and the binary behind that name is -the same for every caller. +With the service, the plugin version is part of `easyp.gen.yaml` +(`remote: host/protocolbuffers/go` with `version: v1.36.10`; in EasyP v0.17, +`remote: "host/protocolbuffers/go:v1.36.10"` in `easyp.yaml`), and the binary +behind that name is the same for every caller. ## How it works diff --git a/content/docs/api-service/overview.ru.mdx b/content/docs/api-service/overview.ru.mdx index 003e6b9..4440684 100644 --- a/content/docs/api-service/overview.ru.mdx +++ b/content/docs/api-service/overview.ru.mdx @@ -23,9 +23,10 @@ EasyP API Service запускает плагины генерации кода - **Никто не решает, какие версии разрешены.** Без центрального списка версия плагина — та, что кто-то установил последней. -С сервисом версия плагина становится частью конфигурации -(`remote: host/protocolbuffers/go:v1.36.10`), и бинарник за этим именем -одинаков для всех вызывающих. +С сервисом версия плагина становится частью `easyp.gen.yaml` +(`remote: host/protocolbuffers/go` с `version: v1.36.10`; в EasyP v0.17 — +`remote: "host/protocolbuffers/go:v1.36.10"` в `easyp.yaml`), и бинарник за этим +именем одинаков для всех вызывающих. ## Как это работает diff --git a/content/docs/api-service/plugin-catalog.mdx b/content/docs/api-service/plugin-catalog.mdx index 6be29b5..b67ba4c 100644 --- a/content/docs/api-service/plugin-catalog.mdx +++ b/content/docs/api-service/plugin-catalog.mdx @@ -9,21 +9,22 @@ This is the catalogue in the service repository at **v1.3.2**: **80 plugins** th **1522 distinct versions**. Each entry is a build recipe in `registry/`, not a plugin that is running somewhere — a deployment has only the versions its operator built and registered (a Community licence allows 10 versions). See [Plugins](/docs/api-service/plugins) for how to build and -register them, and [Client usage](/docs/api-service/client-usage) for `easyp.yaml`. +register them, and [Client usage](/docs/api-service/client-usage) for `easyp.gen.yaml`. What is registered on the public registry right now is on [Plugins on plugins.easyp.tech](/plugins). -Once a version is registered on your service, reference it as: +Once a version is registered on your service, reference it in `easyp.gen.yaml` as: ```yaml -generate: - plugins: - - remote: "plugins.example.com/protocolbuffers/go:v1.36.10" - out: gen/go +version: v1 +plugins: + - remote: plugins.example.com/protocolbuffers/go + version: v1.36.10 + out: gen/go ``` -Pin the version. Without one the service uses `latest`, the highest registered version compared by number (`v1.36.11` over `v1.36.9`), which changes whenever a newer version is published. The versions below are sorted newest first. +Pin an explicit semver version. EasyP v1 CLI requires a separate `version:` field in `easyp.gen.yaml` and rejects `:version` suffixes or `latest` (on EasyP v0.17 `easyp.yaml`, use `remote: "plugins.example.com/protocolbuffers/go:v1.36.10"`). Direct gRPC/SDK callers or v0.17 configs that omit a version get `latest` — the highest registered version compared by number (`v1.36.11` over `v1.36.9`), which changes whenever a newer version is published. The versions below are sorted newest first. diff --git a/content/docs/api-service/plugin-catalog.ru.mdx b/content/docs/api-service/plugin-catalog.ru.mdx index c4c6694..637d54c 100644 --- a/content/docs/api-service/plugin-catalog.ru.mdx +++ b/content/docs/api-service/plugin-catalog.ru.mdx @@ -9,22 +9,23 @@ description: "Все рецепты плагинов, которые поста **1522 различных версий**. Каждая запись — рецепт сборки в `registry/`, а не плагин, который где-то уже работает: в развёртывании есть только версии, которые оператор собрал и зарегистрировал (лицензия Community допускает 10 версий). Как их собрать и зарегистрировать — -в [Плагинах](/ru/docs/api-service/plugins), как указать в `easyp.yaml` — в +в [Плагинах](/ru/docs/api-service/plugins), как указать в `easyp.gen.yaml` — в [Подключении клиентов](/ru/docs/api-service/client-usage). Что прямо сейчас зарегистрировано в публичном реестре — на странице [Плагины на plugins.easyp.tech](/ru/plugins). -Когда версия зарегистрирована на вашем сервисе, ссылайтесь на неё так: +Когда версия зарегистрирована на вашем сервисе, ссылайтесь на неё в `easyp.gen.yaml` так: ```yaml -generate: - plugins: - - remote: "plugins.example.com/protocolbuffers/go:v1.36.10" - out: gen/go +version: v1 +plugins: + - remote: plugins.example.com/protocolbuffers/go + version: v1.36.10 + out: gen/go ``` -Фиксируйте версию. Без неё сервис берёт `latest` — самую новую зарегистрированную версию при сравнении номеров как чисел (`v1.36.11` новее `v1.36.9`), а она меняется при каждой публикации более новой версии. Версии ниже отсортированы от новых к старым. +Фиксируйте явную semver-версию. EasyP v1 CLI требует отдельное поле `version:` в `easyp.gen.yaml` и отклоняет суффикс `:version` и `latest` (в EasyP v0.17 для `easyp.yaml` указывайте `remote: "plugins.example.com/protocolbuffers/go:v1.36.10"`). Прямые вызовы gRPC/SDK или конфиги v0.17 без версии получают `latest` — самую новую зарегистрированную версию при сравнении номеров как чисел (`v1.36.11` новее `v1.36.9`), а она меняется при каждой публикации более новой версии. Версии ниже отсортированы от новых к старым. diff --git a/content/docs/api-service/quickstart.mdx b/content/docs/api-service/quickstart.mdx index 3183ed0..2da8b14 100644 --- a/content/docs/api-service/quickstart.mdx +++ b/content/docs/api-service/quickstart.mdx @@ -121,30 +121,30 @@ service. ## 5. Generate code -In a project with `.proto` files under `proto/`: +In a project with `.proto` files (for example with `roots proto` in +`protobuf.mod`), create `easyp.gen.yaml`: ```yaml -# easyp.yaml -generate: - inputs: - - directory: - path: . - root: proto - plugins: - - remote: "localhost:23410/protocolbuffers/go:v1.36.10" - out: gen/go - opts: - paths: source_relative +# easyp.gen.yaml +version: v1 +plugins: + - remote: localhost:23410/protocolbuffers/go + version: v1.36.10 + out: gen/go + opts: + paths: source_relative ``` ```bash easyp generate ``` -The CLI talks plaintext to `localhost` and TLS to any other host. `latest` is -the highest registered version, but pin the version in `remote:` anyway: -`latest` moves when a newer version is registered, and generated code changes -with it. See [Client usage](/docs/api-service/client-usage). +The CLI talks plaintext to `localhost` and TLS to any other host. EasyP v1 +requires an explicit semver `version:` field in `easyp.gen.yaml` and rejects +`:version` inside `remote:` or `latest`. On EasyP v0.17, configure the same +plugin in `easyp.yaml` under `generate.plugins` as +`remote: "localhost:23410/protocolbuffers/go:v1.36.10"`. See +[Client usage](/docs/api-service/client-usage). ## Running from source diff --git a/content/docs/api-service/quickstart.ru.mdx b/content/docs/api-service/quickstart.ru.mdx index 5992646..ab7090f 100644 --- a/content/docs/api-service/quickstart.ru.mdx +++ b/content/docs/api-service/quickstart.ru.mdx @@ -120,20 +120,18 @@ go run ./cmd/easyp-svc plugins publish \ ## 5. Сгенерировать код -В проекте с `.proto`-файлами в `proto/`: +В проекте с `.proto`-файлами (например, с `roots proto` в `protobuf.mod`) +создайте `easyp.gen.yaml`: ```yaml -# easyp.yaml -generate: - inputs: - - directory: - path: . - root: proto - plugins: - - remote: "localhost:23410/protocolbuffers/go:v1.36.10" - out: gen/go - opts: - paths: source_relative +# easyp.gen.yaml +version: v1 +plugins: + - remote: localhost:23410/protocolbuffers/go + version: v1.36.10 + out: gen/go + opts: + paths: source_relative ``` ```bash @@ -141,9 +139,10 @@ easyp generate ``` С `localhost` CLI работает без шифрования, с любым другим хостом — по TLS. -`latest` — самая новая зарегистрированная версия, но версию в `remote:` всё -равно фиксируйте: `latest` сдвигается, как только регистрируют более новую, и -сгенерированный код меняется вместе с ней. Подробнее — в +EasyP v1 требует явную semver-версию в отдельном поле `version:` в +`easyp.gen.yaml` и отклоняет `:version` внутри `remote:` и `latest`. В EasyP +v0.17 тот же плагин указывается в `easyp.yaml` внутри `generate.plugins` как +`remote: "localhost:23410/protocolbuffers/go:v1.36.10"`. Подробнее — в [Подключении клиентов](/ru/docs/api-service/client-usage). ## Запуск из исходников diff --git a/content/docs/api-service/runbooks.mdx b/content/docs/api-service/runbooks.mdx index 5d57b1d..db9c07e 100644 --- a/content/docs/api-service/runbooks.mdx +++ b/content/docs/api-service/runbooks.mdx @@ -29,15 +29,18 @@ rather than the service, and on Kubernetes the cluster owns that ground. The licence stops being valid within `prometheusRule.licenceExpiryWarningDays`. Nothing breaks at expiry — the token also carries a grace period — but at the end -of that, the tier drops to community: audit stops, workers cap at 4, plugin -registration starts refusing past 10. All of it silent. +of that, the tier drops to Community on the running process: audit stops and +plugin registration starts refusing past 10 versions immediately, while the +`worker_pool.workers` (4) and `worker_pool.max_concurrent_generations` (16) +ceilings take effect on restart (logged at `Warn`). All of it silent for clients. 1. Confirm what the service actually loaded, rather than what you think it has: - `kubectl logs deploy/$REL | grep -i licen`, or + `kubectl logs statefulset/$REL | grep -i licen`, or `docker logs easyp-api-enterprise 2>&1 | grep -i licen` 2. Check `easyp_license_expiry_timestamp_seconds` against `time()`. -3. Get a renewed token, put it in the secret as `LICENSE_KEY` (on compose, in - `~/easyp/.env`), and restart — `kubectl rollout restart deploy/$REL`, or +3. Get a renewed token, put it in the secret as `LICENSE_KEY` (or replace the + file pointed to by `LICENSE_FILE`; on compose, update `~/easyp/.env`), and + restart — `kubectl rollout restart statefulset/$REL`, or `docker compose ... up -d --force-recreate service-enterprise`. The licence is read at startup. @@ -133,14 +136,14 @@ Consequence: future partitions stop being created. Once the newest existing partition is passed, audit rows land in the default partition (see below), and if there is no default either, writes fail outright. -1. `kubectl logs deploy/$REL | grep -i partition`, or +1. `kubectl logs statefulset/$REL | grep -i partition`, or `docker logs easyp-api-enterprise 2>&1 | grep -i partition` — the failure is logged with the reason. 2. Most often a permissions problem: the role needs to CREATE and DROP tables in the schema, not merely write rows. 3. Check `easyp_audit_partition_maintenance_last_success_seconds` recovers after - the next interval. Do not wait a full 6h to find out — restart the deployment - to force a run. + the next interval. Do not wait a full 6h to find out — restart the StatefulSet + (`kubectl rollout restart statefulset/$REL`) to force a run. ## EasypAuditDefaultPartitionUsed @@ -225,7 +228,7 @@ The service recovered from a panic. It kept running — that is what the barrier for — but a recovered panic is still a bug, and the counter exists so that it is not silent. -`kubectl logs deploy/$REL | grep -A30 panic` for the stack, or +`kubectl logs statefulset/$REL | grep -A30 panic` for the stack, or `docker logs easyp-api-enterprise 2>&1 | grep -A30 panic`. The counter has no labels; the log line around the stack trace says which unit of work panicked — a gRPC handler, a pool worker, or the audit writer. @@ -240,7 +243,8 @@ Write credentials are being rejected faster than By default reads are anonymous, so everything here is a mutating call: CreatePlugin, UpdatePlugin, DeletePlugin. With -`config.auth.requireAuthentication` on, reads count too — and every easyp CLI +`auth.require_authentication: true` (`AUTH_REQUIRE_AUTHENTICATION=true`, set via +`extraEnv` in Helm) on, reads count too — and every easyp CLI user is a failure, since the CLI sends no token. The `reason` label separates `no_credentials` (nothing sent) from `unknown_token` (a token that matches no digest). diff --git a/content/docs/api-service/runbooks.ru.mdx b/content/docs/api-service/runbooks.ru.mdx index c347f73..cb237d3 100644 --- a/content/docs/api-service/runbooks.ru.mdx +++ b/content/docs/api-service/runbooks.ru.mdx @@ -31,16 +31,19 @@ compose-стек, — и всерьёз работало только одно: `prometheusRule.licenceExpiryWarningDays`. В момент истечения ничего не ломается — токен несёт ещё и грейс-период, — но по -его окончании тир падает до community: аудит прекращается, воркеры упираются в -4, регистрация плагинов начинает отказывать после 10. И всё это молча. +его окончании на работающем процессе тир падает до Community: аудит прекращается +и регистрация плагинов начинает отказывать после 10 версий сразу, а потолки +`worker_pool.workers` (4) и `worker_pool.max_concurrent_generations` (16) +вступают в силу при перезапуске (пишется `Warn` в лог). Для клиентов всё это +происходит молча. 1. Убедитесь, что сервис действительно загрузил то, что вы думаете: - `kubectl logs deploy/$REL | grep -i licen` или + `kubectl logs statefulset/$REL | grep -i licen` или `docker logs easyp-api-enterprise 2>&1 | grep -i licen` 2. Сравните `easyp_license_expiry_timestamp_seconds` с `time()`. -3. Получите обновлённый токен, положите его в секрет как `LICENSE_KEY` (в - compose — в `~/easyp/.env`) и перезапустите: - `kubectl rollout restart deploy/$REL` либо +3. Получите обновлённый токен, положите его в секрет как `LICENSE_KEY` (либо + обновите файл, на который указывает `LICENSE_FILE`; в compose — `~/easyp/.env`) + и перезапустите: `kubectl rollout restart statefulset/$REL` либо `docker compose ... up -d --force-recreate service-enterprise`. Лицензия читается при старте. @@ -139,14 +142,15 @@ Reason у отказа — `SERVER_OVERLOADED`. Алерт смотрит на существующая партиция пройдена, строки аудита попадают в партицию по умолчанию (см. ниже), а если и её нет — записи падают вовсе. -1. `kubectl logs deploy/$REL | grep -i partition` либо +1. `kubectl logs statefulset/$REL | grep -i partition` либо `docker logs easyp-api-enterprise 2>&1 | grep -i partition` — отказ залогирован с причиной. 2. Чаще всего это права: роли нужно CREATE и DROP таблиц в схеме, а не только запись строк. 3. Проверьте, что `easyp_audit_partition_maintenance_last_success_seconds` восстанавливается после следующего интервала. Не ждите все 6ч, чтобы это - выяснить, — перезапустите деплоймент, чтобы форсировать прогон. + выяснить, — перезапустите StatefulSet + (`kubectl rollout restart statefulset/$REL`), чтобы форсировать прогон. ## EasypAuditDefaultPartitionUsed @@ -234,7 +238,7 @@ COMMIT; перехваченная паника всё равно баг, и счётчик существует, чтобы она не была молчаливой. -`kubectl logs deploy/$REL | grep -A30 panic` за стеком либо +`kubectl logs statefulset/$REL | grep -A30 panic` за стеком либо `docker logs easyp-api-enterprise 2>&1 | grep -A30 panic`. У счётчика нет меток; какая единица работы запаниковала — gRPC-хендлер, воркер пула или писатель аудита, — видно из строки лога рядом со стеком. @@ -249,7 +253,8 @@ COMMIT; По умолчанию чтения анонимны, поэтому всё здесь — мутирующие вызовы: CreatePlugin, UpdatePlugin, DeletePlugin. С включённым -`config.auth.requireAuthentication` считаются и чтения — и каждый пользователь +`auth.require_authentication: true` (`AUTH_REQUIRE_AUTHENTICATION=true`, в Helm +задаётся через `extraEnv`) считаются и чтения — и каждый пользователь easyp CLI даёт отказ, потому что CLI не отправляет токен. Метка `reason` отличает `no_credentials` (ничего не прислали) от `unknown_token` (токен не совпал ни с одним дайджестом). diff --git a/content/docs/api-service/security.mdx b/content/docs/api-service/security.mdx index e2aba4b..6ad86c3 100644 --- a/content/docs/api-service/security.mdx +++ b/content/docs/api-service/security.mdx @@ -27,8 +27,10 @@ Everything below follows from that. - **Memory.** A plugin can allocate until the container or host kills something. - **CPU.** Beyond the number of concurrent plugins, nothing. - **Filesystem.** Whatever the service user can read and write: the plugin - cache (every other plugin's binaries), `/tmp`, any mounted secret files. The - working directory is the service's. + cache (every other plugin's binaries), `/tmp`, any mounted secret files. Each + invocation starts in a fresh temporary working directory under + `plugins_dir/.tmp` (deleted after the run), which isolates relative writes + between runs but does not restrict access to the rest of the filesystem. - **Network.** Whatever the service can reach: PostgreSQL, object storage, the cloud metadata endpoint, the internet. - **Processes and syscalls.** The service applies no seccomp profile, diff --git a/content/docs/api-service/security.ru.mdx b/content/docs/api-service/security.ru.mdx index 98cab15..8ef947d 100644 --- a/content/docs/api-service/security.ru.mdx +++ b/content/docs/api-service/security.ru.mdx @@ -30,7 +30,9 @@ description: "Что плагин может сделать на хосте се - **CPU.** Кроме числа одновременных плагинов — ничего. - **Файловую систему.** Всё, что может читать и писать пользователь сервиса: кеш плагинов (бинарники всех остальных плагинов), `/tmp`, смонтированные файлы - секретов. Рабочая директория — директория сервиса. + секретов. Каждый запуск получает свежий временный рабочий каталог в + `plugins_dir/.tmp` (удаляется после завершения), что разделяет относительные + записи между запусками, но не ограничивает доступ к остальной файловой системе. - **Сеть.** Всё, куда может достучаться сервис: PostgreSQL, объектное хранилище, эндпоинт метаданных облака, интернет. - **Процессы и системные вызовы.** Сервис сам не применяет к процессу плагина diff --git a/content/docs/api-service/upgrading.mdx b/content/docs/api-service/upgrading.mdx index 8fa2e86..d722471 100644 --- a/content/docs/api-service/upgrading.mdx +++ b/content/docs/api-service/upgrading.mdx @@ -34,12 +34,14 @@ A rename is handled without breaking anyone: the old configuration key keeps working for one release while warning, naming both spellings and the line to change, and only then stops. -## v1.3.0 → v1.3.1 +## v1.3.0 → v1.3.2 -v1.3.1 was tagged but never published: the release job's image scan stopped it -before anything left the runner. v1.3.2 carries the same changes plus a -dependency fix, so upgrade from v1.3.0 straight to v1.3.2. Only the `api/v1.3.1` -and `sdk/v1.3.1` Go modules exist under that number. +v1.3.1 was tagged but never published: the release job's image scan stopped it on +CVE-2026-78661 in `golang.org/x/net` v0.61.0 before anything left the runner. +v1.3.2 bumps `x/net` to v0.62.0 and ships all of the v1.3.1 changes below, so +upgrade from v1.3.0 straight to v1.3.2. Only the `api/v1.3.1` and `sdk/v1.3.1` +Go modules exist under that number (upgrading those modules from `v1.3.1` to +`v1.3.2` is the `x/net` update only). ### `latest` resolves to the highest version number @@ -48,8 +50,10 @@ above `v1.36.11`. It now compares versions component by component, a missing patch counting as zero. **A registry holding such versions serves a different `latest` after the upgrade**: on plugins.easyp.tech `protocolbuffers/go:latest` moved from v1.36.9 to v1.36.11 and `bufbuild/es:latest` from v2.9.0 to v2.12.0, -nine plugins of 80 in all. An unpinned `remote:` generates different code from -the first run after the upgrade; pin the version to keep the old output. +nine plugins of 80 in all. An unpinned `remote:` (from direct gRPC/SDK callers or +EasyP v0.17 `easyp.yaml`; EasyP v1 `easyp.gen.yaml` requires an explicit +`version:`) generates different code from the first run after the upgrade; pin +the version to keep the old output. ### MCP `plugins_list` items carry `createdAt` @@ -114,9 +118,10 @@ version is accepted until the count is below the limit. The SDK and `easyp-svc` dial a plain `host:port` through `passthrough:///`, so the operating system resolves the name when connecting. A host without a port -gets 443, as before. Prefix `dns:///` to use grpc-go's own resolver. The `easyp` -CLI gets the same change for remote plugins in its next release; until then -`easyp generate` still uses grpc-go's resolver. +gets 443, as before. Prefix `dns:///` to use grpc-go's own resolver. In the +`easyp` CLI, the `passthrough:///` fix is already merged on `main` and ships in +`v1.0.0` (it always dials remote plugins through `passthrough:///`, with no +`dns:///` prefix needed or accepted). ### The rate limit says how long to wait diff --git a/content/docs/api-service/upgrading.ru.mdx b/content/docs/api-service/upgrading.ru.mdx index 7899e88..5250f05 100644 --- a/content/docs/api-service/upgrading.ru.mdx +++ b/content/docs/api-service/upgrading.ru.mdx @@ -34,12 +34,15 @@ description: "Заметки по обновлению API Service от рели работать один релиз, предупреждая и называя оба написания и строку, которую надо поправить, и только после этого перестаёт. -## v1.3.0 → v1.3.1 +## v1.3.0 → v1.3.2 Тег v1.3.1 поставлен, но релиз так и не вышел: сканер образа в релизной сборке -остановил его до того, как что-либо было опубликовано. В v1.3.2 те же изменения -плюс исправленная зависимость, так что обновляйтесь с v1.3.0 сразу на v1.3.2. -Под номером v1.3.1 существуют только Go-модули `api/v1.3.1` и `sdk/v1.3.1`. +остановил его из-за CVE-2026-78661 в `golang.org/x/net` v0.61.0 до того, как +что-либо было опубликовано. В v1.3.2 зависимость `x/net` обновлена до v0.62.0 и +включены все изменения v1.3.1 ниже, так что обновляйтесь с v1.3.0 сразу на +v1.3.2. Под номером v1.3.1 существуют только Go-модули `api/v1.3.1` и +`sdk/v1.3.1` (их обновление с `v1.3.1` до `v1.3.2` содержит только обновление +`x/net`). ### `latest` — самая новая версия по номеру @@ -48,8 +51,10 @@ description: "Заметки по обновлению API Service от рели считается нулём. **Реестр с такими версиями после обновления отдаёт другой `latest`**: на plugins.easyp.tech `protocolbuffers/go:latest` сменился с v1.36.9 на v1.36.11, а `bufbuild/es:latest` — с v2.9.0 на v2.12.0, всего девять плагинов -из 80. Незафиксированный `remote:` с первого запуска после обновления -сгенерирует другой код; чтобы оставить прежний результат, зафиксируйте версию. +из 80. Незафиксированный `remote:` (в прямых вызовах gRPC/SDK или в EasyP v0.17 +`easyp.yaml`; EasyP v1 `easyp.gen.yaml` требует явное поле `version:`) с первого +запуска после обновления сгенерирует другой код; чтобы оставить прежний +результат, зафиксируйте версию. ### Элементы `plugins_list` в MCP несут `createdAt` @@ -117,8 +122,9 @@ description: "Заметки по обновлению API Service от рели SDK и `easyp-svc` подключаются к обычному `host:port` через `passthrough:///`, и имя разрешает операционная система в момент соединения. Хост без порта, как и раньше, получает 443. Чтобы использовать собственный резолвер grpc-go, укажите -префикс `dns:///`. CLI `easyp` получит то же изменение для удалённых плагинов в -следующем релизе; до тех пор `easyp generate` использует резолвер grpc-go. +префикс `dns:///`. В CLI `easyp` исправление с `passthrough:///` уже влито в +`main` и входит в `v1.0.0` (CLI всегда подключается к удалённым плагинам через +`passthrough:///`, префикс `dns:///` не нужен и не используется). ### Rate limit говорит, сколько ждать diff --git a/content/docs/api-service/vs-buf-bsr.mdx b/content/docs/api-service/vs-buf-bsr.mdx index 4484f68..352c9d1 100644 --- a/content/docs/api-service/vs-buf-bsr.mdx +++ b/content/docs/api-service/vs-buf-bsr.mdx @@ -115,7 +115,7 @@ Both have an MCP endpoint, with different scope: EasyP's lists plugins - `buf generate` with `remote:` talks to a BSR instance. The EasyP service does not implement the BSR API, so `buf` cannot use it as a remote. - `easyp generate` with `remote:` speaks EasyP's `easyp.generator.v1` API. - `remote: buf.build/...` in `easyp.yaml` does not reach Buf's remote plugins. + `remote: buf.build/...` in `easyp.gen.yaml` does not reach Buf's remote plugins. - Both run standard `protoc` plugins over `CodeGeneratorRequest`, so the same plugin version produces the same output on either; the plugin names are largely the same (`protocolbuffers/go`, `grpc/go`, `connectrpc/go`, …). diff --git a/content/docs/api-service/vs-buf-bsr.ru.mdx b/content/docs/api-service/vs-buf-bsr.ru.mdx index ddf6c73..0117beb 100644 --- a/content/docs/api-service/vs-buf-bsr.ru.mdx +++ b/content/docs/api-service/vs-buf-bsr.ru.mdx @@ -116,7 +116,7 @@ MCP-эндпоинт есть у обоих, но с разным охватом - `buf generate` с `remote:` обращается к инстансу BSR. Сервис EasyP не реализует API BSR, поэтому `buf` не может использовать его как remote. - `easyp generate` с `remote:` говорит на API EasyP `easyp.generator.v1`. - `remote: buf.build/...` в `easyp.yaml` не попадёт в remote plugins Buf. + `remote: buf.build/...` в `easyp.gen.yaml` не попадёт в remote plugins Buf. - Оба запускают стандартные `protoc`-плагины через `CodeGeneratorRequest`, так что одна и та же версия плагина даёт одинаковый результат; имена плагинов в основном совпадают (`protocolbuffers/go`, `grpc/go`, `connectrpc/go`, …). diff --git a/scripts/sync-plugin-catalog.mjs b/scripts/sync-plugin-catalog.mjs index 7d36669..29f4ed8 100644 --- a/scripts/sync-plugin-catalog.mjs +++ b/scripts/sync-plugin-catalog.mjs @@ -153,12 +153,12 @@ const text = { `**${buildableCount} distinct versions**. Each entry is a build recipe in \`registry/\`, not a plugin that`, 'is running somewhere — a deployment has only the versions its operator built and registered', '(a Community licence allows 10 versions). See [Plugins](/docs/api-service/plugins) for how to build and', - 'register them, and [Client usage](/docs/api-service/client-usage) for `easyp.yaml`.', + 'register them, and [Client usage](/docs/api-service/client-usage) for `easyp.gen.yaml`.', '', 'What is registered on the public registry right now is on [Plugins on plugins.easyp.tech](/plugins).', ], - usage: 'Once a version is registered on your service, reference it as:', - pin: 'Pin the version. Without one the service uses `latest`, the highest registered version compared by number (`v1.36.11` over `v1.36.9`), which changes whenever a newer version is published. The versions below are sorted newest first.', + usage: 'Once a version is registered on your service, reference it in `easyp.gen.yaml` as:', + pin: 'Pin an explicit semver version. EasyP v1 CLI requires a separate `version:` field in `easyp.gen.yaml` and rejects `:version` suffixes or `latest` (on EasyP v0.17 `easyp.yaml`, use `remote: "plugins.example.com/protocolbuffers/go:v1.36.10"`). Direct gRPC/SDK callers or v0.17 configs that omit a version get `latest` — the highest registered version compared by number (`v1.36.11` over `v1.36.9`), which changes whenever a newer version is published. The versions below are sorted newest first.', pinnedTitle: 'Recipes that build one version only', pinned: [ `${pinnedPlugins.length} recipes — ${pinnedNames} — list several versions in \`plugin.yaml\` (${versionCount - buildableCount + pinnedPlugins.length} in total), but their`, @@ -182,13 +182,13 @@ const text = { `**${buildableCount} различных версий**. Каждая запись — рецепт сборки в \`registry/\`, а не плагин, который`, 'где-то уже работает: в развёртывании есть только версии, которые оператор собрал и', 'зарегистрировал (лицензия Community допускает 10 версий). Как их собрать и зарегистрировать —', - 'в [Плагинах](/ru/docs/api-service/plugins), как указать в `easyp.yaml` — в', + 'в [Плагинах](/ru/docs/api-service/plugins), как указать в `easyp.gen.yaml` — в', '[Подключении клиентов](/ru/docs/api-service/client-usage).', '', 'Что прямо сейчас зарегистрировано в публичном реестре — на странице [Плагины на plugins.easyp.tech](/ru/plugins).', ], - usage: 'Когда версия зарегистрирована на вашем сервисе, ссылайтесь на неё так:', - pin: 'Фиксируйте версию. Без неё сервис берёт `latest` — самую новую зарегистрированную версию при сравнении номеров как чисел (`v1.36.11` новее `v1.36.9`), а она меняется при каждой публикации более новой версии. Версии ниже отсортированы от новых к старым.', + usage: 'Когда версия зарегистрирована на вашем сервисе, ссылайтесь на неё в `easyp.gen.yaml` так:', + pin: 'Фиксируйте явную semver-версию. EasyP v1 CLI требует отдельное поле `version:` в `easyp.gen.yaml` и отклоняет суффикс `:version` и `latest` (в EasyP v0.17 для `easyp.yaml` указывайте `remote: "plugins.example.com/protocolbuffers/go:v1.36.10"`). Прямые вызовы gRPC/SDK или конфиги v0.17 без версии получают `latest` — самую новую зарегистрированную версию при сравнении номеров как чисел (`v1.36.11` новее `v1.36.9`), а она меняется при каждой публикации более новой версии. Версии ниже отсортированы от новых к старым.', pinnedTitle: 'Рецепты, которые собирают только одну версию', pinned: [ `${pinnedPlugins.length} рецептов — ${pinnedNames} — перечисляют в \`plugin.yaml\` несколько версий (всего ${versionCount - buildableCount + pinnedPlugins.length}), но их`, @@ -232,10 +232,11 @@ function render(lang) { t.usage, '', '```yaml', - 'generate:', - ' plugins:', - ' - remote: "plugins.example.com/protocolbuffers/go:v1.36.10"', - ' out: gen/go', + 'version: v1', + 'plugins:', + ' - remote: plugins.example.com/protocolbuffers/go', + ' version: v1.36.10', + ' out: gen/go', '```', '', '',