@holdyourvoice/hyv 3.4.1 → 3.4.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/Readme.md CHANGED
@@ -104,6 +104,10 @@ Learning commands can write text-free events under `~/.hyv/learning/`. A manuall
104
104
 
105
105
  VoiceDNA fit, AI-pattern findings, fact consistency, and human approval are separate results. A clean report only states that its configured checks passed. Authorship, factual truth, and publication quality still need separate evidence or review.
106
106
 
107
+ ## performance
108
+
109
+ The frozen synthetic runtime benchmark covers natural text, punctuation-heavy text, final checking, cold CLI startup, and fact linting. On its 100,000-character dotted v3 fixture, seven-run median process CPU time fell from 8,823.134 ms to 17.245 ms. That is 99.8045% lower for this stress case, not a whole-application speedup. Read the [runtime benchmark contract and full results](https://github.com/shashank-sn/holdyourvoice/blob/main/benchmarks/runtime/README.md).
110
+
107
111
  ## development
108
112
 
109
113
  ```bash
@@ -174,7 +174,7 @@ test('CLI and MCP rebuild helpers share fingerprints', () => {
174
174
  version: '1', audience: 'operators', intent: 'explain', format: 'outreach',
175
175
  });
176
176
  assert.match(briefTask.prompt, /# WritingBrief/);
177
- assert.equal(HYV_VERSION, '3.4.1');
177
+ assert.equal(HYV_VERSION, '3.4.2');
178
178
  });
179
179
  test('apply rejects forged tasks, missing capability, and substituted profiles', () => {
180
180
  const reduction = rebuildRecommendation();
package/dist/text.js CHANGED
@@ -25,7 +25,14 @@ export function sentences(text) {
25
25
  if (character === '.') {
26
26
  const previous = text[index - 1] ?? '';
27
27
  const next = text[index + 1] ?? '';
28
- const previousWord = text.slice(start, index).match(/(\p{L}+)$/u)?.[1]?.toLowerCase();
28
+ let previousWordStart = index;
29
+ while (previousWordStart > start) {
30
+ const previousLetter = text.slice(Math.max(start, previousWordStart - 2), previousWordStart).match(/\p{L}$/u)?.[0];
31
+ if (!previousLetter)
32
+ break;
33
+ previousWordStart -= previousLetter.length;
34
+ }
35
+ const previousWord = text.slice(previousWordStart, index).toLowerCase() || undefined;
29
36
  if ((/\d/.test(previous) && /\d/.test(next)) || /\p{L}/u.test(next) || (previousWord && abbreviations.has(previousWord)))
30
37
  continue;
31
38
  }
package/dist/version.js CHANGED
@@ -1 +1 @@
1
- export const HYV_VERSION = '3.4.1';
1
+ export const HYV_VERSION = '3.4.2';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holdyourvoice/hyv",
3
- "version": "3.4.1",
3
+ "version": "3.4.2",
4
4
  "description": "A local-first dual-engine writing gate that protects voice and catches generic AI patterns.",
5
5
  "type": "module",
6
6
  "bin": { "hyv": "dist/cli.js" },