@lace-cloud/proto
v0.6.5
Published
Generated proto messages, render-model POJOs, and proto→render converters shared across Lace Cloud's TypeScript consumers.
Readme
@lace-cloud/proto
Generated proto messages, render-model POJOs, and proto→render converters shared across Lace Cloud's TypeScript consumers.
Single source of truth for the wire types between the Go CLI
(lace-cli) and any TypeScript client. Two consumers in this monorepo
ship their own ts-proto-generated service stubs, but the message
shapes + converters live here once.
Install
npm install @lace-cloud/protoUsage
import {
type CanvasView,
type RenderNode,
type RenderEdge,
type Diagnostic,
convertCanvasView,
} from '@lace-cloud/proto';
// CanvasView is the view-model shape. RenderNode/RenderEdge/Diagnostic
// are its sub-shapes. convertCanvasView normalises a proto-shaped
// payload (host or canvas variant) into a CanvasView.Notes
- ts-proto outputs use
snakeToCamel=false,forceLong=number. Do not editsrc/generated/files by hand — they're regenerated bypnpm proto:genin lace. - Converters accept structural input aliases (
./proto-shapes) so host-generated and canvas-generated proto messages are both assignable via TypeScript's structural + numeric-enum-widening rules.
License
Proprietary — see LICENSE.
