From cca20c96b0b3c704c6428e4b665af2da82397e1d Mon Sep 17 00:00:00 2001 From: MohammadHaroonAbuomar <40180927+MohammadHaroonAbuomar@users.noreply.github.com> Date: Fri, 7 Aug 2026 06:02:04 +0000 Subject: [PATCH 1/4] feat(python): add Verdict.allow() constructor sugar Every other SDK exposes a no-argument trivial-permit constructor (Rust Verdict::allow, TypeScript Verdict.allow(), .NET Verdict.Allow, Go AllowVerdict); Python offered only the module-level ALLOW constant. Add the classmethod for cross-SDK naming parity and switch the README interceptor example to the sugar forms. Signed-off-by: MohammadHaroonAbuomar <40180927+MohammadHaroonAbuomar@users.noreply.github.com> --- sdk/python/README.md | 13 +++++++------ sdk/python/python/agent_hooks/_types.py | 5 +++++ sdk/python/tests/test_types.py | 10 ++++++++++ 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/sdk/python/README.md b/sdk/python/README.md index 1c2520e..3a73872 100644 --- a/sdk/python/README.md +++ b/sdk/python/README.md @@ -40,18 +40,19 @@ result = invoke_tool(ctx["tool_call"]["args"]) # post-transform args ## Interceptor usage ```python -from agent_hooks import AgentContext, Decision, Verdict +from agent_hooks import AgentContext, Verdict + class MyPolicy: def intercept(self, ctx: AgentContext) -> Verdict: if ctx["interception_point"] == "pre_tool_call" and ctx["tool_call"]["name"] == "rm": - return Verdict(decision=Decision.DENY, reason="dangerous") - return Verdict(decision=Decision.ALLOW) + return Verdict.deny(reason="dangerous") + return Verdict.allow() ``` -`Verdict.warn(...)` (allow + recorded warning) and `Verdict.escalate(...)` -(liftable deny for the approval seam, §9) are the constructor shortcuts for -the other two §5 shapes. +`Verdict.allow()`, `Verdict.deny(...)`, `Verdict.warn(...)` (allow + recorded +warning) and `Verdict.escalate(...)` (liftable deny for the approval seam, §9) +are the constructor shortcuts for the §5 shapes. ## Running the CTK against your framework diff --git a/sdk/python/python/agent_hooks/_types.py b/sdk/python/python/agent_hooks/_types.py index f70ed9d..2389641 100644 --- a/sdk/python/python/agent_hooks/_types.py +++ b/sdk/python/python/agent_hooks/_types.py @@ -205,6 +205,11 @@ def is_liftable(self) -> bool: """A deny carrying an ``approval`` block (§5.1).""" return self.decision is Decision.DENY and self.approval is not None + @classmethod + def allow(cls) -> Verdict: + """The trivial permit verdict.""" + return cls(decision=Decision.ALLOW) + @classmethod def warn(cls, *, reason: str | None = None, message: str | None = None) -> Verdict: """Constructor sugar for what earlier drafts called ``warn``: an diff --git a/sdk/python/tests/test_types.py b/sdk/python/tests/test_types.py index 739a94f..1e57779 100644 --- a/sdk/python/tests/test_types.py +++ b/sdk/python/tests/test_types.py @@ -46,6 +46,16 @@ def test_approval_only_on_deny(self) -> None: assert v.is_liftable assert not Verdict(decision=Decision.DENY).is_liftable + def test_allow_sugar_is_trivial_permit(self) -> None: + from agent_hooks import ALLOW + + v = Verdict.allow() + assert v.decision is Decision.ALLOW + assert v == ALLOW + assert v.warnings == () + assert v.approval is None + assert not v.is_liftable + def test_warn_sugar_is_allow_with_warning(self) -> None: v = Verdict.warn(reason="pii", message="found ssn") assert v.decision is Decision.ALLOW From c77db832187e28c845f10ecd76c01b6a97599e3c Mon Sep 17 00:00:00 2001 From: MohammadHaroonAbuomar <40180927+MohammadHaroonAbuomar@users.noreply.github.com> Date: Fri, 7 Aug 2026 06:02:15 +0000 Subject: [PATCH 2/4] feat(typescript): ship a prebuilt linux-arm64-gnu platform package MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add aarch64-unknown-linux-gnu to the napi target set with a committed npm/linux-arm64-gnu package dir (standard napi-rs layout; the loader already resolves it), build it natively on the ubuntu-24.04-arm hosted runner in the release matrix, and extend the publish-time optionalDependencies injection plus the publish loop. A never-published npm package cannot carry a trusted publisher, so its first OIDC publish fails; the publish loop now fails soft for exactly that case (warning, run continues) — bootstrap the package, configure its trusted publisher, and rerun the idempotent workflow. musl targets stay unshipped: the pipeline builds on native runners only and linux-x64-musl does not ship either; a musl pair can land together later. Signed-off-by: MohammadHaroonAbuomar <40180927+MohammadHaroonAbuomar@users.noreply.github.com> --- .github/workflows/release.yml | 32 +++++++++++++------ docs-site/docs/quickstart/typescript.md | 4 +-- sdk/typescript/README.md | 12 +++---- sdk/typescript/npm/linux-arm64-gnu/README.md | 3 ++ .../npm/linux-arm64-gnu/package.json | 27 ++++++++++++++++ sdk/typescript/package.json | 3 +- 6 files changed, 62 insertions(+), 19 deletions(-) create mode 100644 sdk/typescript/npm/linux-arm64-gnu/README.md create mode 100644 sdk/typescript/npm/linux-arm64-gnu/package.json diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 216ab30..2d7aa95 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,8 +24,10 @@ # on the package (repo responsibleai/agent-hooks, workflow # release.yml, environment release) at # npmjs.com > package > Settings > Trusted Publisher. -# No token; all five packages (loader + four platform -# packages) have trusted publishers configured. +# No token; every package (the loader + each platform +# package) needs its own trusted publisher. A brand-new +# platform package cannot be configured before its first +# publish, so its leg fails soft (see the npm publish step). # NuGet — trusted publishing (OIDC): configure a Trusted Publishing # policy on nuget.org (repo responsibleai/agent-hooks, # workflow release.yml, environment release); the NuGet/login @@ -211,10 +213,11 @@ jobs: fail-fast: false matrix: include: - - { os: ubuntu-latest, target: x86_64-unknown-linux-gnu } - - { os: macos-latest, target: aarch64-apple-darwin } - - { os: macos-latest, target: x86_64-apple-darwin } - - { os: windows-latest, target: x86_64-pc-windows-msvc } + - { os: ubuntu-latest, target: x86_64-unknown-linux-gnu } + - { os: ubuntu-24.04-arm, target: aarch64-unknown-linux-gnu } + - { os: macos-latest, target: aarch64-apple-darwin } + - { os: macos-latest, target: x86_64-apple-darwin } + - { os: windows-latest, target: x86_64-pc-windows-msvc } runs-on: ${{ matrix.os }} permissions: contents: read @@ -278,7 +281,7 @@ jobs: sdk/typescript/npm/**/*.node - name: Publish to npm (platform packages, then the loader package) if: env.DRY_RUN != 'true' - # OIDC trusted publishing: no token. Each package (the four + # OIDC trusted publishing: no token. Each package (the # platform packages and the loader) has its own trusted # publisher on npmjs.com (repo responsibleai/agent-hooks, # workflow release.yml, environment release). The repo is @@ -299,20 +302,29 @@ jobs: node -e ' const fs = require("fs"); const p = JSON.parse(fs.readFileSync("package.json", "utf8")); - const targets = ["linux-x64-gnu","darwin-x64","darwin-arm64","win32-x64-msvc"]; + const targets = ["linux-x64-gnu","linux-arm64-gnu","darwin-x64","darwin-arm64","win32-x64-msvc"]; p.optionalDependencies = Object.fromEntries( targets.map(t => ["@responsibleai/agent-hooks-" + t, p.version])); fs.writeFileSync("package.json", JSON.stringify(p, null, 2) + "\n"); ' - for dir in npm/linux-x64-gnu npm/darwin-x64 npm/darwin-arm64 npm/win32-x64-msvc .; do + for dir in npm/linux-x64-gnu npm/linux-arm64-gnu npm/darwin-x64 npm/darwin-arm64 npm/win32-x64-msvc .; do name=$(node -p "require('./$dir/package.json').name") if [ "$dir" != "." ] && ! ls "$dir"/*.node >/dev/null 2>&1; then echo "::error::$name has no native artifact"; exit 1 fi if npm view "$name@$V" version >/dev/null 2>&1; then echo "$name@$V already on npm — skipping" + elif (cd "$dir" && npm publish --access public --tag "$T"); then + : + elif ! npm view "$name" name >/dev/null 2>&1; then + # npm trusted publishing cannot be configured for a package + # that has never been published, so a brand-new platform + # package fails its first OIDC publish. Fail soft: consumers + # tolerate a missing optionalDependency; bootstrap the + # package manually, then rerun this workflow (idempotent). + echo "::warning::$name@$V first publish failed — bootstrap the new package on npmjs.com (one-time token publish), configure its trusted publisher, then rerun" else - (cd "$dir" && npm publish --access public --tag "$T") + exit 1 fi done working-directory: sdk/typescript diff --git a/docs-site/docs/quickstart/typescript.md b/docs-site/docs/quickstart/typescript.md index 413d105..69f1502 100644 --- a/docs-site/docs/quickstart/typescript.md +++ b/docs-site/docs/quickstart/typescript.md @@ -5,8 +5,8 @@ npm install @responsibleai/agent-hooks ``` The package resolves a prebuilt native binary for your platform through -`optionalDependencies` (linux-x64-gnu, darwin-x64, darwin-arm64, -win32-x64-msvc today). +`optionalDependencies` (linux-x64-gnu, linux-arm64-gnu, darwin-x64, +darwin-arm64, win32-x64-msvc today). A minimal host with one control interceptor: diff --git a/sdk/typescript/README.md b/sdk/typescript/README.md index bcd0831..deb6559 100644 --- a/sdk/typescript/README.md +++ b/sdk/typescript/README.md @@ -48,10 +48,10 @@ rejected fail-closed by a pre-serialization scan. ## Native module deployment -The npm package bundles the napi-rs native module (`*.node`) **for the -platform it was built on** — the published alpha ships `linux-x64-gnu` -only. On other platforms, install from source (needs a Rust toolchain): -`npm run build` produces the module for your host platform. Per-platform +The napi-rs native module (`*.node`) ships as per-platform `optionalDependencies` packages (the standard napi-rs multi-platform -layout) are planned. A platform mismatch fails at `require` time with a -module-load error naming the missing `.node` binary. +layout): `linux-x64-gnu`, `linux-arm64-gnu`, `darwin-x64`, +`darwin-arm64` and `win32-x64-msvc`. On other platforms, install from +source (needs a Rust toolchain): `npm run build` produces the module +for your host platform. A platform mismatch fails at `require` time +with a module-load error naming the missing `.node` binary. diff --git a/sdk/typescript/npm/linux-arm64-gnu/README.md b/sdk/typescript/npm/linux-arm64-gnu/README.md new file mode 100644 index 0000000..5a84d3f --- /dev/null +++ b/sdk/typescript/npm/linux-arm64-gnu/README.md @@ -0,0 +1,3 @@ +# `@responsibleai/agent-hooks-linux-arm64-gnu` + +This is the **aarch64-unknown-linux-gnu** binary for `@responsibleai/agent-hooks` diff --git a/sdk/typescript/npm/linux-arm64-gnu/package.json b/sdk/typescript/npm/linux-arm64-gnu/package.json new file mode 100644 index 0000000..9ff05b5 --- /dev/null +++ b/sdk/typescript/npm/linux-arm64-gnu/package.json @@ -0,0 +1,27 @@ +{ + "name": "@responsibleai/agent-hooks-linux-arm64-gnu", + "version": "0.1.0-alpha.5", + "cpu": [ + "arm64" + ], + "main": "agent-hooks.linux-arm64-gnu.node", + "files": [ + "agent-hooks.linux-arm64-gnu.node" + ], + "description": "Prebuilt linux-arm64-gnu native binary for @responsibleai/agent-hooks.", + "license": "MIT", + "engines": { + "node": ">=20" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/responsibleai/agent-hooks.git", + "directory": "sdk/typescript" + }, + "os": [ + "linux" + ], + "libc": [ + "glibc" + ] +} diff --git a/sdk/typescript/package.json b/sdk/typescript/package.json index a0a7054..c0669bd 100644 --- a/sdk/typescript/package.json +++ b/sdk/typescript/package.json @@ -1,6 +1,6 @@ { "name": "@responsibleai/agent-hooks", - "version": "0.1.0-alpha.4", + "version": "0.1.0-alpha.5", "description": "Framework-neutral agent control contract (AGENT-HOOKS-0.1). TypeScript wrapper over the canonical Rust core. Cooperative contract, not a security boundary: the host is fully trusted (see SECURITY.md).", "license": "MIT", "main": "./dist/index.js", @@ -23,6 +23,7 @@ "binaryName": "agent-hooks", "targets": [ "x86_64-unknown-linux-gnu", + "aarch64-unknown-linux-gnu", "x86_64-apple-darwin", "aarch64-apple-darwin", "x86_64-pc-windows-msvc" From cf9e6db2a3db9207d17b06c96961756aca47812e Mon Sep 17 00:00:00 2001 From: MohammadHaroonAbuomar <40180927+MohammadHaroonAbuomar@users.noreply.github.com> Date: Fri, 7 Aug 2026 06:02:22 +0000 Subject: [PATCH 3/4] chore(release): bump version surfaces to 0.1.0-alpha.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit All four SDK manifests, their lockfiles and the committed npm platform package dirs move to 0.1.0-alpha.5 (scripts/check-version-consistency passes). The CHANGELOG folds the Unreleased §12.1 spec items (#64) into the alpha.5 section alongside Python Verdict.allow() and the new linux-arm64-gnu napi target. Signed-off-by: MohammadHaroonAbuomar <40180927+MohammadHaroonAbuomar@users.noreply.github.com> --- CHANGELOG.md | 15 ++++++++++++++- sdk/dotnet/Directory.Build.props | 2 +- sdk/python/Cargo.lock | 4 ++-- sdk/python/Cargo.toml | 2 +- sdk/python/pyproject.toml | 2 +- sdk/rust/Cargo.lock | 4 ++-- sdk/rust/Cargo.toml | 2 +- sdk/typescript/Cargo.lock | 4 ++-- sdk/typescript/Cargo.toml | 2 +- sdk/typescript/npm/darwin-arm64/package.json | 2 +- sdk/typescript/npm/darwin-x64/package.json | 2 +- sdk/typescript/npm/linux-x64-gnu/package.json | 2 +- sdk/typescript/npm/win32-x64-msvc/package.json | 2 +- sdk/typescript/package-lock.json | 4 ++-- 14 files changed, 31 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f3b61d..a7e6f3b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,8 +3,21 @@ User-visible changes to the spec and SDKs. Versioning rules: [VERSIONING.md](VERSIONING.md). -## Unreleased +## 0.1.0-alpha.5 — tag `v0.1.0-alpha.5` +- **Python: `Verdict.allow()` constructor sugar,** completing the + cross-SDK vocabulary: Rust `Verdict::allow`, TypeScript + `Verdict.allow()`, .NET `Verdict.Allow` and Go `AllowVerdict` + already existed; Python exposed only the module-level `ALLOW` + constant. The Python README interceptor example now uses the sugar + throughout. +- **npm: prebuilt `linux-arm64-gnu` binary.** The TypeScript loader + gains a fifth platform package + (`@responsibleai/agent-hooks-linux-arm64-gnu`, + `aarch64-unknown-linux-gnu`), built natively on the arm64 hosted + runner. musl (Alpine) targets remain unshipped — the pipeline + builds on native runners only, and `linux-x64-musl` does not ship + either; a musl pair can land together later. - **§12.1 admits incremental mediation.** Previously a host had to assemble the complete response before `post_model_call` with no exception, so a host mediating a stream incrementally (e.g. per ACS diff --git a/sdk/dotnet/Directory.Build.props b/sdk/dotnet/Directory.Build.props index cb7b104..2143b14 100644 --- a/sdk/dotnet/Directory.Build.props +++ b/sdk/dotnet/Directory.Build.props @@ -8,7 +8,7 @@ Responsible AI MIT https://github.com/responsibleai/agent-hooks - 0.1.0-alpha.4 + 0.1.0-alpha.5 true diff --git a/sdk/python/Cargo.lock b/sdk/python/Cargo.lock index 1de6924..6c179b5 100644 --- a/sdk/python/Cargo.lock +++ b/sdk/python/Cargo.lock @@ -4,7 +4,7 @@ version = 4 [[package]] name = "agent-hooks-python" -version = "0.1.0-alpha.4" +version = "0.1.0-alpha.5" dependencies = [ "agent-hooks-sdk", "pyo3", @@ -13,7 +13,7 @@ dependencies = [ [[package]] name = "agent-hooks-sdk" -version = "0.1.0-alpha.4" +version = "0.1.0-alpha.5" dependencies = [ "async-trait", "futures-util", diff --git a/sdk/python/Cargo.toml b/sdk/python/Cargo.toml index de975fb..08abe0f 100644 --- a/sdk/python/Cargo.toml +++ b/sdk/python/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "agent-hooks-python" -version = "0.1.0-alpha.4" +version = "0.1.0-alpha.5" edition = "2021" license = "MIT" description = "PyO3 bindings for the agent-hooks Rust core." diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml index 66c8a8a..4ef8e2d 100644 --- a/sdk/python/pyproject.toml +++ b/sdk/python/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "maturin" # similarity check blocks all separator variants (incl. agenthooks). # Import name stays agent_hooks. name = "agent-hooks-sdk" -version = "0.1.0a4" +version = "0.1.0a5" description = "Framework-neutral agent control contract: interception points, agent context, verdict, and conformance test kit. Python wrapper over the canonical Rust core. Cooperative contract, not a security boundary: the host is fully trusted (see SECURITY.md)." readme = "README.md" requires-python = ">=3.10" diff --git a/sdk/rust/Cargo.lock b/sdk/rust/Cargo.lock index 1f26e97..5c03cfe 100644 --- a/sdk/rust/Cargo.lock +++ b/sdk/rust/Cargo.lock @@ -4,14 +4,14 @@ version = 3 [[package]] name = "agent-hooks-ffi" -version = "0.1.0-alpha.4" +version = "0.1.0-alpha.5" dependencies = [ "agent-hooks-sdk", ] [[package]] name = "agent-hooks-sdk" -version = "0.1.0-alpha.4" +version = "0.1.0-alpha.5" dependencies = [ "async-trait", "criterion", diff --git a/sdk/rust/Cargo.toml b/sdk/rust/Cargo.toml index 1e1a526..8c750c7 100644 --- a/sdk/rust/Cargo.toml +++ b/sdk/rust/Cargo.toml @@ -3,7 +3,7 @@ resolver = "2" members = ["core", "ffi"] [workspace.package] -version = "0.1.0-alpha.4" +version = "0.1.0-alpha.5" edition = "2021" rust-version = "1.75" license = "MIT" diff --git a/sdk/typescript/Cargo.lock b/sdk/typescript/Cargo.lock index 4c575a9..e8c9efa 100644 --- a/sdk/typescript/Cargo.lock +++ b/sdk/typescript/Cargo.lock @@ -4,7 +4,7 @@ version = 4 [[package]] name = "agent-hooks-node" -version = "0.1.0-alpha.4" +version = "0.1.0-alpha.5" dependencies = [ "agent-hooks-sdk", "napi", @@ -14,7 +14,7 @@ dependencies = [ [[package]] name = "agent-hooks-sdk" -version = "0.1.0-alpha.4" +version = "0.1.0-alpha.5" dependencies = [ "async-trait", "futures-util", diff --git a/sdk/typescript/Cargo.toml b/sdk/typescript/Cargo.toml index 12d334a..0e7232a 100644 --- a/sdk/typescript/Cargo.toml +++ b/sdk/typescript/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "agent-hooks-node" -version = "0.1.0-alpha.4" +version = "0.1.0-alpha.5" edition = "2021" license = "MIT" description = "napi-rs bindings for the agent-hooks Rust core." diff --git a/sdk/typescript/npm/darwin-arm64/package.json b/sdk/typescript/npm/darwin-arm64/package.json index b270a91..6a236b0 100644 --- a/sdk/typescript/npm/darwin-arm64/package.json +++ b/sdk/typescript/npm/darwin-arm64/package.json @@ -1,6 +1,6 @@ { "name": "@responsibleai/agent-hooks-darwin-arm64", - "version": "0.1.0-alpha.4", + "version": "0.1.0-alpha.5", "cpu": [ "arm64" ], diff --git a/sdk/typescript/npm/darwin-x64/package.json b/sdk/typescript/npm/darwin-x64/package.json index 64978f6..21de112 100644 --- a/sdk/typescript/npm/darwin-x64/package.json +++ b/sdk/typescript/npm/darwin-x64/package.json @@ -1,6 +1,6 @@ { "name": "@responsibleai/agent-hooks-darwin-x64", - "version": "0.1.0-alpha.4", + "version": "0.1.0-alpha.5", "cpu": [ "x64" ], diff --git a/sdk/typescript/npm/linux-x64-gnu/package.json b/sdk/typescript/npm/linux-x64-gnu/package.json index 8871874..7d9492c 100644 --- a/sdk/typescript/npm/linux-x64-gnu/package.json +++ b/sdk/typescript/npm/linux-x64-gnu/package.json @@ -1,6 +1,6 @@ { "name": "@responsibleai/agent-hooks-linux-x64-gnu", - "version": "0.1.0-alpha.4", + "version": "0.1.0-alpha.5", "cpu": [ "x64" ], diff --git a/sdk/typescript/npm/win32-x64-msvc/package.json b/sdk/typescript/npm/win32-x64-msvc/package.json index 775fafb..2c9409d 100644 --- a/sdk/typescript/npm/win32-x64-msvc/package.json +++ b/sdk/typescript/npm/win32-x64-msvc/package.json @@ -1,6 +1,6 @@ { "name": "@responsibleai/agent-hooks-win32-x64-msvc", - "version": "0.1.0-alpha.4", + "version": "0.1.0-alpha.5", "cpu": [ "x64" ], diff --git a/sdk/typescript/package-lock.json b/sdk/typescript/package-lock.json index e2e58db..9ed4955 100644 --- a/sdk/typescript/package-lock.json +++ b/sdk/typescript/package-lock.json @@ -1,12 +1,12 @@ { "name": "@responsibleai/agent-hooks", - "version": "0.1.0-alpha.4", + "version": "0.1.0-alpha.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@responsibleai/agent-hooks", - "version": "0.1.0-alpha.4", + "version": "0.1.0-alpha.5", "license": "MIT", "devDependencies": { "@napi-rs/cli": "^3.7.2", From b27139afb28cdfc1b4c089e5e7b4f837e074397c Mon Sep 17 00:00:00 2001 From: MohammadHaroonAbuomar <40180927+MohammadHaroonAbuomar@users.noreply.github.com> Date: Fri, 7 Aug 2026 06:06:16 +0000 Subject: [PATCH 4/4] chore(typescript): regenerate binding.js for the alpha.5 version bump The generated loader embeds the package version in its NAPI_RS_ENFORCE_VERSION_CHECK guards; the CI drift gate rebuilds and diffs it, so the bump must ship the regenerated file. Version strings are the only change. Signed-off-by: MohammadHaroonAbuomar <40180927+MohammadHaroonAbuomar@users.noreply.github.com> --- sdk/typescript/binding.js | 108 +++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 54 deletions(-) diff --git a/sdk/typescript/binding.js b/sdk/typescript/binding.js index b6ef6e9..5774c59 100644 --- a/sdk/typescript/binding.js +++ b/sdk/typescript/binding.js @@ -77,8 +77,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-android-arm64') const bindingPackageVersion = require('@responsibleai/agent-hooks-android-arm64/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -93,8 +93,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-android-arm-eabi') const bindingPackageVersion = require('@responsibleai/agent-hooks-android-arm-eabi/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -114,8 +114,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-win32-x64-gnu') const bindingPackageVersion = require('@responsibleai/agent-hooks-win32-x64-gnu/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -130,8 +130,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-win32-x64-msvc') const bindingPackageVersion = require('@responsibleai/agent-hooks-win32-x64-msvc/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -147,8 +147,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-win32-ia32-msvc') const bindingPackageVersion = require('@responsibleai/agent-hooks-win32-ia32-msvc/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -163,8 +163,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-win32-arm64-msvc') const bindingPackageVersion = require('@responsibleai/agent-hooks-win32-arm64-msvc/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -182,8 +182,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-darwin-universal') const bindingPackageVersion = require('@responsibleai/agent-hooks-darwin-universal/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -198,8 +198,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-darwin-x64') const bindingPackageVersion = require('@responsibleai/agent-hooks-darwin-x64/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -214,8 +214,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-darwin-arm64') const bindingPackageVersion = require('@responsibleai/agent-hooks-darwin-arm64/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -234,8 +234,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-freebsd-x64') const bindingPackageVersion = require('@responsibleai/agent-hooks-freebsd-x64/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -250,8 +250,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-freebsd-arm64') const bindingPackageVersion = require('@responsibleai/agent-hooks-freebsd-arm64/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -271,8 +271,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-linux-x64-musl') const bindingPackageVersion = require('@responsibleai/agent-hooks-linux-x64-musl/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -287,8 +287,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-linux-x64-gnu') const bindingPackageVersion = require('@responsibleai/agent-hooks-linux-x64-gnu/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -305,8 +305,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-linux-arm64-musl') const bindingPackageVersion = require('@responsibleai/agent-hooks-linux-arm64-musl/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -321,8 +321,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-linux-arm64-gnu') const bindingPackageVersion = require('@responsibleai/agent-hooks-linux-arm64-gnu/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -339,8 +339,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-linux-arm-musleabihf') const bindingPackageVersion = require('@responsibleai/agent-hooks-linux-arm-musleabihf/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -355,8 +355,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-linux-arm-gnueabihf') const bindingPackageVersion = require('@responsibleai/agent-hooks-linux-arm-gnueabihf/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -373,8 +373,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-linux-loong64-musl') const bindingPackageVersion = require('@responsibleai/agent-hooks-linux-loong64-musl/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -389,8 +389,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-linux-loong64-gnu') const bindingPackageVersion = require('@responsibleai/agent-hooks-linux-loong64-gnu/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -407,8 +407,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-linux-riscv64-musl') const bindingPackageVersion = require('@responsibleai/agent-hooks-linux-riscv64-musl/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -423,8 +423,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-linux-riscv64-gnu') const bindingPackageVersion = require('@responsibleai/agent-hooks-linux-riscv64-gnu/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -440,8 +440,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-linux-ppc64-gnu') const bindingPackageVersion = require('@responsibleai/agent-hooks-linux-ppc64-gnu/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -456,8 +456,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-linux-s390x-gnu') const bindingPackageVersion = require('@responsibleai/agent-hooks-linux-s390x-gnu/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -476,8 +476,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-openharmony-arm64') const bindingPackageVersion = require('@responsibleai/agent-hooks-openharmony-arm64/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -492,8 +492,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-openharmony-x64') const bindingPackageVersion = require('@responsibleai/agent-hooks-openharmony-x64/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -508,8 +508,8 @@ function requireNative() { try { const binding = require('@responsibleai/agent-hooks-openharmony-arm') const bindingPackageVersion = require('@responsibleai/agent-hooks-openharmony-arm/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4' && 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.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5' && 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.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } return binding } catch (e) { @@ -648,8 +648,8 @@ if (!nativeBinding || forceWasi) { if (!candidateFailed) { if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') { const bindingPackageVersion = require('@responsibleai/agent-hooks-wasm32-wasi/package.json').version - if (bindingPackageVersion !== '0.1.0-alpha.4') { - throw new Error(`WASI binding package version mismatch, expected 0.1.0-alpha.4 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) + if (bindingPackageVersion !== '0.1.0-alpha.5') { + throw new Error(`WASI binding package version mismatch, expected 0.1.0-alpha.5 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`) } } wasiBinding = require('@responsibleai/agent-hooks-wasm32-wasi')