3 Commits

Author SHA1 Message Date
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
Alex Dunmow
35436581b9 feat(proto): consume canonical block/proto as a submodule
Remove core's local proto/ fork and pull the canonical block/proto repo in
as a submodule at the same path. buf.yaml now sources from the submodule's
orchestrator/v1 namespace; everything outside that (blockninja, helpdesk)
is excluded from generation.

This brings the orchestrator's local-only RPCs (PluginScopeService.ListMyPlugins,
PluginRegistryService.SubmitForReview, the full PluginModerationService) into
core's bindings — harmless surface area for the CLI, prerequisite for the
orchestrator to also stop forking the proto.

Side effect: the CLI's account picker now uses the canonical
AccountService.ListMyAccounts in accounts.proto rather than the duplicate
PluginAuthService.ListMyAccounts that lived only in core's fork. The
existing Account message uses Name (no DisplayName / Role), so the picker
output collapses to "slug — Name".

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 20:45:47 +08:00
Alex Dunmow
7f4bce79c9 feat(cli): ninja CLI with login, plugin init/publish/status
Cobra scaffold, credentials store, Connect client, device-flow login,
whoami/logout, plugin init (creates + adds git remote), publish (tag + push
+ registry RPC), and status (list scopes/plugins). Proto copied from
orchestrator with buf codegen for client stubs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-06-01 23:55:01 +08:00