@atbash/sdk 0.19.1-dev.0 → 0.19.2-dev.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -211,6 +211,7 @@ below is the whole of it.
211
211
  | `error.class` | `AtbashAPIError` |
212
212
  | `error.status` / `error.path` | `404`, `/api/v1/judge` — the route, never its query string |
213
213
  | `sdk.version` | `0.18.0` |
214
+ | `sdk.language` | `node`, `python` — which binding sent it |
214
215
  | `chain` | the blockchain RID — public infrastructure, and it names no customer |
215
216
  | `agent.hash` | SHA-256 of the agent's **public** key, never the key itself |
216
217
  | `source` | `sdk`, `cli`, `plugin:openclaw` |
@@ -1780,16 +1780,6 @@ interface OperationEvent {
1780
1780
  }
1781
1781
  /** Hashes an agent key for emission. Supplied by `setupTelemetry`. */
1782
1782
  type AgentKeyHasher = (pubkeyHex: string) => string;
1783
- /**
1784
- * Point this module at a logger, or at nothing.
1785
- *
1786
- * Called by `setupTelemetry` once the shared exporter exists, so events and
1787
- * counters travel the same authenticated route and share one opt-out decision.
1788
- *
1789
- * @param next - Logger to emit through, or null to disable.
1790
- * @param opts - Version and source stamped on every event, and the hasher
1791
- * applied to the agent key. Without a hasher, the agent field is dropped.
1792
- */
1793
1783
  declare function configureEvents(next: Logger | null, opts?: {
1794
1784
  version?: string;
1795
1785
  source?: string;
package/dist/browser.mjs CHANGED
@@ -44748,11 +44748,12 @@ function eventsOptedOut() {
44748
44748
  const flag = process.env.ATBASH_TELEMETRY_EVENTS_DISABLED?.trim().toLowerCase();
44749
44749
  return Boolean(flag && ["1", "true", "yes", "on"].includes(flag));
44750
44750
  }
44751
+ var SOURCE_SHAPE = /^(?:sdk|cli|plugin:[a-z0-9][a-z0-9._-]{0,31})$/;
44751
44752
  function configureEvents(next, opts = {}) {
44752
44753
  logger2 = next;
44753
44754
  eventsEnabled = next !== null && !eventsOptedOut();
44754
44755
  if (opts.version) sdkVersion = opts.version;
44755
- if (opts.source) eventSource = opts.source;
44756
+ if (opts.source && SOURCE_SHAPE.test(opts.source)) eventSource = opts.source;
44756
44757
  hashAgentKey = opts.hashAgentKey ?? null;
44757
44758
  }
44758
44759
  function eventsAreOn() {
package/dist/index.d.mts CHANGED
@@ -1780,16 +1780,6 @@ interface OperationEvent {
1780
1780
  }
1781
1781
  /** Hashes an agent key for emission. Supplied by `setupTelemetry`. */
1782
1782
  type AgentKeyHasher = (pubkeyHex: string) => string;
1783
- /**
1784
- * Point this module at a logger, or at nothing.
1785
- *
1786
- * Called by `setupTelemetry` once the shared exporter exists, so events and
1787
- * counters travel the same authenticated route and share one opt-out decision.
1788
- *
1789
- * @param next - Logger to emit through, or null to disable.
1790
- * @param opts - Version and source stamped on every event, and the hasher
1791
- * applied to the agent key. Without a hasher, the agent field is dropped.
1792
- */
1793
1783
  declare function configureEvents(next: Logger | null, opts?: {
1794
1784
  version?: string;
1795
1785
  source?: string;
package/dist/index.d.ts CHANGED
@@ -1780,16 +1780,6 @@ interface OperationEvent {
1780
1780
  }
1781
1781
  /** Hashes an agent key for emission. Supplied by `setupTelemetry`. */
1782
1782
  type AgentKeyHasher = (pubkeyHex: string) => string;
1783
- /**
1784
- * Point this module at a logger, or at nothing.
1785
- *
1786
- * Called by `setupTelemetry` once the shared exporter exists, so events and
1787
- * counters travel the same authenticated route and share one opt-out decision.
1788
- *
1789
- * @param next - Logger to emit through, or null to disable.
1790
- * @param opts - Version and source stamped on every event, and the hasher
1791
- * applied to the agent key. Without a hasher, the agent field is dropped.
1792
- */
1793
1783
  declare function configureEvents(next: Logger | null, opts?: {
1794
1784
  version?: string;
1795
1785
  source?: string;
package/dist/index.js CHANGED
@@ -622,11 +622,12 @@ function eventsOptedOut() {
622
622
  const flag = process.env.ATBASH_TELEMETRY_EVENTS_DISABLED?.trim().toLowerCase();
623
623
  return Boolean(flag && ["1", "true", "yes", "on"].includes(flag));
624
624
  }
625
+ var SOURCE_SHAPE = /^(?:sdk|cli|plugin:[a-z0-9][a-z0-9._-]{0,31})$/;
625
626
  function configureEvents(next, opts = {}) {
626
627
  logger = next;
627
628
  eventsEnabled = next !== null && !eventsOptedOut();
628
629
  if (opts.version) sdkVersion = opts.version;
629
- if (opts.source) eventSource = opts.source;
630
+ if (opts.source && SOURCE_SHAPE.test(opts.source)) eventSource = opts.source;
630
631
  hashAgentKey = opts.hashAgentKey ?? null;
631
632
  }
632
633
  function eventsAreOn() {
@@ -673,6 +674,20 @@ var import_sdk_metrics = require("@opentelemetry/sdk-metrics");
673
674
  var import_exporter_logs_otlp_http = require("@opentelemetry/exporter-logs-otlp-http");
674
675
  var import_sdk_logs = require("@opentelemetry/sdk-logs");
675
676
  var import_node_crypto = require("crypto");
677
+ var SDK_VERSION = true ? "0.19.2-dev.0" : "";
678
+ var SDK_LANGUAGE = "node";
679
+ function sdkResourceAttributes() {
680
+ const attrs = {
681
+ "service.name": "atbash-sdk",
682
+ "sdk.language": SDK_LANGUAGE
683
+ };
684
+ if (SDK_VERSION) attrs["sdk.version"] = SDK_VERSION;
685
+ return attrs;
686
+ }
687
+ function sourceOrDefault(candidate) {
688
+ return typeof candidate === "string" && SOURCE_SHAPE.test(candidate) ? candidate : defaultSource;
689
+ }
690
+ var exitHookInstalled = false;
676
691
  var meterProvider = null;
677
692
  var loggerProvider = null;
678
693
  var callCounter = null;
@@ -739,7 +754,7 @@ function customCollector() {
739
754
  function setupTelemetry(config) {
740
755
  if (!config.enabled) return;
741
756
  if (isTelemetryOptedOut()) return;
742
- if (config.source && !sourceExplicitlySet) {
757
+ if (config.source && !sourceExplicitlySet && SOURCE_SHAPE.test(config.source)) {
743
758
  defaultSource = config.source;
744
759
  sourceExplicitlySet = true;
745
760
  }
@@ -779,9 +794,7 @@ function setupTelemetry(config) {
779
794
  exportIntervalMillis: requestedExportIntervalMs ?? 6e4
780
795
  });
781
796
  meterProvider = new import_sdk_metrics.MeterProvider({
782
- resource: (0, import_resources.resourceFromAttributes)({
783
- "service.name": "atbash-sdk"
784
- }),
797
+ resource: (0, import_resources.resourceFromAttributes)(sdkResourceAttributes()),
785
798
  readers: [reader]
786
799
  });
787
800
  const meter = meterProvider.getMeter("atbash-sdk");
@@ -800,12 +813,20 @@ function setupTelemetry(config) {
800
813
  headers: async () => destination.headers()
801
814
  });
802
815
  loggerProvider = new import_sdk_logs.LoggerProvider({
803
- resource: (0, import_resources.resourceFromAttributes)({ "service.name": "atbash-sdk" }),
816
+ resource: (0, import_resources.resourceFromAttributes)(sdkResourceAttributes()),
804
817
  processors: [new import_sdk_logs.BatchLogRecordProcessor({ exporter: logExporter })]
805
818
  });
819
+ if (!exitHookInstalled && typeof process?.once === "function") {
820
+ exitHookInstalled = true;
821
+ process.once("beforeExit", () => {
822
+ shutdownTelemetry().catch(() => {
823
+ });
824
+ });
825
+ }
806
826
  configureEvents(loggerProvider.getLogger("atbash-sdk"), {
807
- source: config.source ?? defaultSource,
808
- hashAgentKey: config.hashAgentKey ?? defaultAgentKeyHasher
827
+ source: sourceOrDefault(config.source),
828
+ hashAgentKey: config.hashAgentKey ?? defaultAgentKeyHasher,
829
+ version: SDK_VERSION
809
830
  });
810
831
  }
811
832
  function recordCall(functionName, source, agentPubkey) {
@@ -813,7 +834,7 @@ function recordCall(functionName, source, agentPubkey) {
813
834
  if (!callCounter) return;
814
835
  callCounter.add(1, {
815
836
  "function.name": functionName,
816
- source: source ?? defaultSource,
837
+ source: sourceOrDefault(source),
817
838
  // Hashed on this path too. The counters and the events export to the same
818
839
  // place in the same request, so a raw key here would make hashing it on
819
840
  // the event beside it pointless.
@@ -825,7 +846,7 @@ function recordDuration(functionName, durationMs, status, source) {
825
846
  durationHistogram.record(durationMs, {
826
847
  "function.name": functionName,
827
848
  status,
828
- source: source ?? defaultSource
849
+ source: sourceOrDefault(source)
829
850
  });
830
851
  }
831
852
  async function flushTelemetry() {
package/dist/index.mjs CHANGED
@@ -495,11 +495,12 @@ function eventsOptedOut() {
495
495
  const flag = process.env.ATBASH_TELEMETRY_EVENTS_DISABLED?.trim().toLowerCase();
496
496
  return Boolean(flag && ["1", "true", "yes", "on"].includes(flag));
497
497
  }
498
+ var SOURCE_SHAPE = /^(?:sdk|cli|plugin:[a-z0-9][a-z0-9._-]{0,31})$/;
498
499
  function configureEvents(next, opts = {}) {
499
500
  logger = next;
500
501
  eventsEnabled = next !== null && !eventsOptedOut();
501
502
  if (opts.version) sdkVersion = opts.version;
502
- if (opts.source) eventSource = opts.source;
503
+ if (opts.source && SOURCE_SHAPE.test(opts.source)) eventSource = opts.source;
503
504
  hashAgentKey = opts.hashAgentKey ?? null;
504
505
  }
505
506
  function eventsAreOn() {
@@ -552,6 +553,20 @@ import {
552
553
  import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-http";
553
554
  import { BatchLogRecordProcessor, LoggerProvider } from "@opentelemetry/sdk-logs";
554
555
  import { createHash } from "crypto";
556
+ var SDK_VERSION = true ? "0.19.2-dev.0" : "";
557
+ var SDK_LANGUAGE = "node";
558
+ function sdkResourceAttributes() {
559
+ const attrs = {
560
+ "service.name": "atbash-sdk",
561
+ "sdk.language": SDK_LANGUAGE
562
+ };
563
+ if (SDK_VERSION) attrs["sdk.version"] = SDK_VERSION;
564
+ return attrs;
565
+ }
566
+ function sourceOrDefault(candidate) {
567
+ return typeof candidate === "string" && SOURCE_SHAPE.test(candidate) ? candidate : defaultSource;
568
+ }
569
+ var exitHookInstalled = false;
555
570
  var meterProvider = null;
556
571
  var loggerProvider = null;
557
572
  var callCounter = null;
@@ -618,7 +633,7 @@ function customCollector() {
618
633
  function setupTelemetry(config) {
619
634
  if (!config.enabled) return;
620
635
  if (isTelemetryOptedOut()) return;
621
- if (config.source && !sourceExplicitlySet) {
636
+ if (config.source && !sourceExplicitlySet && SOURCE_SHAPE.test(config.source)) {
622
637
  defaultSource = config.source;
623
638
  sourceExplicitlySet = true;
624
639
  }
@@ -658,9 +673,7 @@ function setupTelemetry(config) {
658
673
  exportIntervalMillis: requestedExportIntervalMs ?? 6e4
659
674
  });
660
675
  meterProvider = new MeterProvider({
661
- resource: resourceFromAttributes({
662
- "service.name": "atbash-sdk"
663
- }),
676
+ resource: resourceFromAttributes(sdkResourceAttributes()),
664
677
  readers: [reader]
665
678
  });
666
679
  const meter = meterProvider.getMeter("atbash-sdk");
@@ -679,12 +692,20 @@ function setupTelemetry(config) {
679
692
  headers: async () => destination.headers()
680
693
  });
681
694
  loggerProvider = new LoggerProvider({
682
- resource: resourceFromAttributes({ "service.name": "atbash-sdk" }),
695
+ resource: resourceFromAttributes(sdkResourceAttributes()),
683
696
  processors: [new BatchLogRecordProcessor({ exporter: logExporter })]
684
697
  });
698
+ if (!exitHookInstalled && typeof process?.once === "function") {
699
+ exitHookInstalled = true;
700
+ process.once("beforeExit", () => {
701
+ shutdownTelemetry().catch(() => {
702
+ });
703
+ });
704
+ }
685
705
  configureEvents(loggerProvider.getLogger("atbash-sdk"), {
686
- source: config.source ?? defaultSource,
687
- hashAgentKey: config.hashAgentKey ?? defaultAgentKeyHasher
706
+ source: sourceOrDefault(config.source),
707
+ hashAgentKey: config.hashAgentKey ?? defaultAgentKeyHasher,
708
+ version: SDK_VERSION
688
709
  });
689
710
  }
690
711
  function recordCall(functionName, source, agentPubkey) {
@@ -692,7 +713,7 @@ function recordCall(functionName, source, agentPubkey) {
692
713
  if (!callCounter) return;
693
714
  callCounter.add(1, {
694
715
  "function.name": functionName,
695
- source: source ?? defaultSource,
716
+ source: sourceOrDefault(source),
696
717
  // Hashed on this path too. The counters and the events export to the same
697
718
  // place in the same request, so a raw key here would make hashing it on
698
719
  // the event beside it pointless.
@@ -704,7 +725,7 @@ function recordDuration(functionName, durationMs, status, source) {
704
725
  durationHistogram.record(durationMs, {
705
726
  "function.name": functionName,
706
727
  status,
707
- source: source ?? defaultSource
728
+ source: sourceOrDefault(source)
708
729
  });
709
730
  }
710
731
  async function flushTelemetry() {
package/index.js CHANGED
@@ -89,8 +89,8 @@ function requireNative() {
89
89
  try {
90
90
  const binding = require('@atbash/sdk-android-arm64')
91
91
  const bindingPackageVersion = require('@atbash/sdk-android-arm64/package.json').version
92
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
93
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
92
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
93
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
94
94
  }
95
95
  return binding
96
96
  } catch (e) {
@@ -105,8 +105,8 @@ function requireNative() {
105
105
  try {
106
106
  const binding = require('@atbash/sdk-android-arm-eabi')
107
107
  const bindingPackageVersion = require('@atbash/sdk-android-arm-eabi/package.json').version
108
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
109
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
108
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
109
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
110
110
  }
111
111
  return binding
112
112
  } catch (e) {
@@ -126,8 +126,8 @@ function requireNative() {
126
126
  try {
127
127
  const binding = require('@atbash/sdk-win32-x64-gnu')
128
128
  const bindingPackageVersion = require('@atbash/sdk-win32-x64-gnu/package.json').version
129
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
130
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
129
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
130
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
131
131
  }
132
132
  return binding
133
133
  } catch (e) {
@@ -142,8 +142,8 @@ function requireNative() {
142
142
  try {
143
143
  const binding = require('@atbash/sdk-win32-x64-msvc')
144
144
  const bindingPackageVersion = require('@atbash/sdk-win32-x64-msvc/package.json').version
145
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
146
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
145
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
146
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
147
147
  }
148
148
  return binding
149
149
  } catch (e) {
@@ -159,8 +159,8 @@ function requireNative() {
159
159
  try {
160
160
  const binding = require('@atbash/sdk-win32-ia32-msvc')
161
161
  const bindingPackageVersion = require('@atbash/sdk-win32-ia32-msvc/package.json').version
162
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
163
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
162
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
163
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
164
164
  }
165
165
  return binding
166
166
  } catch (e) {
@@ -175,8 +175,8 @@ function requireNative() {
175
175
  try {
176
176
  const binding = require('@atbash/sdk-win32-arm64-msvc')
177
177
  const bindingPackageVersion = require('@atbash/sdk-win32-arm64-msvc/package.json').version
178
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
179
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
178
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
179
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
180
180
  }
181
181
  return binding
182
182
  } catch (e) {
@@ -194,8 +194,8 @@ function requireNative() {
194
194
  try {
195
195
  const binding = require('@atbash/sdk-darwin-universal')
196
196
  const bindingPackageVersion = require('@atbash/sdk-darwin-universal/package.json').version
197
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
198
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
197
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
198
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
199
199
  }
200
200
  return binding
201
201
  } catch (e) {
@@ -210,8 +210,8 @@ function requireNative() {
210
210
  try {
211
211
  const binding = require('@atbash/sdk-darwin-x64')
212
212
  const bindingPackageVersion = require('@atbash/sdk-darwin-x64/package.json').version
213
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
214
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
213
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
214
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
215
215
  }
216
216
  return binding
217
217
  } catch (e) {
@@ -226,8 +226,8 @@ function requireNative() {
226
226
  try {
227
227
  const binding = require('@atbash/sdk-darwin-arm64')
228
228
  const bindingPackageVersion = require('@atbash/sdk-darwin-arm64/package.json').version
229
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
230
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
229
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
230
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
231
231
  }
232
232
  return binding
233
233
  } catch (e) {
@@ -246,8 +246,8 @@ function requireNative() {
246
246
  try {
247
247
  const binding = require('@atbash/sdk-freebsd-x64')
248
248
  const bindingPackageVersion = require('@atbash/sdk-freebsd-x64/package.json').version
249
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
250
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
249
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
250
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
251
251
  }
252
252
  return binding
253
253
  } catch (e) {
@@ -262,8 +262,8 @@ function requireNative() {
262
262
  try {
263
263
  const binding = require('@atbash/sdk-freebsd-arm64')
264
264
  const bindingPackageVersion = require('@atbash/sdk-freebsd-arm64/package.json').version
265
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
266
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
265
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
266
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
267
267
  }
268
268
  return binding
269
269
  } catch (e) {
@@ -283,8 +283,8 @@ function requireNative() {
283
283
  try {
284
284
  const binding = require('@atbash/sdk-linux-x64-musl')
285
285
  const bindingPackageVersion = require('@atbash/sdk-linux-x64-musl/package.json').version
286
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
287
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
286
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
287
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
288
288
  }
289
289
  return binding
290
290
  } catch (e) {
@@ -299,8 +299,8 @@ function requireNative() {
299
299
  try {
300
300
  const binding = require('@atbash/sdk-linux-x64-gnu')
301
301
  const bindingPackageVersion = require('@atbash/sdk-linux-x64-gnu/package.json').version
302
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
303
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
302
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
303
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
304
304
  }
305
305
  return binding
306
306
  } catch (e) {
@@ -317,8 +317,8 @@ function requireNative() {
317
317
  try {
318
318
  const binding = require('@atbash/sdk-linux-arm64-musl')
319
319
  const bindingPackageVersion = require('@atbash/sdk-linux-arm64-musl/package.json').version
320
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
321
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
320
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
321
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
322
322
  }
323
323
  return binding
324
324
  } catch (e) {
@@ -333,8 +333,8 @@ function requireNative() {
333
333
  try {
334
334
  const binding = require('@atbash/sdk-linux-arm64-gnu')
335
335
  const bindingPackageVersion = require('@atbash/sdk-linux-arm64-gnu/package.json').version
336
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
337
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
336
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
337
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
338
338
  }
339
339
  return binding
340
340
  } catch (e) {
@@ -351,8 +351,8 @@ function requireNative() {
351
351
  try {
352
352
  const binding = require('@atbash/sdk-linux-arm-musleabihf')
353
353
  const bindingPackageVersion = require('@atbash/sdk-linux-arm-musleabihf/package.json').version
354
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
355
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
354
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
355
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
356
356
  }
357
357
  return binding
358
358
  } catch (e) {
@@ -367,8 +367,8 @@ function requireNative() {
367
367
  try {
368
368
  const binding = require('@atbash/sdk-linux-arm-gnueabihf')
369
369
  const bindingPackageVersion = require('@atbash/sdk-linux-arm-gnueabihf/package.json').version
370
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
371
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
370
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
371
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
372
372
  }
373
373
  return binding
374
374
  } catch (e) {
@@ -385,8 +385,8 @@ function requireNative() {
385
385
  try {
386
386
  const binding = require('@atbash/sdk-linux-loong64-musl')
387
387
  const bindingPackageVersion = require('@atbash/sdk-linux-loong64-musl/package.json').version
388
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
389
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
388
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
389
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
390
390
  }
391
391
  return binding
392
392
  } catch (e) {
@@ -401,8 +401,8 @@ function requireNative() {
401
401
  try {
402
402
  const binding = require('@atbash/sdk-linux-loong64-gnu')
403
403
  const bindingPackageVersion = require('@atbash/sdk-linux-loong64-gnu/package.json').version
404
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
405
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
404
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
405
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
406
406
  }
407
407
  return binding
408
408
  } catch (e) {
@@ -419,8 +419,8 @@ function requireNative() {
419
419
  try {
420
420
  const binding = require('@atbash/sdk-linux-riscv64-musl')
421
421
  const bindingPackageVersion = require('@atbash/sdk-linux-riscv64-musl/package.json').version
422
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
423
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
422
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
423
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
424
424
  }
425
425
  return binding
426
426
  } catch (e) {
@@ -435,8 +435,8 @@ function requireNative() {
435
435
  try {
436
436
  const binding = require('@atbash/sdk-linux-riscv64-gnu')
437
437
  const bindingPackageVersion = require('@atbash/sdk-linux-riscv64-gnu/package.json').version
438
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
439
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
438
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
439
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
440
440
  }
441
441
  return binding
442
442
  } catch (e) {
@@ -452,8 +452,8 @@ function requireNative() {
452
452
  try {
453
453
  const binding = require('@atbash/sdk-linux-ppc64-gnu')
454
454
  const bindingPackageVersion = require('@atbash/sdk-linux-ppc64-gnu/package.json').version
455
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
456
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
455
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
456
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
457
457
  }
458
458
  return binding
459
459
  } catch (e) {
@@ -468,8 +468,8 @@ function requireNative() {
468
468
  try {
469
469
  const binding = require('@atbash/sdk-linux-s390x-gnu')
470
470
  const bindingPackageVersion = require('@atbash/sdk-linux-s390x-gnu/package.json').version
471
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
472
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
471
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
472
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
473
473
  }
474
474
  return binding
475
475
  } catch (e) {
@@ -488,8 +488,8 @@ function requireNative() {
488
488
  try {
489
489
  const binding = require('@atbash/sdk-openharmony-arm64')
490
490
  const bindingPackageVersion = require('@atbash/sdk-openharmony-arm64/package.json').version
491
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
492
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
491
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
492
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
493
493
  }
494
494
  return binding
495
495
  } catch (e) {
@@ -504,8 +504,8 @@ function requireNative() {
504
504
  try {
505
505
  const binding = require('@atbash/sdk-openharmony-x64')
506
506
  const bindingPackageVersion = require('@atbash/sdk-openharmony-x64/package.json').version
507
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
508
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
507
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
508
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
509
509
  }
510
510
  return binding
511
511
  } catch (e) {
@@ -520,8 +520,8 @@ function requireNative() {
520
520
  try {
521
521
  const binding = require('@atbash/sdk-openharmony-arm')
522
522
  const bindingPackageVersion = require('@atbash/sdk-openharmony-arm/package.json').version
523
- if (bindingPackageVersion !== '0.19.1-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
524
- throw new Error(`Native binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
523
+ if (bindingPackageVersion !== '0.19.2-dev.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
524
+ throw new Error(`Native binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
525
525
  }
526
526
  return binding
527
527
  } catch (e) {
@@ -661,8 +661,8 @@ if (!nativeBinding || forceWasi) {
661
661
  if (!candidateFailed) {
662
662
  if (process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
663
663
  const bindingPackageVersion = require('@atbash/sdk-wasm32-wasi/package.json').version
664
- if (bindingPackageVersion !== '0.19.1-dev.0') {
665
- throw new Error(`WASI binding package version mismatch, expected 0.19.1-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
664
+ if (bindingPackageVersion !== '0.19.2-dev.0') {
665
+ throw new Error(`WASI binding package version mismatch, expected 0.19.2-dev.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
666
666
  }
667
667
  }
668
668
  wasiBinding = require('@atbash/sdk-wasm32-wasi')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atbash/sdk",
3
- "version": "0.19.1-dev.0",
3
+ "version": "0.19.2-dev.0",
4
4
  "description": "TypeScript SDK for Atbash — the safety layer that evaluates AI agent actions against operator-defined policies before execution.",
5
5
  "keywords": [
6
6
  "atbash",
@@ -95,10 +95,10 @@
95
95
  "typescript-eslint": "^8.62.1"
96
96
  },
97
97
  "optionalDependencies": {
98
- "@atbash/sdk-linux-x64-gnu": "0.19.1-dev.0",
99
- "@atbash/sdk-linux-arm64-gnu": "0.19.1-dev.0",
100
- "@atbash/sdk-linux-x64-musl": "0.19.1-dev.0",
101
- "@atbash/sdk-darwin-arm64": "0.19.1-dev.0",
102
- "@atbash/sdk-win32-x64-msvc": "0.19.1-dev.0"
98
+ "@atbash/sdk-linux-x64-gnu": "0.19.2-dev.0",
99
+ "@atbash/sdk-linux-arm64-gnu": "0.19.2-dev.0",
100
+ "@atbash/sdk-linux-x64-musl": "0.19.2-dev.0",
101
+ "@atbash/sdk-darwin-arm64": "0.19.2-dev.0",
102
+ "@atbash/sdk-win32-x64-msvc": "0.19.2-dev.0"
103
103
  }
104
104
  }