Skip to content
Mirror
Clone

Clone over HTTPS

No sign-in. Pulls work; pushes go upstream to the monorepo.

Download .tar.gz

Protocol buffer schemas shared by KBVE services, games and sites.

SOURCE.md

schemas/proto

Protobuf definitions shared across languages. Canonical source for every wire type in the workspace: a change here fans out to TypeScript, Rust and C# alike.

Migrated from packages/proto in github.com/KBVE/kbve.

Layout

kbve/<domain>/v1/*.proto, which is what the package names say (package kbve.item.v1) and what every import path assumes. The include root is this directory, so import "kbve/common/v1/rarity.proto" resolves from here and nowhere else.

Two shared layers are imported by nearly every domain and are the ones to change carefully:

PathWhat it holds
kbve/type/v1/Identity. Ulid is sixteen bytes on the wire and twenty-six characters wherever a human writes one.
kbve/common/v1/Shared scalars and enums: bounds, colour, decimal, rarity, element, equip slot, registry metadata.

The rest are domains: the content ones (item, npc, quest, map, spell, dialogue, profession), the services (jedi, redis, clickhouse, twitch, git, groq, ci, vm), and the products (meme, forum, market, portfolio, mc, osrs, rows, jobboard, discordsh, empire, wallet, bento, chat, icon, asset, staff).

The unversioned pair

meme/meme.proto and kbve/common.proto predate this tree. They are what apps/memes-web generates its Zod schemas from, and they are superseded by kbve/meme/v1 and kbve/common/v1 — same domains, versioned packages, one include root.

They are still here because moving that app onto the versioned packages is its own change: the generator is a line parser rather than a protobuf compiler, it skips import statements, and the versioned meme schema reaches across files in a way the old one does not. buf.yaml ignores both for lint, and the format task is scoped to kbve/ so buf does not restyle a file whose parser has opinions about whitespace.

Generated output does not live here

Generated code lands in the language tier that imports it, so a schema’s history stays reviewable instead of being buried under regenerated artifacts. apps/memes-web writes its Zod schemas into its own tree; crates/kbve-proto will do the same with the prost output when it lands.

Tasks

moon run proto:lint runs buf lint, which depends on buf format --diff --exit-code. Both read buf from this project’s package.json — buf is distributed on npm, and proto has no plugin for it, which is why schemas/* is a pnpm workspace member despite holding no JavaScript.

buf breaking is not wired yet; see the comment in moon.yml for the line it lands as once this tree has history on origin/main.

Adding a proto

Copy it verbatim from the KBVE tree and bring its import closure with it. Do not reformat on the way in — a diff against that tree is what tells you whether the two have drifted.

Packages

42 packages · 110 schemas