@principles/host-runtime 2.0.0 → 2.0.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.
@@ -270,8 +270,8 @@ export type WorkbuddyCorrectionCandidateKind = 'strong' | 'ambiguous' | 'none';
270
270
  /**
271
271
  * Shared WorkBuddy Stage-1 assessment. `strong` may admit inline (no LLM);
272
272
  * `ambiguous` persists a pending Stage-2 candidate (zero LLM in the hook);
273
- * `none` writes nothing. The startsWith pre-filter (SPEC P-5) is retained
274
- * until the cross-host negative matrix authorizes its retirement.
273
+ * `none` writes nothing. Detection delegates position safety to the shared
274
+ * keyword-stage guards (quotes / third person / negation / conditional context).
275
275
  */
276
276
  export declare function assessWorkbuddyCorrectionCandidate(text: string, sessionId: string, store?: UnifiedKeywordStore): {
277
277
  kind: WorkbuddyCorrectionCandidateKind;
@@ -1551,18 +1551,14 @@ export function resolveSharedCorrectionKeywordStoreForDetection(workspaceDir) {
1551
1551
  /**
1552
1552
  * Shared WorkBuddy Stage-1 assessment. `strong` may admit inline (no LLM);
1553
1553
  * `ambiguous` persists a pending Stage-2 candidate (zero LLM in the hook);
1554
- * `none` writes nothing. The startsWith pre-filter (SPEC P-5) is retained
1555
- * until the cross-host negative matrix authorizes its retirement.
1554
+ * `none` writes nothing. Detection delegates position safety to the shared
1555
+ * keyword-stage guards (quotes / third person / negation / conditional context).
1556
1556
  */
1557
1557
  export function assessWorkbuddyCorrectionCandidate(text, sessionId, store) {
1558
1558
  if (Buffer.byteLength(text, 'utf8') > WORKBUDDY_MAX_PROMPT_BYTES) {
1559
1559
  return { kind: 'none', reason: 'prompt_too_large' };
1560
1560
  }
1561
1561
  const resolved = store ?? workbuddyP0KeywordStore();
1562
- // Prefer precision to recall: reject quoted/embedded/reported phrases.
1563
- if (!Object.keys(resolved.terms).some(term => text.trimStart().toLowerCase().startsWith(term.toLowerCase()))) {
1564
- return { kind: 'none', reason: 'not_a_signal' };
1565
- }
1566
1562
  const out = collectSync(text, sessionId, resolved, SYNC_DETECTION_CONFIG, new Date().toISOString());
1567
1563
  const strong = out.isSignal && out.strength === 'STRONG' &&
1568
1564
  out.type === 'correction' && out.matchedPrecision === 'high';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@principles/host-runtime",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Shared host-neutral orchestration for Principles Disciple MVP-Core hook paths.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -31,7 +31,7 @@
31
31
  "lint": "eslint \"src/**/*.ts\""
32
32
  },
33
33
  "dependencies": {
34
- "@principles/core": "^4.0.0",
34
+ "@principles/core": "^4.0.1",
35
35
  "@principles/install-layout": "^0.4.0",
36
36
  "better-sqlite3": "^13.0.3",
37
37
  "js-yaml": "^5.4.3"
@@ -49,5 +49,5 @@
49
49
  "url": "git+https://github.com/csuzngjh/principles.git"
50
50
  },
51
51
  "license": "Apache-2.0",
52
- "gitHead": "48ab9505979feb0cb13757e30d41d8567715efe1"
52
+ "gitHead": "d9bbe994104eac08a8a41fa1c9374f28dc629aec"
53
53
  }