speckl/compiler
Scott Scoble b65bf0e206 feat(speckl): transition envelope (cycle 58)
Adds 'transition Name { ... }' as a top-level member of a speck
block. The AST node is TransitionNode with fields[] plus optional
payloadOneof and typeDiscriminator references. Two field names
have special meaning:

  payload: <OneofName>  →  the generator will emit the referenced
                            oneof's variants inline as
                            'oneof payload { ... }' inside the
                            message body (i.e. payload becomes a
                            proto oneof, not a regular field)
  type:    <EnumName>   →  the discriminator enum for the variants

All other fields are emitted as ordinary proto message fields.

This is the shape federated-meetup needs for its Transition message:
  message Transition {
    TransitionType type = 1;
    StateRoot prior_state = 2;
    oneof payload {
      CreateGroupPayload create_group = 10;
      ...
    }
    Multisig steward_signatures = 31;
    bytes hlc = 32;
    fixed32 branch_id = 33;
    google.protobuf.Timestamp signed_at = 30;
  }

The next cycle (64) will wire the .proto generator to emit this shape
from a TransitionNode. Cycle 58 is parser-only — 3 new tests cover
regular fields, payload+type references, and trailing punctuation
tolerance. All 46 tests (39 baseline + 4 oneof + 3 transition) pass.
tsc build clean.
2026-06-28 21:53:38 -07:00
..
__tests__ feat(speckl): transition envelope (cycle 58) 2026-06-28 21:53:38 -07:00
dist feat(protobuf): honor speck.protoPackage and speck.goPackage overrides 2026-06-28 21:49:19 -07:00
node_modules TS generator: fix #12 (5 expression patterns) + #11 (opaque record types) 2026-05-11 10:16:15 -07:00
out/speckl-compile feat(compiler): self-hosting spec + generator multi-enum support 2026-05-03 14:42:03 -07:00
specs feat(compiler): self-hosting spec + generator multi-enum support 2026-05-03 14:42:03 -07:00
src feat(speckl): transition envelope (cycle 58) 2026-06-28 21:53:38 -07:00
test-output TS generator: fix #12 (5 expression patterns) + #11 (opaque record types) 2026-05-11 10:16:15 -07:00
test-output-rust/TigerBeetleLedger feat(rust): Rust codegen backend (speckl#24) 2026-05-09 23:24:40 -07:00
.gitignore Add .gitignore for compiler dependencies and build artifacts 2026-04-29 15:12:37 -07:00
.last-build fix: add dist-check guard + List<T> type parsing + state machine examples 2026-05-05 03:11:53 -07:00
check-dist.sh fix: add dist-check guard + List<T> type parsing + state machine examples 2026-05-05 03:11:53 -07:00
package-lock.json WASM E2E test: Speckl specs compile to runnable WebAssembly 2026-05-03 13:13:55 -07:00
package.json WASM E2E test: Speckl specs compile to runnable WebAssembly 2026-05-03 13:13:55 -07:00
tsconfig.json Add SpeckDL compiler scaffold 2026-04-29 15:12:08 -07:00