@absolutejs/voice 0.0.22-beta.642 → 0.0.22-beta.643

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.
@@ -1,3 +1 @@
1
- export declare const hardenFetch: (baseFetch?: typeof fetch) => ((input: Parameters<typeof fetch>[0], init: Parameters<typeof fetch>[1]) => Promise<Response>) & {
2
- preconnect: typeof fetch.preconnect;
3
- };
1
+ export declare const hardenFetch: (baseFetch?: typeof fetch) => (input: Parameters<typeof fetch>[0], init: Parameters<typeof fetch>[1]) => Promise<Response>;
package/dist/index.js CHANGED
@@ -41820,16 +41820,21 @@ var oneAttempt = async (baseFetch, input, init) => {
41820
41820
  callerSignal?.removeEventListener("abort", onCallerAbort);
41821
41821
  }
41822
41822
  };
41823
- var hardenFetch = (baseFetch = globalThis.fetch) => Object.assign(async (input, init) => {
41824
- try {
41825
- return await oneAttempt(baseFetch, input, init);
41826
- } catch (error) {
41827
- if (init?.signal?.aborted)
41828
- throw error;
41829
- console.warn(`[voice] hardened fetch retrying on a fresh connection: ${error instanceof Error ? error.message : String(error)}`);
41830
- return oneAttempt(baseFetch, input, init);
41831
- }
41832
- }, { preconnect: baseFetch.preconnect.bind(baseFetch) });
41823
+ var hardenFetch = (baseFetch = globalThis.fetch) => {
41824
+ const hardenedFetch = async (input, init) => {
41825
+ try {
41826
+ return await oneAttempt(baseFetch, input, init);
41827
+ } catch (error) {
41828
+ if (init?.signal?.aborted)
41829
+ throw error;
41830
+ console.warn(`[voice] hardened fetch retrying on a fresh connection: ${error instanceof Error ? error.message : String(error)}`);
41831
+ return oneAttempt(baseFetch, input, init);
41832
+ }
41833
+ };
41834
+ return typeof baseFetch.preconnect === "function" ? Object.assign(hardenedFetch, {
41835
+ preconnect: baseFetch.preconnect.bind(baseFetch)
41836
+ }) : hardenedFetch;
41837
+ };
41833
41838
  // src/core/mcpToolset.ts
41834
41839
  var flattenContent = (result) => {
41835
41840
  const blocks = result.content ?? [];
@@ -328,12 +328,7 @@ var applyVoiceAudioCondition = (fixture, condition) => {
328
328
  for (let index = 0;index < output.length; index += 1)
329
329
  output[index] = clamp(output[index] + random() * Math.sqrt(3) * noiseRms);
330
330
  }
331
- return {
332
- ...fixture,
333
- audio: bytes(output),
334
- id: `${fixture.id}--${condition.id}`,
335
- tags: [...fixture.tags ?? [], "conditioned", condition.id]
336
- };
331
+ return { ...fixture, audio: bytes(output), id: `${fixture.id}--${condition.id}`, tags: [...fixture.tags ?? [], "conditioned", condition.id] };
337
332
  };
338
333
  var buildVoiceAudioMatrix = (fixtures, conditions) => fixtures.flatMap((fixture) => conditions.map((condition) => applyVoiceAudioCondition(fixture, condition)));
339
334
  // src/testing/stt.ts
@@ -4759,16 +4754,21 @@ var oneAttempt = async (baseFetch, input, init) => {
4759
4754
  callerSignal?.removeEventListener("abort", onCallerAbort);
4760
4755
  }
4761
4756
  };
4762
- var hardenFetch = (baseFetch = globalThis.fetch) => Object.assign(async (input, init) => {
4763
- try {
4764
- return await oneAttempt(baseFetch, input, init);
4765
- } catch (error) {
4766
- if (init?.signal?.aborted)
4767
- throw error;
4768
- console.warn(`[voice] hardened fetch retrying on a fresh connection: ${error instanceof Error ? error.message : String(error)}`);
4769
- return oneAttempt(baseFetch, input, init);
4770
- }
4771
- }, { preconnect: baseFetch.preconnect.bind(baseFetch) });
4757
+ var hardenFetch = (baseFetch = globalThis.fetch) => {
4758
+ const hardenedFetch = async (input, init) => {
4759
+ try {
4760
+ return await oneAttempt(baseFetch, input, init);
4761
+ } catch (error) {
4762
+ if (init?.signal?.aborted)
4763
+ throw error;
4764
+ console.warn(`[voice] hardened fetch retrying on a fresh connection: ${error instanceof Error ? error.message : String(error)}`);
4765
+ return oneAttempt(baseFetch, input, init);
4766
+ }
4767
+ };
4768
+ return typeof baseFetch.preconnect === "function" ? Object.assign(hardenedFetch, {
4769
+ preconnect: baseFetch.preconnect.bind(baseFetch)
4770
+ }) : hardenedFetch;
4771
+ };
4772
4772
 
4773
4773
  // src/core/modelAdapters.ts
4774
4774
  var normalizeVoiceUsage = (provider, model, raw) => {
@@ -6010,15 +6010,9 @@ var stableBenchmarkJson = (value) => {
6010
6010
  };
6011
6011
  var buildVoiceBenchmarkArtifact = (manifest, report) => {
6012
6012
  const payload = { manifest, report };
6013
- return {
6014
- ...payload,
6015
- artifactSha256: sha256Bytes(stableBenchmarkJson(payload))
6016
- };
6013
+ return { ...payload, artifactSha256: sha256Bytes(stableBenchmarkJson(payload)) };
6017
6014
  };
6018
- var verifyVoiceBenchmarkArtifact = (artifact) => artifact.artifactSha256 === sha256Bytes(stableBenchmarkJson({
6019
- manifest: artifact.manifest,
6020
- report: artifact.report
6021
- }));
6015
+ var verifyVoiceBenchmarkArtifact = (artifact) => artifact.artifactSha256 === sha256Bytes(stableBenchmarkJson({ manifest: artifact.manifest, report: artifact.report }));
6022
6016
  // src/core/memoryStore.ts
6023
6017
  var createVoiceMemoryStore = () => {
6024
6018
  const sessions = new Map;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@absolutejs/voice",
3
- "version": "0.0.22-beta.642",
3
+ "version": "0.0.22-beta.643",
4
4
  "description": "Voice primitives and Elysia plugin for AbsoluteJS",
5
5
  "repository": {
6
6
  "type": "git",
@@ -117,7 +117,7 @@
117
117
  "@absolutejs/absolute": ">=0.19.0-beta.646",
118
118
  "@absolutejs/ai": ">=0.0.5",
119
119
  "@angular/core": ">=21.0.0",
120
- "drizzle-orm": ">=1.0.0-rc.1",
120
+ "drizzle-orm": ">=1.0.0-rc.4 <2",
121
121
  "elysia": ">=1.4.18",
122
122
  "react": ">=19.0.0",
123
123
  "vue": ">=3.5.0"
@@ -154,7 +154,7 @@
154
154
  "@types/bun": "1.3.9",
155
155
  "@types/react": "19.2.0",
156
156
  "@typescript-eslint/parser": "^8.57.2",
157
- "drizzle-orm": "1.0.0-rc.3",
157
+ "drizzle-orm": "1.0.0-rc.4",
158
158
  "elysia": "1.4.18",
159
159
  "eslint": "^10.1.0",
160
160
  "eslint-plugin-absolute": "0.11.0-beta.3",