claude-voice-mod 0.1.224 → 0.1.226

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
@@ -1,17 +1,19 @@
1
1
  # Claude Voice Mod
2
2
 
3
- Install the prebuilt VoiceMesh Mod for Claude Code on macOS or Windows:
3
+ Requires **Node.js 22.19 or later**. Install it from [nodejs.org](https://nodejs.org); on Windows, prefer the official installer over an outdated nvm-windows installation.
4
+
5
+ Install the prebuilt VoiceMesh Mod for Claude Code on macOS or Windows with visible progress:
4
6
 
5
7
  ```sh
6
- npm install --global claude-voice-mod@beta
8
+ npx --yes claude-voice-mod@latest
7
9
  ```
8
10
 
9
11
  With pnpm, run the installer directly:
10
12
 
11
13
  ```sh
12
- pnpm dlx claude-voice-mod@beta
14
+ pnpm dlx claude-voice-mod@latest
13
15
  ```
14
16
 
15
- Installation downloads the matching [v0.1.220 Beta GitHub release](https://github.com/hopetonp/claude-voice-mod/releases/tag/v0.1.220), checks its SHA-256 digest, and runs the bundled installer. It requires the Claude CLI and Chrome; it does not compile code or require Rust. Restart Claude after installation.
17
+ Install Node.js 22.19 or later first. Installation downloads the matching [GitHub release](https://github.com/hopetonp/claude-voice-mod/releases/latest), checks its SHA-256 digest, and runs its installer. It requires the Claude CLI and Chrome; it does not bundle Node, compile code, or require Rust. Restart Claude after installation.
16
18
 
17
- This package supports macOS arm64, macOS x64, and Windows x64. If npm lifecycle scripts are disabled, the installer does not run.
19
+ For a global installation, use `npm install --global --foreground-scripts claude-voice-mod@latest` to show installer output. This package supports macOS arm64, macOS x64, and Windows x64. If npm lifecycle scripts are disabled, run the `claude-voice-mod` command explicitly after installing the package.
package/check-node.cjs ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ const { assertNodeVersion } = require('./node-requirement.cjs')
3
+
4
+ // npm engines is advisory. Check before loading ESM or any newer Node built-ins.
5
+ try {
6
+ assertNodeVersion()
7
+ // pnpm dlx runs the binary after postinstall; only npm installs from postinstall.
8
+ if (process.env.npm_lifecycle_event !== 'postinstall'
9
+ || process.env.npm_command !== 'exec' && String(process.env.npm_config_user_agent || '').startsWith('npm/')) {
10
+ import('./install.mjs').then(module => module.install()).catch(fail)
11
+ }
12
+ } catch (error) { fail(error) }
13
+
14
+ function fail(error) {
15
+ console.error('VoiceMesh installation failed: ' + error.message)
16
+ process.exitCode = 1
17
+ }
package/install.mjs CHANGED
@@ -6,14 +6,16 @@ import { mkdtemp, readFile, rm } from 'node:fs/promises'
6
6
  import { tmpdir } from 'node:os'
7
7
  import { join, resolve } from 'node:path'
8
8
  import { Readable } from 'node:stream'
9
+ import { Transform } from 'node:stream'
9
10
  import { pipeline } from 'node:stream/promises'
10
11
  import { fileURLToPath } from 'node:url'
12
+ import { assertNodeVersion } from './node-requirement.cjs'
11
13
 
12
14
  const version = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8')).version
13
15
  const checksums = {
14
- "darwin-arm64": "dd3ea7e700dda0454c65cdaf24770b37093515f0e64f5d9231310a0237e2eb30",
15
- "darwin-x64": "5a7f63363c053655bd4adf850949483cea739d575d99e53697bcf046271511c0",
16
- "win32-x64": "3f1392ee800ae79b5a313679e150ac0f06eb9a361b73ef499c16867113f6b0ea"
16
+ "darwin-arm64": "23f4d1f69487f4e2a0eccd00ae7658a5855def9e493febac0f10ee85d1c0d604",
17
+ "darwin-x64": "7a42e09ae9ebb87ded849b896225929508b5495e252ee82b441eceebcf2df48d",
18
+ "win32-x64": "47f8acd5922f2bc94547c76a0c3c8230740bd598ac881d01dd2524cb9cb4d9e9"
17
19
  }
18
20
 
19
21
  export function releaseFor(platform = process.platform, arch = process.arch) {
@@ -42,17 +44,34 @@ async function sha256(path) {
42
44
  }
43
45
 
44
46
  export async function install() {
47
+ // npm can run under an older Node even if its engines warning was ignored.
48
+ assertNodeVersion()
45
49
  if (process.platform === 'darwin' && process.getuid() === 0) {
46
50
  throw new Error('Run npm as your normal Mac user, without sudo, so VoiceMesh installs for that user')
47
51
  }
48
52
  const release = releaseFor()
53
+ const status = message => console.error(`VoiceMesh: ${message}`)
49
54
  const temp = await mkdtemp(join(tmpdir(), 'voicemesh-npm-'))
50
55
  try {
51
56
  const zip = join(temp, release.archive)
57
+ status(`Downloading ${version} for ${process.platform}-${process.arch}…`)
52
58
  const response = await fetch(release.url, { signal: AbortSignal.timeout(300000) })
53
59
  if (!response.ok || !response.body) throw new Error(`Could not download VoiceMesh: HTTP ${response.status}`)
54
- await pipeline(Readable.fromWeb(response.body), createWriteStream(zip))
60
+ let received = 0
61
+ let nextReport = 1024 * 1024
62
+ const total = Number(response.headers.get('content-length'))
63
+ const progress = new Transform({ transform(chunk, _encoding, callback) {
64
+ received += chunk.length
65
+ if (received >= nextReport) {
66
+ status(`Downloaded ${(received / 1048576).toFixed(1)}${total > 0 ? ` of ${(total / 1048576).toFixed(1)}` : ''} MB`)
67
+ nextReport = received + 1024 * 1024
68
+ }
69
+ callback(null, chunk)
70
+ } })
71
+ await pipeline(Readable.fromWeb(response.body), progress, createWriteStream(zip))
72
+ status('Verifying SHA-256 checksum…')
55
73
  if (await sha256(zip) !== release.checksum) throw new Error('VoiceMesh package checksum does not match the published release')
74
+ status('Checksum verified. Extracting package…')
56
75
 
57
76
  const unpacked = join(temp, 'unpacked')
58
77
  if (process.platform === 'darwin') run('ditto', ['-x', '-k', zip, unpacked])
@@ -64,8 +83,10 @@ export async function install() {
64
83
  const metadata = JSON.parse(await readFile(join(packageDir, 'release.json'), 'utf8'))
65
84
  if (metadata.version !== version || metadata.architecture !== process.arch) throw new Error('VoiceMesh package version or architecture does not match')
66
85
 
86
+ status('Installing host and Claude Mods…')
67
87
  if (process.platform === 'darwin') run('sh', [join(packageDir, 'install.sh')])
68
88
  else run('powershell.exe', ['-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass', '-File', join(packageDir, 'install.ps1')])
89
+ status(`${version} installed. Restart Claude, then open Voice settings.`)
69
90
  } finally {
70
91
  await rm(temp, { recursive: true, force: true })
71
92
  }
package/node-minimum ADDED
@@ -0,0 +1 @@
1
+ 22.19.0
@@ -0,0 +1,28 @@
1
+ // Keep this module loadable by old Node so it can explain the prerequisite.
2
+ const { readFileSync, realpathSync } = require('fs')
3
+ const { join } = require('path')
4
+
5
+ const minimumNodeVersion = readFileSync(join(__dirname, 'node-minimum'), 'utf8').trim()
6
+
7
+ function assertNodeVersion(version = process.versions.node) {
8
+ const match = /^v?(\d+)\.(\d+)\.(\d+)$/.exec(version.trim())
9
+ const minimum = minimumNodeVersion.split('.').map(Number)
10
+ const actual = match && match.slice(1).map(Number)
11
+ const differing = actual && actual.findIndex((part, index) => part !== minimum[index])
12
+ if (!actual || differing >= 0 && actual[differing] < minimum[differing]) {
13
+ throw new Error(`VoiceMesh requires Node.js ${minimumNodeVersion} or later; found ${version.trim()}. Install Node from https://nodejs.org and run the installer again.`)
14
+ }
15
+ }
16
+
17
+ exports.minimumNodeVersion = minimumNodeVersion
18
+ exports.assertNodeVersion = assertNodeVersion
19
+
20
+ if (require.main === module) {
21
+ try {
22
+ assertNodeVersion()
23
+ if (process.argv[2] === '--resolve') console.log(realpathSync(process.execPath))
24
+ } catch (error) {
25
+ console.error(error.message)
26
+ process.exitCode = 1
27
+ }
28
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-voice-mod",
3
- "version": "0.1.224",
3
+ "version": "0.1.226",
4
4
  "description": "Install the prebuilt VoiceMesh Mod beta for Claude Code",
5
5
  "author": "Hopeton Palmer",
6
6
  "license": "MIT",
@@ -10,13 +10,18 @@
10
10
  "url": "git+https://github.com/hopetonp/claude-voice-mod.git"
11
11
  },
12
12
  "engines": {
13
- "node": ">=20"
13
+ "node": ">=22.19.0"
14
14
  },
15
15
  "bin": {
16
- "claude-voice-mod": "install.mjs"
16
+ "claude-voice-mod": "check-node.cjs"
17
17
  },
18
- "files": ["install.mjs"],
18
+ "files": [
19
+ "check-node.cjs",
20
+ "install.mjs",
21
+ "node-requirement.cjs",
22
+ "node-minimum"
23
+ ],
19
24
  "scripts": {
20
- "postinstall": "node install.mjs"
25
+ "postinstall": "node check-node.cjs"
21
26
  }
22
27
  }