Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

feat(worker): add Rust native addon scaffold (@langfuse/native) (#17062)

Valery Meleshkin1a2d1f21157e
diff --git a/.agents/AGENTS.md b/.agents/AGENTS.md
index 93fd7cf4a6..b9f9ebaff6 100644
--- a/.agents/AGENTS.md
+++ b/.agents/AGENTS.md
@@ -106,6 +106,7 @@ langfuse/
|- web/ # Next.js app (UI + tRPC + public REST)
|- worker/ # Queue consumers and background processing
|- packages/shared/ # Shared domain, DB, queue contracts, repositories
+|- packages/native/ # Rust addon (napi-rs) loaded in-process by worker
|- ee/ # Enterprise package consumed by web
|- generated/ # Generated API clients (do not hand-edit)
|- fern/ # API definition sources
@@ -114,7 +115,7 @@ langfuse/
- Dependency direction:
- `web` -> `@langfuse/shared`, `@langfuse/ee`
- - `worker` -> `@langfuse/shared`
+ - `worker` -> `@langfuse/shared`, `@langfuse/native`
- `@langfuse/ee` -> `@langfuse/shared`
- `@langfuse/shared` -> no imports from `web`, `worker`, or `ee`
- Queue payload schemas and queue-name contracts are owned by
@@ -196,6 +197,11 @@ langfuse/
- `web/**`: `pnpm run lint` plus targeted web tests.
- `worker/**`: `pnpm run lint` plus targeted worker tests.
+- `packages/native/**`: `pnpm --filter @langfuse/native run lint` (rustfmt +
+ clippy), then `pnpm --filter @langfuse/native run build`,
+ `pnpm --filter worker run typecheck`, and the worker `nativeHello` test,
+ which loads the compiled addon. Building the worker needs a Rust
+ toolchain (`rustup`); see `packages/native/AGENTS.md`.
- `packages/shared/**` non-schema changes:
`pnpm run lint` plus one targeted web check and one targeted worker check.
- `packages/shared/prisma/**` or `packages/shared/clickhouse/**`:
diff --git a/.dockerignore b/.dockerignore
index f65b5e3152..7a1df6e094 100644
--- a/.dockerignore
+++ b/.dockerignore
@@ -14,3 +14,5 @@ README.md
.git
**/node_modules
ai-gateway/target
+packages/native/target
+packages/native/*.node
diff --git a/.gitattributes b/.gitattributes
index 1f7549b5c6..b7ef5dae0f 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1 +1,4 @@
-.github/workflows/*.lock.yml linguist-generated=true
\ No newline at end of file
+.github/workflows/*.lock.yml linguist-generated=true
+# Loader and typings written by `napi build` from the Rust exports.
+packages/native/index.js linguist-generated=true
+packages/native/index.d.ts linguist-generated=true
diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml
index 5e34c1410a..99409d8abc 100644
--- a/.github/workflows/pipeline.yml
+++ b/.github/workflows/pipeline.yml
@@ -269,7 +269,11 @@ jobs:
cp .env.dev.example .env
- name: lint web
# Three packages with four ESLint workers leave headroom on 16 vCPUs.
- run: pnpm turbo run lint --filter=!ai-gateway --concurrency=3 -- --concurrency=4
+ run: pnpm turbo run lint --filter=!ai-gateway --filter=!@langfuse/native --concurrency=3 -- --concurrency=4
+ # Rust packages lint with cargo, which rejects the trailing ESLint flag
+ # above, so they run outside that invocation (ai-gateway in its own job).
+ - name: lint native addon (rustfmt, clippy)
+ run: pnpm --filter @langfuse/native run lint
- name: typecheck
run: pnpm run typecheck --filter=!ai-gateway
diff --git a/.prettierignore b/.prettierignore
index 05f658f671..73c06437e9 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -3,3 +3,7 @@ packages/shared/prisma/generated
# Local, untracked screenshot/review archives
.screenshots-review
+
+# Loader and typings generated by `napi build` in packages/native
+packages/native/index.js
+packages/native/index.d.ts
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 7c73fac487..fbb7ffa433 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -121,6 +121,7 @@ We built a monorepo using [pnpm](https://pnpm.io/motivation) and [turbo](https:/
- `worker`: contains an application for asynchronous processing of tasks.
- `packages`:
- `shared`: contains shared code between the above packages.
+ - `native`: Rust native addon (napi-rs) that the worker loads in-process. See [packages/native/README.md](packages/native/README.md).
- `config-eslint`: contains eslint configurations which are shared between the above packages.
- `config-typescript`: contains typescript configurations which are shared between the above packages.
- `ee`: contains all enterprise features. See [EE README](ee/README.md) for more details.
@@ -130,8 +131,7 @@ We built a monorepo using [pnpm](https://pnpm.io/motivation) and [turbo](https:/
Requirements
- Node.js 24 as specified in the [.nvmrc](.nvmrc)
-- [Rust via rustup](https://rust-lang.org/tools/install/) and a native compiler/linker for the AI gateway, which starts with `pnpm dev`. See [gateway setup](ai-gateway/README.md#run-locally).
-- pnpm 12.3.1 as specified in `package.json`
+- [Rust via rustup](https://rust-lang.org/tools/install/) and a native compiler/linker, for the AI gateway (which starts with `pnpm dev`, see [gateway setup](ai-gateway/README.md#run-locally)) and for the worker's native addon (compiled during the worker build, see [packages/native/README.md](packages/native/README.md)). Each crate pins its own toolchain in `rust-toolchain.toml`; rustup installs it on first use.
- Docker to run the database locally
- Clickhouse client
diff --git a/knip.jsonc b/knip.jsonc
index 1cb5d48f1d..ff8f0e30a0 100644
--- a/knip.jsonc
+++ b/knip.jsonc
@@ -1,5 +1,12 @@
{
- "ignore": [".agents/skills/**", "scripts/**", "vitest.workspace.ts"],
+ "ignore": [
+ ".agents/skills/**",
+ "scripts/**",
+ "vitest.workspace.ts",
+ // Generated by `napi build`: the loader probes optional per-platform
+ // packages and a WASI fallback that this workspace never publishes.
+ "packages/native/index.js",
+ ],
// Re-enable once Knip tracks all workspace packages and catalog entries stop false-positiveing.
"rules": {
"catalog": "off",
diff --git a/packages/native/.gitignore b/packages/native/.gitignore
new file mode 100644
index 0000000000..3304cd5642
--- /dev/null
+++ b/packages/native/.gitignore
@@ -0,0 +1,5 @@
+# Cargo build output
+target/
+
+# Platform-specific binaries produced by `napi build`
+*.node
diff --git a/packages/native/AGENTS.md b/packages/native/AGENTS.md
new file mode 100644
index 0000000000..869869cd8c
--- /dev/null
+++ b/packages/native/AGENTS.md
@@ -0,0 +1,37 @@
+# Agent Guidelines for `packages/native`
+
+## Purpose
+
+- Rust native addon (napi-rs) loaded in-process by the worker as
+ `@langfuse/native`. Currently a hello-world scaffold; see `README.md` for
+ layout, commands, and how the addon ships in the worker image.
+
+## Maintenance Contract
+
+- `index.js` and `index.d.ts` are generated by `napi build`. Never hand-edit
+ them; rebuild and commit the result whenever `src/lib.rs` exports change.
+- Keep `rust-toolchain.toml` on the Rust version that the `node:24-alpine`
+ image ships (`docker run --rm node:24-alpine apk info rust` after
+ `apk update`). `worker/Dockerfile` compiles the addon with that package.
+- Building the worker needs the pinned Rust toolchain: CI runners get it from
+ rustup auto-install on first `cargo` use; `worker/Dockerfile` copies the
+ same version from the `rust:<version>-alpine` image. Bump
+ `rust-toolchain.toml` and that image tag together. The pin starts equal to
+ `ai-gateway/rust-toolchain.toml` but the files are deliberately separate.
+- Native code reports through the `metrics` and `tracing` facades set up in
+ `src/telemetry.rs`; never return values for Node to record. Configuration
+ mirrors dd-trace and the winston logger (`DD_*`, `LANGFUSE_LOG_*`).
+- The worker calls `initTelemetry()` once in `worker/src/initialize.ts` and
+ imports functions from `@langfuse/native` directly; keep call sites few.
+
+## Verification
+
+- `pnpm --filter @langfuse/native run lint` (rustfmt + clippy with
+ `-D warnings`).
+- `pnpm --filter @langfuse/native run build`, then
+ `pnpm --filter worker run typecheck` and
+ `pnpm --filter worker run test nativeHello`. The test loads the compiled
+ addon; `pnpm turbo run test --filter=worker` builds it first, a direct
+ vitest run does not.
+- When touching the build pipeline, build the worker image:
+ `docker build -f worker/Dockerfile .` and check `/api/health` on it.
diff --git a/packages/native/CLAUDE.md b/packages/native/CLAUDE.md
new file mode 120000
index 0000000000..47dc3e3d86
--- /dev/null
+++ b/packages/native/CLAUDE.md
@@ -0,0 +1 @@
+AGENTS.md
\ No newline at end of file
diff --git a/packages/native/Cargo.lock b/packages/native/Cargo.lock
new file mode 100644
index 0000000000..02b45de9bf
--- /dev/null
+++ b/packages/native/Cargo.lock
@@ -0,0 +1,958 @@
+# This file is automatically @generated by Cargo.
+# It is not intended for manual editing.
+version = 4
+
+[[package]]
+name = "aho-corasick"
+version = "1.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
+name = "autocfg"
+version = "1.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"
+
+[[package]]
+name = "bitflags"
+version = "2.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"
+
+[[package]]
+name = "bumpalo"
+version = "3.20.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"
+
+[[package]]
+name = "bytes"
+version = "1.12.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"
+
+[[package]]
+name = "cfg-if"
+version = "1.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
+
+[[package]]
+name = "convert_case"
+version = "0.11.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "affbf0190ed2caf063e3def54ff444b449371d55c58e513a95ab98eca50adb49"
+dependencies = [
+ "unicode-segmentation",
+]
+
+[[package]]
+name = "crossbeam-epoch"
+version = "0.9.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2d6914041f254d6e9176c01941b21115dcfb7089e55135a35411081bd106ef3f"
+dependencies = [
+ "crossbeam-utils",
+]
+
+[[package]]
+name = "crossbeam-utils"
+version = "0.8.22"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17"
+
+[[package]]
+name = "ctor"
+version = "1.0.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "914a755b7c2d4af2bdcff7ce1739e2db9a1b81a9b07123d8015786ae03c0980d"
+
+[[package]]
+name = "endian-type"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d"
+
+[[package]]
+name = "equivalent"
+version = "1.0.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
+
+[[package]]
+name = "foldhash"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"
+
+[[package]]
+name = "futures"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9a31d2a3fbaaeb2af2368bbdd904aa8e812d3c04a1ee10d3171f52d556e5d0a3"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-executor",
+ "futures-io",
+ "futures-sink",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-channel"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4"
+dependencies = [
+ "futures-core",
+ "futures-sink",
+]
+
+[[package]]
+name = "futures-core"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"
+
+[[package]]
+name = "futures-executor"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432"
+dependencies = [
+ "futures-core",
+ "futures-task",
+ "futures-util",
+]
+
+[[package]]
+name = "futures-io"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed"
+
+[[package]]
+name = "futures-macro"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.4",
+]
+
+[[package]]
+name = "futures-sink"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d"
+
+[[package]]
+name = "futures-task"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"
+
+[[package]]
+name = "futures-util"
+version = "0.3.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"
+dependencies = [
+ "futures-channel",
+ "futures-core",
+ "futures-io",
+ "futures-macro",
+ "futures-sink",
+ "futures-task",
+ "memchr",
+ "pin-project-lite",
+ "slab",
+]
+
+[[package]]
+name = "getrandom"
+version = "0.3.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "r-efi",
+ "wasip2",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.16.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
+dependencies = [
+ "foldhash",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.17.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
+
+[[package]]
+name = "indexmap"
+version = "2.14.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "07aa2048142242915a31d35844fb311e0e53fcca590c3a0a40dcf1b841fa09eb"
+dependencies = [
+ "equivalent",
+ "hashbrown 0.17.1",
+]
+
+[[package]]
+name = "itoa"
+version = "1.0.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
+
+[[package]]
+name = "js-sys"
+version = "0.3.104"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a"
+dependencies = [
+ "cfg-if",
+ "futures-util",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "langfuse-native"
+version = "0.0.0"
+dependencies = [
+ "metrics",
+ "metrics-exporter-dogstatsd",
+ "napi",
+ "napi-build",
+ "napi-derive",
+ "tracing",
+ "tracing-subscriber",
+]
+
+[[package]]
+name = "lazy_static"
+version = "1.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
+
+[[package]]
+name = "libc"
+version = "0.2.189"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
+
+[[package]]
+name = "libloading"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "754ca22de805bb5744484a5b151a9e1a8e837d5dc232c2d7d8c2e3492edc8b60"
+dependencies = [
+ "cfg-if",
+ "windows-link",
+]
+
+[[package]]
+name = "log"
+version = "0.4.34"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"
+
+[[package]]
+name = "matchers"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9"
+dependencies = [
+ "regex-automata",
+]
+
+[[package]]
+name = "memchr"
+version = "2.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"
+
+[[package]]
+name = "metrics"
+version = "0.24.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "89550ee9f79e88fef3119de263694973a8adb26c21d75322164fb8c493039fe2"
+dependencies = [
+ "portable-atomic",
+ "rapidhash",
+]
+
+[[package]]
+name = "metrics-exporter-dogstatsd"
+version = "0.9.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b4f39e912d07239992146dc617951ef78a909daec25f0b31c629767cf59f34bb"
+dependencies = [
+ "bytes",
+ "itoa",
+ "metrics",
+ "metrics-util",
+ "ryu",
+ "thiserror",
+ "tracing",
+]
+
+[[package]]
+name = "metrics-util"
+version = "0.20.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "96f8722f8562635f92f8ed992f26df0532266eb03d5202607c20c0d7e9745e13"
+dependencies = [
+ "aho-corasick",
+ "crossbeam-epoch",
+ "crossbeam-utils",
+ "hashbrown 0.16.1",
+ "indexmap",
+ "metrics",
+ "ordered-float",
+ "quanta",
+ "radix_trie",
+ "rand",
+ "rand_xoshiro",
+ "rapidhash",
+ "sketches-ddsketch",
+]
+
+[[package]]
+name = "napi"
+version = "3.12.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "58c5f4d5375213fdb7be2655e152386e82f026f9a5ba36a75556e11359aafe09"
+dependencies = [
+ "bitflags",
+ "ctor",
+ "futures",
+ "libc",
+ "napi-build",
+ "napi-sys",
+ "nohash-hasher",
+ "rustc-hash",
+]
+
+[[package]]
+name = "napi-build"
+version = "2.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "60fdf9b392c50e7c4170fa633bd909490ed7835cea4c046776d1a4dd8d2ae0ab"
+
+[[package]]
+name = "napi-derive"
+version = "3.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0fa55ea69990c90b888e9e77044410e304ce7f35de599dc6d0b5c1923d2e59af"
+dependencies = [
+ "convert_case",
+ "ctor",
+ "napi-derive-backend",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "napi-derive-backend"
+version = "6.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "df4056ac7c18e4438ccf0edaed4340ca0d269278c8ec19284f7b23cb039fd0ae"
+dependencies = [
+ "convert_case",
+ "proc-macro2",
+ "quote",
+ "semver",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "napi-sys"
+version = "3.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85fbf1fa9f1babfe396d74bbbf52b3643770243e8f5b0b46715d4caf7f0dfc9a"
+dependencies = [
+ "libloading",
+]
+
+[[package]]
+name = "nibble_vec"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43"
+dependencies = [
+ "smallvec",
+]
+
+[[package]]
+name = "nohash-hasher"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"
+
+[[package]]
+name = "nu-ansi-term"
+version = "0.50.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
+dependencies = [
+ "windows-sys",
+]
+
+[[package]]
+name = "num-traits"
+version = "0.2.19"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
+name = "once_cell"
+version = "1.21.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"
+
+[[package]]
+name = "ordered-float"
+version = "5.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8c7c9e0d9b23589f26070720bac724174bfec1083e82f7854cdd0267518343c0"
+dependencies = [
+ "num-traits",
+]
+
+[[package]]
+name = "pin-project-lite"
+version = "0.2.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
+
+[[package]]
+name = "portable-atomic"
+version = "1.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"
+
+[[package]]
+name = "ppv-lite86"
+version = "0.2.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9"
+dependencies = [
+ "zerocopy",
+]
+
+[[package]]
+name = "proc-macro2"
+version = "1.0.107"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "quanta"
+version = "0.12.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f3ab5a9d756f0d97bdc89019bd2e4ea098cf9cde50ee7564dde6b81ccc8f06c7"
+dependencies = [
+ "crossbeam-utils",
+ "libc",
+ "once_cell",
+ "raw-cpuid",
+ "wasi",
+ "web-sys",
+ "winapi",
+]
+
+[[package]]
+name = "quote"
+version = "1.0.47"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"
+dependencies = [
+ "proc-macro2",
+]
+
+[[package]]
+name = "r-efi"
+version = "5.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
+
+[[package]]
+name = "radix_trie"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd"
+dependencies = [
+ "endian-type",
+ "nibble_vec",
+]
+
+[[package]]
+name = "rand"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9ef1d0d795eb7d84685bca4f72f3649f064e6641543d3a8c415898726a57b41"
+dependencies = [
+ "rand_chacha",
+ "rand_core",
+]
+
+[[package]]
+name = "rand_chacha"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb"
+dependencies = [
+ "ppv-lite86",
+ "rand_core",
+]
+
+[[package]]
+name = "rand_core"
+version = "0.9.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
+dependencies = [
+ "getrandom",
+]
+
+[[package]]
+name = "rand_xoshiro"
+version = "0.7.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f703f4665700daf5512dcca5f43afa6af89f09db47fb56be587f80636bda2d41"
+dependencies = [
+ "rand_core",
+]
+
+[[package]]
+name = "rapidhash"
+version = "4.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5da7e78a036ce858e8d55b7e7dc8ba3a88b78350fd2155d3591bbd966b58589e"
+dependencies = [
+ "rustversion",
+]
+
+[[package]]
+name = "raw-cpuid"
+version = "11.6.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186"
+dependencies = [
+ "bitflags",
+]
+
+[[package]]
+name = "regex-automata"
+version = "0.4.18"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2"
+dependencies = [
+ "aho-corasick",
+ "memchr",
+ "regex-syntax",
+]
+
+[[package]]
+name = "regex-syntax"
+version = "0.8.11"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"
+
+[[package]]
+name = "rustc-hash"
+version = "2.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
+
+[[package]]
+name = "rustversion"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"
+
+[[package]]
+name = "ryu"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f"
+
+[[package]]
+name = "semver"
+version = "1.0.28"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
+
+[[package]]
+name = "serde"
+version = "1.0.229"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
+dependencies = [
+ "serde_core",
+]
+
+[[package]]
+name = "serde_core"
+version = "1.0.229"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
+dependencies = [
+ "serde_derive",
+]
+
+[[package]]
+name = "serde_derive"
+version = "1.0.229"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.4",
+]
+
+[[package]]
+name = "serde_json"
+version = "1.0.151"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
+dependencies = [
+ "itoa",
+ "memchr",
+ "serde",
+ "serde_core",
+ "zmij",
+]
+
+[[package]]
+name = "sharded-slab"
+version = "0.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6"
+dependencies = [
+ "lazy_static",
+]
+
+[[package]]
+name = "sketches-ddsketch"
+version = "0.3.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c6f73aeb92d671e0cc4dca167e59b2deb6387c375391bc99ee743f326994a2b"
+
+[[package]]
+name = "slab"
+version = "0.4.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"
+
+[[package]]
+name = "smallvec"
+version = "1.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b9be42f50aa861c555654aa3a37f52f4b1074bacf4e48fe0ef7fa584e80f1f0f"
+
+[[package]]
+name = "syn"
+version = "2.0.119"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "syn"
+version = "3.0.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6275cddf4610d1775e6d1fe9469b2e77d0f39fd98fb7450901b821e0c53649f"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "unicode-ident",
+]
+
+[[package]]
+name = "thiserror"
+version = "2.0.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f"
+dependencies = [
+ "thiserror-impl",
+]
+
+[[package]]
+name = "thiserror-impl"
+version = "2.0.20"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 3.0.4",
+]
+
+[[package]]
+name = "thread_local"
+version = "1.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ad99c4c6d32803332c548b1af0540b357b3f5fc0be8f6c6bfe8b2e6ae784070"
+dependencies = [
+ "cfg-if",
+]
+
+[[package]]
+name = "tracing"
+version = "0.1.44"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
+dependencies = [
+ "pin-project-lite",
+ "tracing-attributes",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-attributes"
+version = "0.1.31"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "tracing-core"
+version = "0.1.36"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
+dependencies = [
+ "once_cell",
+ "valuable",
+]
+
+[[package]]
+name = "tracing-log"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3"
+dependencies = [
+ "log",
+ "once_cell",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-serde"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1"
+dependencies = [
+ "serde",
+ "tracing-core",
+]
+
+[[package]]
+name = "tracing-subscriber"
+version = "0.3.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319"
+dependencies = [
+ "matchers",
+ "nu-ansi-term",
+ "once_cell",
+ "regex-automata",
+ "serde",
+ "serde_json",
+ "sharded-slab",
+ "smallvec",
+ "thread_local",
+ "tracing",
+ "tracing-core",
+ "tracing-log",
+ "tracing-serde",
+]
+
+[[package]]
+name = "unicode-ident"
+version = "1.0.24"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
+
+[[package]]
+name = "unicode-segmentation"
+version = "1.13.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"
+
+[[package]]
+name = "valuable"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65"
+
+[[package]]
+name = "wasi"
+version = "0.11.1+wasi-snapshot-preview1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
+
+[[package]]
+name = "wasip2"
+version = "1.0.4+wasi-0.2.12"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487"
+dependencies = [
+ "wit-bindgen",
+]
+
+[[package]]
+name = "wasm-bindgen"
+version = "0.2.127"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70"
+dependencies = [
+ "cfg-if",
+ "once_cell",
+ "rustversion",
+ "wasm-bindgen-macro",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-macro"
+version = "0.2.127"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1"
+dependencies = [
+ "quote",
+ "wasm-bindgen-macro-support",
+]
+
+[[package]]
+name = "wasm-bindgen-macro-support"
+version = "0.2.127"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284"
+dependencies = [
+ "bumpalo",
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+ "wasm-bindgen-shared",
+]
+
+[[package]]
+name = "wasm-bindgen-shared"
+version = "0.2.127"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf"
+dependencies = [
+ "unicode-ident",
+]
+
+[[package]]
+name = "web-sys"
+version = "0.3.104"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c435338968042f4f59a557f690a253676d47ce13ceb55d70100e7facf6620a30"
+dependencies = [
+ "js-sys",
+ "wasm-bindgen",
+]
+
+[[package]]
+name = "winapi"
+version = "0.3.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
+dependencies = [
+ "winapi-i686-pc-windows-gnu",
+ "winapi-x86_64-pc-windows-gnu",
+]
+
+[[package]]
+name = "winapi-i686-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
+
+[[package]]
+name = "winapi-x86_64-pc-windows-gnu"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
+
+[[package]]
+name = "windows-link"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
+
+[[package]]
+name = "windows-sys"
+version = "0.61.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
+dependencies = [
+ "windows-link",
+]
+
+[[package]]
+name = "wit-bindgen"
+version = "0.57.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"
+
+[[package]]
+name = "zerocopy"
+version = "0.8.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb"
+dependencies = [
+ "zerocopy-derive",
+]
+
+[[package]]
+name = "zerocopy-derive"
+version = "0.8.56"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn 2.0.119",
+]
+
+[[package]]
+name = "zmij"
+version = "1.0.23"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
diff --git a/packages/native/Cargo.toml b/packages/native/Cargo.toml
new file mode 100644
index 0000000000..7e0dedf621
--- /dev/null
+++ b/packages/native/Cargo.toml
@@ -0,0 +1,26 @@
+[package]
+name = "langfuse-native"
+version = "0.0.0"
+edition = "2021"
+# napi-rs 3 needs at least Rust 1.88.
+rust-version = "1.88"
+license = "MIT"
+publish = false
+
+[lib]
+crate-type = ["cdylib"]
+
+[dependencies]
+metrics = "0.24"
+metrics-exporter-dogstatsd = "0.9"
+napi = { version = "3", default-features = false, features = ["napi9"] }
+napi-derive = "3"
+tracing = "0.1"
+tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
+
+[build-dependencies]
+napi-build = "2"
+
+[profile.release]
+lto = true
+strip = "symbols"
diff --git a/packages/native/README.md b/packages/native/README.md
new file mode 100644
index 0000000000..80b09f0f8d
--- /dev/null
+++ b/packages/native/README.md
@@ -0,0 +1,113 @@
+# @langfuse/native
+
+Rust code that the Langfuse worker calls in-process, packaged as a Node.js
+native addon with [napi-rs](https://napi.rs). The worker imports it like any
+other workspace package:
+
+```ts
+import { hello } from "@langfuse/native";
+```
+
+Today the addon exports a single hello-world function. It exists to put the
+build, packaging, and deployment pipeline for native code in place; real
+functionality lands on top of it.
+
+## Layout
+
+| Path | Purpose |
+| --------------------- | ---------------------------------------------------------------------------- |
+| `src/lib.rs` | Rust source. Every `#[napi]` item is exported to Node.js. |
+| `src/telemetry.rs` | Metrics and log setup shared by all native code; see Observability. |
+| `Cargo.toml` | Crate manifest (`cdylib`). `Cargo.lock` is committed. |
+| `build.rs` | napi-rs build hook. |
+| `rust-toolchain.toml` | Pinned compiler version, kept equal to the Rust shipped in `node:24-alpine`. |
+| `package.json` | npm package; `napi.binaryName` names the compiled `.node` file. |
+| `index.js` | Generated loader that picks the `.node` file for the current platform. |
+| `index.d.ts` | Generated TypeScript declarations, derived from the `#[napi]` signatures. |
+
+`index.js` and `index.d.ts` are regenerated by every build and committed so
+type checks and tooling work without a Rust toolchain. `*.node` binaries and
+`target/` are ignored.
+
+## Building
+
+Install Rust through [rustup](https://rustup.rs), the same prerequisite the AI
+gateway already has. `rust-toolchain.toml` pins this crate's exact version
+(the same one the gateway uses, in a separate file so either can move) and
+pulls in `clippy` and `rustfmt`; rustup installs it on first use inside this
+directory. `napi build` then drives `cargo` and regenerates `index.js` and
+`index.d.ts`.
+
+Run from the repo root:
+
+```bash
+pnpm --filter @langfuse/native run build # release build for the current platform
+pnpm --filter @langfuse/native run build:debug # unoptimised build
+pnpm --filter @langfuse/native run lint # cargo fmt --check && cargo clippy -D warnings
+```
+
+`pnpm run dev`, `pnpm run build`, `pnpm run test`, and the worker's
+`typecheck`/`lint` tasks build this package first through turbo, so the addon
+is always present when the worker starts or its tests run. A direct
+`pnpm --filter worker run test` bypasses turbo and needs a prior build.
+
+## Adding a function
+
+1. Add a `#[napi]` function to `src/lib.rs`. See the
+ [napi-rs type mapping](https://napi.rs/docs/concepts/values) for how Rust
+ types appear in JavaScript. Report through `metrics::counter!` and friends
+ and `tracing::info!` and friends; never return values for Node to record.
+2. Run the build. It regenerates `index.d.ts`; commit that change.
+3. Import it from `@langfuse/native` where the worker needs it and cover the
+ behaviour with a worker test (`worker/src/__tests__/nativeHello.unit.test.ts`
+ shows how to capture metrics and logs).
+
+## How it ships
+
+`worker/Dockerfile` copies the toolchain pinned in `rust-toolchain.toml` from
+the official `rust:<version>-alpine` image into the builder stage;
+`turbo run build --filter=worker...` compiles the addon for musl, and
+`pnpm deploy` copies the `.node` file into the runtime image next to the
+loader. Each architecture builds on a native runner, so no cross
+compilation is involved. The runtime image gains only the compiled library.
+CI jobs that build the worker need no extra setup: rustup on the runner
+installs the pinned toolchain the first time `cargo` runs in this directory.
+The Rust lint runs as its own step in the lint job, outside the ESLint turbo
+invocation, which forwards flags cargo does not understand.
+
+## Observability
+
+Native code reports for itself. Nothing is handed back to Node to record, so
+the same code will work unchanged in a standalone Rust process later.
+
+- **Metrics** go through the [`metrics`](https://docs.rs/metrics) facade. At
+ init a [DogStatsD exporter](https://docs.rs/metrics-exporter-dogstatsd)
+ aggregates them in-process and flushes UDP datagrams to the Datadog Agent
+ that dd-trace already talks to from Node: `DD_DOGSTATSD_HOST` (or
+ `DD_AGENT_HOST`) on `DD_DOGSTATSD_PORT`, default `localhost:8125`. Every
+ metric carries the same global tags dd-trace adds: `env`, `service`,
+ `version` from `DD_ENV`, `DD_SERVICE` (or `OTEL_SERVICE_NAME`), `DD_VERSION`,
+ plus `DD_TAGS`. This is an in-process client library, not a sidecar.
+- **Logs** go through the [`tracing`](https://docs.rs/tracing) facade to
+ stdout, honouring `LANGFUSE_LOG_LEVEL` and `LANGFUSE_LOG_FORMAT` like the
+ winston logger, so they land in the same container log stream. `RUST_LOG`
+ overrides the level with tracing directives. The exporter's own send
+ errors are silenced by default because they fire on every flush wherever
+ no agent runs; `RUST_LOG=info,metrics_exporter_dogstatsd=error` shows them.
+- **Init.** The worker calls `initTelemetry()` once in `initializeWorker`; it
+ is idempotent. Worker startup and telemetry setup are separate signals: a
+ missing or broken addon stops the worker (the startup `hello()` call is
+ unguarded), while an init failure (unparsable or unresolvable agent
+ address) is reported through the worker's logger and the
+ `langfuse.native.telemetry_init_failed` counter and the worker keeps
+ running without native metrics.
+
+The hello-world function increments `langfuse.native.hello_calls`, tagged
+`source:startup` once per worker boot and `source:health` once per
+`/api/health` probe, and writes a debug-level log line, so the probes add no
+log volume at the default level.
+
+Known gaps: dd-trace appends the container id to each datagram so the Agent can
+add pod tags, which the Rust exporter does not do yet; Rust log lines carry
+upper-case levels (`INFO`) where winston writes `info`; metrics that Node
+mirrors to CloudWatch for autoscaling stay in Node.
diff --git a/packages/native/build.rs b/packages/native/build.rs
new file mode 100644
index 0000000000..0f1b01002b
--- /dev/null
+++ b/packages/native/build.rs
@@ -0,0 +1,3 @@
+fn main() {
+ napi_build::setup();
+}
diff --git a/packages/native/index.d.ts b/packages/native/index.d.ts
new file mode 100644
index 0000000000..2a0295473d
--- /dev/null
+++ b/packages/native/index.d.ts
@@ -0,0 +1,29 @@
+/* auto-generated by NAPI-RS */
+/* eslint-disable */
+/**
+ * Hello-world entry point. It proves that the worker can load and call the
+ * addon and that native code reports through the same telemetry as the rest
+ * of the worker: one increment of the `langfuse.native.hello_calls` counter
+ * tagged with `source`, plus a debug-level log line. The worker calls this on
+ * every health probe, so the log line stays below the default level.
+ */
+export declare function hello(source: string): void
+
+/**
+ * Installs the metrics exporter and the log subscriber for native code. Call
+ * it once at process start; later calls return the first call's outcome.
+ */
+export declare function initTelemetry(options?: TelemetryOptions | undefined | null): void
+
+/**
+ * Overrides for [`init_telemetry`]. Everything left unset comes from the
+ * environment: `DD_DOGSTATSD_HOST` / `DD_AGENT_HOST` and `DD_DOGSTATSD_PORT`
+ * for the agent, `DD_ENV`, `DD_SERVICE`, `DD_VERSION`, `DD_TAGS` for global
+ * tags, `LANGFUSE_LOG_LEVEL`, `LANGFUSE_LOG_FORMAT` and `RUST_LOG` for logs.
+ */
+export interface TelemetryOptions {
+ /** DogStatsD endpoint as `host:port`. */
+ dogstatsdAddress?: string
+ /** How often aggregated metrics are flushed to the agent, in milliseconds. */
+ flushIntervalMs?: number
+}
diff --git a/packages/native/index.js b/packages/native/index.js
new file mode 100644
index 0000000000..9ed5508d47
--- /dev/null
+++ b/packages/native/index.js
@@ -0,0 +1,704 @@
+// prettier-ignore
+/* eslint-disable */
+// @ts-nocheck
+/* auto-generated by NAPI-RS */
+
+const { readFileSync } = require('fs')
+let nativeBinding = null
+const loadErrors = []
+
+const isMusl = () => {
+ let musl = false
+ if (process.platform === 'linux') {
+ musl = isMuslFromFilesystem()
+ if (musl === null) {
+ musl = isMuslFromReport()
+ }
+ if (musl === null) {
+ musl = isMuslFromChildProcess()
+ }
+ }
+ return musl
+}
+
+const isFileMusl = (f) => f.includes('libc.musl-') || f.includes('ld-musl-')
+
+const isMuslFromFilesystem = () => {
+ try {
+ return readFileSync('/usr/bin/ldd', 'utf-8').includes('musl')
+ } catch {
+ return null
+ }
+}
+
+const isMuslFromReport = () => {
+ let report = null
+ if (process.report && typeof process.report.getReport === 'function') {
+ process.report.excludeNetwork = true
+ report = process.report.getReport()
+ }
+ if (!report) {
+ return null
+ }
+ if (report.header && report.header.glibcVersionRuntime) {
+ return false
+ }
+ if (Array.isArray(report.sharedObjects)) {
+ if (report.sharedObjects.some(isFileMusl)) {
+ return true
+ }
+ }
+ return false
+}
+
+const isMuslFromChildProcess = () => {
+ try {
+ return require('child_process').execSync('ldd --version', { encoding: 'utf8' }).includes('musl')
+ } catch (e) {
+ // If we reach this case, we don't know if the system is musl or not, so is better to just fallback to false
+ return false
+ }
+}
+
+function requireNative() {
+ if (process.env.NAPI_RS_NATIVE_LIBRARY_PATH) {
+ try {
+ return require(process.env.NAPI_RS_NATIVE_LIBRARY_PATH);
+ } catch (err) {
+ loadErrors.push(err)
+ }
+ } else if (process.platform === 'android') {
+ if (process.arch === 'arm64') {
+ try {
+ return require('./langfuse-native.android-arm64.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-android-arm64')
+ const bindingPackageVersion = require('@langfuse/native-android-arm64/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else if (process.arch === 'arm') {
+ try {
+ return require('./langfuse-native.android-arm-eabi.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-android-arm-eabi')
+ const bindingPackageVersion = require('@langfuse/native-android-arm-eabi/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else {
+ loadErrors.push(new Error(`Unsupported architecture on Android ${process.arch}`))
+ }
+ } else if (process.platform === 'win32') {
+ if (process.arch === 'x64') {
+ if ((process.config && process.config.variables && process.config.variables.shlib_suffix === 'dll.a') || (process.config && process.config.variables && process.config.variables.node_target_type === 'shared_library')) {
+ try {
+ return require('./langfuse-native.win32-x64-gnu.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-win32-x64-gnu')
+ const bindingPackageVersion = require('@langfuse/native-win32-x64-gnu/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else {
+ try {
+ return require('./langfuse-native.win32-x64-msvc.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-win32-x64-msvc')
+ const bindingPackageVersion = require('@langfuse/native-win32-x64-msvc/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ }
+ } else if (process.arch === 'ia32') {
+ try {
+ return require('./langfuse-native.win32-ia32-msvc.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-win32-ia32-msvc')
+ const bindingPackageVersion = require('@langfuse/native-win32-ia32-msvc/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else if (process.arch === 'arm64') {
+ try {
+ return require('./langfuse-native.win32-arm64-msvc.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-win32-arm64-msvc')
+ const bindingPackageVersion = require('@langfuse/native-win32-arm64-msvc/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else {
+ loadErrors.push(new Error(`Unsupported architecture on Windows: ${process.arch}`))
+ }
+ } else if (process.platform === 'darwin') {
+ try {
+ return require('./langfuse-native.darwin-universal.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-darwin-universal')
+ const bindingPackageVersion = require('@langfuse/native-darwin-universal/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ if (process.arch === 'x64') {
+ try {
+ return require('./langfuse-native.darwin-x64.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-darwin-x64')
+ const bindingPackageVersion = require('@langfuse/native-darwin-x64/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else if (process.arch === 'arm64') {
+ try {
+ return require('./langfuse-native.darwin-arm64.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-darwin-arm64')
+ const bindingPackageVersion = require('@langfuse/native-darwin-arm64/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else {
+ loadErrors.push(new Error(`Unsupported architecture on macOS: ${process.arch}`))
+ }
+ } else if (process.platform === 'freebsd') {
+ if (process.arch === 'x64') {
+ try {
+ return require('./langfuse-native.freebsd-x64.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-freebsd-x64')
+ const bindingPackageVersion = require('@langfuse/native-freebsd-x64/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else if (process.arch === 'arm64') {
+ try {
+ return require('./langfuse-native.freebsd-arm64.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-freebsd-arm64')
+ const bindingPackageVersion = require('@langfuse/native-freebsd-arm64/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else {
+ loadErrors.push(new Error(`Unsupported architecture on FreeBSD: ${process.arch}`))
+ }
+ } else if (process.platform === 'linux') {
+ if (process.arch === 'x64') {
+ if (isMusl()) {
+ try {
+ return require('./langfuse-native.linux-x64-musl.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-linux-x64-musl')
+ const bindingPackageVersion = require('@langfuse/native-linux-x64-musl/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else {
+ try {
+ return require('./langfuse-native.linux-x64-gnu.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-linux-x64-gnu')
+ const bindingPackageVersion = require('@langfuse/native-linux-x64-gnu/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ }
+ } else if (process.arch === 'arm64') {
+ if (isMusl()) {
+ try {
+ return require('./langfuse-native.linux-arm64-musl.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-linux-arm64-musl')
+ const bindingPackageVersion = require('@langfuse/native-linux-arm64-musl/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else {
+ try {
+ return require('./langfuse-native.linux-arm64-gnu.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-linux-arm64-gnu')
+ const bindingPackageVersion = require('@langfuse/native-linux-arm64-gnu/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ }
+ } else if (process.arch === 'arm') {
+ if (isMusl()) {
+ try {
+ return require('./langfuse-native.linux-arm-musleabihf.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-linux-arm-musleabihf')
+ const bindingPackageVersion = require('@langfuse/native-linux-arm-musleabihf/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else {
+ try {
+ return require('./langfuse-native.linux-arm-gnueabihf.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-linux-arm-gnueabihf')
+ const bindingPackageVersion = require('@langfuse/native-linux-arm-gnueabihf/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ }
+ } else if (process.arch === 'loong64') {
+ if (isMusl()) {
+ try {
+ return require('./langfuse-native.linux-loong64-musl.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-linux-loong64-musl')
+ const bindingPackageVersion = require('@langfuse/native-linux-loong64-musl/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else {
+ try {
+ return require('./langfuse-native.linux-loong64-gnu.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-linux-loong64-gnu')
+ const bindingPackageVersion = require('@langfuse/native-linux-loong64-gnu/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ }
+ } else if (process.arch === 'riscv64') {
+ if (isMusl()) {
+ try {
+ return require('./langfuse-native.linux-riscv64-musl.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-linux-riscv64-musl')
+ const bindingPackageVersion = require('@langfuse/native-linux-riscv64-musl/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else {
+ try {
+ return require('./langfuse-native.linux-riscv64-gnu.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-linux-riscv64-gnu')
+ const bindingPackageVersion = require('@langfuse/native-linux-riscv64-gnu/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ }
+ } else if (process.arch === 'ppc64') {
+ try {
+ return require('./langfuse-native.linux-ppc64-gnu.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-linux-ppc64-gnu')
+ const bindingPackageVersion = require('@langfuse/native-linux-ppc64-gnu/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else if (process.arch === 's390x') {
+ try {
+ return require('./langfuse-native.linux-s390x-gnu.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-linux-s390x-gnu')
+ const bindingPackageVersion = require('@langfuse/native-linux-s390x-gnu/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else {
+ loadErrors.push(new Error(`Unsupported architecture on Linux: ${process.arch}`))
+ }
+ } else if (process.platform === 'openharmony') {
+ if (process.arch === 'arm64') {
+ try {
+ return require('./langfuse-native.openharmony-arm64.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-openharmony-arm64')
+ const bindingPackageVersion = require('@langfuse/native-openharmony-arm64/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else if (process.arch === 'x64') {
+ try {
+ return require('./langfuse-native.openharmony-x64.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-openharmony-x64')
+ const bindingPackageVersion = require('@langfuse/native-openharmony-x64/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else if (process.arch === 'arm') {
+ try {
+ return require('./langfuse-native.openharmony-arm.node')
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ try {
+ const binding = require('@langfuse/native-openharmony-arm')
+ const bindingPackageVersion = require('@langfuse/native-openharmony-arm/package.json').version
+ if (bindingPackageVersion !== '0.0.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ throw new Error(`Native binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ return binding
+ } catch (e) {
+ loadErrors.push(e)
+ }
+ } else {
+ loadErrors.push(new Error(`Unsupported architecture on OpenHarmony: ${process.arch}`))
+ }
+ } else {
+ loadErrors.push(new Error(`Unsupported OS: ${process.platform}, architecture: ${process.arch}`))
+ }
+}
+
+function createLoadErrorChain(errors) {
+ return errors.reduce((previous, current) => {
+ let message
+ try {
+ message =
+ current && typeof current.message === 'string'
+ ? current.message
+ : String(current)
+ } catch {
+ message = 'Unknown error'
+ }
+ const error = new Error(message)
+ error.cause = previous
+ return error
+ }, null)
+}
+
+// NAPI_RS_FORCE_WASI is a tri-state flag:
+// unset / any other value → native binding preferred, WASI is only a fallback
+// 'true' → prefer WASI, but retain native as a lazy fallback
+// 'error' → require WASI without initializing a native fallback
+// Treating any non-empty string as truthy (the historical behavior) meant
+// NAPI_RS_FORCE_WASI=false, NAPI_RS_FORCE_WASI=0, etc. inadvertently triggered
+// the WASI path, causing ENOENT for packages shipped without a .wasi.cjs file.
+//
+// NAPI_RS_WASI_FLAVOR selects one exact generated flavor and implies strict
+// WASI loading. It never crosses into another flavor or falls back to native.
+const __napiWasiFlavors = ["wasm32-wasi"]
+const __napiWasiFlavor = process.env.NAPI_RS_WASI_FLAVOR
+const __napiWasiFlavorRequested =
+ typeof __napiWasiFlavor === 'string' && __napiWasiFlavor.length > 0
+if (
+ __napiWasiFlavorRequested &&
+ __napiWasiFlavors.indexOf(__napiWasiFlavor) === -1
+) {
+ throw new Error(
+ 'Unsupported WASI flavor "' +
+ __napiWasiFlavor +
+ '". Available flavors: ' +
+ __napiWasiFlavors.join(', '),
+ )
+}
+const forceWasiError = process.env.NAPI_RS_FORCE_WASI === 'error'
+const forceWasi =
+ process.env.NAPI_RS_FORCE_WASI === 'true' ||
+ forceWasiError ||
+ __napiWasiFlavorRequested
+
+if (!forceWasi) {
+ nativeBinding = requireNative()
+}
+
+if (!nativeBinding || forceWasi) {
+ let wasiBinding = null
+ let wasiBindingLoaded = false
+ const wasiBindingErrors = []
+ const __napiWasiResolveCandidate = (specifier, isPackage, localArtifacts) => {
+ try {
+ require.resolve(specifier)
+ } catch (resolveError) {
+ if (!resolveError || resolveError.code !== 'MODULE_NOT_FOUND') {
+ throw resolveError
+ }
+ if (isPackage) {
+ try {
+ require.resolve(specifier + '/package.json')
+ } catch (packageError) {
+ if (packageError && packageError.code === 'MODULE_NOT_FOUND') {
+ return resolveError
+ }
+ // An exports restriction proves the package exists even when its
+ // package.json is not public. Preserve the root resolution failure.
+ throw resolveError
+ }
+ // The package exists but its main/export target is broken.
+ throw resolveError
+ }
+ return resolveError
+ }
+ if (localArtifacts) {
+ let artifactError = null
+ for (let i = 0; i < localArtifacts.length; i++) {
+ try {
+ require.resolve(localArtifacts[i])
+ return null
+ } catch (resolveError) {
+ if (!resolveError || resolveError.code !== 'MODULE_NOT_FOUND') {
+ throw resolveError
+ }
+ artifactError = resolveError
+ }
+ }
+ return artifactError
+ }
+ return null
+ }
+ if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === "wasm32-wasi")) {
+ let candidateError = null
+ let candidateFailed = false
+ try {
+ candidateError = __napiWasiResolveCandidate('./langfuse-native.wasi.cjs', false, ["./langfuse-native.wasm32-wasi.debug.wasm","./langfuse-native.wasm32-wasi.wasm"])
+ candidateFailed = candidateError !== null
+ if (!candidateFailed) {
+ wasiBinding = require('./langfuse-native.wasi.cjs')
+ nativeBinding = wasiBinding
+ wasiBindingLoaded = true
+ }
+ } catch (err) {
+ candidateError = err
+ candidateFailed = true
+ }
+ if (candidateFailed) {
+ wasiBindingErrors.push(candidateError)
+ loadErrors.push(candidateError)
+ }
+ }
+ if (!wasiBindingLoaded && (!__napiWasiFlavorRequested || __napiWasiFlavor === "wasm32-wasi")) {
+ let candidateError = null
+ let candidateFailed = false
+ try {
+ candidateError = __napiWasiResolveCandidate('@langfuse/native-wasm32-wasi', true, undefined)
+ candidateFailed = candidateError !== null
+ if (!candidateFailed) {
+ if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
+ const bindingPackageVersion = require('@langfuse/native-wasm32-wasi/package.json').version
+ if (bindingPackageVersion !== '0.0.0') {
+ throw new Error(`WASI binding package version mismatch, expected 0.0.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
+ }
+ }
+ wasiBinding = require('@langfuse/native-wasm32-wasi')
+ nativeBinding = wasiBinding
+ wasiBindingLoaded = true
+ }
+ } catch (err) {
+ candidateError = err
+ candidateFailed = true
+ }
+ if (candidateFailed) {
+ wasiBindingErrors.push(candidateError)
+ loadErrors.push(candidateError)
+ }
+ }
+ if (
+ !wasiBindingLoaded &&
+ forceWasi &&
+ !forceWasiError &&
+ !__napiWasiFlavorRequested
+ ) {
+ nativeBinding = requireNative()
+ }
+ if ((forceWasiError || __napiWasiFlavorRequested) && !wasiBindingLoaded) {
+ const error = new Error(
+ __napiWasiFlavorRequested
+ ? 'WASI binding for flavor "' + __napiWasiFlavor + '" not found'
+ : 'WASI binding not found and NAPI_RS_FORCE_WASI is set to error',
+ )
+ error.cause = createLoadErrorChain(wasiBindingErrors)
+ throw error
+ }
+}
+
+if (!nativeBinding) {
+ if (loadErrors.length > 0) {
+ const error = new Error(
+ `Cannot find native binding. ` +
+ `npm has a bug related to optional dependencies (https://github.com/npm/cli/issues/4828). ` +
+ 'Please try `npm i` again after removing both package-lock.json and node_modules directory.',
+ )
+ // assign instead of the `new Error(message, { cause })` options form,
+ // which Node < 16.9 silently ignores
+ error.cause = createLoadErrorChain(loadErrors)
+ throw error
+ }
+ throw new Error(`Failed to load native binding`)
+}
+
+module.exports = nativeBinding
+module.exports.hello = nativeBinding.hello
+module.exports.initTelemetry = nativeBinding.initTelemetry
diff --git a/packages/native/package.json b/packages/native/package.json
new file mode 100644
index 0000000000..1c56e9977b
--- /dev/null
+++ b/packages/native/package.json
@@ -0,0 +1,37 @@
+{
+ "name": "@langfuse/native",
+ "version": "0.0.0",
+ "description": "Rust native addon (napi-rs) loaded by the Langfuse worker",
+ "license": "MIT",
+ "private": true,
+ "main": "index.js",
+ "types": "index.d.ts",
+ "files": [
+ "index.js",
+ "index.d.ts",
+ "*.node"
+ ],
+ "engines": {
+ "node": "24"
+ },
+ "scripts": {
+ "build": "napi build --platform --release",
+ "build:debug": "napi build --platform",
+ "lint": "cargo fmt --check && cargo clippy --all-targets -- -D warnings",
+ "lint:fix": "cargo fmt && cargo clippy --all-targets --fix --allow-dirty -- -D warnings"
+ },
+ "napi": {
+ "binaryName": "langfuse-native",
+ "targets": [
+ "x86_64-unknown-linux-musl",
+ "aarch64-unknown-linux-musl",
+ "x86_64-unknown-linux-gnu",
+ "aarch64-unknown-linux-gnu",
+ "aarch64-apple-darwin",
+ "x86_64-apple-darwin"
+ ]
+ },
+ "devDependencies": {
+ "@napi-rs/cli": "3.8.6"
+ }
+}
diff --git a/packages/native/rust-toolchain.toml b/packages/native/rust-toolchain.toml
new file mode 100644
index 0000000000..612a791279
--- /dev/null
+++ b/packages/native/rust-toolchain.toml
@@ -0,0 +1,8 @@
+# Same Rust version as ai-gateway/rust-toolchain.toml so the repository starts
+# out on one compiler; the two files stay separate so either crate can move on
+# its own. worker/Dockerfile copies this exact version from the official
+# `rust:<version>-alpine` image, so bump the two together.
+[toolchain]
+channel = "1.98.0"
+components = ["clippy", "rustfmt"]
+profile = "minimal"
diff --git a/packages/native/src/lib.rs b/packages/native/src/lib.rs
new file mode 100644
index 0000000000..cd5701de5a
--- /dev/null
+++ b/packages/native/src/lib.rs
@@ -0,0 +1,51 @@
+//! Native addon for the Langfuse worker, built with napi-rs.
+//!
+//! Functions annotated with `#[napi]` are exported to Node.js; `napi build`
+//! derives `index.d.ts` from their signatures. Native code reports through the
+//! `metrics` and `tracing` facades set up in [`telemetry`]; it never hands
+//! values back for Node to record.
+
+mod telemetry;
+
+use std::time::Duration;
+
+use napi::bindgen_prelude::*;
+use napi_derive::napi;
+
+/// Overrides for [`init_telemetry`]. Everything left unset comes from the
+/// environment: `DD_DOGSTATSD_HOST` / `DD_AGENT_HOST` and `DD_DOGSTATSD_PORT`
+/// for the agent, `DD_ENV`, `DD_SERVICE`, `DD_VERSION`, `DD_TAGS` for global
+/// tags, `LANGFUSE_LOG_LEVEL`, `LANGFUSE_LOG_FORMAT` and `RUST_LOG` for logs.
+#[napi(object)]
+#[derive(Default)]
+pub struct TelemetryOptions {
+ /// DogStatsD endpoint as `host:port`.
+ pub dogstatsd_address: Option<String>,
+ /// How often aggregated metrics are flushed to the agent, in milliseconds.
+ pub flush_interval_ms: Option<u32>,
+}
+
+/// Installs the metrics exporter and the log subscriber for native code. Call
+/// it once at process start; later calls return the first call's outcome.
+#[napi]
+pub fn init_telemetry(options: Option<TelemetryOptions>) -> Result<()> {
+ let options = options.unwrap_or_default();
+ telemetry::init(telemetry::Config {
+ dogstatsd_address: options.dogstatsd_address,
+ flush_interval: options
+ .flush_interval_ms
+ .map(|ms| Duration::from_millis(u64::from(ms))),
+ })
+ .map_err(|message| Error::new(Status::GenericFailure, message))
+}
+
+/// Hello-world entry point. It proves that the worker can load and call the
+/// addon and that native code reports through the same telemetry as the rest
+/// of the worker: one increment of the `langfuse.native.hello_calls` counter
+/// tagged with `source`, plus a debug-level log line. The worker calls this on
+/// every health probe, so the log line stays below the default level.
+#[napi]
+pub fn hello(source: String) {
+ tracing::debug!(source, "hello from the native addon");
+ metrics::counter!("langfuse.native.hello_calls", "source" => source).increment(1);
+}
diff --git a/packages/native/src/telemetry.rs b/packages/native/src/telemetry.rs
new file mode 100644
index 0000000000..71b04fbc37
--- /dev/null
+++ b/packages/native/src/telemetry.rs
@@ -0,0 +1,150 @@
+//! Telemetry for native code.
+//!
+//! Metrics go through the [`metrics`] facade to a DogStatsD exporter that
+//! talks to the same Datadog Agent dd-trace uses on the Node side, and logs go
+//! through [`tracing`] to stdout in the shape of the worker's winston logger.
+//! Both are configured from the environment variables dd-trace and the Node
+//! logger already read, so Rust and Node code report to the same places with
+//! the same tags. Nothing is handed back to Node to record.
+
+use std::env;
+use std::sync::OnceLock;
+use std::time::Duration;
+
+use metrics::Label;
+use metrics_exporter_dogstatsd::DogStatsDBuilder;
+use tracing_subscriber::EnvFilter;
+
+/// Overrides for values that otherwise come from the environment.
+#[derive(Debug, Clone, Default)]
+pub struct Config {
+ /// DogStatsD endpoint as `host:port`.
+ pub dogstatsd_address: Option<String>,
+ /// How often aggregated metrics are flushed to the agent.
+ pub flush_interval: Option<Duration>,
+}
+
+static INIT: OnceLock<Result<(), String>> = OnceLock::new();
+
+/// Installs the log subscriber and the metrics exporter once per process.
+/// Later calls return the outcome of the first one.
+pub fn init(config: Config) -> Result<(), String> {
+ INIT.get_or_init(|| {
+ init_logging();
+ init_metrics(&config)
+ })
+ .clone()
+}
+
+fn init_logging() {
+ // RUST_LOG takes precedence for fine-grained directives; otherwise map the
+ // worker's winston level onto tracing's. The exporter logs an error for
+ // every flush the agent does not accept, which is constant noise wherever
+ // no agent runs (local development, tests), so its target is silenced by
+ // default; dd-trace's own client is silent in the same situation.
+ let filter = EnvFilter::try_from_env("RUST_LOG").unwrap_or_else(|_| {
+ let level = tracing_level_from_winston(&env_or_empty("LANGFUSE_LOG_LEVEL"));
+ EnvFilter::new(format!("{level},metrics_exporter_dogstatsd=off"))
+ });
+ let builder = tracing_subscriber::fmt()
+ .with_env_filter(filter)
+ .with_writer(std::io::stdout)
+ .with_ansi(false);
+ // try_init only fails when a global subscriber already exists, in which
+ // case that one keeps receiving the events.
+ let _ = if env_or_empty("LANGFUSE_LOG_FORMAT") == "json" {
+ builder
+ .json()
+ .flatten_event(true)
+ .with_current_span(false)
+ .with_span_list(false)
+ .try_init()
+ } else {
+ builder.try_init()
+ };
+}
+
+/// Maps winston's npm levels (error, warn, info, http, verbose, debug, silly)
+/// onto tracing's five.
+fn tracing_level_from_winston(level: &str) -> &'static str {
+ match level.trim().to_ascii_lowercase().as_str() {
+ "error" => "error",
+ "warn" => "warn",
+ "http" | "verbose" | "debug" => "debug",
+ "silly" => "trace",
+ _ => "info",
+ }
+}
+
+fn init_metrics(config: &Config) -> Result<(), String> {
+ let address = config
+ .dogstatsd_address
+ .clone()
+ .unwrap_or_else(dogstatsd_address_from_env);
+ let mut builder = DogStatsDBuilder::default()
+ .with_remote_address(&address)
+ .map_err(|error| format!("invalid DogStatsD address {address}: {error}"))?
+ .with_global_labels(global_labels_from_env())
+ .with_telemetry(false);
+ if let Some(interval) = config.flush_interval {
+ builder = builder.with_flush_interval(interval);
+ }
+ builder
+ .install()
+ .map_err(|error| format!("failed to install DogStatsD exporter for {address}: {error}"))?;
+ tracing::info!(address, "native telemetry initialised");
+ Ok(())
+}
+
+/// Same resolution order as dd-trace: an explicit DogStatsD host, then the
+/// agent host, then localhost; port 8125 unless overridden.
+fn dogstatsd_address_from_env() -> String {
+ let host = first_env(&[
+ "DD_DOGSTATSD_HOST",
+ "DD_DOGSTATSD_HOSTNAME",
+ "DD_AGENT_HOST",
+ ])
+ .unwrap_or_else(|| "localhost".to_string());
+ let port = first_env(&["DD_DOGSTATSD_PORT"]).unwrap_or_else(|| "8125".to_string());
+ format!("{host}:{port}")
+}
+
+/// The unified service tags dd-trace attaches to every metric, plus DD_TAGS
+/// (comma-separated `key:value` pairs, or space-separated when no comma is
+/// present, as dd-trace parses it).
+fn global_labels_from_env() -> Vec<Label> {
+ let mut labels = Vec::new();
+ for (key, sources) in [
+ ("env", &["DD_ENV"][..]),
+ ("service", &["DD_SERVICE", "OTEL_SERVICE_NAME"][..]),
+ ("version", &["DD_VERSION"][..]),
+ ] {
+ if let Some(value) = first_env(sources) {
+ labels.push(Label::new(key, value));
+ }
+ }
+ if let Some(tags) = first_env(&["DD_TAGS"]) {
+ let separator = if tags.contains(',') { ',' } else { ' ' };
+ for pair in tags
+ .split(separator)
+ .map(str::trim)
+ .filter(|pair| !pair.is_empty())
+ {
+ if let Some((key, value)) = pair.split_once(':') {
+ labels.push(Label::new(key.to_string(), value.to_string()));
+ }
+ }
+ }
+ labels
+}
+
+fn first_env(names: &[&str]) -> Option<String> {
+ names
+ .iter()
+ .filter_map(|name| env::var(name).ok())
+ .find(|value| !value.trim().is_empty())
+}
+
+fn env_or_empty(name: &str) -> String {
+ env::var(name).unwrap_or_default()
+}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index acc0cbeb08..10725394c3 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -262,6 +262,12 @@ importers:
specifier: ^3.8.3
version: 3.8.3
+ packages/native:
+ devDependencies:
+ '@napi-rs/cli':
+ specifier: 3.8.6
+
packages/shared:
dependencies:
'@ag-ui/client':
@@ -1061,6 +1067,9 @@ importers:
'@aws-sdk/client-lambda-microvms':
specifier: 'catalog:'
version: 3.1074.0
+ '@langfuse/native':
+ specifier: workspace:*
+ version: link:../packages/native
'@langfuse/shared':
specifier: workspace:*
version: link:../packages/shared
@@ -1972,6 +1981,9 @@ packages:
'@emnapi/[email protected]':
resolution: {integrity: sha512-RSvbQmHzdKzNsLYa/wHrbc3KN4sYLKAdPZxqiM2HATqv/SBk2/ENSHpvXGaLOMcsAyz0poEGqkmmKYG3OWiJEQ==}
+ '@emnapi/[email protected]':
+ resolution: {integrity: sha512-TC8MkTuZUtcTSiFeuC0ksCh9QIJ5+F21MvZ4Wn4ORfYaFJ/0dsiudv5tVkejgwZlwQ39jL9WWDe2lz8x0WglOA==}
+
'@emnapi/[email protected]':
resolution: {integrity: sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA==}
@@ -1984,6 +1996,9 @@ packages:
'@emnapi/[email protected]':
resolution: {integrity: sha512-vgj7R3y3Wgx24IQaGPA/R6YFXLHVMOZ0uVEyIQPaWs+rd1AzfEMXlAC22FYwO1XkKR6NPsq7mUandH8oIRdZFw==}
+ '@emnapi/[email protected]':
+ resolution: {integrity: sha512-kyOl3X0DuTiT1h2ft8r2fYO8JYtU9a9Xis/zBSiGArNaagCOWx90N1k2wxp18czFDH+OgcWGb5ZP/XMt3dcyPA==}
+
'@emnapi/[email protected]':
resolution: {integrity: sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==}
@@ -2502,6 +2517,10 @@ packages:
resolution: {integrity: sha512-3eTuUO1vH2cZm2ZKHeQxnOqlTi9EfZDGgIe3BL3I4u+rJHocr9Fz86M4fjYABPvFnQG/gGK551HqDiIcETwU6Q==}
engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-WpQM+Ti6Z40EFwwt+uL2p4UabT+W179zHp6HhLVOzfbwnVn05IPO/eXIZXGNqcT1jbQ15SujNLzQ39k4QPPxBQ==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+
'@inquirer/[email protected]':
resolution: {integrity: sha512-b6xmA/VlTe0ZgDQHDui+Nav470u7u49nRd8/iuhOcQPO9Ch7lGuogydhi2VOmNlZ+zXcM8IcPuNSwQcdJaF/kw==}
engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
@@ -2511,6 +2530,15 @@ packages:
'@types/node':
optional: true
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-bRt8J8m+Fot9CXv+zNQGXUq2ET0MggR1fPz7v6edN6MFYmsbfGnMmkmWZJEegMKqrAC8ej/o1sqisHZXZJMAfQ==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ peerDependencies:
+ '@types/node': '>=18'
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+
'@inquirer/[email protected]':
resolution: {integrity: sha512-KR8edRkIsUayMXV+o3Gv+q4jlhENF9nMYUZs9PA2HzrXeHI8M5uDag70U7RJn9yyiMZSbtF5/UexBtAVtZGSbQ==}
engines: {node: '>=18'}
@@ -2529,6 +2557,15 @@ packages:
'@types/node':
optional: true
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-Xvr/0HggjddPtGppuqVmxhTw+Hr8PvsZ/k0HmOEaAqQEt80OITNkFWnsdNmyT0/eM4Ab+iJLx2R8rctlEyfSVg==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ peerDependencies:
+ '@types/node': '>=18'
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+
'@inquirer/[email protected]':
resolution: {integrity: sha512-43RTuEbfP8MbKzedNqBrlhhNKVwoK//vUFNW3Q3vZ88BLcrs4kYpGg+B2mm5p2K/HfygoCxuKwJJiv8PbGmE0A==}
engines: {node: '>=18'}
@@ -2547,6 +2584,15 @@ packages:
'@types/node':
optional: true
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-wsSy0sznmXwkty+2PzZwx00Cazc/E0r0B7mAzdGROz2Ct+DFZXaK7WDjGZvgjRldxH5ZhFVfF2lgkYrqgOw2KA==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ peerDependencies:
+ '@types/node': '>=18'
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+
'@inquirer/[email protected]':
resolution: {integrity: sha512-ZRVd/oD+sYsUd5zVm0NflqEzlqfYCyHNsqkHl2oWXEUHs12tCbcSFi+wVFEvD8+LGRaMUsVrE7qeo6lSG/S1Vg==}
engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
@@ -2556,6 +2602,15 @@ packages:
'@types/node':
optional: true
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-YsKkS2q63IiLtaDK/9nqzdComN97SDQrmKiyNggN+ceP4ty+Z6VwyTz3FpjeUWeW1Efss2xHFKCC9sx7hnrsxg==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ peerDependencies:
+ '@types/node': '>=18'
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+
'@inquirer/[email protected]':
resolution: {integrity: sha512-YmQpenjbFSHAK3sOd44puHh3V1KXXr+JiNpUztoSQ4drLh2rTVzTap/YtlAVu/5xavifIlBfNEzJ/neZJ1a/1g==}
engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
@@ -2565,6 +2620,15 @@ packages:
'@types/node':
optional: true
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-uHuXLmXW+TtIfT/9vSBotypAkqn1n34Ul+CLGPos/xANyO4Ff5xZzkYhbKR4NEcfVK4a9mHQOpwVZzluSHFRGw==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ peerDependencies:
+ '@types/node': '>=18'
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+
'@inquirer/[email protected]':
resolution: {integrity: sha512-6thf5I8q7lZwzGLAxPaaGEREEkZ3nyePPDQ1oyobblxmEE8mqTLguScP7pDjUTAibiyb4hfXl+qjUEJ+di/aNA==}
engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
@@ -2574,6 +2638,15 @@ packages:
'@types/node':
optional: true
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-f3QQJRIX5ZEneBHNUIuPjmbdzHnmRFJA8r2dkcb8q+OM5Uv5KtnuAttQumnrjcBVBM3mcTX1CkmtAkU58VRZxg==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ peerDependencies:
+ '@types/node': '>=18'
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+
'@inquirer/[email protected]':
resolution: {integrity: sha512-t2IEY+unGHOzAaVM5Xx6DEWKeXlDDcNPeDyUpsRc6CUhBfU3VQOEl+Vssh7VNp1dR8MdUJBWhuObjXCsVpjN5g==}
engines: {node: '>=18'}
@@ -2582,6 +2655,10 @@ packages:
resolution: {integrity: sha512-aJ8TBPOGB6f/2qziPfElISTCEd5XOYTFckA2SGjhNmiKzfK/u4ot3v0DUzGVdUnKjN10EqnnEPck36BkyfLnJw==}
engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-EAWgUTGQ/Umgga51dE3B2PUHbufuXarDfg86uVgoSgNHNNQnyFKcOrQLWVqYMghuSyHh8+2HUH0Js9cTC1WAdg==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+
'@inquirer/[email protected]':
resolution: {integrity: sha512-9K/DDBSQpOyZSkt6sOVP9Vo0TR7atX2kuILsUu0x3wVcVbe97lJwIJKMLdMw25tDYuXl/qp6erT0Xs1rfmcfZg==}
engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
@@ -2591,6 +2668,15 @@ packages:
'@types/node':
optional: true
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-HtcJhB2QFVXbLuJ5S3syhNbTUVxYvwqV4VRBDkQceBloC9bmTViUoRFP5PbSaDZb3HzfPmpuU/gG4ybVBz4FHA==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ peerDependencies:
+ '@types/node': '>=18'
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+
'@inquirer/[email protected]':
resolution: {integrity: sha512-XF4IXAbPnGPgw0wsbC/i2tPcyfdZgDpUlhsqU0SfT4IRIGWha6Xm9VRgN5yYxJq+jnyXlfXI/nQ3ulfk0iEICA==}
engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
@@ -2600,6 +2686,15 @@ packages:
'@types/node':
optional: true
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-6Yuwh1NGSbu1Lo4N1EWjXs1jKRntLg/ZCwhmeorEHde90v1XxAozdbd4Iu30eOQLW+6h1hp2O9ujNfLSbTPJnA==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ peerDependencies:
+ '@types/node': '>=18'
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+
'@inquirer/[email protected]':
resolution: {integrity: sha512-3XBfF7DAsp5qeDsvN5Rd1HmbNokVvEQoUM0QLrRcybC9nX96w3Pbmu7qUsb3IT3J3jBvs2+mTXaKHOUsgHMLzg==}
engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
@@ -2609,6 +2704,15 @@ packages:
'@types/node':
optional: true
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-W9zYdyzogK+6110mqwaSJWCBu2yA5Q/OfnGSjjZB1bNpHlmUozXxTl0+QOZBNeVd6Qo81/qT75gW05gLAtITxw==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ peerDependencies:
+ '@types/node': '>=18'
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+
'@inquirer/[email protected]':
resolution: {integrity: sha512-XJmn/wY4AX56l1BRU+ZjDrFtg9+2uBEi4JvJQj82kwJDQKiPgSn4CEsbfGGygS4Gw6rkL4W18oATjfVfaqub2Q==}
engines: {node: '>=23.5.0 || ^22.13.0 || ^21.7.0 || ^20.12.0'}
@@ -2618,6 +2722,15 @@ packages:
'@types/node':
optional: true
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-QoRB4wFIjgH5iOhSjoIKMkTvSHDuV+O3OITlIqAYO0oK5x364GJILXiMBvlPiE+klg7Xx9tq5XVqQHcGUDYYPA==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ peerDependencies:
+ '@types/node': '>=18'
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+
'@inquirer/[email protected]':
resolution: {integrity: sha512-QqdTqQddL3qPX/PPrjobpsO25NZ4dWXgTLenrR445L2ptLEYE6Z+PD5c5CNDJNx4ugRgELAIpSIJxZaO2jJ2Og==}
engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
@@ -2627,6 +2740,15 @@ packages:
'@types/node':
optional: true
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-1oHky1ONfCOwNrnkQGDE1oaSij/3fI6HFMSf2H/WsGO2lEyDX9My82iggITSy9ddSZ8yk8j9v41OI0fVoSIoaA==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ peerDependencies:
+ '@types/node': '>=18'
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+
'@inquirer/[email protected]':
resolution: {integrity: sha512-xJj8QWKRSrfKoBIITLZK61dD3zwo0Rz11fgDImku30/Oe81zMdIdGgrLY2h6RkJ+KZ/GhNYIRMKnH/62qBTA5g==}
engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
@@ -2636,6 +2758,15 @@ packages:
'@types/node':
optional: true
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-fyuIU1Nbpvwlikjg3gXwJFDI11+EFjqQ7P+iByfmivIKQ1vmaykNrD/vy5unHuUqUpsOsnvJ25//tPF7E/RBRA==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ peerDependencies:
+ '@types/node': '>=18'
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+
'@inquirer/[email protected]':
resolution: {integrity: sha512-FlDndEUww8m7BfukO2nJa25vhD+H5jxxCv4oGioKqzyWz3nPHhhw4LKdYRSlXuAx7DsdWia7iyaBPKKS95Evfw==}
engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
@@ -2645,6 +2776,15 @@ packages:
'@types/node':
optional: true
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-9kc15hr8r/kI+3DO/xLog5nOzTz1jqsHXa6JBFzmQKhkoJ8Slda1I1L/uD8ZSZ9tF1yp79wwXe7mclvX1rqR2Q==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ peerDependencies:
+ '@types/node': '>=18'
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+
'@inquirer/[email protected]':
resolution: {integrity: sha512-BvziSRxfz5Ov8ch0z/n3oijRSEcEsHnhggm4xFZe93DHcUCTlutlq9Ox4SVENAfcRD22UQq7T/atg9Wr3k09eA==}
engines: {node: '>=18'}
@@ -2663,6 +2803,15 @@ packages:
'@types/node':
optional: true
+ '@inquirer/[email protected]':
+ resolution: {integrity: sha512-yJoHYrMnxIsJZCY+0Vb66Dy3he3kL3e2wOBKhoSwWWAzZAY82emlxwgprCtp6yRixvNRNq9ztfRWQYPNr3Go7A==}
+ engines: {node: '>=23.5.0 || ^22.13.0 || ^20.17.0'}
+ peerDependencies:
+ '@types/node': '>=18'
+ peerDependenciesMeta:
+ '@types/node':
+ optional: true
+
'@internationalized/[email protected]':
resolution: {integrity: sha512-fuLX+3ZKLsxI73y8b01EG/WjHb6gE6weCqlfawPO27kBWGMh9G1yH6Csv1uU7/cac9H2GHmOMt6CjmuQ1aia4Q==}
@@ -2870,6 +3019,274 @@ packages:
resolution: {integrity: sha512-SvE+tSpcX884RJrPCskXxoS965Ky/pYABDEhWW6oeSRhpUDLrS5nTvT5n1LLSDVDYvty4imVmXsy+3/ROVuknA==}
engines: {node: '>=18'}
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-FnJ9fghsV9Q4zh2aJGPSvQiUlJRC27B6KhzAXcIW2rlSD8keak3mhXw4tJYa3KJkP9whETfsPwqp/DJRnQg5ng==}
+ engines: {node: ^20.17.0 || ^22.13.0 || >= 23.5.0}
+ hasBin: true
+ peerDependencies:
+ '@emnapi/core': ^1.7.1 || ^2.0.0-alpha.4
+ '@emnapi/runtime': ^1.7.1 || ^2.0.0-alpha.4
+ emnapi: ^1.7.1 || ^2.0.0-alpha.4
+ peerDependenciesMeta:
+ '@emnapi/core':
+ optional: true
+ '@emnapi/runtime':
+ optional: true
+ emnapi:
+ optional: true
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-ENPfLe4937bsKVTDA6zdABx4pq9w0tHqRrJHyaGxgaPq03a2Bd1unD5XSKjXJjebsABJ+MjAv1A2OvCgK9yehg==}
+ peerDependencies:
+ '@napi-rs/cross-toolchain-arm64-target-aarch64': ^1.0.3
+ '@napi-rs/cross-toolchain-arm64-target-armv7': ^1.0.3
+ '@napi-rs/cross-toolchain-arm64-target-ppc64le': ^1.0.3
+ '@napi-rs/cross-toolchain-arm64-target-s390x': ^1.0.3
+ '@napi-rs/cross-toolchain-arm64-target-x86_64': ^1.0.3
+ '@napi-rs/cross-toolchain-x64-target-aarch64': ^1.0.3
+ '@napi-rs/cross-toolchain-x64-target-armv7': ^1.0.3
+ '@napi-rs/cross-toolchain-x64-target-ppc64le': ^1.0.3
+ '@napi-rs/cross-toolchain-x64-target-s390x': ^1.0.3
+ '@napi-rs/cross-toolchain-x64-target-x86_64': ^1.0.3
+ peerDependenciesMeta:
+ '@napi-rs/cross-toolchain-arm64-target-aarch64':
+ optional: true
+ '@napi-rs/cross-toolchain-arm64-target-armv7':
+ optional: true
+ '@napi-rs/cross-toolchain-arm64-target-ppc64le':
+ optional: true
+ '@napi-rs/cross-toolchain-arm64-target-s390x':
+ optional: true
+ '@napi-rs/cross-toolchain-arm64-target-x86_64':
+ optional: true
+ '@napi-rs/cross-toolchain-x64-target-aarch64':
+ optional: true
+ '@napi-rs/cross-toolchain-x64-target-armv7':
+ optional: true
+ '@napi-rs/cross-toolchain-x64-target-ppc64le':
+ optional: true
+ '@napi-rs/cross-toolchain-x64-target-s390x':
+ optional: true
+ '@napi-rs/cross-toolchain-x64-target-x86_64':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-sahBe4ko2Z69NPTddaX6ZgbQZu9SDoITxw1S3dWl1gAGynZG34qHHCT8UaUMFxf3h3zMhCJjEzz4basaBxiTuQ==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [arm]
+ os: [android]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-7tkQAJJuBHxAxiEBNFgSTpvrtGpbwZYYJUSOmGEK3OfbdbNeoT2rdBxpM/gY1s+itEVbtOSlpaRPPG19MnwOzA==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [arm64]
+ os: [android]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-XWX8gtF+GHGk3nH3Wm3QUZNcxw9QHsFVZz3MzVLhWWHhceede1J4/vD+3dj3E1iKB9G6mualaZxOoD08R3E+7g==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-CfsqUpMTI1z8enrA/b+GcHM6YDI8D0kqCiqPYEnst4rbOABQ9KZ92ybTTNnlnZ7A017WoMZKUEWc36KXDwi0xg==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [x64]
+ os: [darwin]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-bTyNfg90FXIgE61U7l14aMmVOqRQ6AyP5JMT3jmCStaZI18apLNPdzZ8i7yqxZfKvRMVfPjE2brXIw27c+RRgA==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [x64]
+ os: [freebsd]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-vNE+D8nrw+eOkBsdKCsmDhowDV3pIMKXEhedvXfbgrWbrO7GlZJH+RXL+X+RYLxGwi8Ym61ZMt15sIOnNmh9Sw==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [arm]
+ os: [linux]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-csUem4WgoKGTprv/pOPm9UIWbb+hrfUwYXefpTHPAEGVFLl5behEFabisJ7FtihCa3yG2Efcl+yw25rlhhrIYw==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [arm64]
+ os: [linux]
+ libc: [glibc]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-kB/xhlVN1eLvVmDJSKZEjp5Gg2xDYexNrB5jwpSMbOkeGS6N9AasByPBg5VqCpMYC+zZi7DM458DRhtWYhqXTQ==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [arm64]
+ os: [linux]
+ libc: [musl]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-s28RW0W1yBWQc1nbPdF7tp14koqslY3ZWLVI8uaanX292Dc6ezd4NPVwxEoCNBVON/oD7BmUbWGtyFvmm7dQ5A==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [ppc64]
+ os: [linux]
+ libc: [glibc]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-+lGNwYlIN14YPMTNvYtIJJqHFevDTd6Juw/1NmXbWx/iRd/LLrjhlM/yluMX6pxs6NkOGsuuEXJJrbbEUS59OQ==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [riscv64]
+ os: [linux]
+ libc: [glibc]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-PB44FFWWFrLeQowhcep1hPD1YcLqKlnnY60RMU74qrxTlr4YGEyzeMItJqh2uivBfv9kQScOF/B0J9+Vab/oyw==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [s390x]
+ os: [linux]
+ libc: [glibc]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [x64]
+ os: [linux]
+ libc: [glibc]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-I3nsYrWtrW9JpeCr+mkJIVDt0HY3m6qVUBs5vTtoIvJQxwqf1PBXSy5IS7T53ksQFH2kd2UX8rLxJ7B4WISpZg==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [x64]
+ os: [linux]
+ libc: [musl]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-gy3wwPBa6+XEyA4fUzq6CClrXA1ajXjuVf5zbnHytJRgoHznj+mvpU3+co2fxXwqTCmIpn6KrzqH5bRDztBPhA==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [wasm32]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-dK+huOsHiyH6oJjij+cnjqFCakk2HgWmpI12Xm4pLUyPphe4ebYoJBgehaNAxprmjFqBQ7nL95YPVz9BHyqmPg==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [arm64]
+ os: [win32]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-dGE8L+0EQ+GyU9ap9InqB/t/PmPG/bLj918q7OsJ29FuTdn8fK4OX3U4IQZhylHIA+/dQ/SXJk5n4yfah2XVvA==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [ia32]
+ os: [win32]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-EKW4t/iqdCT/xnd5t9oXLvVER/PMNAWXKqUAl3fgvUcOILeZIIht77/dVnfFcc9htA/DCBXC/6YQWdW+LusjFA==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+ cpu: [x64]
+ os: [win32]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-sgOZ89+y8cDbY+3WbzR8CtIhCuFRWotZ9/2PjPVDJHz6np5KFTAev0DrwiyTJTgFsCRDhfGlbmhMgyhHbWdZ6g==}
+ engines: {node: ^22.20 || ^24.12 || >=25}
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-cAhnA10cSusAUbcE9HtjQY/tZ9BH/0w2sKtRcQc94TzIlnm7QSr1htJSd/PPrbWNPtrv1orXb2CkrHlVlbnlHA==}
+ engines: {node: '>= 10'}
+ cpu: [arm]
+ os: [android]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-EslUWHCDBY/g5abTPBiHLsMaML4GagV0TXLm5WL9hAjx/DDtlxz9fegMb77RJ+f7nFLOIsUxF/3QWFvgOT0sMQ==}
+ engines: {node: '>= 10'}
+ cpu: [arm64]
+ os: [android]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-+A42/6ES5G9CQ35BOwzwA+WBjLID28r2jNPgc0dteD2hhClIhng0mva7D2ujUlXBNmgNOsr1LHn3stA4uTf4NQ==}
+ engines: {node: '>= 10'}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-RYtE8w1dkEvj8hSJCDV5Jw0Rz2i13fsM7u893zv5O9n/4Ad5GNsw/f4RQ7/0YGSFaenkVxqPFrjmEvUHlKzsrg==}
+ engines: {node: '>= 10'}
+ cpu: [x64]
+ os: [darwin]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-rEepBvCJUwcuvUYkY83e8aot8RsR5Jcnal4PsG3tbWGKW1yAvcXhyMXf0fN6ZGpVRZFnB+FJqDyBxvsCPEXKhw==}
+ engines: {node: '>= 10'}
+ cpu: [x64]
+ os: [freebsd]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-an1bJdfyhI5FpZYyTQ20mrqwR+a676i8GkaYc4Uy12dH/a7TJIfrK6Qa2Gm46arZvxUvx56qxoRKXbpOjUPvwA==}
+ engines: {node: '>= 10'}
+ cpu: [arm]
+ os: [linux]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-w++Vtx36T2yHTKws7GVnmHHcUT1ybB59xLWSh9A8bwEpJVG4dG7Qub9mFe5cpcbfrJ+XP2mKKxC3oUJSunK3iQ==}
+ engines: {node: '>= 10'}
+ cpu: [arm64]
+ os: [linux]
+ libc: [glibc]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-Rh6UFhNtj3i4deJHOBINFIeRL0072mgbeyuK5rl1HokKnNoMKx8qKIZNEzBTTqpogMfDHWGvzyTQdnVxes5dpA==}
+ engines: {node: '>= 10'}
+ cpu: [arm64]
+ os: [linux]
+ libc: [musl]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-Cp+AxFbv9zcyAXtnzQi0OzmgDnQgy2w9D4Ubr+iwzMtVgJcztzcEoCcCrN1k2ATdEB01LX2Vb49IaocGOZhC9Q==}
+ engines: {node: '>= 10'}
+ cpu: [ppc64]
+ os: [linux]
+ libc: [glibc]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-ZyscC3SYKTBWyDRYjLOKAd5TyJ7q0KACRdQ8bWrb3rgrra1CCIJD66CsGTH6Dh0AVSdfLwZ8MfIIXU6+14BMjQ==}
+ engines: {node: '>= 10'}
+ cpu: [s390x]
+ os: [linux]
+ libc: [glibc]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-LlIv+zg4fiOQge9LQX/ieBdRWE2fhVDjCTHxnunZkbugNmdhdelxWf1RpZb/6ZujWpNF4LPu4N/MW7ygg2oYAQ==}
+ engines: {node: '>= 10'}
+ cpu: [x64]
+ os: [linux]
+ libc: [glibc]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-gZBeoKLjanOVj55qk4EMu13P2i9M0SuINmlGQkOxm1niIJofexzddHUYtqO5o/5QqtyL8lADmAcZplLILMLhHA==}
+ engines: {node: '>= 10'}
+ cpu: [x64]
+ os: [linux]
+ libc: [musl]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-rwtQ1Mdt/ft6g6I54fJzbUeLspl4yTwj6I3UJ6mitKnrN42soJkcDrdh3Y/FGvlpqZTad2YMQ96fGJl3EtAm2Q==}
+ engines: {node: '>=14.0.0'}
+ cpu: [wasm32]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-30PVp1AehRpfwxmv5wI4cg0yj3WmWBsZ+1QnLGnvEELu7Eu/+dhNU0nrmhI7VfPgLwSRK2eg9DQTB3tP7Wv9bA==}
+ engines: {node: '>= 10'}
+ cpu: [arm64]
+ os: [win32]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-aI3/rmz+izUChiSeaPxcasAOxhf3FpJNuIHMXlxS/vpW+HIxUsSDR5+XV61PEG5DL4L/75iENVUxmSGM5l2yaw==}
+ engines: {node: '>= 10'}
+ cpu: [ia32]
+ os: [win32]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-yJsB2IsrODQVLKbm2Fg1nHiVRbEj49mSPbj4x7JPZWJI0jGVPjohE2Sif0FBbx8OxsVoUODvS0BwksZZ8jl/OA==}
+ engines: {node: '>= 10'}
+ cpu: [x64]
+ os: [win32]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-p6q2HhUc5vwH1CNwfOcrhLoxfgn8ust8Sqlfx+sA4VzAcp1cMbvbkl99tZZlDqOjCHgQNSiTfk/yWPjl/D42qA==}
+ engines: {node: '>= 10'}
+
'@napi-rs/[email protected]':
resolution: {integrity: sha512-ZVWUcfwY4E/yPitQJl481FjFo3K22D6qF0DuFH6Y/nbnE11GY5uguDxZMGXPQ8WQ0128MXQD7TnfHyK4oWoIJQ==}
@@ -2880,6 +3297,91 @@ packages:
'@emnapi/core': ^1.7.1 || ^2.0.0-alpha.4
'@emnapi/runtime': ^1.7.1 || ^2.0.0-alpha.4
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-p6J8PB59I8d/XItXB/go5JH6nKW+xIbpzaL43EBTV0hi7mrS/Z4gs+MsB04ZrlqZN29BdZV8fChRyasuXLhRaA==}
+ engines: {node: '>= 12.22.0'}
+ cpu: [arm]
+ os: [android]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-lWoKN3suypeBSCIRPIw+++sH9V2K6nQkhtdt1opu7XY3v9JwLs6Gw063HWRqkNjphlYpkd/Qy8XcfSPGbJj7nQ==}
+ engines: {node: '>= 12.22.0'}
+ cpu: [arm64]
+ os: [android]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-jfw5vyNDUf6oe0kP8lMveFN9U7cLk1cUosS7uMIfw/xmqmopYfKQ198DAx2g/6aEF7Tm+CqER2gpMpYKui30LA==}
+ engines: {node: '>= 12.22.0'}
+ cpu: [arm64]
+ os: [darwin]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-R+pjeudAB7BYdH1vKkOJM61Tfv5jB6uXkxmFscYd+KKpdUpWBlNG+s4hr0w4i1rMBM91VhIAETZn2pz+MDHK9A==}
+ engines: {node: '>= 12.22.0'}
+ cpu: [x64]
+ os: [darwin]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-hQJTe+aazrT++Vgm6I4lUd9099ItUCFYdd+aKg6Ys6nax6d/cZ1barDLTwA2lwOoVDsXMekJI/FOL6ZvVlIYBg==}
+ engines: {node: '>= 12.22.0'}
+ cpu: [x64]
+ os: [freebsd]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-1TAXJxUHsWGar90k3W/MknavvBMwOWzjh7Q6Spxo8twRcWJbBD5Kow/Q2KhhDq5hxh2sKGDXn3uLc1tdtz4WUg==}
+ engines: {node: '>= 12.22.0'}
+ cpu: [arm64]
+ os: [linux]
+ libc: [glibc]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-7rw3nlubTjNAVRH2LwphCxHy1b/N2/TerXocQ6XRn4Q+buaY1Z7P/hbdALy1i1ex2yfOU2Xcij7ib7ZLi/lKfw==}
+ engines: {node: '>= 12.22.0'}
+ cpu: [arm64]
+ os: [linux]
+ libc: [musl]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-1sel0t9MRjI/tdT89M8Dd6gPfANeeFP24Xa46R11WeHNwhjsXXZh+xUk50uWCRTSGcaCy3ugm3AMK/lmHYQJkg==}
+ engines: {node: '>= 12.22.0'}
+ cpu: [x64]
+ os: [linux]
+ libc: [glibc]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-o2jH5AMfor4EKF2HII1LBnMQxoWu7+usPifTEY8Zk6e9OiSi4EJkAXf9v3ANlX7TI2V/cUEV34OEW7r10GiVIA==}
+ engines: {node: '>= 12.22.0'}
+ cpu: [x64]
+ os: [linux]
+ libc: [musl]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-s6YDtDR1UWrsqJPtaxf+JLYLceWVyn3l8OpQYElHkDhf3Qfz9R6Ba3S0OgznTBv38L5/TIHysQ9Q4yO73Z0csg==}
+ engines: {node: '>=14.0.0'}
+ cpu: [wasm32]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-x+NuxbG84VxU68tU8w7Rf5lSyq0l584M6dVlke5DTweHYFZoMyeqkpbwEq+qsyAX6ivfipK8xRsmFwamb5uDnA==}
+ engines: {node: '>= 12.22.0'}
+ cpu: [arm64]
+ os: [win32]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-mdD96QDEp70SX67rXFTY6c725nVYeqEEjyDqzzbNh6u1APj7CI7IMNpMmvE75XbCRl4C2MHZVU4U6AWdAzvyQQ==}
+ engines: {node: '>= 12.22.0'}
+ cpu: [ia32]
+ os: [win32]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-bVVjuvhlyVX++3eJXfDR63cXdw1ay5QYac6iq0MKQw8wZARInTM+bXCtByDT4fzVFI3+7ZthYb/ERWRdBNIqgQ==}
+ engines: {node: '>= 12.22.0'}
+ cpu: [x64]
+ os: [win32]
+
+ '@napi-rs/[email protected]':
+ resolution: {integrity: sha512-VjHyKEqXAwYZK+HY7iJctYvRm3TFEbaQxeZwvAG1QRkoo1a39phMY8J6x9tUEqJI03W6MysB8F2jacI6wvcx+w==}
+ engines: {node: '>= 12.22.0'}
+
'@next-auth/[email protected]':
resolution: {integrity: sha512-Cdko4KfcmKjsyHFrWwZ//lfLUbcLqlyFqjd/nYE2m3aZ7tjMNUjpks47iw7NTCnXf+5UWz5Ypyt1dSs1EP5QJw==}
peerDependencies:
@@ -7118,6 +7620,11 @@ packages:
resolution: {integrity: sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA==}
+ resolution: {integrity: sha512-CXkMQxU6s9GklO/1f714dkKBMu1lopS1WFF0B8o4AxPykR1hpozxSiUZ5ZUeBjfPgCWqbcNOtZVFhB8Lkfp1+Q==}
+ peerDependencies:
+ typanion: '*'
+
resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==}
engines: {node: '>=12'}
@@ -7158,6 +7665,9 @@ packages:
resolution: {integrity: sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==}
+ resolution: {integrity: sha512-IfEDxwoWIjkeXL1eXcDiow4UbKjhLdq6/EuSVR9GMN7KVH3r9gQ83e73hsz1Nd1T3ijd5xv1wcWRYO+D6kCI2w==}
+
resolution: {integrity: sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==}
@@ -7812,6 +8322,9 @@ packages:
resolution: {integrity: sha512-/jhoOj/Fx+A+IIyDNOvO3TItGmlMKhtX8ISAHKE90c4b/k1tqaqEZ+uUqfpU8DMnW5cgNJv606zS55jGvza0Xw==}
+ resolution: {integrity: sha512-XTNEJQh1tY1ZJVcf6ayP/2n4ZPyaHlW2FWs7xvw5ddPuhUVjLD3olQVQS7kf58JbAB48iL0uL/jerTrjtV3lDA==}
+
resolution: {integrity: sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==}
@@ -9926,6 +10439,10 @@ packages:
resolution: {integrity: sha512-uTqF9MuPraAQ+IsnPf366RG4cP9RtUi7MLO1N3KEc+wb0a6yKpeL0lmk2IB1jY5KHPAlTc6T/JRdC/YqxHNwkQ==}
+ resolution: {integrity: sha512-XrsrhT5sybtKI6wakr2SPOlGZWWYbUXZ7a0jT8/QOeAPau+1X/bSegNe5YR75oJmEZQbKningirmGOEJCIk61Q==}
+ engines: {node: '>=12.20.0'}
+
resolution: {integrity: sha512-yHdfmB0gIx0QYC7sNvgll4HEw+w+fVo/eldhZfN2VxLJK+oqVHDlr6rT/ytwK8Fc8bS5XPkofIpCStPNR10MdQ==}
@@ -11440,6 +11957,9 @@ packages:
resolution: {integrity: sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==}
+ resolution: {integrity: sha512-ZW/lVMRabETuYCd9O9ZvMhAh8GslSqaUjxmK/JLPCh6l73CvLBiuXswj/+7LdnWOgYsQ130FqLzFz5aGT4I3Ug==}
+
resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==}
engines: {node: '>= 0.8.0'}
@@ -13258,6 +13778,12 @@ snapshots:
tslib: 2.8.1
optional: true
+ '@emnapi/[email protected]':
+ dependencies:
+ '@emnapi/wasi-threads': 1.2.2
+ tslib: 2.8.1
+ optional: true
+
'@emnapi/[email protected]':
dependencies:
'@emnapi/wasi-threads': 1.2.1
@@ -13279,6 +13805,11 @@ snapshots:
tslib: 2.8.1
optional: true
+ '@emnapi/[email protected]':
+ dependencies:
+ tslib: 2.8.1
+ optional: true
+
'@emnapi/[email protected]':
dependencies:
tslib: 2.8.1
@@ -13693,6 +14224,8 @@ snapshots:
'@inquirer/[email protected]': {}
+ '@inquirer/[email protected]': {}
+
dependencies:
'@inquirer/ansi': 2.0.7
@@ -13702,6 +14235,15 @@ snapshots:
optionalDependencies:
'@types/node': 24.3.0
+ '@inquirer/[email protected](@types/[email protected])':
+ dependencies:
+ '@inquirer/ansi': 2.0.8
+ '@inquirer/core': 12.0.3(@types/[email protected])
+ '@inquirer/figures': 2.0.9
+ '@inquirer/type': 4.1.1(@types/[email protected])
+ optionalDependencies:
+ '@types/node': 24.3.0
+
dependencies:
'@inquirer/core': 10.3.2(@types/[email protected])
@@ -13716,6 +14258,13 @@ snapshots:
optionalDependencies:
'@types/node': 24.3.0
+ '@inquirer/[email protected](@types/[email protected])':
+ dependencies:
+ '@inquirer/core': 12.0.3(@types/[email protected])
+ '@inquirer/type': 4.1.1(@types/[email protected])
+ optionalDependencies:
+ '@types/node': 24.3.0
+
dependencies:
'@inquirer/ansi': 1.0.2
@@ -13741,6 +14290,18 @@ snapshots:
optionalDependencies:
'@types/node': 24.3.0
+ '@inquirer/[email protected](@types/[email protected])':
+ dependencies:
+ '@inquirer/ansi': 2.0.8
+ '@inquirer/figures': 2.0.9
+ '@inquirer/type': 4.1.1(@types/[email protected])
+ cli-width: 4.1.0
+ fast-wrap-ansi: 0.2.2
+ mute-stream: 3.0.0
+ signal-exit: 4.1.0
+ optionalDependencies:
+ '@types/node': 24.3.0
+
dependencies:
'@inquirer/core': 11.2.1(@types/[email protected])
@@ -13749,6 +14310,14 @@ snapshots:
optionalDependencies:
'@types/node': 24.3.0
+ '@inquirer/[email protected](@types/[email protected])':
+ dependencies:
+ '@inquirer/core': 12.0.3(@types/[email protected])
+ '@inquirer/external-editor': 3.0.5(@types/[email protected])
+ '@inquirer/type': 4.1.1(@types/[email protected])
+ optionalDependencies:
+ '@types/node': 24.3.0
+
dependencies:
'@inquirer/core': 11.2.1(@types/[email protected])
@@ -13756,6 +14325,13 @@ snapshots:
optionalDependencies:
'@types/node': 24.3.0
+ '@inquirer/[email protected](@types/[email protected])':
+ dependencies:
+ '@inquirer/core': 12.0.3(@types/[email protected])
+ '@inquirer/type': 4.1.1(@types/[email protected])
+ optionalDependencies:
+ '@types/node': 24.3.0
+
dependencies:
chardet: 2.1.1
@@ -13763,10 +14339,19 @@ snapshots:
optionalDependencies:
'@types/node': 24.3.0
+ '@inquirer/[email protected](@types/[email protected])':
+ dependencies:
+ chardet: 2.1.1
+ iconv-lite: 0.7.2
+ optionalDependencies:
+ '@types/node': 24.3.0
+
'@inquirer/[email protected]': {}
'@inquirer/[email protected]': {}
+ '@inquirer/[email protected]': {}
+
dependencies:
'@inquirer/core': 11.2.1(@types/[email protected])
@@ -13774,6 +14359,13 @@ snapshots:
optionalDependencies:
'@types/node': 24.3.0
+ '@inquirer/[email protected](@types/[email protected])':
+ dependencies:
+ '@inquirer/core': 12.0.3(@types/[email protected])
+ '@inquirer/type': 4.1.1(@types/[email protected])
+ optionalDependencies:
+ '@types/node': 24.3.0
+
dependencies:
'@inquirer/core': 11.2.1(@types/[email protected])
@@ -13781,6 +14373,13 @@ snapshots:
optionalDependencies:
'@types/node': 24.3.0
+ '@inquirer/[email protected](@types/[email protected])':
+ dependencies:
+ '@inquirer/core': 12.0.3(@types/[email protected])
+ '@inquirer/type': 4.1.1(@types/[email protected])
+ optionalDependencies:
+ '@types/node': 24.3.0
+
dependencies:
'@inquirer/ansi': 2.0.7
@@ -13789,6 +14388,14 @@ snapshots:
optionalDependencies:
'@types/node': 24.3.0
+ '@inquirer/[email protected](@types/[email protected])':
+ dependencies:
+ '@inquirer/ansi': 2.0.8
+ '@inquirer/core': 12.0.3(@types/[email protected])
+ '@inquirer/type': 4.1.1(@types/[email protected])
+ optionalDependencies:
+ '@types/node': 24.3.0
+
dependencies:
'@inquirer/checkbox': 5.2.1(@types/[email protected])
@@ -13804,6 +14411,21 @@ snapshots:
optionalDependencies:
'@types/node': 24.3.0
+ '@inquirer/[email protected](@types/[email protected])':
+ dependencies:
+ '@inquirer/checkbox': 5.2.5(@types/[email protected])
+ '@inquirer/confirm': 6.3.2(@types/[email protected])
+ '@inquirer/editor': 5.3.3(@types/[email protected])
+ '@inquirer/expand': 5.1.5(@types/[email protected])
+ '@inquirer/input': 5.1.6(@types/[email protected])
+ '@inquirer/number': 4.2.3(@types/[email protected])
+ '@inquirer/password': 5.2.2(@types/[email protected])
+ '@inquirer/rawlist': 5.3.5(@types/[email protected])
+ '@inquirer/search': 4.3.3(@types/[email protected])
+ '@inquirer/select': 5.2.5(@types/[email protected])
+ optionalDependencies:
+ '@types/node': 24.3.0
+
dependencies:
'@inquirer/core': 11.2.1(@types/[email protected])
@@ -13811,6 +14433,13 @@ snapshots:
optionalDependencies:
'@types/node': 24.3.0
+ '@inquirer/[email protected](@types/[email protected])':
+ dependencies:
+ '@inquirer/core': 12.0.3(@types/[email protected])
+ '@inquirer/type': 4.1.1(@types/[email protected])
+ optionalDependencies:
+ '@types/node': 24.3.0
+
dependencies:
'@inquirer/core': 11.2.1(@types/[email protected])
@@ -13819,6 +14448,14 @@ snapshots:
optionalDependencies:
'@types/node': 24.3.0
+ '@inquirer/[email protected](@types/[email protected])':
+ dependencies:
+ '@inquirer/core': 12.0.3(@types/[email protected])
+ '@inquirer/figures': 2.0.9
+ '@inquirer/type': 4.1.1(@types/[email protected])
+ optionalDependencies:
+ '@types/node': 24.3.0
+
dependencies:
'@inquirer/ansi': 2.0.7
@@ -13828,6 +14465,15 @@ snapshots:
optionalDependencies:
'@types/node': 24.3.0
+ '@inquirer/[email protected](@types/[email protected])':
+ dependencies:
+ '@inquirer/ansi': 2.0.8
+ '@inquirer/core': 12.0.3(@types/[email protected])
+ '@inquirer/figures': 2.0.9
+ '@inquirer/type': 4.1.1(@types/[email protected])
+ optionalDependencies:
+ '@types/node': 24.3.0
+
optionalDependencies:
'@types/node': 24.3.0
@@ -13836,6 +14482,10 @@ snapshots:
optionalDependencies:
'@types/node': 24.3.0
+ '@inquirer/[email protected](@types/[email protected])':
+ optionalDependencies:
+ '@types/node': 24.3.0
+
'@internationalized/[email protected]':
dependencies:
'@swc/helpers': 0.5.23
@@ -14180,6 +14830,191 @@ snapshots:
outvariant: 1.4.3
strict-event-emitter: 0.5.1
+ dependencies:
+ '@inquirer/prompts': 8.7.2(@types/[email protected])
+ '@napi-rs/cross-toolchain': 1.0.3([email protected])
+ '@napi-rs/wasm-tools': 1.1.0
+ '@octokit/rest': 22.0.1
+ clipanion: 4.0.0-rc.4([email protected])
+ colorette: 2.0.20
+ es-toolkit: 1.52.0
+ js-yaml: 4.3.2
+ obug: 2.2.1
+ semver: 7.8.5
+ typanion: 3.14.0
+ typescript: 6.0.3
+ optionalDependencies:
+ '@emnapi/core': 1.9.2
+ '@emnapi/runtime': 1.9.2
+ transitivePeerDependencies:
+ - '@napi-rs/cross-toolchain-arm64-target-aarch64'
+ - '@napi-rs/cross-toolchain-arm64-target-armv7'
+ - '@napi-rs/cross-toolchain-arm64-target-ppc64le'
+ - '@napi-rs/cross-toolchain-arm64-target-s390x'
+ - '@napi-rs/cross-toolchain-arm64-target-x86_64'
+ - '@napi-rs/cross-toolchain-x64-target-aarch64'
+ - '@napi-rs/cross-toolchain-x64-target-armv7'
+ - '@napi-rs/cross-toolchain-x64-target-ppc64le'
+ - '@napi-rs/cross-toolchain-x64-target-s390x'
+ - '@napi-rs/cross-toolchain-x64-target-x86_64'
+ - '@types/node'
+ - supports-color
+
+ dependencies:
+ '@napi-rs/lzma': 1.5.1
+ '@napi-rs/tar': 1.1.1
+ debug: 4.4.3([email protected])
+ transitivePeerDependencies:
+ - supports-color
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ dependencies:
+ '@emnapi/core': 1.11.2
+ '@emnapi/runtime': 1.11.2
+ '@napi-rs/wasm-runtime': 1.2.3(@emnapi/[email protected])(@emnapi/[email protected])
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optionalDependencies:
+ '@napi-rs/lzma-android-arm-eabi': 1.5.1
+ '@napi-rs/lzma-android-arm64': 1.5.1
+ '@napi-rs/lzma-darwin-arm64': 1.5.1
+ '@napi-rs/lzma-darwin-x64': 1.5.1
+ '@napi-rs/lzma-freebsd-x64': 1.5.1
+ '@napi-rs/lzma-linux-arm-gnueabihf': 1.5.1
+ '@napi-rs/lzma-linux-arm64-gnu': 1.5.1
+ '@napi-rs/lzma-linux-arm64-musl': 1.5.1
+ '@napi-rs/lzma-linux-ppc64-gnu': 1.5.1
+ '@napi-rs/lzma-linux-riscv64-gnu': 1.5.1
+ '@napi-rs/lzma-linux-s390x-gnu': 1.5.1
+ '@napi-rs/lzma-linux-x64-gnu': 1.5.1
+ '@napi-rs/lzma-linux-x64-musl': 1.5.1
+ '@napi-rs/lzma-wasm32-wasi': 1.5.1
+ '@napi-rs/lzma-win32-arm64-msvc': 1.5.1
+ '@napi-rs/lzma-win32-ia32-msvc': 1.5.1
+ '@napi-rs/lzma-win32-x64-msvc': 1.5.1
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ dependencies:
+ '@emnapi/core': 1.11.2
+ '@emnapi/runtime': 1.11.2
+ '@napi-rs/wasm-runtime': 1.2.3(@emnapi/[email protected])(@emnapi/[email protected])
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optionalDependencies:
+ '@napi-rs/tar-android-arm-eabi': 1.1.1
+ '@napi-rs/tar-android-arm64': 1.1.1
+ '@napi-rs/tar-darwin-arm64': 1.1.1
+ '@napi-rs/tar-darwin-x64': 1.1.1
+ '@napi-rs/tar-freebsd-x64': 1.1.1
+ '@napi-rs/tar-linux-arm-gnueabihf': 1.1.1
+ '@napi-rs/tar-linux-arm64-gnu': 1.1.1
+ '@napi-rs/tar-linux-arm64-musl': 1.1.1
+ '@napi-rs/tar-linux-ppc64-gnu': 1.1.1
+ '@napi-rs/tar-linux-s390x-gnu': 1.1.1
+ '@napi-rs/tar-linux-x64-gnu': 1.1.1
+ '@napi-rs/tar-linux-x64-musl': 1.1.1
+ '@napi-rs/tar-wasm32-wasi': 1.1.1
+ '@napi-rs/tar-win32-arm64-msvc': 1.1.1
+ '@napi-rs/tar-win32-ia32-msvc': 1.1.1
+ '@napi-rs/tar-win32-x64-msvc': 1.1.1
+
'@napi-rs/[email protected]':
dependencies:
'@emnapi/core': 1.11.1
@@ -14208,6 +15043,13 @@ snapshots:
'@tybys/wasm-util': 0.10.3
optional: true
+ dependencies:
+ '@emnapi/core': 1.11.2
+ '@emnapi/runtime': 1.11.2
+ '@tybys/wasm-util': 0.10.3
+ optional: true
+
dependencies:
'@emnapi/core': 1.9.2
@@ -14215,6 +15057,65 @@ snapshots:
'@tybys/wasm-util': 0.10.3
optional: true
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ dependencies:
+ '@emnapi/core': 1.9.2
+ '@emnapi/runtime': 1.9.2
+ '@napi-rs/wasm-runtime': 1.2.3(@emnapi/[email protected])(@emnapi/[email protected])
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optional: true
+
+ '@napi-rs/[email protected]':
+ optionalDependencies:
+ '@napi-rs/wasm-tools-android-arm-eabi': 1.1.0
+ '@napi-rs/wasm-tools-android-arm64': 1.1.0
+ '@napi-rs/wasm-tools-darwin-arm64': 1.1.0
+ '@napi-rs/wasm-tools-darwin-x64': 1.1.0
+ '@napi-rs/wasm-tools-freebsd-x64': 1.1.0
+ '@napi-rs/wasm-tools-linux-arm64-gnu': 1.1.0
+ '@napi-rs/wasm-tools-linux-arm64-musl': 1.1.0
+ '@napi-rs/wasm-tools-linux-x64-gnu': 1.1.0
+ '@napi-rs/wasm-tools-linux-x64-musl': 1.1.0
+ '@napi-rs/wasm-tools-wasm32-wasi': 1.1.0
+ '@napi-rs/wasm-tools-win32-arm64-msvc': 1.1.0
+ '@napi-rs/wasm-tools-win32-ia32-msvc': 1.1.0
+ '@napi-rs/wasm-tools-win32-x64-msvc': 1.1.0
+
dependencies:
@@ -18606,6 +19507,10 @@ snapshots:
+ dependencies:
+ typanion: 3.14.0
+
dependencies:
string-width: 4.2.3
@@ -18660,6 +19565,8 @@ snapshots:
color-convert: 1.9.3
color-string: 1.9.1
+
dependencies:
color: 3.2.1
@@ -19384,6 +20291,8 @@ snapshots:
+
@@ -22015,6 +22924,8 @@ snapshots:
+
dependencies:
'@types/isomorphic-fetch': 0.0.35
@@ -23858,6 +24769,8 @@ snapshots:
+
dependencies:
prelude-ls: 1.2.1
diff --git a/turbo.json b/turbo.json
index 1cb5ef2994..227d283da6 100644
--- a/turbo.json
+++ b/turbo.json
@@ -128,9 +128,23 @@
"dependsOn": ["build"],
"cache": false
},
+ // Worker tests load the compiled addon, which no install step produces.
+ "worker#test": {
+ "dependsOn": ["^test", "db:generate", "@langfuse/native#build"]
+ },
"worker#dev": {
"cache": false,
- "persistent": true
+ "persistent": true,
+ // The worker loads the Rust addon at startup, so it must be compiled
+ // before tsx starts the process.
+ "dependsOn": ["db:generate", "@langfuse/native#build"]
+ },
+ // `napi build` compiles a host-specific binary and Cargo already caches
+ // incrementally in target/, so never replay this task from the turbo cache.
+ "@langfuse/native#build": {
+ "dependsOn": [],
+ "cache": false,
+ "outputs": []
}
}
}
diff --git a/worker/AGENTS.md b/worker/AGENTS.md
index ba34ad7bb1..cba0983dd7 100644
--- a/worker/AGENTS.md
+++ b/worker/AGENTS.md
@@ -18,6 +18,9 @@
- Feature processors: `src/features/*`
- Evaluation terminal-outcome classification: `src/features/evaluation/evalExecutionMetrics.ts`. Keep it aligned with shared code evaluator dispatcher error codes and user-visible error mapping.
- Service layer: `src/services/*`
+- Rust addon (`@langfuse/native`): telemetry init and the startup hello call live
+ in `src/initialize.ts`, the health probe call in `src/api/index.ts`. Native code
+ records its own metrics and logs; see `../packages/native/AGENTS.md`.
- Tests: `src/__tests__/*`, `src/queues/__tests__/*`
## Shared Package Imports
diff --git a/worker/Dockerfile b/worker/Dockerfile
index 0910ceb042..5fd8a74e28 100644
--- a/worker/Dockerfile
+++ b/worker/Dockerfile
@@ -33,6 +33,19 @@ FROM --platform=${TARGETPLATFORM:-linux/amd64} build-base AS builder
WORKDIR /app
+# @langfuse/native is a Rust addon (napi-rs) compiled by `turbo run build`.
+# The toolchain comes from the official Rust image for the same Alpine release,
+# so the addon compiles with the exact version pinned in
+# packages/native/rust-toolchain.toml; bump the two together. gcc and musl-dev
+# provide the linker and C runtime objects the build needs.
+COPY --from=rust:1.98.0-alpine3.24 /usr/local/rustup /usr/local/rustup
+COPY --from=rust:1.98.0-alpine3.24 /usr/local/cargo /usr/local/cargo
+ENV RUSTUP_HOME=/usr/local/rustup CARGO_HOME=/usr/local/cargo PATH=/usr/local/cargo/bin:$PATH
+# rustc's musl targets default to a `<arch>-linux-musl-gcc` linker name that
+# Alpine does not ship; its gcc is reachable as `cc`.
+ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=cc CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=cc
+RUN apk add --no-cache gcc musl-dev
+
# First install the dependencies (as they change less often)
COPY --from=pruner /app/out/pnpm-lock.yaml ./pnpm-lock.yaml
COPY --from=pruner /app/out/pnpm-workspace.yaml ./pnpm-workspace.yaml
diff --git a/worker/package.json b/worker/package.json
index 694658eff8..2997984744 100644
--- a/worker/package.json
+++ b/worker/package.json
@@ -36,6 +36,7 @@
"@ag-ui/mastra": "1.1.1",
"@repo/langfuse-skills": "workspace:*",
"@appsignal/opentelemetry-instrumentation-bullmq": "^0.8.0",
+ "@langfuse/native": "workspace:*",
"@langfuse/shared": "workspace:*",
"@aws-sdk/client-lambda-microvms": "catalog:",
"@mastra/core": "1.46.0",
diff --git a/worker/src/__tests__/nativeHello.unit.test.ts b/worker/src/__tests__/nativeHello.unit.test.ts
new file mode 100644
index 0000000000..77eded81a9
--- /dev/null
+++ b/worker/src/__tests__/nativeHello.unit.test.ts
@@ -0,0 +1,124 @@
+import { execFileSync } from "node:child_process";
+import { createSocket } from "node:dgram";
+import { once } from "node:events";
+import { createRequire } from "node:module";
+import { afterAll, beforeAll, describe, expect, it } from "vitest";
+import { hello, initTelemetry } from "@langfuse/native";
+
+// The addon sends DogStatsD datagrams itself, so capture them on a throwaway
+// UDP socket instead of mocking anything on the Node side.
+const socket = createSocket("udp4");
+const received: string[] = [];
+socket.on("message", (message) => {
+ received.push(...message.toString("utf8").split("\n"));
+});
+
+type Metric = { name: string; value: number; type: string; tags: string[] };
+
+const parseDogStatsD = (line: string): Metric => {
+ const [nameAndValue, type, ...rest] = line.split("|");
+ const [name, value] = nameAndValue.split(":");
+ const tags =
+ rest
+ .find((part) => part.startsWith("#"))
+ ?.slice(1)
+ .split(",")
+ .sort() ?? [];
+ return { name, value: Number(value), type, tags };
+};
+
+const helloCalls = () =>
+ received
+ .filter((line) => line.startsWith("langfuse.native.hello_calls:"))
+ .map(parseDogStatsD);
+
+const sumBySource = (source: string) =>
+ helloCalls()
+ .filter((metric) => metric.tags.includes(`source:${source}`))
+ .reduce((sum, metric) => sum + metric.value, 0);
+
+const waitUntil = async (condition: () => boolean, timeoutMs = 5_000) => {
+ const deadline = Date.now() + timeoutMs;
+ while (!condition()) {
+ if (Date.now() > deadline) {
+ throw new Error(
+ `timed out; datagrams so far: ${JSON.stringify(received)}`,
+ );
+ }
+ await new Promise((resolve) => setTimeout(resolve, 25));
+ }
+};
+
+describe("@langfuse/native telemetry", () => {
+ beforeAll(async () => {
+ socket.bind(0, "127.0.0.1");
+ await once(socket, "listening");
+ // Global tags are read from the environment at init, like dd-trace does.
+ process.env.DD_SERVICE = "langfuse-worker-test";
+ process.env.DD_ENV = "unit";
+ process.env.DD_TAGS = "team:data-platform";
+ initTelemetry({
+ dogstatsdAddress: `127.0.0.1:${socket.address().port}`,
+ flushIntervalMs: 50,
+ });
+ });
+
+ afterAll(() => {
+ socket.close();
+ });
+
+ it("counts hello calls straight into DogStatsD, tagged like dd-trace metrics", async () => {
+ hello("startup");
+ hello("health");
+ hello("health");
+
+ await waitUntil(
+ () => sumBySource("startup") >= 1 && sumBySource("health") >= 2,
+ );
+
+ expect(sumBySource("startup")).toBe(1);
+ expect(sumBySource("health")).toBe(2);
+ for (const metric of helloCalls()) {
+ expect(metric.type).toBe("c");
+ expect(metric.tags).toEqual(
+ expect.arrayContaining([
+ "env:unit",
+ "service:langfuse-worker-test",
+ "team:data-platform",
+ ]),
+ );
+ }
+ });
+
+ it("logs to stdout as JSON in the worker logger's shape", () => {
+ // A child process, because the log subscriber is installed once per
+ // process and this one already has it configured for text output.
+ const addonPath = createRequire(import.meta.url).resolve(
+ "@langfuse/native",
+ );
+ const script = [
+ `const { initTelemetry, hello } = require(${JSON.stringify(addonPath)});`,
+ // Port 9 is the discard port; no agent listens there.
+ `initTelemetry({ dogstatsdAddress: "127.0.0.1:9" });`,
+ `hello("startup");`,
+ ].join("\n");
+ const stdout = execFileSync(process.execPath, ["-e", script], {
+ encoding: "utf8",
+ env: {
+ ...process.env,
+ LANGFUSE_LOG_FORMAT: "json",
+ LANGFUSE_LOG_LEVEL: "debug",
+ },
+ });
+
+ const lines = stdout
+ .trim()
+ .split("\n")
+ .map((line) => JSON.parse(line) as Record<string, unknown>);
+ const helloLine = lines.find(
+ (line) => line.message === "hello from the native addon",
+ );
+ expect(helloLine).toMatchObject({ level: "DEBUG", source: "startup" });
+ expect(typeof helloLine?.timestamp).toBe("string");
+ });
+});
diff --git a/worker/src/api/index.ts b/worker/src/api/index.ts
index 367ac15d99..4a9183bf40 100644
--- a/worker/src/api/index.ts
+++ b/worker/src/api/index.ts
@@ -1,12 +1,16 @@
import express from "express";
import { traceException } from "@langfuse/shared/src/server";
+import { hello } from "@langfuse/native";
import { checkContainerHealth } from "../features/health";
import { logger } from "@langfuse/shared/src/server";
const router = express.Router();
router.get<{}, { status: string }>("/health", async (req, res) => {
try {
+ // Exercise the Rust addon on every probe so a worker whose native module
+ // stopped working is reported unhealthy, and its metric keeps a heartbeat.
+ hello("health");
await checkContainerHealth(res, {
failOnSigterm: false,
failIfEventPropagationStuck:
diff --git a/worker/src/initialize.ts b/worker/src/initialize.ts
index f751141372..8382b6c54f 100644
--- a/worker/src/initialize.ts
+++ b/worker/src/initialize.ts
@@ -1,9 +1,34 @@
import { upsertDefaultModelPrices } from "./scripts/upsertDefaultModelPrices";
import { upsertLangfuseDashboards } from "./scripts/upsertLangfuseDashboards";
-import { initializeClickhouseCompatibility } from "@langfuse/shared/src/server";
+import { hello, initTelemetry } from "@langfuse/native";
+import {
+ initializeClickhouseCompatibility,
+ logger,
+ recordIncrement,
+} from "@langfuse/shared/src/server";
export const initializeWorker = async (): Promise<void> => {
+ initializeNativeAddon();
+
await initializeClickhouseCompatibility();
await Promise.all([upsertDefaultModelPrices(), upsertLangfuseDashboards()]);
};
+
+// Two separate success signals. The addon must load and run, or the build is
+// broken: hello() is deliberately unguarded and stops the worker. Whether the
+// addon's own telemetry could be set up is an operational concern that must
+// not keep the worker from processing jobs, so that failure is reported
+// through the Node side's logger and metrics instead (the addon records its
+// own metrics and logs once initialised; see packages/native/README.md).
+const initializeNativeAddon = (): void => {
+ try {
+ initTelemetry();
+ } catch (error) {
+ logger.error("Native telemetry initialisation failed", {
+ error: error instanceof Error ? error.message : String(error),
+ });
+ recordIncrement("langfuse.native.telemetry_init_failed");
+ }
+ hello("startup");
+};