claude-voice-mod 0.0.0-stage → 0.1.212

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 (4) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -2
  3. package/install.mjs +81 -0
  4. package/package.json +20 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Hopeton Palmer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,17 @@
1
- # Temporary Holding Version
1
+ # Claude Voice Mod
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Install the prebuilt VoiceMesh Mod for Claude Code on macOS or Windows:
4
+
5
+ ```sh
6
+ npm install --global claude-voice-mod@beta
7
+ ```
8
+
9
+ With pnpm, run the installer directly:
10
+
11
+ ```sh
12
+ pnpm dlx claude-voice-mod@beta
13
+ ```
14
+
15
+ Installation downloads the matching [v0.1.212 Beta GitHub release](https://github.com/hopetonp/claude-voice-mod/releases/tag/v0.1.212), 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.
16
+
17
+ This package supports macOS arm64, macOS x64, and Windows x64. If npm lifecycle scripts are disabled, the installer does not run.
package/install.mjs ADDED
@@ -0,0 +1,81 @@
1
+ #!/usr/bin/env node
2
+ import { createHash } from 'node:crypto'
3
+ import { spawnSync } from 'node:child_process'
4
+ import { createReadStream, createWriteStream, readFileSync } from 'node:fs'
5
+ import { mkdtemp, readFile, rm } from 'node:fs/promises'
6
+ import { tmpdir } from 'node:os'
7
+ import { join, resolve } from 'node:path'
8
+ import { Readable } from 'node:stream'
9
+ import { pipeline } from 'node:stream/promises'
10
+ import { fileURLToPath } from 'node:url'
11
+
12
+ const version = JSON.parse(readFileSync(new URL('./package.json', import.meta.url), 'utf8')).version
13
+ const checksums = {
14
+ 'darwin-arm64': '629645d2262e9dc59f728831b7a8c6e0afc4b985da9b7225ac3bc1a83446bc7b',
15
+ 'darwin-x64': 'c17b62c2ae263e07afe51a032e3fbd6e2c33c3da1d1fe3091de861b4e5f7e4ee',
16
+ 'win32-x64': '0c66fe02a84cd7caf1ab54389ecac8f180876b54b515fc8fcd5858f101b1e2cf',
17
+ }
18
+
19
+ export function releaseFor(platform = process.platform, arch = process.arch) {
20
+ const key = `${platform}-${arch}`
21
+ const checksum = checksums[key]
22
+ if (!checksum) throw new Error(`VoiceMesh does not have a prebuilt package for ${key}`)
23
+ const os = platform === 'darwin' ? 'macos' : 'win'
24
+ const archive = `voicemesh-claude-${os}-${arch}-${version}.zip`
25
+ return { archive, checksum, url: `https://github.com/hopetonp/claude-voice-mod/releases/download/v${version}/${archive}` }
26
+ }
27
+
28
+ function run(command, args) {
29
+ const result = spawnSync(command, args, { stdio: 'inherit' })
30
+ if (result.error) throw result.error
31
+ if (result.status !== 0) throw new Error(`${command} failed with exit code ${result.status ?? 'unknown'}`)
32
+ }
33
+
34
+ function powershellQuote(value) {
35
+ return `'${value.replaceAll("'", "''")}'`
36
+ }
37
+
38
+ async function sha256(path) {
39
+ const hash = createHash('sha256')
40
+ for await (const chunk of createReadStream(path)) hash.update(chunk)
41
+ return hash.digest('hex')
42
+ }
43
+
44
+ export async function install() {
45
+ if (process.platform === 'darwin' && process.getuid() === 0) {
46
+ throw new Error('Run npm as your normal Mac user, without sudo, so VoiceMesh installs for that user')
47
+ }
48
+ const release = releaseFor()
49
+ const temp = await mkdtemp(join(tmpdir(), 'voicemesh-npm-'))
50
+ try {
51
+ const zip = join(temp, release.archive)
52
+ const response = await fetch(release.url, { signal: AbortSignal.timeout(300000) })
53
+ if (!response.ok || !response.body) throw new Error(`Could not download VoiceMesh: HTTP ${response.status}`)
54
+ await pipeline(Readable.fromWeb(response.body), createWriteStream(zip))
55
+ if (await sha256(zip) !== release.checksum) throw new Error('VoiceMesh package checksum does not match the published release')
56
+
57
+ const unpacked = join(temp, 'unpacked')
58
+ if (process.platform === 'darwin') run('ditto', ['-x', '-k', zip, unpacked])
59
+ else run('powershell.exe', ['-NoProfile', '-NonInteractive', '-Command', `Expand-Archive -LiteralPath ${powershellQuote(zip)} -DestinationPath ${powershellQuote(unpacked)}`])
60
+ const folder = process.platform === 'darwin'
61
+ ? `voicemesh-claude-macos-${process.arch}-${version}`
62
+ : `voicemesh-claude-win-${process.arch}`
63
+ const packageDir = join(unpacked, folder)
64
+ const metadata = JSON.parse(await readFile(join(packageDir, 'release.json'), 'utf8'))
65
+ if (metadata.version !== version || metadata.architecture !== process.arch) throw new Error('VoiceMesh package version or architecture does not match')
66
+
67
+ if (process.platform === 'darwin') run('sh', [join(packageDir, 'install.sh')])
68
+ else run('powershell.exe', ['-NoProfile', '-NonInteractive', '-ExecutionPolicy', 'Bypass', '-File', join(packageDir, 'install.ps1')])
69
+ } finally {
70
+ await rm(temp, { recursive: true, force: true })
71
+ }
72
+ }
73
+
74
+ if (process.argv[1] && fileURLToPath(import.meta.url) === resolve(process.argv[1])) {
75
+ // pnpm dlx can run both postinstall and the binary; install only from its binary.
76
+ const shouldInstall = process.env.npm_lifecycle_event !== 'postinstall'
77
+ || process.env.npm_config_user_agent?.startsWith('npm/')
78
+ if (shouldInstall) {
79
+ install().catch(error => { console.error(`VoiceMesh installation failed: ${error.message}`); process.exitCode = 1 })
80
+ }
81
+ }
package/package.json CHANGED
@@ -1,6 +1,22 @@
1
1
  {
2
2
  "name": "claude-voice-mod",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.212",
4
+ "description": "Install the prebuilt VoiceMesh Mod beta for Claude Code",
5
+ "author": "Hopeton Palmer",
6
+ "license": "MIT",
7
+ "type": "module",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/hopetonp/claude-voice-mod.git"
11
+ },
12
+ "engines": {
13
+ "node": ">=20"
14
+ },
15
+ "bin": {
16
+ "claude-voice-mod": "install.mjs"
17
+ },
18
+ "files": ["install.mjs"],
19
+ "scripts": {
20
+ "postinstall": "node install.mjs"
21
+ }
22
+ }