Repository navigation
feat(sdk-ts): implement the ts/nodejs SDK generator - #3614
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds TypeScript/Node SDK generation, expands the Node bridge (runtime init, media, streams, typemap, error handling), updates engine coercions, wires CLI output type, implements full codegen, overhauls tests/harness, and introduces CI build/publish workflows and package rename. ChangesNode.js TypeScript SDK: codegen, bridge, tests, and release
Sequence Diagram(s)sequenceDiagram
participant Generator as Codegen (Rust)
participant SDK as Generated TS SDK
participant Bridge as Bridge JS/TS
participant NAPI as Rust N-API
participant Engine as Core Engine
Generator->>SDK: Emit index.ts, _typemap.ts, _inlinedbaml.ts
SDK->>Bridge: defineFunction/defineInstanceFunction(...) call
Bridge->>NAPI: callFunction/Sync(bytes)
NAPI->>Engine: Execute with union/class coercions
Engine-->>NAPI: Serialized result or error/panic
NAPI-->>Bridge: Bytes
Bridge-->>SDK: Typemap-aware decode or throw BamlError/BamlPanic
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 05da931edc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| /** Internal: expose the inner BamlHandle for inbound encode. */ | ||
| _toHandle(): BamlHandle { | ||
| return this._handle; | ||
| } |
There was a problem hiding this comment.
Clone stream handles before re-encoding
When a generated streaming call returns a BamlStream, any next()/final() invocation re-encodes self through _toHandle(). Returning the original BamlHandle key here makes the first pull consume it, because bridge_ctypes::value_decode::inbound_to_external drains every non-host handle with handle_table.drain(handle.key). A second next() or the later final() will then send a stale key and fail with an invalid handle; this should clone/allocate a fresh handle for each encode, like the media wrappers do.
Useful? React with 👍 / 👎.
Binary size checks passed✅ 7 passed
Generated by |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (2)
baml_language/crates/bex_engine/src/conversion.rs (1)
1314-1347: 💤 Low valueDocument the single-class-arm assumption more prominently.
The comment at line 1321 notes this is "sufficient while a union has at most one class member," but if a union has multiple class members (e.g.,
ClassA | ClassB),find_mapreturns the first one arbitrarily. This could silently coerce to the wrong type.Consider adding a debug assertion or returning an error when multiple class arms exist, rather than silently picking the first.
🔧 Suggested enhancement
( value @ (BexExternalValue::Map { .. } | BexExternalValue::Instance { .. }), Ty::Union(members, _), ) => { - if let Some(class_arm) = members.iter().find_map(union_class_arm) { + let class_arms: Vec<_> = members.iter().filter_map(union_class_arm).collect(); + if class_arms.len() > 1 { + // Ambiguous: multiple class members in union; leave value unchanged + // for downstream type-checking to handle. + Ok(value) + } else if let Some(class_arm) = class_arms.into_iter().next() { coerce_arg_to_declared_type(value, class_arm) } else { Ok(value) } }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@baml_language/crates/bex_engine/src/conversion.rs` around lines 1314 - 1347, The union-handling code currently uses members.iter().find_map(union_class_arm) and silently picks the first class arm, which can misroute values when a union has multiple class members; update the match arm that handles (BexExternalValue::Map | Instance, Ty::Union(...)) to detect if more than one class arm exists (e.g., by checking members.iter().filter(|m| union_class_arm(m).is_some()).nth(1) or counting) and: if multiple class arms are found either emit a clear debug_assert/panic in debug builds or return an Err so the caller sees the ambiguity instead of coercing to an arbitrary class; keep using coerce_arg_to_declared_type when exactly one class arm is present and preserve existing Ok(value) behavior otherwise. Ensure references to union_class_arm, coerce_arg_to_declared_type, and the Union match arm are updated accordingly.baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_media.test.ts (1)
21-42: ⚡ Quick winStrengthen media roundtrip assertions beyond null checks.
These tests currently pass even if fields/type metadata are wrong, as long as a non-null object is returned. Please assert key media properties (or deep equality with source objects) to catch serialization regressions.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_media.test.ts` around lines 21 - 42, Replace the weak not-toBeNull assertions in the decode and encode tests by asserting specific media properties or full deep-equality against the original objects: call return_image/return_audio/return_video/return_pdf with URL and capture the returned object, then assert its key fields (e.g., url/source, mime_type, size/length, and any type/metadata) match expected values; for round_trip_* tests assert deep equality between the original media object passed (the return_* result) and the result of round_trip_*; for round_trip_media construct the Media instance from the return_* results and assert each field (image_field, audio_field, video_field, pdf_field) deep-equals the corresponding source object or check their critical properties rather than only not-toBeNull. Ensure you reference and update tests around return_image, return_audio, return_video, return_pdf, round_trip_image, round_trip_audio, round_trip_video, round_trip_pdf, round_trip_media, and Media to perform these stronger assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/build-nodejs-sdk.reusable.yaml:
- Around line 88-108: The workflow only enables Zig and the --cross-compile path
for musl targets, so aarch64-unknown-linux-gnu will run the non-cross branch and
fail to link on x86_64 runners; update the gating logic to treat non-native
Linux targets (e.g., aarch64-unknown-linux-gnu) as cross-compile targets by
extending the conditions that run mlugg/setup-zig and that choose the
--cross-compile branch in the "Install zig (musl cross-compile)" and "Build
native addon" steps (the matrix._.target checks), so that
aarch64-unknown-linux-gnu (and other non-native Linux arches) use the
cross-compile flow and pass the --cross-compile flag to napi build.
In
`@baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_primitives.test.ts`:
- Line 23: Replace exact float equality assertions with tolerant comparisons:
change tests that call expect(return_float()).toBe(3.14) (and the other float
assertions referenced at the same file, including the ones around lines 29 and
51) to use Jest's toBeCloseTo with a small precision, e.g.
expect(return_float()).toBeCloseTo(3.14, 2); update the assertions for the other
float-returning helpers in the same way so roundtrip float checks are tolerant
to minor serialization/runtime differences.
In `@baml_language/sdks/nodejs/bridge_nodejs/typescript_src/define_function.ts`:
- Around line 54-73: The generated callables in defineFunction and
defineInstanceFunction currently call rt.callFunctionSync / rt.callFunction
directly and may let native errors escape; wrap each
rt.callFunctionSync(bamlFqn, ...) and await rt.callFunction(bamlFqn, ...) in a
try/catch and on error rethrow wrapNativeError(err) before passing the resulting
bytes to decodeCallResult; update both the sync branch (the function returning
(...args) => { ... rt.callFunctionSync(...) ... }) and the async branch (the
async (...args) => { ... await rt.callFunction(...) ... }) to catch native
exceptions and rethrow wrapNativeError(err).
In `@baml_language/sdks/nodejs/bridge_nodejs/typescript_src/errors.ts`:
- Around line 50-63: wrapNativeError currently downgrades BamlPanic to a generic
BamlError; update wrapNativeError to preserve BamlPanic by either checking the
thrown object type first (if (err instanceof BamlPanic) return err) or by
extending PREFIX_MAP to include the panic message pattern (e.g., detect "baml
panic:" and return new BamlPanic(msg)); modify the function near the existing
PREFIX_MAP / wrapNativeError code so BamlPanic instances or panic-formatted
messages are returned as BamlPanic rather than BamlError.
In `@baml_language/sdks/nodejs/codegen_nodejs/src/lib.rs`:
- Around line 70-75: The assert! in to_source_code panics for unsupported
NamingConvention; change to a non-panicking API by updating the to_source_code
signature to return a Result (e.g., Result<String, ErrorType>) and replace the
assert! that checks matches!(naming_convention, NamingConvention::PreserveCase)
with an early-return Err containing a clear error (including the received
naming_convention) when it's unsupported; ensure callers of to_source_code are
updated to handle the Result and define/choose an appropriate ErrorType or use a
boxed dyn Error to represent this failure.
---
Nitpick comments:
In `@baml_language/crates/bex_engine/src/conversion.rs`:
- Around line 1314-1347: The union-handling code currently uses
members.iter().find_map(union_class_arm) and silently picks the first class arm,
which can misroute values when a union has multiple class members; update the
match arm that handles (BexExternalValue::Map | Instance, Ty::Union(...)) to
detect if more than one class arm exists (e.g., by checking
members.iter().filter(|m| union_class_arm(m).is_some()).nth(1) or counting) and:
if multiple class arms are found either emit a clear debug_assert/panic in debug
builds or return an Err so the caller sees the ambiguity instead of coercing to
an arbitrary class; keep using coerce_arg_to_declared_type when exactly one
class arm is present and preserve existing Ok(value) behavior otherwise. Ensure
references to union_class_arm, coerce_arg_to_declared_type, and the Union match
arm are updated accordingly.
In
`@baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_media.test.ts`:
- Around line 21-42: Replace the weak not-toBeNull assertions in the decode and
encode tests by asserting specific media properties or full deep-equality
against the original objects: call
return_image/return_audio/return_video/return_pdf with URL and capture the
returned object, then assert its key fields (e.g., url/source, mime_type,
size/length, and any type/metadata) match expected values; for round_trip_*
tests assert deep equality between the original media object passed (the
return_* result) and the result of round_trip_*; for round_trip_media construct
the Media instance from the return_* results and assert each field (image_field,
audio_field, video_field, pdf_field) deep-equals the corresponding source object
or check their critical properties rather than only not-toBeNull. Ensure you
reference and update tests around return_image, return_audio, return_video,
return_pdf, round_trip_image, round_trip_audio, round_trip_video,
round_trip_pdf, round_trip_media, and Media to perform these stronger
assertions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: a65931ee-4425-467b-b44d-40664d31a813
⛔ Files ignored due to path filters (17)
baml_language/Cargo.lockis excluded by!**/*.lockbaml_language/sdks/nodejs/bridge_nodejs/ctx_manager.d.ts.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/ctx_manager.js.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/define_function.d.ts.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/define_function.js.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/errors.d.ts.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/errors.js.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/exit_hook.d.ts.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/exit_hook.js.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/index.d.ts.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/index.js.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/proto.d.ts.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/proto.js.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/stream.d.ts.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/stream.js.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/typemap.d.ts.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/typemap.js.mapis excluded by!**/*.map
📒 Files selected for processing (85)
.github/workflows/build-nodejs-sdk.reusable.yaml.github/workflows/release-sdk.yamlbaml_language/crates/baml_cli/Cargo.tomlbaml_language/crates/baml_cli/src/generate.rsbaml_language/crates/baml_codegen_types/src/generator_fields.rsbaml_language/crates/bex_engine/src/conversion.rsbaml_language/sdk_tests/crates/nodejs_typescript/setup.ps1baml_language/sdk_tests/crates/nodejs_typescript/setup.shbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/main.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_aliases.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_class_refs.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_enums.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_forward_refs.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_generics.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_handles.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_lists.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_literals.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_maps.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_media.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_optional.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_primitives.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_recursion.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_routing.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_streams.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_symbol_collisions.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_unions.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_void.test.tsbaml_language/sdk_tests/harness_setup/src/nodejs_typescript.rsbaml_language/sdk_tests/harness_setup/src/templates/package.jsonbaml_language/sdks/nodejs/RELEASE.mdbaml_language/sdks/nodejs/bridge_nodejs/ctx_manager.d.tsbaml_language/sdks/nodejs/bridge_nodejs/ctx_manager.jsbaml_language/sdks/nodejs/bridge_nodejs/define_function.d.tsbaml_language/sdks/nodejs/bridge_nodejs/define_function.jsbaml_language/sdks/nodejs/bridge_nodejs/errors.d.tsbaml_language/sdks/nodejs/bridge_nodejs/errors.jsbaml_language/sdks/nodejs/bridge_nodejs/exit_hook.d.tsbaml_language/sdks/nodejs/bridge_nodejs/exit_hook.jsbaml_language/sdks/nodejs/bridge_nodejs/index.d.tsbaml_language/sdks/nodejs/bridge_nodejs/index.jsbaml_language/sdks/nodejs/bridge_nodejs/native.d.tsbaml_language/sdks/nodejs/bridge_nodejs/native.jsbaml_language/sdks/nodejs/bridge_nodejs/package.jsonbaml_language/sdks/nodejs/bridge_nodejs/protobaml_language/sdks/nodejs/bridge_nodejs/proto.jsbaml_language/sdks/nodejs/bridge_nodejs/proto/baml_cffi.d.tsbaml_language/sdks/nodejs/bridge_nodejs/proto/baml_cffi.jsbaml_language/sdks/nodejs/bridge_nodejs/src/handle.rsbaml_language/sdks/nodejs/bridge_nodejs/src/lib.rsbaml_language/sdks/nodejs/bridge_nodejs/src/media.rsbaml_language/sdks/nodejs/bridge_nodejs/src/runtime.rsbaml_language/sdks/nodejs/bridge_nodejs/stream.d.tsbaml_language/sdks/nodejs/bridge_nodejs/stream.jsbaml_language/sdks/nodejs/bridge_nodejs/tests/call_function.test.tsbaml_language/sdks/nodejs/bridge_nodejs/tests/host_callable.test.tsbaml_language/sdks/nodejs/bridge_nodejs/tests/test_decode_handle.test.tsbaml_language/sdks/nodejs/bridge_nodejs/tests/test_engine.test.tsbaml_language/sdks/nodejs/bridge_nodejs/tests/test_media.test.tsbaml_language/sdks/nodejs/bridge_nodejs/tests/test_stream.test.tsbaml_language/sdks/nodejs/bridge_nodejs/tests/test_tracing.test.tsbaml_language/sdks/nodejs/bridge_nodejs/tests/test_typemap.test.tsbaml_language/sdks/nodejs/bridge_nodejs/typemap.d.tsbaml_language/sdks/nodejs/bridge_nodejs/typemap.jsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/copy-proto.jsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/ctx_manager.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/define_function.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/errors.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/exit_hook.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/index.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/native.d.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/stream.tsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/typemap.tsbaml_language/sdks/nodejs/codegen_nodejs/Cargo.tomlbaml_language/sdks/nodejs/codegen_nodejs/src/emit/class.rsbaml_language/sdks/nodejs/codegen_nodejs/src/emit/enum_.rsbaml_language/sdks/nodejs/codegen_nodejs/src/emit/function.rsbaml_language/sdks/nodejs/codegen_nodejs/src/emit/method.rsbaml_language/sdks/nodejs/codegen_nodejs/src/emit/mod.rsbaml_language/sdks/nodejs/codegen_nodejs/src/emit/type_alias.rsbaml_language/sdks/nodejs/codegen_nodejs/src/emit/typemap_file.rsbaml_language/sdks/nodejs/codegen_nodejs/src/leaf.rsbaml_language/sdks/nodejs/codegen_nodejs/src/lib.rsbaml_language/sdks/nodejs/codegen_nodejs/src/routing.rsbaml_language/sdks/nodejs/codegen_nodejs/src/translate_ty.rs
💤 Files with no reviewable changes (2)
- baml_language/sdks/nodejs/bridge_nodejs/proto
- baml_language/sdks/nodejs/bridge_nodejs/ctx_manager.d.ts
| if (mode === 'sync') { | ||
| return (...args: unknown[]): unknown => { | ||
| const merged = buildKwargs(args, names, requiredPositionalCount); | ||
| const rt = getRuntime(); | ||
| const argsProto = encodeCallArgs(merged, /* syncMode */ true); | ||
| const resultBytes = rt.callFunctionSync(bamlFqn, argsProto, null, null, null); | ||
| return decodeCallResult(resultBytes); | ||
| }; | ||
| } | ||
| if (mode === 'async') { | ||
| return async (...args: unknown[]): Promise<unknown> => { | ||
| const merged = buildKwargs(args, names, requiredPositionalCount); | ||
| const rt = getRuntime(); | ||
| const argsProto = encodeCallArgs(merged); | ||
| const resultBytes = await rt.callFunction(bamlFqn, argsProto, null, null, null); | ||
| return decodeCallResult(resultBytes); | ||
| }; | ||
| } | ||
| throw new Error(`mode must be 'sync' or 'async', got ${JSON.stringify(mode)}`); | ||
| } |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# How wrapNativeError is defined and where it's applied.
fd -t f 'errors.ts' baml_language/sdks/nodejs/bridge_nodejs/typescript_src --exec sed -n '1,120p' {}
echo '--- wrapNativeError call sites ---'
rg -nP '\bwrapNativeError\s*\(' baml_language/sdks/nodejs/bridge_nodejs/typescript_src
echo '--- raw native callFunction(Sync) usages ---'
rg -nP '\b(callFunction|callFunctionSync)\s*\(' baml_language/sdks/nodejs/bridge_nodejs/typescript_srcRepository: BoundaryML/baml
Length of output: 4781
🏁 Script executed:
#!/bin/bash
set -euo pipefail
repo_root="."
target_dir="baml_language/sdks/nodejs/bridge_nodejs/typescript_src"
echo "=== define_function.ts relevant sections (include defineInstanceFunction) ==="
sed -n '1,220p' "$target_dir/define_function.ts" | nl -ba | sed -n '1,220p'
echo
echo "=== decodeCallResult implementation (proto) ==="
# Locate proto file that defines decodeCallResult
proto_file="$(fd -t f 'proto.*\.(ts|tsx|js|jsx)$|.*proto.*\.(ts|tsx)$' "$target_dir" | head -n 20 | head -n 1 || true)"
if [ -z "${proto_file}" ]; then
proto_file="$(fd -t f '.*proto.*\.ts$' "$target_dir" | head -n 20 | head -n 1 || true)"
fi
echo "proto_file=$proto_file"
if [ -n "${proto_file}" ]; then
rg -n "function decodeCallResult|export function decodeCallResult|decodeCallResult" "$proto_file"
sed -n '1,240p' "$proto_file" | nl -ba | sed -n '1,240p'
else
echo "Could not locate proto file via fd; falling back to rg across directory for decodeCallResult definition."
proto_def_file="$(rg -l "decodeCallResult" "$target_dir" | head -n 20 | head -n 1 || true)"
echo "proto_def_file=$proto_def_file"
sed -n '1,240p' "$proto_def_file" | nl -ba | sed -n '1,240p'
fi
echo
echo "=== index.ts callFunction/callFunctionSync wrappers (for error surface) ==="
sed -n '1,230p' "$target_dir/index.ts" | nl -ba | sed -n '1,230p'Repository: BoundaryML/baml
Length of output: 198
🏁 Script executed:
#!/bin/bash
set -euo pipefail
target_dir="baml_language/sdks/nodejs/bridge_nodejs/typescript_src"
echo "=== define_function.ts (lines 1-220 with line numbers) ==="
sed -n '1,220p' "$target_dir/define_function.ts" | cat -n
echo
echo "=== define_function.ts: rt.callFunction*/decodeCallResult occurrences with context ==="
rg -n --context 3 "rt\.callFunctionSync|rt\.callFunction\(" "$target_dir/define_function.ts"
rg -n --context 3 "decodeCallResult\(" "$target_dir/define_function.ts"
echo
echo "=== locate decodeCallResult definition ==="
decode_file="$(rg -l "decodeCallResult" "$target_dir" | head -n 20 | tr '\n' ' ' )"
echo "decode_files(first 20): $decode_file"
decode_file_actual="$(rg -l "export function decodeCallResult|function decodeCallResult" "$target_dir" | head -n 1 || true)"
echo "decode_file_actual: ${decode_file_actual:-<none>}"
if [ -n "${decode_file_actual:-}" ]; then
echo
echo "=== decodeCallResult definition (first ~240 lines around match) ==="
# Print a window around the first match
first_match_line="$(rg -n "export function decodeCallResult|function decodeCallResult" "$decode_file_actual" | head -n 1 | cut -d: -f1)"
start=$(( first_match_line > 80 ? first_match_line-80 : 1 ))
end=$(( first_match_line + 240 ))
sed -n "${start},${end}p" "$decode_file_actual" | cat -n
fi
echo
echo "=== index.ts: callFunction/callFunctionSync wrappers (line area around wrapNativeError) ==="
sed -n '90,210p' "$target_dir/index.ts" | cat -nRepository: BoundaryML/baml
Length of output: 27474
Add wrapNativeError around native runtime calls in generated factories
define_function.ts’s generated callables (both defineFunction and defineInstanceFunction) call rt.callFunctionSync / rt.callFunction directly at lines 59/68 and 104/113, then pass bytes to decodeCallResult—with no wrapNativeError boundary. Any native exception thrown by the runtime will escape untyped, unlike the public callFunction/callFunctionSync entrypoints in index.ts, which catch and rethrow wrapNativeError(err) to preserve the BamlError hierarchy.
Update both factories to wrap the rt.callFunctionSync/rt.callFunction calls in try/catch and rethrow wrapNativeError(err) (keeping decodeCallResult as-is).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@baml_language/sdks/nodejs/bridge_nodejs/typescript_src/define_function.ts`
around lines 54 - 73, The generated callables in defineFunction and
defineInstanceFunction currently call rt.callFunctionSync / rt.callFunction
directly and may let native errors escape; wrap each
rt.callFunctionSync(bamlFqn, ...) and await rt.callFunction(bamlFqn, ...) in a
try/catch and on error rethrow wrapNativeError(err) before passing the resulting
bytes to decodeCallResult; update both the sync branch (the function returning
(...args) => { ... rt.callFunctionSync(...) ... }) and the async branch (the
async (...args) => { ... await rt.callFunction(...) ... }) to catch native
exceptions and rethrow wrapNativeError(err).
| // Only `PreserveCase` is wired up so far. | ||
| assert!( | ||
| matches!(naming_convention, NamingConvention::PreserveCase), | ||
| "codegen_nodejs only supports naming_convention = PreserveCase \ | ||
| (got {naming_convention})", | ||
| ); |
There was a problem hiding this comment.
Consider returning an error instead of panicking for unsupported naming convention.
The assert! will panic if a different naming convention is passed. Since to_source_code is a public function, a Result return or compile-time enforcement would be safer than a runtime panic.
🔧 Suggested fix
pub fn to_source_code(
pool: &SymbolPool,
user_baml_files: &[UserBamlFile],
naming_convention: NamingConvention,
-) -> HashMap<PathBuf, String> {
- // Only `PreserveCase` is wired up so far.
- assert!(
- matches!(naming_convention, NamingConvention::PreserveCase),
- "codegen_nodejs only supports naming_convention = PreserveCase \
- (got {naming_convention})",
- );
+) -> Result<HashMap<PathBuf, String>, String> {
+ if !matches!(naming_convention, NamingConvention::PreserveCase) {
+ return Err(format!(
+ "codegen_nodejs only supports naming_convention = PreserveCase \
+ (got {naming_convention})"
+ ));
+ }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@baml_language/sdks/nodejs/codegen_nodejs/src/lib.rs` around lines 70 - 75,
The assert! in to_source_code panics for unsupported NamingConvention; change to
a non-panicking API by updating the to_source_code signature to return a Result
(e.g., Result<String, ErrorType>) and replace the assert! that checks
matches!(naming_convention, NamingConvention::PreserveCase) with an early-return
Err containing a clear error (including the received naming_convention) when
it's unsupported; ensure callers of to_source_code are updated to handle the
Result and define/choose an appropriate ErrorType or use a boxed dyn Error to
represent this failure.
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
.github/workflows/build-nodejs-sdk.reusable.yaml (1)
88-90:⚠️ Potential issue | 🟠 Major | ⚡ Quick winRoute
aarch64-unknown-linux-gnuthrough the explicit cross-compile branch.This matrix includes
aarch64-unknown-linux-gnu, but only*musl*targets install the extra cross toolchain and pass--cross-compile. NAPI-RS documentsaarch64-unknown-linux-gnuas part of its cross-compilation flow, so the current GNU ARM64 leg is still likely to fail unless it is handled there too. (napi.rs)Also applies to: 100-108
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/build-nodejs-sdk.reusable.yaml around lines 88 - 90, The workflow only runs the "Install zig (musl cross-compile)" step when contains(matrix._.target, 'musl'), which skips the aarch64 GNU target; update the conditional(s) that reference matrix._.target (e.g., the "Install zig (musl cross-compile)" step and the similar blocks around lines 100-108) to also match 'aarch64-unknown-linux-gnu' (or a pattern that includes it) so that the aarch64-unknown-linux-gnu matrix entry follows the explicit cross-compile branch and receives the zig/toolchain install and --cross-compile behavior.
🧹 Nitpick comments (1)
.github/workflows/release-sdk.yaml (1)
100-102: 🏗️ Heavy liftPrefer npm trusted publishing over
NPM_TOKENin this release job.This job already runs on a GitHub-hosted runner and requests
id-token: write. npm’s current guidance is to prefer trusted publishing over long-lived tokens, and OIDC-based publishing from GitHub Actions automatically generates provenance for public packages, which would let you removeNPM_TOKENonce the package is configured on npm. (docs.npmjs.com)Also applies to: 147-150
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/release-sdk.yaml around lines 100 - 102, The release job should use GitHub Actions OIDC trusted publishing instead of the long-lived NPM_TOKEN secret: remove usage of NPM_TOKEN from the release job, keep/ensure the permissions block includes id-token: write (the existing "permissions" block with "id-token: write"), and update the publish step to use OIDC-based publishing by switching to actions/setup-node (v3) configured for the npm registry (e.g., registry-url: https://registry.npmjs.org) and run npm publish without injecting NPM_TOKEN; also ensure your npm package is configured on npmjs to accept GitHub Actions OIDC trusted publishers so the workflow can publish via OIDC.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/build-nodejs-sdk.reusable.yaml:
- Line 70: The workflow uses tag-pinned GitHub Actions (e.g.,
actions/checkout@v6, actions/setup-node@v4, pnpm/action-setup@v4,
mlugg/setup-zig@v1, actions/upload-artifact@v7) which should be replaced with
full 40-character commit SHAs for supply-chain hardening; locate each referenced
action in the workflow, look up the corresponding repository and the commit that
the current tag points to (or use the latest vetted commit), and replace the tag
(e.g., `@v6`) with the full commit SHA (e.g., @<40-char-sha>), then commit the
updated workflow and run/validate the CI to ensure the actions still behave as
expected.
In @.github/workflows/release-sdk.yaml:
- Around line 106-107: The workflow uses tag-pinned actions
(actions/checkout@v6, actions/setup-node@v4, pnpm/action-setup@v4,
actions/download-artifact@v8) which should be replaced with full commit SHA
pins; update each action reference to the canonical full commit SHA for the
version you intend to use (e.g., actions/checkout@<full-sha>), verify the SHAs
against the official action repositories, and ensure the commit SHAs are used
consistently for all occurrences of these action references in the workflow.
---
Duplicate comments:
In @.github/workflows/build-nodejs-sdk.reusable.yaml:
- Around line 88-90: The workflow only runs the "Install zig (musl
cross-compile)" step when contains(matrix._.target, 'musl'), which skips the
aarch64 GNU target; update the conditional(s) that reference matrix._.target
(e.g., the "Install zig (musl cross-compile)" step and the similar blocks around
lines 100-108) to also match 'aarch64-unknown-linux-gnu' (or a pattern that
includes it) so that the aarch64-unknown-linux-gnu matrix entry follows the
explicit cross-compile branch and receives the zig/toolchain install and
--cross-compile behavior.
---
Nitpick comments:
In @.github/workflows/release-sdk.yaml:
- Around line 100-102: The release job should use GitHub Actions OIDC trusted
publishing instead of the long-lived NPM_TOKEN secret: remove usage of NPM_TOKEN
from the release job, keep/ensure the permissions block includes id-token: write
(the existing "permissions" block with "id-token: write"), and update the
publish step to use OIDC-based publishing by switching to actions/setup-node
(v3) configured for the npm registry (e.g., registry-url:
https://registry.npmjs.org) and run npm publish without injecting NPM_TOKEN;
also ensure your npm package is configured on npmjs to accept GitHub Actions
OIDC trusted publishers so the workflow can publish via OIDC.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: cae07649-cb96-4fad-9b86-e7acd909be3b
⛔ Files ignored due to path filters (1)
baml_language/Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
.github/workflows/build-nodejs-sdk.reusable.yaml.github/workflows/release-sdk.yamlbaml_language/crates/baml_cli/Cargo.tomlbaml_language/crates/baml_cli/src/generate.rsbaml_language/crates/baml_codegen_types/src/generator_fields.rs
✅ Files skipped from review due to trivial changes (1)
- baml_language/crates/baml_cli/Cargo.toml
🚧 Files skipped from review as they are similar to previous changes (2)
- baml_language/crates/baml_codegen_types/src/generator_fields.rs
- baml_language/crates/baml_cli/src/generate.rs
| Add-Content -Path "$env:GITHUB_PATH" -Value "$env:USERPROFILE\.cargo\bin" -Encoding utf8 | ||
| } | ||
|
|
||
| - uses: actions/checkout@v6 |
There was a problem hiding this comment.
Pin these GitHub Actions references to full commit SHAs.
In .github/workflows/build-nodejs-sdk.reusable.yaml, these uses: entries are tag-pinned only (no full 40-hex commit SHA): actions/checkout@v6, actions/setup-node@v4, pnpm/action-setup@v4, mlugg/setup-zig@v1, and actions/upload-artifact@v7. GitHub’s secure-use guidance recommends full-SHA pinning for supply-chain hardening. https://docs.github.com/en/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository
🧰 Tools
🪛 zizmor (1.25.2)
[warning] 70-70: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[error] 70-70: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/build-nodejs-sdk.reusable.yaml at line 70, The workflow
uses tag-pinned GitHub Actions (e.g., actions/checkout@v6,
actions/setup-node@v4, pnpm/action-setup@v4, mlugg/setup-zig@v1,
actions/upload-artifact@v7) which should be replaced with full 40-character
commit SHAs for supply-chain hardening; locate each referenced action in the
workflow, look up the corresponding repository and the commit that the current
tag points to (or use the latest vetted commit), and replace the tag (e.g., `@v6`)
with the full commit SHA (e.g., @<40-char-sha>), then commit the updated
workflow and run/validate the CI to ensure the actions still behave as expected.
| - uses: actions/checkout@v6 | ||
| - uses: actions/setup-node@v4 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file=".github/workflows/release-sdk.yaml"
echo "== Lines 80-160 =="
nl -ba "$file" | sed -n '80,160p'
echo
echo "== Find all action uses in this workflow =="
rg -n "^\s*uses:\s" "$file"Repository: BoundaryML/baml
Length of output: 139
🌐 Web query:
Pin GitHub Actions to full commit SHA vs tag for supply chain hardening, and relevant GitHub policy/recommendation docs
💡 Result:
Recommendation (supply-chain hardening for GitHub Actions): Pin third-party (and ideally all) GitHub Actions to a full-length commit SHA, not a tag. GitHub states that pinning to a full-length commit SHA is currently the only way to use an action as an immutable release, and that this mitigates the risk of a bad actor adding a backdoor because they would need to generate a SHA-1 collision for a valid Git object payload [1][2]. Pinning to a tag is only appropriate if you trust the creator; even then, tags can be moved or deleted if an attacker gains access to the action’s repository [1][2]. How to implement in workflows (secure pattern) 1) Replace uses: owner/action@ with uses: owner/action@<40-hex-sha> Example: - uses: actions/checkout@11bd719 # v4.2.2 This format is explicitly documented as the SHA pinning approach in GitHub’s security hardening guidance and in related enforcement examples [2][3]. 2) Keep the human-readable original version as a comment (optional but common): use: owner/action@ # vX.Y.Z. This preserves ergonomics while retaining immutability (and supports automated updating approaches that look for that comment) [4]. Policy / enforcement controls (so you don’t rely on humans) GitHub provides administrative policy to require SHA pinning: - GitHub’s Actions security hardening documentation describes configuring settings/policies so actions must be pinned to a full-length commit SHA [5][2]. - GitHub’s 2025-08-15 changelog notes new capabilities that allow administrators to enforce SHA pinning through the “allowed actions” policy; workflows that try to use an action that isn’t pinned will fail. The policy checks for a full commit SHA [6]. - For enterprise policy, GitHub documents: “Require actions to be pinned to a full-length commit SHA … This includes actions from your enterprise and actions authored by GitHub” (reusable workflows may still be referenced by tag depending on policy scope) [5]. Notes on tags vs SHAs (why this hardening matters) - GitHub’s secure use guidance: tag pinning is convenient but risky because tags are mutable; commit-SHA pinning is the immutable option [1][2]. Optional automation to manage the maintenance burden - GitHub/marketplace ecosystem includes “ensure SHA pinned actions” style checks that fail CI if actions aren’t pinned to full-length SHAs (useful as a guardrail alongside the GitHub policy). For example, “Ensure SHA Pinned Actions” is designed to throw an error if any referenced GitHub Action is not pinned to a full-length commit SHA [4][7]. Cited GitHub sources (primary) [1] https://docs.github.com/en/actions/reference/security/secure-use [2] https://github.com/github/docs/blob/962a1c8dccb8c0f66548b324e5b921b5e4fbc3d6/content/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions.md [6] https://github.blog/changelog/2025-08-15-github-actions-policy-now-supports-blocking-and-sha-pinning-actions/ [5] https://github.com/github/docs/blob/main/content/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise.md [4] https://github.com/marketplace/actions/ensure-sha-pinned-actions [7] https://github.com/step-security/github-actions-ensure-sha-pinned-actions [3] https://githubdocs.cn/en/enterprise-cloud@latest/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise
Citations:
- 1: https://docs.github.com/en/actions/reference/security/secure-use
- 2: https://github.com/github/docs/blob/962a1c8dccb8c0f66548b324e5b921b5e4fbc3d6/content/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions.md
- 3: https://githubdocs.cn/en/enterprise-cloud@latest/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise
- 4: https://github.com/marketplace/actions/ensure-sha-pinned-actions
- 5: https://github.com/github/docs/blob/main/content/admin/enforcing-policies/enforcing-policies-for-your-enterprise/enforcing-policies-for-github-actions-in-your-enterprise.md
- 6: https://github.blog/changelog/2025-08-15-github-actions-policy-now-supports-blocking-and-sha-pinning-actions/
- 7: https://github.com/step-security/github-actions-ensure-sha-pinned-actions
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file=".github/workflows/release-sdk.yaml"
echo "== File exists? =="
test -f "$file" && echo "yes" || (echo "missing: $file" && exit 1)
echo
echo "== Lines 90-130 (with numbers) =="
awk 'NR>=90 && NR<=130 { printf "%d:%s\n", NR, $0 }' "$file"
echo
echo "== All uses: lines in this workflow (with numbers) =="
awk '{ if ($0 ~ /^[[:space:]]*uses:[[:space:]]*/){ printf "%d:%s\n", NR, $0 } }' "$file"Repository: BoundaryML/baml
Length of output: 1875
🏁 Script executed:
#!/bin/bash
set -euo pipefail
file=".github/workflows/release-sdk.yaml"
echo "== Lines 130-210 (with numbers) =="
awk 'NR>=130 && NR<=210 { printf "%d:%s\n", NR, $0 }' "$file"
echo
echo "== Search for NODE_AUTH_TOKEN and NPM_TOKEN usage =="
rg -n "NODE_AUTH_TOKEN|NPM_TOKEN" "$file"Repository: BoundaryML/baml
Length of output: 1290
Pin these action references to full commit SHAs.
In .github/workflows/release-sdk.yaml (lines 106-107; also 111-115), the workflow uses tag-pinned actions (actions/checkout@v6, actions/setup-node@v4, pnpm/action-setup@v4, actions/download-artifact@v8). Tag pinning can be blocked by GitHub’s full-SHA policy and weakens action supply-chain hardening. https://github.com/github/docs/blob/962a1c8dccb8c0f66548b324e5b921b5e4fbc3d6/content/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions.md
🧰 Tools
🪛 zizmor (1.25.2)
[warning] 106-106: credential persistence through GitHub Actions artifacts (artipacked): does not set persist-credentials: false
(artipacked)
[error] 106-106: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
[error] 107-107: unpinned action reference (unpinned-uses): action is not pinned to a hash (required by blanket policy)
(unpinned-uses)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/release-sdk.yaml around lines 106 - 107, The workflow uses
tag-pinned actions (actions/checkout@v6, actions/setup-node@v4,
pnpm/action-setup@v4, actions/download-artifact@v8) which should be replaced
with full commit SHA pins; update each action reference to the canonical full
commit SHA for the version you intend to use (e.g.,
actions/checkout@<full-sha>), verify the SHAs against the official action
repositories, and ensure the commit SHAs are used consistently for all
occurrences of these action references in the workflow.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto.ts (1)
144-194:⚠️ Potential issue | 🟠 Major | ⚡ Quick winReject unsupported built-in objects before the generic object fallback.
Widening this branch from plain objects to any object means values like
new Date(),new Map(),new Set(),new URL(),new Error(), or aPromisenow serialize as an empty or partialmapValuebecauseObject.entries(...)sees little or no state. That silently corrupts inputs where the old code would have thrown.Please keep the special handling for generated class instances, but restore a guard so unsupported non-plain objects still fail fast.
Suggested direction
- } else if (value !== null && typeof value === 'object') { + } else if (value !== null && typeof value === 'object') { const proto = Object.getPrototypeOf(value); - const isClassInstance = proto !== Object.prototype && proto !== null; + const isPlainObject = proto === Object.prototype || proto === null; + const isClassInstance = !isPlainObject; + + if (!isPlainObject && !isClassInstance) { + throw new TypeError( + `Cannot encode value of type ${Object.prototype.toString.call(value)} to protobuf` + ); + } + + if (!isPlainObject) { + const ctor = (value as object).constructor; + const hasKnownFqn = getTypeMap().jsTypeToBamlType(ctor) != null; + const hasHandleField = Object.values(value).some(v => v instanceof BamlHandle); + if (!hasKnownFqn && !hasHandleField) { + throw new TypeError( + `Cannot encode value of type ${Object.prototype.toString.call(value)} to protobuf` + ); + } + }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto.ts` around lines 144 - 194, The current generic object branch accepts any object and will silently serialize built-ins (Date/Map/Set/URL/Error/Promise) as empty/partial maps; update the object-handling logic in the same function that uses Object.getPrototypeOf/value checks (the isClassInstance branch, getTypeMap().jsTypeToBamlType, and the BamlHandle checks) to early-reject unsupported non-plain objects: after computing proto and isClassInstance, if proto !== Object.prototype && proto !== null and the value isn't a recognized codegen class (no fqn via getTypeMap().jsTypeToBamlType) and isn't a handle-backed stdlib object (the existing Object.values(...).some(v => v instanceof BamlHandle) path), throw a clear error naming the unsupported constructor (e.g. value.constructor?.name) instead of falling back to encoding as a map; keep the existing class instance encoding (classFields / iv.classValue) and the plain-object mapValue path unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@baml_language/sdks/nodejs/RELEASE.md`:
- Around line 24-26: Replace the incorrect repo paths in RELEASE.md: change
occurrences of "sdks/nodejs/bridge_nodejs/package.json" to
"bridge_nodejs/package.json" and change occurrences of
"crates/baml_cli/src/generate.rs" to "crates/baml_cli/generate.rs" (also update
the other instance around lines 57-58) so the guide matches the layout used
elsewhere in the PR.
---
Outside diff comments:
In `@baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto.ts`:
- Around line 144-194: The current generic object branch accepts any object and
will silently serialize built-ins (Date/Map/Set/URL/Error/Promise) as
empty/partial maps; update the object-handling logic in the same function that
uses Object.getPrototypeOf/value checks (the isClassInstance branch,
getTypeMap().jsTypeToBamlType, and the BamlHandle checks) to early-reject
unsupported non-plain objects: after computing proto and isClassInstance, if
proto !== Object.prototype && proto !== null and the value isn't a recognized
codegen class (no fqn via getTypeMap().jsTypeToBamlType) and isn't a
handle-backed stdlib object (the existing Object.values(...).some(v => v
instanceof BamlHandle) path), throw a clear error naming the unsupported
constructor (e.g. value.constructor?.name) instead of falling back to encoding
as a map; keep the existing class instance encoding (classFields /
iv.classValue) and the plain-object mapValue path unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 5a4aea65-6f41-40f7-9791-2dd59332c642
⛔ Files ignored due to path filters (3)
baml_language/Cargo.lockis excluded by!**/*.lockbaml_language/sdks/nodejs/bridge_nodejs/proto.d.ts.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/proto.js.mapis excluded by!**/*.map
📒 Files selected for processing (29)
.github/workflows/build-nodejs-sdk.reusable.yaml.github/workflows/release-sdk.yamlbaml_language/crates/baml_cli/Cargo.tomlbaml_language/crates/baml_cli/src/generate.rsbaml_language/crates/baml_codegen_types/src/generator_fields.rsbaml_language/crates/bex_engine/src/conversion.rsbaml_language/sdk_tests/crates/nodejs_typescript/llm_functions/customizable/main.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/main.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_aliases.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_class_refs.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_enums.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_forward_refs.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_generics.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_handles.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_lists.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_literals.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_maps.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_media.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_optional.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_primitives.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_recursion.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_routing.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_streams.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_symbol_collisions.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_unions.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_void.test.tsbaml_language/sdks/nodejs/RELEASE.mdbaml_language/sdks/nodejs/bridge_nodejs/proto.jsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto.ts
🚧 Files skipped from review as they are similar to previous changes (22)
- baml_language/crates/baml_cli/Cargo.toml
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_class_refs.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_symbol_collisions.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_primitives.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_streams.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_forward_refs.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_literals.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_lists.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_maps.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_unions.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_routing.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_optional.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_recursion.test.ts
- baml_language/crates/baml_codegen_types/src/generator_fields.rs
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_void.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_aliases.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_generics.test.ts
- baml_language/crates/bex_engine/src/conversion.rs
- baml_language/crates/baml_cli/src/generate.rs
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_enums.test.ts
- baml_language/sdks/nodejs/bridge_nodejs/proto.js
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/main.test.ts
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
baml_language/sdks/nodejs/RELEASE.md (1)
24-26:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winFix path inconsistencies in the release guide.
The document inconsistently refers to paths: line 30 uses
bridge_nodejs/package.json(relative) while line 25 uses the fullsdks/nodejs/bridge_nodejs/package.json. For consistency and to match the relative path style used elsewhere in the document, these should be updated to relative paths.📝 Suggested changes
Line 25: Change
sdks/nodejs/bridge_nodejs/package.jsontobridge_nodejs/package.jsonLine 58: Verify and potentially shorten
crates/baml_cli/src/generate.rsto match the relative path style.Also applies to: 57-58
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@baml_language/sdks/nodejs/RELEASE.md` around lines 24 - 26, Update the inconsistent file path references in the release guide: replace the absolute path reference `sdks/nodejs/bridge_nodejs/package.json` with the relative `bridge_nodejs/package.json` wherever it appears in RELEASE.md and also shorten `crates/baml_cli/src/generate.rs` to the relative `baml_cli/src/generate.rs` (or to `src/generate.rs` if consistent with the rest of the document) so all path mentions follow the same relative style; ensure occurrences near the existing mentions of `version` and the generate script are updated.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@baml_language/sdks/nodejs/RELEASE.md`:
- Line 1: The CI fails because the Node.js SDK RELEASE.md (the file with header
"# Releasing `@boundaryml/baml-core` (Node.js SDK)") isn't listed in the
markdown whitelist; open the baml_language/.markdown-whitelist file and add the
entry sdks/nodejs/RELEASE.md (exact relative path) to the list so the file is
allowed by the CI, commit the change, and rerun CI.
---
Duplicate comments:
In `@baml_language/sdks/nodejs/RELEASE.md`:
- Around line 24-26: Update the inconsistent file path references in the release
guide: replace the absolute path reference
`sdks/nodejs/bridge_nodejs/package.json` with the relative
`bridge_nodejs/package.json` wherever it appears in RELEASE.md and also shorten
`crates/baml_cli/src/generate.rs` to the relative `baml_cli/src/generate.rs` (or
to `src/generate.rs` if consistent with the rest of the document) so all path
mentions follow the same relative style; ensure occurrences near the existing
mentions of `version` and the generate script are updated.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: d1c1f924-b7f8-4a77-a8f5-4cabcc9db7a9
⛔ Files ignored due to path filters (4)
baml_language/Cargo.lockis excluded by!**/*.lockbaml_language/sdks/nodejs/bridge_nodejs/proto.d.ts.mapis excluded by!**/*.mapbaml_language/sdks/nodejs/bridge_nodejs/proto.js.mapis excluded by!**/*.mapbaml_language/sdks/python/uv.lockis excluded by!**/*.lock
📒 Files selected for processing (39)
.github/workflows/build-nodejs-sdk.reusable.yaml.github/workflows/release-sdk.yamlbaml_language/crates/baml_cli/Cargo.tomlbaml_language/crates/baml_cli/src/generate.rsbaml_language/crates/baml_codegen_types/src/generator_fields.rsbaml_language/crates/bex_engine/src/conversion.rsbaml_language/sdk_tests/crates/nodejs_typescript/llm_functions/customizable/main.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/main.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_aliases.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_class_refs.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_complex_models.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_enums.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_forward_refs.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_generics.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_handles.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_lists.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_literals.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_maps.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_media.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_optional.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_primitives.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_recursion.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_routing.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_streams.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_symbol_collisions.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_unions.test.tsbaml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_void.test.tsbaml_language/sdk_tests/crates/python_pydantic2/type_shapes/customizable/test_complex_models.pybaml_language/sdk_tests/crates/python_pydantic2/type_shapes/customizable/test_main.pybaml_language/sdk_tests/fixtures/type_shapes/baml_src/ns_complex_models/types.bamlbaml_language/sdks/nodejs/RELEASE.mdbaml_language/sdks/nodejs/bridge_nodejs/proto.jsbaml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto.tsbaml_language/sdks/nodejs/codegen_nodejs/src/emit/function.rsbaml_language/sdks/nodejs/codegen_nodejs/src/emit/mod.rsbaml_language/sdks/nodejs/codegen_nodejs/src/emit/typemap_file.rsbaml_language/sdks/nodejs/codegen_nodejs/src/lib.rsbaml_language/sdks/nodejs/codegen_nodejs/src/routing.rsbaml_language/sdks/nodejs/codegen_nodejs/src/translate_ty.rs
✅ Files skipped from review due to trivial changes (2)
- baml_language/crates/baml_codegen_types/src/generator_fields.rs
- baml_language/sdk_tests/crates/python_pydantic2/type_shapes/customizable/test_main.py
🚧 Files skipped from review as they are similar to previous changes (27)
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_enums.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_generics.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_routing.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_maps.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_forward_refs.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_void.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_media.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_class_refs.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_primitives.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_recursion.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_literals.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_aliases.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/main.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_unions.test.ts
- baml_language/crates/baml_cli/src/generate.rs
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_lists.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_symbol_collisions.test.ts
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_optional.test.ts
- baml_language/crates/bex_engine/src/conversion.rs
- baml_language/sdks/nodejs/codegen_nodejs/src/lib.rs
- baml_language/crates/baml_cli/Cargo.toml
- baml_language/sdks/nodejs/codegen_nodejs/src/emit/function.rs
- baml_language/sdks/nodejs/codegen_nodejs/src/emit/typemap_file.rs
- baml_language/sdks/nodejs/codegen_nodejs/src/translate_ty.rs
- baml_language/sdk_tests/crates/nodejs_typescript/type_shapes/customizable/roundtrip_handles.test.ts
- baml_language/sdks/nodejs/bridge_nodejs/typescript_src/proto.ts
- baml_language/sdks/nodejs/bridge_nodejs/proto.js
There was a problem hiding this comment.
🧹 Nitpick comments (1)
baml_language/sdk_tests/crates/typescript_node/llm_functions/customizable/main.test.ts (1)
97-104: ⚡ Quick winAssertion is weaker than the test's stated intent.
The title claims
loremexposes the$streamcompanion classes (plural), but.some()passes when only one ofResume$stream/StreamingDoc$streamis present, so a regression that drops one companion would go undetected. Use.every()to assert both.♻️ Proposed change
- const hasAny = ["Resume$stream", "StreamingDoc$stream"].some( - (name) => name in lorem, - ); - expect(hasAny).toBe(true); + const hasAll = ["Resume$stream", "StreamingDoc$stream"].every( + (name) => name in lorem, + ); + expect(hasAll).toBe(true);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@baml_language/sdk_tests/crates/typescript_node/llm_functions/customizable/main.test.ts` around lines 97 - 104, The test titled "lorem exposes the `$stream` companion classes beside their base type" currently uses Array.some, which only requires one of the companion names to exist; update the assertion to require both by replacing the .some(...) check with .every(...) so that both "Resume$stream" and "StreamingDoc$stream" must exist in the lorem object (keep the test name and expect(...) toBe(true) semantics but use every to compute hasAll).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@baml_language/sdk_tests/crates/typescript_node/llm_functions/customizable/main.test.ts`:
- Around line 97-104: The test titled "lorem exposes the `$stream` companion
classes beside their base type" currently uses Array.some, which only requires
one of the companion names to exist; update the assertion to require both by
replacing the .some(...) check with .every(...) so that both "Resume$stream" and
"StreamingDoc$stream" must exist in the lorem object (keep the test name and
expect(...) toBe(true) semantics but use every to compute hasAll).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 52eb76b9-d8e1-418a-baf4-29eb285a0efa
⛔ Files ignored due to path filters (1)
baml_language/Cargo.lockis excluded by!**/*.lock
📒 Files selected for processing (51)
baml_language/.config/nextest.tomlbaml_language/Cargo.tomlbaml_language/crates/baml_cli/src/generate.rsbaml_language/crates/baml_codegen_types/src/generator_fields.rsbaml_language/sdk_tests/README.mdbaml_language/sdk_tests/crates/python_pydantic2/function_calls/customizable/test_methods_on_classes.pybaml_language/sdk_tests/crates/python_pydantic2/setup.shbaml_language/sdk_tests/crates/typescript_node/Cargo.tomlbaml_language/sdk_tests/crates/typescript_node/build.rsbaml_language/sdk_tests/crates/typescript_node/docstrings_etc/customizable/main.test.tsbaml_language/sdk_tests/crates/typescript_node/function_calls/customizable/methods_on_classes.test.tsbaml_language/sdk_tests/crates/typescript_node/llm_functions/customizable/main.test.tsbaml_language/sdk_tests/crates/typescript_node/setup.ps1baml_language/sdk_tests/crates/typescript_node/setup.shbaml_language/sdk_tests/crates/typescript_node/src/lib.rsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/main.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_aliases.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_class_refs.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_complex_models.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_enums.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_forward_refs.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_generics.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_handles.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_lists.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_literals.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_maps.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_media.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_optional.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_primitives.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_recursion.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_routing.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_streams.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_symbol_collisions.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_unions.test.tsbaml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_void.test.tsbaml_language/sdk_tests/fixtures/function_calls/baml_src/ns_methods_on_classes/types.bamlbaml_language/sdk_tests/harness_runner/Cargo.tomlbaml_language/sdk_tests/harness_runner/src/lib.rsbaml_language/sdk_tests/harness_setup/Cargo.tomlbaml_language/sdk_tests/harness_setup/src/lib.rsbaml_language/sdk_tests/harness_setup/src/python_pydantic2.rsbaml_language/sdk_tests/harness_setup/src/typescript_node.rsbaml_language/sdks/nodejs/RELEASE.mdbaml_language/sdks/nodejs/codegen_nodejs/src/emit/function.rsbaml_language/sdks/nodejs/codegen_nodejs/src/emit/method.rsbaml_language/sdks/nodejs/codegen_nodejs/src/emit/mod.rsbaml_language/sdks/nodejs/codegen_nodejs/src/emit/typemap_file.rsbaml_language/sdks/nodejs/codegen_nodejs/src/leaf.rsbaml_language/sdks/nodejs/codegen_nodejs/src/lib.rsbaml_language/sdks/nodejs/codegen_nodejs/src/routing.rsbaml_language/sdks/nodejs/codegen_nodejs/src/translate_ty.rs
💤 Files with no reviewable changes (18)
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_void.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_media.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_recursion.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_maps.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_optional.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_symbol_collisions.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_generics.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_class_refs.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_literals.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_primitives.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_aliases.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_routing.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_enums.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_unions.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_lists.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_handles.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/main.test.ts
- baml_language/sdk_tests/crates/typescript_node/type_shapes/customizable/roundtrip_forward_refs.test.ts
✅ Files skipped from review due to trivial changes (9)
- baml_language/sdk_tests/harness_runner/Cargo.toml
- baml_language/sdk_tests/crates/typescript_node/Cargo.toml
- baml_language/sdk_tests/harness_setup/src/python_pydantic2.rs
- baml_language/sdk_tests/fixtures/function_calls/baml_src/ns_methods_on_classes/types.baml
- baml_language/sdk_tests/crates/python_pydantic2/setup.sh
- baml_language/sdk_tests/harness_setup/Cargo.toml
- baml_language/sdk_tests/crates/typescript_node/src/lib.rs
- baml_language/sdk_tests/README.md
- baml_language/sdks/nodejs/RELEASE.md
🚧 Files skipped from review as they are similar to previous changes (7)
- baml_language/crates/baml_cli/src/generate.rs
- baml_language/sdks/nodejs/codegen_nodejs/src/emit/function.rs
- baml_language/sdks/nodejs/codegen_nodejs/src/emit/typemap_file.rs
- baml_language/sdks/nodejs/codegen_nodejs/src/emit/method.rs
- baml_language/sdks/nodejs/codegen_nodejs/src/routing.rs
- baml_language/sdks/nodejs/codegen_nodejs/src/translate_ty.rs
- baml_language/sdks/nodejs/codegen_nodejs/src/emit/mod.rs
60a438d to
b9b792b
Compare
Summary by CodeRabbit
New Features
Bug Fixes
Chores
@boundaryml/baml-nodeto@boundaryml/baml-core