Skip to content

engine_typescript(fix): export HTTP request/response runtime symbols#3237

Open
miguelcsx wants to merge 2 commits intoBoundaryML:canaryfrom
miguelcsx:fix/typescript
Open

engine_typescript(fix): export HTTP request/response runtime symbols#3237
miguelcsx wants to merge 2 commits intoBoundaryML:canaryfrom
miguelcsx:fix/typescript

Conversation

@miguelcsx
Copy link
Contributor

@miguelcsx miguelcsx commented Mar 12, 2026

This PR fixes a packaging issue in @boundaryml/baml where the TypeScript package entrypoint did not export several runtime symbols that generated clients expect to import.

image

Referenced here: Discord Message

Why this fixes the issue

The change adds the missing runtime exports in engine/language_client_typescript/typescript_src/index.ts for:

  • HTTPRequest
  • HTTPResponse
  • SSEResponse

After this change:

  • the package runtime matches its declared types
  • generated clients can import these symbols correctly
  • ESM consumers load without crashing at startup

What changed

  • added the missing runtime in the TS/JS code
  • bumped the local package version to 0.220.1

Developer impact

  • fixes startup failures in TypeScript/ESM apps using generated BAML clients
  • removes the mismatch between type definitions and runtime exports

Summary by CodeRabbit

  • New Features

    • HTTPRequest, HTTPResponse, and SSEResponse are now exposed in the public API.
    • In browser environments, accessing these exports yields clear descriptive errors to prevent unsupported usage.
  • Chores

    • Package version bumped to 0.220.1.

@vercel
Copy link

vercel bot commented Mar 12, 2026

@miguelcsx is attempting to deploy a commit to the Boundary Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 12, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: b2b908e5-816f-47eb-96b4-2bbd2acf3a4b

📥 Commits

Reviewing files that changed from the base of the PR and between 5e5c7ab and 2471450.

⛔ Files ignored due to path filters (1)
  • engine/language_client_typescript/index.d.ts.map is excluded by !**/*.map
📒 Files selected for processing (4)
  • engine/language_client_typescript/index.d.ts
  • engine/language_client_typescript/index.js
  • engine/language_client_typescript/package.json
  • engine/language_client_typescript/typescript_src/index.ts

📝 Walkthrough

Walkthrough

Adds HTTPRequest, HTTPResponse, and SSEResponse to the TypeScript language client public API, updates type re-exports to alias native implementations, and introduces a Node vs. browser import guard that throws on browser access for these HTTP/SSE symbols.

Changes

Cohort / File(s) Summary
HTTP Type Exports
engine/language_client_typescript/index.js, engine/language_client_typescript/typescript_src/index.ts, engine/language_client_typescript/index.d.ts
Added public exports HTTPRequest, HTTPResponse, SSEResponse; re-exported/aliased native implementations (HttpRequest as HTTPRequest, HttpResponse as HTTPResponse, SseResponse as SSEResponse) and added browser-path getters that throw a browser-specific error when accessed.
Package Version
engine/language_client_typescript/package.json
Bumped package version from 0.220.0 to 0.220.1.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: exporting HTTP request/response runtime symbols for the TypeScript engine client package.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Tip

You can validate your CodeRabbit configuration file in your editor.

If your editor has YAML language server, you can enable auto-completion and validation by adding # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json at the top of your CodeRabbit configuration file.

@vercel vercel bot temporarily deployed to Preview – promptfiddle March 12, 2026 02:11 Inactive
@vercel
Copy link

vercel bot commented Mar 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
promptfiddle Skipped Skipped Mar 13, 2026 11:25pm

Request Review

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1f4e5374-a8be-4a41-b5eb-81ea16f67acf

📥 Commits

Reviewing files that changed from the base of the PR and between 2f58ba9 and ea67a2e.

📒 Files selected for processing (2)
  • engine/language_client_typescript/index.js
  • engine/language_client_typescript/package.json

@aaronvg
Copy link
Contributor

aaronvg commented Mar 13, 2026

ty for the fix, but we need to change the actual .ts code that generates these js files. These js files are autogenerated

@vercel vercel bot temporarily deployed to Preview – promptfiddle March 13, 2026 23:19 Inactive
@miguelcsx
Copy link
Contributor Author

ty for the fix, but we need to change the actual .ts code that generates these js files. These js files are autogenerated

I didn't realize those files were autogenerated. I've updated the .ts source and regenerated the .js files. Thanks for the catch.

- add missing runtime exports for HTTPRequest, HTTPResponse, and SSEResponse

- fix ESM import failure in generated BAML clients
- Fix exists on ts files, instead on autogenerated js

- avoid overrides of the code when generation
@vercel vercel bot temporarily deployed to Preview – promptfiddle March 13, 2026 23:25 Inactive
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