@holdyourvoice/hyv 2.9.28 → 3.0.0
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/LICENSE +17 -22
- package/Readme.md +247 -0
- package/dist/ai-editor.js +9 -0
- package/dist/ai-editor.test.js +61 -0
- package/dist/cli.js +106 -0
- package/dist/cli.test.js +119 -0
- package/dist/contracts.js +1 -0
- package/dist/pipeline.js +64 -0
- package/dist/pipeline.test.js +36 -0
- package/dist/release-audit.test.js +29 -0
- package/dist/text.js +42 -0
- package/dist/text.test.js +16 -0
- package/dist/voice-dna.js +77 -0
- package/dist/voice-dna.test.js +32 -0
- package/package.json +14 -74
- package/CHANGELOG.md +0 -241
- package/README.md +0 -218
- package/agents/AGENTS.md +0 -82
- package/agents/README.md +0 -20
- package/agents/chatgpt.md +0 -47
- package/agents/claude-code.md +0 -45
- package/agents/codex.md +0 -31
- package/agents/cursor.md +0 -36
- package/agents/generic.md +0 -49
- package/agents/windsurf.md +0 -20
- package/assets/FREE-PAID.md +0 -46
- package/assets/README.md +0 -20
- package/assets/ai-eliminator-rules.md +0 -140
- package/assets/chatgpt-instructions.txt +0 -8
- package/assets/detection-rules.json +0 -18
- package/assets/economic-drift-voice.md +0 -42
- package/assets/voice-dna-template.md +0 -88
- package/assets/voice-profile-schema.json +0 -28
- package/dist/index.js +0 -20911
- package/scripts/README.md +0 -23
- package/scripts/check-no-duplicates.js +0 -32
- package/scripts/install.ps1 +0 -101
- package/scripts/install.sh +0 -155
- package/scripts/postinstall-lib.js +0 -796
- package/scripts/postinstall.js +0 -35
- package/skills/README.md +0 -20
- package/skills/ai-writing-eliminator/SKILL.md +0 -63
- package/skills/hold-your-voice/SKILL.md +0 -174
- package/skills/voice-matcher/SKILL.md +0 -57
package/scripts/README.md
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# `cli/scripts/`
|
|
2
|
-
|
|
3
|
-
## Purpose
|
|
4
|
-
|
|
5
|
-
`cli/scripts/` contains package install, publish validation, smoke-test, and supporting CLI scripts.
|
|
6
|
-
|
|
7
|
-
## Contracts
|
|
8
|
-
|
|
9
|
-
Scripts are referenced by `cli/package.json` and the npm package `files` list. Package-relative paths must remain valid when the package is published.
|
|
10
|
-
|
|
11
|
-
`postinstall-lib.js` writes the managed host instructions. A CLI version bump refreshes them through the `~/.hyv/agents-version.json` marker when users run install or `hyv doctor --fix-agents`. `validate-publish.js` accepts npm's array and package-name keyed dry-run manifests.
|
|
12
|
-
|
|
13
|
-
## Validation
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
cd cli
|
|
17
|
-
npm run validate:publish
|
|
18
|
-
npm run test:smoke
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
## Documentation ownership
|
|
22
|
-
|
|
23
|
-
Changes under this folder update this README, `cli/README.md`, and the root `README.md`.
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* check-no-duplicates.js — fail publish if iCloud/OS duplicate files exist.
|
|
4
|
-
* Files with spaces like "foo 2.md" are iCloud sync artifacts.
|
|
5
|
-
*/
|
|
6
|
-
const fs = require('fs');
|
|
7
|
-
const path = require('path');
|
|
8
|
-
|
|
9
|
-
const ROOT = path.resolve(__dirname, '..');
|
|
10
|
-
let found = false;
|
|
11
|
-
|
|
12
|
-
function checkDir(dir) {
|
|
13
|
-
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
14
|
-
const full = path.join(dir, entry.name);
|
|
15
|
-
if (entry.name.includes(' 2') || entry.name.includes(' 3')) {
|
|
16
|
-
if (entry.isFile()) {
|
|
17
|
-
console.error(` DUPLICATE: ${path.relative(ROOT, full)}`);
|
|
18
|
-
found = true;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
if (entry.isDirectory() && !entry.name.startsWith('.') && entry.name !== 'node_modules') {
|
|
22
|
-
checkDir(full);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
checkDir(ROOT);
|
|
28
|
-
if (found) {
|
|
29
|
-
console.error('\nError: Duplicate files detected (iCloud sync artifacts).');
|
|
30
|
-
console.error('Remove them before publishing: rm -f <file>\n');
|
|
31
|
-
process.exit(1);
|
|
32
|
-
}
|
package/scripts/install.ps1
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
# hold your voice — install node (if needed) + @holdyourvoice/hyv
|
|
2
|
-
param(
|
|
3
|
-
[switch]$EnsureNodeOnly
|
|
4
|
-
)
|
|
5
|
-
|
|
6
|
-
$ErrorActionPreference = 'Stop'
|
|
7
|
-
|
|
8
|
-
$HyvPkg = '@holdyourvoice/hyv@latest'
|
|
9
|
-
$MinNodeMajor = 18
|
|
10
|
-
|
|
11
|
-
function Write-Log([string]$Message) { Write-Host " $Message" }
|
|
12
|
-
|
|
13
|
-
function Test-NodeOk {
|
|
14
|
-
if (-not (Get-Command node -ErrorAction SilentlyContinue)) { return $false }
|
|
15
|
-
$major = [int](node -p "parseInt(process.versions.node.split('.')[0], 10)")
|
|
16
|
-
return $major -ge $MinNodeMajor
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
function Refresh-Path {
|
|
20
|
-
$machine = [Environment]::GetEnvironmentVariable('Path', 'Machine')
|
|
21
|
-
$user = [Environment]::GetEnvironmentVariable('Path', 'User')
|
|
22
|
-
if ($machine -or $user) {
|
|
23
|
-
$env:Path = @($machine, $user) -join ';'
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function Install-Node {
|
|
28
|
-
if (Get-Command winget -ErrorAction SilentlyContinue) {
|
|
29
|
-
Write-Log 'installing node via winget...'
|
|
30
|
-
winget install OpenJS.NodeJS.LTS --accept-package-agreements --accept-source-agreements
|
|
31
|
-
Refresh-Path
|
|
32
|
-
return
|
|
33
|
-
}
|
|
34
|
-
if (Get-Command choco -ErrorAction SilentlyContinue) {
|
|
35
|
-
Write-Log 'installing node via chocolatey...'
|
|
36
|
-
choco install nodejs-lts -y
|
|
37
|
-
Refresh-Path
|
|
38
|
-
return
|
|
39
|
-
}
|
|
40
|
-
$lts = '22.16.0'
|
|
41
|
-
$msi = "node-v$lts-x64.msi"
|
|
42
|
-
$url = "https://nodejs.org/dist/v$lts/$msi"
|
|
43
|
-
$tmp = Join-Path $env:TEMP "hyv-node-$msi"
|
|
44
|
-
Write-Log "downloading node $lts..."
|
|
45
|
-
Invoke-WebRequest -Uri $url -OutFile $tmp -UseBasicParsing
|
|
46
|
-
Write-Log 'installing node...'
|
|
47
|
-
Start-Process msiexec.exe -ArgumentList "/i `"$tmp`" /qn" -Wait
|
|
48
|
-
Refresh-Path
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function Ensure-Node {
|
|
52
|
-
Refresh-Path
|
|
53
|
-
if (Test-NodeOk) {
|
|
54
|
-
Write-Log "node $(node -v) found"
|
|
55
|
-
return
|
|
56
|
-
}
|
|
57
|
-
Write-Log "node $MinNodeMajor+ not found — installing automatically..."
|
|
58
|
-
Install-Node
|
|
59
|
-
Refresh-Path
|
|
60
|
-
if (-not (Test-NodeOk)) {
|
|
61
|
-
throw 'node install finished but node is still not on PATH — open a new terminal and run this script again'
|
|
62
|
-
}
|
|
63
|
-
Write-Log "node $(node -v) ready"
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function Install-Hyv {
|
|
67
|
-
if (-not (Get-Command npm -ErrorAction SilentlyContinue)) {
|
|
68
|
-
throw 'npm not found after node install'
|
|
69
|
-
}
|
|
70
|
-
Write-Log 'installing hold your voice...'
|
|
71
|
-
try {
|
|
72
|
-
npm i -g $HyvPkg
|
|
73
|
-
} catch {
|
|
74
|
-
if ($_.Exception.Message -match 'ExecutionPolicy|scripts is disabled') {
|
|
75
|
-
Write-Log 'PowerShell execution policy blocked npm — retrying with Bypass...'
|
|
76
|
-
powershell -ExecutionPolicy Bypass -Command "npm i -g $HyvPkg"
|
|
77
|
-
} else {
|
|
78
|
-
throw
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
Refresh-Path
|
|
82
|
-
if (Get-Command hyv -ErrorAction SilentlyContinue) {
|
|
83
|
-
Write-Log 'running hyv welcome...'
|
|
84
|
-
hyv welcome
|
|
85
|
-
} else {
|
|
86
|
-
Write-Host ' ! hyv installed but not on PATH — open a new terminal and run: hyv welcome' -ForegroundColor Yellow
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
Write-Host ''
|
|
91
|
-
Write-Host 'hold your voice — installer'
|
|
92
|
-
Write-Host ''
|
|
93
|
-
Write-Host ' Note: If you see an "execution policy" error, re-run using:'
|
|
94
|
-
Write-Host ' powershell -ExecutionPolicy Bypass -c "irm https://holdyourvoice.com/install.ps1 | iex"'
|
|
95
|
-
Write-Host ''
|
|
96
|
-
Ensure-Node
|
|
97
|
-
if ($EnsureNodeOnly) { exit 0 }
|
|
98
|
-
Install-Hyv
|
|
99
|
-
Write-Host ''
|
|
100
|
-
Write-Host ' ✓ done — hyv is ready'
|
|
101
|
-
Write-Host ''
|
package/scripts/install.sh
DELETED
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
# hold your voice — install node (if needed) + @holdyourvoice/hyv
|
|
3
|
-
set -euo pipefail
|
|
4
|
-
|
|
5
|
-
HYV_PKG="@holdyourvoice/hyv@latest"
|
|
6
|
-
MIN_NODE_MAJOR=18
|
|
7
|
-
NODE_LTS="22.16.0"
|
|
8
|
-
ENSURE_NODE_ONLY=0
|
|
9
|
-
|
|
10
|
-
for arg in "$@"; do
|
|
11
|
-
case "$arg" in
|
|
12
|
-
--ensure-node-only) ENSURE_NODE_ONLY=1 ;;
|
|
13
|
-
esac
|
|
14
|
-
done
|
|
15
|
-
|
|
16
|
-
log() { printf ' %s\n' "$*"; }
|
|
17
|
-
warn() { printf ' ! %s\n' "$*" >&2; }
|
|
18
|
-
|
|
19
|
-
node_major() {
|
|
20
|
-
node -p "parseInt(process.versions.node.split('.')[0], 10)" 2>/dev/null || echo 0
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
node_ok() {
|
|
24
|
-
command -v node >/dev/null 2>&1 || return 1
|
|
25
|
-
[[ "$(node_major)" -ge "$MIN_NODE_MAJOR" ]]
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
refresh_path() {
|
|
29
|
-
export PATH="/usr/local/bin:/opt/homebrew/bin:${HOME}/.local/share/fnm:${PATH}"
|
|
30
|
-
hash -r 2>/dev/null || true
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
install_node_fnm() {
|
|
34
|
-
export FNM_DIR="${FNM_DIR:-${HOME}/.local/share/fnm}"
|
|
35
|
-
export FNM_VERSION="${FNM_VERSION:-v1.38.1}"
|
|
36
|
-
mkdir -p "$FNM_DIR"
|
|
37
|
-
if ! command -v fnm >/dev/null 2>&1; then
|
|
38
|
-
log "installing fnm (user-level node manager)..."
|
|
39
|
-
curl -fsSL https://fnm.vercel.app/install | bash -s -- --install-no-use
|
|
40
|
-
fi
|
|
41
|
-
refresh_path
|
|
42
|
-
if ! command -v fnm >/dev/null 2>&1 && [[ -x "${FNM_DIR}/fnm" ]]; then
|
|
43
|
-
export PATH="${FNM_DIR}:${PATH}"
|
|
44
|
-
fi
|
|
45
|
-
command -v fnm >/dev/null 2>&1 || return 1
|
|
46
|
-
eval "$(fnm env)"
|
|
47
|
-
fnm install "$NODE_LTS"
|
|
48
|
-
fnm default "$NODE_LTS"
|
|
49
|
-
eval "$(fnm env)"
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
install_node_mac() {
|
|
53
|
-
if command -v brew >/dev/null 2>&1; then
|
|
54
|
-
log "installing node via homebrew..."
|
|
55
|
-
brew install node
|
|
56
|
-
refresh_path
|
|
57
|
-
return 0
|
|
58
|
-
fi
|
|
59
|
-
if install_node_fnm; then
|
|
60
|
-
refresh_path
|
|
61
|
-
return 0
|
|
62
|
-
fi
|
|
63
|
-
local arch pkg
|
|
64
|
-
arch="$(uname -m)"
|
|
65
|
-
case "$arch" in
|
|
66
|
-
arm64) pkg="node-v${NODE_LTS}.pkg" ;;
|
|
67
|
-
x86_64) pkg="node-v${NODE_LTS}.pkg" ;;
|
|
68
|
-
*) warn "unsupported mac architecture: $arch"; return 1 ;;
|
|
69
|
-
esac
|
|
70
|
-
local url="https://nodejs.org/dist/v${NODE_LTS}/${pkg}"
|
|
71
|
-
local tmp="/tmp/hyv-node-v${NODE_LTS}.pkg"
|
|
72
|
-
log "downloading node ${NODE_LTS}..."
|
|
73
|
-
curl -fsSL "$url" -o "$tmp"
|
|
74
|
-
log "installing node (may ask for your password)..."
|
|
75
|
-
sudo installer -pkg "$tmp" -target /
|
|
76
|
-
refresh_path
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
install_node_linux() {
|
|
80
|
-
if install_node_fnm; then
|
|
81
|
-
refresh_path
|
|
82
|
-
return 0
|
|
83
|
-
fi
|
|
84
|
-
if command -v apt-get >/dev/null 2>&1; then
|
|
85
|
-
log "installing node via apt (nodesource)..."
|
|
86
|
-
curl -fsSL "https://deb.nodesource.com/setup_${NODE_LTS%%.*}.x" | sudo -E bash -
|
|
87
|
-
sudo apt-get install -y nodejs
|
|
88
|
-
refresh_path
|
|
89
|
-
return 0
|
|
90
|
-
fi
|
|
91
|
-
if command -v dnf >/dev/null 2>&1; then
|
|
92
|
-
log "installing node via dnf..."
|
|
93
|
-
sudo dnf install -y nodejs npm
|
|
94
|
-
refresh_path
|
|
95
|
-
return 0
|
|
96
|
-
fi
|
|
97
|
-
warn "could not auto-install node on this linux distro — install node ${MIN_NODE_MAJOR}+ manually"
|
|
98
|
-
return 1
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
install_node() {
|
|
102
|
-
case "$(uname -s)" in
|
|
103
|
-
Darwin) install_node_mac ;;
|
|
104
|
-
Linux) install_node_linux ;;
|
|
105
|
-
*)
|
|
106
|
-
warn "unsupported platform for auto node install"
|
|
107
|
-
return 1
|
|
108
|
-
;;
|
|
109
|
-
esac
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
ensure_node() {
|
|
113
|
-
refresh_path
|
|
114
|
-
if node_ok; then
|
|
115
|
-
log "node $(node -v) found"
|
|
116
|
-
return 0
|
|
117
|
-
fi
|
|
118
|
-
log "node ${MIN_NODE_MAJOR}+ not found — installing automatically..."
|
|
119
|
-
install_node
|
|
120
|
-
refresh_path
|
|
121
|
-
if node_ok; then
|
|
122
|
-
log "node $(node -v) ready"
|
|
123
|
-
return 0
|
|
124
|
-
fi
|
|
125
|
-
warn "node install finished but node is still not on PATH — open a new terminal and run this script again"
|
|
126
|
-
return 1
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
install_hyv() {
|
|
130
|
-
if ! command -v npm >/dev/null 2>&1; then
|
|
131
|
-
warn "npm not found after node install"
|
|
132
|
-
return 1
|
|
133
|
-
fi
|
|
134
|
-
log "installing hold your voice..."
|
|
135
|
-
npm i -g "$HYV_PKG"
|
|
136
|
-
refresh_path
|
|
137
|
-
if command -v hyv >/dev/null 2>&1; then
|
|
138
|
-
log "running hyv welcome..."
|
|
139
|
-
hyv welcome
|
|
140
|
-
else
|
|
141
|
-
warn "hyv installed but not on PATH — open a new terminal and run: hyv welcome"
|
|
142
|
-
fi
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
main() {
|
|
146
|
-
printf '\nhold your voice — installer\n\n'
|
|
147
|
-
ensure_node
|
|
148
|
-
if [[ "$ENSURE_NODE_ONLY" -eq 1 ]]; then
|
|
149
|
-
exit 0
|
|
150
|
-
fi
|
|
151
|
-
install_hyv
|
|
152
|
-
printf '\n ✓ done — hyv is ready\n\n'
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
main "$@"
|