Skip to content

Conversation

@darinkishore
Copy link
Collaborator

@darinkishore darinkishore commented Jan 12, 2026

Summary

Vendors the BAML bridge infrastructure into the workspace.

Note this PR also adds an AGENTS.md file that references beads for rn, can/should remove before merging .

Crates Added

Crate Purpose
baml-bridge Public API: BamlType trait, render_schema, parse_llm_output
baml-bridge-derive #[derive(BamlType)] proc-macro
baml-types Core type IR, constraints, BamlValue representation
internal-baml-jinja Output format schema renderer
jsonish Fuzzy JSON parser for LLM outputs
internal-baml-diagnostics Error handling
bstd Standard library utilities

Key Functionality

  • Schema Rendering: render_schema::<T>() generates JSON schema instructions for prompts
  • Fuzzy Parsing: parse_llm_output::<T>() handles malformed JSON (missing quotes, trailing commas, markdown fences)
  • Derive Macro: #[derive(BamlType)] auto-generates type IR and conversion traits
  • Constraint Validation: Built-in @check and @assert constraint support

Notes

  • Trimmed to exclude full compiler/runtime - only schema rendering and parsing retained
  • 16 trybuild UI tests for derive macro error messages

@darinkishore darinkishore force-pushed the pr/01-baml-fold branch 4 times, most recently from 169d510 to 62dcfaf Compare January 12, 2026 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants