@holdyourvoice/hyv 2.8.0 → 2.8.2

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@holdyourvoice/hyv",
3
- "version": "2.8.0",
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.",
3
+ "version": "2.8.2",
4
+ "description": "Free local AI writing scan for cursor & claude. MCP server, 220+ pattern detection, voice profiles. npx @holdyourvoice/hyv welcome",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
7
  "hyv": "dist/index.js",
@@ -28,7 +28,13 @@
28
28
  "cli",
29
29
  "brand-voice",
30
30
  "content-gate",
31
- "hyv"
31
+ "hyv",
32
+ "cursor",
33
+ "claude",
34
+ "mcp",
35
+ "ai-agent",
36
+ "ai-writing",
37
+ "voice-profile"
32
38
  ],
33
39
  "author": "Hold Your Voice",
34
40
  "license": "UNLICENSED",
@@ -51,6 +57,7 @@
51
57
  "files": [
52
58
  "dist/",
53
59
  "scripts/postinstall.js",
60
+ "scripts/postinstall-lib.js",
54
61
  "scripts/check-no-duplicates.js",
55
62
  "assets/",
56
63
  "skills/",
@@ -0,0 +1,60 @@
1
+ /**
2
+ * postinstall-lib.js — testable agent copy helpers (used by postinstall.js)
3
+ */
4
+ const fs = require('fs');
5
+ const path = require('path');
6
+
7
+ function readPkgVersion(pkgDir) {
8
+ try {
9
+ return JSON.parse(fs.readFileSync(path.join(pkgDir, 'package.json'), 'utf-8')).version;
10
+ } catch {
11
+ return 'unknown';
12
+ }
13
+ }
14
+
15
+ function readAgentsMarker(markerPath) {
16
+ try {
17
+ if (!fs.existsSync(markerPath)) return null;
18
+ return JSON.parse(fs.readFileSync(markerPath, 'utf-8'));
19
+ } catch {
20
+ return null;
21
+ }
22
+ }
23
+
24
+ function shouldUpgradeAgent(destFile, markerPath, pkgVersion) {
25
+ try {
26
+ if (!fs.existsSync(markerPath)) return !fs.existsSync(destFile);
27
+ const marker = readAgentsMarker(markerPath);
28
+ return !marker || marker.version !== pkgVersion;
29
+ } catch {
30
+ return true;
31
+ }
32
+ }
33
+
34
+ function copyAgent(src, dest, markerPath, pkgVersion) {
35
+ if (!fs.existsSync(src)) return { copied: false, reason: 'missing-src' };
36
+ if (!shouldUpgradeAgent(dest, markerPath, pkgVersion) && fs.existsSync(dest)) {
37
+ return { copied: false, reason: 'up-to-date' };
38
+ }
39
+ fs.mkdirSync(path.dirname(dest), { recursive: true });
40
+ fs.copyFileSync(src, dest);
41
+ return { copied: true, reason: fs.existsSync(dest) ? 'upgraded' : 'created' };
42
+ }
43
+
44
+ function writeAgentsMarker(hyvDir, pkgVersion) {
45
+ const markerPath = path.join(hyvDir, 'agents-version.json');
46
+ if (!fs.existsSync(hyvDir)) fs.mkdirSync(hyvDir, { recursive: true });
47
+ fs.writeFileSync(
48
+ markerPath,
49
+ JSON.stringify({ version: pkgVersion, updated_at: new Date().toISOString() }, null, 2)
50
+ );
51
+ return markerPath;
52
+ }
53
+
54
+ module.exports = {
55
+ readPkgVersion,
56
+ readAgentsMarker,
57
+ shouldUpgradeAgent,
58
+ copyAgent,
59
+ writeAgentsMarker,
60
+ };
@@ -30,13 +30,13 @@ print('');
30
30
  print(' make your ai agent sound exactly like you!');
31
31
  print(' ✓ Free local scan engine ready (works offline)');
32
32
  print('');
33
- print(' Try instantly:');
34
- print(' hyv scan your-draft.md');
35
- print(' hyv fix your-draft.md');
36
- print(' hyv check "your text here"');
33
+ print(' Free local — no account, works offline:');
34
+ print(' npx @holdyourvoice/hyv scan your-draft.md');
37
35
  print(' npx @holdyourvoice/hyv welcome');
36
+ print(' hyv fix | hyv check | hyv mcp');
38
37
  print('');
39
- print(' Profiles + learning (paid power): hyv init');
38
+ print(' 30+ free web tools: https://holdyourvoice.com/tools');
39
+ print(' Profiles + learning (paid): hyv init | hyv plan --free');
40
40
  print('');
41
41
 
42
42
  const configured = [];