core/buf.yaml
Alex Dunmow 051253396c fix(proto): narrow core generation to plugin_registry.proto only
When the orchestrator imports `block/core/internal/api/orchestrator/v1`
transitively through other core packages and also generates its own
bindings for the same files (accounts.proto etc.), proto registration
panics at startup: "file ... is already registered". Tests in the
orchestrator confirmed this.

Fix:
- buf generate now uses --path to limit core's output to
  proto/orchestrator/v1/plugin_registry.proto (see new `make proto`).
- Adds a minimal MyAccount message and PluginAuthService.ListMyAccounts
  RPC to plugin_registry.proto (already pushed to block/proto) so the
  CLI's account picker no longer needs accounts.proto generated.
- CLI switches back to cli.Auth.ListMyAccounts; orchclient.Client drops
  the Account field.

Side effect: every previously-generated orchestrator/v1 binding besides
plugin_registry is removed from this module.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 20:53:44 +08:00

20 lines
659 B
YAML

version: v2
# proto/ is a git submodule pointing at block/proto. We only need
# plugin_registry.proto for the CLI in this module; the rest of orchestrator/v1
# is generated by the orchestrator from its own copy and would panic at startup
# with "file ... is already registered" if both packages registered the same
# descriptors. buf doesn't support per-file include/exclude in the module
# config, so the narrowing happens via `buf generate --path` invoked from the
# Makefile (see the `proto` target).
modules:
- path: proto
lint:
use:
- STANDARD
except:
- PACKAGE_SAME_GO_PACKAGE
- RPC_REQUEST_RESPONSE_UNIQUE
breaking:
use:
- FILE