@remnic/capture-audio 10.0.106 → 10.0.108

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.
@@ -1958,9 +1958,10 @@ var HELPER_BIN_ENV = "REMNIC_CAPTURE_HELPER_BIN";
1958
1958
  var STOP_DRAIN_TIMEOUT_MS = 5e3;
1959
1959
  var HELPER_BIN_NAME = "remnic-capture-helper";
1960
1960
  function helperPackageSpecifier(platform, arch) {
1961
+ if (platform === "linux") return "@remnic/capture-native-linux";
1961
1962
  if (platform !== "darwin") {
1962
1963
  throw new CaptureConfigError(
1963
- `Desktop audio capture native helper is only available on macOS; platform "${platform}" is unsupported`
1964
+ `Desktop audio capture native helper is only available on macOS and Linux; platform "${platform}" is unsupported`
1964
1965
  );
1965
1966
  }
1966
1967
  if (arch === "arm64") return "@remnic/capture-native-darwin-arm64";
@@ -1969,6 +1970,10 @@ function helperPackageSpecifier(platform, arch) {
1969
1970
  `Desktop audio capture native helper is unavailable for macOS architecture "${arch}"`
1970
1971
  );
1971
1972
  }
1973
+ function missingHelperHint(platform, specifier) {
1974
+ const how = platform === "linux" ? `Run \`npm install ${specifier}\` (it needs PipeWire's pw-record and pw-dump)` : "Build the Swift helper from source (packages/capture-native-darwin-helper)";
1975
+ return `Desktop audio capture requires the optional native helper ${specifier}, which is not available. ${how}, or set ${HELPER_BIN_ENV} to a built remnic-capture-helper binary.`;
1976
+ }
1972
1977
  function defaultResolve(specifier) {
1973
1978
  return fileURLToPath(import.meta.resolve(specifier));
1974
1979
  }
@@ -1985,9 +1990,7 @@ function resolveHelperBinary(deps = {}) {
1985
1990
  try {
1986
1991
  entry = resolve(specifier);
1987
1992
  } catch {
1988
- throw new CaptureConfigError(
1989
- `Desktop audio capture requires the optional native helper ${specifier}, which is not available. Build the Swift helper from source (packages/capture-native-darwin-helper) and set ${HELPER_BIN_ENV} to the built remnic-capture-helper binary.`
1990
- );
1993
+ throw new CaptureConfigError(missingHelperHint(platform, specifier));
1991
1994
  }
1992
1995
  const pkgJsonPath = path7.join(path7.dirname(entry), "package.json");
1993
1996
  return { specifier, binaryPath: helperBinaryFromPackage(pkgJsonPath, readFile2, specifier) };
@@ -2168,8 +2171,8 @@ function createNativeCaptureRunner(options) {
2168
2171
  if (typeof options.outDir !== "string" || options.outDir.trim() === "") {
2169
2172
  throw new CaptureConfigError("native runner outDir must be a non-empty string");
2170
2173
  }
2171
- if (!Number.isFinite(options.chunkSeconds) || options.chunkSeconds <= 0) {
2172
- throw new CaptureConfigError("native runner chunkSeconds must be a positive number");
2174
+ if (!Number.isInteger(options.chunkSeconds) || options.chunkSeconds <= 0) {
2175
+ throw new CaptureConfigError("native runner chunkSeconds must be a positive whole number");
2173
2176
  }
2174
2177
  const spawn3 = options.spawn ?? defaultSpawn;
2175
2178
  const scheduleRestart = options.scheduleRestart ?? ((fn, delayMs) => setTimeout(fn, delayMs).unref());
package/dist/cli-bin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  runCapture
4
- } from "./chunk-GG3P5TCV.js";
4
+ } from "./chunk-CDSMJZRT.js";
5
5
 
6
6
  // src/cli-bin.ts
7
7
  runCapture({ argv: process.argv.slice(2) }).then((code) => {
package/dist/index.d.ts CHANGED
@@ -254,9 +254,9 @@ interface NativeCaptureRunner {
254
254
  declare const HELPER_BIN_ENV = "REMNIC_CAPTURE_HELPER_BIN";
255
255
  /**
256
256
  * Compute the optional native-helper package specifier for a platform/arch.
257
- * The helper is macOS-only and hardware-gated; every other platform (and any
258
- * unsupported macOS architecture) throws loudly rather than resolving to a
259
- * package that cannot exist.
257
+ * macOS has one package per architecture (a compiled Swift binary). Linux has one package for every
258
+ * architecture (a Node script over PipeWire). Every other platform (and any unsupported macOS
259
+ * architecture) throws loudly rather than resolving to a package that cannot exist.
260
260
  */
261
261
  declare function helperPackageSpecifier(platform: NodeJS.Platform | string, arch: string): string;
262
262
  /**
package/dist/index.js CHANGED
@@ -72,7 +72,7 @@ import {
72
72
  whisperModelUrl,
73
73
  wordJaccard,
74
74
  writePidFile
75
- } from "./chunk-GG3P5TCV.js";
75
+ } from "./chunk-CDSMJZRT.js";
76
76
 
77
77
  // src/vad.ts
78
78
  import { statSync } from "node:fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remnic/capture-audio",
3
- "version": "10.0.106",
3
+ "version": "10.0.108",
4
4
  "description": "Desktop audio capture daemon for Remnic — local spool, loopback HTTP API, and replay ingestion for the wearable source `desktop` (à-la-carte)",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -29,13 +29,14 @@
29
29
  "tsup": "^8.0.0",
30
30
  "typescript": "^5.7.0",
31
31
  "tsx": "^4.0.0",
32
- "@remnic/core": "10.0.106"
32
+ "@remnic/core": "10.0.108"
33
33
  },
34
34
  "peerDependencies": {
35
- "@remnic/core": "^10.0.106",
35
+ "@remnic/core": "^10.0.108",
36
36
  "sherpa-onnx-node": "*",
37
- "@remnic/capture-native-darwin-arm64": "^10.0.106",
38
- "@remnic/capture-native-darwin-x64": "^10.0.106"
37
+ "@remnic/capture-native-darwin-arm64": "^10.0.108",
38
+ "@remnic/capture-native-darwin-x64": "^10.0.108",
39
+ "@remnic/capture-native-linux": "^10.0.108"
39
40
  },
40
41
  "peerDependenciesMeta": {
41
42
  "sherpa-onnx-node": {
@@ -46,6 +47,9 @@
46
47
  },
47
48
  "@remnic/capture-native-darwin-x64": {
48
49
  "optional": true
50
+ },
51
+ "@remnic/capture-native-linux": {
52
+ "optional": true
49
53
  }
50
54
  },
51
55
  "license": "MIT",