|
1 | 1 | # @stackables/bridge-core |
2 | 2 |
|
| 3 | +## 1.5.0 |
| 4 | + |
| 5 | +### Minor Changes |
| 6 | + |
| 7 | +- [#104](https://github.com/stackables/bridge/pull/104) [`b213e9f`](https://github.com/stackables/bridge/commit/b213e9f49ed5da80e7d9a1b9e161586e59b3719c) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Multi-Level Control Flow (break N, continue N) |
| 8 | + |
| 9 | + When working with deeply nested arrays (e.g., mapping categories that contain lists of products), you may want an error deep inside the inner array to skip the outer array element. |
| 10 | + |
| 11 | + You can append a number to break or continue to specify how many loop levels the signal should pierce. |
| 12 | + |
| 13 | +- [#102](https://github.com/stackables/bridge/pull/102) [`2243c7e`](https://github.com/stackables/bridge/commit/2243c7e7fd23a37c30118e713ae348b833c523fe) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Sync tool optimisation — honour the `sync` flag in ToolMetadata |
| 14 | + |
| 15 | + When a tool declares `{ sync: true }` in its `.bridge` metadata the engine |
| 16 | + now enforces and optimises it: |
| 17 | + |
| 18 | + 1. **Enforcement** — if a sync-declared tool returns a Promise, both the |
| 19 | + runtime and compiled engines throw immediately. |
| 20 | + 2. **Core optimisation** — `callTool()` skips timeout racing, the OTel span |
| 21 | + wrapper, and all promise handling for sync tools. |
| 22 | + 3. **Compiler optimisation** — generated code uses a dedicated `__callSync()` |
| 23 | + helper at every call-site, avoiding `await` overhead entirely. |
| 24 | + 4. **Array-map fast path** — when all per-element tools in an array map are |
| 25 | + sync, the compiled engine generates a dual-path: a synchronous `.map()` |
| 26 | + branch (no microtask ticks) with a runtime fallback to `for…of + await` |
| 27 | + for async tools. |
| 28 | + |
| 29 | + Benchmarks show up to ~50 % latency reduction for compiled array maps |
| 30 | + with sync tools (100 elements). |
| 31 | + |
| 32 | +- [#100](https://github.com/stackables/bridge/pull/100) [`8e5b2e2`](https://github.com/stackables/bridge/commit/8e5b2e21796cfd7e9a9345225d94ceb8bfc39bac) Thanks [@aarne](https://github.com/aarne)! - Add `ToolMetadata` — per-tool observability controls |
| 33 | + |
| 34 | + Tools can now attach a `.bridge` property to declare how the engine should |
| 35 | + instrument them, imported as `ToolMetadata` from `@stackables/bridge`. |
| 36 | + |
| 37 | + ```ts |
| 38 | + import type { ToolMetadata } from "@stackables/bridge"; |
| 39 | + |
| 40 | + myTool.bridge = { |
| 41 | + trace: false, // skip OTel span for this tool |
| 42 | + log: { |
| 43 | + execution: "info", // log successful calls at info level |
| 44 | + errors: "error", // log failures at error level (default) |
| 45 | + }, |
| 46 | + } satisfies ToolMetadata; |
| 47 | + ``` |
| 48 | + |
| 49 | +### Patch Changes |
| 50 | + |
| 51 | +- [#103](https://github.com/stackables/bridge/pull/103) [`fc6c619`](https://github.com/stackables/bridge/commit/fc6c6195dec524c880ac20f3057e776f76583f60) Thanks [@aarne](https://github.com/aarne)! - Fix AOT/runtime parity for null element traversal, catch-null recovery, and non-array source handling |
| 52 | + |
| 53 | +- Updated dependencies [[`fc6c619`](https://github.com/stackables/bridge/commit/fc6c6195dec524c880ac20f3057e776f76583f60), [`8e5b2e2`](https://github.com/stackables/bridge/commit/8e5b2e21796cfd7e9a9345225d94ceb8bfc39bac)]: |
| 54 | + - @stackables/bridge-stdlib@1.5.2 |
| 55 | + - @stackables/bridge-types@1.1.0 |
| 56 | + |
3 | 57 | ## 1.4.0 |
4 | 58 |
|
5 | 59 | ### Minor Changes |
|
0 commit comments