blazen 0.1.131 → 0.1.150

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.
Files changed (3) hide show
  1. package/index.d.ts +152 -0
  2. package/index.js +106 -105
  3. package/package.json +16 -4
package/index.d.ts CHANGED
@@ -301,6 +301,18 @@ export declare class CompletionModel {
301
301
  * types, which is effectively lossless for any realistic `VRAM` size.
302
302
  */
303
303
  vramBytes(): Promise<number | null>
304
+ /**
305
+ * Create a local mistral.rs completion model.
306
+ *
307
+ * Runs LLM inference entirely on-device -- no API key required.
308
+ *
309
+ * ```javascript
310
+ * const model = CompletionModel.mistralrs({
311
+ * modelId: "mistralai/Mistral-7B-Instruct-v0.3",
312
+ * });
313
+ * ```
314
+ */
315
+ static mistralrs(options: JsMistralRsOptions): CompletionModel
304
316
  }
305
317
  export type JsCompletionModel = CompletionModel
306
318
 
@@ -623,6 +635,17 @@ export declare class EmbeddingModel {
623
635
  get dimensions(): number
624
636
  /** Embed one or more texts, returning one vector per input text. */
625
637
  embed(texts: Array<string>): Promise<JsEmbeddingResponse>
638
+ /**
639
+ * Create a local embedding model (ONNX, no API key).
640
+ *
641
+ * Defaults to `BAAI/bge-small-en-v1.5` (384 dimensions).
642
+ *
643
+ * ```javascript
644
+ * const model = EmbeddingModel.embed();
645
+ * const response = await model.embed(["Hello", "World"]);
646
+ * ```
647
+ */
648
+ static embed(options?: JsEmbedOptions | undefined | null): EmbeddingModel
626
649
  }
627
650
  export type JsEmbeddingModel = EmbeddingModel
628
651
 
@@ -1248,6 +1271,27 @@ export declare class Transcription {
1248
1271
  * path (whisper.cpp does not fetch remote URLs).
1249
1272
  */
1250
1273
  transcribe(request: JsTranscriptionRequest): Promise<JsTranscriptionResult>
1274
+ /**
1275
+ * Create a local whisper.cpp transcription provider.
1276
+ *
1277
+ * Runs transcription entirely on-device using whisper.cpp. The first
1278
+ * call downloads the GGML model (tens to hundreds of MB depending on
1279
+ * the chosen variant) and caches it for subsequent runs. No API key
1280
+ * is required.
1281
+ *
1282
+ * whisper.cpp currently expects **16-bit PCM mono WAV at 16 kHz**.
1283
+ * Remote URLs are not supported -- pass a local file path in
1284
+ * `request.audioUrl`.
1285
+ *
1286
+ * ```javascript
1287
+ * const transcriber = await Transcription.whispercpp({ model: "base" });
1288
+ * const result = await transcriber.transcribe({
1289
+ * audioUrl: "/path/to/audio.wav",
1290
+ * });
1291
+ * console.log(result.text);
1292
+ * ```
1293
+ */
1294
+ static whispercpp(options?: JsWhisperOptions | undefined | null): Promise<Transcription>
1251
1295
  }
1252
1296
  export type JsTranscription = Transcription
1253
1297
 
@@ -1950,6 +1994,26 @@ export interface JsEmbeddingResponse {
1950
1994
  metadata: any
1951
1995
  }
1952
1996
 
1997
+ /**
1998
+ * Options for creating a local embedding model.
1999
+ *
2000
+ * All fields are optional; defaults produce a working model using
2001
+ * `BAAI/bge-small-en-v1.5` on CPU with the backend's built-in cache.
2002
+ */
2003
+ export interface JsEmbedOptions {
2004
+ /** Embed model variant name (e.g. `"BGESmallENV15"`). */
2005
+ modelName?: string
2006
+ /** Model cache directory. When absent, the embedding backend uses its built-in cache. */
2007
+ cacheDir?: string
2008
+ /**
2009
+ * Maximum batch size for embedding. When absent, the embedding backend uses its
2010
+ * default (256).
2011
+ */
2012
+ maxBatchSize?: number
2013
+ /** Whether to display download progress when fetching models. */
2014
+ showDownloadProgress?: boolean
2015
+ }
2016
+
1953
2017
  export declare const enum JsFalLlmEndpointKind {
1954
2018
  OpenAiChat = 'open_ai_chat',
1955
2019
  OpenAiResponses = 'open_ai_responses',
@@ -2102,6 +2166,37 @@ export interface JsMemoryResult {
2102
2166
  metadata: any
2103
2167
  }
2104
2168
 
2169
+ /**
2170
+ * Options for the local mistral.rs LLM backend.
2171
+ *
2172
+ * `modelId` is required (`HuggingFace` model ID or local GGUF path).
2173
+ * All other fields are optional.
2174
+ *
2175
+ * ```javascript
2176
+ * const model = CompletionModel.mistralrs({
2177
+ * modelId: "mistralai/Mistral-7B-Instruct-v0.3",
2178
+ * device: "cuda:0",
2179
+ * quantization: "q4_k_m",
2180
+ * });
2181
+ * ```
2182
+ */
2183
+ export interface JsMistralRsOptions {
2184
+ /** `HuggingFace` model ID or local GGUF path. */
2185
+ modelId: string
2186
+ /** Quantization format string (e.g. `"q4_k_m"`, `"f16"`, `"gptq-4bit"`). */
2187
+ quantization?: string
2188
+ /** Hardware device string (e.g. `"cpu"`, `"cuda:0"`, `"metal"`). */
2189
+ device?: string
2190
+ /** Maximum context length in tokens. */
2191
+ contextLength?: number
2192
+ /** Maximum batch size for concurrent requests. */
2193
+ maxBatchSize?: number
2194
+ /** Jinja2 chat template override. */
2195
+ chatTemplate?: string
2196
+ /** Path to cache downloaded models. */
2197
+ cacheDir?: string
2198
+ }
2199
+
2105
2200
  /**
2106
2201
  * Pricing information for a model in USD per million tokens.
2107
2202
  *
@@ -2368,6 +2463,63 @@ export interface JsVoiceHandle {
2368
2463
  metadata: any
2369
2464
  }
2370
2465
 
2466
+ /**
2467
+ * Whisper model size variant for the local whisper.cpp backend.
2468
+ *
2469
+ * Larger models are more accurate but require more memory and are slower.
2470
+ *
2471
+ * | Variant | Params | RAM |
2472
+ * |----------|--------|-------|
2473
+ * | tiny | 39M | ~1GB |
2474
+ * | base | 74M | ~1GB |
2475
+ * | small | 244M | ~2GB |
2476
+ * | medium | 769M | ~5GB |
2477
+ * | largeV3 | 1.5B | ~10GB |
2478
+ */
2479
+ export declare const enum JsWhisperModel {
2480
+ Tiny = 'tiny',
2481
+ Base = 'base',
2482
+ Small = 'small',
2483
+ Medium = 'medium',
2484
+ LargeV3 = 'largeV3'
2485
+ }
2486
+
2487
+ /**
2488
+ * Options for the local whisper.cpp transcription backend.
2489
+ *
2490
+ * All fields are optional. When `model` is omitted, defaults to
2491
+ * `JsWhisperModel::Small`. When `language` is omitted, whisper.cpp will
2492
+ * auto-detect the spoken language.
2493
+ *
2494
+ * ```javascript
2495
+ * const transcriber = Transcription.whispercpp({
2496
+ * model: "base",
2497
+ * language: "en",
2498
+ * });
2499
+ * ```
2500
+ */
2501
+ export interface JsWhisperOptions {
2502
+ /** Whisper model size (defaults to `"small"`). */
2503
+ model?: JsWhisperModel
2504
+ /** Hardware device specifier string (e.g. `"cpu"`, `"cuda:0"`, `"metal"`). */
2505
+ device?: string
2506
+ /**
2507
+ * ISO 639-1 language code (e.g. `"en"`, `"es"`). When absent,
2508
+ * whisper auto-detects the language.
2509
+ */
2510
+ language?: string
2511
+ /**
2512
+ * Enable speaker diarization. Currently unsupported by the whisper.cpp
2513
+ * backend; setting `true` will cause transcription calls to fail.
2514
+ */
2515
+ diarize?: boolean
2516
+ /**
2517
+ * Directory to cache downloaded models. When absent, falls back to
2518
+ * `$BLAZEN_CACHE_DIR` or `~/.cache/blazen/models`.
2519
+ */
2520
+ cacheDir?: string
2521
+ }
2522
+
2371
2523
  /** The result of a workflow run. */
2372
2524
  export interface JsWorkflowResult {
2373
2525
  /** The event type of the final result (typically "`blazen::StopEvent`"). */
package/index.js CHANGED
@@ -75,10 +75,10 @@ function requireNative() {
75
75
  loadErrors.push(e)
76
76
  }
77
77
  try {
78
- const binding = require('blazen-android-arm64')
79
- const bindingPackageVersion = require('blazen-android-arm64/package.json').version
80
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
78
+ const binding = require('@blazen-dev/blazen-android-arm64')
79
+ const bindingPackageVersion = require('@blazen-dev/blazen-android-arm64/package.json').version
80
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
81
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
82
82
  }
83
83
  return binding
84
84
  } catch (e) {
@@ -91,10 +91,10 @@ function requireNative() {
91
91
  loadErrors.push(e)
92
92
  }
93
93
  try {
94
- const binding = require('blazen-android-arm-eabi')
95
- const bindingPackageVersion = require('blazen-android-arm-eabi/package.json').version
96
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
94
+ const binding = require('@blazen-dev/blazen-android-arm-eabi')
95
+ const bindingPackageVersion = require('@blazen-dev/blazen-android-arm-eabi/package.json').version
96
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
97
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
98
98
  }
99
99
  return binding
100
100
  } catch (e) {
@@ -112,10 +112,10 @@ function requireNative() {
112
112
  loadErrors.push(e)
113
113
  }
114
114
  try {
115
- const binding = require('blazen-win32-x64-gnu')
116
- const bindingPackageVersion = require('blazen-win32-x64-gnu/package.json').version
117
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
115
+ const binding = require('@blazen-dev/blazen-win32-x64-gnu')
116
+ const bindingPackageVersion = require('@blazen-dev/blazen-win32-x64-gnu/package.json').version
117
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
118
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
119
119
  }
120
120
  return binding
121
121
  } catch (e) {
@@ -128,10 +128,10 @@ function requireNative() {
128
128
  loadErrors.push(e)
129
129
  }
130
130
  try {
131
- const binding = require('blazen-win32-x64-msvc')
132
- const bindingPackageVersion = require('blazen-win32-x64-msvc/package.json').version
133
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
131
+ const binding = require('@blazen-dev/blazen-win32-x64-msvc')
132
+ const bindingPackageVersion = require('@blazen-dev/blazen-win32-x64-msvc/package.json').version
133
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
134
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
135
135
  }
136
136
  return binding
137
137
  } catch (e) {
@@ -145,10 +145,10 @@ function requireNative() {
145
145
  loadErrors.push(e)
146
146
  }
147
147
  try {
148
- const binding = require('blazen-win32-ia32-msvc')
149
- const bindingPackageVersion = require('blazen-win32-ia32-msvc/package.json').version
150
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
148
+ const binding = require('@blazen-dev/blazen-win32-ia32-msvc')
149
+ const bindingPackageVersion = require('@blazen-dev/blazen-win32-ia32-msvc/package.json').version
150
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
151
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
152
152
  }
153
153
  return binding
154
154
  } catch (e) {
@@ -161,10 +161,10 @@ function requireNative() {
161
161
  loadErrors.push(e)
162
162
  }
163
163
  try {
164
- const binding = require('blazen-win32-arm64-msvc')
165
- const bindingPackageVersion = require('blazen-win32-arm64-msvc/package.json').version
166
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
164
+ const binding = require('@blazen-dev/blazen-win32-arm64-msvc')
165
+ const bindingPackageVersion = require('@blazen-dev/blazen-win32-arm64-msvc/package.json').version
166
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
167
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
168
168
  }
169
169
  return binding
170
170
  } catch (e) {
@@ -180,10 +180,10 @@ function requireNative() {
180
180
  loadErrors.push(e)
181
181
  }
182
182
  try {
183
- const binding = require('blazen-darwin-universal')
184
- const bindingPackageVersion = require('blazen-darwin-universal/package.json').version
185
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
183
+ const binding = require('@blazen-dev/blazen-darwin-universal')
184
+ const bindingPackageVersion = require('@blazen-dev/blazen-darwin-universal/package.json').version
185
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
186
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
187
187
  }
188
188
  return binding
189
189
  } catch (e) {
@@ -196,10 +196,10 @@ function requireNative() {
196
196
  loadErrors.push(e)
197
197
  }
198
198
  try {
199
- const binding = require('blazen-darwin-x64')
200
- const bindingPackageVersion = require('blazen-darwin-x64/package.json').version
201
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
199
+ const binding = require('@blazen-dev/blazen-darwin-x64')
200
+ const bindingPackageVersion = require('@blazen-dev/blazen-darwin-x64/package.json').version
201
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
202
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
203
203
  }
204
204
  return binding
205
205
  } catch (e) {
@@ -212,10 +212,10 @@ function requireNative() {
212
212
  loadErrors.push(e)
213
213
  }
214
214
  try {
215
- const binding = require('blazen-darwin-arm64')
216
- const bindingPackageVersion = require('blazen-darwin-arm64/package.json').version
217
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
215
+ const binding = require('@blazen-dev/blazen-darwin-arm64')
216
+ const bindingPackageVersion = require('@blazen-dev/blazen-darwin-arm64/package.json').version
217
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
218
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
219
219
  }
220
220
  return binding
221
221
  } catch (e) {
@@ -232,10 +232,10 @@ function requireNative() {
232
232
  loadErrors.push(e)
233
233
  }
234
234
  try {
235
- const binding = require('blazen-freebsd-x64')
236
- const bindingPackageVersion = require('blazen-freebsd-x64/package.json').version
237
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
235
+ const binding = require('@blazen-dev/blazen-freebsd-x64')
236
+ const bindingPackageVersion = require('@blazen-dev/blazen-freebsd-x64/package.json').version
237
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
238
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
239
239
  }
240
240
  return binding
241
241
  } catch (e) {
@@ -248,10 +248,10 @@ function requireNative() {
248
248
  loadErrors.push(e)
249
249
  }
250
250
  try {
251
- const binding = require('blazen-freebsd-arm64')
252
- const bindingPackageVersion = require('blazen-freebsd-arm64/package.json').version
253
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
251
+ const binding = require('@blazen-dev/blazen-freebsd-arm64')
252
+ const bindingPackageVersion = require('@blazen-dev/blazen-freebsd-arm64/package.json').version
253
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
254
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
255
255
  }
256
256
  return binding
257
257
  } catch (e) {
@@ -269,10 +269,10 @@ function requireNative() {
269
269
  loadErrors.push(e)
270
270
  }
271
271
  try {
272
- const binding = require('blazen-linux-x64-musl')
273
- const bindingPackageVersion = require('blazen-linux-x64-musl/package.json').version
274
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
272
+ const binding = require('@blazen-dev/blazen-linux-x64-musl')
273
+ const bindingPackageVersion = require('@blazen-dev/blazen-linux-x64-musl/package.json').version
274
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
275
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
276
276
  }
277
277
  return binding
278
278
  } catch (e) {
@@ -285,10 +285,10 @@ function requireNative() {
285
285
  loadErrors.push(e)
286
286
  }
287
287
  try {
288
- const binding = require('blazen-linux-x64-gnu')
289
- const bindingPackageVersion = require('blazen-linux-x64-gnu/package.json').version
290
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
288
+ const binding = require('@blazen-dev/blazen-linux-x64-gnu')
289
+ const bindingPackageVersion = require('@blazen-dev/blazen-linux-x64-gnu/package.json').version
290
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
291
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
292
292
  }
293
293
  return binding
294
294
  } catch (e) {
@@ -303,10 +303,10 @@ function requireNative() {
303
303
  loadErrors.push(e)
304
304
  }
305
305
  try {
306
- const binding = require('blazen-linux-arm64-musl')
307
- const bindingPackageVersion = require('blazen-linux-arm64-musl/package.json').version
308
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
306
+ const binding = require('@blazen-dev/blazen-linux-arm64-musl')
307
+ const bindingPackageVersion = require('@blazen-dev/blazen-linux-arm64-musl/package.json').version
308
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
309
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
310
310
  }
311
311
  return binding
312
312
  } catch (e) {
@@ -319,10 +319,10 @@ function requireNative() {
319
319
  loadErrors.push(e)
320
320
  }
321
321
  try {
322
- const binding = require('blazen-linux-arm64-gnu')
323
- const bindingPackageVersion = require('blazen-linux-arm64-gnu/package.json').version
324
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
322
+ const binding = require('@blazen-dev/blazen-linux-arm64-gnu')
323
+ const bindingPackageVersion = require('@blazen-dev/blazen-linux-arm64-gnu/package.json').version
324
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
325
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
326
326
  }
327
327
  return binding
328
328
  } catch (e) {
@@ -337,10 +337,10 @@ function requireNative() {
337
337
  loadErrors.push(e)
338
338
  }
339
339
  try {
340
- const binding = require('blazen-linux-arm-musleabihf')
341
- const bindingPackageVersion = require('blazen-linux-arm-musleabihf/package.json').version
342
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
340
+ const binding = require('@blazen-dev/blazen-linux-arm-musleabihf')
341
+ const bindingPackageVersion = require('@blazen-dev/blazen-linux-arm-musleabihf/package.json').version
342
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
343
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
344
344
  }
345
345
  return binding
346
346
  } catch (e) {
@@ -353,10 +353,10 @@ function requireNative() {
353
353
  loadErrors.push(e)
354
354
  }
355
355
  try {
356
- const binding = require('blazen-linux-arm-gnueabihf')
357
- const bindingPackageVersion = require('blazen-linux-arm-gnueabihf/package.json').version
358
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
356
+ const binding = require('@blazen-dev/blazen-linux-arm-gnueabihf')
357
+ const bindingPackageVersion = require('@blazen-dev/blazen-linux-arm-gnueabihf/package.json').version
358
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
359
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
360
360
  }
361
361
  return binding
362
362
  } catch (e) {
@@ -371,10 +371,10 @@ function requireNative() {
371
371
  loadErrors.push(e)
372
372
  }
373
373
  try {
374
- const binding = require('blazen-linux-loong64-musl')
375
- const bindingPackageVersion = require('blazen-linux-loong64-musl/package.json').version
376
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
374
+ const binding = require('@blazen-dev/blazen-linux-loong64-musl')
375
+ const bindingPackageVersion = require('@blazen-dev/blazen-linux-loong64-musl/package.json').version
376
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
377
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
378
378
  }
379
379
  return binding
380
380
  } catch (e) {
@@ -387,10 +387,10 @@ function requireNative() {
387
387
  loadErrors.push(e)
388
388
  }
389
389
  try {
390
- const binding = require('blazen-linux-loong64-gnu')
391
- const bindingPackageVersion = require('blazen-linux-loong64-gnu/package.json').version
392
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
390
+ const binding = require('@blazen-dev/blazen-linux-loong64-gnu')
391
+ const bindingPackageVersion = require('@blazen-dev/blazen-linux-loong64-gnu/package.json').version
392
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
393
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
394
394
  }
395
395
  return binding
396
396
  } catch (e) {
@@ -405,10 +405,10 @@ function requireNative() {
405
405
  loadErrors.push(e)
406
406
  }
407
407
  try {
408
- const binding = require('blazen-linux-riscv64-musl')
409
- const bindingPackageVersion = require('blazen-linux-riscv64-musl/package.json').version
410
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
408
+ const binding = require('@blazen-dev/blazen-linux-riscv64-musl')
409
+ const bindingPackageVersion = require('@blazen-dev/blazen-linux-riscv64-musl/package.json').version
410
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
411
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
412
412
  }
413
413
  return binding
414
414
  } catch (e) {
@@ -421,10 +421,10 @@ function requireNative() {
421
421
  loadErrors.push(e)
422
422
  }
423
423
  try {
424
- const binding = require('blazen-linux-riscv64-gnu')
425
- const bindingPackageVersion = require('blazen-linux-riscv64-gnu/package.json').version
426
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
424
+ const binding = require('@blazen-dev/blazen-linux-riscv64-gnu')
425
+ const bindingPackageVersion = require('@blazen-dev/blazen-linux-riscv64-gnu/package.json').version
426
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
427
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
428
428
  }
429
429
  return binding
430
430
  } catch (e) {
@@ -438,10 +438,10 @@ function requireNative() {
438
438
  loadErrors.push(e)
439
439
  }
440
440
  try {
441
- const binding = require('blazen-linux-ppc64-gnu')
442
- const bindingPackageVersion = require('blazen-linux-ppc64-gnu/package.json').version
443
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
441
+ const binding = require('@blazen-dev/blazen-linux-ppc64-gnu')
442
+ const bindingPackageVersion = require('@blazen-dev/blazen-linux-ppc64-gnu/package.json').version
443
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
444
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
445
445
  }
446
446
  return binding
447
447
  } catch (e) {
@@ -454,10 +454,10 @@ function requireNative() {
454
454
  loadErrors.push(e)
455
455
  }
456
456
  try {
457
- const binding = require('blazen-linux-s390x-gnu')
458
- const bindingPackageVersion = require('blazen-linux-s390x-gnu/package.json').version
459
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
457
+ const binding = require('@blazen-dev/blazen-linux-s390x-gnu')
458
+ const bindingPackageVersion = require('@blazen-dev/blazen-linux-s390x-gnu/package.json').version
459
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
460
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
461
461
  }
462
462
  return binding
463
463
  } catch (e) {
@@ -474,10 +474,10 @@ function requireNative() {
474
474
  loadErrors.push(e)
475
475
  }
476
476
  try {
477
- const binding = require('blazen-openharmony-arm64')
478
- const bindingPackageVersion = require('blazen-openharmony-arm64/package.json').version
479
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
477
+ const binding = require('@blazen-dev/blazen-openharmony-arm64')
478
+ const bindingPackageVersion = require('@blazen-dev/blazen-openharmony-arm64/package.json').version
479
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
480
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
481
481
  }
482
482
  return binding
483
483
  } catch (e) {
@@ -490,10 +490,10 @@ function requireNative() {
490
490
  loadErrors.push(e)
491
491
  }
492
492
  try {
493
- const binding = require('blazen-openharmony-x64')
494
- const bindingPackageVersion = require('blazen-openharmony-x64/package.json').version
495
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
493
+ const binding = require('@blazen-dev/blazen-openharmony-x64')
494
+ const bindingPackageVersion = require('@blazen-dev/blazen-openharmony-x64/package.json').version
495
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
496
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
497
497
  }
498
498
  return binding
499
499
  } catch (e) {
@@ -506,10 +506,10 @@ function requireNative() {
506
506
  loadErrors.push(e)
507
507
  }
508
508
  try {
509
- const binding = require('blazen-openharmony-arm')
510
- const bindingPackageVersion = require('blazen-openharmony-arm/package.json').version
511
- if (bindingPackageVersion !== '0.1.131' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
- throw new Error(`Native binding package version mismatch, expected 0.1.131 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
509
+ const binding = require('@blazen-dev/blazen-openharmony-arm')
510
+ const bindingPackageVersion = require('@blazen-dev/blazen-openharmony-arm/package.json').version
511
+ if (bindingPackageVersion !== '0.1.0' && process.env.NAPI_RS_ENFORCE_VERSION_CHECK && process.env.NAPI_RS_ENFORCE_VERSION_CHECK !== '0') {
512
+ throw new Error(`Native binding package version mismatch, expected 0.1.0 but got ${bindingPackageVersion}. You can reinstall dependencies to fix this issue.`)
513
513
  }
514
514
  return binding
515
515
  } catch (e) {
@@ -538,7 +538,7 @@ if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
538
538
  }
539
539
  if (!nativeBinding || process.env.NAPI_RS_FORCE_WASI) {
540
540
  try {
541
- wasiBinding = require('blazen-wasm32-wasi')
541
+ wasiBinding = require('@blazen-dev/blazen-wasm32-wasi')
542
542
  nativeBinding = wasiBinding
543
543
  } catch (err) {
544
544
  if (process.env.NAPI_RS_FORCE_WASI) {
@@ -641,6 +641,7 @@ module.exports.JsCacheStrategy = nativeBinding.JsCacheStrategy
641
641
  module.exports.JsFalLlmEndpointKind = nativeBinding.JsFalLlmEndpointKind
642
642
  module.exports.JsJobStatus = nativeBinding.JsJobStatus
643
643
  module.exports.JsRole = nativeBinding.JsRole
644
+ module.exports.JsWhisperModel = nativeBinding.JsWhisperModel
644
645
  module.exports.lookupPricing = nativeBinding.lookupPricing
645
646
  module.exports.registerPricing = nativeBinding.registerPricing
646
647
  module.exports.runAgent = nativeBinding.runAgent
package/package.json CHANGED
@@ -1,20 +1,24 @@
1
1
  {
2
2
  "name": "blazen",
3
- "version": "0.1.131",
3
+ "version": "0.1.150",
4
4
  "description": "Blazen - Event-driven AI workflow framework for Node.js/TypeScript",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
7
7
  "napi": {
8
8
  "binaryName": "blazen",
9
+ "packageName": "@blazen-dev/blazen",
9
10
  "targets": [
10
11
  "x86_64-unknown-linux-gnu",
11
12
  "x86_64-unknown-linux-musl",
12
13
  "aarch64-unknown-linux-gnu",
13
14
  "aarch64-unknown-linux-musl",
14
15
  "aarch64-apple-darwin",
15
- "x86_64-apple-darwin"
16
+ "x86_64-pc-windows-msvc"
16
17
  ]
17
18
  },
19
+ "publishConfig": {
20
+ "access": "public"
21
+ },
18
22
  "license": "AGPL-3.0-or-later",
19
23
  "repository": {
20
24
  "type": "git",
@@ -40,9 +44,17 @@
40
44
  "engines": {
41
45
  "node": ">= 18"
42
46
  },
47
+ "optionalDependencies": {
48
+ "@blazen-dev/blazen-linux-x64-gnu": "0.1.150",
49
+ "@blazen-dev/blazen-linux-x64-musl": "0.1.150",
50
+ "@blazen-dev/blazen-linux-arm64-gnu": "0.1.150",
51
+ "@blazen-dev/blazen-linux-arm64-musl": "0.1.150",
52
+ "@blazen-dev/blazen-darwin-arm64": "0.1.150",
53
+ "@blazen-dev/blazen-win32-x64-msvc": "0.1.150"
54
+ },
43
55
  "scripts": {
44
- "build": "napi build --release --platform --js index.js",
45
- "build:debug": "napi build --platform --js index.js",
56
+ "build": "napi build --release --platform --features local-all --js index.js",
57
+ "build:debug": "napi build --platform --features local-all --js index.js",
46
58
  "test": "node --test ../../tests/node/test_workflow.mjs",
47
59
  "test:smoke": "node --test ../../tests/node/test_llm_smoke.mjs"
48
60
  }