Added
- Async JavaScript Bloomberg connection factories:
@xbbg/corenow exposesEngine.connect()and top-levelconnect()so Bloomberg session startup runs off the Node event loop; the existing synchronous constructor remains available for compatibility. - Dedicated Bloomberg capacity-limit exceptions: JavaScript now exports
BlpLimitError, and Python now exportsxbbg.BlpLimitError, for BloombergLIMIT/DAILY_CAPACITY_REACHEDresponses. @xbbg/langgraphcancellation and timeout safety: Tools now honor the LangChain/LangGraphAbortSignal— already-cancelled calls never start Bloomberg work and aborted snapshot tools stop collecting and unsubscribe immediately instead of running out their timeout. Lazily connected engines apply a default hard per-request timeout (DEFAULT_ENGINE_REQUEST_TIMEOUT_MS, 60s;engineConfig.requestTimeoutMsoverrides,0disables) so a wedged Terminal session cannot hang tool calls forever. The newToolInvocationConfigtype is exported for custom tool integrations.
Changed
- Bloomberg request workers use SDK push-mode sessions by default: The Rust async engine now creates callback-mode Bloomberg sessions, sends requests directly from submitting tasks, and routes pushed SDK events by generation-tagged correlation IDs. This removes the 1ms command-queue poll loop for request dispatch while preserving multi-worker request pools, request cancellation, service-open coalescing, timeout scanning, and safe shutdown ordering.
- Rust hot paths tightened for high-throughput Bloomberg workloads: Request setters now use interned Bloomberg
Namehandles instead of allocating field-name C strings, release builds optimize for speed, field/exchange caches avoid stale disk entries, Arrow extraction avoids unchecked row/string access, and iterator/error paths now fail closed on Bloomberg SDK return codes. @xbbg/langgraphextension schemas are strict discriminated unions: Allxbbg_ext_*tool schemas now publish per-operation required fields to the model (with unknown-key rejection) instead of flat all-optional objects policed by runtime errors, andrecoveryRateis validated as a 0-1 decimal. Snapshot tools report cleanup failures in a newunsubscribeErrorresult field instead of discarding collected updates, empty results carry verification guidance in the model-facing summary, and binary payloads are bounded as placeholders instead of serialized raw.@xbbg/langgraphsecurity identifier guidance rewritten as pass-through rules: Agent instructions and every securities/ticker field description now state that securities are passed exactly as the user supplied them — Bloomberg tickers as<TICKER> <MARKET_SECTOR>, raw ISINs as/isin/<ISIN>, raw CUSIPs as/cusip/<CUSIP>— and that the ticker format is a template, never authorization to invent, recall, or guess a ticker for an identifier. The guidance now enumerates the Bloomberg market sector (yellow key) vocabulary —Equity,Index,Curncy,Comdty,Corp,Govt,Muni,Mtge,M-Mkt,Pfd— and documents thatxbbg_ext_ticker.parse_tickeronly handles generic futures-style tickers. Ticker-only recipe tools (xbbg_preferreds,xbbg_corporate_bonds,xbbg_index_members,xbbg_etf_holdings) direct the model to resolve identifiers throughxbbg_resolve_isinsfirst, andxbbg_preferredsexplicitly takes the issuer's common equity ticker rather than a fabricatedPfdticker. This removes the ambiguous "do not pass raw ISIN" phrasing that nudged models into inventing tickers instead of sending/isin/<ISIN>.@xbbg/langgraphrequest schemas only advertise parameters the engine accepts:formatis removed from thexbbg_bds,xbbg_bql,xbbg_bsrch,xbbg_bflds, andxbbg_beqstool schemas because the engine rejects it for BulkData, Bql, Bsrch, FieldInfo, and BEQS output ("format is not supported for ... output"); model-sent values are stripped instead of forwarded, whilexbbg_bdp/xbbg_bdhkeep their supported format options. Date inputs are now JSON-representable end to end:z.date()is dropped from the wire unions (zod v4'stoJSONSchemathrows "Date cannot be represented in JSON Schema"), with strings and epoch/YYYYMMDDnumbers covering all tool calls. A newtoolParameterJsonSchema(tool)export returns the provider-ready$ref-free JSON Schema so consumers stop reinventing zod conversion, and the agent instructions now direct one call per dataset instead of parallel parameter probing.
Fixed
- Bloomberg top-level
responseErrorpayloads are surfaced consistently: Refdata, historical, bulk, generic, intraday, BQL, field-info, and search extractors now propagate BloombergresponseErrordetails such ascategory=LIMIT,code=-4001, andsubcategory=DAILY_CAPACITY_REACHEDinstead of returning empty successful batches or generic request failures. - Binding error mapping preserves Bloomberg failure classes: NAPI and PyO3 now translate Bloomberg limit responses into the new limit exception classes while keeping validation, timeout, cancellation, session, and generic request errors distinct.
- Rust Bloomberg SDK ownership and entitlement handling hardened: Identity handles are released correctly, entitlement checks now preserve the SDK boolean result,
Session::next_eventmaps non-timeout SDK failures to errors, and async session shutdown waits for Bloomberg callbacks to drain before dropping callback state. @xbbg/langgraphnumeric dates no longer collapse to 1970: IntegerYYYYMMDDinputs (e.g.20240131) are parsed as calendar dates instead of epoch milliseconds, ambiguous numeric dates are rejected, and date/override normalization failures now surface as actionable schema messages to the model instead of LangChain's generic schema-mismatch text. Concurrent tool calls sharing one failed connect no longer cross-contaminate each other's error prefixes by mutating the sharedError.
Full Changelog: v1.2.7...v1.3.0