@holdyourvoice/hyv 2.4.5 → 2.5.1

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/package.json CHANGED
@@ -1,19 +1,19 @@
1
1
  {
2
2
  "name": "@holdyourvoice/hyv",
3
- "version": "2.4.5",
4
- "description": "Hold Your Voice \u2014 voice gate layer for AI workflows. make your ai agent sound exactly like you! includes 220+ AI pattern detection engine.",
3
+ "version": "2.5.1",
4
+ "description": "Hold Your Voice voice gate layer for AI workflows. make your ai agent sound exactly like you! includes 220+ AI pattern detection engine.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
7
  "hyv": "dist/index.js",
8
- "hyvoice": "dist/index.js",
9
- "hyv-voice": "scripts/hold_voice.py",
10
- "hyv-sync": "scripts/hold_voice_sync.py"
8
+ "hyvoice": "dist/index.js"
11
9
  },
12
10
  "scripts": {
13
11
  "build": "esbuild src/index.ts --bundle --platform=node --target=node18 --outfile=dist/index.js --format=cjs --banner:js='#!/usr/bin/env node'",
14
12
  "dev": "npm run build && node dist/index.js",
15
13
  "prepublishOnly": "node scripts/check-no-duplicates.js && npm run build",
16
- "postinstall": "node scripts/postinstall.js"
14
+ "postinstall": "node scripts/postinstall.js",
15
+ "test": "vitest run",
16
+ "test:watch": "vitest"
17
17
  },
18
18
  "keywords": [
19
19
  "voice",
@@ -30,13 +30,14 @@
30
30
  "dependencies": {
31
31
  "chalk": "^4.1.2",
32
32
  "commander": "^12.1.0",
33
- "open": "^8.4.2",
34
- "glob": "^11.0.0"
33
+ "glob": "^11.0.0",
34
+ "open": "^8.4.2"
35
35
  },
36
36
  "devDependencies": {
37
- "@types/node": "^20.11.0",
37
+ "@types/node": "^20.19.42",
38
38
  "esbuild": "^0.20.0",
39
- "typescript": "^5.3.3"
39
+ "typescript": "^5.3.3",
40
+ "vitest": "^4.1.8"
40
41
  },
41
42
  "engines": {
42
43
  "node": ">=18"
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env python3
2
+ #!/usr/bin/env python3
2
3
  """Portable Hold Your Voice helpers.
3
4
 
4
5
  This script intentionally has no third-party dependencies. It is not the Hold
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env python3
2
+ #!/usr/bin/env python3
2
3
  """Push voice profile, meta, and voice.md to Cloudflare R2 for backup.
3
4
 
4
5
  Cost design: R2 has no egress fees. This script uses S3-compatible PUT only
@@ -77,16 +77,24 @@ try {
77
77
 
78
78
  // ── Windsurf (global rules) ───────────────────────────────────────────────
79
79
  try {
80
- const wsDir = isWin
81
- ? path.join(home, 'AppData', 'Roaming', 'Windsurf')
82
- : path.join(home, '.windsurf');
83
- if (fs.existsSync(wsDir)) {
84
- const rulesFile = path.join(wsDir, 'rules', 'hyv.md');
85
- fs.mkdirSync(path.dirname(rulesFile), { recursive: true });
86
- const src = path.join(pkgDir, 'agents', 'windsurf.md');
87
- if (fs.existsSync(src) && !fs.existsSync(rulesFile)) {
88
- fs.copyFileSync(src, rulesFile);
89
- configured.push('windsurf');
80
+ const wsDirs = [
81
+ isWin
82
+ ? path.join(home, 'AppData', 'Roaming', 'Windsurf')
83
+ : path.join(home, '.windsurf'),
84
+ isWin
85
+ ? null
86
+ : path.join(home, 'Library', 'Application Support', 'Windsurf'),
87
+ ].filter(Boolean);
88
+ for (const wsDir of wsDirs) {
89
+ if (fs.existsSync(wsDir)) {
90
+ const rulesFile = path.join(wsDir, 'rules', 'hyv.md');
91
+ fs.mkdirSync(path.dirname(rulesFile), { recursive: true });
92
+ const src = path.join(pkgDir, 'agents', 'windsurf.md');
93
+ if (fs.existsSync(src) && !fs.existsSync(rulesFile)) {
94
+ fs.copyFileSync(src, rulesFile);
95
+ configured.push('windsurf');
96
+ break;
97
+ }
90
98
  }
91
99
  }
92
100
  } catch {}
@@ -103,33 +111,6 @@ try {
103
111
  }
104
112
  } catch {}
105
113
 
106
- // ── Codex (AGENTS.md in current project) ──────────────────────────────────
107
- try {
108
- const cwd = process.cwd();
109
- const agentsFile = path.join(cwd, 'AGENTS.md');
110
- if (!fs.existsSync(agentsFile)) {
111
- const src = path.join(pkgDir, 'agents', 'codex.md');
112
- if (fs.existsSync(src)) {
113
- fs.copyFileSync(src, agentsFile);
114
- configured.push('codex');
115
- }
116
- }
117
- } catch {}
118
-
119
- // ── Command Code (global skills) ──────────────────────────────────────────
120
- try {
121
- const ccDir = path.join(home, '.commandcode', 'skills', 'hyv');
122
- if (fs.existsSync(path.dirname(ccDir))) {
123
- fs.mkdirSync(ccDir, { recursive: true });
124
- const skillFile = path.join(ccDir, 'SKILL.md');
125
- const src = path.join(pkgDir, 'agents', 'generic.md');
126
- if (fs.existsSync(src) && !fs.existsSync(skillFile)) {
127
- fs.copyFileSync(src, skillFile);
128
- configured.push('command code');
129
- }
130
- }
131
- } catch {}
132
-
133
114
  // ── Summary ───────────────────────────────────────────────────────────────
134
115
  if (configured.length > 0) {
135
116
  console.log(' \u2713 auto-configured: ' + configured.join(', '));