octoturge 8d4a08e36d Move bambulab JSON Schemas here from continuum-proxy; restructure
Schemas (any notation - proto, JSON Schema) belong in the schemas repo
regardless of how many languages currently consume them; that's what
makes this 'the schemas repo'. Rust-only code (the hand-written structs
in continuum-proxy's bambu_commands/) is a different category and stays
where it was.

Also restructured per readability feedback:
- envelope.schema.json moved out of v1/ to the bambulab/ root - it's
  shared across protocol generations, not v1-specific, same principle
  already applied to the (now-removed) proto/bambulab/common.proto.
- v1/ split into v1/request/ and v1/report/, one file per command in
  each, instead of *.request.schema.json / *.response.schema.json
  filename suffixes doing the same job less clearly. The two top-level
  dispatcher schemas (matching BambuRequest/BambuReport) stay at the v1/
  root since they aren't themselves a single command's schema.

Re-verified after restructuring, not just moved and assumed still
correct:  resolution now has to handle a real basename collision
(get_version.schema.json exists in both request/ and report/) — switched
the validation approach to register schemas by  (their actual base
URI) rather than by filename, which is what makes relative  resolve
correctly here. All three real examples plus the negative tests from the
original version still pass.
2026-08-28 22:58:18 +00:00

continuum-schemas

Single source of truth for the Continuum data model. Protobuf definitions in proto/ are compiled into two consumer packages:

  • packages/ts-types — TypeScript types generated via ts-proto, plus hand-written TypeBox schemas under src/schemas/ used for runtime validation in continuum-backend's ElysiaJS routes.
  • packages/rust-types — a Rust crate (continuum-rust-types) that compiles the same .proto files with prost-build (via build.rs), producing serde-derived structs for continuum-proxy and continuum-ai-worker.

Layout

proto/continuum/v1/       canonical .proto message definitions
packages/ts-types/        TypeBox schemas + generated TS proto types
packages/rust-types/      prost-generated Rust structs (build.rs codegen)

Build

Requires protoc on PATH and npm install run at the repo root first.

npm install
npm run build:ts     # protoc + ts-proto -> packages/ts-types/src/generated
npm run build:rust   # cargo build, runs build.rs -> prost-generated structs
npm run build        # both

Generated TS output under packages/ts-types/src/generated is build-derived and gitignored. The Rust crate's generated code lands in OUT_DIR per standard prost-build conventions and is never committed.

S
Description
Continuum platform: continuum-schemas
Readme 146 KiB
Languages
Rust 61.2%
TypeScript 38.8%