Skip to content

Commit 9a72b4f

Browse files
chore: update versions (#101)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 2243c7e commit 9a72b4f

21 files changed

Lines changed: 190 additions & 91 deletions

.changeset/aot-timeout-error-class.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

.changeset/fifty-cases-rhyme.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

.changeset/many-beds-like.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/runtime-parity-fixes.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/stdlib-type-guard-fixes.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.changeset/sync-tool-optimisation.md

Lines changed: 0 additions & 23 deletions
This file was deleted.

.changeset/tool-metadata.md

Lines changed: 0 additions & 22 deletions
This file was deleted.

packages/bridge-compiler/CHANGELOG.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,49 @@
11
# @stackables/bridge-compiler
22

3+
## 2.4.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+
### Patch Changes
33+
34+
- [#103](https://github.com/stackables/bridge/pull/103) [`fc6c619`](https://github.com/stackables/bridge/commit/fc6c6195dec524c880ac20f3057e776f76583f60) Thanks [@aarne](https://github.com/aarne)! - Fix AOT compiler to throw `BridgeTimeoutError` on tool timeout
35+
36+
AOT-compiled bridges now throw `BridgeTimeoutError` (with the same name and
37+
message format as the runtime) when a tool exceeds `toolTimeoutMs`. Previously
38+
the generated code constructed a generic `Error`, causing a class mismatch when
39+
callers caught and inspected the error type.
40+
41+
- [#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
42+
43+
- Updated dependencies [[`b213e9f`](https://github.com/stackables/bridge/commit/b213e9f49ed5da80e7d9a1b9e161586e59b3719c), [`fc6c619`](https://github.com/stackables/bridge/commit/fc6c6195dec524c880ac20f3057e776f76583f60), [`fc6c619`](https://github.com/stackables/bridge/commit/fc6c6195dec524c880ac20f3057e776f76583f60), [`2243c7e`](https://github.com/stackables/bridge/commit/2243c7e7fd23a37c30118e713ae348b833c523fe), [`8e5b2e2`](https://github.com/stackables/bridge/commit/8e5b2e21796cfd7e9a9345225d94ceb8bfc39bac)]:
44+
- @stackables/bridge-core@1.5.0
45+
- @stackables/bridge-stdlib@1.5.2
46+
347
## 2.3.0
448

549
### Minor Changes

packages/bridge-compiler/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@stackables/bridge-compiler",
3-
"version": "2.3.0",
3+
"version": "2.4.0",
44
"description": "Compiles a BridgeDocument into highly optimized JavaScript code",
55
"main": "./build/index.js",
66
"type": "module",

packages/bridge-core/CHANGELOG.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,59 @@
11
# @stackables/bridge-core
22

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+
357
## 1.4.0
458

559
### Minor Changes

0 commit comments

Comments
 (0)