From 769341db7a668de945f2a026c4f7decc6d1720d6 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 14:00:20 +0000 Subject: [PATCH 1/3] chore: Prepare release --- .changeset/five-pens-dance.md | 14 -------------- .changeset/itchy-falcons-flow.md | 5 ----- js/CHANGELOG.md | 7 +++++++ js/package.json | 2 +- 4 files changed, 8 insertions(+), 20 deletions(-) delete mode 100644 .changeset/five-pens-dance.md delete mode 100644 .changeset/itchy-falcons-flow.md diff --git a/.changeset/five-pens-dance.md b/.changeset/five-pens-dance.md deleted file mode 100644 index 8143a5e1a..000000000 --- a/.changeset/five-pens-dance.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -"braintrust": minor ---- - -feat(mastra): auto-instrument Mastra via its native `ObservabilityExporter` - -Replaces the chunk-AST instrumentation with a Braintrust `ObservabilityExporter` that the loader auto-installs into every `new Mastra(...)`. Survives Mastra's content-hashed chunk renames release-to-release because the loader only touches the stable `dist/mastra/index.{js,cjs}` entry point. - -Two integration paths: - -- **Auto** (default with `node --import braintrust/hook.mjs`): no user code change, the loader wraps `Mastra` to call `defaultInstance.registerExporter(...)` after construction. Requires the user to enable observability via `new Mastra({ observability: new Observability({ ... }) })`. -- **Manual**: `import { BraintrustObservabilityExporter } from "braintrust";` and pass it via `new Mastra({ observability: new Observability({ configs: { default: { exporters: [new BraintrustObservabilityExporter()] } } }) })`. - -Requires `@mastra/core >= 1.20.0` for the auto path (the version that added `Mastra.prototype.registerExporter`); older versions silently no-op. Manual integration works on any Mastra version that accepts an `ObservabilityExporter`. diff --git a/.changeset/itchy-falcons-flow.md b/.changeset/itchy-falcons-flow.md deleted file mode 100644 index 172a03882..000000000 --- a/.changeset/itchy-falcons-flow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"braintrust": minor ---- - -feat: Add `BRAINTRUST_CACHE_LOCATION` env var to control caching location diff --git a/js/CHANGELOG.md b/js/CHANGELOG.md index 0c3cee3bf..bca82735b 100644 --- a/js/CHANGELOG.md +++ b/js/CHANGELOG.md @@ -1,5 +1,12 @@ # braintrust +## 3.14.0 + +### Minor Changes + +- feat(mastra): auto-instrument Mastra via its native `ObservabilityExporter` Replaces the chunk-AST instrumentation with a Braintrust `ObservabilityExporter` that the loader auto-installs into every `new Mastra(...)`. Survives Mastra's content-hashed chunk renames release-to-release because the loader only touches the stable `dist/mastra/index.{js,cjs}` entry point. Two integration paths: - **Auto** (default with `node --import braintrust/hook.mjs`): no user code change, the loader wraps `Mastra` to call `defaultInstance.registerExporter(...)` after construction. Requires the user to enable observability via `new Mastra({ observability: new Observability({ ... }) })`. - **Manual**: `import { BraintrustObservabilityExporter } from "braintrust";` and pass it via `new Mastra({ observability: new Observability({ configs: { default: { exporters: [new BraintrustObservabilityExporter()] } } }) })`. Requires `@mastra/core >= 1.20.0` for the auto path (the version that added `Mastra.prototype.registerExporter`); older versions silently no-op. Manual integration works on any Mastra version that accepts an `ObservabilityExporter`. (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/1901) +- feat: Add `BRAINTRUST_CACHE_LOCATION` env var to control caching location (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2061) + ## 3.13.0 ### Minor Changes diff --git a/js/package.json b/js/package.json index f0d6ca8e8..8361036e0 100644 --- a/js/package.json +++ b/js/package.json @@ -1,6 +1,6 @@ { "name": "braintrust", - "version": "3.13.0", + "version": "3.14.0", "description": "SDK for integrating Braintrust", "repository": { "type": "git", From b751d92fc2bd60ee11b774afe3b3049d90710e1f Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 29 May 2026 16:23:30 +0200 Subject: [PATCH 2/3] clean up changelog --- js/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/CHANGELOG.md b/js/CHANGELOG.md index bca82735b..37450fa0e 100644 --- a/js/CHANGELOG.md +++ b/js/CHANGELOG.md @@ -4,7 +4,7 @@ ### Minor Changes -- feat(mastra): auto-instrument Mastra via its native `ObservabilityExporter` Replaces the chunk-AST instrumentation with a Braintrust `ObservabilityExporter` that the loader auto-installs into every `new Mastra(...)`. Survives Mastra's content-hashed chunk renames release-to-release because the loader only touches the stable `dist/mastra/index.{js,cjs}` entry point. Two integration paths: - **Auto** (default with `node --import braintrust/hook.mjs`): no user code change, the loader wraps `Mastra` to call `defaultInstance.registerExporter(...)` after construction. Requires the user to enable observability via `new Mastra({ observability: new Observability({ ... }) })`. - **Manual**: `import { BraintrustObservabilityExporter } from "braintrust";` and pass it via `new Mastra({ observability: new Observability({ configs: { default: { exporters: [new BraintrustObservabilityExporter()] } } }) })`. Requires `@mastra/core >= 1.20.0` for the auto path (the version that added `Mastra.prototype.registerExporter`); older versions silently no-op. Manual integration works on any Mastra version that accepts an `ObservabilityExporter`. (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/1901) +- feat(mastra): Add Mastra auto-instrumentation (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/1901) - feat: Add `BRAINTRUST_CACHE_LOCATION` env var to control caching location (https://github.com/braintrustdata/braintrust-sdk-javascript/pull/2061) ## 3.13.0 From c76a0bef1724e047eb241caba563bc3454ce94b0 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 29 May 2026 16:46:12 +0200 Subject: [PATCH 3/3] Show changelog and diff in summary --- .github/workflows/publish-stable-release.yaml | 45 ++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-stable-release.yaml b/.github/workflows/publish-stable-release.yaml index a8264104c..f749c03f8 100644 --- a/.github/workflows/publish-stable-release.yaml +++ b/.github/workflows/publish-stable-release.yaml @@ -17,7 +17,46 @@ env: NPM_CONFIG_PROVENANCE: "true" jobs: + print-changelog-links: + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + contents: read + pull-requests: read + steps: + - name: Print changelog links + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + RELEASE_PR: ${{ inputs.release_pr }} + GITHUB_SERVER_URL: ${{ github.server_url }} + run: | + set -euo pipefail + + if [ -z "$RELEASE_PR" ]; then + echo "Stable releases must provide the prepare release PR number in release_pr." >&2 + exit 1 + fi + + gh pr view "$RELEASE_PR" \ + --repo "$GH_REPO" \ + --json headRefOid,url \ + > changelog-pr.json + + changelog_pr_url="$(jq -r '.url' changelog-pr.json)" + head_sha="$(jq -r '.headRefOid' changelog-pr.json)" + latest_release_tag="$(gh api "repos/$GH_REPO/releases/latest" --jq '.tag_name')" + encoded_latest_release_tag="$(jq -rn --arg tag "$latest_release_tag" '$tag|@uri')" + diff_url="$GITHUB_SERVER_URL/$GH_REPO/compare/$encoded_latest_release_tag...$head_sha" + + { + echo "Changelog PR: $changelog_pr_url" + echo "Diff to latest release: $diff_url" + } | tee -a "$GITHUB_STEP_SUMMARY" + publish-stable: + needs: + - print-changelog-links runs-on: ubuntu-latest timeout-minutes: 30 permissions: @@ -216,10 +255,14 @@ jobs: notify-failure: needs: + - print-changelog-links - publish-stable if: | always() && - needs.publish-stable.result == 'failure' + ( + needs.print-changelog-links.result == 'failure' || + needs.publish-stable.result == 'failure' + ) runs-on: ubuntu-latest timeout-minutes: 5 steps: