Skip to content
CAI
Software that uses CAICheck a score

BoundaryML/baml

55.7

Adequate · 12 September 2026

980.7k

lines of production code

Rust

with TypeScript

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

BAML is a domain-specific language and runtime engine designed for building and orchestrating AI-powered applications. It provides a comprehensive standard library for interacting with major LLM providers, handling structured data, and managing system resources like networking and cryptography. The system features a modern compiler pipeline with incremental compilation and a stack-based virtual machine for efficient execution, alongside robust tooling for IDE integration, code generation, and CLI management.

How it got here

2023–2025 — BAML language rewrite and SDK expansion

80 changes.

The project underwent a major architectural rewrite, replacing the legacy C++ CLI and Python clients with a new Rust-based compiler infrastructure and a Virtual Machine execution model. This period focused on expanding language support by introducing native clients and code generators for TypeScript, Go, Ruby, and Java, while simultaneously building out a comprehensive CLI and IDE integrations for VS Code, JetBrains, and Zed.

2026 — BEX engine and compiler2 rewrite

204 changes.

This period focused on the foundational rewrite of the BAML runtime and compiler, introducing the BEX virtual machine, a new compiler2 pipeline, and a unified type system. It established the core execution engine, garbage collection, and memory management while simultaneously building out the standard library, SDK bridges, and IDE tooling to support the new architecture.

Features

AUR packages for BAML wrapper (prebuilt and source-built)

Users on Arch Linux can now install the BAML wrapper via the Arch User Repository. Two new packages are available: baml-bin, which installs prebuilt binaries for x86\_64 and aarch64 architectures, and baml, which builds the wrapper from source using Rust and CMake. Both packages support both architectures and are designed to provide the 'baml' command-line tool.

packaging · high confidence

Add BAML grammar source and syntax highlighting support

Introduces the BAML grammar definition file (src/baml.ts) which provides syntax highlighting rules for the BAML language. This change enables proper code coloring for identifiers, literals, comments, and structural elements like classes, functions, and templates in editors that support TextMate grammars, laying the groundwork for broader highlighting distribution across tools like Sublime, KDE, and highlight.js.

typescript2/pkg-grammar · high confidence

Add Bun-compatible glob pattern matching library

Introduces a new \sys\_glob\ crate providing a glob pattern matcher compatible with Bun's behavior, shared by \sys\_native\ and \bridge\wasm\. This library supports standard glob syntax including \\\, \\\\, \?\, character classes, and brace alternations, while correctly handling path normalization for relative, dot-relative, and absolute patterns to prevent false positives.

_baml\_language/crates/sys\glob · high confidence

Add GC policy experiment tooling for reproducible profiling

New Python scripts (build.py, run.py, summarize.py) have been added to the gc\_policy tool directory to support reproducible GC profiling experiments. build.py creates immutable experiment binaries with full source and build provenance. run.py executes paired baseline and candidate GC experiments with randomized ordering to minimize drift bias, capturing detailed cycle data. summarize.py processes the results to generate comparative reports and Chrome Trace-compatible timeline files, enabling users to analyze GC performance differences between implementations.

_baml\_language/tools/gc\policy · high confidence

Add Go language support for the BAML CLI

Users can now invoke the BAML runtime CLI from Go applications. This change introduces a Go package wrapper that exposes the \InvokeRuntimeCli\ function, allowing Go programs to pass command-line arguments and handle exit codes directly through the BAML engine.

baml-cli · high confidence

Add LLM response parsing support for Anthropic, Google, and Vertex AI

The LLM response parser now includes dedicated modules for parsing responses from Anthropic, Google, and Vertex AI providers, in addition to the existing OpenAI and Azure support. This enables the system to correctly deserialize structured responses, including streaming chunks, tool use, and usage metadata, from these additional model providers.

engine/llm-response-parser · high confidence

Add TCP and UDP networking primitives to the standard library

The \baml.net\ module now exposes \TcpStream\, \TcpListener\, and \UdpSocket\ classes, enabling users to establish TCP connections, listen for incoming traffic, and send/receive UDP datagrams. These primitives support configurable per-call timeouts via \baml.time.Duration\ and implement the \root.io.Read\ and \root.io.Write\ interfaces for consistent I/O handling.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\net · high confidence

Add TOML parsing and serialization support with native datetime types

The standard library now includes a TOML module (\baml.toml\) that allows parsing TOML text into a structured \Table\ type and serializing tables back to JSON. This implementation introduces a dedicated \Item\ type to preserve TOML's specific data semantics, including lossless mapping of four distinct datetime kinds (offset, local datetime, local date, local time) to BAML's \baml.time\ types (\ZonedDateTime\, \PlainDateTime\, \PlainDate\, \PlainTime\), which would otherwise be flattened to strings in generic JSON handling. The module provides \Table.parse\ for text input, \Table.from\_json\ for JSON conversion (skipping nulls), and implements \baml.ToJson\ and \baml.FromJson\ interfaces for interoperability, while throwing \ParseError\ for invalid syntax or unrepresentable 64-bit integers.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\toml · high confidence

Add YAML parsing and deserialization to the standard library

The standard library now includes a \baml.yaml\ namespace with two new functions: \parse\, which converts YAML text into JSON-compatible BAML values (rejecting non-JSON features like multi-document streams or non-string mapping keys), and \deserialize\<T\>\, which parses YAML and decodes the result into a specific type \T\ using existing \baml.FromJson\ rules. This allows users to work with YAML data directly in BAML, with errors thrown as \baml.yaml.ParseError\ for malformed input or \baml.json.DecodeError\ for type mismatches.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\yaml · high confidence

Added Cursor AI coding rules for documentation, development setup, and workflow

New configuration files have been added to the \.cursor/rules/\ directory to guide the AI assistant's behavior. The \diataxis-docs.mdc\ rule enforces the Diátaxis documentation framework for \.mdx\ files, distinguishing between tutorials, how-to guides, reference material, and explanations. The \instructions.mdc\ rule provides specific setup and testing instructions for the BAML project, including the use of \mise\, \cargo test\, and Python integration tests. Additionally, \jj-workflow.mdc\ introduces guidelines for using the \jj\ version control system, emphasizing fine-grained commits and bookmark management.

.cursor · high confidence

Added Swift SDK build and code-generation scripts

Introduced three new shell scripts in the Swift SDK directory to support the new Swift bridge: \build-xcframework.sh\ compiles the Rust bridge into an XCFramework for macOS and iOS (supporting both host-only development and full multi-arch release builds with bitcode stripping), \generate-header.sh\ uses cbindgen to produce the C header bindings required by the Swift package, and \generate-protos.sh\ regenerates the Swift protobuf client code from the bridge wire format definitions. These scripts enable developers to build and integrate the Swift SDK locally without manual intervention.

_baml\language/sdks/swift/scripts · high confidence

Added WebSocket client support for real-time providers

The BAML standard library now includes a \WebSocket\ class and \connect\ function, enabling users to establish real-time connections with custom LLM providers. This new capability allows sending text or binary frames, blocking to receive incoming messages, and managing connection lifecycles with close codes and reasons, all exposed through the \ns\_ws\ module.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\ws · high confidence

Added architecture dependency graph and generation tooling

The \baml\_language/architecture\ directory now includes a generated SVG diagram visualizing the workspace's crate dependencies, grouped by namespace (e.g., \baml\, \bex\, \sdkgen\). A new \generate.sh\ script and \README.md\ document the process for regenerating this graph using the \cargo-stow\ tool, which displays local crates, external dependencies, and cross-namespace edges.

_baml\language/architecture · high confidence

Added build script for Go protobuf generation

A new build script (build.sh) has been added to the Go bridge SDK to automate the generation of Go code from Protocol Buffer definitions. This script locates the necessary proto files in the bridge\_ctypes crate, verifies that the protoc-gen-go tool is installed, and generates the corresponding Go source files into the cffi/proto directory, ensuring the Go SDK can properly interface with the underlying bridge types.

_baml\_language/sdks/go/bridge\go · high confidence

Added demo for Google AI and Vertex AI integration

A new demo file (main.baml) has been added to the demo2 location, illustrating how to configure LLM clients for Google AI and Vertex AI. It demonstrates routing requests through Vertex AI using environment variables (GOOGLE\_GENAI\_USE\_VERTEXAI, GOOGLE\_CLOUD\_PROJECT, GOOGLE\_CLOUD\_LOCATION) and authenticating via application-default credentials, without requiring an explicit API key. The demo includes two client definitions (GoogleViaVertex and VertexNative) and corresponding functions to greet a user.

_baml\language/demo2 · high confidence

Added language server hot-reload tool for development

A new \language-server-hot-reload\ binary has been added to the engine tools, enabling developers to automatically restart the BAML CLI language server when source files change. This tool monitors the binary directory for modifications and replays stdin input to the newly spawned process, streamlining the development and debugging workflow for the language server.

engine/tools · high confidence

Added sandbox server and trace upload stubs

The engine/sandbox module now includes a basic HTTP server (web\_server.rs) that listens on port 4000 and returns a greeting, alongside stub implementations for trace data upload (upload-traces-main.rs) and tracing context setup (main.rs). These files are currently largely commented out or empty, serving as scaffolding for future tracing and server functionality rather than active features.

engine/sandbox · high confidence

Automated Rust code generation for BAML standard library builtins

The \baml\_builtins2\codegen\ crate now automatically generates the Rust trait hierarchies, dispatch tables, and type wrappers for the BAML standard library. By parsing \.baml\ source files, it extracts native builtins and produces the \BamlClass\\ and \BamlNamespace\\ traits for VM functions, as well as the \IoNamespace\\ traits and \SysOp\ enum for IO operations. It also generates the \ErrorClass\ and \PanicClass\ enums from their respective namespaces, ensuring that the Rust implementation stays in sync with the BAML stdlib definitions.

_baml\_language/crates/baml\_builtins2\codegen · high confidence

BAML language support for CodeMirror with syntax highlighting and autocomplete

The BAML language package for CodeMirror has been updated to provide comprehensive syntax highlighting, code folding, and autocomplete support. The Lezer grammar now defines specific tags for BAML constructs such as classes, enums, functions, and attributes, enabling distinct visual styling for keywords, types, and comments. Additionally, the language support includes snippet completions for common BAML patterns like class and function declarations, improving the developer experience when writing BAML files.

typescript/packages/codemirror-lang-baml · high confidence

BEX VM introduces stack-based bytecode execution with native AI and reflection support

The BEX VM now executes BAML code using a stack-based bytecode interpreter, replacing previous execution models. This change introduces a new architecture featuring a call stack, evaluation stack, and a shared heap with thread-local allocation (TLAB) for improved performance and spawn safety. The VM natively supports the \ai\ and \reflect\ standard library packages, allowing users to invoke Rust-implemented AI functions and perform runtime reflection directly within BAML scripts. A build script automatically generates the necessary native dispatch code for these packages, ensuring type safety and compile-time checks for built-in functions.

_baml\_language/crates/bex\vm · high confidence

Claude Code CLI integration internals

Added internal BAML functions to support the Claude Code CLI provider, including logic to assemble conversation transcripts into a text format, define a JSON schema envelope for handling both final results and tool calls, and implement a protocol string that instructs the LLM on how to request tools via the outcome field. The entry also includes utilities for parsing the CLI's JSONL output stream and logging events.

_baml\_language/crates/baml\_builtins2/baml\_std/claude\_code/ns\internal · high confidence

Concurrency primitives: spawn, await, and future combinators

The standard library now includes a concurrency model based on \spawn\ and \await\. Users can create concurrent tasks using \spawn\, which returns a \Future\ handle. This handle supports state inspection (\is\_settled\, \is\_cancelled\, \state\) and cancellation (\cancel\). The library provides combinators for managing multiple futures: \all\ waits for all futures to succeed (cancelling the rest on the first error), \all\_settled\ waits for all futures to complete regardless of outcome, and \race\ completes as soon as the first future settles. Configuration for spawned tasks is handled via \TaskGroup\ (for concurrency limiting and shared cancellation) and \CancelToken\ (for cooperative cancellation).

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\future · high confidence

Enhanced \`baml describe\` output with comprehensive documentation and namespace support

The \baml describe\ CLI command now provides richer, more structured output for exploring the BAML project and standard library. It supports deep namespace traversal, displaying dotted fully-qualified names (e.g., \foo.bar.Baz\) and drilling into specific members like fields and methods. The output includes detailed documentation for built-in types (such as \baml.String\ and \baml.Bigint\), standard library namespaces (including \baml.csv\, \baml.fs\, \baml.http\, and \baml.crypto\), and AI provider internals. Additionally, it now renders keyword reference pages for language concepts like interfaces, associated types, and the \as\ projection, and correctly surfaces implementation details such as associated type bindings and multiple implementations for the same method.

_baml\_language/crates/baml\cli/src/snapshots · high confidence

First-class C\# SDK generation and runtime support

This change introduces the initial C\# SDK implementation, providing first-class code generation and runtime capabilities for the BAML language. It includes a new test suite under \baml\_language/sdk\_tests/crates/csharp\ that validates core functionality, including basic synchronous and asynchronous calls, complex dynamic value handling (enums, records, generics, unions, and media types), robust error and cancellation propagation, and the invocation of BAML closures from host code. The implementation also features a unified MSBuild solution (\Fixtures.slnx\) to build all test fixtures in parallel, ensuring efficient and reliable verification of the generated C\# client code.

_baml\_language/sdk\_tests/crates/csharp, baml\_language/sdks/csharp/sdkgen\csharp · high confidence

Formatter AST implementation for BAML language constructs

The BAML formatter now includes a complete AST layer in \baml\_fmt/src/ast\ to parse and pretty-print BAML source code. This implementation introduces strong-typed nodes for all top-level declarations (functions, classes, interfaces, enums, clients, tests, and generators), expressions (including \if let\, \match\, \catch\, \spawn\, and optional chaining), statements (such as \let\, \while let\, and \for\), and patterns (supporting destructuring and type narrowing). It also defines specific handling for attributes, tokens, and interface items, enabling the formatter to correctly structure and output complex BAML language features.

_baml\_language/crates/baml\fmt/src/ast · high confidence

Go SDK bridge introduces host-value callable support

The Go SDK bridge now allows Go functions to be passed as arguments to BAML functions. When a Go callable is provided, the bridge registers it in a host-value registry and sends a handle to the engine. When BAML invokes the callable, the engine dispatches the call back into Go via a CFFI callback, where the bridge decodes the arguments, executes the function, and returns the result or an error. This enables Go code to act as a host for BAML logic, supporting dynamic invocation of Go functions from within BAML workflows.

_baml\_language/sdks/go/bridge\go/pkg · high confidence

Go client code generation overhaul with streaming, multimodal, and type builder support

The Go language generator has been completely rewritten to support advanced runtime features. Generated code now includes full streaming capabilities (via \CallFunctionStream\ and typed channels), multimodal input support (Image, Audio, PDF, Video), and a dynamic TypeBuilder for runtime schema modification. The generator also introduces \build\_request\ and \parse\ function variants, configurable call options (clients, tags, environment variables), and robust type handling for unions, enums, and dynamic classes with proper JSON marshaling and validation.

engine/generators/languages/go · high confidence

IDE support for code lenses, inlay hints, and completions

The BAML IDE now provides interactive editor features including code lenses to run functions and tests directly from the Playground, inline inlay hints for inferred types and parameter names, and a full completion engine that suggests members, values, types, and declaration skeletons with relevance-based ranking.

_baml\_language/crates/baml\ide · high confidence

Initial C++ SDK code generation engine

The C++ SDK generator is now available, providing the foundational infrastructure to emit C++ client code from BAML definitions. This release introduces a typed naming system that ensures deterministic identifier resolution and collision handling, alongside an emitter that produces a single-header layout with namespace routing, free functions with optional argument structs, and support for classes, enums, and recursive type aliases via \baml::Box\. The generated output includes embedded BAML bytecode for lazy runtime initialization, establishing the base surface for the C++ SDK.

_baml\_language/sdks/cpp/sdkgen\cpp · high confidence

Initial Java SDK code generation support

The Java SDK emitter now generates Java source files for BAML types and functions, including classes, enums, unions, and function bindings. It handles type translation (primitives, collections, media types), routing symbols to Java packages, and generating runtime bindings via the \baml\_bridge.BamlFfi\ entry points. Optional parameters are supported via a fluent options pattern, and the generated code includes Javadoc documentation and deep equality checks.

_baml\_language/sdks/java/sdkgen\java · high confidence

Initial Java/JVM bridge implementation for BAML

This change introduces the initial Java bridge (\bridge\_java\), providing JNI bindings that allow Java applications to invoke BAML functions and handle results via a synchronous call path. The implementation links the \bex\_engine\ in-process, mirroring the architecture of the existing Python and Node.js bridges by using \bridge\_cffi\ for byte-oriented communication and protobuf envelopes, enabling Java clients to initialize the runtime from bytecode and execute BAML functions with proper error handling and host-callback support.

_baml\_language/sdks/java/bridge\java · high confidence

Initial Language Server Protocol (LSP) implementation for BAML

This change introduces the core LSP server implementation in the \baml\_lsp\ crate, enabling IDE integration for BAML projects. It adds project discovery logic to locate \baml.toml\ manifests and \baml\_src/\ directories, a diagnostics pipeline that computes and publishes errors to editors, and handlers for document lifecycle events (open, change, close) to manage file overlays. The server also implements standard LSP features including hover information, completions, document symbols, and semantic token highlighting, while supporting multi-root workspaces and read-only stdlib sources.

_baml\_language/crates/baml\lsp · high confidence

Initial Ruby (Sorbet) code generator support

The BAML engine now generates a Ruby client library with Sorbet type checking. This includes a synchronous client (\BamlSyncClient\) and a streaming client (\BamlStreamClient\) that support passing runtime options such as collectors, environment variables, and tags. The generator produces type-safe classes and enums, a \TypeBuilder\ for dynamic schema construction, and dedicated modules for \Types\ and \StreamTypes\ to handle standard and streaming return values respectively.

engine/generators/languages/ruby · high confidence

Initial Rust SDK and CLI scaffolding for BAML v0

This change introduces the initial structure for the BAML v0 Rust SDK and CLI within the \languages/rust\ directory. It adds the \baml-cli\ binary entry point, \baml-sys\ for dynamic FFI library loading, \baml-macros\ for derive macros (\BamlEncode\, \BamlDecode\), and the core \baml\ runtime crate. The entry also includes comprehensive integration tests for value encoding/decoding, collector functionality, and FFI interactions, alongside documentation and license files for the new Rust components.

languages · high confidence

Initial Rust SDK bridge and verification workflow

This change introduces the \baml\_bridge\ crate, which serves as the runtime bridge for generated Rust SDKs, handling engine bootstrapping, value conversion via the \BamlValue\ trait, and exposing BAML's typed \throws\ contracts as \Result\<T, baml\_bridge::Error\<E\>\>\. It includes integration tests that verify class, enum, map, and generic type conversions against a live engine, as well as a verification workflow (\verify/\) that exercises both synchronous and asynchronous entry points to ensure the engine loads correctly and the version handshake passes.

_baml\language/sdks/rust · high confidence

Initial Rust SDK bridge with typed value conversion and async support

The Rust SDK now includes a new runtime bridge layer (\baml\_bridge\) that connects generated code to the BAML engine via a C ABI shared library. This introduces a bidirectional \BamlValue\ trait for converting Rust types to and from the engine's wire format, driven by static types rather than a runtime type map. The bridge supports both synchronous and asynchronous function invocation through a completion registry, and enables passing host closures to BAML functions via a host-value registry that handles dispatch and error round-tripping.

_baml\_language/sdks/rust/bridge\rust · high confidence

Initial Rust SDK code generation

The Rust SDK code generator is now available, producing a standalone Cargo crate that wraps the BAML runtime. It translates BAML types into idiomatic Rust, emitting structs for classes, enums for enumerations, and type aliases, while handling generic parameters and recursive structures via boxing. The generator also provides sync and async bindings for BAML functions and class methods, supports callback parameters, and synthesizes Rust enums for union types. Symbols that reference types not yet representable in Rust are skipped with warnings rather than causing build failures.

_baml\_language/sdks/rust/sdkgen\rust · high confidence

Initial infrastructure for pkg.boundaryml.com static site hosting

This change introduces the AWS CDK stack that provisions the S3 bucket and IAM role required to host the pkg.boundaryml.com static site. The stack creates a public-read S3 bucket configured for static website hosting and an IAM role that allows GitHub Actions (from the BoundaryML/baml repository) to assume permissions via OIDC for publishing releases from the canary branch or immutable release tags.

_tools/pkg\_boundaryml\com · high confidence

Integration test suite initialization and configuration

The integration test suite has been initialized with a new project structure, including a README detailing the testing architecture and prerequisites for TypeScript, Python, and Ruby. A VS Code settings file has been added to enable the playground proxy for local development. The test definitions are organized under \baml\_src\, featuring client configurations for providers like OpenAI, Azure, and Gemini, along with specific test cases for features such as media handling, abort handlers, aliases, and constraints.

integ-tests · high confidence

Introduce BAML C++ SDK with std-library naming conventions

The BAML C++ SDK is now available, providing a self-contained C++ source tree generated by \baml-cli generate\ that includes the typed API, embedded BAML bytecode, and vendored bridge runtime headers. The SDK enforces a C++ standard library naming convention (snake\_case for types and functions, CamelCase for template parameters) via \.clang-format\ and \.clang-tidy\ configurations, and uses a pinned protobuf-lite runtime fetched hermetically via CMake to avoid ABI conflicts. Users can integrate the SDK by adding the generated \baml\_sdk\ directory to their CMake project and linking against \baml::sdk\, with the shared runtime library resolved at runtime through programmatic paths, environment variables, or the application bundle.

_baml\language/sdks/cpp · high confidence

Introduce BAML Enhancement Proposal (BEP) feedback application

A new standalone web application for managing BAML Enhancement Proposals (BEPs) has been added to the \typescript2\ workspace. Built with Next.js 15 and Convex, it provides a centralized platform for proposal discussion, featuring threaded comments, version history, and AI-assisted analysis of version changes using the BAML runtime. The application includes a full feedback lifecycle with status tracking, decision logging, and export capabilities.

typescript2 · high confidence

Introduce BAML IntelliJ extension with syntax highlighting, LSP, and playground

The JetBrains directory now contains the source code for the BAML IntelliJ extension, providing syntax highlighting for BAML source files, language server functionality (including xref navigation and jump-to-definition) via the LSP4IJ framework, and an interactive BAML playground tool window powered by JCEF. The project is scaffolded using the IntelliJ Platform Gradle Plugin template, built with Gradle and Kotlin, and includes configuration for Qodana static analysis and GitHub Actions for automated testing and deployment.

jetbrains · high confidence

Introduce BAML compiler2 AST layer with BEP-042 cleanup finalizers and LLM companion functions

The \baml\_compiler2\_ast\ crate now provides the concrete AST and CST-to-AST lowering for the BAML language, replacing the previous structure with owned, spanned data structures. This change introduces support for the BEP-042 \cleanup\ magic method, which acts as a run-once finalizer for class instances by injecting a guard around the method body. It also adds automatic generation of LLM companion functions (\@spec\, \@render\_prompt\, \@build\_request\, \@parse\) for functions marked with LLM metadata, enabling provider-neutral request previews and prompt rendering. The new AST layer includes comprehensive type expression handling (including \Media\, \Uint8Array\, and \void\ types), field attribute disambiguation, and docstring extraction, establishing the structural foundation for the compiler2 pipeline.

_baml\_language/crates/baml\_compiler2\ast · high confidence

Introduce BAML source code formatter with comprehensive test coverage

The \baml\_fmt\ crate now provides a formatter for BAML source files, exposing a \format\ function that parses input, classifies trivia (comments and whitespace), and outputs canonical code. The formatter supports configuration via \FormatOptions\ (line width and indent width, defaulting to 4 spaces) and respects a \baml-format: ignore\ directive to skip formatting when present. It includes logic to strip redundant parentheses in logical chains and ensures idempotent output. A new \formatter\_scenario\_tests.rs\ file adds a parameterized test suite covering 1,024 scenarios across 16 syntax families to verify formatting invariants.

_baml\_language/crates/baml\fmt/src · high confidence

Introduce BAML v0 VS Code and Cursor extension

This change adds the initial BAML v0 VS Code and Cursor extension, providing syntax highlighting for .baml files, an integrated LLM Playground webview for testing prompts, and code lens navigation from generated client code back to BAML function definitions. It also includes keyword auto-completion for BAML attributes, project telemetry reporting via PostHog, and a status bar indicator for diagnostics.

typescript/apps/vscode-ext · high confidence

Introduce BEX Engine runtime with async scheduling, garbage collection, and tracing

The BEX Engine runtime is now available to execute BAML programs, introducing a new architecture where the VM executes synchronously until it yields for external I/O, at which point the engine manages async operations and feeds results back. This release adds comprehensive garbage collection coordination via a permit system to ensure safe concurrent access, a future manager to track and settle spawned tasks, and a bounded trace logger with a separate trace heap for capturing and encoding value snapshots for observability. It also establishes the function call context and inbound configuration boundaries, including type conversion logic and union ambiguity policies, providing the foundational runtime infrastructure for the BAML language.

_baml\_language/crates/bex\engine/src · high confidence

Introduce BEX VM types and runtime infrastructure

This change introduces the \bex\_vm\_types\ crate, establishing the foundational type system and runtime structures for the new BEX virtual machine. It defines the bytecode instruction set and data structures (including jump tables and perfect hash tables for efficient dispatch), implements a total order for floating-point comparisons that ensures reflexivity and consistent NaN handling, and provides a type-safe indexing system (\Indexable\) to prevent cross-pool access errors. The crate also adds a per-container spin-lock (\LazyBiasedMutex\) for safe concurrent mutation of arrays and maps, raw pointer-based heap references (\HeapPtr\) for stable object access, and a comprehensive set of VM-level error and panic types (\VmPanic\, \VmBamlError\) that map to user-visible exception classes. Additionally, it includes a build script to generate system operation and error enums from builtin definitions, and a content-addressed identity hash for program source files.

_baml\_language/crates/bex\_vm\types · high confidence

Introduce BexStr, a V8-inspired immutable string type with O(1) cloning

The \bex\_str\ crate introduces \BexStr\, a new immutable string type designed for performance and memory efficiency. It supports O(1) cloning by using reference counting for heap-allocated strings and stores short strings (≤54 bytes) inline to avoid heap allocation entirely. The type implements deferred concatenation to build strings efficiently without immediate copying, and provides zero-copy substring operations that maintain a depth-1 invariant to prevent deep tree structures. Benchmarks and tests validate its behavior, including correct UTF-8 codepoint handling, hash consistency with standard strings, and safe handling of deep concatenation trees.

_baml\_language/crates/bex\str · high confidence

Introduce C\# SDK build and release tooling

This change adds a suite of repository-only tools to the C\# SDK build pipeline to support first-class generation and release hygiene. The \Baml.BytecodeCarrierEmitter\ tool embeds canonical compiler bytecode into a generated C\# source file with SHA-256 fingerprinting and lazy initialization, enabling verification gates before the production generator is fully implemented. The \Baml.NuGetNormalizer\ rewrites unsigned NuGet packages into a deterministic, reproducible ZIP/OPC format with stable timestamps and permissions, and includes a comparison mode to verify that registry-signed packages match the verified unsigned payload. The \Baml.UnionGenerator\ produces the C\# source for typed union structs (up to 32 cases), while the \Baml.Union.LayoutProbe\ benchmarks the memory and performance characteristics of these unions. Finally, the \pack-product.sh\ script orchestrates the release process by validating native assets, inspecting binary exports for security and platform compliance, and assembling the final NuGet package.

_baml\_language/sdks/csharp/bridge\csharp/tools · high confidence

Introduce Go SDK runtime and generated code foundations

The Go SDK now includes the core runtime package (\baml\_go\) that enables generated Go code to communicate with the native BAML engine. This release adds the infrastructure for encoding and decoding BAML types (classes, enums, lists, maps, and dynamic values) via the CFFI bridge, supports invoking BAML closures and FunctionSpecs from Go, and provides the type reflection system (\TypeOf\, \DefinitionOf\) required for generic code generation. It also establishes the runtime artifact resolution and caching mechanism that loads the native library at startup.

_baml\_language/sdks/go/baml\go · high confidence

Introduce JSON-like (jsonish) parser for flexible data extraction

The \bex\_sap\ component now includes a new \jsonish\ module that parses JSON-like data into a structured representation, serving as a more flexible alternative to strict \serde\_json\ parsing. This parser handles malformed or incomplete JSON commonly produced by LLMs, including unquoted strings, single-quoted strings, trailing/leading commas, comments, and unterminated structures. It also supports extracting JSON from markdown code blocks and offers multiple parsing modes (strict, markdown-aware, and multi-object) to accommodate various input formats.

_baml\_language/crates/bex\sap/src/jsonish · high confidence

Introduce Java SDK bridge with runtime, error handling, and streaming support

The Java SDK bridge now provides the core runtime infrastructure for invoking BAML functions, including synchronous and asynchronous execution via BamlFfi, structured error and panic handling (BamlError, BamlPanic, BamlCancelledError), and support for streaming results (BamlStream). It also introduces call context management for cancellation (BamlCallContext), handle-based resource management for media and other engine-owned objects (BamlHandle), and type-aware dispatch for host-callable functions (BamlHostCallable, BamlTypedCallable).

_baml\_language/sdks/java/baml\bridge · high confidence

Introduce Prompt Fiddle web application with project embedding and interactive tours

The fiddle-web-app now provides a full Next.js-based playground interface for BAML projects. Users can now generate and share embeddable links via a new Embed dialog, which allows configuring the embedded view to show or hide the file tree, playground, and specific files, and supports Link, Iframe, and React integration methods. The application includes a guided product tour for new users and a post-test-run tour to explain results. Additionally, the app features a file tree viewer for managing project files, a top navbar with project renaming and sharing capabilities, and integrates PostHog for pageview tracking.

typescript/apps/fiddle-web-app · high confidence

Introduce Python SDK bridge layer with runtime, streaming, and type-map support

The Python SDK now includes a new \baml\_bridge\ package that serves as the runtime bridge between generated Python code and the BAML engine. This bridge provides the \BamlRuntime\ singleton for initialization, protobuf-based argument encoding/decoding, and factories for calling BAML functions. It introduces support for asynchronous streaming via \BamlStream\, host-side value proxies (\BamlFunctionSpec\, \BamlRuntimeValue\), and a type-map system for deserialization. The package also includes a stub generation script (\generate\_stubs.py\) to produce \.pyi\ files from the PyO3 extension, ensuring type checkers receive accurate signatures for the bridge's classes and functions.

_baml\language/sdks/python · high confidence

Introduce Ruby FFI bindings for BAML runtime

This change adds the Ruby FFI layer (\engine/language\_client\_ruby/ext/ruby\_ffi\), exposing the BAML runtime to Ruby applications. It introduces Ruby classes for managing the runtime (\Baml::Ffi::BamlRuntime\), dynamic type definitions (\Baml::Ffi::TypeBuilder\), and client configuration (\Baml::Ffi::ClientRegistry\). It also provides bindings for handling function execution results (\Baml::Ffi::FunctionResult\), streaming responses (\Baml::Ffi::FunctionResultStream\), and a comprehensive logging collector (\Baml::Ffi::Collector\). Additionally, it adds support for media input types, exposing Ruby classes for \Image\, \Audio\, \Pdf\, and \Video\ to allow passing these assets to BAML functions.

_engine/language\_client\_ruby/ext/ruby\ffi · high confidence

Introduce Ruby language client with streaming, dynamic types, and media support

Adds the initial Ruby language client library, providing core infrastructure for interacting with the Baml engine. This includes support for streaming responses via \BamlStream\, dynamic type conversion with \TypeConverter\, and structured output handling through \Checked\ and \DynamicStruct\ classes. The client also exposes bindings for handling images and audio, enabling Ruby applications to consume rich media outputs from Baml functions.

_engine/language\_client\ruby · high confidence

Introduce SAP model type system and conversion layer

This change adds the \sap\_model\ module to the \bex\_sap\ crate, establishing the internal type system and conversion logic required for the SAP (Semantic Streaming) feature. It introduces a comprehensive type hierarchy (\TyResolved\, \Ty\, \TyWithMeta\) covering primitives, literals, collections, classes, enums, unions, and stream states, along with a \TypeRefDb\ for type lookup. The module provides \TypeCtx\ to normalize and simplify type definitions (flattening unions and aliases) and implements the \FromLiteral\ trait to convert attribute literals into BAML values, enabling the deserializer to correctly interpret and validate typed data.

_baml\_language/crates/bex\_sap/src/sap\model · high confidence

Introduce Swift SDK bridge with runtime, type, and value handling

The Swift SDK now includes a new \BamlBridge\ module that provides the foundational runtime and type system for interacting with the BAML engine. This includes an ABI wrapper (\Api.swift\) for native library calls, comprehensive encoding and decoding logic (\Encode.swift\, \Decode.swift\) for Swift-to-BAML value transfer, and support for complex types such as unions (\BamlUnions.swift\), recursive structures (\Indirect.swift\), and media assets (\Media.swift\). The bridge also introduces handle management for engine-owned resources (\Handle.swift\), function specifications (\FunctionSpec.swift\), and host-callable support for BAML invoking Swift closures (\HostCallables.swift\).

_baml\language/sdks/swift/Sources/BamlBridge · high confidence

Introduce Swift SDK code generation and bridge

This change adds the Swift SDK generator and its Rust bridge, enabling BAML projects to produce native Swift code. The generator translates BAML types into Swift structs, enums, and functions, while the bridge provides the C ABI layer for the Swift runtime to invoke BAML engine functions. It also includes diagnostics to warn users when symbols are skipped due to unsupported types.

_baml\_language/sdks/swift/rust/sdkgen\swift · high confidence

Introduce VFS path abstraction with Windows-specific normalization

Added a new \baml\_path\ crate that defines a \VfsPathBuf\ type for handling absolute, normalized paths within BAML's virtual file system, ensuring logical paths always start with \/\ and contain no empty, \.\, or \..\ components. This change introduces platform-specific path handling: on non-Windows systems, native paths are converted to VFS paths by stripping prefixes and normalizing components, while on Windows, the implementation now explicitly supports drive letters (e.g., \C:\) and UNC paths (e.g., \\\server\\share\), mapping them to stable VFS representations like \/C:/...\ and \/server/share/...\. This ensures that native Windows paths round-trip correctly through the VFS domain without losing share roots or drive information, addressing previous issues with path and URI handling on Windows.

_baml\_language/crates/baml\path · high confidence

Introduce Web and Cloudflare Workers runtimes for the BAML TypeScript SDK

The TypeScript SDK now supports execution in browser and Cloudflare Workers environments via a new \@boundaryml/baml-bridge-web\ package. This release adds a Rust/WASM bridge that enables runtime initialization from bytecode or source files, synchronous and asynchronous function calls, and media handling (images, audio, video, PDF) across these web targets. It includes build scripts to compile the WASM core for both browser and workerd environments, adapts shared TypeScript types to be Node-agnostic, and provides structured error mapping and host-value registries to support web-specific features like fetch and readFileSync sysops.

_baml\_language/sdks/typescript/bridge\_typescript\web · high confidence

Introduce Zed editor extension for BAML

Added a new Zed editor extension that integrates the BAML language server. The extension automatically downloads the matching \baml-cli\ binary from GitHub releases based on the current version and platform, and configures the language server with specific initialization options such as enabling code generation on save and forwarding runtime updates to the webview.

engine/zed · high confidence

Introduce \`baml pack\` host binary for running packaged BAML programs

This change adds the \baml\_pack\_host\ crate, which serves as the runtime executable for binaries produced by the new \baml pack\ command. The host binary extracts a versioned \PackEnvelope\ from an embedded OS-native section, initializes the BAML engine with the embedded program, and dispatches execution based on the pack mode (single-target or multi-subcommand). It handles argument parsing via clap, supports typed parameter auto-CLI, and manages exit codes, including honoring \baml.sys.exit()\ calls from within BAML code. A build script also ensures macOS binaries have sufficient header padding for embedded data.

_baml\_language/crates/baml\_pack\host · high confidence

Introduce \`baml run\` and \`baml pack\` entry points with auto-CLI and structured argument handling

The \baml\_exec\ crate now provides the shared execution logic for the new \baml run\ and \baml pack\ commands. Users can invoke BAML functions directly from the command line using an auto-derived CLI interface that accepts primitive types (strings, integers, floats, booleans, enums, and nulls) as flags (e.g., \--name value\). For complex types like classes, lists, or maps, arguments must be passed via the \--json-args\ flag, which supports inline JSON, file paths (\@file\), or stdin (\-\). Packaged binaries embed a dispatch envelope that allows them to run these targets with the same argument parsing and output formatting (Debug or JSON) as the development CLI.

_baml\_language/crates/baml\exec · high confidence

Introduce atb2 feedback-to-issue triage pipeline

A new automated feedback pipeline has been added in tools/atb2 that ingests user reports from PostHog and Slack, triages them into GitHub issues with reproducible examples, estimates difficulty, and automatically implements fixes via an AI agent in a sandboxed worktree. The pipeline handles the full lifecycle: creating issues, assigning subsystem owners, running design and fix passes, opening draft pull requests, and monitoring PRs until they merge or fail, with all state persisted in Supabase and audit trails maintained for each run.

tools · high confidence

Introduce baml-cli with Boundary Cloud integration and new subcommands

The \baml-cli\ tool is now available, providing a unified command-line interface for BAML projects. It includes commands for initializing projects (\init\), generating code (\generate\), checking for errors (\check\), running tests (\test\), and formatting source files (\fmt\). A new \deploy\ command enables publishing projects to Boundary Cloud, supported by a new \auth\ module that handles login and token management via PropelAuth. The CLI also features a new Language Server (\lsp\) for IDE integration, an \optimize\ command for prompt optimization, and a \dev\/\serve\ mode for local development. Internal commands like \auth\, \login\, \deploy\, \fmt\, \dumphir\, \dumpbytecode\, and \repl\ are hidden by default to reduce clutter, while feature flags (\beta\, \display\_all\_warnings\) allow users to control experimental behavior.

engine/cli · high confidence

Introduce binary size gating tool with baseline management and CI integration

The \tools\_size\_gate\ crate adds a new CLI for monitoring and enforcing binary size limits. It supports measuring \cdylib\, \bin\, and \baml pack\ artifacts across platforms, comparing them against per-platform baselines, and enforcing absolute and delta-based size policies. The tool includes a \bake\ command to automatically refresh baselines and ceilings from CI reports, ensuring the gate adapts to legitimate size changes without manual intervention.

_baml\_language/crates/tools\_size\gate · high confidence

Introduce boundary tracing capabilities for observability

The standard library now includes a new \boundary\ module that enables tracing of execution units. This adds a \boundary.id()\ function to generate unique identifiers for traced work and a \boundary.current()\ function to retrieve the active boundary ID within a function invocation. Additionally, the \LocalId\ class provides a \capture\ method, allowing users to configure which call arguments, return values, and errors are recorded for each traced unit of work.

_baml\_language/crates/baml\_builtins2/baml\std/boundary · high confidence

Introduce cargo-stow for Rust workspace linting and structure validation

Added a new Rust workspace tool, cargo-stow, designed to enforce governance in monorepos. It validates flat crate layouts, enforces naming conventions (e.g., \\<namespace\>\_\<word\>\), ensures dependencies use workspace-level declarations, and restricts dependency usage via configurable rules. The tool also provides auto-fix capabilities for sorting dependencies and formatting TOML, as well as SVG dependency graph visualization.

_baml\_language/crates/tools\stow · high confidence

Introduce centralized release management and platform contract for BAML toolchain and SDKs

This change introduces the \baml\_release\ crate, which establishes the authoritative logic for resolving the BAML home directory, fetching versioned release artifacts, and validating manifest schemas. It defines a structured platform contract (\platforms.json\) that serves as the single source of truth for build matrices across the toolchain, Python, Node.js, Java, C\#, and CFFI bridges, ensuring that supported targets and artifact configurations are consistent. Users benefit from a more robust and standardized installation and update process for the BAML CLI and its language-specific SDKs, with improved validation of downloaded artifacts and clearer support for multi-platform distributions.

_baml\_language/crates/baml\release · high confidence

Introduce content-addressed bytecode cache for incremental compilation

The \bex\_cache\ crate now provides a content-addressed on-disk cache for compiled \Program\ bytecode, modeled after the Go build cache. This cache eliminates explicit invalidation logic by folding all compile inputs (compiler fingerprint, options, manifest, and sorted source files) into a SHA-256 \CacheKey\, ensuring that any change produces a cache miss. The system supports incremental compilation by storing per-file \CompilationUnit\ entries and diagnostics, with a current format version of 15 that reflects recent changes to type layouts, interface dispatch, and bytecode opcodes. This change improves compilation performance by allowing the compiler to reuse previously compiled bytecode when inputs remain unchanged, while maintaining correctness through deterministic emission and strict key completeness.

_baml\_language/crates/bex\cache · high confidence

Introduce dedicated release pipeline scripts for SDK mirrors, hygiene, and version management

The scripts directory now includes a suite of new Python utilities that formalize the BAML release process. \assemble-go-sdk-mirror\ and \assemble-swift-sdk-mirror\ generate self-contained source trees for the Go and Swift package managers, with the Swift script specifically stamping release asset URLs and checksums into the Package manifest. \baml-bridge-cffi-hygiene\ scans native binaries to reject build-machine paths and credential-shaped strings, hardening shipping artifacts. \baml-csharp-release-contract\ validates the C\# projection against a platform contract, ensuring correct RIDs and native assets. \baml-language-version\ and \baml-wrapper-version\ manage canonical SemVer surfaces across registries (npm, PyPI, NuGet, etc.) and the wrapper crate respectively. \baml-release-manifests\ and \baml-release-platforms\ generate toolchain/wrapper JSON manifests and validate wrapper artifact sets against the platform contract. Finally, \baml\_nightly\_select.py\ validates canary CI coverage to safely select nightly release sources.

scripts · high confidence

Introduce external type system for FFI boundaries

The \bex\_external\_types\ crate now provides the foundational types for crossing the boundary between the BEX engine and external host languages (Python, JavaScript, C FFI). This includes \BexExternalValue\, a self-contained value tree for FFI conversion that supports union types with metadata, and \Handle\, an opaque, thread-safe reference to heap objects that ensures safe memory management via RAII. Additionally, \host\_return.rs\ introduces strict, schema-free validation to ensure that values returned from host-callable functions match their declared return types, preventing type corruption at the engine boundary.

_baml\_language/crates/bex\_external\types · high confidence

Introduce modular BAML editor workbench with remote playground support

The \typescript2/pkg-editor\ package now provides a structured, modular editor workbench that separates the shared Monaco UI from the backend transport layer. Users can now run the BAML playground over remote WebSocket connections (e.g., via \baml-cli playground\) instead of being limited to in-browser WASM workers, enabling the editor to function over SSH tunnels and remote servers. This change introduces a pluggable \EditorBackend\ interface, a dedicated \ExecutionPanelPane\ for the playground UI, and a \remote-backend\ implementation that connects to external LSP and runtime endpoints. The workbench also includes a new 'Monospace Dark' theme and improved handling of media files and workspace paths.

typescript2/pkg-editor · high confidence

Introduce new Go SDK code generator

A new greenfield Go SDK emitter has been added to the \sdkgen\_go\ crate, generating idiomatic Go code from BAML bytecode. The generator maps BAML types to Go equivalents, including primitives, classes, enums, unions, and functions, while handling package structure by creating one Go package per BAML package. It supports typed functional options for defaulted arguments, instance methods, and streaming projections. The implementation includes a formatting step that invokes \gofmt\ to ensure generated files are properly formatted, and provides detailed error reporting if the Go toolchain is missing or if formatting fails.

_baml\_language/sdks/go/sdkgen\go · high confidence

Introduce new \`baml\_db\` crate for compiler infrastructure and diagnostics

The \baml\_db\ crate has been added to provide the core database layer for the BAML compiler. It introduces \ProjectDatabase\, a Salsa-backed state manager that handles source-root management, file tracking, and dependency resolution. This change adds a centralized diagnostic collection system (\check.rs\) that aggregates parse, HIR, and type-inference errors across the project, including parallel processing for large file sets. It also includes utilities for project root discovery (\baml.toml\ and \baml\_src/\ detection), manifest parsing, and stdlib prefix caching to optimize compilation performance. Test helpers are provided to facilitate white-box testing of the compiler pipeline.

_baml\_language/crates/baml\db · high confidence

Introduce shared ctypes bridge crate for cross-language value conversion

The new \baml\_language/crates/bridge\_ctypes\ crate provides the shared infrastructure for converting values across the C FFI and WASM boundaries. It includes a build script that generates Rust (prost) and Python (protoc) clients from the \baml\_bridge\ protobuf definitions, a global handle table for managing opaque values crossing the boundary, and comprehensive encoding/decoding logic for host values, types, and tracebacks. This centralizes the serialization logic previously scattered across language-specific bridges, ensuring consistent handling of primitives, complex types, and media assets for all SDK consumers.

_baml\_language/crates/bridge\ctypes · high confidence

Introduce standard I/O functions and Read/Write interfaces

The standard library now includes basic console I/O capabilities with \input\ for reading from stdin (returning an error on failure rather than panicking) and \print\, \println\, \eprint\, and \eprintln\ for writing to stdout and stderr (panicking on host unavailability). Additionally, new \Read\ and \Write\ interfaces are available to abstract byte-level streaming, providing methods like \bytes\, \text\, \write\_some\, and \flush\ to handle data ingestion and output in a manner consistent with Rust and JavaScript stream models.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\io · high confidence

Introduce streaming CSV standard library with typed readers and writers

The BAML standard library now includes a new \baml.csv\ module providing streaming CSV readers and writers. Users can parse CSV data into typed records using \rows\<T\>\, \decode\<T\>\, and \read\<T\>\, leveraging the same column-matching rules as the JSON library. The module supports configurable options for delimiters, quoting, error handling (such as skipping malformed records), and encoding, while also offering a writer with options for quote styles, headers, and CSV-injection sanitization. Errors are structured with positional diagnostics (line, record, field) and distinct kinds for robust handling.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\csv · high confidence

Introduce structured test infrastructure and compiler benchmarks

The baml\_tests crate now provides a comprehensive, tiered test infrastructure for the BAML compiler, including a build script that auto-generates test modules from project directories and embeds a pre-compiled standard library prefix for consistent test execution. It introduces a new benchmarking suite (compiler\_benchmark) with incremental, scale, and realistic workload categories, alongside a CodSpeed integration that automatically generates wall-time benchmarks from the speedtest workload corpus. The setup includes standardized snapshot handling via .gitattributes and insta.yaml, and a README documenting how to add, run, and maintain compiler and runtime tests.

_baml\_language/crates/baml\tests · high confidence

Introduce sys\_types crate for system operations and SSE parsing

The new \sys\_types\ crate centralizes the type definitions and infrastructure for the BEX runtime's external I/O operations. It provides the \SysOp\ trait and associated types (such as \BexExternalValue\, \CallId\, and \OpError\) that allow the engine to dispatch file system, network, and shell operations. Additionally, it includes an incremental Server-Sent Events (SSE) parser (\SseParser\) to handle streaming data, and uses build scripts to generate typed I/O structs from the BAML standard library, ensuring type safety for external function calls.

_baml\_language/crates/sys\types · high confidence

Introduce the Prompt Fiddle playground with in-browser WASM runtime and Monaco editor

The Prompt Fiddle app is now available as a standalone Next.js application, providing an interactive environment for editing and running BAML programs directly in the browser. This release adds a full client-side architecture including a Monaco editor with BAML syntax highlighting, a dedicated Web Worker hosting the BAML WASM runtime for execution and LSP features, and a virtual filesystem that supports both text and media files. Users can now run BAML code locally without external dependencies, with state persistence via localStorage and a reset option to restore default files.

typescript2/app-promptfiddle · high confidence

Introduces BAML Language Server extension with playground and protocol compatibility

The VS Code extension now includes a new Language Server Protocol (LSP) implementation that manages a single server instance per workspace window, resolving previous issues with multi-root workspaces and stdlib document handling. It introduces protocol versioning (LSP protocol 1, Playground protocol 2) to ensure client-server compatibility and provides a built-in playground UI. The playground is served via a webview panel that maps to a specific server port, injects the necessary WebSocket URL for communication, and rewrites asset URLs to work within VS Code's security context. The extension also adds status bar indicators for server state and commands to open the playground for specific projects.

typescript2/app-vscode-ext · high confidence

Introduces baml\_base crate as the compiler's shared core infrastructure

The new \baml\_base\ crate centralizes foundational types and logic previously scattered across the compiler, providing a dependency-free base for other compiler modules. It introduces \TyAttr\ to carry schema-aligned parser (SAP) streaming metadata on types, implements \validate\_client\_options\ to enforce Azure OpenAI endpoint constraints, and adds \dedent\_backtick\ and \escape\ modules to handle BEP-049 backtick string literal formatting and escape sequences. Additionally, it defines \FileId\ and \Span\ for source location tracking, \SourceRoot\ and \SourceFile\ structures for file management via Salsa, and \QualifiedName\ for unambiguous item identification across compiler phases.

_baml\_language/crates/baml\base · high confidence

Introduces browser-based WASM runtime for BAML analysis and playground

Adds the \bridge\_wasm\ crate, enabling BAML to run in the browser via WebAssembly. This includes a WASM-specific implementation of the standard library (HTTP, environment variables, I/O, file system, time, and random number generation) that delegates platform operations to JavaScript callbacks. The crate provides a Language Server Protocol (LSP) wire layer for browser-based code analysis and a playground engine that builds and manages BAML execution contexts synchronously on the main thread. It also implements in-memory run history and live value caching to replace disk-based storage, allowing users to run and debug BAML programs directly in their browser tabs.

_baml\_language/crates/bridge\wasm · high confidence

Introduces lazy environment variable references to prevent credential leakage and support offline rendering

The \env\ namespace now provides a \Ref\ class and \env.NAME\ sugar that creates a lazy reference to an environment variable rather than reading its value immediately. This ensures that credentials are never stored inside constructed values (such as client definitions), preventing accidental leakage through printing, serialization, or journaling. Additionally, a new \get\_or\_panic\_lenient\ function allows generated client constructors to tolerate missing environment variables during offline spec prompt rendering, while direct network calls still enforce strict presence of required credentials.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\env · high confidence

Introduces lazy iterator adapters and a new \`Iterable\`/\`Iterator\` interface

The standard library now includes a new \baml.iter\ namespace featuring an \Iterable\ interface and an \Iterator\ interface with lazy adapters such as \map\, \filter\, \filter\_map\, \flat\_map\, \step\_by\, and \chain\. These adapters process elements on-demand rather than eagerly, allowing for efficient chaining of operations. The \Iterator\ uses a \Done\ sentinel type to distinguish between valid null elements and the end of the sequence, and error types propagate through the chain via union types.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\iter · high confidence

Introduces shared generic type-variable inference and union normalization

A new \baml\_type\_runtime\ crate has been added to centralize pure \Ty\<N\>\-walking primitives for generic-call inference and union normalization. This change removes the previously hand-maintained type inference logic from the runtime engine, replacing it with a shared algorithm that both the compiler and the runtime engine can use. For users, this ensures consistent type inference behavior across compile-time and runtime boundaries, particularly for generic functions and union types, while laying the groundwork for more robust variance-aware type checking.

_baml\_language/crates/baml\_type\runtime · high confidence

Introduces structured RPC types for AST, authentication, and runtime tracing

The \engine/baml-rpc\ module now defines the core data structures and API contracts used by the BAML runtime and Studio. This includes a new type-safe ID system (\baml-ids\) for function calls, events, and projects, and a comprehensive AST representation (\ast/\) that models functions, types, and source code with stable identifiers. Authentication is formalized with \auth/\ types for API keys, permissions (e.g., \TracesWrite\, \BamlDeploy\), and environment management. Runtime interactions are standardized via \runtime\_api/\, which specifies the schema for trace events (\BackendTraceEvent\), function call errors, BAML value serialization, and S3 upload metadata for blobs and traces. These types serve as the shared interface between the engine, the backend, and the UI.

engine/baml-rpc · high confidence

Introduces the BEX heap with generational garbage collection and safe external access

The \bex\_heap\ crate now provides the unified memory management layer for the BEX virtual machine, featuring a generational garbage collector (Gen0/Gen1/Gen2) with copy-compaction, a card table for efficient cross-generation pointer tracking, and a \ChunkedVec\ storage structure that ensures stable object pointers during concurrent growth. It exposes a safe \accessor\ API for external code to read heap objects without holding bare pointers across GC cycles, and includes optional instrumentation via \heap\_debug\ and \gc\_profiling\ features for diagnostics and performance analysis.

_baml\_language/crates/bex\heap/src · high confidence

Introduces versioned CFFI bridge API with handle, host-value, and runtime management entry points

The \bridge\_cffi\ crate now exposes a structured C-compatible interface for external language bridges. This includes a versioned registration mechanism (\register\_bridge\_ffi\ with \BamlBridgeInfoV1\) that validates SDK and runtime compatibility, and a handle API (\baml\_handle\_clone\, \baml\_handle\_release\, \baml\_media\_from\_url\) for managing engine resources and media. It adds a host-value dispatch system (\register\_host\_dispatch\_callback\, \complete\_host\_call\) allowing BAML code to invoke host-side functions and receive results or errors. Runtime initialization is now available via \create\_baml\_runtime\ and \initialize\_runtime\_from\_bytecode\, and the bridge supports registering callbacks for unhandled spawn errors and outbound results.

_baml\_language/crates/bridge\cffi/src/ffi · high confidence

Introduction of custom BAML logging library

The \baml-log\ crate has been introduced to replace the previous logging implementation, providing a dedicated logging interface for BAML. This new library supports both standard text and JSON output formats, with configuration controlled via BAML-specific environment variables (\BAML\_LOG\, \BAML\_LOG\_JSON\, \BAML\_LOG\_STYLE\). It offers dynamic runtime configuration for log levels and color modes, and includes structured event logging capabilities via new macros like \event!\ and \elog!\ for serializing payloads as JSON objects.

engine/baml-lib/baml-log · high confidence

Introduction of feature flags and IR hashing infrastructure

The engine now supports configurable feature flags, including \beta\ (to enable beta features and suppress experimental warnings) and \display\_all\_warnings\ (to show all warnings in CLI output), allowing users to control the visibility and behavior of experimental capabilities. Additionally, a new Intermediate Representation (IR) hashing system has been implemented to generate stable signatures for BAML classes, enums, functions, clients, and type aliases, which facilitates efficient change detection and caching within the engine.

engine/baml-lib/baml-core · high confidence

Introduction of the BAML Virtual Machine (VM) compiler and runtime

The BAML compiler has been re-architected to introduce a new Virtual Machine (VM) execution model. This change replaces the previous interpretation path with a two-stage compilation process: source code is lowered into a High-level Intermediate Representation (HIR) and then compiled into VM bytecode. This new architecture includes a dedicated bytecode interpreter, a type-checked intermediate representation (THIR), and a static control-flow visualizer (Viz) to support runtime debugging and streaming. The compiler now natively supports advanced language features such as \@watch\ notifications, class methods, and built-in types like \baml.HttpRequest\ and \baml.HttpMethod\.

engine/baml-compiler · high confidence

Introduction of the SAP parsing layer with native BigInt support

The \bex\_sap\ crate introduces a new parsing and value representation layer for the system. This change adds native support for arbitrary-precision integers (\Bigint\) alongside existing primitive types, ensuring fidelity for large numeric values. It also implements a complete type system bridge, converting internal SAP types to the engine's \SapTy\ representation and mapping parsed \BamlValue\ instances to external values, while handling streaming states and complex structures like classes, enums, and unions.

_baml\_language/crates/bex\sap/src · high confidence

Introduction of the new BAML compiler parser crate

The \baml\_compiler\_parser\ crate has been added to the codebase, providing the foundational parsing infrastructure for BAML source files. This new component implements incremental parsing with error recovery, leveraging the Salsa reactive query system to track parse results (green trees and errors) and the Rowan library to construct syntax trees. It exposes public APIs such as \parse\_result\, \parse\_green\, \parse\_errors\, and \syntax\_tree\, allowing other parts of the compiler to retrieve the parsed representation of BAML files efficiently.

_baml\_language/crates/baml\_compiler\parser · high confidence

Kotlin-native coroutine support and union ergonomics in the Kotlin bridge

The Kotlin bridge SDK now provides idiomatic Kotlin APIs for structured concurrency and type handling. \withBamlContext\ automatically aborts in-flight BAML calls when a coroutine is cancelled, ensuring proper cleanup without manual intervention. Streaming results are exposed as cold \kotlinx.coroutines.flow.Flow\ objects via \asFlow()\, allowing cancellation to stop the underlying engine call, with \awaitFinal()\ for retrieving the completed value. Additionally, exhaustive \fold\ and \armNOrNull\ extension functions are added for runtime union types (Union2 through Union10), enabling safe and idiomatic pattern matching on multi-arm BAML unions.

_baml\language/sdks/java/baml-bridge-kotlin · high confidence

Launch of the Agent Testing Board (ATB) dashboard and website infrastructure overhaul

This release introduces the Agent Testing Board (ATB), a new interactive dashboard for monitoring live agent runs, issues, and builds. The ATB includes a real-time feed of agent wins and bugs, a code-viewer with BAML syntax highlighting, an IDE-style file tree, and a comment system for run transcripts. To support this, the website's frontend configuration, metadata, and API routes have been restructured, and a new server-side code sandbox has been added to allow users to execute BAML code directly in the browser.

typescript2/app-website · high confidence

Native AWS and Google Cloud authentication support

The \sys\_auth\ crate now provides native Rust implementations for AWS SigV4 request signing and Google Cloud OAuth2 token minting, replacing previous external dependencies. This change introduces credential resolution that respects explicit options first, then falls back to standard provider chains (AWS environment/config/IMDS and Google Application Default Credentials), all while routing IO through BAML's sandboxed \RuntimeIo\. A new security boundary is established for AWS \credential\_process\ commands, which are disabled by default and require an explicit \BAML\_AWS\_CREDENTIAL\_PROCESS=1\ opt-in to run, ensuring they are not executed without host permission.

_baml\_language/crates/sys\auth · high confidence

Native BAML LLM provider clients for Anthropic and Google Vertex

The standard library now includes native BAML implementations for the Anthropic Messages API and Google Vertex AI (Gemini) clients, replacing the previous \sys\_llm\ Rust-based approach. This change introduces typed wire models for request and response structures, handling specific provider details such as Anthropic's content blocks and tool usage, and Google's authentication via OAuth2 tokens and project resolution. Users benefit from a unified, type-safe interface for interacting with these LLM providers directly within BAML, including support for streaming, tool calling, and media inputs.

_baml\_language/crates/baml\_builtins2/baml\_std/anthropic/ns\_internal, baml\_language/crates/baml\_builtins2/baml\_std/google/ns\internal · high confidence

Native BAML LLM provider clients for Anthropic, Google, and OpenAI

The standard library now includes native BAML client definitions for major LLM providers, replacing the previous generic or internal-only approaches. This adds \anthropic.Client\ for the Anthropic Messages API (supporting extended thinking and tool choice), \google.GeminiClient\ and \google.VertexClient\ for Google's Gemini and Vertex AI APIs (with explicit safety settings and enterprise authentication paths), and a suite of OpenAI clients: \ChatClient\ for standard chat completions, \ImageClient\ for image generation, \AzureClient\ for Azure OpenAI deployments, \GenericClient\ for any OpenAI-compatible server, and \OllamaClient\ for local Ollama instances. These clients are defined as typed BAML classes that handle credential resolution, request rendering, and invocation through a shared internal core, providing a consistent, type-safe interface for calling external AI models directly from BAML functions.

_baml\_language/crates/baml\_builtins2/baml\_std/anthropic, baml\_language/crates/baml\_builtins2/baml\_std/google, baml\_language/crates/baml\_builtins2/baml\std/openai · high confidence

Native JSON type and serialization functions

The standard library now includes a native \json\ type representing untyped JSON values (null, bool, int, float, string, arrays, and maps), along with functions to parse JSON strings into this type (\parse\), serialize \json\ values back to strings (\stringify\, \stringify\_pretty\), and convert arbitrary BAML values to/from JSON (\to\_json\, \from\, \from\_string\, \to\). Error handling is standardized with specific exception classes: \ParseError\ for invalid JSON syntax, \DecodeError\ for type mismatches during decoding, and \SerializationError\ for values that cannot be represented in JSON. The \from\_string\<T\>\ function performs structural decoding into a target type \T\, while \to\<T\>\ (via \from\_json\) honors \baml.FromJson\ overrides.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\json · high confidence

Native system operations provider with host callable support and HTTP server

The \sys\_native\ crate now provides the native Tokio-based implementation for system operations, introducing a new \NativeSysOps\ provider that handles file, environment, time, and shell operations. This update adds the ability to invoke host-language functions (Python, Node, Go) directly from BAML via the \baml.host.call\_host\_value\ sysop, including argument encoding, in-flight call tracking, and contract validation. It also introduces a built-in HTTP/HTTPS server (\baml.http.Server\) with WebSocket support, allowing BAML applications to serve HTTP endpoints and handle WebSocket upgrades natively.

_baml\_language/crates/sys\native · high confidence

New AI standard library package with typed clients, content, and error handling

The \ai\ standard library package is now available, providing a structured surface for LLM interactions. It introduces a \root.Client\ interface with a \Selector\ type that supports dynamic client resolution via provider/model strings or environment variables at call time. The package defines a unified content vocabulary (\Text\, \Media\, \ToolUse\, \Reasoning\) and a comprehensive error taxonomy (\NetworkFailure\, \InvalidRequest\, \RateLimited\) with retry safety judgments. It also includes a \Journal\ for recording run events and internal helpers for provider authentication (Google Cloud, AWS) and media resolution.

_baml\_language/crates/baml\_builtins2/baml\std/ai · high confidence

New API keys management dialog and file tree component

The playground now includes a dedicated API keys dialog that allows users to add, edit, import from .env files, and manage environment variables with auto-save and visibility toggles, alongside a new file tree viewer component for navigating project files.

typescript/packages/playground-common · high confidence

New AST module with visualization and language feature support

The \engine/baml-lib/ast\ crate has been introduced to provide the core Abstract Syntax Tree representation for BAML source code, including nodes for control flow (if, while, for loops), assertions, and method calls. This module also adds built-in visualization capabilities, generating Mermaid flowcharts to display header-based scopes and execution structure, and exposes a debug utility to render the entire AST as a visual diagram.

engine/baml-lib/ast · high confidence

New AWS Bedrock and Vercel AI Gateway image clients in the standard library

The standard library now includes built-in support for Amazon Bedrock and Vercel AI Gateway image generation. The new \aws\ package provides a \BedrockClient\ that connects to the Bedrock Converse API, handling SigV4 authentication, model inference parameters, and tool use, while explicitly noting that streaming is unsupported due to binary frame formats. The new \vercel\ package provides an \AiGatewayImageClient\ for the Vercel AI Gateway image endpoint, supporting text and image prompts, resolution settings, and provider-specific options. Both clients are implemented in BAML with Rust seams for specific cryptographic or ID requirements, allowing users to declare and use these providers directly in their BAML functions.

_baml\_language/crates/baml\_builtins2/baml\_std/aws, baml\_language/crates/baml\_builtins2/baml\std/vercel · high confidence

New BAML CLI commands and agent skill installation

The BAML CLI now includes several new subcommands to improve project management and agent integration. Users can install the bundled BAML agent skill using \baml agent install\, which places the skill in \.agents/skills\ or \.claude/skills\ within the project root. Authentication is managed via \baml auth\ (login, whoami, logout) using WorkOS device-code flow, and feedback can be submitted via \baml feedback\. Project validation is now possible with \baml check\, which reports compiler errors and warnings without executing code. Additionally, \baml clean\ allows users to remove segmented local profiler data, and \baml describe\ provides an agent-friendly way to explore project symbols, namespaces, and the standard library with search and JSON export capabilities.

_baml\_language/crates/baml\cli/src · high confidence

New BAML Standard Library package with core types and interfaces

The BAML standard library is now a distinct, implicitly available package (\baml.toml\) that provides the foundational types and interfaces for the language. This includes the core value types (\int\, \float\, \bigint\, \string\, \bool\, \null\, \uint8array\) with their specific behaviors (e.g., \bigint\ for arbitrary precision, \float\ with total ordering for NaN), the \Array\<T\>\ collection with mutation and iteration methods, and the \baml.ToString\, \baml.ToJson\, and \baml.FromJson\ interfaces for opt-in serialization and string conversion. It also introduces the \baml.ops.Compare\ and \baml.ops.Sortable\ interfaces to enable generic sorting and comparison logic across these types.

_baml\_language/crates/baml\_builtins2/baml\std/baml · high confidence

New BAML benchmark suite for compiler, runtime, and profiling

The repository now includes a comprehensive benchmark suite in \baml\_tests/benches\ to measure BAML performance across three dimensions. \runtime\_benchmark.rs\ measures pure VM execution speed using workloads from the speedtest corpus, while \compiler\_benchmark.rs\ measures the cost of compiling BAML source into bytecode (including an empty-project baseline). \package\_compile\_benchmark.rs\ specifically benchmarks the cold-cost and dispatch parity of the public \reflect.Package.compile\ API. Additionally, \profiling\_overhead.rs\ quantifies the performance cost of the profiling subsystem by comparing execution times with profiling enabled, suppressed, and logging-only modes. A new \cache\_profile.rs\ bench provides hardware performance counter data (cycles, IPC, cache misses) for specific workloads on macOS.

_baml\_language/crates/baml\tests/benches · high confidence

New BAML compiler syntax crate with Rowan-based AST

The \baml\_compiler\_syntax\ crate introduces a new, lossless syntax tree implementation for the BAML language using the Rowan library. This change provides a foundational AST layer that preserves source fidelity (including whitespace and comments) and supports incremental updates. It includes typed AST node wrappers for ergonomic access to BAML constructs (such as functions, classes, and types), a programmatic tree builder for testing, and utilities for traversing the tree and computing precise diagnostic spans that exclude leading and trailing trivia.

_baml\_language/crates/baml\_compiler\syntax · high confidence

New C\# SDK bridge with native interop and runtime support

The C\# SDK now includes a new bridge layer that connects the managed runtime to the native BAML engine via CFFI. This adds support for invoking BAML functions and handles, managing native memory and media types, and dispatching host callbacks, enabling C\# applications to interact with the BAML runtime.

_baml\_language/sdks/csharp/bridge\csharp · high confidence

New CLI commands for project initialization, validation, and development

The \baml-cli\ now includes dedicated commands for initializing new projects (\init\), validating BAML source files without generating code (\check\), and starting a development server with hot-reloading (\dev\). The \init\ command automatically detects the user's editor (VS Code or Cursor) and installs the corresponding extension, while \check\ reports validation errors and warnings. The \dev\ command watches the \baml\_src\ directory for changes and automatically regenerates clients and reloads the runtime, streamlining the local development workflow.

engine/baml-runtime · high confidence

New CLI wrapper with toolchain management and self-update capabilities

The \baml\ CLI wrapper now includes a comprehensive toolchain management system, allowing users to install, pin, update, and select specific BAML toolchain versions (e.g., canary, nightly, or specific versions) via commands like \baml toolchain use\ and \baml toolchain pin\. It also supports local toolchain paths for custom builds. The wrapper features a self-update mechanism (\baml self-update\) for curl-installed versions, while package-manager-managed wrappers will refuse self-update and suggest the appropriate package manager command. Additionally, the CLI warns users when their active toolchain version is outdated compared to the remote manifest.

_baml\language/crates/baml · high confidence

New Go SDK CFFI header for BAML runtime bridge

The Go SDK now includes a generated CFFI header file (baml\_cffi.h) that defines the stable ABI for communicating with the BAML runtime. This header establishes the function-table contract (BAML\_API\_V1\_ABI\_VERSION 2), defines handle types for media, functions, and runtime values, and specifies the calling conventions and status codes required for the Go bridge to invoke BAML functions and manage resources across the language boundary.

_baml\_language/sdks/go/baml\go/internal/cffi/include · high confidence

New HTTP client, server, and WebSocket primitives

The standard library now includes a comprehensive HTTP module (\baml.http\) providing \fetch\ and \send\ for making outgoing requests with optional timeouts, and \Server\ for binding and serving incoming HTTP/HTTPS traffic with configurable limits, TLS support, and HTTP/1 or HTTP/2. It also introduces Server-Sent Events (SSE) support via \fetch\_sse\ and \SseStream\, as well as WebSocket handling through the \websocket\ parameter in \Server.serve\ and the \WsAccept\ type, allowing BAML applications to act as full-featured network endpoints.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\http · high confidence

New Java SDK with Gradle plugin and Kotlin ergonomics

Users can now generate a typed BAML Java SDK directly within their Gradle builds using the new \com.boundaryml.baml\ plugin, which handles code generation, incremental caching, and automatic injection of the \baml-bridge\ runtime and platform-specific native libraries. The release also introduces \baml-bridge-kotlin\, a library providing Kotlin-idiomatic features such as coroutine bridges for streams and cancellation-aware call contexts, which is automatically included when the Kotlin JVM plugin is applied.

_baml\language/sdks/java · high confidence

New Rust SDK with automatic type derivation and dynamic library loading

The Rust SDK now provides \\#\[derive(BamlEncode)\]\ and \\#\[derive(BamlDecode)\]\ macros in \baml-macros\ to automatically serialize and deserialize Rust structs and enums to and from the BAML runtime format, supporting features like dynamic fields and literal variants. To support this, the \baml-sys\ crate introduces a new runtime dynamic library loading mechanism that resolves the native library from explicit paths, environment variables, or by auto-downloading it from GitHub releases with SHA-256 checksum verification.

languages/rust/baml · high confidence

New SAP module for schema-aligned parsing in custom LLM providers

A new \sap\ module has been added to the standard library, exposing the Schema-Aligned Parsing (SAP) logic used by BAML's built-in LLM path to BAML-authored providers. This module provides \parse\ and \parse\_type\ functions, allowing users to coerce raw LLM text output into typed results using the same internal coercion mechanisms, thereby enabling consistent parsing behavior for custom provider implementations.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\sap · high confidence

New SQL-based profiling query engine and structured history storage

This change introduces a new \baml\_query\_profiles\ crate that enables querying local execution profiles via SQL using DataFusion, including a CAS-backed value resolver, a bounded fold cache for performance, and deterministic snapshot generation. It also adds a new \history-v1\ storage format in \bex\_events\ for structured run lifecycle and log data, separating it from the new \profiles-v1\ profiling store, and includes a micro-benchmark for the profiling clock to verify timing overhead.

_baml\_language/crates/bex\events · high confidence

New TypeScript SDK bridge with async context management and structured error handling

The TypeScript SDK bridge now includes a new \CtxManager\ class that uses Node.js \AsyncLocalStorage\ to isolate context across asynchronous operations, providing methods like \traceFn\ and \traceFnAsync\ to wrap functions with context tracking. The SDK introduces a structured error hierarchy (\BamlError\, \BamlPanic\, \BamlInvalidArgumentError\, etc.) that carries detailed metadata such as BAML trace frames and class names, replacing previous error handling mechanisms. Additionally, the bridge adds a \BamlFunctionSpec\ class to proxy LLM function specifications, allowing users to inspect function metadata (name, arguments, output type) and build requests or parse results directly from the spec object.

_baml\_language/sdks/typescript/bridge\typescript/dist · high confidence

New TypeScript SDK with AbortController, media types, and client registry

The TypeScript language client has been implemented as a new native module (via napi-rs), introducing several key capabilities. Users can now cancel in-flight LLM requests using the standard JavaScript AbortController API, which maps to Rust cancellation tokens. The SDK exposes new media types for handling images, audio, PDFs, and videos via \BamlImage\, \BamlAudio\, \BamlPdf\, and \BamlVideo\ classes, supporting both URL and base64 inputs. A \ClientRegistry\ type allows users to programmatically register and configure LLM clients (e.g., specifying providers and retry policies) before runtime initialization. Additionally, the module includes a \Collector\ for tracing/logs, error handling that maps internal BAML errors to specific JavaScript error types, and a CLI invocation wrapper.

_engine/language\_client\typescript · high confidence

New TypeScript client code generation with streaming, abort, and React hooks

The TypeScript generator now produces a complete client library including async and sync clients, request builders, and parsers, along with a new set of React hooks and server actions for seamless integration. Users can now leverage native AbortSignal support to cancel in-flight requests, access intermediate thinking tokens via the onTick callback, and specify LLM clients through the client option. The generated code also includes browser-compatible media types (Image, Audio, Pdf, Video) and a robust state management system for handling streaming responses in React applications.

engine/generators/languages/typescript · high confidence

New TypeScript serialization layer for BAML function arguments and results

The \typescript2/pkg-proto\ package now provides the core TypeScript utilities for encoding and decoding BAML function calls and results via protobuf. This includes \encodeCallArgs\ and \encodeRunArgs\ for serializing JavaScript values (including \bigint\, media, and prompt AST) into the wire format, and \decodeCallResult\ for deserializing responses back into native TypeScript types like \BamlJsMedia\ and \BamlJsPromptAst\. The package also exports the necessary type definitions and a test suite to ensure round-trip fidelity.

typescript2/pkg-proto · high confidence

New UDF engine for evaluating Jinja-based cost calculations

The \engine/boundary-udf\ module now provides a dedicated Rust-based engine for parsing YAML configuration files and evaluating Jinja expressions to compute LLM usage costs. This change introduces a new configuration schema (\UDFConfig\) that supports global and function-scoped constants, match conditions, and return expressions. The engine handles complex logic such as matching provider-specific pricing (e.g., OpenAI, Anthropic, Gemini) via override trees, compiling Jinja templates with a custom \date\_between\ filter, and managing undefined variable access by zeroing missing values or reporting them as missing. It also includes a path-trie data structure to efficiently track and zero out nested undefined fields during evaluation.

engine/boundary-udf · high confidence

New VS Code webview shell and comprehensive test coverage for the BAML playground

This change introduces the \app-vscode-webview\ package, providing a dedicated React shell for the BAML playground inside VS Code. It includes the root \App\ component, which manages WebSocket connections and project state, and a lazily loaded \RemoteEditorView\ that integrates the Monaco workbench via a remote LSP backend. The \ExecutionPanel\ and \FunctionSidebar\ components are now fully covered by new unit tests (including gating, strict-mode lifecycle, and interaction tests), ensuring the run workflow and sidebar navigation behave correctly in the webview environment.

typescript2/pkg-playground · high confidence

New Web runtime support for BAML functions

This change introduces a new \sys\_wasm\ crate that provides the system operations (SysOps) required to run BAML functions in web environments, specifically targeting browsers and Cloudflare Workers. It implements a host-value registry to manage JavaScript callbacks passed from the JS encoder, enabling BAML code to invoke user-defined JavaScript functions asynchronously. The implementation includes Web-specific adapters for HTTP (using the global \fetch\ API), file system operations (via a synchronous read callback), and time utilities, while explicitly marking unsupported features like timezone resolution as unavailable. This allows BAML applications to execute in single-threaded WASM targets by bridging Rust system calls to JavaScript host capabilities.

_baml\_language/crates/sys\wasm · high confidence

New \`baml.crypto\` standard library with authenticated encryption and hashing

The \baml.crypto\ namespace is now available in the standard library, providing a set of cryptographic primitives for secure data handling. Users can now perform authenticated encryption using \Aes256GcmSiv\ and \Aes128GcmSiv\ (nonce-misuse-resistant), \ChaCha20Poly1305\, and \XChaCha20Poly1305\ (stream ciphers with 96-bit and 192-bit nonces respectively). Additionally, incremental hashing is supported via \Sha256\. These classes are defined in new \.baml\ files under \baml\_std/baml/ns\_crypto\, implementing standard interfaces like \Aead\ and \Hasher\, and include specific error handling for decryption failures.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\crypto · high confidence

New \`baml.time\` standard library with nanosecond-precision date and time types

The \baml.time\ module now provides a comprehensive set of date and time types modeled after the TC39 Temporal proposal, including \Instant\ for absolute timestamps, \Duration\ for exact timespans, and wall-clock types (\PlainDate\, \PlainTime\, \PlainDateTime\, \ZonedDateTime\) for civil calendar operations. These types support high-precision arithmetic (nanosecond resolution using \bigint\), robust parsing of ISO 8601 and RFC 3339 formats, and explicit handling of timezone conversions and daylight saving time ambiguities via \Disambiguation\ strategies. The library also introduces \TimeZoneOffset\ for fixed offsets and integrates with the new \baml.ToJson\ and \baml.FromJson\ interfaces for serialization.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\time · high confidence

New assert standard library with tolerant float and type-checking assertions

The \assert\ standard library is now available, providing built-in functions for validating test conditions. It includes \is\_true\, \not\_null\, \equal\, and \contains\ for basic checks, alongside a new \approx\_equal\ function for comparing floating-point values within a specified tolerance, and \is\_type\ for verifying and narrowing value types at runtime. This library is implicitly available to all packages and depends on the \baml\ and \reflect\ standard libraries.

_baml\_language/crates/baml\_builtins2/baml\std/assert · high confidence

New bex\_project runtime crate for compiling and executing BAML programs

The \bex\_project\ crate introduces a reusable runtime API for compiling BAML source files and executing functions. It exposes a \Bex\ trait with methods like \call\_function\ and \call\_function\_with\_trace\ to execute BAML functions by name or handle, and a \new\ constructor that compiles in-memory sources into a \BexEngine\. The crate also includes a \PrecompiledStdlib\ mechanism that loads a versioned, content-addressed standard library artifact to ensure compiler consistency, and a \RuntimeCompiler\ implementation that supports dynamic, session-based compilation of mounted packages.

_baml\_language/crates/bex\project/src · high confidence

New built-in logging functions accept any BAML value

The standard library now includes \info\, \debug\, \warn\, and \error\ functions that accept an \unknown\ type, allowing users to log any BAML value—including maps, strings, numbers, booleans, lists, class instances, enum variants, and null—directly as the log event's data. This change enables more flexible and structured debugging and observability without requiring manual serialization or type conversion before logging.

_baml\_language/crates/baml\_builtins2/baml\std/log · high confidence

New common package for shared types and schemas

A new \typescript/packages/common\ package has been introduced to centralize shared TypeScript definitions. This includes interfaces and types for the parser database (functions, classes, enums, and implementations), schemas for client event logs and LLM events using Zod, and test-related structures such as test status enums and result interfaces. Additionally, a patch for \vscode-inline-wasm-as-base64\ has been added to force WASM URLs to be inlined as base64 regardless of the SSR or Vitest environment.

patches, typescript/packages/common · high confidence

New compiler2 bytecode emitter with stackification optimizations

The \baml\_compiler2\_emit\ crate introduces a new code generation pipeline that compiles MIR2 to VM bytecode using a stackification strategy. This approach optimizes performance by inlining virtual locals and carrying values on the stack (phi-like, return-phi, call-result immediate, and aggregate operands) instead of storing them to stack slots, reducing memory pressure and improving execution speed. The emitter includes sophisticated analysis for switch statement dispatch (jump tables, perfect hashing, binary search), copy propagation, constant propagation, and dead code elimination, alongside a verifier to ensure MIR and analysis invariants are maintained.

_baml\_language/crates/baml\_compiler2\emit · high confidence

New control-flow visualization graph built directly from the compiler2 AST

The \baml\_compiler2\_visualization\ crate now generates control-flow graphs directly from the compiler2 Abstract Syntax Tree (AST) instead of the intermediate VIR representation. This change ensures that the visualization graph remains valid and renderable even when the source code contains parse or type errors, because the AST builder uses \Expr::Missing\ and \Stmt::Missing\ sentinels for error recovery rather than failing. The module exposes functions to build these graphs from AST expression bodies and includes a three-pass flattening pipeline to prune implicit nodes, hoist branch arms with labeled fan-out edges, and inline branch-arm containers for a cleaner visual representation.

_baml\_language/crates/baml\_compiler2\visualization · high confidence

New development and CI tooling scripts for the BAML language workspace

This change introduces a suite of new scripts in the \baml\_language/scripts\ directory to support development workflows and quality gates. The \bench-compare\ script enables performance profiling and side-by-side comparison of VM metrics (instructions, cycles, IPC) across branches. The \lsp-multi-root-smoke.py\ script provides live integration testing for the LSP server's multi-root workspace support over stdio. Additional tooling includes \find\_uncovered\_rs.py\ to detect Rust files outside the Cargo workspace, \fmt\_cpp.sh\ for C++ code formatting, \hawk\ for dead-public API analysis, \validate\_markdown.py\ for markdown file governance, and \speedtest\ for running speed tests.

_baml\language/scripts · high confidence

New directory writer utility for code generation

A new \dir\_writer\ utility has been added to the engine to manage the creation and organization of generated output directories. This component introduces \GeneratorArgs\ to handle configuration for various code generators (including Python and TypeScript clients) and defines a \LanguageFeatures\ trait that allows language-specific logic for file creation, content prefixing, and directory removal behavior (safe vs. unsafe). It also provides helper methods for computing relative paths between the BAML source and output directories, which is essential for generating correct singleton client references in the final code.

_engine/generators/utils/dir\writer · high confidence

New documentation, configuration, and build infrastructure for the BAML language workspace

The \baml\_language\ directory now includes foundational documentation and configuration files to support the compiler2 architecture and release workflows. This includes \ARCHITECTURE.md\ and \TYPE\_SYSTEM.md\ detailing the compiler pipeline and type semantics, \RELEASING.md\ and \TEST\_INSTRUCTIONS.md\ for operational procedures, and \Cross.toml\ for configuring cross-compilation targets. Additionally, \.gitignore\ and \.insta.yaml\ have been added to manage build artifacts and snapshot testing runners.

_baml\language · high confidence

New editor integration guides and documentation standards

The documentation site now includes dedicated setup and usage guides for VS Code, Cursor, JetBrains IDEs, Zed, and other editors, detailing installation steps, feature support (such as syntax highlighting, LSP integration, and the BAML Playground), and environment variable configuration. Additionally, a \.cursorrules\ file has been added to provide standardized writing guidelines for the documentation team, ensuring consistent tone, structure, and component usage across all docs pages.

fern · high confidence

New filesystem and glob standard library APIs

The standard library now includes comprehensive filesystem and globbing capabilities. The \baml.fs\ namespace provides functions to open files with read/write/append modes, read and write text or binary content, check existence, get file sizes, and manage directories (create, list, remove single or recursive). It also exposes a \File\ class for streaming operations like seeking and flushing. Additionally, the \baml.glob\ namespace allows compiling glob patterns to scan the filesystem for matching paths or perform pure pattern matching against strings.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\fs · high confidence

New internal BAML definitions for OpenAI Chat, Images, and Responses APIs

This change introduces the core internal BAML schema files (\chat.baml\, \images.baml\, \responses.baml\) that define the typed request and response structures for OpenAI-compatible endpoints. It adds support for the OpenAI Images API (including GPT-image and DALL-E models) and the new OpenAI Responses API, while refactoring the Chat Completions client to use a unified \ChatCompat\ configuration record that handles provider-specific nuances like authentication, streaming options, and text content collapsing. These definitions serve as the wire-modeling layer for the OpenAI provider family, replacing previous ad-hoc implementations.

_baml\_language/crates/baml\_builtins2/baml\_std/openai/ns\internal · high confidence

New local profiling store for BEX execution traces

The \bex\_prof\_store\ crate introduces a new leaf component for storing and encoding local BEX profiling data. It defines a quad-scoped identity model (process, engine, thread, call) with reversible base64url string encodings, and implements a segmented backend that manages execution slots, calling-context trees (CCT), and exact evidence (inputs, outputs, errors). The crate includes versioned codecs for serializing CCT epochs and evidence facts, along with a memory governor and health snapshots to track capacity and transport limits, enabling durable, queryable local execution profiles.

_baml\_language/crates/bex\_prof\store · high confidence

New media types (Image, Audio, Video, Pdf) added to the standard library

The \baml\_std\ namespace now includes four new media classes—\Image\, \Audio\, \Video\, and \Pdf\—defined in \ns\_media/media.baml\. Each class provides a unified interface for handling media content backed by a URL, a local file path, or base64-encoded data. Users can construct these values using factory methods like \from\_url\, \from\_file\, and \from\_base64\, and inspect the underlying source or MIME type via methods such as \url\, \file\, \base64\, and \mime\_type\.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\media · high confidence

New operator interfaces for arithmetic, bitwise, comparison, and indexing

The standard library now exposes operator logic through explicit interfaces in \baml.ops\, allowing generic code to require or implement operators via bounds (e.g., \T extends baml.ops.Add\<int\>\). New files define \baml.ops.math\ (Add, Subtract, Multiply, Divide, Remainder, Negate), \baml.ops.bitwise\ (BitAnd, BitOr, BitXor, ShiftLeft, ShiftRight), \baml.ops.comparison\ (Equals, Compare, and the broad \equals\_equals\ driver), and \baml.ops.index\ (Index for arrays, maps, and uint8arrays). These interfaces ensure that operator expressions like \a + b\ or \a\[i\]\ behave consistently whether operand types are known statically or reached through generic bounds, with detailed rules for type widening, panic behavior, and total ordering semantics.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\ops · high confidence

New playground-server component for IDE integration and credential management

The engine/playground-server introduces a new HTTP server that bridges the IDE extensions (VS Code and JetBrains) with the playground webview. It provides RPC endpoints for managing playground settings, loading AWS and GCP credentials, and retrieving webview URIs, while handling WebSocket communication to relay LSP notifications. The server also manages its own port allocation and serves the playground frontend assets, downloading them from GitHub releases when not in debug mode.

engine/playground-server · high confidence

New product metrics dashboard and Slack reporting

The product-metrics application now provides a weekly metrics dashboard and Slack reports. The dashboard (app.ts) renders four Plotly charts—Total Discord users, Distinct GitHub issue authors, Sheep Council, and Early Access Program—alongside embedded PostHog panels for PLG CLI and Website metrics. Slack reports (chart-svg.ts, chart-image.ts) generate SVG/PNG charts for CLI metrics (invocations, distinct users, retention, release mix) and post them via the Slack API (clients/slack.ts). Data is aggregated from Discord (clients/discord.ts), GitHub (clients/github.ts), Luma/EAP (clients/luma.ts), PostHog (clients/posthog.ts), and Zoom (clients/zoom.ts), stored in Postgres (database.ts, database-url.ts), and exposed via HTTP endpoints (external-data.ts, http.ts) with tests covering parsing, aggregation, and rendering.

typescript2/app-product-metrics · high confidence

New random number generation interface and implementations

The standard library now provides a unified \Rng\ interface for random number generation, implemented by three distinct classes: \SystemRandom\ for cryptographically secure, non-deterministic randomness; \Xoshiro256PlusPlus\ for fast, deterministic, seedable pseudo-randomness suitable for simulations; and \ChaCha20\ for secure, seedable pseudo-randomness. These implementations expose \random\ (for byte arrays) and \random\_int\ (for full-range integers) functions, allowing users to choose the appropriate trade-off between security, determinism, and performance for their specific needs.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\random · high confidence

New reflection standard library for runtime type introspection

The \reflect\ package is now available as a prelude, providing a comprehensive set of built-in types and functions for runtime type introspection. Users can now inspect the structure of classes, enums, unions, arrays, maps, and functions using dedicated view types (e.g., \reflect.class.Type\, \reflect.function.Type\) and query metadata. The library introduces \reflect.Type\ for obtaining type values, \reflect.AnyClass\ for generic class inspection, and \reflect.AnyFunction\ for function signature analysis. It also supports runtime class construction via \reflect.class.Builder\ and structural interface implementation via \reflect.interface.Implementation\, along with specific error types like \CompilationError\ and \TypeMismatch\ for reflection operations.

_baml\_language/crates/baml\_builtins2/baml\std/reflect · high confidence

New runtime reflection and dynamic type construction capabilities

The \reflect\ standard library package is now implemented in Rust within the VM, enabling runtime introspection and dynamic type creation. Users can now inspect type signatures and invoke functions via \reflect.signature\ and \reflect.call\_any\, and construct new classes at runtime using \reflect.class.Builder\. The \reflect.Type\ API provides detailed views of type kinds (classes, enums, unions, etc.) and allows checking interface implementations, while \reflect.Type.of\_value\ exposes the concrete type of runtime values.

_baml\_language/crates/bex\_vm/src/package\reflect · high confidence

New rust-analyzer-style type inference engine for BAML

The \baml\_compiler2\_hir\_ty\ crate introduces a new type inference engine modeled after rust-analyzer's \hir-ty\, replacing the legacy TIR system. This change brings comprehensive bidirectional type checking, flow-sensitive narrowing, and precise effect (throws) inference that tracks error channels through function calls and closures. It also implements a robust interface system with coherence checks, overlap detection, and associated type projections, ensuring that interface implementations are non-overlapping and that generic bounds are correctly resolved. For users, this means more accurate error messages, stricter type safety for interfaces and generics, and better handling of complex pattern matching and control flow.

_baml\_language/crates/baml\_compiler2\_hir\ty · high confidence

New sdk-test codegen infrastructure for language-specific SDK tests

The \baml\_language/sdk\_tests/codegen\ crate now provides a centralized, generator-agnostic codegen driver that produces SDK bindings for C++, C\#, Go, Java, Python, Rust, Swift, and TypeScript fixtures. This replaces previous per-language build scripts with a unified \sdk\_test\_codegen\ binary that loads BAML source, validates it against the compiler, and installs generated output into each language's test crate directory. The system ensures fixture consistency by asserting the shared fixture corpus matches the expected set, and includes language-specific scaffolding such as CMake drivers for C++, Gradle configs for Java, and Node.js package templates for TypeScript.

_baml\_language/sdk\tests/codegen · high confidence

New shadcn/ui component library added to the UI package

The \typescript/packages/ui\ package now includes a comprehensive set of accessible UI components (such as Accordion, Dialog, Button, and Command) generated using the shadcn/ui CLI with the 'new-york' style. This addition introduces a new \components.json\ configuration file and a \postcss.config.mjs\ file to support the Tailwind CSS setup, providing a standardized, themeable foundation for the application's interface.

typescript/packages/ui · high confidence

New standard library builtins and media support in the compiler2 pipeline

The \baml\_builtins2\ crate now provides the embedded standard library definitions and runtime support for the new compiler2 pipeline. This includes a comprehensive set of built-in types and namespaces (such as \baml\, \reflect\, \ai\, \io\, \http\, \crypto\, and \time\) defined via embedded \.baml\ files and manifests. It introduces native support for media values (images, audio, video, PDFs) with content resolution from URLs, files, or base64, and adds a structured \PromptAst\ representation that allows prompts to be flattened into chat messages, rendered as text, and handled with media placeholders. Additionally, it embeds language reference documentation and TypeScript crosswalk data to power CLI \describe\ commands and editor tooling.

_baml\_language/crates/baml\builtins2/src · high confidence

New standard library implementations for arrays, crypto, CSV, and more

The BAML standard library now includes native Rust implementations for several core modules. Array operations now support content-based equality for strings and uint8arrays, and include a fast-path natural-order sort for homogeneous primitive arrays. A new \baml.crypto\ namespace provides AES-GCM-SIV and ChaCha20-Poly1305 ciphers alongside SHA-256 hashing, with strict key-length validation and authenticated decryption failure reporting. Streaming CSV reading and writing are now available via \baml.csv\, handling chunked file input and typed record decoding. Additional updates include native \bigint\ methods (such as \isqrt\, \pow\, and \ilog\), comprehensive \float\ math and trigonometry functions, \baml.future\ state management, and \baml.id\ for runtime identity tracking.

_baml\_language/crates/bex\_vm/src/package\baml · high confidence

New standard library utilities for string dedentation, project identification, and random naming

The \engine/bstd\ module now exposes a set of new standard library functions for use in templates and configurations. Users can now dedent multi-line strings to remove common leading whitespace, validate and parse fully-qualified project names (e.g., \org/project\) with strict naming rules, and generate random animal-based identifiers (e.g., \fox-123\) for unique naming needs. These utilities are now available as part of the built-in standard library.

engine/bstd · high confidence

New stdlib similarity matrix visualization

Added a new interactive matrix app that visualizes the similarity and differences between the BAML and TypeScript standard libraries. The app loads a JSON report and allows users to switch views between BAML and TypeScript, displaying a hierarchical tree of symbols with color-coded swatches to indicate matches, divergences, or missing counterparts. It supports deep-linking to specific symbols via URL fragments and allows modifier-clicking type references to navigate to their declarations.

typescript2/app-stdlib-matrix · high confidence

New system process execution and pipe APIs

The \baml.sys\ namespace now exposes a comprehensive set of types and functions for interacting with the operating system's process model. Users can spawn external programs using \exec\ and \start\_process\, configuring behavior via \ProcessOptions\ (including working directory, environment variables, timeouts, and stdin/stderr handling). The standard error output can be piped, inherited, or discarded via the new \StderrMode\ enum. Process management is handled through the \Process\ class, which provides methods to \wait\, \kill\, and \close\ child processes, returning status via \ProcessExit\. Output streams are abstracted into \ReadPipe\ and \WritePipe\ classes, with \ReadPipe\ supporting line-oriented iteration via \ReadPipeLines\ for convenient text processing. The \ShellOutput\ class aggregates stdout and stderr bytes along with the exit code for synchronous execution results.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\sys · high confidence

OpenAPI generator now supports BamlImage, BamlAudio, BamlPdf, and BamlVideo types

The OpenAPI generator now includes built-in schema definitions for binary media types (images, audio, PDFs, and videos). These types are exposed as union schemas allowing either a base64-encoded string with a media type or a URL, ensuring generated API clients can correctly handle binary content alongside standard data types.

engine/generators/languages/openapi · high confidence

Playground application scaffolded with Vite and Storybook

The playground application has been initialized with a new build and development infrastructure. It now uses Vite as the build tool, configured to serve the app on port 3030 and support WASM modules via \vite-plugin-wasm\. The entry point (\src/main.tsx\) includes logic to listen for VS Code theme updates from the parent window, ensuring the playground UI matches the editor's appearance. Storybook has been added for component development, with configuration files (\main.ts\, \preview.ts\) and initial stories for the \ApiKeysDialog\ component. The application shell (\App.tsx\) integrates the \BAMLSDKProvider\, \ThemeProvider\, and a WASM panic notification handler.

typescript/apps/playground · high confidence

Publish generated V1 C ABI header for cross-language bridges

The \baml\_cffi.h\ header is now published in the \bridge\_cffi/include\ directory, providing a stable C Foreign Function Interface (FFI) for integrating BAML with host languages. This header defines the V1 ABI contract, including handle types for media and functions, status codes, and buffer management utilities, enabling SDKs such as C++, Java, Swift, and Ruby to interact with the BAML runtime via a standardized C interface.

_baml\_language/crates/bridge\cffi/include · high confidence

Python client introduces AbortController and structured error handling

The Python client now exposes an AbortController class that allows users to programmatically cancel running BAML function calls or set a timeout for automatic cancellation. Additionally, the client provides a comprehensive set of structured exception types (BamlError, BamlInvalidArgumentError, BamlClientError, BamlAbortError, etc.) that expose detailed context such as prompts, raw outputs, and status codes, replacing generic exceptions with specific, inspectable error objects.

_engine/language\_client\python · high confidence

Ruby SDK now supports BAML V1 bridge integration

The Ruby SDK introduces a new bridge layer that allows Ruby applications to load and execute compiled BAML programs via a native runtime. This change adds the \Baml::Bridge\ module, which manages the lifecycle of the native library (loaded via FFI), handles bytecode initialization, and enforces process safety by preventing usage after forking. It also defines a specific set of errors for configuration, runtime compatibility, and program conflicts, enabling Ruby developers to integrate with the BAML engine.

_baml\_language/sdks/ruby/bridge\ruby · high confidence

Rust SDK: Initial client generation with sync/async support and streaming callbacks

The Rust code generator now produces a complete \baml\_client\ module containing both synchronous (\BamlSyncClient\) and asynchronous (\BamlAsyncClient\) entry points, each exposing per-function structs with \call\, \stream\, \parse\, and \build\_request\ methods. The generated runtime includes \FunctionOptions\ that allow configuring collectors, tags, environment variables, cancellation tokens, client selection, and a new \on\_tick\ callback for streaming progress. Additionally, the generator emits type definitions for classes, enums, unions, and type aliases (with serde and BAML encoding/decoding), streaming type variants, and a \TypeBuilder\ for dynamic schema construction at runtime.

engine/generators/languages/rust · high confidence

Rust client generation and strict version compatibility checks

The generator library now supports producing Rust SDK clients alongside existing languages (Go, Python, TypeScript, Ruby, OpenAPI) via the new \generators\_rust\ module. Additionally, a new version-checking mechanism enforces that the generator version matches the runtime version; if they differ, generation is disabled and users receive specific upgrade instructions for their target language (e.g., \cargo add\, \pip install\, \npm install\).

_engine/generators/utils/generators\lib · high confidence

SAP deserializer coercion logic for arrays, classes, enums, and primitives

The SAP deserializer in \baml\_language/crates/bex\_sap\ now includes a comprehensive type coercion system to convert raw JSONish values into strict BAML types. This change introduces dedicated coercers for arrays, classes, enums, maps, and primitives (including integers, bigints, and strings). For arrays, the system now intelligently picks the best matching item from a list and can coerce single values into single-item arrays. Class deserialization now supports alias-aware field matching and prevents infinite recursion on self-referential structures. Enum coercion handles variant aliases, while map coercion validates that keys are supported types (strings, enums, or literals). Additionally, primitive coercion now includes bounded parsing for bigints to prevent unbounded memory allocation attacks, and handles various input formats like comma-separated numbers for integers.

_baml\_language/crates/bex\sap/src/deserializer/coercer · high confidence

Static type checking and type narrowing for Jinja templates

The Jinja engine now includes a static type checker that validates template expressions and statements against defined types. This feature introduces type narrowing, allowing the engine to infer more specific types within conditional branches (e.g., treating a \T \| None\ variable as \T\ inside an \if\ block). It also provides improved error messages with suggestions for undefined variables and invalid function arguments, and enforces stricter typing for enum comparisons and function calls.

engine/baml-lib/jinja · high confidence

Structured error handling with context, stack traces, and first-class UnknownError

The BAML standard library now provides structured error types and context tracking. Users can access detailed error context via \catch (e, ctx)\, where the \Context\ object exposes the original error, a \StackTrace\ (with file, line, and function details), and a \cause\ chain for nested exceptions, including a \root\_cause\ method and Python-style string rendering. New specific error classes like \InvalidArgument\, \ParseError\, \Io\, \Timeout\, \Unsupported\, \AccessError\, \RenderPrompt\, \LlmClient\, \HostCallable\, \GenericSdkError\, \CompilationError\, and \TypeMismatch\ allow for precise error identification. Additionally, the \UnknownError\ class offers a universal wrapper for untyped errors, supporting message appending and context preservation through \from\<T\>\ and \with\_message\ methods.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\errors · high confidence

Swift SDK gains CFFI bridge for BAML runtime integration

The Swift SDK now includes the CBamlBridge module, exposing a C Foreign Function Interface (CFFI) header that allows Swift applications to link against and invoke the BAML runtime. This bridge defines the necessary types, status codes, and function pointers (such as initialization and function calling) to enable Swift hosts to interact with BAML functions and manage media handles.

_baml\language/sdks/swift/Sources/CBamlBridge · high confidence

Unified compiler diagnostic system with multi-format rendering

The BAML compiler now uses a single, unified \Diagnostic\ type to represent errors across all compilation phases (parsing, HIR lowering, validation, and type checking). This change introduces structured error types for parse, type, and name errors, enabling consistent error handling and centralized rendering. Users will see improved diagnostic output with support for multiple formats: human-readable CLI output with syntax highlighting and source snippets, compact agent-friendly output, concise one-line formats for testing, and LSP integration for editor support. The system also includes runtime type validation diagnostics and semantic highlighting for diagnostic messages.

_baml\_language/crates/baml\_compiler\diagnostics · high confidence

Unified type system with canonical type representation and runtime call layouts

The type system has been consolidated into a single \baml\_type\ crate, introducing a canonical \Ty\ enum that unifies compiler and runtime type representations. This change introduces \CallLayout\ to standardize how function arguments are mapped between callers and callees, ensuring consistent dispatch behavior. It also adds \CodegenTy\ for generator-independent type normalization, \CompilerAlias\ for managing builtin type spellings, and \DeclarationName\ to distinguish between source-compiled and runtime-created declarations. Additionally, the crate now includes \TyAttr\ for type attributes (such as SAP streaming annotations), \SchemaDefs\ for canonical schema definitions, and \Int63\ for precise 63-bit integer semantics, providing a unified foundation for type checking, code generation, and runtime execution.

_baml\_language/crates/baml\type · high confidence

Updated vendored MiniJinja and MiniJinja-Contrib template engine

The vendored MiniJinja engine and its contrib utilities have been updated to a new version. This update introduces new template filters and global functions, including \datetimeformat\, \timeformat\, and \dateformat\ for date/time handling, \pluralize\, \filesizeformat\, and \truncate\ for text manipulation, as well as \random\, \lipsum\, and \randrange\ for randomization. It also adds Python compatibility methods for strings, lists, and maps via the \pycompat\ feature, and provides utility functions like \cycler\ and \joiner\. The core compiler and AST structures have been updated to support these new features and internal optimizations.

engine/vendored/minijinja, engine/vendored/minijinja-contrib · high confidence

Versioned C FFI bridge API foundation with V1 ABI and multi-platform support

The \bridge\_cffi\ crate now exposes a versioned C ABI (V1) for host-language bridges, generated via cbindgen from Rust declarations. This API introduces a \BamlApiV1\ function table with ABI versioning to ensure compatibility between hosts and runtimes, and supports both native (via \lib\_native.rs\) and WebAssembly (via \lib\_wasm.rs\) targets. The bridge handles runtime initialization from bytecode, function calls (including handle-based invocation), media operations, and host-value dispatch, while routing errors and panics into a unified \BamlOutboundResult\ envelope. It also registers bridge identity (language, version) and validates toolchain compatibility.

_baml\_language/crates/bridge\cffi/src · high confidence

Workflow rendering and debugging UI components

Added a new debug panel for inspecting BAML functions and workflow nodes, a hook to synchronize execution state with the visual graph, and workflow UI controls including a toolbar for running workflows and switching layout directions, plus an indicator that lets users switch between workflows when a node belongs to multiple definitions.

typescript/packages/playground-common/src/features/debug-panel, typescript/packages/playground-common/src/features/execution, typescript/packages/playground-common/src/features/workflow · high confidence

Removals

Removal of Gloo-based client and pipeline definitions in test1

The \client-tests/test1\ location has removed its core Gloo source files, including \clients.gloo\, \main.gloo\, and the pipeline modules (\message\_simplifier.gloo\, \text\_polisher.gloo\, \topic\_router.gloo\). This deletes the previously defined LLM client configurations (Azure OpenAI), data models (Message, Conversation), and the logic for the message simplifier, text polisher, and topic router pipelines. This change aligns with the project's shift toward TypeScript support, indicating these specific Gloo-based definitions are no longer part of this test area's implementation.

client-tests/test1 · high confidence

Removal of Python test application entry point

The main entry point script for the Python test application (app/main.py) has been removed. This file previously contained the logic for running Azure default and topic router tests using the generated clients and functions, along with tracing capabilities. Its deletion indicates that this specific test execution path is no longer part of the codebase.

client-tests/test1/python · high confidence

Removal of custom user event sending capability

The \baml.events.send\ intrinsic has been removed from the runtime, meaning users can no longer send custom user events. The \ns\_events\ namespace is now intentionally empty as the system transitions to a new observability architecture.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\events · high confidence

Removal of deprecated Python client implementation

The \clients/python\ directory, including the \gloo\_internal\ and \gloo\_py\ packages, has been completely removed. This deletes the internal API wrapper, LLM client implementations (OpenAI, Anthropic), tracing infrastructure, and type definitions that were previously exposed to users. Users relying on this Python client package will no longer have access to these capabilities.

clients · high confidence

Removal of legacy Python client test artifacts

The legacy Python test setup for \client-tests/test1\ has been removed, specifically deleting the \.gitignore\ file, the \gloo.yaml\ configuration, and the \src\ symbolic link. This cleanup eliminates obsolete build and generation artifacts from the test directory.

client-tests · high confidence

Removal of the C++ CLI codebase

The CLI directory, including the Rust build script and the entire C++ source tree (AST, tokenizer, and code generation logic), has been removed. This eliminates the local C++ compilation and code-generation capabilities previously provided by the CLI.

cli · high confidence

Removal of the Gloo VS Code extension

The VS Code extension for the Gloo language has been completely removed. This deletes all extension source code, including the main entry point, syntax highlighting definitions, code snippets, and providers for keyword completion and code lenses. Users will no longer have auto-build-on-save, syntax highlighting, or inline test-running capabilities for .gloo files within VS Code.

vscode-ext · high confidence

Architecture

Introduce MIR 2 compiler backend with new optimization and lowering infrastructure

The \baml\_compiler2\_mir\ crate now provides a complete Mid-level Intermediate Representation (MIR) pipeline, replacing the previous implementation. This includes a new \MirBuilder\ for constructing function control flow graphs, a \lower.rs\ module for translating high-level semantics into MIR, and a robust optimization suite (\optimize.rs\) that performs dead-code elimination, copy propagation, and constant folding. A new \inference\_provider.rs\ bridges the \hir\_ty\ type inference engine to the MIR layer, ensuring accurate type resolution for the new backend. This change establishes the foundation for improved compiler performance and more precise error reporting in subsequent releases.

_baml\_language/crates/baml\_compiler2\mir · high confidence

Introduce Pre-Processed Intermediate Representation (PPIR) layer in compiler2

The compiler2 pipeline now includes a new PPIR stage that sits between the HIR and TIR. This layer introduces a dedicated type representation (\PpirTy\) that carries streaming annotations (such as \@stream.must\exist\ and \@stream.done\) and implements on-demand name resolution that respects local shadowing and namespace scoping. It also adds a stream expansion algorithm that synthesizes \\$stream\ companion items and handles cross-package type resolution, while separating span-free semantic data from source maps to optimize incremental compilation performance.

_baml\_language/crates/baml\_compiler2\ppir/src · high confidence

New compiler firewall: span-free semantic data and tracked queries for all item types

The compiler now exposes a new \item\_data\ layer that serves as a firewall between the mutable \ItemTree\ and downstream consumers. For every item type (classes, functions, enums, interfaces, type aliases, template strings, lets, clients, retry policies, and impls), the compiler now provides tracked Salsa queries that return span-free semantic data (e.g., \ClassData\, \FunctionData\) and separate source-map queries for spans. This separation ensures that whitespace-only edits only invalidate span data, not semantic data, improving incremental compilation. The semantic data uses scoped \TypeRefId\ arenas to prevent cross-item ID collisions, and functions expose separate queries for signatures, LLM metadata, and elaborated signatures to further isolate invalidation.

_baml\_language/crates/baml\_compiler2\_ppir/src/item\data · high confidence

New compiler2 HIR infrastructure for semantic indexing and incremental compilation

The \baml\_compiler2\_hir\ crate introduces a new High-Level Intermediate Representation (HIR) layer for the compiler2 pipeline, replacing previous indexing mechanisms. This change adds a scope-tree-based semantic index that maps expressions to lexical scopes and tracks symbol contributions to package namespaces. It introduces position-independent item storage (the ItemTree) and Salsa-tracked queries for function and let-binding bodies, separating semantic data from source spans to enable efficient incremental compilation that skips re-analysis on whitespace-only changes. The module also implements diagnostics for duplicate definitions, interface implementation rules, and pattern binding errors, providing the foundational data structures for the new type inference and code generation phases.

_baml\_language/crates/baml\_compiler2\hir/src · high confidence

Behavioural changes

6 commits (1 fix) modifying baml\_language/crates/baml\_tests/snapshots/broken\_syntax/optional\_parameter\_defaults

A change to existing behaviour in baml\_language/crates/baml\_tests/snapshots/broken\_syntax/optional\_parameter\_defaults — 6 commits (1 fix), 1 file.

_baml\_language/crates/baml\_tests/snapshots/broken\_syntax/error\_cases, baml\_language/crates/baml\_tests/snapshots/broken\_syntax/is\_in\_type\_position, baml\_language/crates/baml\_tests/snapshots/broken\_syntax/optional\_parameter\defaults · medium confidence · unverified

9 commits (2 fixes) modifying baml\_language/crates/baml\_tests/snapshots/broken\_syntax/parser\_speculative, baml\_language/crates/baml\_tests/snapshots/broken\_syntax/pending\_greaters\_fix

A change to existing behaviour in baml\_language/crates/baml\_tests/snapshots/broken\_syntax/parser\_speculative, baml\_language/crates/baml\_tests/snapshots/broken\_syntax/pending\_greaters\_fix — 9 commits (2 fixs), 2 files.

(repo-wide) · medium confidence · unverified

BAML language version updated to 0.19.0

The BAML language product version has been updated to 0.19.0. This change updates the canonical, PyPI, and stable version constants to 0.19.0, while the release channel remains set to 'canary'.

_baml\_language/crates/baml\version · high confidence

BEP Feedback app migrated to TypeScript 2 with Next.js App Router

The BEP Feedback application has been moved to the typescript2 directory and rebuilt using the Next.js App Router, introducing a new nested page structure for BEP details, comments, decisions, and versions. This migration includes a new GitHub OAuth authentication flow with passkey fallback, a dark-mode-aware design system with semantic CSS variables, and a suite of API routes for listing BEPs, managing comments (including nested replies), and exporting all BEP data as a ZIP archive.

typescript2/app-beps · high confidence

CFFI layer refactored to use a buffer-only serialization pattern

The CFFI interface in the language client has been migrated to a buffer-only pattern, replacing previous direct pointer passing with serialized byte buffers (via Prost). This change introduces new modules for encoding and decoding BAML values, types, and function arguments across the boundary, and wraps result and error callbacks in \tokio::task::block\_in\_place\ to prevent deadlocks when the host language performs blocking FFI calls. The refactoring also adds a panic handler for buffer encoding to ensure errors are safely propagated to the host rather than crashing the process.

_engine/language\_client\cffi · high confidence

Go CFFI bridge protocol types regenerated for v1

The Go protobuf client files in the \baml\_bridge/cffi/v1\ directory have been regenerated to reflect the current CFFI protocol definitions. This update introduces structured result envelopes (\BamlOutboundResult\) that explicitly distinguish between successful values, errors, and panics, and expands the type system with new handle types (such as \HOST\_VALUE\_CALLABLE\, \HOST\_VALUE\_OPAQUE\, and \ADT\_FUNCTION\_SPEC\) and refined inbound value representations to support richer data exchange between the Go host and the BAML engine.

_baml\_language/sdks/go/bridge\go/cffi/proto · high confidence

Go CLI entry point allows 'baml' command invocation

A new Go-based entry point has been added to the baml directory, enabling users to invoke the CLI using the 'baml' command. This change addresses a Go-specific requirement where the package folder name must match the package name, ensuring the CLI works correctly when invoked as 'baml' rather than requiring a different binary name.

baml · high confidence

Host-supplied JSON values now materialize with container typing for consistent behavior

JSON values passed from the host environment are now materialized with \baml.json.json\ container typing, ensuring they behave identically to JSON values created within BAML (e.g., via \baml.json.parse\). This change enables reliable type narrowing using \match\ expressions and ensures that path extraction functions like \baml.json.path\ and \baml.json.path\_or\ work correctly on host-supplied data, resolving previous inconsistencies where such operations might have failed or behaved unexpectedly on external input.

_baml\_language/sdk\_tests/fixtures/function\_calls/baml\_src/ns\_go\_json\tests · high confidence

Improved diagnostic accuracy and reduced cascading errors in the BAML compiler

The BAML compiler now provides clearer, more precise error reporting for a wide range of language constructs, significantly reducing confusing cascading diagnostics. Key improvements include: stricter type checking for backtick string interpolation (B-836), which now catches type errors inside \${...}\ expressions at compile time rather than failing at runtime; validation of duplicate attributes (E0014) and duplicate serialized keys for class fields (B-615) and enum variants (B-649), preventing unsatisfiable schemas; better handling of attribute placement and ordering (e.g., rejecting field attributes in non-field positions); and more robust error recovery for catch/throw blocks, ensuring return-type mismatches are reported cleanly. Additionally, the compiler now correctly rejects invalid generic type arguments on builtin types and enforces stricter typing for \reflect.AnyFunction\ usage.

_baml\_language/crates/baml\_tests/projects/diagnostic\errors · high confidence

Internal host callable invocation mechanism and opaque Value type

The standard library now includes an internal \call\_host\_value\ function and an opaque \Value\ class within the \ns\_host\ module. \call\_host\_value\ serves as the compiler-synthesized bridge for invoking host-side callables, handling type validation for return values and errors against declared contracts (raising \baml.panics.HostContractViolation\ on mismatch) and managing argument packing. The \Value\ class is an empty, non-instantiable type reserved for the bridge boundary to represent external values, preventing users from constructing or destructuring it directly.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\host · high confidence

Introduce new prompt parser AST and grammar

The prompt parser now uses a dedicated Abstract Syntax Tree (AST) structure defined in the \ast\ module, replacing previous internal representations. This change introduces specific node types for top-level schema elements, including \CodeBlock\ (for variables, print blocks, and chat blocks), \CommentBlock\, \PromptText\, and \WhiteSpace\. The parser logic, driven by a new \datamodel.pest\ grammar file, has been updated to recognize and parse these distinct segments, allowing for more robust handling of prompt structures and whitespace.

engine/baml-lib/prompt-parser · high confidence

Introduce structured diagnostics with pretty-printed error and warning reporting

The diagnostics subsystem now uses a new \Diagnostics\ collection to accumulate and display validation errors and warnings together, rather than failing immediately on the first issue. This change introduces structured \DatamodelError\ and \DatamodelWarning\ types that include source spans, enabling the engine to output human-readable, color-coded messages that highlight the specific offending code lines. Additionally, the system now provides intelligent suggestions for typos (e.g., suggesting similar type names when a type is not found) and supports adjusting error spans for accurate reporting in transformed code contexts.

engine/baml-lib/diagnostics · high confidence

Introduces a new ItemTree-based intermediate representation for compiler queries

The compiler now uses a new \ItemTree\ structure in the HIR layer to store semantic definitions of classes, interfaces, functions, enums, clients, and other language constructs. This change replaces previous AST-based lookups with a span-free, collision-resistant ID system that separates semantic data from source positions, enabling faster and more reliable signature and body queries for tooling without re-parsing the source code.

_baml\_language/crates/baml\_compiler2\_hir/src/item\tree · high confidence

Introduction of the BAML Virtual Machine

The BAML engine now executes workflows using a new stack-based virtual machine (VM) instead of the previous interpreter. This VM introduces a defined bytecode instruction set (including operations for arrays, maps, and class instances), typed object pools for safer memory management, and a reachability-based graph system to handle the \@watch\ dependency tracking. It also provides native support for JavaScript-compatible string and number methods, media type handling, and environment variable access, while offering detailed stack traces and debug visualization for runtime errors.

engine/baml-vm · high confidence

Introduction of typed panic classes for runtime errors

The BAML standard library now defines a set of specific, typed classes (such as DivisionByZero, IndexOutOfBounds, IntegerOverflow, and HostContractViolation) to represent runtime panics. This change replaces generic error handling with structured types that carry context (like the offending index or message), allowing users to catch and inspect specific failure modes rather than dealing with opaque errors.

_baml\_language/crates/baml\_builtins2/baml\_std/baml/ns\panics · high confidence

Jinja runtime migrated to MiniJinja with improved enum and class rendering

The Jinja template engine in the BAML runtime has been replaced with MiniJinja, introducing more robust handling of BAML-specific types. Enum values now display their user-defined aliases in templates while preserving their original value names for equality comparisons, ensuring that prompts render correctly without breaking logic checks. Class fields are now rendered using their aliases, and media objects are properly serialized with a distinct delimiter to prevent parsing issues in prompts. The migration also includes comprehensive test coverage for enum comparisons, ordering, and media value handling to ensure consistent behavior across different template contexts.

engine/baml-lib/jinja-runtime · high confidence

LSP server introduces bounded transport and deadlock detection

The LSP server now enforces strict memory limits on outbound JSON-RPC frames (64 MB total budget, 4 MB per frame) to prevent unbounded queue growth, and includes a background watchdog thread that periodically checks for and logs \parking\_lot\ deadlocks to aid in debugging server hangs.

_baml\_language/crates/baml\_lsp\server/src · high confidence

New BAML lexer implementation with enhanced literal support

The BAML compiler now uses a new lexer crate (baml\_compiler\_lexer) built on Logos to provide lossless tokenization that preserves whitespace and comments for perfect source reconstruction. This update introduces support for new literal syntaxes including big integers (e.g., 42n), hexadecimal/octal/binary integers with underscore separators, and scientific notation floats (e.g., 1e10). It also adds new keywords for control flow and type operations such as \defer\, \spawn\, \await\, \is\, and \catch\_all\, while retaining legacy hash string delimiters for error recovery purposes.

_baml\_language/crates/baml\_compiler\lexer · high confidence

New BAML type system and expression engine core

The \baml-types\ library has been refactored to introduce a new internal representation for BAML types and expressions. This change adds a comprehensive \BamlValue\ enum to handle runtime values (including primitives, maps, lists, media, and classes) and a new \Expr\ AST that supports advanced expression features like \for\ loops, \instanceof\ checks, and bitwise operators. It also introduces a \Constraint\ system for block-level checks and assertions, and adds a \GeneratorOutputType\ enum to explicitly define supported code generation targets (such as Python Pydantic, TypeScript, Go, and Rust) along with their default client modes.

engine/baml-lib/baml-types · high confidence

New CI script for installing Ubuntu packages

A new shell script, \ci/ubuntu-install-packages\, has been added to the CI configuration. This script ensures that essential build tools (zsh, xz-utils, liblz4-tool, musl-tools, brotli, zstd) and sudo are available in stripped-down Ubuntu environments by automatically installing them if they are missing.

ci · high confidence

New Python-based speedtest benchmark runner with CLI and profiling support

The speedtest tool now uses a Python implementation (replacing the previous Rust-based runner) to execute and compare BAML benchmarks. This adds a CLI with subcommands to run benchmarks (with adaptive or fixed timing), compare baselines, list workloads, and manage saved results. It includes a terminal-based comparison view that highlights statistically significant performance changes and a profiling mode that captures and diffs CPU profiles using samply. The tool also supports both Git and jj version control systems for tagging and identifying benchmark runs.

_baml\language/tools/speedtest · high confidence

New TypeScript SDK bridge implementation

The TypeScript SDK bridge has been rewritten from scratch to replace the previous implementation. This new version introduces a complete runtime foundation including a \CtxManager\ for async context isolation, a \host\_value\_registry\ for preserving object identity across the native boundary, and a \define\_function\ factory for generating callable SDK methods. It adds support for generic type bindings via the \$types\ option, structured error handling with specific \BamlError\ subclasses, and a \BamlFunctionSpec\ class for LLM function specifications. The build process is now supported by dedicated scripts for cleaning, copying native artifacts, and type-checking.

_baml\_language/sdks/typescript/bridge\_typescript/typescript\src · high confidence

New release platform contract and CFFI export definitions

The release process now relies on a new machine-readable platform contract (\release/platforms.json\) that defines the supported operating systems, architectures, and build configurations for the wrapper, CFFI, Python, Node.js, Java, and C\# artifacts. A new file (\release/bridge-cffi-public-exports.txt\) explicitly lists the CFFI symbols exposed by the runtime, standardizing the public API surface. Additionally, the packaging script has been updated to produce \baml.tar.gz\ instead of \gloo.tar.gz\, reflecting the product name change.

release · high confidence

New shared TypeScript SDK codegen emitter

The TypeScript SDK generator has been refactored to use a new shared emitter module (\sdkgen\_typescript\_shared\) that produces a fully typed \baml\_sdk/\ directory structure. This emitter generates real TypeScript bodies (classes, enums, type aliases, and \defineFunction\ bindings) without requiring separate declaration files, and supports both Node.js (\@boundaryml/baml-bridge\) and Web/Workers (\@boundaryml/baml-bridge-web\) runtimes by swapping the runtime package import. It handles symbol routing into namespace-based leaves, manages sync/async function fan-out, and ensures deterministic output by sorting symbols by source location.

_baml\_language/sdks/typescript/sdkgen\_typescript\shared · high confidence

New static client parsing and configurable HTTP settings for LLM providers

The LLM client library now supports parsing client configurations statically, introducing a unified \UnresolvedClientProperty\ and \ResolvedClientProperty\ system that handles OpenAI, Anthropic, AWS Bedrock, Vertex AI, Google AI, Round Robin, and Fallback strategies. This refactor adds configurable HTTP settings, including connection pooling, timeouts, and proxy support, via a new \HttpConfig\ struct. It also introduces role remapping capabilities, allowing users to map common roles to model-specific ones, and adds specific support for features like Vertex AI authentication chains and AWS Bedrock inference configuration.

engine/baml-lib/llm-client · high confidence

New type coercion engine for JSONish deserialization

The JSONish deserializer now uses a dedicated type coercion system to convert parsed JSONish values into BAML types. This new logic handles arrays, maps, unions, literals, and primitives with improved scoring and hinting, allowing the parser to better select the correct union variant and handle streaming contexts more reliably.

engine/baml-lib/jsonish · high confidence

Next.js 15 requirement and Turbopack support for BAML integration

The @boundaryml/nextjs plugin now requires Next.js 15 or higher and adds support for building with Turbopack. The plugin detects the Next.js version to apply the correct configuration: for Next.js 14+, it uses the \serverExternalPackages\ array to externalize BAML native modules, while older versions fall back to the experimental \serverComponentsExternalPackages\. When Turbopack is enabled (via \TURBOPACK=1\), the plugin skips adding custom webpack rules for \.node\ files, ensuring compatibility with the new bundler. The plugin also provides React hooks for streaming BAML function results in Server Actions.

typescript/packages/nextjs-plugin · high confidence

Parser database refactored with new attribute validation and constraint system

The parser database in \engine/baml-lib/parser-database\ has been restructured to introduce a dedicated attribute validation system and support for block-level constraints. This change adds new modules for handling \@alias\, \@description\, and \@skip\ attributes, while introducing \@check\ and \@assert\ attributes that accept Jinja expressions to validate data at parse time. A new \Context\ state machine now manages attribute validation to ensure no attributes are left unprocessed, and a string interner has been added to reduce memory usage. Additionally, the codebase now includes Tarjan's algorithm for detecting recursive cycles in type definitions and improved name validation for reserved identifiers.

engine/baml-lib/parser-database · high confidence

Precompiled stdlib artifact embedded at build time

The bex\_project crate now includes a build script that compiles the standard library prefix and embeds it as a serialized artifact (stdlib\_prefix.borsh) into the binary. This ensures the stdlib content is available at runtime without requiring external files, while using a specific optimization level to keep binary size minimal.

_baml\_language/crates/bex\project · high confidence

Python SDK bridge overhaul with cancellation, host-callable support, and media types

The Python SDK bridge has been rebuilt on the new \bex\_engine\ via \bridge\_cffi\, replacing the legacy \baml-runtime\. This introduces a \BamlCallContext\ class that allows users to cancel in-flight BAML function calls from other tasks, and a process-global registry for Python host-callables (lambdas) that can be passed into BAML functions and invoked by the engine. The bridge now exposes native PyO3 types for media values (\BamlImage\, \BamlAudio\, \BamlPdf\, \BamlVideo\) and a \HostSpanManager\ for tracing \@trace\ functions. Error handling is standardized through a structured \BamlOutboundResult\ envelope, ensuring that pre-call failures and engine errors surface uniformly as \BamlError\ subclasses in Python.

_baml\_language/sdks/python/rust/bridge\python · high confidence

Python SDK codegen rewritten to use Pydantic 2 and a new emitter architecture

The Python SDK generator has been replaced with a new emitter (\sdkgen\_python\_pydantic2\) that renders all generated classes as \pydantic.BaseModel\ subclasses, supporting generic type parameters, recursive type aliases via \typing\_extensions.TypeAliasType\, and lazy symbol resolution through a generated \\_typemap.py\ module. The new architecture introduces a dedicated type-translation layer for accurate Python type expressions, unified method bindings for static and instance methods, and deterministic symbol routing that respects Python naming constraints (e.g., keyword sanitization, stream type separation).

_baml\_language/sdks/python/rust/sdkgen\_python\pydantic2 · high confidence

Python client generator overhaul with new runtime and streaming support

The Python code generator has been completely rewritten to use a new CFFI-based runtime bridge, replacing the previous implementation. This change introduces a new client architecture with separate async and sync clients, enhanced streaming capabilities via \BamlStream\ and \BamlSyncStream\, and support for advanced options like \on\_tick\ callbacks, \tags\, and \abort\_controller\. The generated code now includes improved type handling with Pydantic integration, better error handling with \BamlAbortError\, and new tracing/watcher infrastructure. Users will see changes in how they interact with the generated client, including new method signatures and options, though the public API surface remains largely compatible through the \b\ client instance.

engine/generators/languages/python · high confidence

Redesigned detail panel and upgraded graph edge routing

The detail panel has been rebuilt to display node information without tabs, showing a compact header with status badges and rendering specific content for LLM, standard, and non-function nodes. A new Execution Log Panel provides a chronological timeline of execution events, including variable updates and node enter/exit states. In the graph view, edge routing has been upgraded to use an A\* search algorithm with Manhattan distance heuristics to find optimal paths that avoid node intersections, replacing the previous layout logic. This new system also supports rounded corners on edges and distinguishes backward or hub connections with dashed lines.

typescript/packages/playground-common/src/features/detail-panel, typescript/packages/playground-common/src/features/graph · high confidence

Refactored CLI downloader with robust download management and platform support

The VS Code extension's CLI download logic has been restructured into a modular \cli-downloader\ component to improve reliability and cross-platform compatibility. The new system introduces exponential backoff to prevent excessive retry attempts during network failures, SHA256 checksum verification to ensure binary integrity, and caching of downloaded CLIs in the \\~/.baml\ directory. It also adds comprehensive platform detection for Windows, macOS, and Linux (including musl/gnu libc differentiation) and supports resolving the CLI from bundled sources, user-configured paths, or remote downloads.

typescript/apps/vscode-ext/src/plugins/language-server-client · high confidence

Regenerated Go CFFI protobuf bindings for the new bridge protocol

The Go SDK's internal CFFI layer has been regenerated to match the updated \baml\_bridge/cffi/v1\ protocol definitions. This update introduces new handle types (such as \HOST\_VALUE\_CALLABLE\, \HOST\_VALUE\_OPAQUE\, and \ADT\_FUNCTION\_SPEC\) and refactors the outbound result envelope to explicitly distinguish between successful values, errors, and panics, ensuring that Go clients correctly interpret structured error and panic data returned from the engine.

_baml\_language/sdks/go/baml\go/internal/cffi · high confidence

Relocate LLM output formatting and SAP parsing to sys\_ops

The \sys\_ops\ crate now hosts the logic for LLM output format rendering and Schema-Aware Parsing (SAP), which were previously located in the deleted \sys\_llm\ crate. This change consolidates the code generation for IO traits and adapters, and ensures that LLM parsing errors are correctly mapped to \LlmClient\ or \InvalidArgument\ BAML error types, preserving the existing error taxonomy for users.

_baml\_language/crates/sys\ops · high confidence

SAP deserializer introduces detailed parsing condition tracking and scoring

The SAP deserializer now attaches rich metadata to parsed values, tracking specific conditions such as type coercions (e.g., string-to-int, float-to-bigint), missing fields, extra keys, and parse errors via a new \Flag\ system. This metadata includes a scoring mechanism that penalizes deviations (like missing required fields or parse errors) to help evaluate the quality of the deserialization result, providing users with more granular insight into how input data was interpreted and where potential issues occurred.

_baml\_language/crates/bex\sap/src/deserializer · high confidence

Slimmed AWS SDK dependencies via internal forks

The build footprint for AWS integration is reduced by replacing the full \aws-config\ and \aws-sigv4\ crates with minimal, internal forks located in \baml\_language/forks/\. The new \aws-config\ fork implements a lightweight credential resolver that walks the standard AWS provider chain (environment variables, shared profiles, ECS container endpoint, and EC2 IMDS) using a pluggable \CredentialIo\ trait, allowing the host runtime to sandbox IO operations. The \aws-sigv4\ fork provides a self-contained SigV4 signer tailored specifically for AWS Bedrock Converse HTTP requests, dropping the heavy Smithy runtime, async machinery, and unused features like presigning and SigV4a to minimize binary size and dependencies.

_baml\_language/forks/aws-config, baml\_language/forks/aws-config-systest, baml\language/forks/aws-sigv4 · high confidence

Standardized development environment and CI configuration

The repository now enforces consistent line endings (LF) for BAML source files, generated clients, and test fixtures via \.gitattributes\ to prevent platform-specific streaming and diff issues. Development tooling is centralized through \.envrc\ (direnv) and \.pre-commit-config.yaml\, which configure \mise\ for tool versioning, \sccache\ with Cloudflare R2 for build acceleration, and pre-commit hooks for formatting and linting. Additionally, a custom \baml\_client\ git merge driver is registered in \.gitconfig\ to handle generated client files, and deployment artifacts are filtered via \.dockerignore\ and \.vercelignore\.

(repo-wide) · high confidence

Support for negative array indexing and optimized stack operations

The BEX VM now supports negative indexing for arrays and byte arrays (e.g., -1 for the last element), consistent with JavaScript and Python conventions, via new resolution logic for element access, insertion, and slicing bounds. Additionally, the VM's evaluation stack operations have been optimized to bypass bounds checking during execution, relying on compiler-validated invariants to improve dispatch loop performance.

_baml\_language/crates/bex\vm/src · high confidence

Swift bridge protocol buffer definitions updated

The Swift SDK's protocol buffer client code has been regenerated to align with the latest CFFI bridge schema. This update introduces new handle types for host-owned callables and opaque values, expands the inbound value model to support reflected type definitions and media/prompt AST payloads, and wraps function results in a structured envelope that explicitly distinguishes between successful returns, errors, and panics.

_baml\language/sdks/swift/Sources/BamlBridge/Proto · high confidence

Unified code generation type system and SDK output management

The \baml\_codegen\_types\ crate now provides a shared, canonical type system for all code generators, importing the core \Ty\ representation from \baml\_type\ to ensure invariant-holding type handling across languages. It introduces a \SymbolPool\ to represent generator-facing definitions (functions, classes, enums, type aliases) with support for generics and strict map-key validation. Generator configuration is standardized via \OutputType\ (supporting Python, TypeScript, Swift, Go, Rust, Java, C++, and C\#) and \NamingConvention\ policies, while a new \OutputWriter\ manages atomic, recoverable SDK directory writes with manifest tracking and legacy migration support.

_baml\_language/crates/baml\_codegen\types · high confidence

Updated Rust integration test suite with BAML source map and generator configuration

The Rust integration tests now include a generated \baml\_source\_map.rs\ file that embeds the BAML source definitions (clients, functions, and test cases) directly into the binary, alongside an updated \generators.baml\ configuration file that sets the generator version to 0.226.2 and configures the Rust output directory to \../rust/src\. This change ensures the Rust test environment is synchronized with the latest BAML schema definitions and generator settings.

integ-tests/rust · high confidence

Updated TypeScript CFFI bridge types for new value representations

The TypeScript SDK's CFFI bridge definitions (baml\_cffi.d.ts and baml\_cffi.js) have been regenerated to reflect changes in the underlying protocol buffer schema. The \InboundValue\ message now includes new fields for \tyValue\, \tyDefValue\, \mediaValue\, and \promptAstValue\, alongside existing types like \stringValue\, \intValue\, and \handle\. This update ensures the TypeScript client correctly encodes and decodes these new value types when communicating with the BAML runtime via the CFFI interface.

_baml\_language/sdks/typescript/bridge\_typescript/dist/proto, baml\_language/sdks/typescript/bridge\_typescript/typescript\src/proto · high confidence

WASM runtime refactoring and new LSP type definitions

The WASM engine module has been restructured to improve modularity and enable new capabilities. A new \baml-lsp-types\ crate has been introduced to define shared types for the Language Server Protocol, separating them from the WASM-specific dependencies to avoid build issues in other environments. The WASM runtime itself now includes an \abort\_controller\ to support operation cancellation via JavaScript \AbortSignal\, and a \js\_callback\_bridge\ to securely handle asynchronous credential loading for AWS and GCP providers from the sandboxed WASM environment. Additionally, the runtime now exposes detailed prompt and scope information (including media types and orchestration context) to the frontend, and provides a \format\_document\ function for on-the-fly schema formatting.

engine/baml-schema-wasm · high confidence

Windows-native sccache wrapper to bypass command-line length limits

A new Rust binary has been added to serve as a native \RUSTC\_WRAPPER\ shim for Windows, replacing the previous shell-script approach. This change resolves build failures in crates with very long command lines (such as \windows-sys\) by avoiding the \cmd.exe\ hop, which imposes a stricter character limit than the native \CreateProcess\ API used for executables. The binary maps \BAML\_SCCACHE\R2\\\ environment variables to the \AWS\\*\ names expected by sccache and forwards the rustc arguments verbatim.

_baml\_language/tools\sccache · high confidence

Fixes

1 commit (1 fix) fixing baml\_language/crates/baml\_tests/snapshots/broken\_syntax/testset\_name\_identifier

A fix in baml\_language/crates/baml\_tests/snapshots/broken\_syntax/testset\_name\_identifier — 1 commit (1 fix), 1 file.

_baml\_language/crates/baml\_tests/snapshots/broken\_syntax/testset\_name\identifier · low confidence · unverified

Added empty streaming replay-harness recorder crate

A new Rust library crate \sdk\_test\_llm\_recordings\ has been added to the test harness infrastructure. The crate itself is intentionally empty, serving only as a build target to support the streaming replay-harness recorder logic located in the integration test \tests/recordings.rs\.

_baml\_language/sdk\_tests/harness/llm\recordings · high confidence

Language server now supports BAML files located outside the \`baml\_src\` directory

The language server has been updated to correctly handle \.baml\ files that are not located within a \baml\_src\ directory. Previously, opening such files could cause the server to crash or fail to recognize the project structure. This change introduces new file utility functions (\find\_baml\_src\, \gather\_files\) and robust source file handling (\SourceFile\, \LineIndex\) that allow the server to locate project roots and process files regardless of their specific directory placement, ensuring stable operation for all valid BAML files.

_engine/language\server · high confidence

Test coverage

Add host reflection and type inspection fixtures; Added ABI stability and integration tests for the CFFI bridge; Added BAML function call fixtures for SDK testing; Added C\# bridge verification smoke tests; Added Go SDK test coverage for runtime, handles, and host callables; Added Python SDK test suite for bridge internals and data types; Added Ruby bridge loader and lifecycle tests; Added VM runtime tests for equality, yielding, GC, and reflection; Added a web-based UI for visualizing runtime snapshot tests; Added comprehensive integration tests for the BEX engine; Added comprehensive test coverage for the TypeScript bridge SDK; Added comprehensive test suite for the SAP deserializer; Added end-to-end test fixture for host-callable round-trips and BAML closures; Added end-to-end tests for BAML CLI commands and features; Added generic function and static method edge-case test fixtures; Added incremental compilation testing infrastructure; Added integration tests for LSP server telemetry and end-to-end stdio workflows; Added parser stress test suite for edge cases and large inputs; Added shared test infrastructure for BexEngine; Added test coverage for Swift BAML bridge FFI and error handling; Added test fixture for Go reflection type handling; Added test fixture for class method invocation patterns; Added test fixtures for error handling and cancellation scenarios; Added tests for generational GC promotion and HeapPermitManager deadlock fix; Added tests for navigation state integration; C++ SDK test harness and parity test coverage; Compiler2 TIR test suite for type inference, generics, and pattern matching; Expanded Go SDK test coverage for time types and method self-edges; Expanded LLM function test fixtures with streaming replay support; Expanded SDK test fixtures for type shapes and code generation; Expanded TypeScript SDK test coverage for runtime, function calls, and LLM features; Expanded broken-syntax test coverage for parser diagnostics and language features; Expanded test coverage for reflection, formatting, and runtime boundaries; Integration tests for compiler2 bytecode emission and runtime ID handling; Introduction of a new test harness for validating code generator consistency; Java SDK parity tests for function calls, generics, and error handling; New BAML standard library for testing with composable runners and testsets; New BAML test corpus and configuration for array, bigint, and string features; New test harness runner for SDK generator validation; New test utilities for parser diagnostics and incremental parsing; New type-spec test harness and coherence checks for the hir\_ty engine; Python SDK test suite expanded with Pydantic 2 integration and new behavioral coverage; Rust SDK test suite for function calls and error handling; Snapshot tests for compiler2 MIR lowering; Streaming LLM replay harness for offline testing; Swift SDK test suite for function calls, LLM streaming, and type shapes; Type system regression tests for inference, generics, and error handling; Unified test infrastructure with inline snapshots and corpus-wide regression coverage.

Dependencies

New baml\_language workspace with Rust SDKs and compiler infrastructure

The \baml\_language\ directory now contains a dedicated Rust workspace that consolidates the BAML compiler infrastructure (parser, HIR, type system, VM) and language-specific SDK generators for Python, TypeScript, Go, Java, C\#, Swift, and C++. This change introduces a new \Cargo.lock\ and \Cargo.toml\ configuration, establishing the dependency graph and build structure for these components.

(dependencies) · high confidence

Slimmed AWS SDK fork with comprehensive credential-resolution tests

The AWS SDK dependency surface has been reduced by introducing in-tree forks of \aws-config\ and \aws-sigv4\ that strip out the upstream Smithy machinery, keeping only the credential resolution, region resolution, and SigV4 signing logic required by BAML. To ensure this slimmed fork behaves identically to the upstream crate, a new system-test harness (\aws-config-systest\) and a suite of offline integration tests have been added, covering every standard AWS authentication form (environment variables, shared profile files, \credential\_process\, SSO, ECS/container endpoints, and EC2 IMDSv2) and verifying the provider-chain precedence (environment \> profile \> container \> IMDS).

_baml\_language/forks, baml\_language/forks/google-cloud-auth, baml\language/forks/google-cloud-auth-systest · high confidence

Housekeeping

Engine version bump to 0.20.0-canary.0

The engine's version has been updated to 0.20.0-canary.0. This change is reflected in the \.bumpversion.cfg\ configuration file, which sets the current version and defines the parsing and serialization rules for the version string format (major.minor.patch-pre.prerelease).

engine · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 56.

Lenses

  • Code Health 63
  • Architecture 61
  • Maturity 70
  • Readiness 51
  • Security 56
  • Domain Modelling 99
  • Event Sourcing 100
  • Performance 56

Changes since last survey

  • 300 commits — 221 feature/other, 79 fixes

By area

  • baml_language/crates — 145 commits
  • .github/workflows — 53 commits
  • typescript2/app-website — 13 commits
  • baml_language/sdks — 10 commits
  • typescript2/app-developer-docs — 10 commits
  • (root) — 8 commits
  • baml_language/sdk_tests — 7 commits
  • tools/atb2 — 7 commits
  • typescript2/app-product-metrics — 6 commits
  • baml_language/.ci — 3 commits
  • tools/bctl_src — 3 commits
  • tools/stdlib-matrix — 3 commits
  • tools/versions — 3 commits
  • baml_language/CHANGELOG.md — 2 commits
  • docs/prepare-changelog.md — 2 commits
  • engine/baml-lib — 2 commits
  • engine/baml-runtime — 2 commits
  • fern/01-guide — 2 commits
  • jetbrains/src — 2 commits
  • typescript2/app-beps — 2 commits

Notable commits

  • fix: Fix B1129 error message (#4383)
  • fix: Fix LSP panic + diagnostic improvements (#4686)
  • fix: Fix captured interface receiver dispatch (B-1470) (#4820)
  • fix: Fix compiler and runtime edge-case regressions (#4434)
  • fix: Fix contextual throw inference and unify map literal lowering (#4800)
  • fix: Fix lambda throws contracts with shared validation (#4832)
  • fix: Fix prompt parameters being parsed as LLM bodies (B-1032) (#4317)
  • fix: Fix sdk tests rebuilding constantly (#4852)
  • fix: Fix snapshot rendering bug (#4562)
  • fix: Fix stdlib matrix report CI output (#4356)
  • fix: More stdlib matrix fixes (#4361)
  • fix: Various stability fixes and cleanup (#4801)
  • fix: chore: fix oncall fill-schedule authentication (#4423)
  • fix: engine: fix crates.io release from tag checkouts (#4670)
  • fix: engine: fix release CI attestation pagination (#4663)
  • fix: fix(app-beps): address CodeRabbit review on page nesting (#4339 follow-up) (#4340)
  • fix: fix(ci): sccache log path (#4479)
  • fix: fix(ci): validate nightly release CI run freshness (#4755)
  • fix: fix(cli): enable bundle-http for HTTP support in baml run and playground (#4609)
  • fix: fix(cli): surface log events from baml run (#4409)
  • …and 280 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

BoundaryML/baml was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 12 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit f926c32b3c5b6526753efa84da1b9363835f37b4 — the exact code this score is about.
  • Scored under rubric-2026.09.8 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-d1e8be829218.